Sub topic 4
Writing Stories and Acceptance Criteria Engineers Can Build From
This chapter assumes you know what a product backlog is, you have seen a user story before, and you have worked alongside software engineers. It covers how a product manager (PM) turns a backlog item into a story that engineers can estimate, build, and test without guessing.
What a story is for
A user story is a short description of a need, written from the point of view of the person who has it. It is not a specification. Its job is to start a conversation between the PM and the engineers, and to leave a record of what was agreed.
The common template is:
- As a type of user,
- I want a capability,
- So that a benefit.
The "so that" clause is the part PMs most often skip, and it matters most. It tells engineers why the work exists, so they can suggest a cheaper way to reach the same outcome.
The working model: story, criteria, conversation
A story has three parts that work together.
- The card. The one-sentence story and a title.
- The conversation. The discussion in refinement where the PM and engineers ask questions and find gaps.
- The confirmation. The acceptance criteria, which are the checks that show the story is done from the user's point of view.
Acceptance criteria are conditions the story must meet to be accepted. They differ from the Definition of Done, which applies to every story (for example, code reviewed, tests passing, deployed to staging). Acceptance criteria are specific to this one story.
What makes a story buildable
A widely used checklist is INVEST. Each letter names a property engineers need.
| Letter | Property | What it means for you |
|---|---|---|
| I | Independent | The story can be built and released without waiting on another story where possible. |
| N | Negotiable | Details can change through discussion. It is not a contract. |
| V | Valuable | A user or the business gains something when it ships. |
| E | Estimable | Engineers know enough to size it. |
| S | Small | It fits well inside one sprint, ideally a few days of work. |
| T | Testable | You can say how to check that it works. |
Estimable and testable are the properties most often broken. If engineers cannot size a story, the usual cause is an unknown, and the fix may be a spike (a short, time-boxed investigation) before the story enters a sprint.
Writing acceptance criteria
Two formats work well. Pick one per team and use it consistently.
Rule-style checklist
A short list of statements that are each true or false. This suits simple stories.
- A user can request a reset link from the login page.
- The link expires after 60 minutes.
- A link can be used only once.
Given/When/Then scenarios
Each scenario names a starting state (Given), an action (When), and an observable result (Then). This format, often called Gherkin, gives engineers and testers a shared, checkable definition of behavior. It also surfaces edge cases, because you must write a scenario for each one.
Feature: Password reset by email
Scenario: Registered user requests a reset link
Given a registered user with the email "[email protected]"
When the user submits that email on the reset form
Then the system sends a reset link to that address
And the page shows a confirmation message
Scenario: Unregistered email is submitted
Given no account exists for "[email protected]"
When someone submits that email on the reset form
Then the page shows the same confirmation message
And no email is sentThe second scenario shows why this format earns its cost. Showing the same message for unknown emails is a security decision: it stops an attacker from learning which addresses have accounts. A rule-style list would likely have missed it, and an engineer might have built an "email not found" error by default.
What to put in the criteria
- Describe observable behavior, such as what the user sees or what the system does.
- Include the main path, the important failure paths, and boundary cases (empty input, limits, permissions).
- Include non-functional needs when they matter, such as "the page responds within 2 seconds for 95% of requests".
- Leave out implementation choices, such as which table or framework to use. Those belong to the engineers.
The same story, before and after
A weak story:
As a user, I want better checkout so that I buy more.Engineers cannot estimate this, and nobody can test it. A stronger version:
As a first-time customer, I want to pay without creating an account,
so that I can finish my order quickly.
Acceptance criteria:
- Checkout offers "Continue as guest" before the sign-in form.
- A guest must enter an email address to receive the order confirmation.
- A guest can pay by card and sees an order confirmation page.
- A guest order appears in the admin order list with a "guest" label.
- An invalid email address blocks payment and shows an error message.The second version is small, valuable, and testable. It also names an edge case (invalid email) that would otherwise be found late.
Splitting large stories
A story that does not fit in a sprint should be split by user-visible slices, not by technical layers. A slice cuts through the whole system and delivers something usable. A layer, such as "build the database table", delivers nothing a user can check.
Common ways to split:
- By workflow step: browse, add to cart, pay.
- By rule variation: pay by card first, add other payment methods later.
- By user type: guest first, returning customers later.
- By happy path and then edge cases: the main flow first, error handling next.
- By quality level: a basic version first, then performance or polish.
Common errors
- Solution-first stories. "As a user, I want a button that..." describes a design, not a need. Ask what the user is trying to do.
- Vague words. "Fast", "easy", and "intuitive" cannot be tested. Replace them with a number or an observable behavior.
- Missing negative cases. Stories often describe only success. Ask what happens when input is wrong, missing, or unauthorized.
- Criteria written alone and handed over. Criteria written without engineers miss technical constraints. Draft them, then refine them together.
- Too many criteria. More than about eight criteria usually means the story is two or three stories.
- Changing criteria mid-sprint. Adding criteria after planning is a scope change. Handle it as one, as a later chapter covers.
- Writing for the system and not the person. "As the system, I want to log events" hides the user value. Technical work may need a different framing, such as an explicit enabler item.
A quick review routine
Before a story goes into refinement, check these points.
- Can I say who benefits and why in one sentence?
- Could an engineer who has never discussed this story explain what "done" looks like?
- Does every criterion have a clear pass or fail?
- Have I covered at least one failure path and one boundary?
- Have I avoided naming a technical solution?
- Is the story small enough to finish in a few days?
If any answer is no, fix it before the meeting. Engineers can then spend refinement time on real questions and not on decoding the story.
Exercise
A story reads: "As a shopper, I want the search to be fast and easy to use." Rewrite it as a story with two testable acceptance criteria, and name which INVEST properties the original broke.
Show answer
One possible rewrite: "As a shopper, I want search results to appear as I type, so that I can find a product without opening several pages." Criteria: (1) Results for a query appear within 1 second for 95% of requests. (2) A search with no matches shows the message "No results" and a link to browse categories. The original broke Testable, because "fast" and "easy" have no pass or fail check, and Estimable, because engineers cannot size an undefined goal. It is probably also not Small, since "easy to use" could cover many changes.
Exercise
Why is "code is reviewed and merged" a poor acceptance criterion for a single story, and where should it go?
Show answer
It applies to every story, so it says nothing about this story's behavior. It belongs in the Definition of Done, which the whole team applies to all work. Acceptance criteria should stay specific to the story's behavior.