Home
cd ../playbooks
Product ManagementBeginner

User Story (Mike Cohn + Gherkin)

Translate user needs into testable, outcome-focused user stories combining Mike Cohn's "As a / I want / so that" with Gherkin Given/When/Then acceptance criteria.

15-30 minutes
By communitySource
#user-story#mike-cohn#gherkin#acceptance-criteria#invest

Your sprint board has 30 "As a user, I want to click the save button so that I can save my work" tickets — and engineering still ships features QA can't verify. "As a user" is a tell that you skipped the persona; restated actions in "so that" are a tell that you skipped the why. The fix is specific personas, real motivations, and Given/When/Then criteria a tester can actually execute.

Who it's for: PMs writing backlog items, BAs translating requirements, engineering teams adopting INVEST, QA building test cases from stories

Example

"Write a story for Google login" → "As a trial user / I want to log in with Google / so that I can access the app without creating a new password" → Given login page, Given Google account → When I click Sign in with Google and authorize → Then I'm redirected to onboarding

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# User Story (Mike Cohn + Gherkin)

Create user stories combining Mike Cohn's "As a / I want / so that" with Gherkin "Given/When/Then" acceptance criteria. Translate user needs into actionable, testable, outcome-focused work.

Not a feature spec — a conversation starter capturing *who* benefits, *what* they want, *why*, and *how* you know it works.

## The Format

**Use Case (Mike Cohn):**
- **As a** [persona/role]
- **I want to** [action]
- **so that** [outcome]

**Acceptance Criteria (Gherkin):**
- **Scenario:** [brief description]
- **Given:** [precondition]
- **and Given:** [more preconditions]
- **When:** [trigger event — aligns with "I want to"]
- **Then:** [expected outcome — aligns with "so that"]

## Why This Works

- User-centric: forces who/why focus
- Outcome-focused: "so that" surfaces value
- Testable: Gherkin is concrete + verifiable
- Conversational: opens discussion, not the final spec
- Shared language across product/eng/QA

## Application

### Step 1: Gather Context

- Persona (`proto-persona`)
- Problem (`problem-statement`)
- Desired outcome
- Constraints

### Optional Helper Script

```bash
python3 scripts/user-story-template.py --persona "trial user" --action "log in with Google" --outcome "access without creating a new password"
```

### Step 2: Write the Use Case

```markdown
### User Story [ID]:
- **Summary:** [Memorable, value-focused title]

#### Use Case:
- **As a** [specific persona]
- **I want to** [action]
- **so that** [outcome]
```

Quality checks:
- Specific persona, not generic "user"
- Action user takes, not feature you build
- "So that" = motivation, not restated action

### Step 3: Write Acceptance Criteria

```markdown
#### Acceptance Criteria:
- **Scenario:** [description]
- **Given:** [precondition]
- **and Given:** [more]
- **When:** [trigger]
- **Then:** [outcome]
```

Quality checks:
- Multiple Givens OK (preconditions stack)
- One When + one Then (multiple = split the story)
- "When" matches "I want to"
- "Then" matches "so that"

### Step 4: Validate

- Read aloud: does the team understand who/what/why?
- Can QA write tests from this?
- Too big? See `user-story-splitting`.
- Is "Then" provable?

## Example

```markdown
### User Story 042:
- **Summary:** Enable Google login for trial users to reduce signup friction

#### Use Case:
- **As a** trial user visiting the app for the first time
- **I want to** log in using my Google account
- **so that** I can access the app without creating and remembering a new password

#### Acceptance Criteria:
- **Scenario:** First-time trial user logs in via Google OAuth
- **Given:** I am on the login page
- **and Given:** I have a Google account
- **When:** I click "Sign in with Google" and authorize the app
- **Then:** I am logged in and redirected to onboarding
```

## Common Pitfalls

1. **Tech tasks disguised as stories** — "As a developer, refactor the API" = engineering task.
2. **"As a user" (too generic)** — use specific personas.
3. **"So that" restates "I want to"** — dig for the real motivation.
4. **Multiple When/Then** — story too big. Split it.
5. **Untestable Then** — "better experience." Make it concrete: "page loads in under 2s."

## References

- `skills/user-story-splitting` — break large stories down
- `skills/proto-persona` — defines the persona
- `skills/problem-statement` — validate problem first
- `skills/epic-hypothesis` — epics decompose to stories
- Mike Cohn, *User Stories Applied* (2004)
- Gherkin (Cucumber) Given/When/Then
- INVEST criteria
README.md

