| name | hotspots |
| description | Identify high-priority refactoring targets using hotspot scoring. Ranks modules by issue severity and coupling count. |
| argument-hint | ["path"] |
Hotspots - Refactoring Priority
Execution Steps
- Run
cargo run --release -- coupling --ai $ARGUMENTS (default: ./src)
- Calculate hotspot score for each module
- Display ranked list with recommendations
Commands
cargo run -- coupling --hotspots ./src
cargo run -- coupling --hotspots=10 ./src
cargo run -- coupling --hotspots --verbose ./src
Scoring Formula
| Factor | Weight | Description |
|---|
| Issue count | x30 | Number of coupling issues |
| Coupling count | x5 | In/out dependency count |
| Health: Critical | +50 | Critical health status |
| Health: Needs Review | +20 | Needs review status |
| Circular dependency | +40 | Part of a cycle |
Output Format
## Refactoring Hotspots
### 1. [Module] (Score: XX)
- **Issues**: [Types and count]
- **Coupling**: In X / Out Y
- **Recommended action**: [Specific improvement]
Analysis Dimensions
- Why problematic — Issue types, coupling patterns
- Priority — Blast radius, difficulty, expected benefit
- Refactoring proposals — Interface separation, dependency inversion, module splitting, facade
Notes
- Score 0 = no issues
- Circular dependencies = highest priority
- Focus on top 5 for actionable results