Impact & Analysis
NestWeaver’s analysis commands help you understand the consequences of changes before you make them. The impact command traces the blast radius of a symbol through the dependency graph with confidence-weighted scoring, while pr-impact analyzes an entire PR’s changed files and assigns a risk level. These are structural analyses based on the graph — no LLM required.
Command reference
Section titled “Command reference”| Command | Description | Key Flags |
|---|---|---|
impact | Trace blast radius of a symbol | --depth, --confidence, --repo, --json |
pr-impact | PR blast radius with risk scoring | --files, --depth, --json |
affected-tests | Select tests for changed files | --files, --base-ref, --json |
dead-code | Detect unreachable symbols | --min-confidence, --json |
hubs | Find most-connected hub nodes | --top, --json, --config |
bridges | Find architectural chokepoints | --top, --json, --config |
contracts | Inspect API contract graph | (subcommand) |
ranking | Inspect ranking priors | explain, rank subcommands |
eval | Offline retrieval-quality evaluation | run, compare subcommands |
export | Export graph to external format | --format, --output, --top |
clusters | Detect community clusters | --resolution, --json |
Blast radius analysis
Section titled “Blast radius analysis”# Check what depends on a symbolnestweaver impact "processPayment" --depth 5
# Filter to a specific repo in a multi-repo setupnestweaver impact "processPayment" --repo payments-api --json
# Set minimum edge confidence thresholdnestweaver impact "processPayment" --confidence 0.8impact traverses incoming CALLS, IMPORTS, EXTENDS, and IMPLEMENTS edges from the target symbol. Each affected symbol gets an impact_score that decays multiplicatively through edges — low-confidence paths are pruned automatically. The default depth is 3.
PR impact analysis
Section titled “PR impact analysis”# Auto-detect changed files from git diffnestweaver pr-impact
# Specify files explicitlynestweaver pr-impact --files src/auth.rs,src/db.rs
# Deeper analysisnestweaver pr-impact --depth 5 --jsonpr-impact maps changed files to their symbols, runs transitive impact analysis, groups results by cluster, and assigns Low, Medium, High, or Unknown. Unknown means the change was not assessed. When no --files are given, it uses git diff --name-only against the working tree.
Test selection
Section titled “Test selection”# Select tests affected by specific file changesnestweaver affected-tests --files src/auth.rs,src/db.rs
# Diff against a base branchnestweaver affected-tests --base-ref main --jsonaffected-tests performs static, call-graph-based regression test selection. It maps changed files to symbols, reverse-traverses CALLS/IMPORTS to depth 3, and buckets dependent test files into priority tiers. This is a prioritized signal, not a provably safe subset — it misses reflection, DI, codegen, and data-driven tests.
Dead code detection
Section titled “Dead code detection”# Find potentially dead codenestweaver dead-code
# Only high-confidence resultsnestweaver dead-code --min-confidence high --jsondead-code walks forward from every entry point following CALLS, IMPORTS, EXTENDS, IMPLEMENTS, and MEMBER_OF edges. Symbols not reached are reported as potentially dead, with confidence levels: low, medium, high. Entry points are determined from manifest files and visibility modifiers.
Graph topology
Section titled “Graph topology”# Find hub nodes (ranked by total degree: incoming plus outgoing)nestweaver hubs --top 20
# Find bridge/chokepoint nodes (highest betweenness centrality)nestweaver bridges --top 20
# Detect community clusters (Louvain-style local moving)nestweaver clusters --resolution 0.5 --jsonHubs are central abstractions many parts of the codebase depend on. Bridges are architectural chokepoints — many shortest paths pass through them, so changing a bridge has outsized blast radius. Clusters use Louvain-style local moving, not the full Leiden algorithm. Results are cached in a sidecar file. Hubs are ranked by total degree. PageRank is extra metadata, not the sort key.
Graph export
Section titled “Graph export”# Export as Cypher (Neo4j)nestweaver export --format cypher
# Export as GraphML (Gephi/yEd)nestweaver export --format graphml --output graph.xml
# Export as Mermaid flowchart (top 30 symbols by PageRank)nestweaver export --format mermaid --top 30
# Export as MessagePack (for WASM mode)nestweaver export --format msgpack --output graph.msgpackSupported formats: Cypher (Neo4j), GraphML (Gephi/yEd), Mermaid, MessagePack.