When to Use This Skill
Use the Impact Analysis skill when you need to:- Assess safety before changing code
- Understand what depends on a function or class
- Calculate blast radius of a change
- Determine who uses specific code
- Review changes before committing
- Plan refactoring work
Example Scenarios
Is it safe to change this function?
Is it safe to change this function?
Use
gitnexus_impact({target: "functionName", direction: "upstream"}) to find all dependents at different depths.What will break if I modify X?
What will break if I modify X?
Check d=1 (direct) dependents—these will definitely break. Review d=2 for likely affected code.
Show me the blast radius
Show me the blast radius
Use
impact with maxDepth: 3 to see transitive dependencies up to 3 hops away.Who uses this code?
Who uses this code?
Use
context to see incoming references categorized by type (CALLS, IMPORTS, EXTENDS).Workflow
Follow these steps for thorough impact analysis:Step-by-Step Guide
1. Analyze Symbol Blast Radius- LoginFlow
- TokenRefresh
- APIMiddlewarePipeline
Checklist
-
gitnexus_impact({target, direction: "upstream"})to find dependents - Review d=1 items first (these WILL BREAK)
- Check high-confidence (>0.8) dependencies
- READ processes to check affected execution flows
-
gitnexus_detect_changes()for pre-commit check - Assess risk level and report to user
Understanding Impact Output
Depth Levels
| Depth | Risk Level | Meaning | Action Required |
|---|---|---|---|
| d=1 | WILL BREAK | Direct callers/importers | Must update these |
| d=2 | LIKELY AFFECTED | Indirect dependencies | Should review these |
| d=3 | MAY NEED TESTING | Transitive effects | Run tests for these |
Confidence Scores
GitNexus assigns confidence to each relationship:- 100%: Direct static call or import
- 90-99%: Highly likely (named reference in same module)
- 80-89%: Probable (string reference or dynamic import)
- Under 80%: Filtered out by default (use
minConfidenceto adjust)
Relationship Types
| Type | Meaning | Example |
|---|---|---|
CALLS | Direct function call | login() calls validateUser() |
IMPORTS | Module import | import { validateUser } from './auth' |
EXTENDS | Class inheritance | class Admin extends User |
IMPLEMENTS | Interface implementation | class AuthService implements IAuth |
Risk Assessment Matrix
| Affected Symbols | Affected Processes | Risk Level |
|---|---|---|
| Under 5 symbols | 0-1 processes | LOW |
| 5-15 symbols | 2-5 processes | MEDIUM |
| Over 15 symbols | Over 5 processes | HIGH |
| Any in critical path | Auth, payments, core | CRITICAL |
Tools for Impact Analysis
gitnexus_impact
The primary tool for blast radius analysis:direction:"upstream"→ what depends on this (callers)"downstream"→ what this depends on (callees)
maxDepth: 1-3 recommended (higher = slower + more noise)minConfidence: 0.8 recommended (lower = more false positives)
gitnexus_detect_changes
Git-diff based impact analysis:- Pre-commit checks
- Understanding scope of current changes
- Identifying affected test suites
gitnexus_context
For simple “who calls this” queries:context when you need categorized references (calls vs imports vs extends). Use impact when you need depth-grouped blast radius.
Example: “What breaks if I change validateUser?”
Here’s a complete impact analysis walkthrough:Step 1: Analyze Blast Radius
Step 2: Check Affected Processes
- LoginFlow (step 2/7)
- TokenRefresh (step 1/3)
Step 3: Assess Risk
Using the risk matrix:- Affected symbols: 6 (within MEDIUM range)
- Affected processes: 2 (within MEDIUM range)
- Critical path: Yes (LoginFlow is authentication)
Step 4: Recommendations
Report:ChangingvalidateUserwill affect:Risk: HIGH (authentication is a critical path) Recommended actions:
- 2 direct callers (loginHandler, apiMiddleware) → will break
- 2 indirect callers (authRouter, sessionManager) → likely affected
- 2 execution flows (LoginFlow, TokenRefresh)
- Update loginHandler and apiMiddleware to match new signature
- Review authRouter and sessionManager for compatibility
- Run full auth test suite
- Regression test: LoginFlow and TokenRefresh
Advanced Techniques
Finding All Callers Across the Codebase
Finding High-Impact Symbols
Comparing Two Symbols
Runimpact on both and compare the results:
Best Practices
Always Check d=1 First
Depth 1 dependencies will break—these are your highest priority.
Use detect_changes Before Commits
Run pre-commit checks to understand the full scope of your changes.
Watch for Critical Paths
Changes to auth, payments, or core systems require extra scrutiny.
Trust Confidence Scores
Focus on >80% confidence—lower scores may be false positives.
Pre-Commit Workflow
Before committing changes, follow this workflow:Common Pitfalls
Ignoring d=2 Dependencies
Even if d=2 won’t immediately break, they’re likely affected. Always review them.Not Checking Processes
A change might affect only 2 symbols but break 5 execution flows—always check processes.Trusting Low Confidence
Confidence below 80% may be false positives (string references, dynamic imports). Review carefully.Forgetting Test Files
By default,impact excludes tests. Use includeTests: true if you want to see test dependencies.
Next Steps
Learn Safe Refactoring
Once you understand impact, learn how to safely refactor code with automated rename