Reduce AI code review context with a local knowledge graph
When code is modified, the tool selects only the files directly related to the changes and passes them to the AI as context, rather than having the AI re-read the entire project. It builds a graph of the code structure using Tree-sitter and stores it, allowing the AI to quickly retrieve only the necessary information. The tool runs locally, so code is not sent to external servers.
Tracking the scope of changes
The tool converts code into a graph of nodes and edges representing functions, classes, and import relationships. When a specific file is modified, it traces all files that may be affected, including callers, dependencies, and tests, by following the graph. Based on this trace, the AI reads only the necessary files without scanning the entire project. In a repository of approximately 3,000 files, the graph updates in about 2.5 seconds even if only two files are modified. This process is fast because it only re-parses files whose hash values have changed.
Token usage reduction
By passing graph query results to the AI instead of the entire code, token usage can be significantly reduced. A benchmark on six open-source repositories showed an average token reduction of approximately 63 times per question. These figures are based on a fixed commit as of August 2, 2026, and actual values may vary as the repository grows. The tool includes a context savings estimate in its responses, allowing users to verify the tokens saved.
Supported languages and framework awareness
It supports over 30 languages, including Python, JavaScript, TypeScript, Go, Rust, Java, and C/C++, as well as Jupyter notebooks. In PHP projects, it recognizes Composer PSR-4 imports, Blade template references, and Laravel Route and Eloquent relationships. In Java projects, it analyzes Spring dependency injection, WebFlux routes, and Temporal workflows. Unsupported languages can be added by mapping Tree-sitter grammars through the .code-review-graph/languages.toml file. This configuration applies directly to existing repositories without forking.
Risk-based review in CI environments
Provided as a GitHub Action, it runs automatically in CI pipelines. When a pull request is created, it posts a sticky comment containing functions with risk scores, affected execution flows, and missing tests. This comment is updated in place with every push. If the fail-on-risk option is enabled, merges can be blocked when high-risk items are present. This process runs locally on the CI runner, ensuring source code is not sent to external services.
Limitations and conditions to check before use
It requires Python 3.10 or higher and stores a single SQLite file locally, so no external database is needed. Although the recall rate for impact analysis is displayed as 1.0, this is an upper limit based on the graph's own edges and differs from actual accuracy. For small single-file changes, the graph context may consume more tokens than reading the original file. Flow detection for JavaScript and Go is less accurate than for Python or PHP and requires additional work. Additionally, search ranking is not perfect, and results may be missing for certain module patterns, so manual verification is recommended before critical reviews.