Engineering

Acceptance Scenario Lockstep

Pin the target with executable scenarios before the agent starts changing code.

Use when

A coding agent is about to implement a feature where success could be interpreted three different ways.

Cadence

Before and during ambiguous feature work

Verification

The same scenarios written before implementation pass after the change, and any scope expansion is explicitly approved.

Advanced spec

Structured loop spec

FieldValue
NameAcceptance Scenario Lockstep
CategoryEngineering
TriggerBefore and during ambiguous feature work
ObjectivePin the target with executable scenarios before the agent starts changing code.
Allowed inputsRelevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop
Allowed actionsTranslate the request into 3-7 user-visible scenarios, including at least one failure or edge case.; Mark which scenarios are in scope, out of scope, or require approval before work starts.; Turn the in-scope scenarios into tests, fixtures, or a checklist that can be rerun unchanged.; Implement only the smallest change needed for those scenarios.; Run the scenarios and stop if new behavior would broaden scope, affect billing/data/security, or require product judgment.
VerificationThe same scenarios written before implementation pass after the change, and any scope expansion is explicitly approved.
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. Translate the request into 3-7 user-visible scenarios, including at least one failure or edge case.
  2. Mark which scenarios are in scope, out of scope, or require approval before work starts.
  3. Turn the in-scope scenarios into tests, fixtures, or a checklist that can be rerun unchanged.
  4. Implement only the smallest change needed for those scenarios.
  5. Run the scenarios and stop if new behavior would broaden scope, affect billing/data/security, or require product judgment.
Copy prompt

Prompt

Run the Acceptance Scenario Lockstep loop. Use it before ambiguous feature work. First convert the request into 3-7 user-visible scenarios with clear in-scope, out-of-scope, and approval-required labels. Make the in-scope scenarios executable as tests, fixtures, or a repeatable checklist before implementation. Implement only against those scenarios, rerun them unchanged, and stop for approval if the work broadens scope or touches billing, data, security, or product judgment.
Metadata

Tags

acceptance criteriatestingagent coding
Next loops

Related