code-review-graph
A local knowledge graph that follows code dependencies and gives coding agents a smaller, more relevant context for a change.
8.9× fewer tokens (median, 18 questions, six repositories)
Results depend on the task and repository. This is a reported benchmark, not a guarantee for every codebase.
A pull request changes a few functions. Finding the context for those functions can still send a coding assistant through thousands of lines. Broad searches return files, while the relationships that explain the change are scattered across them. I built code-review-graph to follow those relationships directly.
Following a change through the graph
The graph is local and persistent. Tree-sitter parses the source into syntax trees without requiring compilation, and the tool extracts functions, classes, imports and call sites. Their dependencies become a directed graph, stored in one SQLite file. File saves trigger incremental updates; the next question does not have to start from an empty map.
When a diff arrives, the system finds the changed symbols and walks outwards. How far to walk was a question I kept returning to. Too few hops and a relevant caller disappears from view. Too many and the assistant is back to reading half the repository. Two hops is the default, with an override when the task needs more.
The Model Context Protocol connects that graph to the coding assistant. A query returns the relevant code and its relationships, leaving the model to reason about the change. Version 2.4 also records confidence in the calls it links. Static analysis has limits, and the context should carry those limits with it.
Eight lines instead of 4,912
At Claude Founder House in London in September 2026, I demonstrated the difference with a question about how FastAPI builds a route handler. A grep match returned routing.py: 4,912 lines. The graph returned the eight lines of the relevant function. Across 18 questions on six real repositories, an agent using the graph needed a median of 8.9× fewer tokens to reach the same answer as the baseline. The saving belongs to that evaluation, not every possible task.
The project is open source under the MIT licence. Version 2.4, released in November 2026, installs into 18 coding platforms. Astra Recall, an experiment from the GPT-6 Astra Hackathon in London, adds a memory the user can see, correct and forget. It learns only from what the user writes and remains separate from the code graph. For now, that work sits in an open pull request.