What This Does

Generates Mike Cohn-format user stories paired with Gherkin Given/When/Then acceptance criteria, then validates against INVEST and "When/Then aligns with want/so-that" rules. Includes optional Python helper to scaffold a stub from CLI inputs.

Pairs with user-story-splitting, proto-persona, problem-statement, and epic-hypothesis.


Quick Start

mkdir -p ~/Documents/UserStories
mv ~/Downloads/CLAUDE.md ~/Documents/UserStories/
cd ~/Documents/UserStories
claude

Provide persona, action, and outcome (plus context). Claude writes a full story with Given/When/Then and flags whether it should be split.


The Format

Section Fields
Use Case As a / I want to / so that
Acceptance Criteria Scenario / Given(s) / When / Then
Summary Memorable, value-focused title

Tips & Best Practices

  • Specific personas. "Trial user" beats "user."
  • "I want to" = action. Not the feature you're building.
  • "So that" = real motivation. Not a restated action.
  • One When + one Then. Multiple = the story should be split.
  • Testable Then. "Page loads in under 2s" beats "feels faster."

Common Pitfalls

  • Engineering tasks pretending to be user stories
  • "As a user" applied to every persona
  • "So that I can save" right after "I want to save"
  • 3+ When/Then pairs jammed into one story
  • Acceptance criteria nobody can test ("better UX")

$Related Playbooks

Product Management

VP/CPO Readiness Advisor

Adaptive coaching for the Director-to-VP and VP-to-CPO transition — Three Ps diagnostic, Empowerment Myth, paradigm shift, alliance building, and 4 branches (preparing, interviewing, newly landed, recalibrating).

20-30 minutes
Advanced
Product Management

Workshop Facilitation Protocol

Canonical multi-turn facilitation pattern for interactive PM workshops and advisors — one question per turn, progress labels, entry modes, and decision-point recommendations.

varies by workshop
Intermediate
Product Management

Acquisition Channel Advisor

Evaluate acquisition channels using unit economics, customer quality, and scalability. Decide whether to scale, test, or kill each channel with finance-backed reasoning.

10 minutes
Intermediate
Product Management

AI-Shaped Readiness Advisor

Diagnose whether your product work is 'AI-first' (efficiency) or 'AI-shaped' (strategic transformation). Score 5 competencies, identify gaps, and get a priority action plan.

15 minutes
Advanced
Product Management

Altitude & Horizon Framework (PM → Director)

Understand the PM-to-Director transition through altitude (scope) and horizon (time). Diagnose which of four transition zones is creating friction and apply the Cascading Context Map when direction from above is vague.

10 minutes
Intermediate
Product Management

SaaS Business Health Diagnostic

Diagnose SaaS business health across growth, retention, unit economics, and capital efficiency. Identify red flags by urgency and get a prioritized action plan with stage-specific benchmarks.

15 minutes
Advanced
Product Management

Context Engineering Advisor

Diagnose whether you're doing context stuffing (volume without intent) or context engineering (structure for attention). Build memory architecture, define context boundaries, and implement the Research → Plan → Reset → Implement cycle.

15 minutes
Advanced
Product Management

Director Readiness Advisor

Coach the PM-to-Director transition with 4 situational branches — preparing, interviewing, newly landed, or recalibrating — and deliver war-story-backed guidance calibrated to your specific stage.

10 minutes
Advanced
Product Management

Discovery Interview Prep

Design a customer discovery interview plan with the right methodology, questions, and bias guardrails — calibrated to your research goal, segment, and constraints via 4 adaptive questions.

15 minutes
Intermediate
Product Management

Discovery Process (End-to-End)

Run a complete 6-phase discovery cycle — frame, research, synthesize, generate, validate, decide — in 3-4 weeks. Orchestrates 10+ component skills for problem-to-validated-solution workflow.

30 minutes
Advanced
Product Management

Customer Journey Map

Build a strategic customer journey map across Awareness → Consideration → Decision → Service → Loyalty — with actions, touchpoints, emotions, KPIs, business goals, and owning teams per stage.

20 minutes
Intermediate
Product Management

Customer Journey Mapping Workshop

Run a 5-question adaptive workshop to build a customer journey map — actor, scenario, phases, actions/emotions, and prioritized opportunities — that aligns cross-functional teams around real pain points.

15 minutes
Intermediate

Browse all Product Management playbooks →