{"author":"tirthkanani","children":[{"author":"tirthkanani","children":[],"created_at":"2026-03-09T19:22:08.000Z","created_at_i":1773084128,"id":47314091,"options":[],"parent_id":47314090,"points":null,"story_id":47314090,"text":"Hi HN  I&#x27;m Tirth. I built code-review-graph because I got tired of watching Claude Code re-read my entire codebase on every single task.<p>When you ask Claude Code to review a commit or add a feature, it reads files to understand the codebase. On a small project that&#x27;s fine. On FastAPI (2,915 files) or Next.js (27,732 files) it scans thousands of files that have nothing to do with your change. You&#x27;re paying for tokens that add zero value, and more noise makes the review worse.<p>code-review-graph builds a persistent structural map of your code using Tree-sitter. Every function, class, import, call, and inheritance relationship lives in a local SQLite database. When you edit a file or commit, it re-parses only the changed files and their dependants in under 2 seconds. Claude then queries the graph, finds what changed and what depends on it, and reads only the relevant files.<p>Benchmarks on production repos with real commits:<p>\u2022 httpx (125 files): 26.2x fewer tokens\n\u2022 FastAPI (2,915 files): 8.1x fewer tokens\n\u2022 Next.js (27,732 files): 6.0x fewer tokens on reviews, 49x on a live coding task\n\u2022 Review quality: 8.8 vs 7.2 out of 10<p>Some technical details:<p>\u2022 SQLite WAL mode for concurrent reads, no external DB\n\u2022 Qualified names (src&#x2F;auth.py::AuthService.login) for collision-free node identity without scope resolution\n\u2022 SHA-256 hash skip: files touched but not modified are skipped entirely\n\u2022 Optional vector search stored as binary blobs in the same SQLite file, no separate vector DB\n\u2022 NetworkX for BFS graph traversal with a cached directed graph that rebuilds on writes\n\u2022 12 languages via Tree-sitter: Python, TypeScript, JavaScript, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, C&#x2F;C++<p>No cloud. No telemetry. No sign-ups. One SQLite file in .code-review-graph&#x2F; and that&#x27;s it. PostEdit and PostGit hooks keep the graph current automatically. Your workflow doesn&#x27;t change.<p>Setup takes about 30 seconds:<p><pre><code>  pip install code-review-graph\n  code-review-graph install\n</code></pre>\nOr as a Claude Code plugin:\n  claude plugin add tirth8205&#x2F;code-review-graph<p>MIT licence. Around 3,700 lines of typed Python with 770 lines of tests.<p>GitHub: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;tirth8205&#x2F;code-review-graph\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;tirth8205&#x2F;code-review-graph</a>\n PyPI: <a href=\"https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;code-review-graph&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;code-review-graph&#x2F;</a><p>Happy to answer questions about the incremental engine, the Tree-sitter integration, or the benchmark methodology.","title":null,"type":"comment","url":null},{"author":"chreniuc","children":[],"created_at":"2026-03-09T23:00:13.000Z","created_at_i":1773097213,"id":47316932,"options":[],"parent_id":47314090,"points":null,"story_id":47314090,"text":"I tried installing it using the recommended option, via Claude, it didn&#x27;t work. I opened an issue and I&#x27;ve added what I have tried and what errors I did encounter.","title":null,"type":"comment","url":null}],"created_at":"2026-03-09T19:22:08.000Z","created_at_i":1773084128,"id":47314090,"options":[],"parent_id":null,"points":12,"story_id":47314090,"text":null,"title":"Code-review-graph: persistent code graph that cuts Claude Code token usage","type":"story","url":"https://github.com/tirth8205/code-review-graph"}
