Acceptance criteria examples: Given/When/Then and checklists
Acceptance criteria examples for user stories in two formats, Given/When/Then scenarios and rule checklists, plus a template and how to write them well.
A story says "Admins can export the member list." The developer builds a CSV of names and emails. The PM expected roles and last-active dates, filtered to match the screen. QA tested 50 rows; the customer has 40,000. Nobody was wrong. Nobody wrote down what done meant.
Acceptance criteria are where it gets written down. This guide gives examples in the two common formats, a template, and rules for writing them, checked on 16 November 2026.
Two formats
| Format | Use when | Looks like |
|---|---|---|
| Given/When/Then scenarios | Behavior depends on state or sequence | Given a situation, when an action, then a result |
| Rule checklist | Rules hold regardless of situation | A list of testable statements |
Most stories use a mix: a checklist for the general rules, scenarios for the tricky cases.
Given/When/Then
Martin Fowler describes Given-When-Then as a style from Behavior-Driven Development, developed by Daniel Terhorst-North and Chris Matts:
- Given is the state of the world before the behavior: the preconditions.
- When is the behavior you're specifying.
- Then is the change you expect as a result.
Testing frameworks such as Cucumber can run scenarios written this way.
Examples
Export members (scenarios)
Scenario: Export respects the current filter
Given I am an admin viewing members filtered to role "Editor"
When I click "Export CSV"
Then the file contains only members with role "Editor"
And each row has name, email, role, and last active date
Scenario: Large workspace
Given the workspace has 40,000 members
When I export without a filter
Then I receive an email with a download link within 5 minutes
And the page shows "We'll email you when your export is ready"
Scenario: Non-admin
Given I am a member without the admin role
When I open the members page
Then I do not see the "Export CSV" button
Password reset (checklist)
- The reset link expires 30 minutes after it's sent.
- A link can be used once.
- Requesting a new link invalidates earlier links.
- The response is the same whether or not the email has an account.
- Five requests per email per hour, then "Try again later."
Search (mixed)
Rules:
- Results appear after the user stops typing for 300 ms.
- Matches in titles rank above matches in descriptions.
- Search is case-insensitive.
Scenario: No results
Given no project names or descriptions contain "zebra"
When I search for "zebra"
Then I see "No projects match 'zebra'" and a "Clear search" link
Discount code (scenarios with edge cases)
Scenario: Expired code
Given the code SPRING20 expired yesterday
When I apply SPRING20 at checkout
Then I see "This code has expired"
And the order total is unchanged
Scenario: Minimum order not met
Given SPRING20 requires a $50 minimum
And my cart total is $40
When I apply SPRING20
Then I see "Add $10 more to use this code"
Template
## Story
As a [user], I want to [action], so that [benefit].
## Acceptance criteria
### Rules
- [Testable statement]
- [Testable statement]
### Scenarios
Scenario: [Main path]
Given [precondition]
When [action]
Then [expected result]
Scenario: [Edge case]
Given [precondition]
When [action]
Then [expected result]
### Out of scope
- [What this story doesn't cover]
How to write good ones
- Testable. "Fast" isn't testable; "within 2 seconds for 10,000 rows" is.
- Outcomes, not implementation. "The file downloads" rather than "use the streaming endpoint." Leave the how to the developers.
- Cover the edges. Empty states, permissions, limits, errors. Most bugs live there.
- Agree before the sprint. Product, development, and QA read them together. Disagreement now is cheap.
- Say what's out of scope. It ends the "I assumed it would also..." conversation.
- Split big stories. More than eight or so criteria usually means two stories.
When an AI agent builds the story
An AI coding agent reads acceptance criteria literally and fills gaps with plausible guesses. "Should expire after a reasonable time" becomes whatever it picks. Write numbers, name the edge cases, and mark anything undecided so it stops and asks. See the PRD template for AI coding agents.
Criteria change too
Mid-sprint, the team decides the export link should expire after 24 hours, not 7 days. The ticket gets a comment; the criteria don't get updated; the developer, or the agent, builds from the criteria. Changed criteria are decisions, and they need to reach whoever is building.
Where Lockstep fits
Lockstep captures decisions like that from Slack, documents, and pull requests, routes each to its owner for approval, and briefs the engineers and Claude Code sessions working on the story, so the 24-hour decision reaches the code even if the ticket lags.
See Lockstep for product teams.
Sources checked 16 November 2026
Related reading
For the full requirements document, see the product requirements document template. For specs that agents build from, see spec-driven development for product managers. For the team-wide quality bar, see definition of done vs acceptance criteria. For the stories these criteria attach to, see the user story template.
Frequently asked questions
- What are acceptance criteria?
- The specific conditions a user story or feature must satisfy to be accepted as done for that story. They turn a story's intent into checkable statements that the product owner, developers, and testers agree on before work starts.
- What is the Given/When/Then format?
- A way to write a scenario in three parts, from Behavior-Driven Development: Given describes the state before the behavior, When is the behavior, and Then is the expected result. Martin Fowler credits Daniel Terhorst-North and Chris Matts with developing it. Tools like Cucumber can run scenarios written this way as tests.
- What is the difference between acceptance criteria and a user story?
- The user story says who wants what and why. Acceptance criteria say how you'll know the story is done. 'As an admin, I want to export members so I can audit access' is the story; 'the export includes name, email, role, and last active date' is a criterion.
- How many acceptance criteria should a story have?
- Enough to cover the main behavior and the edge cases that matter, often three to eight. Many more usually means the story is too big and should be split.
- Who writes acceptance criteria?
- Usually the product owner or product manager drafts them, and developers and testers refine them before the story enters a sprint. Agreeing on them together is the point: it surfaces misunderstandings before code is written.
Keep reading