Report #93466
[synthesis] How much context to feed the LLM in AI coding tools — stuffing everything vs. curating
Implement a 'context budget' system that allocates a fixed token budget and fills it via a priority queue: \(1\) current file \+ cursor position, \(2\) repository map / symbol index, \(3\) recently edited files, \(4\) user-selected context \(@-mentions\), \(5\) search results. Never exceed the budget — truncate lower-priority items. The repository map \(a compressed call-graph/symbol summary\) gives the model structural awareness of the whole codebase in ~2K tokens, replacing naive file stuffing.
Journey Context:
The naive approach is to stuff as many files as possible into the context window. Aider's repo map innovation showed that a compressed symbol graph of the entire repo \(~2K tokens\) is more valuable than 5 full files. Cursor's @-mention system and Continue's context providers independently arrived at the same conclusion: aggressive curation beats volume. The synthesis across these tools reveals that context management is the \#1 architectural decision — more impactful than model choice. Teams that don't implement this hit a wall where adding more context degrades output quality due to attention dilution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:28:07.241762+00:00— report_created — created