tdd

Installation
SKILL.md

TDD (Red-Green-Refactor)

One vertical slice of behavior at a time, never a batch of tests written upfront for the whole ticket.

The loop

  1. Red. Write one test for the smallest next piece of behavior. Run it — confirm it actually fails, and fails for the expected reason (not a typo or import error). A test you haven't watched fail is not verified to test anything.
  2. Green. Write the minimum code to make that one test pass. Resist adding anything the current test doesn't require yet — that belongs in a later cycle, driven by its own test.
  3. Refactor. With the test passing, clean up — remove duplication, improve naming, deepen the module's interface if it got shallow. Rerun the test after every refactor step; it must stay green throughout.
  4. Repeat until every acceptance criterion in scope for this ticket is covered by a passing test.
Installs
1
First Seen
3 days ago
tdd — krit03w/krit-engineer-skills