moai-workflow-tdd
SolidTest-Driven Development workflow specialist using RED-GREEN-REFACTOR cycle for test-first software development. Use when developing new features from scratch or when behavior specification drives implementation.
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
# Test-Driven Development (TDD) Workflow
## Development Mode Configuration (CRITICAL)
[NOTE] This workflow is selected based on `.moai/config/sections/quality.yaml`:
```yaml
constitution:
development_mode: tdd # or ddd
```
**When to use this workflow**:
- `development_mode: tdd` → Use TDD (this workflow, default)
- `development_mode: ddd` → Use DDD instead (moai-workflow-ddd)
**Key distinction**:
- **TDD** (default): Test-first development for all work, including brownfield projects with pre-RED analysis
- **DDD**: Characterization-test-first for existing codebases with minimal test coverage
## Quick Reference
Test-Driven Development provides a disciplined approach for creating new functionality where tests define the expected behavior before implementation.
Core Cycle - RED-GREEN-REFACTOR:
- RED: Write a failing test that defines desired behavior
- GREEN: Write minimal code to make the test pass
- REFACTOR: Improve code structure while keeping tests green
When to Use TDD:
- Creating new functionality from scratch
- Building isolated modules with no existing dependencies
- When behavior specification drives development
- New API endpoints with clear contracts
- New UI components with defined behavior
- Greenfield projects (rare - usually Hybrid is better)
When NOT to Use TDD:
- Refactoring existing code (use DDD instead)
- When behavior preservation is the primary goal
- Legacy codebase without test coverage (use DDD first)
- When modifying existing files (c...
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