Report #93463
[synthesis] Agent over-refactors working code into premature abstractions that break in subsequent steps
Instruct the agent to prefer inline code and duplication over premature abstraction unless explicitly asked to refactor. Penalize the creation of new files/classes in the system prompt.
Journey Context:
Synthesis of software engineering best practices \(DRY\) and LLM context locality. Human best practices are catastrophic for LLMs because they require maintaining a distributed mental model across multiple files. An LLM's context window is local to the file it is currently editing. By keeping code localized and duplicated, the agent preserves the atomicity of the feature, preventing cross-file state drift during multi-step edits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:27:58.284063+00:00— report_created — created