code-review-graph 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. code_review_graph-1.2.0/.claude-plugin/plugin.json +11 -0
  2. code_review_graph-1.2.0/.github/workflows/ci.yml +37 -0
  3. code_review_graph-1.2.0/.gitignore +50 -0
  4. code_review_graph-1.2.0/.mcp.json +9 -0
  5. code_review_graph-1.2.0/LICENSE +21 -0
  6. code_review_graph-1.2.0/PKG-INFO +323 -0
  7. code_review_graph-1.2.0/README.md +289 -0
  8. code_review_graph-1.2.0/agents/graph-review-agent.md +28 -0
  9. code_review_graph-1.2.0/code_review_graph/__init__.py +1 -0
  10. code_review_graph-1.2.0/code_review_graph/__main__.py +4 -0
  11. code_review_graph-1.2.0/code_review_graph/cli.py +106 -0
  12. code_review_graph-1.2.0/code_review_graph/embeddings.py +221 -0
  13. code_review_graph-1.2.0/code_review_graph/graph.py +460 -0
  14. code_review_graph-1.2.0/code_review_graph/incremental.py +487 -0
  15. code_review_graph-1.2.0/code_review_graph/main.py +216 -0
  16. code_review_graph-1.2.0/code_review_graph/parser.py +539 -0
  17. code_review_graph-1.2.0/code_review_graph/tools.py +763 -0
  18. code_review_graph-1.2.0/docs/COMMANDS.md +98 -0
  19. code_review_graph-1.2.0/docs/FEATURES.md +24 -0
  20. code_review_graph-1.2.0/docs/INDEX.md +11 -0
  21. code_review_graph-1.2.0/docs/LEGAL.md +13 -0
  22. code_review_graph-1.2.0/docs/LLM-OPTIMIZED-REFERENCE.md +63 -0
  23. code_review_graph-1.2.0/docs/ROADMAP.md +17 -0
  24. code_review_graph-1.2.0/docs/TROUBLESHOOTING.md +37 -0
  25. code_review_graph-1.2.0/docs/USAGE.md +81 -0
  26. code_review_graph-1.2.0/docs/architecture.md +106 -0
  27. code_review_graph-1.2.0/docs/plans/2026-02-26-ci-readme-design.md +165 -0
  28. code_review_graph-1.2.0/docs/schema.md +177 -0
  29. code_review_graph-1.2.0/hooks/hooks.json +26 -0
  30. code_review_graph-1.2.0/pyproject.toml +64 -0
  31. code_review_graph-1.2.0/references/LLM-OPTIMIZED-REFERENCE.md +63 -0
  32. code_review_graph-1.2.0/settings.json +9 -0
  33. code_review_graph-1.2.0/skills/build-graph/SKILL.md +36 -0
  34. code_review_graph-1.2.0/skills/review-delta/SKILL.md +44 -0
  35. code_review_graph-1.2.0/skills/review-pr/SKILL.md +64 -0
  36. code_review_graph-1.2.0/tests/__init__.py +0 -0
  37. code_review_graph-1.2.0/tests/fixtures/SampleJava.java +59 -0
  38. code_review_graph-1.2.0/tests/fixtures/sample_go.go +48 -0
  39. code_review_graph-1.2.0/tests/fixtures/sample_python.py +39 -0
  40. code_review_graph-1.2.0/tests/fixtures/sample_rust.rs +46 -0
  41. code_review_graph-1.2.0/tests/fixtures/sample_typescript.ts +41 -0
  42. code_review_graph-1.2.0/tests/fixtures/test_sample.py +19 -0
  43. code_review_graph-1.2.0/tests/test_graph.py +161 -0
  44. code_review_graph-1.2.0/tests/test_multilang.py +111 -0
  45. code_review_graph-1.2.0/tests/test_parser.py +100 -0
  46. code_review_graph-1.2.0/tests/test_tools.py +108 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "code-review-graph",
