Report #58183
[agent\_craft] Agent uses the same retrieval strategy for explain this function as for fix the bug in the auth flow
Implement a query router that classifies intent: route explain queries to a summarizer/embedder, and route fix/edit queries to a precise code retriever \(AST-based\) that returns raw, line-numbered context.
Journey Context:
A single RAG pipeline fails because reading and writing require different context shapes. Explanation needs broad, semantic context. Editing needs narrow, syntactically exact context. If you give an editor broad context, it hallucinates edits. If you give an explainer narrow context, it misses the big picture. The tradeoff is the complexity of maintaining a router, but it dramatically improves task success rates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:09:05.080795+00:00— report_created — created