Refactor Analysis
Analyze code coupling and duplication, then create a prioritized refactoring plan.
Steps
Coupling analysis:
cargo coupling --exclude-tests --ai --hotspots=10Focus on: High Afferent (too many dependents), God Modules, circular deps.
Similarity scan:
similarity-rs ./src --min-tokens 50Focus on: 95%+ similarity pairs, extract shared functions.
Combine findings into a prioritized plan:
- High: modules with >20 dependents, circular deps
- Medium: God modules (>30 functions or >500 lines), 100% duplicates
- Low: 90%+ similarity, primitive obsession
Create GitHub issues for each refactoring target with
refactoringlabel.Execute high-priority items if requested, verifying with
cargo testafter each change.