Writing Clear Acceptance Criteria
What you'll learn: How to define precisely what must be true for a user story to be complete, without dictating how to build it.
Now that you know what acceptance criteria are (lesson 147), let's learn to write them well. Clear acceptance criteria act like a checklist that both developers and stakeholders agree on—when all criteria pass, the story is done.
The Given-When-Then Format
The most effective structure follows this pattern:
- Given some starting condition or context
- When an action occurs
- Then an observable outcome happens
This format removes ambiguity by establishing the scenario, trigger, and expected result.
Example for a login story:
- Given a registered user with valid credentials
- When they submit the login form with correct email and password
- Then they are redirected to their dashboard
Writing Concrete, Testable Conditions
Good acceptance criteria are:
- Specific: "User sees success message" beats "User is notified"
- Testable: Anyone can verify pass/fail without interpretation
- Observable: Focus on what the user experiences, not internal implementation
- Complete: Cover happy paths, edge cases, and error scenarios
Avoid implementation details: Don't say "When the database query returns results..." — that's how you build it. Instead say "When search results are available..." — that's what the user sees.
What "Done" Means Without Prescribing "How"
Your criteria define the destination, not the route. They answer "What must be true?" not "How should we code this?" This gives developers freedom to choose the best technical approach while ensuring the outcome meets needs.
Think of it like ordering at a restaurant: you specify "a medium-rare steak with roasted vegetables" (what you want), not "sear it for exactly 4 minutes per side using this specific pan" (how to cook it).
Key Takeaway: Clear acceptance criteria use Given-When-Then format with specific, testable conditions that define what success looks like—without telling developers how to implement the solution.