tdd-workflow

Installation
SKILL.md

Test-Driven Development

Write a failing test → make it pass simply → refactor. The tests are a design tool that produce a regression net as a by-product.

The loop (2–10 minutes per cycle)

  1. Test list: brainstorm behaviors/edge cases; pick the simplest next one.
  2. RED: write one small failing test; run it; see it fail for the right reason (message says what you expect).
  3. GREEN: write the least code to pass — fake it, hard-code, triangulate with a second example.
  4. REFACTOR: remove duplication, improve names, keep all green. No new behavior here.
  5. Commit; pick the next item. Update the list with anything learned.
RED   test_fizzbuzz_returns_1_for_1       → NameError
GREEN def fizzbuzz(n): return "1"
RED   test_returns_2_for_2                → "1" != "2"
GREEN def fizzbuzz(n): return str(n)      # triangulated
Installs
3
GitHub Stars
4
First Seen
Oct 24, 2026