Analyze Symbol Modification Blast Radius
analyze_change_impactCalculates a 0–100 blast radius score and identifies downstream dependents before modifying or deleting a function, class, or module to assess refactoring risk.
Instructions
Calculates change blast radius score (0-100) and identifies downstream dependents before modifying or deleting a target function, class, or module, distinguishing from 'analyze_code_dependencies' and 'audit_code_quality' by calculating targeted refactoring risk scores rather than mapping overall import graphs or profiling code complexity.
Parameters:
target_symbol(str, required): Name of the function, class, or method being modified or refactored.project_root(str, optional, default='.'): Root directory of the repository (default: current directory).file_path(str, optional, default=''): Optional file path where the target symbol is defined.
Behavior:
Read-only: Scans workspace AST and dependency graphs; does not alter files.
Idempotent: Deterministic blast radius scoring for identical repository states.
100% Offline: Local AST caller/callee traversal without remote API calls.
Auth & Rate Limits: Zero authentication or API keys required; completes in <300ms.
Error Handling: Returns 0 blast radius and not-found notice if the target symbol does not exist in AST index.
Usage Guidelines:
When to use: Run prior to editing a core interface, signature, or shared utility to gauge how many downstream files and tests will be impacted.
When NOT to use: Do not use for general whole-repository dependency mapping or PageRank centrality (use 'analyze_code_dependencies' instead); do not use for auditing static code complexity and code smells (use 'audit_code_quality' instead).
Returns: Markdown report with quantitative blast radius score (0-100), risk tier (LOW/MEDIUM/HIGH/CRITICAL), affected downstream modules, and test recommendations.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target_symbol": "<target_symbol>"
},
"name": "analyze_change_impact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Optional file path where the target symbol is defined. | |
| project_root | No | Root directory of the repository (default: current directory). | . |
| target_symbol | Yes | Name of the function, class, or method being modified or refactored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |