Use GitNexus for impact analysis
Use GitNexus to understand code structure, assess the blast radius of a change, and navigate the codebase safely before editing any symbol. This repository is indexed as lingchu-bot. GitNexus indexes the codebase into a knowledge graph and exposes it through CLI commands and MCP tools.
# Index the repository (run from repo root)npx gitnexus analyze
# Configure MCP for your editors (one-time)npx gitnexus setup
# Check index statusnpx gitnexus status
# List all indexed repositoriesnpx gitnexus listIf the index is stale (e.g., after significant code changes), re-run npx gitnexus analyze to refresh it.
Exploring code
Section titled “Exploring code”Use CLI commands to understand architecture and execution flows:
# Generate a repository wiki from the knowledge graphnpx gitnexus wiki
# Generate wiki with a custom modelnpx gitnexus wiki --model gpt-4o-miniFor quick exploration without installing anything, use the Web UI or start a local server:
# Start local HTTP server for web UI connectionnpx gitnexus serveBefore changing code
Section titled “Before changing code”Check upstream impact before modifying a function, class, or method:
- Run
npx gitnexus statusto confirm the index is fresh. - Use the MCP tools in your AI editor to run impact analysis (see the callout below).
- Record: direct callers, affected flows, and risk level.
- If the risk is
HIGHorCRITICAL, pause and explain the risk before continuing.
Before committing
Section titled “Before committing”Verify that your changes only affect expected symbols and execution flows:
- Run
npx gitnexus analyzeto refresh the index if needed. - Use the MCP
detect_changestool in your AI editor to check affected scope. - If the result includes unrelated files or flows, inspect the worktree first.
Renaming
Section titled “Renaming”Do not rename symbols through global find-and-replace. Use the GitNexus rename MCP tool so that call relationships and references are handled together across all files.
CLI reference
Section titled “CLI reference”gitnexus analyze [path] # Index a repository (or update stale index)gitnexus analyze --force # Full rebuild: re-parse + graph rebuild + FTS rebuildgitnexus analyze --repair-fts # Rebuild/verify only FTS indexes on existing datagitnexus analyze --skip-embeddings # Skip embedding generation (faster)gitnexus analyze --embeddings [n] # Enable embedding generation (slower, better search)gitnexus analyze --skills # Generate repo-specific skill filesgitnexus analyze --skip-skills # Skip installing skill filesgitnexus analyze --skip-agents-md # Preserve custom AGENTS.md/CLAUDE.md editsgitnexus analyze --skip-git # Index folders that are not Git repositoriesgitnexus analyze --verbose # Log skipped filesgitnexus setup # Configure MCP for your editors (one-time)gitnexus mcp # Start MCP server (stdio)gitnexus serve # Start local HTTP server for web UIgitnexus list # List all indexed repositoriesgitnexus status # Show index status for current repogitnexus clean # Delete index for current repogitnexus clean --all --force # Delete all indexesgitnexus wiki [path] # Generate repository wiki from knowledge graphgitnexus wiki --model <model> # Wiki with custom LLM modelgitnexus wiki --base-url <url> # Wiki with custom LLM API base URL