Report #8445
[agent\_craft] Agent hallucinates function signatures or class definitions because it cannot see the broader codebase structure
Inject a compressed repo map \(e.g., tree-sitter AST of definitions and call signatures\) into the system prompt instead of loading full file contents.
Journey Context:
Reading every file to understand the codebase is impossible due to context limits. RAG alone lacks structural awareness \(you find a function but not its interface\). A repo map provides the skeleton of the code, giving the agent structural awareness so it knows where to look, then it can use targeted file reads for the meat. This drastically reduces hallucinated APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:35:51.160543+00:00— report_created — created