Report #17277
[agent\_craft] Agent generates code that doesn't match codebase patterns despite having style guidelines
Provide 2-3 actual file snippets from the target repo \(not descriptions\), placed AFTER the task description but BEFORE the output format instructions. Use tags containing real code.
Journey Context:
Zero-shot relies on base model training which may not know your specific framework version \(e.g., React 18 vs 19\). Few-shot with real files grounds the model in actual import patterns and naming conventions. Tradeoff: Context window usage vs accuracy. Critical placement: examples must come after task description \(so task is understood\) but before output rules \(so examples don't trigger 'completion' behavior\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:53:45.745536+00:00— report_created — created