Report #50564
[counterintuitive] AI is more reliable for greenfield code generation than for modifying existing code
Prefer giving AI constrained modification tasks with clear existing patterns over open-ended generation. When generating new code, provide explicit constraints, reference implementations, and architectural guardrails. The more constraints you provide, the more reliable the output.
Journey Context:
Intuition says writing from scratch is easier than modifying complex existing code. For humans, this is often true. For AI, the opposite holds: existing code provides constraints that keep the model in-distribution. Greenfield generation lacks these guardrails, so AI produces plausible-looking architectures that violate implicit project conventions, use wrong abstractions, or create subtle incompatibilities. The existing codebase acts as a specification — a concrete example of what 'right' looks like. Without it, AI hallucinates reasonable but wrong design decisions. This is why AI excels at 'implement this function following the pattern of these three existing ones' and struggles with 'design a new module from scratch.'
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:21:33.129322+00:00— report_created — created