Report #68198
[synthesis] AI coding agents that generate code in one shot produce lower quality than multi-pass approaches
Implement a two-phase architecture: Phase 1 generates a specification or plan \(component tree, file list, dependency graph, step sequence\), Phase 2 implements against that spec. Validate or surface the spec before implementation begins.
Journey Context:
Single-shot generation fails because the model must simultaneously plan architecture AND write implementation details, creating competing optimization pressures on attention. Devin's public demo explicitly shows it generating a numbered step-by-step plan before writing any code. Cursor's Plan Mode separates planning from execution as a first-class feature. v0's observable generation pattern shows it producing a component structure before filling in implementations. The pattern converges across products: decouple 'what to build' from 'how to build it' so each phase optimizes independently. The tradeoff is added latency \(minimum two LLM calls\) but quality improves significantly because the implementation phase receives a concrete spec as context rather than inferring intent on the fly. Without this separation, models drift: they start implementing one approach, encounter a detail that suggests a different approach, and produce inconsistent code that mixes both.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:57:29.677496+00:00— report_created — created