code-review-graph — What is it?

code-review-graph is a local knowledge graph for Claude Code that builds a persistent map of your codebase, reducing token usage by 6.8× on reviews and up to 49× on daily coding tasks.

⭐ 17,060 Stars 🍴 1,838 Forks Python Author: tirth8205
Source: Description View on GitHub →

Why it matters

This project is gaining attention due to its innovative approach to reducing token consumption in AI coding tools by building a structural map of the codebase. It addresses the pain point of inefficient AI tool usage, particularly in large codebases, and fills the gap by providing a more efficient way to manage AI-assisted code reviews. The unique technical choice of using Tree-sitter for parsing and the Model Context Protocol (MCP) for context-aware assistance stands out.

Source: Synthesis of README and project traits

Core Features

Persistent Knowledge Graph

Builds a structural map of the codebase using Tree-sitter, storing nodes (functions, classes, imports) and edges (calls, inheritance, test coverage).

Source: README How It Works
Incremental Updates

Automatically updates the graph on every file edit and git commit, re-parsing only changed files for efficiency.

Source: README How It Works
Blast-radius Analysis

Traces the impact of code changes to determine the minimal set of files that need to be reviewed, reducing unnecessary token usage.

Source: README Blast-radius analysis
Multi-language Support

Supports 24 programming languages and Jupyter notebooks, with full Tree-sitter grammar support for various language constructs.

Source: README 24 languages + Jupyter notebooks

Architecture

The architecture involves parsing the repository into an Abstract Syntax Tree (AST) with Tree-sitter, converting it into a graph, and then querying this graph to compute the minimal review set. It uses the Model Context Protocol (MCP) for context-aware assistance and employs a blast-radius analysis to determine the impact of code changes. The project is structured with a clear separation of concerns, including hooks for post-checkout, post-merge, pre-commit, and pre-push, as well as a daemon for background processing.

Source: Code tree + dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) mcp tree-sitter networkx watchdog Persistent Knowledge GraphPersistent Knowledg… Incremental Updates Blast-radius AnalysisBlast-radius Analys… Multi-language SupportMulti-language Supp… code-review-graph Project Core feature Key dependency

Center: project; inner ring: core feature modules; outer ring: key dependencies. Auto-generated from core_features and tech_stack.key_deps.

Tech Stack

LanguagePythonFrameworkuses Tree-sitter for parsing and MCP for context-aware assistance
mcptree-sitternetworkxwatchdog
Not specified, but likely to be a local Python environment with the necessary dependencies installed
Source: Dependency files + code tree

Quick Start

pip install code-review-graph code-review-graph install code-review-graph build
Source: README Quick Start

Use Cases

This project is for developers working with large codebases who want to reduce token consumption in AI coding tools. It is useful in scenarios where AI-assisted code reviews are performed, and it solves the problem of inefficient AI tool usage by providing a more efficient way to manage these reviews.

Source: README

Strengths & Limitations

Strengths

  • Strength 1: Reduces token consumption significantly in AI coding tools.
  • Strength 2: Supports a wide range of programming languages and platforms.
  • Strength 3: Provides incremental updates for efficiency.

Limitations

  • Limitation 1: The project is still in beta and may have some limitations or bugs.
  • Limitation 2: The overhead of maintaining a knowledge graph might be significant for very small projects.
Source: Synthesis of README, code structure and dependencies

Latest Release

v2.3.3 (2026-05-08): Large additive release with new languages/extensions, platform install targets, and framework configurations.

Source: GitHub Releases

Verdict

code-review-graph is a promising project for developers looking to optimize AI-assisted code reviews in large codebases. Its innovative approach to reducing token consumption and its support for multiple languages make it a valuable tool for teams aiming to improve efficiency and reduce costs associated with AI coding tools.

Transparency Notice
This page is auto-generated by AI (a large language model) from the following public materials: GitHub README, code tree, dependency files and release notes. Analyzed at: 2026-05-24 13:12. Quality score: 70/100.

Data sources: README, GitHub API, dependency files