The Failure of 'Lights-Off' Engineering
Many teams are attempting to build "lights-off" software factories where agents write, test, and deploy code without human oversight. While this approach works for greenfield projects or simple scripts, it fails in complex, long-term "brownfield" codebases. The core issue is that current coding models are reinforced to pass binary tests (e.g., SWE-bench) rather than maintain architectural integrity. Because the cost of poor architecture—such as "shotgun surgery" or tight coupling—only manifests months later, the model's reward function never penalizes bad design. This leads to "slop code" that becomes increasingly difficult for humans to maintain or debug.
Why Current Models Struggle with Maintainability
Coding models are next-token predictors trained on harnesses that prioritize passing tests. If a model can pass a test by wrapping code in unnecessary try-catch blocks or casting types improperly, it will do so. Because maintainability is orders of magnitude harder to verify than a green test, current RL (Reinforcement Learning) techniques cannot effectively teach models to write clean, sustainable code. Even as models improve at one-off tasks, they remain fundamentally limited by their inability to "see" the long-term architectural impact of their changes.
The Path Forward: Model-Assisted Planning
Instead of abandoning code review, teams should use AI to facilitate better upfront alignment. This "lights-on" approach reduces the cognitive load of code review by ensuring the model follows a pre-defined plan. The recommended workflow includes:
- Product Review: Clearly define the problem and desired behavior using mockups.
- System Architecture: Establish component contracts, data models, and constraints.
- Program Design: Explicitly map out types, method signatures, and call graphs before the agent writes a single line of code.
- Vertical Slices: Implement changes in small, verifiable increments.
By spending 30 minutes on alignment and planning, engineers can save hours of debugging and review time. A good pull request should be a joy to read because it follows a pre-agreed design, rather than a mystery to untangle. The goal is not to eliminate human oversight, but to use AI as a tool for leverage while maintaining ownership of the codebase.