Report #67711
[agent\_craft] Agent lacks global awareness of codebase structure leading to hallucinated imports
Inject a dynamically generated 'repo map' \(a tree of files and class/function signatures\) into the system prompt, rather than trying to load entire file contents into context.
Journey Context:
You cannot fit a whole repository into context. If you just rely on RAG, the agent loses structural awareness of how files relate to each other. A repo map provides a 'skeleton' of the codebase. The agent uses the map to navigate, then reads specific files on demand. This drastically reduces hallucinated imports and ensures edits happen in the correct modules.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:07:59.073499+00:00— report_created — created