Outcome-based prompting
Outcome-based prompting is the practice of giving an agent an outcome to achieve and the means to prove it has achieved it, rather than a task to perform.
The AI SDLC runs as a loop: outcome, outcome-based prompt, generate, verify, evidence. This page is about the second step, and about why it is really a left-hand-side-of-the-H problem dressed up as a tooling one.
The difference between a task and an outcome
Most prompting advice is about tasks. “Write a function that parses this date format.” “Add a retry to this call.” “Generate tests for this class.” The agent does what it is told, you read the result, and you decide whether it is right. That works for small things, in the same way that handing a junior developer a list of instructions works for small things. It stops working as soon as the thing is big enough that you cannot hold the whole of it in your head, which, with an agent that produces a thousand lines in the time it takes you to make a coffee, is almost immediately.
A task-based prompt has three problems that get worse the better the agent gets:
- It smuggles in the design. “Write a function that…” has already decided there is a function, where it lives and what it takes. The agent cannot tell you that a function is the wrong answer, because you did not ask a question it could answer that way.
- It has no definition of done. The task is done when the agent stops. Whether the thing it stopped on is what you needed is a separate question that nobody wrote down, so nobody can check it except by reading, slowly, everything that was produced.
- It does not scale. A hundred tasks are a hundred things to read. The volume that makes agents valuable is exactly the volume that makes reading impossible, and verification is the bottleneck that results.
An outcome-based prompt starts one level up. It says what must be true when the work is finished, for whom, and why that matters, and it carries the checks that will decide whether it is true. The agent is free to choose how, within constraints you set. That freedom is not a concession to the agent. It is where the leverage is: the agent can try three approaches and keep the one that passes, and you have not had to think about any of them.
Tell an agent what to do and you get a thing. Tell it what must be true and you get a result you can check.
This is not a new idea. It is what good requirements practice always said: specify outcomes and acceptance criteria, not solutions. Integration Scenarios and the Definitions of Done stack were designed to make outcomes concrete and done checkable, for people. The same artefacts turn out to be exactly what an agent needs. The practice has not changed. What has changed is that the cost of ignoring it has gone up.
Anatomy of an outcome-based prompt
An outcome-based prompt has four parts. Write them in this order, because each one shapes the next.
Intent: what, why, for whom
Start from the outcome you already have. If you have an Integration Scenario, it names the user or system, the thread of value they experience and the point at which that value is real. If you have a story, it has a who, a what and a why, and acceptance criteria. If you have neither, you are not ready to prompt. Go and get one; the agent will not invent your intent for you, it will invent something that looks like intent, which is worse.
The intent section says what must be true when the work is done, in the language of the person who wanted it. It says why, because the why is what lets the agent (or a person) make sensible choices when the what is ambiguous, and it always is. It says for whom, because the same feature for an administrator and for a first-time customer is two different pieces of work.
What it does not say is how. If you catch yourself writing “add a column to the table” or “create a service that”, stop. Either that is a constraint (there is a mechanism you must use) and belongs in the next section, or it is a design decision you are making by accident.
Constraints: NFRs, mechanisms, standards
Constraints are the things that must be true of any solution, whichever one the agent picks. Three sources:
- Non-functional requirements, written as checks, not adjectives. Not “it must be fast” but “p95 under 300ms at 200 requests per second”. The fitness functions page explains why; the short version is that an adjective cannot fail a build.
- Architectural mechanisms: the organisation’s common solutions to common problems. Authentication goes through the identity mechanism. Events go on the event bus, in the agreed envelope. Money is a decimal, in the money type. Mechanisms are where you stop the agent reinventing what the team already has, and they are the single most effective way to keep generated code consistent with the rest of the system.
- Standards: coding conventions, the language and framework in use, security baselines, accessibility requirements, the licence policy for dependencies. Most of these should live in a file the agent reads automatically, not in every prompt. Point at it.
Constraints are also where you put the boundary of the change. “Do not change the public API.” “Do not add a dependency without saying so.” “Stay inside this module.” An agent that does not know where the edges are will find them for you, in production.
Context: the model, the code, the decisions
Context is what the agent needs to know to do the work well, that it cannot find out by itself in reasonable time. The temptation is to give it everything. Resist it. A prompt stuffed with the whole codebase and every document the team has ever written is a context dump, and it dilutes the things that matter with the things that do not. An agent, like a person, works better from a clear picture than from a pile.
What belongs:
- The model. The domain model, the Small Picture of the system, the scoping diagram. Whatever the team uses to agree what the words mean. This is where the Skemata work on this site is heading: a model the agent can read as well as the team.
- The relevant code. The module being changed, the interfaces it touches and the tests that already exist. Not the whole repository.
- The decisions. Decision records that bear on this change, so the agent does not relitigate a decision the team made last year, and so it knows which of its clever ideas were already rejected and why.
- What done looks like. An example of a previous change that went through the pipeline cleanly, if you have one. Agents imitate well.
Executable acceptance criteria
This is the part that makes the practice work, and the part most people skip. The acceptance criteria of the outcome must be expressed as something that runs: a test, a scenario check, a fitness function, an evaluation, a policy. If they can only be checked by a person reading the output, the prompt is a task with a nicer introduction.
Write the checks before you generate, and write them so that they fail now. A check that passes before the work is done is not checking the work. Then give them to the agent as part of the prompt, and let it run them. A good agent will iterate until they pass. A good pipeline will refuse to merge until they do. Either way, nobody had to read a thousand lines to know whether the outcome was met.
The outcome-driven infrastructure page puts this more bluntly for the infrastructure case: if you cannot write the verify section, you do not have an outcome yet, just an aspiration. It is true of every outcome.
If the agent cannot run the check, write the check first. If you cannot write the check, you do not know what you want yet.
The same practice at three loop sizes
The reason this is a method and not a prompting tip is that it is the same shape at every level of the H. The feedback loops nest from a personal build in minutes to a strategic goal in years, and the outcome-based prompt is what enters each of them.
A personal build: minutes
A developer picks up a story. The outcome is the story’s acceptance criteria. The prompt gives the intent (the story and its why), the constraints (the mechanisms the story touches, the team’s standards file, “stay inside the orders module”), the context (the module, the domain model, the one ADR that matters) and the criteria as tests that currently fail. A coding agent generates, runs the tests, iterates. The developer reviews the result against the intent, not line by line, and opens a pull request. The evidence is a green build and a review. Elapsed time: minutes to an hour. The developer did the thinking at the start and the judgement at the end, and almost none of the typing.
A product release: days
The Product Forum or team picks an Integration Scenario for the next release. The outcome is the scenario, with its done criteria at the Product level of the Definitions of Done stack. The prompt is larger: the scenario’s intent, the NFRs that apply to it, the mechanisms it must use across several stories, the model of the system and the records of the decisions that shaped it. The “agent” is a team with its agents, each story going through its own personal loop inside the bigger one. The checks are the scenario running end to end as an executable test, the stack’s gates, and the fitness functions. The evidence is “integration tested” and, when real users have been through it, “accepted”. Elapsed time: days.
A portfolio request: months
The Business Leader approves a portfolio request with a POFL business case and a tie to a strategic goal. The outcome is business value, with its done criteria at the Business level: the end-to-end business scenarios proven, the measures moving. The prompt is the request itself, written as intent (the problem, the opportunity, who benefits), constraints (budget, regulation, the enterprise architecture) and context (the enterprise model, the portfolio, the decisions already taken). The “agent” is a product family: several teams, their agents, their Product Forum. The checks are the business scenarios, Quality Confidence at each level, and the business measures the request promised to move. The evidence is value measured, which is what governance was always supposed to be asking for. Elapsed time: months.
At the largest loop the word “prompt” starts to feel odd, and that is the point. A portfolio request written as intent, constraints, context and executable criteria is a good portfolio request. It always was. What agents have done is make the cost of a vague one visible immediately, at the bottom of the H, instead of eighteen months later at the top.
A worked example, end to end
A retailer’s customer service team keeps asking for the same thing: when a customer calls about an order, the agent on the phone has to look in three systems to find out where it is. The Product Customer (a real team lead from customer service, not a proxy) writes it as an Integration Scenario:
A customer calls about an order placed in the last 90 days. The service agent sees, on one screen, the order, its payment status, its shipping status and the last three contacts about it, within two seconds of entering the order number. Done when a service agent handles a real call without opening a second system.
That last sentence is the outcome. Notice it is about a person’s experience, not about an API.
The architect adds the constraints. Payment status comes from the payment mechanism, never directly from the provider. Shipping status comes from the carrier integration mechanism, which already handles the three carriers. Contacts are in the CRM, read through its published interface; the CRM is a SaaS product and is not to be customised. The screen is in the existing service console, following its design system and meeting WCAG 2.2 AA. Personal data stays inside the EU region. The p95 for the whole screen is two seconds at the expected peak of fifty concurrent agents, measured end to end.
The team writes the context: the Small Picture of the order domain, the three mechanism cards, the ADR that chose read-through caching for the console, and the console’s existing component tests as an example of what done looks like.
Then they write the checks, before anyone generates anything:
- A scenario test that creates an order in a test environment, moves it through payment and shipping, logs two contacts, then calls the console’s endpoint and asserts the composite response and its timing. It fails, because the endpoint does not exist.
- A fitness function in the pipeline: p95 under two seconds at fifty concurrent users against the integrated test environment.
- A policy check: no new direct calls to the payment or carrier providers, enforced by a dependency rule.
- An accessibility check on the new screen.
- A data residency check: the new components deploy only to the EU region.
The scenario becomes three stories, one per source of data and one for the screen. Each story goes through a personal loop: a developer prompts an agent with the story, the constraints, the relevant mechanism and module, and the story’s tests. The agent proposes, runs the tests, iterates, and the developer reviews against intent. Where the agent proposes calling the carrier directly “for simplicity”, the dependency rule fails and it is sent back, without anyone having to notice.
When the three stories are merged, the scenario test runs. It fails on timing: the three calls run in sequence. The team prompts an agent with the failing check, the ADR on caching and the constraint, and it proposes parallel calls with the cached read for contacts. The fitness function passes. Quality Confidence for the release moves from amber to green as the scenario’s checks pass consistently over several runs.
Then the bit no check can do: the Product Customer sits with a service agent taking real calls for an afternoon. Two findings. The contact history shows the wrong order for customers with several orders, which no test caught because no test thought of it. And the agents want the customer’s name on the screen, which nobody asked for. One Problem and one new story go on the backlog, the first fixed in an hour through the same loop, and the scenario is accepted.
In this illustration (the example is made up, not a client case) elapsed time from scenario to accepted is four working days, against a three-week estimate for the same work done by hand; nearly all of the four days is verification and acceptance. That is what it looks like when the bottom of the H is compressed.
Spec-driven development, and what the H-Model adds
The tooling world has arrived at a similar place and calls it spec-driven development: write a specification, have the agent generate a plan and then code from it, keep the spec as the source of truth. We agree with the direction. Where the H-Model goes further is in three places.
First, where the spec comes from. A specification written at the keyboard, by the person about to prompt, is a story at best. The H-Model’s requirements stack means the spec is derived from something above it: an Integration Scenario, a portfolio request, a strategic goal. Intent has a lineage, and the agent’s work can be traced to the value it was for.
Second, what done means. Spec-driven tooling tends to treat “the generated code matches the spec” as finished. The Definitions of Done stack says that is the lowest level, and that a change is not done until it is integrated, accepted and, ideally, delivering value. The checks in an outcome-based prompt are drawn from the whole stack, not just from the unit tests.
Third, who owns it. A spec in a tool is owned by whoever wrote it. An outcome in the H-Model is owned by a Product Customer or Business Customer, a real one, and the evidence that it was met is owned by them too. The agent is never the owner of anything.
The outcome-driven infrastructure page is this practice applied to one domain: outcomes with a verify section, agents that draft, pipelines that prove and humans that decide. If you want to see the whole loop in detail for a case where it already works well, start there.
Anti-patterns
- Outcomes without checks. A beautifully written intent with “the team will review” as its acceptance criterion. The agent will produce something plausible, the team will not have time to review it properly, and the outcome will be declared met because nobody can prove it was not. If a check cannot be written, write down that it cannot, and decide who is going to look and how. Do not pretend.
- Prompts that smuggle in design. “Implement the order status endpoint using a new microservice that…” The agent will do exactly that. If the design is a real constraint (a mechanism, a decision already recorded), say so and point at the record. If it is just the first thing you thought of, leave it out and see what the checks let through.
- Context dumps. The whole repository, the whole wiki, every Slack thread. The important constraint is on page forty. The agent, like a person, will weight what it sees first and most. Curate. A good model of the system beats a large pile of its artefacts, which is why the model is worth maintaining.
- Checks written by the generator. If the same agent writes the code and the tests, in one pass, the tests will pass. Write the checks first, from the outcome, or have them written independently. See verification.
- Prompting as a solo sport. The intent belongs to the customer, the constraints to the architect, the context to the team and the checks to all of them. A prompt written by one developer at midnight has one perspective in it. The Integration Scenario was always a team artefact; the prompt derived from it is too.
- Measuring prompts, not outcomes. Counting prompts, tokens or lines generated tells you how busy the agents were. It tells you nothing about whether the outcome was met. Measure the outcome, and go and see.
What this changes for people
Writing good outcomes with executable criteria was always the valuable, difficult, under-practised part of software development. Most organisations got away with doing it badly because the bottom of the H was slow enough to hide the cost: by the time the vague requirement became wrong code, months had passed and everyone had forgotten who wrote it. Agents remove the hiding place. A vague outcome becomes wrong code in minutes, in volume.
So the people who can write intent clearly, name constraints precisely, keep the model current and turn acceptance criteria into checks become the most valuable people in the loop. That is the Product Customer, the architect and the senior engineer, working together on the left-hand side of the H, with the right-hand side ready to catch what they get wrong. It is a lot like what the H-Model recommended in 2017, with the typing taken out.
Related
- The AI SDLC: the loop this practice feeds
- Integration Scenarios: where outcomes come from
- Definitions of Done: where the checks come from
- Verification is the bottleneck: what happens after generate
- Outcome-Driven Infrastructure: the practice applied to infrastructure