User Stories Skill
Standard of quality for every user story produced by the PWDEV-CODE framework
(/pwdev-code:product prd §6, /pwdev-code:product stories) and for
reviewing stories brought by the human.
1. Canonical Format
PT-BR: Como {persona}, quero {ação}, para {valor/resultado}.
EN: As a {persona}, I want {action}, so that {value/outcome}.
- Persona — a real user type with a name from the PRD/requirements
(never "o sistema"/"the system"; never "usuário" genérico if personas exist).
- Ação — one capability, observable from the user's perspective.
- Valor — the reason; if you can't state it, the story probably isn't one.
2. INVEST — quick test per letter
| Letter |
Question |
Fails when... |
| Independent |
Can it ship without waiting on another story? |
hidden dependency on an unwritten story |
| Negotiable |
Is it an intent, not a frozen spec? |
prescribes UI pixel/implementation detail |
| Valuable |
Does the persona gain something? |
value only for developers ("refactor X") |
| Estimable |
Can the team size it? |
too vague or research-shaped |
| Small |
Fits in one iteration? |
it's an epic wearing a story costume |
| Testable |
Can each AC be verified objectively? |
"should be fast/easy/intuitive" |
A story that fails 2+ letters must be rewritten or split before entering
.planning/product/stories/.
3. Acceptance Criteria
Use Gherkin when behavior has state + trigger + observable result:
# PT-BR # EN
Dado que estou logado como cliente Given I am logged in as a customer
Quando adiciono um item esgotado When I add an out-of-stock item
Então vejo a mensagem "indisponível" Then I see the "unavailable" message
E o item não entra no carrinho And the item is not added to the cart
Use a simple checklist for cross-cutting or static criteria
(e.g. "- [ ] lista pagina de 20 em 20", "- [ ] AA contrast on all states").
Rules: every AC is objectively verifiable; cover the happy path AND at least
one error/edge path; 3-8 ACs per story (more → split the story).
4. Definition of Ready
A story is status: ready only when:
5. Anti-Patterns
| Never write |
Why |
Instead |
| "Como sistema, quero..." |
systems don't want things |
name the persona who benefits |
| Technical story disguised ("Como dev, quero migrar o banco") |
no user value stated |
attach it to the user outcome, or make it a task in a plan |
| AC "deve ser rápido/fácil/intuitivo" |
not testable |
number it ("responde em <500ms", "máx 2 cliques") |
| Story-epic ("Como cliente, quero gerenciar meu pedido") |
not Small |
split per capability (ver, cancelar, alterar) |
| Hidden dependency ("...igual à tela de admin") |
not Independent |
declare the dependency or inline the requirement |
| UI prescription ("quero um dropdown azul...") |
not Negotiable |
state the need; design decides the control |
6. Review Checklist (10 items)
- Persona named and real (exists in PRD/requirements)?
- One capability per story?
- Value clause non-circular ("para que eu possa fazer X" ≠ repetir a ação)?
- INVEST: all 6 pass?
- ACs: happy path covered?
- ACs: at least one error/edge path?
- ACs: all objectively verifiable (numbers, observable states)?
- Priority MoSCoW assigned?
- Dependencies explicit?
- Language consistent with project
lang (terms técnicos em inglês)?
7. Examples
✅ Good (PT-BR)
US-03 — Cancelar pedido não enviado
Como cliente, quero cancelar um pedido que ainda não foi enviado,
para não pagar por algo que não quero mais.
ACs: Dado pedido "processando" / Quando clico Cancelar e confirmo / Então
status vira "cancelado" E estorno é criado E recebo e-mail. + Dado pedido
"enviado" / Quando abro o pedido / Então Cancelar não é exibido.
✅ Good (EN)
US-07 — Export report as CSV
As an operations analyst, I want to export the monthly report as CSV,
so that I can cross it with the ERP spreadsheet.
ACs: Given a report with data / When I click Export / Then a CSV downloads
with the visible columns and filters applied. Given an empty report / Then
Export is disabled with a tooltip.
❌ Bad → fixed
"Como usuário, quero uma tela de pedidos melhor." — persona genérica,
não testável, não estimável.
→ "Como cliente recorrente, quero filtrar meus pedidos por status e
período, para encontrar uma compra antiga sem rolar a lista inteira."
"As a system, I want to validate tokens." — system persona, technical.
→ "As a logged-in user, I want my session to stay valid while I work,
so that I don't lose a form to a silent logout." (token validation
becomes a task under this story's plan)
8. Integration with PWDEV-CODE
/pwdev-code:product prd §6 (User Stories with ACs) MUST follow this skill.
/pwdev-code:product stories uses this skill as the quality bar and
persists stories to .planning/product/stories/US-{NN}-{slug}.md.
discover/design consult existing stories as requirement sources.
- Story files carry frontmatter:
id, epic (roadmap ref, if any),
priority (MoSCoW), status: draft|ready.
1---2name: skill-user-stories3description: >4 Write and refine high-quality user stories — INVEST criteria, "As a X, I want Y,5 so that Z" format, Gherkin acceptance criteria when applicable, definition of6 ready, anti-patterns, and a review checklist. Use when creating or reviewing7 user stories, PRD section 6, backlog items, or acceptance criteria.8 Do NOT use for technical specs, architecture decisions, or task decomposition.9paths:10 - "**/PRD.md"11 - "**/prd.md"12 - ".planning/product/stories/**"13metadata:14 source: https://skillmd.com/skills/pwdev-solucoes/skill-user-stories15 version: 1.0.016 author: Pwdev17 updated: 2026-07-1818---1920# User Stories Skill2122Standard of quality for every user story produced by the PWDEV-CODE framework23(`/pwdev-code:product prd` §6, `/pwdev-code:product stories`) and for24reviewing stories brought by the human.2526---2728## 1. Canonical Format2930**PT-BR:** `Como {persona}, quero {ação}, para {valor/resultado}.`31**EN:** `As a {persona}, I want {action}, so that {value/outcome}.`3233- **Persona** — a real user type with a name from the PRD/requirements34 (never "o sistema"/"the system"; never "usuário" genérico if personas exist).35- **Ação** — one capability, observable from the user's perspective.36- **Valor** — the reason; if you can't state it, the story probably isn't one.3738## 2. INVEST — quick test per letter3940| Letter | Question | Fails when... |41|--------|----------|---------------|42| **I**ndependent | Can it ship without waiting on another story? | hidden dependency on an unwritten story |43| **N**egotiable | Is it an intent, not a frozen spec? | prescribes UI pixel/implementation detail |44| **V**aluable | Does the persona gain something? | value only for developers ("refactor X") |45| **E**stimable | Can the team size it? | too vague or research-shaped |46| **S**mall | Fits in one iteration? | it's an epic wearing a story costume |47| **T**estable | Can each AC be verified objectively? | "should be fast/easy/intuitive" |4849A story that fails 2+ letters must be rewritten or split before entering50`.planning/product/stories/`.5152## 3. Acceptance Criteria5354**Use Gherkin** when behavior has state + trigger + observable result:5556```gherkin57# PT-BR # EN58Dado que estou logado como cliente Given I am logged in as a customer59Quando adiciono um item esgotado When I add an out-of-stock item60Então vejo a mensagem "indisponível" Then I see the "unavailable" message61E o item não entra no carrinho And the item is not added to the cart62```6364**Use a simple checklist** for cross-cutting or static criteria65(e.g. "- [ ] lista pagina de 20 em 20", "- [ ] AA contrast on all states").6667Rules: every AC is objectively verifiable; cover the happy path AND at least68one error/edge path; 3-8 ACs per story (more → split the story).6970## 4. Definition of Ready7172A story is `status: ready` only when:7374- [ ] Canonical format with a named persona75- [ ] Passes all 6 INVEST letters76- [ ] 3-8 verifiable ACs (happy + error path)77- [ ] Priority assigned (MoSCoW)78- [ ] Dependencies declared (or "none")79- [ ] Out-of-scope noted when the title invites scope creep8081## 5. Anti-Patterns8283| Never write | Why | Instead |84|-------------|-----|---------|85| "Como sistema, quero..." | systems don't want things | name the persona who benefits |86| Technical story disguised ("Como dev, quero migrar o banco") | no user value stated | attach it to the user outcome, or make it a task in a plan |87| AC "deve ser rápido/fácil/intuitivo" | not testable | number it ("responde em <500ms", "máx 2 cliques") |88| Story-epic ("Como cliente, quero gerenciar meu pedido") | not Small | split per capability (ver, cancelar, alterar) |89| Hidden dependency ("...igual à tela de admin") | not Independent | declare the dependency or inline the requirement |90| UI prescription ("quero um dropdown azul...") | not Negotiable | state the need; design decides the control |9192## 6. Review Checklist (10 items)93941. Persona named and real (exists in PRD/requirements)?952. One capability per story?963. Value clause non-circular ("para que eu possa fazer X" ≠ repetir a ação)?974. INVEST: all 6 pass?985. ACs: happy path covered?996. ACs: at least one error/edge path?1007. ACs: all objectively verifiable (numbers, observable states)?1018. Priority MoSCoW assigned?1029. Dependencies explicit?10310. Language consistent with project `lang` (terms técnicos em inglês)?104105## 7. Examples106107### ✅ Good (PT-BR)108> **US-03 — Cancelar pedido não enviado**109> Como **cliente**, quero **cancelar um pedido que ainda não foi enviado**,110> para **não pagar por algo que não quero mais**.111> ACs: Dado pedido "processando" / Quando clico Cancelar e confirmo / Então112> status vira "cancelado" E estorno é criado E recebo e-mail. + Dado pedido113> "enviado" / Quando abro o pedido / Então Cancelar não é exibido.114115### ✅ Good (EN)116> **US-07 — Export report as CSV**117> As an **operations analyst**, I want **to export the monthly report as CSV**,118> so that **I can cross it with the ERP spreadsheet**.119> ACs: Given a report with data / When I click Export / Then a CSV downloads120> with the visible columns and filters applied. Given an empty report / Then121> Export is disabled with a tooltip.122123### ❌ Bad → fixed124> ~~"Como usuário, quero uma tela de pedidos melhor."~~ — persona genérica,125> não testável, não estimável.126> → "Como **cliente recorrente**, quero **filtrar meus pedidos por status e127> período**, para **encontrar uma compra antiga sem rolar a lista inteira**."128129> ~~"As a system, I want to validate tokens."~~ — system persona, technical.130> → "As a **logged-in user**, I want **my session to stay valid while I work**,131> so that **I don't lose a form to a silent logout**." (token validation132> becomes a task under this story's plan)133134## 8. Integration with PWDEV-CODE135136- `/pwdev-code:product prd` §6 (User Stories with ACs) MUST follow this skill.137- `/pwdev-code:product stories` uses this skill as the quality bar and138 persists stories to `.planning/product/stories/US-{NN}-{slug}.md`.139- `discover`/`design` consult existing stories as requirement sources.140- Story files carry frontmatter: `id`, `epic` (roadmap ref, if any),141 `priority` (MoSCoW), `status: draft|ready`.