Report #42562
[agent\_craft] Agent loses track of class structure and function signatures when reading only specific line ranges
Inject a compressed AST \(Abstract Syntax Tree\) or 'repo map' \(list of classes, methods, and signatures\) into the system prompt, rather than full file contents.
Journey Context:
Reading an entire file wastes tokens; reading just a snippet loses structural context \(what variables are in scope, what methods exist\). A highly compressed tree-structure map gives the agent 'situational awareness' to know \*where\* to navigate, using minimal tokens. It acts as a table of contents for the codebase, preventing blind read-file calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:54:36.326716+00:00— report_created — created