liveBook · Manning

User story

As explained in Spec-Driven Development

A user story is a concise requirement expressed from the perspective of a person who needs a capability and its purpose.

A user story frames a requirement around the person who needs a capability and why they need it. Its persona, need, and purpose establish context; acceptance criteria then make concrete, verifiable aspects of that intent explicit. section 1.2

Listing 1.1 User story for password reset
As an account holder
I want to reset my password
So that I can regain control of my account if I suspect it has been compromised

A password-reset story connects the account holder’s need to the purpose of regaining control after a suspected compromise. section 1.2

Listing 1.2 Acceptance criteria password reset user story
Scenario: Resetting a password revokes existing access
 
Given I am an account holder with one or more active sessions
And I have requested a password reset
When I successfully set a new password using the reset link
Then all existing sessions for my account are invalidated
And I must log in again on any device
 
Scenario: A reset link is valid only for a limited time
 
Given I have requested a password reset
When I open the reset link within 30 minutes
Then I am allowed to choose a new password
 
Scenario: An expired reset link cannot be used
 
Given I have requested a password reset
When I open the reset link after 30 minutes
Then the link is rejected
And I am prompted to request a new one

Scenarios make the story’s intent verifiable, covering session invalidation and reset-link expiration. section 1.2

How Spec-Driven Development covers it

How deep it goes
Develops persona, need, and purpose into verifiable acceptance criteria, emphasizing conversation over Gherkin syntax.
Examples
Uses password-reset scenarios involving session invalidation and time-limited reset links.
What you can do after
Apply it to state a persona’s need and purpose, then clarify intent with concrete, verifiable acceptance criteria.
How it connects
Connects user stories to acceptance criteria and Behavior-Driven Development.

Also explained in

Compare how 9 books explain user story →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spec-Driven Development. The section links point to the parts of the book it draws on.