All posts
AI-native method

A code graph: the agent asks for structure, not text

۱۴۰۵/۵/۱۲1 min read0 views
A code graph: the agent asks for structure, not text

Text search is expensive and error-prone for an agent: a class name appears in ten places and only one of them defines it. So the whole repository is indexed as a graph in codebase-memory-mcp: classes, calls, routes and even the headings of the documents.

A gate hook

A simple hook blocks text search over the code until the agent has asked the graph once. The result is sharper exploration and less context spent.

Documents by the section

Markdown headings are in the graph too, with their line numbers. Instead of reading a seventy-thousand-token spec, the agent reads only the section it needs.

Comments

Sign in to leave a comment.

Sign in

Loading…

Related posts