Home Blog How to Write User Stories
Scrum

How to Write User Stories: Complete Guide with Examples (2026)

✍ Projiq Team 📅 July 9, 2026 ⏱ 9 min read

User stories are the basic unit of work in Scrum. When written well, they give engineers clear context, help product owners prioritize meaningfully, and keep everyone aligned on why a feature exists. When written poorly, they cause scope creep, rework, and sprint failures.

This guide covers everything you need: the standard format, how to write acceptance criteria that actually work, the INVEST criteria for quality checking, real examples across different feature types, and the most common mistakes to avoid.

What Is a User Story?

A user story is a short, informal description of a feature from the perspective of the person who will use it. It's not a technical specification — it's a conversation starter. The story itself is a reminder to have a discussion, not a complete definition of what to build.

"A user story is a placeholder for a conversation, not a substitute for one." — Ron Jeffries, one of the original Extreme Programming creators

That distinction matters. Teams that treat user stories as complete requirements skip the conversation. Teams that understand them as placeholders stay flexible and collaborative throughout the sprint.

The Standard Formula

The most widely used user story format is:

User Story Format As a [type of user],
I want [some goal or action],
so that [some benefit or reason].

Each part serves a specific purpose:

  • "As a [user]" — defines who needs this. Not "the system" or "we" — a real person with a role. Be specific: "admin user", "first-time visitor", "project manager", not just "user".
  • "I want [goal]" — describes what they want to do or achieve. Focus on the goal, not the implementation.
  • "So that [benefit]" — the most commonly skipped part. This is the why — what value does the user get? This is what helps engineers make good decisions when edge cases arise.
The "so that" clause is not optional Teams that skip it lose the reasoning behind the feature. When an engineer hits an edge case mid-sprint and doesn't know the "why," they either over-build, under-build, or block waiting for clarification. The "so that" clause prevents all three.

Real User Story Examples

Authentication

✓ Good user story As a registered user,
I want to log in with my email and password,
so that I can access my personal dashboard and saved projects.

Notifications

✓ Good user story As a project manager,
I want to receive an email notification when a task is overdue,
so that I can follow up with the assignee before it blocks the sprint.

Reporting

✓ Good user story As an org admin,
I want to export a sprint velocity report as a CSV,
so that I can share team performance data with stakeholders in our quarterly review.

Acceptance Criteria

Acceptance criteria are the specific conditions that must be true for a story to be accepted as "done." They bridge the gap between the story (what the user needs) and the definition of done (what the engineer built).

The most common format for acceptance criteria is Given / When / Then (also called Gherkin format):

Acceptance Criteria — Given / When / Then
  1. Given I am on the login page, when I enter a valid email and correct password and click "Sign In", then I am redirected to my dashboard.
  2. Given I enter an incorrect password, when I click "Sign In", then I see an error message "Invalid email or password" and remain on the login page.
  3. Given I have failed login 5 times, when I attempt a 6th login, then my account is temporarily locked and I receive an email with a reset link.
How many acceptance criteria per story? Aim for 3–7 criteria per story. Fewer than 3 usually means the story is under-specified. More than 7 suggests the story is too large and should be split. Each criterion should be independently testable.

The INVEST Criteria

INVEST is a checklist for evaluating story quality. If a story fails multiple criteria, it should be refined before sprint planning.

I
Independent

Can be developed without blocking or being blocked by another story. Dependencies create queue risks.

N
Negotiable

Details are open for discussion between the team and the product owner — not a locked spec.

V
Valuable

Delivers clear value to a real user. If you can't identify the value, don't build it.

E
Estimable

The team can estimate the effort. If they can't, there's not enough information yet.

S
Small

Completable within a single sprint by one or two developers. Large stories should be split.

T
Testable

Acceptance criteria exist and can be verified. If it can't be tested, it can't be done.

Epics vs User Stories vs Tasks

LevelWhat it isTime to completeExample
EpicLarge capability or themeMultiple sprintsUser Authentication
User StorySpecific user need1 sprint or lessLogin with email + password
TaskTechnical step to complete a storyHours to 1–2 daysImplement JWT token generation
Sub-taskGranular implementation detailUnder half a dayWrite unit tests for auth middleware

