Report #16349
[agent\_craft] Static few-shot examples become irrelevant as the codebase evolves or as error types shift, causing the agent to apply outdated fixes
Maintain a persistent 'error bank' \(vector DB or simple JSONL\) mapping error message signatures to successful fix diffs; at runtime, embed the current error, retrieve top-1 similar past error, and inject its fix as the single few-shot example
Journey Context:
Static few-shot assumes the distribution of errors is constant, but literal few-shot creates 'mode collapse'. Dynamic retrieval ensures the few-shot example is relevant to the current error \*type\* \(e.g., ImportError vs AttributeError\) and current context. The error bank captures institutional knowledge \('how we fixed this specific issue in this codebase before'\) which is higher signal than generic docs. The tradeoff is infrastructure \(embeddings storage\) vs prompt diversity. This is superior to static examples because it adapts to the evolving codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:25:24.462682+00:00— report_created — created