tdd

Installation
SKILL.md

Test-Driven Development

RED -> GREEN -> REFACTOR. Write a failing test, make it pass with the simplest code, then improve the design. Repeat.

Context

TDD is the core implementation discipline in Prodcraft. It ensures every piece of code is born with a test, creating a safety net for refactoring and a living specification of behavior. TDD is not about testing -- it's about design. Writing the test first forces you to think about the interface before the implementation.

In a lifecycle-aware system, TDD should start from the next planned slice of work, while preserving upstream contract and coexistence boundaries. Do not use implementation pressure as an excuse to skip characterization, contract, or unsupported-flow tests in brownfield work.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

If you wrote implementation code before the failing test, delete it and start over from RED.

Delete it means:

Related skills

More from yknothing/prodcraft

Installs
6
First Seen
Mar 27, 2026