User stories vs requirements

A requirement states what a system must do or be, in a form that can be verified. A user story is a short note of a need, written from the user's side, that stands in for a conversation and is completed by acceptance criteria. A team can use both: stories open the discussion and requirements record what was agreed.

The longer version

The separation is as old as the user story. In his 2001 essay Essential XP: Card, Conversation, Confirmation, Ron Jeffries wrote that the card on which a story is written "does not contain all the information that makes up the requirement". The card "has just enough text to identify the requirement, and to remind everyone what the story is", and he called it "a token representing the requirement". The requirement itself, in his words, "is communicated from customer to programmers through conversation", and the third part, confirmation, is the acceptance test that shows the story has been implemented correctly. The ISTQB glossary draws the same line from the other side. A requirement is "a provision that contains criteria to be fulfilled". A user story is "a short narrative describing a need from a user's perspective together with the expected benefit when this need is satisfied". One entry speaks of criteria, and the other of a need and a benefit.

In use the two sit at different points of the same piece of work. A story for a clinic's booking system might read: as a receptionist, I want to move a patient's appointment, so that I do not have to cancel it and book again. That sentence can be ranked and estimated, and it cannot yet be tested, since it says nothing about which slots are allowed or what the patient is told. The conversation settles those points and writes them down as acceptance criteria, which the ISTQB Foundation Level syllabus, version 4.0.1, describes as usually a result of the conversation. The new slot must be free and with the same clinician. The old slot becomes bookable again at once. The patient receives a message with the new time. An appointment that has already started cannot be moved. Each of those lines is a requirement in the glossary's sense, a criterion to be fulfilled, and each can be verified by a test. Other requirements belong to no single story, such as a rule that every change to an appointment is logged with the name of the person who made it. Those are kept in a definition of done or a specification, and where a contract or a regulator asks for one, the specification is the baseline to which stories and tests are traced.

Treating the story as the full specification loses something at each end. If the card alone is handed over, the points the conversation would have settled are decided anyway, by whoever writes the code, and nobody else learns what was decided. The tester has a sentence and no criteria, so there is nothing to pass or fail. If the remedy is to write everything into the story months ahead, the story turns into a small specification that looks complete, the conversation is skipped, and the detail is out of date by the time the work starts. Mountain Goat Software, the company founded by Mike Cohn, lists treating the written story as the requirement among common user story mistakes, and puts the point in one line: "The written story is a reminder." The qualities that cut across stories are lost as well, since response times, access rules and audit trails have no story of their own unless someone writes them down elsewhere. Checking that the written requirements describe the real need is a separate activity, requirements validation, and the conversation around a story is one of the places where it happens.

Set side by side, the two differ in perspective, timing and detail. A user story is written from the user's side, in plain language, and is refined shortly before it is built. A requirements document, such as a functional requirements specification, describes the system's behaviour, states inputs, outputs, processing rules and error handling, and is usually written early and changed through a formal process. The use case sits between them: it names an actor, preconditions, a main flow, alternative flows and postconditions, which makes it more formal than a story and closer to a functional requirement. A story is judged by the INVEST checklist, which asks that it be independent, negotiable, valuable, estimable, small and testable, and the last letter is the one that ties it to requirements, since a story is testable only once its acceptance criteria exist. Some writers push the separation further. A post from the consultancy 5D Vision titled User stories are not requirements tells its readers: "If you are using User Stories to write requirements, then stop." The advice suits discovery work, where the answer is not yet known, and suits less well a project where a contract or a regulator asks for a specification.

Common questions

User stories vs requirements: what is the difference?

A requirement is a statement of something the system must do or be, written so that it can be verified. A user story is a brief description of a need from the user's side, kept short on purpose so that the detail is agreed in conversation. The story says who wants something and why, and the requirements say exactly what has to be true when it is done.

What makes a good user story?

A good user story names a real user, a need and the benefit, is small enough to finish in one iteration, and has acceptance criteria that a test can pass or fail. The INVEST checklist sums this up: independent, negotiable, valuable, estimable, small and testable. A story that fails the last test is still an open question, and the conversation that settles it has not happened yet.

What is the difference between user requirements and functional requirements?

A user requirement states what a user needs to be able to do, such as move an appointment without cancelling and rebooking it. A functional requirement states what the system must do to make that possible: offer only free slots with the same clinician, release the old slot and send the patient the new time. A user story is one way to write a user requirement, and its acceptance criteria are where the functional requirements appear.

Is a user story a requirement?

A user story stands for a requirement without being the whole of it. Mountain Goat Software's guide to user stories answers the question in these words: "A user story represents a requirement, but the written sentence is rarely the whole requirement." Ron Jeffries made the same point in 2001, when he called the story card a token representing the requirement.

Do user stories replace a requirements document?

User stories replace the practice of writing every detail up front, and the requirements themselves remain. In a team working from stories they are recorded as acceptance criteria on each story and as standing rules in the definition of done. Where a contract, an audit or a regulator calls for a specification, one is still kept, and stories are traced to its entries.

Where do acceptance criteria fit between a user story and a requirement?

Acceptance criteria are the part of a user story that can be verified, which makes them the story's requirements. The ISTQB Foundation Level syllabus defines them as the conditions that an implementation of the user story must meet to be accepted by stakeholders, and says they are usually a result of the conversation. A story with no criteria has nothing a test can check.

What goes wrong when a user story is treated as a full specification?

Two things go wrong, depending on how the gap is filled. Left short, the story leaves its open questions to be answered silently in the code, and the tester has no agreed result to check. Padded with every detail in advance, the story goes stale before it is built and the conversation it was meant to prompt never takes place.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">