Software engineering has spawned a vast literature, a lot of it deriving from manufacturing.
Process control, meaning in many cases maximizing uniformity among outputs, is all about looking for statistical anomalies. What's about to break? What's already broken?
Most life cycle development models put a premium on getting as much right at design time as feasible. The so-called Waterfall approach tries to prevent any dabbling in implementation until all the requirements have been fully specified, in terms of use cases (scenarios) or whatever lists.
A more reasonable approach is to start down the implementation path with mock ups and prototypes, garnering feedback from end users. This means system architecture is not finalized before some construction has occurred.
Software development is not exactly like building a physical building -- there's still customer feedback and changes to blueprints rather late in the game.
Agile development methods include such refactoring as a part of its test driven approach.
CMMI, IEEE 1417, Six Sigma... a vast literature.