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.

Advanced spec

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
Runbook

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.
Copy prompt

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.
Metadata

Tags

coding agentsacceptance criteriaverificationhandoff
Next loops

Related