SPM
Diagrams · Stage

Red → green → refactor

Tests fail, code makes them pass, refactor on green.

Red → green → refactor — the inner loopREDtest failsno code yetGREENsmallest codeto pass the testREFACTORclean on greentests stay greennext testWhy TDD with agents:The failing test is the contract the agent honours. Without it, agents drift; with it, every diff has a target.One test, one feature, one diff — repeat 100× per Vx.
What it shows

The micro-loop inside every build cycle. SPM Agent writes the failing test first (red), writes the smallest code that turns it green, then refactors with the safety net the tests just bought.

Where it fits

Stage tests in the master Ultimate AI PM workflow.

Run by the SPM Agent. Configured per project.