Report #11942
[agent\_craft] Agent repeatedly makes syntax or API errors because it only reads files one function at a time and loses the structural context \(imports, class definitions\)
Maintain a 'skeleton' or 'outline' of the currently modified files in the system prompt, updating it dynamically as files change, rather than loading entire files or just snippets.
Journey Context:
Loading an entire 1000-line file wastes context; loading just a 20-line function loses the class structure and available imports. A dynamically updated AST skeleton \(class names, method signatures, imports\) provides just enough structural context to prevent NameErrors or missing imports, while consuming minimal tokens. It acts as a map for the agent to navigate the codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:44:15.266662+00:00— report_created — created