moai-workflow-ddd
SolidDomain-Driven Development workflow specialist using ANALYZE-PRESERVE-IMPROVE cycle for behavior-preserving code transformation. Use when refactoring legacy code or reducing technical debt safely.
AI & Automation 5 stars
4 forks Updated 2 weeks ago Apache-2.0
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Domain-Driven Development (DDD) Workflow
## Development Mode Configuration (CRITICAL)
[NOTE] This workflow is selected based on `.moai/config/sections/quality.yaml`:
```yaml
constitution:
development_mode: ddd # or tdd
```
**When to use this workflow**:
- `development_mode: ddd` → Use DDD (this workflow)
- `development_mode: tdd` → Use TDD instead (moai-workflow-tdd)
**Key distinction**:
- **DDD**: Characterization-test-first for existing codebases with minimal test coverage
- **TDD** (default): Test-first development for all work, including brownfield projects with pre-RED analysis
## Quick Reference
Domain-Driven Development provides a systematic approach for refactoring existing codebases where behavior preservation is paramount. Unlike TDD which creates new functionality, DDD improves structure without changing behavior.
Core Cycle - ANALYZE-PRESERVE-IMPROVE:
- ANALYZE: Domain boundary identification, coupling metrics, AST structural analysis
- PRESERVE: Characterization tests, behavior snapshots, test safety net verification
- IMPROVE: Incremental structural changes with continuous behavior validation
When to Use DDD:
- Refactoring legacy code with existing tests
- Improving code structure without functional changes
- Technical debt reduction in production systems
- API migration and deprecation handling
- Code modernization projects
- When DDD is not applicable because code already exists
- Greenfield projects (with adapted cycle - see below)
When NOT...
Details
- Author
- modu-ai
- Repository
- modu-ai/moai-cowork
- Created
- 2 months ago
- Last Updated
- 2 weeks ago
- Language
- HTML
- License
- Apache-2.0
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category