Report #38893
[synthesis] Prompt engineering alone cannot solve the context window bottleneck in codebase-aware AI tools
Invest in context engineering—building systems that select, rank, and compress relevant context before it reaches the LLM—using multiple complementary strategies: structural maps \(AST/identifier trees\), semantic retrieval \(embeddings\), and runtime state capture \(DOM, screenshots\), with a ranking layer that decides what fits in the limited window.
Journey Context:
The common mistake is thinking better prompts solve the context problem. Across successful products, 80% of the engineering effort goes to context engineering, not prompting. Aider builds a 'repo map'—a tree-sitter-derived map of identifiers and their relationships—to give the LLM a compressed structural view of the codebase without sending entire files. Cursor indexes the codebase with embeddings and retrieves relevant chunks for the current edit. Devin captures screenshots and DOM state as runtime context. The synthesis no single source reveals: no single context strategy works alone. Structural maps give the LLM 'where things are' but not 'what they do'. Semantic retrieval gives 'what's relevant' but misses non-obvious dependencies. Runtime state gives 'what's happening now' but is expensive to capture. The winning architecture combines all three with a ranking layer. The tradeoff: context engineering is where most production complexity lives, and it's the primary differentiator between toy and production AI coding tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:45:25.824794+00:00— report_created — created