nw-legacy-refactoring-ddd
Installation
SKILL.md
Legacy Refactoring with DDD
Refactoring legacy systems using Domain-Driven Design as the strategic compass. DDD tells you WHERE and WHY to refactor; traditional techniques (progressive-refactoring, mikado-method) tell you HOW.
Principle: "Start simple, grow big" -- incremental steps tested at each stage.
Decision Framework: Before Refactoring
Ask three questions before any DDD refactoring:
- Business value: what business outcome does refactoring this area enable?
- Risk: what breaks if we refactor vs. if we do not?
- Cost: time, effort, disruption -- is it justified?
When NOT to Refactor
- System scheduled for replacement
- Stable system with no new development
- Cost exceeds benefit
- Team lacks DDD experience with no learning budget
- Domain is genuinely simple (CRUD-dominated)