Engineering
Completion Promise Loop
Make the agent promise completion against explicit evidence, not vibes and a cheerful summary.
Use when
A coding agent keeps declaring work done after the easy part, or a feature has multiple acceptance criteria that must be proven before handoff.
Cadence
For scoped implementation tasks where half-finished output is the main risk
Verification
Every acceptance criterion is checked with tests, browser evidence, logs, screenshots, or a clear blocker report before the agent stops.
Structured loop spec
| Field | Value |
|---|---|
| Name | Completion Promise Loop |
| Category | Engineering |
| Trigger | For scoped implementation tasks where half-finished output is the main risk |
| Objective | Make the agent promise completion against explicit evidence, not vibes and a cheerful summary. |
| Allowed inputs | Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop |
| Allowed actions | Write the acceptance criteria as a checklist before implementation starts.; Have the agent restate the done contract, allowed files, verification commands, and stop conditions.; Let the agent implement one slice, then immediately run the nearest proof: tests, browser check, lint, logs, screenshot, or fixture comparison.; After each failure or uncovered criterion, repair and re-run the relevant proof instead of moving on to unrelated cleanup.; Stop only when every criterion is proven, the budget is exhausted, or a blocker is returned with exact evidence and the next human decision. |
| Verification | Every acceptance criterion is checked with tests, browser evidence, logs, screenshots, or a clear blocker report before the agent stops. |
| Stop condition | Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required. |
| Budget | Set a time, turn, token, retry, file, or dollar cap before running the loop. |
| Approval boundary | Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments. |
| Safe output | Pull request, patch, report, or evidence log |
| Works with | Claude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent |
Steps
- Write the acceptance criteria as a checklist before implementation starts.
- Have the agent restate the done contract, allowed files, verification commands, and stop conditions.
- Let the agent implement one slice, then immediately run the nearest proof: tests, browser check, lint, logs, screenshot, or fixture comparison.
- After each failure or uncovered criterion, repair and re-run the relevant proof instead of moving on to unrelated cleanup.
- Stop only when every criterion is proven, the budget is exhausted, or a blocker is returned with exact evidence and the next human decision.
Prompt
Run the Completion Promise Loop. Restate the acceptance criteria, allowed scope, verification commands, and stop conditions before editing. Implement in small slices. After each meaningful change, run the closest proof for the relevant criterion: tests, browser check, lint, logs, screenshot, or fixture comparison. Keep a checklist of criteria and mark each as proven, failed, or blocked with evidence. Continue until every criterion is proven, the budget is exhausted, or a blocker requires human judgment. Return changed files, verification output, remaining risks, and any criteria not proven.Run in Claude Code
Paste this into Claude Code (or any tool-using agent) to run the loop bounded: one change per round, the same verification every round, durable state files, and explicit stop conditions.
Run the "Completion Promise Loop" loop from AI Loop Library (https://ailooplibrary.com/loops/completion-promise-loop/) as a bounded loop.
Goal: Make the agent promise completion against explicit evidence, not vibes and a cheerful summary.
Rules: one change per round; run the same verification every round (Every acceptance criterion is checked with tests, browser evidence, logs, screenshots, or a clear blocker report before the agent stops.); append each round to docs/loops/completion-promise-loop/progress.md and update docs/loops/completion-promise-loop/state.json; stop on verifier pass, 8 rounds, 3 consecutive failed verifications, no progress, a blocker, or anything needing human approval (money, production, outbound, deletion). Finish with a proof report: rounds used, changes made, verification output, remaining risk, and the next human decision.