Keywords / done when
done when
How a loop verifies itself. Building blocks
Syntax
done when <predicate>
What it does
The spine of "you can't fake done" — a real command run each cycle. Four forms: a test passes, a command passes, a scan finds nothing (exit 0 and empty output), or a human confirms.
Example
done when the test "billing.spec.ts::apostrophe" passes
done when "pnpm test" passes
done when "semgrep --severity=high" finds nothing
done when a human confirms "the UI looks right"the four forms