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.

difficultyIntermediate
categoryEngineering
sourceAdapted from public agentic-loop discussions about agents quitting halfway through tasks

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

FieldValue
NameCompletion Promise Loop
CategoryEngineering
TriggerFor scoped implementation tasks where half-finished output is the main risk
ObjectiveMake the agent promise completion against explicit evidence, not vibes and a cheerful summary.
Allowed inputsRelevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop
Allowed actionsWrite 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.
VerificationEvery acceptance criterion is checked with tests, browser evidence, logs, screenshots, or a clear blocker report before the agent stops.
Stop conditionStop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.
BudgetSet a time, turn, token, retry, file, or dollar cap before running the loop.
Approval boundaryHuman approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.
Safe outputPull request, patch, report, or evidence log
Works withClaude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent

Steps

  1. Write the acceptance criteria as a checklist before implementation starts.
  2. Have the agent restate the done contract, allowed files, verification commands, and stop conditions.
  3. Let the agent implement one slice, then immediately run the nearest proof: tests, browser check, lint, logs, screenshot, or fixture comparison.
  4. After each failure or uncovered criterion, repair and re-run the relevant proof instead of moving on to unrelated cleanup.
  5. 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.

Get the MCP server + agent pack

Tags

coding agentsacceptance criteriaverificationhandoff

Related loops

Browse all 68 loops