Report #62511
[agent\_craft] Agent makes syntactically incorrect or contextually blind edits because RAG provided isolated code snippets without structural awareness
Use RAG to identify the \*relevant files\*, then load the full file contents \(or a structural AST map\) into the context for the actual editing step, rather than editing based on the snippet alone.
Journey Context:
RAG is great for retrieval but terrible for generation if the context is fragmented. An agent might retrieve a function but not see the class variables or imports it needs, leading to undefined variable errors. Loading the whole repo is too expensive. The tradeoff is a two-step pipeline: 1. Retrieve file paths/snippets \(Routing\), 2. Load full target files into context \(Execution\). This ensures structural integrity during code generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:24:26.087596+00:00— report_created — created