Skip to main content

Overview

The impact 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

string
required
Name of function, class, method, or file to analyzeExamples:
  • "validateUser"
  • "AuthService"
  • "src/auth/validator.ts"
string
required
Analysis direction:
  • "upstream" - What depends on this (most common)
  • "downstream" - What this depends on
number
default:3
Maximum relationship depth to traverse
  • d=1: Direct dependencies (WILL BREAK)
  • d=2: Indirect dependencies (LIKELY AFFECTED)
  • d=3: Transitive dependencies (MAY NEED TESTING)
Range: 1-5 recommended
array
Filter by relationship types. If omitted, uses usage-based inference.Options:
  • "CALLS" - Function/method calls
  • "IMPORTS" - Import statements
  • "EXTENDS" - Class inheritance
  • "IMPLEMENTS" - Interface implementation
Example: ["CALLS", "IMPORTS"]
boolean
default:false
Include test files in the analysisSet to true when you need to know which tests will break.
number
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
Lower this to catch more potential impacts at the cost of false positives.
string
Repository name or path. Required when multiple repos are indexed.

Response

string
required
Overall risk assessment: LOW, MEDIUM, HIGH, or CRITICAL
object
required
High-level impact summary
object
required
Affected symbols grouped by traversal depthEach array contains symbols with:
  • name: Symbol name
  • type: Symbol type
  • filePath: File location
  • line: Line number
  • edgeType: Relationship type (CALLS, IMPORTS, etc.)
  • confidence: Confidence score (0-1)
array
Execution flows that will be impacted
object
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

Criteria:
  • Less than 5 affected symbols
  • Few or no affected processes
  • Single module impact
Action: Proceed with caution, review d=1 items
Criteria:
  • 5-15 affected symbols
  • 2-5 affected processes
  • Multiple modules
Action: Careful review, test affected processes
Criteria:
  • 15 affected symbols
  • Many processes affected
  • Cross-module impact
Action: Comprehensive testing, consider staged rollout
Criteria:
  • Critical path affected (auth, payments, core infrastructure)
  • Widespread impact
Action: Extensive testing, staged deployment, monitoring plan

Depth Interpretation

Real-World Examples

Example 1: Safe Change Analysis

Example 2: Critical Infrastructure

Example 3: Refactoring Prep

Best Practices

Use direction: "upstream" to find what depends on your target. This shows what will break.
These are guaranteed to break. Review and plan updates for every d=1 item before making changes.
Items with confidence below 0.8 may be false positives. Review these manually.
Processes reveal the business impact. Breaking “LoginFlow” is more critical than breaking a utility function.
When refactoring, set includeTests: true to know which tests need updates.
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?”
  • context - Deep dive on specific affected symbols
  • detect_changes - Post-change verification
  • rename - Automated refactoring for renames
  • gitnexus://repo/{name}/processes - Review affected execution flows
  • gitnexus://repo/{name}/clusters - Understand module boundaries