| name | refactor |
| description | Generate concrete refactoring proposals with Before/After code based on coupling analysis results. |
Refactor - Refactoring Proposals
Execution Steps
- Run
cargo run -- coupling $ARGUMENTS to analyze
- Identify specified issue type (default: all)
- Propose refactoring steps with Before/After code examples
- Present priority table and phased migration plan
Issue Types
| Type | Description |
|---|
global-complexity | Strong coupling to distant modules |
cascading-change | Coupling to volatile modules |
inappropriate-intimacy | Internal access across boundaries |
high-efferent | Too many outgoing dependencies |
high-afferent | Too many incoming dependencies |
all | All issue types (default) |
Verification
cargo run -- coupling --summary ./src > before.txt
cargo run -- coupling --summary ./src > after.txt
diff before.txt after.txt
Guidelines
- Split large changes into small commits
- Verify tests pass at each step
- Document change intent for reviewers
Code pattern examples: patterns.md