tdd
使用Kent Beck的红-绿-重构周期指导测试驱动开发。在编写测试、通过TDD实现功能或遵循plan.md测试指令时使用。
📖 中文导读:使用Kent Beck的红-绿-重构周期指导测试驱动开发。在编写测试、通过TDD实现功能或遵循plan.md测试指令时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: tdd description: Guide Test-Driven Development using Kent Beck's Red-Green-Refactor cycle. Use when writing tests, implementing features via TDD, or following plan.md test instructions.
INSTRUCTIONS
Follow Kent Beck's TDD and Tidy First principles using the following workflow. None of the phases can be skipped.
- RED -
/tdd:red- Write ONE small failing test - GREEN -
/tdd:green- Make minimal behavioral change, then commit - REFACTOR -
/tdd:refactor- Improve structure without changing behavior, commit each step
Workflow Pattern
RED → GREEN → commit → REFACTOR (commit each) → satisfied? ──yes──→ done
↑ │
└───── no (more behavior needed OR triangulate) ───┘