Here is the part that is new. In the AI SDLC, agents generate code, tests and infrastructure from a statement of intent, and the right-hand side of the H verifies what they produce. The question every organisation adopting this now faces is: what is the unit of intent, and what is the unit of verification? Prompts written per task are too small; they lose the value thread and produce locally correct, globally incoherent systems. Strategic goals are too big. The answer is the artefact we already have.

A scenario with acceptance criteria is an executable specification. It is the unit of an outcome-based prompt and the unit of verification, and it was already the unit of release scope.

A scenario with criteria is the unit of an outcome-based prompt and the unit of verificationScenarionarrative, value,the stories itthreadsCriteriatestable, functionaland non-functionalPromptintent + constraints+ contextAgent generatescode, tests,infrastructureCheckscriteria run astests and fitnessfunctionsfail: fix the scenario or the code, never the checkPeople write the left two boxes and own the right one. Agents do the middle.Same artefact, three uses: scope the Release, prompt the agent, prove the outcome
One artefact, three uses. The scenario and its criteria scope the Release, become the outcome-based prompt an agent generates from, and run as the checks that prove the outcome. People write the left and own the right; agents do the middle.

Three things make scenarios the right size:

The outcome-based prompting page describes the prompt shape in full: intent, constraints, context. The scenario supplies the intent and most of the constraints. The team supplies the context: the codebase, the mechanisms, the decision records, the things the business knows that the code does not.

A worked example

Scenario: Reorder from history. A returning customer opens their order history, picks a past order, and re-buys it. Lines that are out of stock are flagged rather than silently dropped. Their saved payment method is used without re-entering card details. They get a confirmation and can track the delivery. Products involved: web shop, payments service, warehouse system, notifications. Stories: S12 View order history, S35 Repeat an order, S6 Apply saved payment method, S24 Confirm and track delivery.

Acceptance criteria (the flipside):

  1. A past order becomes a basket in one action, with its original quantities.
  2. Out-of-stock lines are shown as unavailable in the basket and the customer can proceed without them; nothing is removed silently.
  3. The saved payment method is used; no card details are typed. Payment failure returns the customer to the basket with the reason.
  4. End to end, from opening history to confirmation, the 95th percentile is under 60 seconds at 200 concurrent users.
  5. The whole path can be completed with keyboard only and passes WCAG 2.2 AA on each screen.
  6. No personal data from the thread appears in application logs.

The prompt it yields. Intent: the scenario text, verbatim, and the value statement. Constraints: the six criteria, verbatim, with the instruction that each must be covered by an automated check that the agent writes and that fails before the change and passes after it; the architectural constraints (the payments mechanism to use, the warehouse interface version, the existing notification contract); the Definition of Done for “product tested”. Context: the four repositories, the relevant decision records, the existing tests for S12, and the data model for orders. Scope: the four stories, in whatever order makes the thread work, and nothing else.

The checks that prove it. Criteria 1 to 3 become end-to-end scenario tests across the four products, run in the integration environment on every change. Criterion 4 becomes a load test in the pipeline against the end-to-end path, a fitness function. Criterion 5 becomes an automated accessibility scan on each screen plus a scripted keyboard walkthrough. Criterion 6 becomes a log-scanning check that runs in the integration environment after the scenario test. The scenario is done at “integration tested” when all six pass in the integrated environment, and “business accepted” when the Product Customer has walked the thread.

Notice what the people did. They wrote the scenario and the criteria, with a customer. They chose the constraints. They will accept the result. The agent wrote the code, the tests and the pipeline changes. When a check fails, the fix is to the scenario (the criterion was wrong) or to the code (the generation was wrong), never to the check.

What this changes in practice

Last updated