Figure 22.3: Test-driven development wired to the test-commit-or-revert guardrail
Figure 22.3 Test-driven development wired to the test-commit-or-revert guardrail.
A failing test steers the agent, and running the suite decides. A pass commits
the green state and licenses the next test; a fail (the accent path) reverts
the working tree to the last green, so a bad attempt costs exactly one
discarded try. The bracket marks the tests as guarded—a diff that touches
them is a human's call, never the agent's escape.