Stellarion
Tools

stellarion_analyze_impact

Predict the blast radius of code changes before making them

Predicts what will break if you modify, delete, or rename a symbol. Returns direct impacts (callers, references, subclasses), indirect impacts (two-level transitive dependents), and cross-project impacts from consumers in other indexed projects.

When to Use

  • Planning a refactoring that changes a function's signature
  • Deciding whether it is safe to delete a function or class
  • Renaming a symbol and needing to find all update sites
  • Assessing risk before making a change
  • Checking whether a change affects other indexed projects

Parameters

ParameterTypeRequiredDefaultDescription
uristringYes--File URI containing the symbol (e.g., file:///path/to/file.ts)
linenumberYes--Line number of the symbol (0-indexed)
changeTypeenumNomodifyType of change: modify (shows callers/dependents), delete (shows all references that would break), rename (shows all sites needing updates)
summarybooleanNofalseReturn a condensed summary when many impacts are found

Examples

Before Modifying a Function

Natural Language: "What will break if I change the signature of validateRequest?"

MCP Tool Call:

{
  "name": "stellarion_analyze_impact",
  "arguments": {
    "uri": "file:///home/dev/project/src/middleware/validation.ts",
    "line": 15,
    "changeType": "modify"
  }
}

Returns: 12 direct callers across 5 files, 3 indirect dependents through the middleware chain, risk level "high" due to the number of affected call sites.

Before Deleting Dead Code

Natural Language: "Can I safely remove the legacyParser function?"

MCP Tool Call:

{
  "name": "stellarion_analyze_impact",
  "arguments": {
    "uri": "file:///home/dev/project/src/parsers/legacy.py",
    "line": 8,
    "changeType": "delete"
  }
}

Returns: All references that would break, including 2 import statements, 1 direct call in a migration script, and 0 transitive dependents. Risk level "low".

Before Renaming a Symbol

Natural Language: "I want to rename UserDTO to UserResponse -- what needs updating?"

MCP Tool Call:

{
  "name": "stellarion_analyze_impact",
  "arguments": {
    "uri": "file:///home/dev/project/src/models/user.ts",
    "line": 3,
    "changeType": "rename"
  }
}

Returns: Every site referencing UserDTO -- type annotations, imports, function parameters, variable declarations -- across the entire codebase, plus cross-project consumers.

Output Format

  • directImpacts -- Callers, references, and subclasses that directly use the symbol. Each includes name, file, line, and relationship type.
  • indirectImpacts -- Second-level transitive dependents (things that depend on the direct impacts).
  • crossProjectImpacts -- Consumers in other indexed projects found via unresolved calls, type references, and #include tracking. Risk level is elevated when cross-project consumers exist.
  • riskLevel -- Overall risk assessment: low, medium, high, or critical.
  • summary -- (when summary: true) Condensed view with counts and top affected files.

Tips

  • Always run this before changing a public API. The cross-project impact detection catches consumers you might not know about.
  • Use changeType: "delete" to validate that stellarion_find_unused_code results are truly unused. Impact analysis traces runtime references that unused-code detection might miss.
  • For large blast radii, set summary: true to get counts and top files instead of the full list.
  • Chain with stellarion_find_related_tests to find tests covering the affected code paths.
  • The risk level considers both the count and the nature of impacts. A single cross-project consumer elevates risk more than several internal callers.