tirth8205/code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked...

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 1 hour ago
Added to GitGenius on July 22nd, 2026
Created on February 26th, 2026
Open Issues & Pull Requests: 152 (+0)
GitHub issues: Enabled
Number of forks: 2,851
Total Stargazers: 31,329 (+4)
Total Subscribers: 102 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.0 days
Mean response time: 12.0 days
90th percentile: 27.7 days
Tracked items: 312

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 81% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Almost all tracked open issues have seen activity in the last three months. Only 13% of issues opened in the past year have been closed. Three people close 93% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 88
New in 7 days: 2
Closed in 7 days: 0
Avg open age: 29 days
Stale 30+ days: 34
Stale 90+ days: 0

Recent activity

Opened in 7 days: 2
Closed in 7 days: 0
Comments in 7 days: 1
Events in 7 days: 3

Top labels

  • bug (39)
  • enhancement (14)

Detailed Description

The code-review-graph repository is a Python-based tool that builds a local-first code intelligence graph designed to reduce token consumption for AI coding assistants during code review tasks. The project addresses a core problem in AI-assisted development: large language models often re-read substantial portions of a codebase unnecessarily, wasting tokens and context window space. By constructing a persistent structural map of code and tracking changes incrementally, the tool enables AI assistants to access only the most relevant files for any given review task.

The repository uses Tree-sitter to parse source code into abstract syntax trees and builds a graph representation of code structure, including nodes for functions, classes, and imports, along with edges representing calls, inheritance relationships, and test coverage. This graph is stored in SQLite and queried at review time to compute the minimal set of files needed for analysis. The tool operates as both a Model Context Protocol server and a command-line interface, making it compatible with multiple AI coding platforms including Claude Code, Cursor, Windsurf, Zed, Continue, and others. A single install command auto-detects which platforms are present and configures the appropriate MCP integration for each.

The core technical innovation is blast-radius analysis. When a file changes, the graph traces every caller, dependent, and test that could be affected by that change, allowing the AI assistant to focus review scope precisely. Incremental updates keep the graph current in under two seconds for large projects by diffing changed files and re-parsing only what has actually changed, leaving thousands of unchanged files untouched. This capability is particularly valuable in monorepo environments where token waste is most acute. The benchmarks demonstrate median token reductions of approximately 82x across six real repositories, with maximum reductions reaching 528x in best-case scenarios.

The tool supports broad language coverage including Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, C#, Ruby, Kotlin, Swift, PHP, Scala, Solidity, Dart, R, Perl, Lua, Objective-C, shell scripts, Elixir, Zig, PowerShell, Julia, ReScript, GDScript, Nix, Verilog, SQL, Terraform, Ansible, Vue, Svelte, Astro, and Jupyter notebooks. Users can extend language support by adding custom language definitions in a languages.toml configuration file without forking the repository.

The repository includes a GitHub Action for risk-scored pull request reviews that runs entirely locally on CI runners without sending source code to external services. The action posts sticky comments with risk-scored functions, affected execution flows, and test gaps, with optional merge-gate functionality based on risk levels.

The repository shares contributors with openemr/openemr, anthropics/claude-code, and microsoft/vscode.