test-driven-development
Drives implementation test-first through red-green-refactor cycles, including multi-unit features built outside-in, legacy code without tests, and sessions that keep a written cycle log. Use when building a new behavior, when asked to fix a bug, or when changing what existing code does, and applies even when the code is pasted inline and the request does not mention tests. Also use whenever the request mentions TDD, test-first, red-green-refactor, or reproducing a bug with a failing test before fixing it, and when implementation keeps landing before anyone knows how it will be verified. For one small behavior or bug fix, test-driven-development-quick is enough; for tests added after the code exists, use writing-unit-tests.
Pinned to revision c4efc46815a7, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/test-driven-development/SKILL.md
- skills/test-driven-development/resources/green-step-strategies.md
- skills/test-driven-development/resources/tdd-cycle-log-template.md
- skills/test-driven-development/resources/tdd-fit-check.md
- skills/test-driven-development/resources/worked-example.md
Every link opens the file at its source, pinned to the revision this page describes.