This loop drives toward a contract the machine can check, repeating build, audit, and verify on every pass.
The cycle stops only when the contract passes or an anti-spin guard trips: no progress, a repeated approach, flip-flopping between two solutions, or a blown budget.
What sets it apart from a plain loop is that it asks, every round, whether it is actually moving forward.
It makes sure the contract and tests are never weakened just to fake success.
When to use
- When the agent tends to retry the same broken approach.
- On tasks with a definition of done a machine can verify.
- To enforce hard caps on iterations and spend.
How to use
Run the loop asking it to build, audit, and verify against the contract, tracking progress each pass and stopping if it stalls, repeats itself, or hits the budget.