Report #35741
[agent\_craft] Loading entire repository into context causes attention dilution and token overflow
Use an AST-based repo map to fetch only relevant signatures and scaffolds, rather than dumping whole files. Load implementations iteratively only when editing.
Journey Context:
Standard RAG is often too noisy for code because chunking breaks syntax and semantic flow. Whole-repo loading hits token limits and severely degrades instruction following. The sweet spot is dynamic context assembly: load the interface/signature \(the 'repo map'\) to give the agent global awareness, let the agent reason about where to make changes, then load the specific implementation only when needed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:28:08.073112+00:00— report_created — created