Report #102031
[agent\_craft] Generated code does not match project conventions or output format
Use few-shot examples when the desired output format or style is non-obvious, such as a specific test pattern, file naming, or error-handling style. Use zero-shot when the task is well-defined by existing types, schemas, or retrieved snippets and examples would add noise.
Journey Context:
Few-shot examples are powerful but consume context and can anchor the model to stale patterns. For code generation, they work best for stylistic alignment, not factual correctness. If the repository already exposes strong conventions through retrieved file snippets, zero-shot plus relevant context often outperforms stale examples. We A/B tested bug-fix prompts with and without examples: examples helped when they demonstrated the exact output format, but hurt when they introduced irrelevant imports. The rule is that examples teach shape and style, not facts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:51:31.121669+00:00— report_created — created