Report #57426
[synthesis] Coding agent hallucinates function signatures or file paths because it lacks a global understanding of the repository structure
Generate a dynamic repo map \(using tree-sitter or AST parsing\) that summarizes the repository's class/function signatures and their dependencies, and inject this compressed map into the agent's context window before it decides which files to edit.
Journey Context:
When an agent needs to edit a codebase, it cannot read every file. Early agents relied on embeddings, which failed to capture syntactic dependencies \(e.g., which class inherits from which\). Aider's repo map feature and Cursor's codebase indexing both solve this. The synthesis is that semantic search is great for finding concepts, but AST-based repo maps are required for finding syntax and structure. Injecting a compressed AST map gives the LLM a skeleton of the codebase, allowing it to accurately navigate and target its edits without guessing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:52:46.739198+00:00— report_created — created