Epics are never directly worked on in a sprint. They're broken down into user stories, which are broken down into tasks. A healthy backlog has a clear hierarchy: 3–5 active epics, 10–20 ready stories per epic, and tasks created during sprint planning.

Common User Story Anti-Patterns

These are the most common mistakes that cause stories to fail in the sprint:

"As a user, I want the system to process payments."
Problem: "User" is not specific enough, and "the system" is the implementor, not the person who benefits. Fix: "As a customer at checkout, I want to pay by credit card, so that I can complete my purchase without leaving the site."
"As an admin, I want a full audit trail of all user activity across the platform."
Problem: Way too large for one sprint — this is an epic. Fix: Break into stories: login/logout events, permission change events, data export events — each as a separate story.
"As a user, I want the page to load fast."
Problem: Not testable — "fast" is subjective. Fix: "As a user, I want the dashboard to load in under 2 seconds on a standard broadband connection, so that I don't lose context when switching between views."
"Implement Redis caching for the API endpoints."
Problem: This is a technical task, not a user story — there's no user or benefit named. Technical debt and infrastructure work should be tracked as tasks or tech-stories, not standard user stories. Mixing them makes the backlog harder to prioritize by user value.

Tips for Better Stories

  • Write stories in refinement sessions, not solo. The conversation between product owner, engineers, and QA produces better stories than any individual can write alone.
  • One user per story. If the same story uses "admin" and "regular user" interchangeably, split it — their needs and acceptance criteria are different.
  • Avoid implementation details in the story. "I want a dropdown" prescribes the solution. "I want to filter results by category" lets the team find the best implementation.
  • Add a "definition of done" link. Reference your team's global DoD (unit tests, code review, documentation) so engineers don't need to guess what "done" means.
  • Review the "so that" clause with a skeptic. If someone reading the story can say "so what?" to the benefit, rewrite it.

For context on the Scrum framework that user stories live within, read our guide on Agile vs Scrum for engineering teams. And if you're managing your stories in a tool, see our comparison of the best project management software in 2026.

Track user stories in Projiq

Projiq's sprint board lets you create, link, and track user stories with acceptance criteria, epics, and real-time collaboration — built for engineering organizations from day one.

Start Free Trial

Frequently Asked Questions

Who should write user stories?
User stories are typically written by the Product Owner, but the best stories come from collaborative refinement sessions involving the whole team — engineers, QA, and the PO together. Engineers add technical context, QA identifies testability gaps, and the PO keeps the user perspective sharp. Stories written entirely in isolation by one person tend to have more gaps and require more clarification during the sprint.
How do you split a user story that is too big?
The most effective splitting patterns are: (1) by workflow step — "login" and "logout" as separate stories rather than "authentication"; (2) by user type — "admin view" and "member view" as separate stories; (3) by happy path vs. edge cases — deliver the core flow first, then add error handling; (4) by data set — "filter by date" then "filter by assignee" as separate stories. Avoid splitting by technical layer (frontend/backend) — this breaks the "valuable" INVEST criterion.
How do you estimate user stories?
Most teams use story points — a relative measure of effort, complexity, and uncertainty (not time). Common scales are Fibonacci (1, 2, 3, 5, 8, 13) or T-shirt sizes (S, M, L, XL). Planning Poker is the most common technique: everyone privately picks a number, reveals simultaneously, and discusses discrepancies. The goal is not to predict exact hours but to compare stories relative to each other and identify stories that are too uncertain to start.
What is the difference between a user story and a task?
A user story describes what a user needs — it's a functional requirement with user value. A task is a specific piece of technical work needed to complete a story — it has no direct user value on its own. "Login with email and password" is a user story. "Write JWT middleware" and "Create login form component" are tasks within that story. Tasks are typically created during sprint planning by the engineering team, not during backlog refinement.
Should technical debt and infrastructure work be written as user stories?
Not as standard user stories — there's no real end-user who "wants" a database index or a CI pipeline upgrade. Instead, write them as "technical stories" or "enabler stories" with a business justification (e.g. "refactor auth middleware to support SSO integration in Q3"). This keeps them visible in the backlog, allows estimation and prioritization, and makes the business value clear to stakeholders who ask why engineering time is going to non-feature work.