Code Review Graph for Safer AI SRE Reviews

Production incidents rarely wait for a clean refactor window. An SRE may need to review a hotfix, Terraform change, runbook update, or service patch while an AI assistant is helping in the terminal. Code Review Graph is trending because it attacks a real weakness in that workflow: agents waste context by rereading broad parts of a repo, then still miss the change's blast radius.
What Is Code Review Graph?
Code Review Graph is a local-first code intelligence graph for MCP and CLI workflows. It parses a repository with Tree-sitter, stores functions, classes, imports, calls, inheritance, and test relationships as graph data, then exposes targeted context to AI tools through MCP.
The operational point is simple. Instead of asking an agent to scan a monorepo, the graph can answer which files, call paths, and tests are close to the change. The project README reports an 82x median per-question token reduction across benchmarked repositories, with incremental updates that reparse only changed files.
Key Features
- Local-first graph building, so source analysis runs on the workstation or CI runner.
- MCP integration for Codex, Cursor, Claude Code, Gemini CLI, GitHub Copilot, and other supported tools.
- Blast-radius analysis that traces callers, dependents, and related tests from changed files.
- Broad language coverage across Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, Terraform, Ansible, SQL, shell, and more.
- A GitHub Action that can post PR review context and optionally gate risky changes.
Installation
Install it with pip or pipx, then let the installer configure supported AI tools:
pipx install code-review-graph
code-review-graph install
code-review-graph build
To configure one tool explicitly, pass a platform name:
code-review-graph install --platform codex
code-review-graph install --platform cursor
The project requires Python 3.10 or newer. If uv is available, the generated MCP configuration can use uvx; otherwise it falls back to the installed command.
Usage For SRE Reviews
Start with the repository that owns the production change:
code-review-graph build
Then ask the AI assistant to use graph context before reviewing a patch. Good prompts are concrete:
Use Code Review Graph to inspect the blast radius for this alert routing change.
List affected handlers, integration tests, and any risky dependency edges.
This is useful for changes that look small but touch shared operational paths: alert grouping, Kubernetes manifests, Terraform modules, authentication middleware, retry logic, or background job scheduling.
Operational Tips
Run the graph locally for interactive incident work, then add the GitHub Action for pull requests that affect platform code. Treat graph output as a review accelerator, not a replacement for tests. It can narrow attention to likely impact areas, but SRE teams still need runtime checks, rollout guards, and clear rollback steps.
For private infrastructure repositories, the local-first design matters. The graph and queries can run where the code already lives, which keeps source context closer to existing access controls.
Conclusion
Code Review Graph is a practical answer to a common AI operations problem: agents need enough context to help, but not so much that they drown in the repository. For SRE teams adopting AI-assisted reviews, a local dependency graph can make incident fixes, platform PRs, and infrastructure changes easier to inspect under pressure.
If you want AI agents that work directly inside your SRE workflows, take a look at Akmatori. Akmatori connects alerts, runbooks, infrastructure context, and automation so engineering teams can investigate and respond faster. Built with Gcore infrastructure, it is designed for production teams that care about reliability.
