Planning and requirements · lesson 3 of 10
Ideas in this lesson
AAs a… I want… so that…who, what, and why
BCard, conversation, confirmationwhat a story really is
CINVESTsix marks of a good story
DEpica story too big to build in one go

User stories

Last updated

Many teams write requirements as user stories: one short sentence about who wants something, what they want, and why. A story isn't a full specification; it's a reminder to have a conversation. In this lesson you'll write stories for Pila, check them against the INVEST list, and split a story too big to build into ones that aren't.

By the end of this lesson you can

  • Write a user story that says who, what and why
  • Check a story against INVEST
  • Split an epic into smaller stories that each work on their own

Who, what and why

A user story describes one thing someone wants from the software, in their terms. A common template is:

As a who, I want what, so that why.

For Pila: "As a counter staff member, I want to see who is next in the priority lane, so that seniors and pregnant women are called first."

Each part has a job. Who reminds the team that users differ (lesson 3.1). What says what they can do, not how it's built. Why says what it's for, which is what lets the team find a better way, or notice when a story isn't worth building.

Card, conversation, confirmation

Ron Jeffries, one of Extreme Programming's founders, wrote in 2001 that a user story has three parts:

The three Cs
PartWhat it isFor Pila
CardThe short sentence, small enough for an index cardAs a patient, I want my number by text message, so that I can wait at home.
ConversationTalking it through with the people who want it, when it’s about to be builtAte Cora: “Some families share one phone. Can one phone hold two numbers?”
ConfirmationHow everyone will know it’s done: the acceptance criteria (lesson 3.4)Given a phone already holding a number, when it texts again, then it gets a second number.

The card is a promise of a conversation, not a replacement for one. A story written down and handed over without the conversation is just a vague requirement in a new format.

Write a story, and INVEST in it

Bill Wake's INVEST (2003) lists six marks of a good story: *I*ndependent (can be built in any order), *N*egotiable (the details are open), *V*aluable (to a user or client), *E*stimable (the team can size it), *S*mall (fits in a few days), *T*estable (you can tell when it's done).

Write one for Pila. The page checks the wording; the last two checks are yours to judge.

A user story for PilaKept in this browser only
  • Says who (As a …) (not yet)
  • Says what (I want …) (not yet)
  • Says why (so that …) (not yet)
  • Names no technology (no database, server, button or app screen) (done)
Write each part until its checks pass.

Splitting an epic

A story too big to build in one go is called an epic. "Patients can book" is one: it hides getting a number, being told when it's near, cancelling, the counter's own queue, and more. Split it into stories that each give someone something that works. Watch for tasks pretending to be stories: if no user would notice it on its own, it's a task.

0 of 6 placed right

  1. As a patient, I want to get a number by text message, so that I can wait at home.

  2. As a patient, I want a text when five people are ahead of me, so that I arrive in time.

  3. Set up the database tables for the queue.

  4. As a counter staff member, I want to give a number to someone without a phone, in the same queue, so that nobody is left out.

  5. As a patient, I want to book, change and cancel visits, get reminders, and see my history.

  6. Write the code that sends text messages.

Good places to split: by user (patient, counter staff), by step in the work (get a number, be told, arrive), by the simple case first and the exceptions later (one phone first, shared phones next).

Spot the trap: a story with no “so that”

Spot the trapMarco

The backlog has a card: “As a patient, I want to see the whole queue.” Marco starts building a screen listing every name and number.

What happens if…

Check what you learned

What does the “so that” part of a user story do?
“Set up the database for the queue.” What is it?
In Jeffries’s card, conversation and confirmation, what is the card?

Sources

Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.

All sources for Simple Software Development