Stellarion
Tools

stellarion_assess_change_risk [Pro]

Predict the risk of changing specific files before you make the change
This is a Pro tool. Requires a Stellarion Pro license. A 180-day free trial starts automatically.

Predicts the risk of modifying one or more files by analyzing blast radius, code complexity, test coverage, coupling instability, and changeset size. Returns a risk level, numeric score, per-file breakdown, contributing factors, and recommendations.

When to Use

  • Before starting work on a file to understand the potential impact
  • During code review to flag high-risk changes
  • When planning a refactor to prioritize safer starting points
  • To decide whether a change needs extra testing or review

Parameters

ParameterTypeRequiredDefaultDescription
filesarray of stringsYesAbsolute paths to the files you plan to modify

Examples

Assess risk of a single file change

What's the risk if I modify src/core/engine.rs?

Returns a risk assessment covering blast radius, complexity, and test coverage for that file.

Evaluate a multi-file changeset

I'm planning to refactor these files — what's the risk?
- src/services/auth.ts
- src/middleware/session.ts
- src/routes/login.ts

Analyzes all three files together, including cross-file coupling effects.

Pre-review risk check

Assess the change risk for the files in my current diff.

The agent reads git diff to get the file list, then passes them to the tool.

Output Format

The response includes:

Overall Assessment

  • Risk levellow, medium, high, or critical
  • Risk score — 0 to 100

Per-File Breakdown

For each file:

  • Blast radius — how many other files depend on this one (directly and transitively)
  • Complexity — cyclomatic and cognitive complexity of the file
  • Test coverage — whether the file has associated tests
  • Instability — coupling instability ratio (0.0 to 1.0)

Contributing Factors

Ranked list of what is driving the risk score, e.g.:

  • "High blast radius: 23 files depend on this module"
  • "No test coverage for auth.ts"
  • "Cyclomatic complexity of 34 in process_request()"

Recommendations

Actionable suggestions, e.g.:

  • "Add tests for auth.ts before modifying"
  • "Consider extracting the complex logic in process_request() first"
  • "Review downstream consumers in routes/ after changes"

Tips

  • A low risk score does not mean no testing is needed — it means the blast radius and complexity are manageable
  • Files with high afferent coupling (many dependents) will always score higher risk regardless of their own complexity
  • Use this before stellarion_analyze_coupling to get a quick risk signal, then drill into coupling details if needed
  • In CI, you can pipe the list of changed files from git diff --name-only into this tool
  • Combine with stellarion_dependency_drift after making changes to verify you did not introduce unexpected new dependencies