25
red-green-refactor
TDD’s metronome: red, then green, then tidy. Skipping a beat is a bet.
What is red-green-refactor?
Red proves the test can fail. Green proves the implementation is enough. Refactor proves design can move under green. Drop one beat and the loop is broken.
Why does red-green-refactor matter when vibe coding?
The model skips red and writes a green test. You need to see red with your own eyes. Without red you do not know the test is a test.
How do you do red-green-refactor?
Force three turns, or three pauses in one turn: you run red, you run green, you read the refactor diff. Do not let the model play all three beats in one breath.
How do you ask a model for red-green-refactor?
Strict red-green-refactor. This turn is red only: write the failing test, stop. I will run it. No implementation.
What goes wrong with red-green-refactor?
New behaviour smuggled into the refactor beat. That is a secret green, not a refactor.