Software Engineering Principles and Practices / Software Requirement Engineering

User Stories

A User Story is an informal, general explanation of a software feature written from the perspective of the end user. Its purpose is to articulate how a software feature will provide value to the customer.


🧩 The Standard Formula

Almost all User Stories follow a simple, three-part template:

As a [type of user],

I want to [perform some action],

So that [I can achieve some goal/value].

Examples:

  • As a Premium Subscriber, I want to download songs for offline play, so that I can listen to music while traveling without data.

  • As a Store Manager, I want to generate a weekly sales report, so that I can identify which products are underperforming.


🃏 The Three C’s

To ensure a User Story is effective, it should follow the "Three C's" framework developed by Ron Jeffries:

  1. Card: Stories are written on physical index cards or digital "tickets" (like in Jira). They are intentionally brief to act as a reminder of the requirement.

  2. Conversation: The story is not a command; it’s an invitation to talk. Developers and Product Owners discuss the details to ensure they understand the intent.

  3. Confirmation: On the back of the card, we write Acceptance Criteria. This is a checklist that defines exactly when the story is "Done."


✨ The INVEST Criteria

How do you know if a User Story is "good"? It should be INVEST-able:

Letter

Meaning

Description

I

Independent

You should be able to build it without waiting for other stories.

N

Negotiable

It’s a discussion point, not a fixed contract.

V

Valuable

It must deliver a clear benefit to the user.

E

Estimable

The developers should be able to guess how long it will take.

S

Small

It should fit into a single Sprint (1–2 weeks).

T

Testable

There must be a way to prove it works.


✅ Acceptance Criteria (The "Definition of Done")

Acceptance Criteria are the specific conditions that a software product must satisfy to be accepted by a user or customer. They turn a vague "story" into a testable requirement.

Example for "User Login":

  • System must accept valid email and password.

  • System must show an error for incorrect passwords.

  • System must lock the account after 5 failed attempts.

  • User must be redirected to the "Dashboard" after successful login.


📊 User Stories vs. Use Cases

Feature

User Story (Agile)

Use Case (Traditional)

Perspective

The User's goal/value.

The System's functionality.

Detail

Low (brief and conversational).

High (step-by-step flow).

Focus

"Why" we are building it.

"What" the system will do.

Format

Narrative sentence.

Diagram + Documented steps.