The ticket looks ready. Then, ten minutes into refinement, someone asks a small question: what happens if the customer already used this discount code last month? Nobody answers right away. The story says "customer can apply a promo code at checkout." The design has a neat input box. The API task has an endpoint. And it turns out the PM, the backend dev and the tester each pictured a different answer.
That pause is a gift, because it happened before anyone wrote code. Acceptance criteria exist to make that pause happen on purpose. This post covers where they come from, how to write ones people can test, how many is enough, and two formats that help: Given/When/Then and Example Mapping.
Where acceptance criteria come from
In 2001, Ron Jeffries described a user story as three parts: Card, Conversation, Confirmation (Essential XP: Card, Conversation, Confirmation). The card is a short reminder. The conversation is where the real requirement gets worked out. The confirmation is how the customer will check the story is done, written as acceptance tests at the start of the iteration. Jeffries argues that this confirmation is what lets the card stay short, and that examples, ideally automated, work better than long specification documents.
That's still the best way to think about acceptance criteria. They're the written trace of a conversation, phrased so anyone can check them. They belong to product, engineering, QA and support together, and they get written at the start, not at the end when QA picks up the ticket.
They get mixed up a lot. The Scrum Guide defines the Definition of Done as "a formal description of the state of the Increment": one quality bar for all work, such as reviewed, tested, deployed to staging (Scrum Guide 2020). The guide doesn't mention acceptance criteria at all. Acceptance criteria are per story: what this particular feature has to do. A story is finished when it meets both.
Describe what someone can see happen
"Checkout should handle promo codes correctly" isn't a criterion, because "correctly" lives in each person's head. A good criterion describes behavior someone can observe:
- A valid, unused code lowers the order total before the payment is created.
- An expired code shows "This code expired on 30 June" and leaves the total unchanged.
- A code this account already used can't be applied again, and the message says so.
- Only one code applies per order. Entering a second one replaces the first.
These sound almost boring, and that's exactly the point. Each line is "when this is true, the system does this visible thing". A developer sees the branches, a tester sees the cases, the PM sees whether the rule matches the business decision, and a reviewer sees whether the PR stayed inside the ticket.
Start in plain language, then tighten only as much as you need to. "Paid users can download invoices" is a fine first line, but it hides questions. Which invoices? From what date range? PDF or CSV? What if an invoice is still being generated? Aim to remove the kind of ambiguity that would make someone stop halfway through the work to go ask. Making it sound like a legal contract helps nobody.
Cover the edges that change the promise
Teams rarely misunderstand the happy path. They misunderstand what's around it. No permission? Missing data? The payment provider times out? Someone double-clicks the button? The screen is a narrow phone? You don't need a criterion for every possible failure, only for the edges that would change what the feature promises, or cost real rework if you got them wrong.
There's a balance. Too few criteria and people guess. Too many and a two-day story turns into a contract nobody reads. A workable middle covers three things: the behavior that proves the story works, the negative cases that matter, and where the scope stops. A rule of thumb for the last one: if a line describes a nice future improvement, it's a follow-up ticket. If the feature would be misleading or unsafe without it, it belongs in this story.
Given/When/Then, when a scenario helps
The Given/When/Then template comes from Dan North and Chris Matts. In Introducing BDD (2006), North describes writing a story's acceptance criteria as scenarios: givens for the starting context, an event, then the outcomes you expect. His example is an ATM. If the account is in credit, the customer gets cash and the card back. If the account is overdrawn past its limit, they get a rejection message, no cash, and still the card back.
Applied to billing:
- Given a customer with one unpaid invoice, when they open Billing, then the invoice shows with a Pay button.
- Given that invoice is already paid, when they open Billing, then it shows as Paid and the Pay button is hidden.
The format isn't sacred. Bullet points work fine for simple rules. Reach for Given/When/Then when the starting state matters, because it forces you to say what that state is. And if the scenarios later become automated tests, you get Jeffries' "preferably automated" confirmation for free. The longer story of BDD and its tooling is in Behavior-Driven Development (BDD).
Example Mapping: 25 minutes, four colors
The best criteria come out of a short conversation, and Matt Wynne's Example Mapping gives that conversation a shape. You need index cards in four colors:
- Yellow: the story, at the top.
- Blue: the rules, which become your acceptance criteria.
- Green: examples under each rule.
- Red: questions nobody in the room can answer yet.
Wynne says a small group should be able to map a well-understood, well-sized story in about 25 minutes. The table then tells you what to do next. Lots of red cards means there's still too much unknown to start. Lots of blue cards means the story is big, so slice it. One rule buried under many examples may really be several rules. It's low-tech and kind of fun, and it surfaces the "already used this code last month" question before the sprint starts.
Criteria make review and testing easier
A PR is easier to review when you can map the diff back to a short list of promised behaviors. Did the code handle the valid code? Reject the expired one? Keep the total unchanged after a failure? If the PR contains work no criterion mentions, ask whether the scope changed on purpose. If a criterion has no code or test behind it, you've found the gap before release.
For QA, acceptance criteria are the spine of testing, while the test plan goes further. Testers will still explore browsers, accessibility, performance, odd data and strange combinations nobody listed. Clear criteria answer the first question, "what would convince us this works?", and exploration then looks for ways that answer could be incomplete.
One small habit pays off: read the criteria out loud before the team commits to the story. Slowly enough that someone can say "this rule is unclear", "this edge is missing", "this belongs in another ticket" or "users don't actually do it that way". That conversation is the real product. The written criteria are what it leaves behind.
Try this week
- Pick one ticket marked ready and rewrite any line containing "correctly", "properly" or "should work" as something you could observe.
- Add one negative case to each story in your next refinement: expired, missing, no permission or double-clicked.
- Run a 25-minute Example Mapping session on the fuzziest story in the backlog. Count the red cards.
- In your next PR description, list which acceptance criteria it covers.
Acceptance criteria won't make delivery perfect. They make misunderstandings show up while they're still cheap. Next time a ticket feels ready, ask what evidence would make everyone comfortable calling it done, and write that down.