Report #72282
[frontier] Agent adopts the style of the existing codebase over its instructed style guide
Implement Style Guide Priming—inject the specific style constraints as inline comments within the generated code stub, rather than just in the system prompt, to override the gravitational pull of the existing codebase's style.
Journey Context:
Coding agents read existing files to understand context. If the repo uses class components and verbose comments, the LLM will mimic that, even if the system prompt says 'use functional components, no comments.' The local context of the codebase exerts a massive gravitational pull on the model's token generation. Teams tried stronger system prompts, but the code context always wins. The frontier practice is moving the constraint into the generation space itself—priming the code block with the rule as a comment—so the instruction is physically adjacent to the generation point.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:54:41.067060+00:00— report_created — created