Overview
Theimpact tool performs blast radius analysis to show what will be affected if you change a specific symbol. It returns affected symbols grouped by depth (d=1, d=2, d=3), risk assessment, affected execution flows, and impacted functional modules. This is essential before making any non-trivial code changes.
When to use: Before making code changes — especially refactoring, renaming, or modifying shared code. Shows what would break.Next step: Review d=1 items (WILL BREAK). Use
context() on high-risk symbols.Parameters
Name of function, class, method, or file to analyzeExamples:
"validateUser""AuthService""src/auth/validator.ts"
Analysis direction:
"upstream"- What depends on this (most common)"downstream"- What this depends on
Maximum relationship depth to traverse
- d=1: Direct dependencies (WILL BREAK)
- d=2: Indirect dependencies (LIKELY AFFECTED)
- d=3: Transitive dependencies (MAY NEED TESTING)
Filter by relationship types. If omitted, uses usage-based inference.Options:
"CALLS"- Function/method calls"IMPORTS"- Import statements"EXTENDS"- Class inheritance"IMPLEMENTS"- Interface implementation
["CALLS", "IMPORTS"]Include test files in the analysisSet to
true when you need to know which tests will break.Minimum confidence threshold (0-1) for relationships
- 1.0: Certain relationships
- 0.8-0.99: High confidence
- 0.7-0.79: Good confidence
- Below 0.7: Fuzzy matches
Repository name or path. Required when multiple repos are indexed.
Response
Overall risk assessment: LOW, MEDIUM, HIGH, or CRITICAL
High-level impact summary
Affected symbols grouped by traversal depthEach array contains symbols with:
name: Symbol nametype: Symbol typefilePath: File locationline: Line numberedgeType: Relationship type (CALLS, IMPORTS, etc.)confidence: Confidence score (0-1)
Execution flows that will be impacted
Functional areas impacted, categorized by impact type
Example Usage
Basic Upstream Impact
High-Confidence Analysis
Include Test Impact
Filter by Relationship Type
Multi-Repo Impact
Example Response
Risk Assessment Guide
LOW Risk
LOW Risk
Criteria:
- Less than 5 affected symbols
- Few or no affected processes
- Single module impact
MEDIUM Risk
MEDIUM Risk
Criteria:
- 5-15 affected symbols
- 2-5 affected processes
- Multiple modules
HIGH Risk
HIGH Risk
Criteria:
-
15 affected symbols
- Many processes affected
- Cross-module impact
CRITICAL Risk
CRITICAL Risk
Criteria:
- Critical path affected (auth, payments, core infrastructure)
- Widespread impact
Depth Interpretation
| Depth | Risk Level | Meaning | Action Required |
|---|---|---|---|
| d=1 | WILL BREAK | Direct callers/importers | Must update these |
| d=2 | LIKELY AFFECTED | Indirect dependencies | Review and likely update |
| d=3 | MAY NEED TESTING | Transitive effects | Test thoroughly |
Real-World Examples
Example 1: Safe Change Analysis
Example 2: Critical Infrastructure
Example 3: Refactoring Prep
Best Practices
Always check upstream first
Always check upstream first
Use
direction: "upstream" to find what depends on your target. This shows what will break.Focus on d=1 items
Focus on d=1 items
These are guaranteed to break. Review and plan updates for every d=1 item before making changes.
Watch confidence scores
Watch confidence scores
Items with confidence below 0.8 may be false positives. Review these manually.
Check affected processes
Check affected processes
Processes reveal the business impact. Breaking “LoginFlow” is more critical than breaking a utility function.
Include tests for refactoring
Include tests for refactoring
When refactoring, set
includeTests: true to know which tests need updates.Use with detect_changes
Use with detect_changes
After making changes, run
detect_changes() to verify only expected items were affected.Use Cases
- Pre-change analysis: “Is it safe to modify this?”
- Refactoring planning: “What do I need to update?”
- Risk assessment: “How risky is this change?”
- Breaking change detection: “What’s the blast radius?”
- Test planning: “What tests will break?”
Related Tools
- context - Deep dive on specific affected symbols
- detect_changes - Post-change verification
- rename - Automated refactoring for renames
Related Resources
gitnexus://repo/{name}/processes- Review affected execution flowsgitnexus://repo/{name}/clusters- Understand module boundaries