code-review-graph setup and Flask review test

Learn how code-review-graph builds local review context, with a Flask test reporting 97% fewer tokens and a shallow-clone setup caveat.

Player not loading? Watch on YouTube

code-review-graph builds a codebase map that a coding assistant can query over MCP. This tutorial covers installation, a Flask review experiment, and the project's benchmark limitations. The supplied metadata identifies the tested release as v2.3.7 and the project as open source under the MIT license.

The speaker explains that Tree-sitter parses code into a graph stored in a SQLite file inside the repository. Functions, classes, files and tests connect through calls, imports, inheritance and test coverage. In the Mac demonstration, the tool maps 94 Flask files, then reports the affected code and missing test coverage after changes to make_response.

For that change, the speaker reports 25,578 tokens of full context versus a graph estimate of 643. A recount with OpenAI's tokenizer gives 732 tokens, still roughly a 97% reduction. These are results from the presented experiment. The cited project benchmarks report about 82 times fewer tokens at the median, with 528 times as an outlier. The speaker also notes circular recall measurement, weak search ranking, and cases where graph context costs more than reading a small file.

Setup involves installing the package, configuring integrations, restarting the editor and building the graph. Shallow clones need commit history for change detection. The tutorial also covers incremental updates, architecture views and CI reviews. Unreferenced symbols are investigation leads rather than confirmed dead code.