What problem does it solve? Refactoring legacy code without breaking existing behavior is risky when test coverage is thin. This Skill provides a structured Domain-Driven Development workflow that captures current behavior with characterization tests before making any structural change, so regressions are caught instead of shipped. ## Core Features & Use Cases - ANALYZE Phase: Identifies domain boundaries, coupling and cohesion metrics, and problematic structural patterns using AST-grep analysis. - PRESERVE Phase: Builds a safety net of characterization tests and behavior snapshots that document what the code actually does before changes begin. - IMPROVE Phase: Applies incremental refactorings (extract method, extract class, move method, rename) with continuous test validation after every step. - Use Case: When modernizing a production module with few tests, run this workflow to first characterize existing behavior, then restructure the code step by step while keeping every test green. ## Quick Start Ask the AI to refactor a legacy module using the DDD workflow, starting with characterization tests to preserve its current behavior.