build-graph
Build Graph
Build or incrementally update the persistent code knowledge graph for this repository.
Steps
-
Check graph status by calling the
list_graph_stats_toolMCP tool.- If the graph has never been built (last_updated is null), proceed with a full build.
- If the graph exists, proceed with an incremental update.
-
Build the graph by calling the
build_or_update_graph_toolMCP tool:- For first-time setup:
build_or_update_graph_tool(full_rebuild=True) - For updates:
build_or_update_graph_tool()(incremental by default)
- For first-time setup:
-
Verify by calling
list_graph_stats_toolagain and report the results:- Number of files parsed
- Number of nodes and edges created
- Languages detected
- Any errors encountered
When to Use
- First time setting up the graph for a repository
- After major refactoring or branch switches
- If the graph seems stale or out of sync
- The graph auto-updates via hooks on edit/commit, so manual builds are rarely needed
Notes
- The graph is stored as a SQLite database (
.code-review-graph/graph.db) in the repo root - Binary files, generated files, and patterns in
.code-review-graphignoreare skipped - Supported languages: Python, TypeScript/JavaScript, Vue, Go, Rust, Java, Scala, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++
More from tirth8205/code-review-graph
review-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
187review-pr
Review a PR or branch diff using the knowledge graph for full structural context. Outputs a structured review with blast-radius analysis.
181explore codebase
Navigate and understand codebase structure using the knowledge graph
116review changes
Perform a structured code review using change detection and impact
114refactor safely
Plan and execute safe refactoring using dependency analysis
113debug issue
Systematically debug issues using graph-powered code navigation
111