{"owner":"tirth8205","repo":"code-review-graph","hasSkills":true,"hasMcp":true,"mcpConfig":{"mcpServers":{"code-review-graph":{"command":"npx","args":["-y","@modelcontextprotocol/server-code-review-graph"]}}},"found":["AGENTS.md","CLAUDE.md","GEMINI.md"],"skills":{"AGENTS.md":"# Agent Instructions\n\nThis project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.\n\n## Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work atomically\nbd close <id>         # Complete work\nbd dolt push          # Push beads data to remote\n```\n\n## Non-Interactive Shell Commands\n\n**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.\n\nShell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.\n\n**Use these forms instead:**\n```bash\n# Force overwrite without prompting\ncp -f source dest           # NOT: cp source dest\nmv -f source dest           # NOT: mv source dest\nrm -f file                  # NOT: rm file\n\n# For recursive operations\nrm -rf directory            # NOT: rm -r directory\ncp -rf source dest          # NOT: cp -r source dest\n```\n\n**Other commands that may prompt:**\n- `scp` - use `-o BatchMode=yes` for non-interactive\n- `ssh` - use `-o BatchMode=yes` to fail instead of prompting\n- `apt-get` - use `-y` flag\n- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","CLAUDE.md":"# CLAUDE.md - Project Context for Claude Code\n\n## Project Overview\n\n**code-review-graph** is a persistent, incrementally updated, local-first knowledge graph for token-efficient code review through MCP and the CLI. It parses codebases using Tree-sitter and targeted fallbacks, builds a structural graph in SQLite, and exposes compact context to AI coding tools including Claude Code, Codex, Cursor, Windsurf, Zed, Continue, OpenCode, Gemini CLI, Qwen, Kiro, Qoder, and GitHub Copilot.\n\n## Graph Tool Usage (Token-Efficient)\nWhen using code-review-graph MCP tools, follow these rules:\n1. First call: `get_minimal_context(task=\"<description>\")` — costs ~100 tokens, gives you the full picture.\n2. All subsequent calls: use `detail_level=\"minimal\"` unless you need more.\n3. Prefer `query_graph_tool` with a specific target over broad `list_*` calls.\n4. The `next_tool_suggestions` field in every response tells you the optimal next step.\n5. Target: ≤5 tool calls per task, ≤800 total tokens of graph context.\n\n## Architecture\n\n- **Core Package**: `code_review_graph/` (Python 3.10+)\n  - `parser.py` — Tree-sitter multi-language AST parser plus targeted fallbacks for broad source-language and notebook support\n  - `custom_languages.py` — Config-driven custom language support (`.code-review-graph/languages.toml`, see docs/CUSTOM_LANGUAGES.md)\n  - `graph.py` — SQLite-backed graph store (nodes, edges, weighted-score impact analysis)\n  - `tools/` — 30 MCP tool implementations split by domain\n  - `main.py` — FastMCP server entry point, registers 30 tools + 5 prompts\n  - `incremental.py` — Git-based change detection, file watching\n  - `embeddings.py` — Optional vector embeddings (local sentence-transformers, OpenAI-compatible endpoints, Google Gemini, MiniMax)\n  - `visualization.py` — D3.js interactive HTML graph generator\n  - `cli.py` — CLI entry point (install/init, build, update, postprocess, embed, watch, status, visualize, serve/mcp, wiki, detect-changes, register, unregister, repos, eval, daemon)\n  - `flows.py` — Execution flow detection and criticality scoring\n  - `communities.py` — Community detection (Leiden algorithm or file-based grouping) and architecture overview\n  - `search.py` — FTS5 hybrid search (keyword + vector)\n  - `changes.py` — Risk-scored change impact analysis (detect-changes)\n  - `refactor.py` — Rename preview, dead code detection, refactoring suggestions\n  - `hints.py` — Review hint generation\n  - `prompts.py` — 5 MCP prompt templates (review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check)\n  - `wiki.py` — Markdown wiki generation from community structure\n  - `skills.py` — Multi-platform install/config generation and shipped skill metadata\n  - `registry.py` — Multi-repo registry helpers\n  - `migrations.py` — Database schema migrations (v1-v9)\n  - `tsconfig_resolver.py` — TypeScript path alias resolution\n\n- **VS Code Extension**: `code-review-graph-vscode/` (TypeScript)\n  - Separate subproject with its own `package.json`, `tsconfig.json`\n  - Reads from `.code-review-graph/graph.db` via SQLite\n\n- **Database**: `.code-review-graph/graph.db` (SQLite, WAL mode)\n\n## Key Commands\n\n```bash\n# Development\nuv run pytest tests/ --tb=short -q          # Run tests\nuv run ruff check code_review_graph/        # Lint\nuv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional\n\n# Build & test\nuv run code-review-graph build              # Full graph build\nuv run code-review-graph update             # Incremental update\nuv run code-review-graph status             # Show stats\nuv run code-review-graph serve              # Start MCP server\nuv run code-review-graph wiki               # Generate markdown wiki\nuv run code-review-graph detect-changes     # Risk-scored change analysis\nuv run code-review-graph register <path>    # Register repo in multi-repo registry\nuv run code-review-graph repos              # List registered repos\nuv run code-review-graph eval               # Run evaluation benchmarks\n```\n\n## Code Conventions\n\n- **Line length**: 100 chars (ruff)\n- **Python target**: 3.10+\n- **SQL**: Always use parameterized queries (`?` placeholders), never f-string values\n- **Error handling**: Catch specific exceptions, log with `logger.warning/error`\n- **Thread safety**: `threading.Lock` for shared caches, `check_same_thread=False` for SQLite\n- **Node names**: Always sanitize via `_sanitize_name()` before returning to MCP clients\n- **File reads**: Read bytes once, hash, then parse (TOCTOU-safe pattern)\n\n## Security Invariants\n\n- No `eval()`, `exec()`, `pickle`, or `yaml.unsafe_load()`\n- No `shell=True` in subprocess calls\n- `_validate_repo_root()` prevents path traversal via repo_root parameter\n- `_sanitize_name()` strips control characters, caps at 256 chars (prompt injection defense)\n- `escH()` in visualization escapes HTML entities including quotes and backticks\n- SRI hash on D3.js CDN script tag\n- API keys only from environment variables, never hardcoded\n\n## Test Structure\n\n- `tests/test_parser.py` — Parser correctness, cross-file resolution\n- `tests/test_graph.py` — Graph CRUD, stats, impact radius\n- `tests/test_tools.py` — MCP tool integration tests\n- `tests/test_visualization.py` — Export, HTML generation, C++ resolution\n- `tests/test_incremental.py` — Build, update, migration, git ops\n- `tests/test_multilang.py` — Broad language parsing tests, including SFCs, notebooks, SQL, Perl XS, and modern systems/web languages\n- `tests/test_custom_languages.py` — Config-driven custom languages (languages.toml loader + end-to-end Erlang parse)\n- `tests/test_embeddings.py` — Vector encode/decode, similarity, store\n- `tests/test_flows.py` — Execution flow detection and criticality\n- `tests/test_communities.py` — Community detection, architecture overview\n- `tests/test_changes.py` — Risk-scored change analysis\n- `tests/test_refactor.py` — Rename preview, dead code, suggestions\n- `tests/test_search.py` — FTS5 hybrid search\n- `tests/test_hints.py` — Review hint generation\n- `tests/test_prompts.py` — MCP prompt template tests\n- `tests/test_wiki.py` — Wiki generation\n- `tests/test_context_savings.py` — Estimated context-savings metadata\n- `tests/test_skills.py` — Install/config generation and shipped skill metadata\n- `tests/test_registry.py` — Multi-repo registry\n- `tests/test_migrations.py` — Database migrations\n- `tests/test_eval.py` — Evaluation framework\n- `tests/test_tsconfig_resolver.py` — TypeScript path resolution\n- `tests/test_integration_v2.py` — v2 pipeline integration test\n- `tests/test_action_render.py` — GitHub Action PR comment renderer (`scripts/render_pr_comment.py`)\n- `tests/fixtures/` — Sample files for each supported language\n\n## CI Pipeline\n\n- **lint**: ruff on Python 3.10\n- **type-check**: mypy\n- **security**: bandit scan\n- **test**: pytest matrix (3.10, 3.11, 3.12, 3.13) with 65% coverage minimum\n\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","GEMINI.md":"<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n"},"files":{"AGENTS.md":"# Agent Instructions\n\nThis project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.\n\n## Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work atomically\nbd close <id>         # Complete work\nbd dolt push          # Push beads data to remote\n```\n\n## Non-Interactive Shell Commands\n\n**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.\n\nShell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.\n\n**Use these forms instead:**\n```bash\n# Force overwrite without prompting\ncp -f source dest           # NOT: cp source dest\nmv -f source dest           # NOT: mv source dest\nrm -f file                  # NOT: rm file\n\n# For recursive operations\nrm -rf directory            # NOT: rm -r directory\ncp -rf source dest          # NOT: cp -r source dest\n```\n\n**Other commands that may prompt:**\n- `scp` - use `-o BatchMode=yes` for non-interactive\n- `ssh` - use `-o BatchMode=yes` to fail instead of prompting\n- `apt-get` - use `-y` flag\n- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","CLAUDE.md":"# CLAUDE.md - Project Context for Claude Code\n\n## Project Overview\n\n**code-review-graph** is a persistent, incrementally updated, local-first knowledge graph for token-efficient code review through MCP and the CLI. It parses codebases using Tree-sitter and targeted fallbacks, builds a structural graph in SQLite, and exposes compact context to AI coding tools including Claude Code, Codex, Cursor, Windsurf, Zed, Continue, OpenCode, Gemini CLI, Qwen, Kiro, Qoder, and GitHub Copilot.\n\n## Graph Tool Usage (Token-Efficient)\nWhen using code-review-graph MCP tools, follow these rules:\n1. First call: `get_minimal_context(task=\"<description>\")` — costs ~100 tokens, gives you the full picture.\n2. All subsequent calls: use `detail_level=\"minimal\"` unless you need more.\n3. Prefer `query_graph_tool` with a specific target over broad `list_*` calls.\n4. The `next_tool_suggestions` field in every response tells you the optimal next step.\n5. Target: ≤5 tool calls per task, ≤800 total tokens of graph context.\n\n## Architecture\n\n- **Core Package**: `code_review_graph/` (Python 3.10+)\n  - `parser.py` — Tree-sitter multi-language AST parser plus targeted fallbacks for broad source-language and notebook support\n  - `custom_languages.py` — Config-driven custom language support (`.code-review-graph/languages.toml`, see docs/CUSTOM_LANGUAGES.md)\n  - `graph.py` — SQLite-backed graph store (nodes, edges, weighted-score impact analysis)\n  - `tools/` — 30 MCP tool implementations split by domain\n  - `main.py` — FastMCP server entry point, registers 30 tools + 5 prompts\n  - `incremental.py` — Git-based change detection, file watching\n  - `embeddings.py` — Optional vector embeddings (local sentence-transformers, OpenAI-compatible endpoints, Google Gemini, MiniMax)\n  - `visualization.py` — D3.js interactive HTML graph generator\n  - `cli.py` — CLI entry point (install/init, build, update, postprocess, embed, watch, status, visualize, serve/mcp, wiki, detect-changes, register, unregister, repos, eval, daemon)\n  - `flows.py` — Execution flow detection and criticality scoring\n  - `communities.py` — Community detection (Leiden algorithm or file-based grouping) and architecture overview\n  - `search.py` — FTS5 hybrid search (keyword + vector)\n  - `changes.py` — Risk-scored change impact analysis (detect-changes)\n  - `refactor.py` — Rename preview, dead code detection, refactoring suggestions\n  - `hints.py` — Review hint generation\n  - `prompts.py` — 5 MCP prompt templates (review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check)\n  - `wiki.py` — Markdown wiki generation from community structure\n  - `skills.py` — Multi-platform install/config generation and shipped skill metadata\n  - `registry.py` — Multi-repo registry helpers\n  - `migrations.py` — Database schema migrations (v1-v9)\n  - `tsconfig_resolver.py` — TypeScript path alias resolution\n\n- **VS Code Extension**: `code-review-graph-vscode/` (TypeScript)\n  - Separate subproject with its own `package.json`, `tsconfig.json`\n  - Reads from `.code-review-graph/graph.db` via SQLite\n\n- **Database**: `.code-review-graph/graph.db` (SQLite, WAL mode)\n\n## Key Commands\n\n```bash\n# Development\nuv run pytest tests/ --tb=short -q          # Run tests\nuv run ruff check code_review_graph/        # Lint\nuv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional\n\n# Build & test\nuv run code-review-graph build              # Full graph build\nuv run code-review-graph update             # Incremental update\nuv run code-review-graph status             # Show stats\nuv run code-review-graph serve              # Start MCP server\nuv run code-review-graph wiki               # Generate markdown wiki\nuv run code-review-graph detect-changes     # Risk-scored change analysis\nuv run code-review-graph register <path>    # Register repo in multi-repo registry\nuv run code-review-graph repos              # List registered repos\nuv run code-review-graph eval               # Run evaluation benchmarks\n```\n\n## Code Conventions\n\n- **Line length**: 100 chars (ruff)\n- **Python target**: 3.10+\n- **SQL**: Always use parameterized queries (`?` placeholders), never f-string values\n- **Error handling**: Catch specific exceptions, log with `logger.warning/error`\n- **Thread safety**: `threading.Lock` for shared caches, `check_same_thread=False` for SQLite\n- **Node names**: Always sanitize via `_sanitize_name()` before returning to MCP clients\n- **File reads**: Read bytes once, hash, then parse (TOCTOU-safe pattern)\n\n## Security Invariants\n\n- No `eval()`, `exec()`, `pickle`, or `yaml.unsafe_load()`\n- No `shell=True` in subprocess calls\n- `_validate_repo_root()` prevents path traversal via repo_root parameter\n- `_sanitize_name()` strips control characters, caps at 256 chars (prompt injection defense)\n- `escH()` in visualization escapes HTML entities including quotes and backticks\n- SRI hash on D3.js CDN script tag\n- API keys only from environment variables, never hardcoded\n\n## Test Structure\n\n- `tests/test_parser.py` — Parser correctness, cross-file resolution\n- `tests/test_graph.py` — Graph CRUD, stats, impact radius\n- `tests/test_tools.py` — MCP tool integration tests\n- `tests/test_visualization.py` — Export, HTML generation, C++ resolution\n- `tests/test_incremental.py` — Build, update, migration, git ops\n- `tests/test_multilang.py` — Broad language parsing tests, including SFCs, notebooks, SQL, Perl XS, and modern systems/web languages\n- `tests/test_custom_languages.py` — Config-driven custom languages (languages.toml loader + end-to-end Erlang parse)\n- `tests/test_embeddings.py` — Vector encode/decode, similarity, store\n- `tests/test_flows.py` — Execution flow detection and criticality\n- `tests/test_communities.py` — Community detection, architecture overview\n- `tests/test_changes.py` — Risk-scored change analysis\n- `tests/test_refactor.py` — Rename preview, dead code, suggestions\n- `tests/test_search.py` — FTS5 hybrid search\n- `tests/test_hints.py` — Review hint generation\n- `tests/test_prompts.py` — MCP prompt template tests\n- `tests/test_wiki.py` — Wiki generation\n- `tests/test_context_savings.py` — Estimated context-savings metadata\n- `tests/test_skills.py` — Install/config generation and shipped skill metadata\n- `tests/test_registry.py` — Multi-repo registry\n- `tests/test_migrations.py` — Database migrations\n- `tests/test_eval.py` — Evaluation framework\n- `tests/test_tsconfig_resolver.py` — TypeScript path resolution\n- `tests/test_integration_v2.py` — v2 pipeline integration test\n- `tests/test_action_render.py` — GitHub Action PR comment renderer (`scripts/render_pr_comment.py`)\n- `tests/fixtures/` — Sample files for each supported language\n\n## CI Pipeline\n\n- **lint**: ruff on Python 3.10\n- **type-check**: mypy\n- **security**: bandit scan\n- **test**: pytest matrix (3.10, 3.11, 3.12, 3.13) with 65% coverage minimum\n\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","GEMINI.md":"<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# Agent Instructions\n\nThis project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.\n\n## Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work atomically\nbd close <id>         # Complete work\nbd dolt push          # Push beads data to remote\n```\n\n## Non-Interactive Shell Commands\n\n**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.\n\nShell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.\n\n**Use these forms instead:**\n```bash\n# Force overwrite without prompting\ncp -f source dest           # NOT: cp source dest\nmv -f source dest           # NOT: mv source dest\nrm -f file                  # NOT: rm file\n\n# For recursive operations\nrm -rf directory            # NOT: rm -r directory\ncp -rf source dest          # NOT: cp -r source dest\n```\n\n**Other commands that may prompt:**\n- `scp` - use `-o BatchMode=yes` for non-interactive\n- `ssh` - use `-o BatchMode=yes` to fail instead of prompting\n- `apt-get` - use `-y` flag\n- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","category":"root","tokens":1187},{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md - Project Context for Claude Code\n\n## Project Overview\n\n**code-review-graph** is a persistent, incrementally updated, local-first knowledge graph for token-efficient code review through MCP and the CLI. It parses codebases using Tree-sitter and targeted fallbacks, builds a structural graph in SQLite, and exposes compact context to AI coding tools including Claude Code, Codex, Cursor, Windsurf, Zed, Continue, OpenCode, Gemini CLI, Qwen, Kiro, Qoder, and GitHub Copilot.\n\n## Graph Tool Usage (Token-Efficient)\nWhen using code-review-graph MCP tools, follow these rules:\n1. First call: `get_minimal_context(task=\"<description>\")` — costs ~100 tokens, gives you the full picture.\n2. All subsequent calls: use `detail_level=\"minimal\"` unless you need more.\n3. Prefer `query_graph_tool` with a specific target over broad `list_*` calls.\n4. The `next_tool_suggestions` field in every response tells you the optimal next step.\n5. Target: ≤5 tool calls per task, ≤800 total tokens of graph context.\n\n## Architecture\n\n- **Core Package**: `code_review_graph/` (Python 3.10+)\n  - `parser.py` — Tree-sitter multi-language AST parser plus targeted fallbacks for broad source-language and notebook support\n  - `custom_languages.py` — Config-driven custom language support (`.code-review-graph/languages.toml`, see docs/CUSTOM_LANGUAGES.md)\n  - `graph.py` — SQLite-backed graph store (nodes, edges, weighted-score impact analysis)\n  - `tools/` — 30 MCP tool implementations split by domain\n  - `main.py` — FastMCP server entry point, registers 30 tools + 5 prompts\n  - `incremental.py` — Git-based change detection, file watching\n  - `embeddings.py` — Optional vector embeddings (local sentence-transformers, OpenAI-compatible endpoints, Google Gemini, MiniMax)\n  - `visualization.py` — D3.js interactive HTML graph generator\n  - `cli.py` — CLI entry point (install/init, build, update, postprocess, embed, watch, status, visualize, serve/mcp, wiki, detect-changes, register, unregister, repos, eval, daemon)\n  - `flows.py` — Execution flow detection and criticality scoring\n  - `communities.py` — Community detection (Leiden algorithm or file-based grouping) and architecture overview\n  - `search.py` — FTS5 hybrid search (keyword + vector)\n  - `changes.py` — Risk-scored change impact analysis (detect-changes)\n  - `refactor.py` — Rename preview, dead code detection, refactoring suggestions\n  - `hints.py` — Review hint generation\n  - `prompts.py` — 5 MCP prompt templates (review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check)\n  - `wiki.py` — Markdown wiki generation from community structure\n  - `skills.py` — Multi-platform install/config generation and shipped skill metadata\n  - `registry.py` — Multi-repo registry helpers\n  - `migrations.py` — Database schema migrations (v1-v9)\n  - `tsconfig_resolver.py` — TypeScript path alias resolution\n\n- **VS Code Extension**: `code-review-graph-vscode/` (TypeScript)\n  - Separate subproject with its own `package.json`, `tsconfig.json`\n  - Reads from `.code-review-graph/graph.db` via SQLite\n\n- **Database**: `.code-review-graph/graph.db` (SQLite, WAL mode)\n\n## Key Commands\n\n```bash\n# Development\nuv run pytest tests/ --tb=short -q          # Run tests\nuv run ruff check code_review_graph/        # Lint\nuv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional\n\n# Build & test\nuv run code-review-graph build              # Full graph build\nuv run code-review-graph update             # Incremental update\nuv run code-review-graph status             # Show stats\nuv run code-review-graph serve              # Start MCP server\nuv run code-review-graph wiki               # Generate markdown wiki\nuv run code-review-graph detect-changes     # Risk-scored change analysis\nuv run code-review-graph register <path>    # Register repo in multi-repo registry\nuv run code-review-graph repos              # List registered repos\nuv run code-review-graph eval               # Run evaluation benchmarks\n```\n\n## Code Conventions\n\n- **Line length**: 100 chars (ruff)\n- **Python target**: 3.10+\n- **SQL**: Always use parameterized queries (`?` placeholders), never f-string values\n- **Error handling**: Catch specific exceptions, log with `logger.warning/error`\n- **Thread safety**: `threading.Lock` for shared caches, `check_same_thread=False` for SQLite\n- **Node names**: Always sanitize via `_sanitize_name()` before returning to MCP clients\n- **File reads**: Read bytes once, hash, then parse (TOCTOU-safe pattern)\n\n## Security Invariants\n\n- No `eval()`, `exec()`, `pickle`, or `yaml.unsafe_load()`\n- No `shell=True` in subprocess calls\n- `_validate_repo_root()` prevents path traversal via repo_root parameter\n- `_sanitize_name()` strips control characters, caps at 256 chars (prompt injection defense)\n- `escH()` in visualization escapes HTML entities including quotes and backticks\n- SRI hash on D3.js CDN script tag\n- API keys only from environment variables, never hardcoded\n\n## Test Structure\n\n- `tests/test_parser.py` — Parser correctness, cross-file resolution\n- `tests/test_graph.py` — Graph CRUD, stats, impact radius\n- `tests/test_tools.py` — MCP tool integration tests\n- `tests/test_visualization.py` — Export, HTML generation, C++ resolution\n- `tests/test_incremental.py` — Build, update, migration, git ops\n- `tests/test_multilang.py` — Broad language parsing tests, including SFCs, notebooks, SQL, Perl XS, and modern systems/web languages\n- `tests/test_custom_languages.py` — Config-driven custom languages (languages.toml loader + end-to-end Erlang parse)\n- `tests/test_embeddings.py` — Vector encode/decode, similarity, store\n- `tests/test_flows.py` — Execution flow detection and criticality\n- `tests/test_communities.py` — Community detection, architecture overview\n- `tests/test_changes.py` — Risk-scored change analysis\n- `tests/test_refactor.py` — Rename preview, dead code, suggestions\n- `tests/test_search.py` — FTS5 hybrid search\n- `tests/test_hints.py` — Review hint generation\n- `tests/test_prompts.py` — MCP prompt template tests\n- `tests/test_wiki.py` — Wiki generation\n- `tests/test_context_savings.py` — Estimated context-savings metadata\n- `tests/test_skills.py` — Install/config generation and shipped skill metadata\n- `tests/test_registry.py` — Multi-repo registry\n- `tests/test_migrations.py` — Database migrations\n- `tests/test_eval.py` — Evaluation framework\n- `tests/test_tsconfig_resolver.py` — TypeScript path resolution\n- `tests/test_integration_v2.py` — v2 pipeline integration test\n- `tests/test_action_render.py` — GitHub Action PR comment renderer (`scripts/render_pr_comment.py`)\n- `tests/fixtures/` — Sample files for each supported language\n\n## CI Pipeline\n\n- **lint**: ruff on Python 3.10\n- **type-check**: mypy\n- **security**: bandit scan\n- **test**: pytest matrix (3.10, 3.11, 3.12, 3.13) with 65% coverage minimum\n\n\n<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->\n## Beads Issue Tracker\n\nThis project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.\n\n### Quick Reference\n\n```bash\nbd ready              # Find available work\nbd show <id>          # View issue details\nbd update <id> --claim  # Claim work\nbd close <id>         # Complete work\n```\n\n### Rules\n\n- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists\n- Run `bd prime` for detailed command reference and session close protocol\n- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files\n\n## Session Completion\n\n**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.\n\n**MANDATORY WORKFLOW:**\n\n1. **File issues for remaining work** - Create issues for anything that needs follow-up\n2. **Run quality gates** (if code changed) - Tests, linters, builds\n3. **Update issue status** - Close finished work, update in-progress items\n4. **PUSH TO REMOTE** - This is MANDATORY:\n   ```bash\n   git pull --rebase\n   bd dolt push\n   git push\n   git status  # MUST show \"up to date with origin\"\n   ```\n5. **Clean up** - Clear stashes, prune remote branches\n6. **Verify** - All changes committed AND pushed\n7. **Hand off** - Provide context for next session\n\n**CRITICAL RULES:**\n- Work is NOT complete until `git push` succeeds\n- NEVER stop before pushing - that leaves work stranded locally\n- NEVER say \"ready to push when you are\" - YOU must push\n- If push fails, resolve and retry until it succeeds\n<!-- END BEADS INTEGRATION -->\n\n<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","category":"root","tokens":2585},{"name":"GEMINI.md","path":"GEMINI.md","title":"GEMINI.md","content":"<!-- code-review-graph MCP tools -->\n## MCP Tools: code-review-graph\n\n**IMPORTANT: This project has a knowledge graph. ALWAYS use the\ncode-review-graph MCP tools BEFORE using Grep/Glob/Read to explore\nthe codebase.** The graph is faster, cheaper (fewer tokens), and gives\nyou structural context (callers, dependents, test coverage) that file\nscanning cannot.\n\n### When to use graph tools FIRST\n\n- **Exploring code**: `semantic_search_nodes_tool` or `query_graph_tool` instead of Grep\n- **Understanding impact**: `get_impact_radius_tool` instead of manually tracing imports\n- **Code review**: `detect_changes_tool` + `get_review_context_tool` instead of reading entire files\n- **Finding relationships**: `query_graph_tool` with callers_of/callees_of/imports_of/tests_for\n- **Architecture questions**: `get_architecture_overview_tool` + `list_communities_tool`\n\nFall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.\n\n### Key Tools\n\n| Tool | Use when |\n|------|----------|\n| `detect_changes_tool` | Reviewing code changes — gives risk-scored analysis |\n| `get_review_context_tool` | Need source snippets for review — token-efficient |\n| `get_impact_radius_tool` | Understanding blast radius of a change |\n| `get_affected_flows_tool` | Finding which execution paths are impacted |\n| `query_graph_tool` | Tracing callers, callees, imports, tests, dependencies |\n| `semantic_search_nodes_tool` | Finding functions/classes by name or keyword |\n| `get_architecture_overview_tool` | Understanding high-level codebase structure |\n| `refactor_tool` | Planning renames, finding dead code |\n\n### Workflow\n\n1. The graph auto-updates on file changes (via hooks).\n2. Use `detect_changes_tool` for code review.\n3. Use `get_affected_flows_tool` to understand impact.\n4. Use `query_graph_tool` pattern=\"tests_for\" to check coverage.\n","category":"root","tokens":461}]}