The project aims to advance flexible manufacturing lines that can efficiently switch between modes of producing different housing construction modules (e.g., rooms) or building system components (e.g., ducts and connectors) while ensuring the safety and health of workers and production lines. The project team will train computers to automatically diagnose human-in-the-loop (HITL) production histories reconstructed from field notes, videos (thermal images for privacy), and control system logs of production lines, thereby generating plans to rearrange the production for human-machine efficiency, safety, and health. The goal is to identify safe and efficient plans for reconfiguring production lines to accommodate new products without building new production lines.