An outcome-based prompt has four parts. Write them in this order, because each one shapes the next.

An outcome-based prompt: intent, constraints and context, with executable checks closing the loopOutcomeAn IntegrationScenario or storywith done criteria:who gets what, andhow we will knowOutcome-based promptIntentwhat, why, for whomConstraintsNFRs, mechanisms, standardsContextmodel, code, decision recordsExecutable checksthe done criteria as testsSays what must be true. Does not say how to build it.Agent generatesdesign, code, tests, infraOutputa candidate, not a resultChecks runpass: evidencefail: back to the agentTask-based prompt:"write a function that..."outputsomeone reads it and hopesThe agent is told how. Nobody wrote down what done means, so nothing can check it.
The prompt says what must be true and carries the checks; the agent chooses how; the checks, not a reader, decide whether it is done.

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:

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:

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.

Last updated