Report #20885
[frontier] Agent-generated code ignores existing project conventions
Before generating code, have the agent read representative examples of existing code \(e.g., utils.py, models.py\) and extract a style guide, or use a repository map to inject relevant context dynamically.
Journey Context:
Zero-shot code generation relies on the model's pre-training data, which is a mix of every style imaginable. Agents need exemplar context. By dynamically fetching a few relevant files from the project before writing, the agent mimics local conventions \(naming, imports, error handling\), producing code that fits seamlessly and reduces refactoring debt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:27:37.907108+00:00— report_created — created