moai-workflow-tdd

Solid

Test-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 1,050 stars 192 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

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-adk
Created
8 months ago
Last Updated
today
Language
Go
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category