Guides building a feature or fixing a bug test-first with the red-green-refactor cycle: agree a list of behaviours, write one failing test, make it pass with the least code, tidy up while green, repeat. Covers reproducing bugs with a failing test, pinning down untested legacy code before changing it, and choosing what to replace with test doubles. Use when the user says "use TDD", "write the test first", "red-green-refactor", "test-drive this function", "add a regression test before fixing", or asks how to add tests while building.