3
+ "description": "Persistent incremental knowledge graph for token-efficient, context-aware code reviews with Claude Code",
4
+ "version": "1.0.0",
5
+ "author": {
6
+ "name": "Tirth"
7
+ },
8
+ "repository": "https://github.com/tirth/code-review-graph",
9
+ "license": "MIT",
10
+ "tags": ["code-review", "knowledge-graph", "incremental", "tree-sitter"]
11
+ }
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.10"
18
+ - name: Install dependencies
19
+ run: pip install -e ".[dev]"
20
+ - name: Lint with ruff
21
+ run: ruff check code_review_graph/
22
+
23
+ test:
24
+ runs-on: ubuntu-latest
25
+ strategy:
26
+ matrix:
27
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - name: Set up Python ${{ matrix.python-version }}
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+ - name: Install dependencies
35
+ run: pip install -e ".[dev]" pytest-cov
36
+ - name: Run tests with coverage
37
+ run: pytest --tb=short -q --cov=code_review_graph --cov-report=term-missing
@@ -0,0 +1,50 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ dist/
8
+ build/
9
+ *.egg
10
+ .eggs/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ env/
16
+
17
+ # Graph database
18
+ *.db
19
+ *.db-journal
20
+ *.db-wal
21
+ *.db-shm
22
+ .code-review-graph.db
23
+
24
+ # IDE
25
+ .idea/
26
+ .vscode/
27
+ *.swp
28
+ *.swo
29
+ *~
30
+
31
+ # OS
32
+ .DS_Store
33
+ Thumbs.db
34
+
35
+ # Node (if any JS tooling)
36
+ node_modules/
37
+
38
+ # Claude Code
39
+ .claude/
40
+
41
+ # Coverage
42
+ htmlcov/
43
+ .coverage
44
+ .coverage.*
45
+
46
+ # pytest
47
+ .pytest_cache/
48
+
49
+ # mypy
50
+ .mypy_cache/
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "code-review-graph": {
4
+ "command": "python",
5
+ "args": ["-m", "code_review_graph.main"],
6
+ "cwd": "."
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tirth
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,323 @@
1
+ Metadata-Version: 2.4
2
+ Name: code-review-graph
3
+ Version: 1.2.0
4
+ Summary: Persistent incremental knowledge graph for token-efficient, context-aware code reviews with Claude Code
5
+ Author: Tirth
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: claude-code,code-review,knowledge-graph,mcp,tree-sitter
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Requires-Python: >=3.10
19
+ Requires-Dist: fastmcp>=0.1.0
20
+ Requires-Dist: gitpython>=3.1.0
21
+ Requires-Dist: mcp>=1.0.0
22
+ Requires-Dist: networkx>=3.2
23
+ Requires-Dist: tree-sitter-language-pack>=0.3.0
24
+ Requires-Dist: tree-sitter>=0.23.0
25
+ Requires-Dist: watchdog>=4.0.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.3.0; extra == 'dev'
30
+ Provides-Extra: embeddings
31
+ Requires-Dist: numpy>=1.26; extra == 'embeddings'
32
+ Requires-Dist: sentence-transformers>=3.0.0; extra == 'embeddings'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # code-review-graph
36
+
37
+ **Persistent incremental knowledge graph for token-efficient, context-aware code reviews with Claude Code.**
38
+
39
+ [![GitHub stars](https://img.shields.io/github/stars/tirth8205/code-review-graph?style=flat-square)](https://github.com/tirth8205/code-review-graph/stargazers)
40
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
41
+ [![CI](https://github.com/tirth8205/code-review-graph/actions/workflows/ci.yml/badge.svg)](https://github.com/tirth8205/code-review-graph/actions/workflows/ci.yml)
42
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg?style=flat-square)](https://www.python.org/)
43
+ [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
44
+ [![v1.2.0](https://img.shields.io/badge/version-1.2.0-purple.svg?style=flat-square)](#)
45
+
46
+ ---
47
+
48
+ > It turns Claude from "smart but forgetful tourist" into "local expert who already knows the map."
49
+
50
+ Stop re-scanning your entire codebase on every review. `code-review-graph` builds a structural graph of your code using Tree-sitter, tracks it incrementally, and gives Claude Code the context it needs to review only what changed โ€” and everything affected by those changes.
51
+
52
+ | Without graph | With graph |
53
+ |---|---|
54
+ | Full repo scan every review | Only changed + impacted files |
55
+ | No blast-radius awareness | Automatic impact analysis |
56
+ | Token-heavy (entire codebase) | **5-10x fewer tokens** per review |
57
+ | Manual "what else does this affect?" | Graph-powered dependency tracing |
58
+
59
+ ---
60
+
61
+ ## โœจ Features
62
+
63
+ - **Incremental updates** โ€” Only re-parses files that changed since last build. Subsequent updates take <2s.
64
+ - **12+ languages** โ€” Python, TypeScript, JavaScript, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, C/C++
65
+ - **Blast-radius analysis** โ€” See exactly which functions, classes, and files are impacted by any change
66
+ - **Token-efficient reviews** โ€” Send only changed + impacted code to the model, not your entire repo
67
+ - **Auto-update hooks** โ€” Graph stays current on every file edit and git commit
68
+ - **Vector embeddings** โ€” Optional semantic search across your codebase with sentence-transformers
69
+ - **Watch mode** โ€” Real-time graph updates as you code
70
+
71
+ For the full feature list and changelog, see [docs/FEATURES.md](docs/FEATURES.md).
72
+
73
+ ---
74
+
75
+ ## ๐Ÿš€ Quick Start
76
+
77
+ ### Installation (one command)
78
+
79
+ ```bash
80
+ pip install code-review-graph
81
+ ```
82
+
83
+ That's it. Works on Python 3.10+.
84
+
85
+ With semantic search (optional):
86
+
87
+ ```bash
88
+ pip install code-review-graph[embeddings]
89
+ ```
90
+
91
+ ### CLI
92
+
93
+ ```bash
94
+ code-review-graph build # Parse your entire codebase
95
+ code-review-graph update # Incremental update (only changed files)
96
+ code-review-graph watch # Real-time auto-updates as you code
97
+ code-review-graph status # Show graph statistics
98
+ code-review-graph serve # Start MCP server
99
+ ```
100
+
101
+ No git clone. No manual venv. No Python upgrade needed.
102
+
103
+ ### Connect to Claude Code
104
+
105
+ Add to your project's `.mcp.json`:
106
+
107
+ ```json
108
+ {
109
+ "mcpServers": {
110
+ "code-review-graph": {
111
+ "command": "code-review-graph",
112
+ "args": ["serve"]
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ ### Use the skills
119
+
120
+ ```
121
+ /code-review-graph:build-graph # Parse your codebase (~10s for 500 files)
122
+ /code-review-graph:review-delta # Review only what changed
123
+ /code-review-graph:review-pr # Full PR review with blast-radius
124
+ ```
125
+
126
+ **Before**: Claude reads 200 files, uses ~150k tokens.
127
+ **After**: Claude reads 8 changed + 12 impacted files, uses ~25k tokens.
128
+
129
+ For detailed usage instructions, see [docs/USAGE.md](docs/USAGE.md).
130
+
131
+ ---
132
+
133
+ ## ๐Ÿ› ๏ธ How It Works
134
+
135
+ ```
136
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
137
+ โ”‚ Claude Code โ”‚
138
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
139
+ โ”‚ โ”‚ Skills โ”‚ โ”‚ Hooks โ”‚ โ”‚ Agent โ”‚ โ”‚
140
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
141
+ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
142
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
143
+ โ”‚ โ”‚ โ”‚
144
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”‚
145
+ โ”‚ โ”‚ MCP Server โ”‚ โ”‚
146
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
147
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
148
+ โ”‚
149
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
150
+ โ”‚ โ”‚ โ”‚
151
+ โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
152
+ โ”‚ Parser โ”‚ โ”‚ Graph โ”‚ โ”‚ Incremental โ”‚
153
+ โ”‚(sitter)โ”‚ โ”‚(SQLite)โ”‚ โ”‚ (git diff) โ”‚
154
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
155
+ ```
156
+
157
+ | Component | File | Role |
158
+ |-----------|------|------|
159
+ | **Parser** | `code_review_graph/parser.py` | Tree-sitter multi-language AST parser. Extracts nodes and relationships. |
160
+ | **Graph** | `code_review_graph/graph.py` | SQLite-backed knowledge graph with NetworkX for traversal queries. |
161
+ | **Incremental** | `code_review_graph/incremental.py` | Git-aware delta detection. Re-parses only changed files + dependents. |
162
+ | **MCP Server** | `code_review_graph/main.py` | Exposes 8 tools to Claude Code via the Model Context Protocol. |
163
+ | **Skills** | `skills/` | Three review workflows: `build-graph`, `review-delta`, `review-pr`. |
164
+ | **Hooks** | `hooks/` | Auto-updates the graph on file edits and git commits. |
165
+
166
+ For the full architecture walkthrough, see [docs/architecture.md](docs/architecture.md).
167
+
168
+ ---
169
+
170
+ ## ๐Ÿ“š Deep Dive
171
+
172
+ Everything beyond the quick start lives in the [docs/](docs/) folder. Start with [docs/USAGE.md](docs/USAGE.md) for the full workflow guide.
173
+
174
+ | Document | What's inside |
175
+ |----------|---------------|
176
+ | [Usage Guide](docs/USAGE.md) | Installation, workflows, and tips |
177
+ | [Commands Reference](docs/COMMANDS.md) | All MCP tools, skills, and CLI commands |
178
+ | [Features & Changelog](docs/FEATURES.md) | What's included and what changed |
179
+ | [Architecture](docs/architecture.md) | System design and data flow |
180
+ | [Schema](docs/schema.md) | Graph node/edge types and SQLite tables |
181
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | Common issues and fixes |
182
+ | [LLM-Optimized Reference](docs/LLM-OPTIMIZED-REFERENCE.md) | Token-optimized reference used by Claude Code |
183
+ | [Roadmap](docs/ROADMAP.md) | Planned features |
184
+ | [Legal & Privacy](docs/LEGAL.md) | License and data handling |
185
+
186
+ ---
187
+
188
+ ## Graph Schema
189
+
190
+ ### Nodes
191
+
192
+ | Kind | Properties |
193
+ |------|-----------|
194
+ | **File** | path, language, last_parsed_hash, size |
195
+ | **Class** | name, file, line_start, line_end, modifiers |
196
+ | **Function** | name, file, class (nullable), line_start, line_end, params, return_type, is_test |
197
+ | **Type** | name, file, kind (enum, interface, etc.) |
198
+ | **Test** | name, file, tested_function |
199
+
200
+ ### Edges
201
+
202
+ | Kind | Direction | Meaning |
203
+ |------|-----------|---------|
204
+ | **CALLS** | Function -> Function | Function calls another function |
205
+ | **IMPORTS_FROM** | File -> File/Module | File imports from another |
206
+ | **INHERITS** | Class -> Class | Class extends another |
207
+ | **IMPLEMENTS** | Class -> Interface | Class implements an interface |
208
+ | **CONTAINS** | File/Class -> Function/Class | Containment hierarchy |
209
+ | **TESTED_BY** | Function -> Test | Function has a test |
210
+ | **DEPENDS_ON** | Node -> Node | General dependency |
211
+
212
+ For the full schema documentation, see [docs/schema.md](docs/schema.md).
213
+
214
+ ---
215
+
216
+ ## MCP Tools
217
+
218
+ | Tool | Description |
219
+ |------|-------------|
220
+ | `build_or_update_graph_tool` | Full or incremental graph build |
221
+ | `get_impact_radius_tool` | Blast radius analysis for changed files |
222
+ | `query_graph_tool` | Predefined relationship queries (callers, callees, tests, imports) |
223
+ | `get_review_context_tool` | Token-optimized review context with source snippets |
224
+ | `semantic_search_nodes_tool` | Search code entities by name/keyword/semantic similarity |
225
+ | `embed_graph_tool` | Compute vector embeddings for semantic search |
226
+ | `list_graph_stats_tool` | Graph statistics and health check |
227
+ | `get_docs_section_tool` | Retrieve specific documentation sections (minimal tokens) |
228
+
229
+ For usage details and examples, see [docs/COMMANDS.md](docs/COMMANDS.md).
230
+
231
+ ---
232
+
233
+ ## Supported Languages
234
+
235
+ | Language | Extensions | Status |
236
+ |----------|-----------|--------|
237
+ | Python | `.py` | Full support |
238
+ | TypeScript | `.ts`, `.tsx` | Full support |
239
+ | JavaScript | `.js`, `.jsx` | Full support |
240
+ | Go | `.go` | Full support |
241
+ | Rust | `.rs` | Full support |
242
+ | Java | `.java` | Full support |
243
+ | C# | `.cs` | Full support |
244
+ | Ruby | `.rb` | Full support |
245
+ | Kotlin | `.kt` | Full support |
246
+ | Swift | `.swift` | Full support |
247
+ | PHP | `.php` | Full support |
248
+ | C/C++ | `.c`, `.h`, `.cpp`, `.hpp` | Full support |
249
+
250
+ ---
251
+
252
+ ## Configuration
253
+
254
+ Create a `.code-review-graphignore` file in your repo root to exclude paths:
255
+
256
+ ```
257
+ # Ignore generated files
258
+ generated/**
259
+ *.generated.ts
260
+ *.pb.go
261
+
262
+ # Ignore vendor
263
+ vendor/**
264
+ third_party/**
265
+ ```
266
+
267
+ ---
268
+
269
+ ## ๐Ÿงช Testing
270
+
271
+ ```bash
272
+ pip install -e ".[dev]"
273
+ pytest
274
+ ruff check code_review_graph/
275
+ ```
276
+
277
+ 47 tests covering parser, graph storage, MCP tools, and multi-language support (Go, Rust, Java).
278
+
279
+ ---
280
+
281
+ ## ๐Ÿค Contributing
282
+
283
+ ### Adding a new language
284
+
285
+ 1. Add the extension mapping in `code_review_graph/parser.py` โ†’ `EXTENSION_TO_LANGUAGE`
286
+ 2. Add node type mappings in `_CLASS_TYPES`, `_FUNCTION_TYPES`, `_IMPORT_TYPES`, `_CALL_TYPES`
287
+ 3. Test with a sample file in that language
288
+ 4. Submit a PR
289
+
290
+ ### Development setup
291
+
292
+ ```bash
293
+ git clone https://github.com/tirth8205/code-review-graph.git
294
+ cd code-review-graph
295
+ python3 -m venv .venv && source .venv/bin/activate
296
+ pip install -e ".[dev]"
297
+ pytest
298
+ ```
299
+
300
+ ---
301
+
302
+ ## Comparison
303
+
304
+ | Feature | code-review-graph | code-graph-rag | CocoIndex |
305
+ |---------|:-:|:-:|:-:|
306
+ | Review-first design | Yes | No | No |
307
+ | Claude Code integration | Native | No | No |
308
+ | Incremental updates | Yes | Partial | Yes |
309
+ | No external DB needed | Yes (SQLite) | No (Neo4j) | No |
310
+ | Auto-update hooks | Yes | No | No |
311
+ | Impact/blast radius | Yes | No | No |
312
+ | Multi-language | 12+ languages | Python only | Varies |
313
+ | Token-efficient reviews | Yes | No | No |
314
+
315
+ ---
316
+
317
+ ## ๐Ÿ“„ License
318
+
319
+ MIT โ€” see [LICENSE](LICENSE) for details.
320
+
321
+ ---
322
+
323
+ <p align="center">Built with โค๏ธ for better code reviews</p>