/devflow:user-story [brainstorm-path?]from DevFlow Skills Collection
Generates hierarchical user stories (epics, features, tasks) with formal Given/When/Then acceptance criteria. Works from brainstorm output or standalone, producing structured requirements that feed into create-plan.
Ships in DevFlow Skills Collection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reference files (open one when a step points to it):
references/index-template.md: User Stories Index Templatereferences/shared-format.md: Shared Format Contract: User Stories ↔ Create-Planreferences/story-template.md: User Story Epic File TemplateThis skill generates hierarchical user stories (epics → features → tasks) with formal Given/When/Then acceptance criteria. It works in two modes: consuming brainstorm output for rich context, or standalone with its own clarification phase. Task-level stories share format with create-plan phases for seamless handoff.
Workflow Position: brainstorm → (ADRs + user stories) → create-plan → implement-plan
Related ADRs:
When this skill is invoked, respond:
"I'm ready to help you define user stories. I can work from a brainstorm document or start fresh. Let me check for recent brainstorms, or you can describe the feature/system you want to define requirements for."
Determine the input mode and gather initial context.
Step 1: Check for explicit brainstorm path
If the user passed a file path argument ($0):
Read($0) # Read the brainstorm file
→ Proceed to Phase 2 with brainstorm content as context.
Step 2: Auto-scan for recent brainstorms
If no argument provided, scan for recent brainstorm files:
Glob("docs/brainstorms/*.md")
| Scenario | Action |
|---|---|
| Recent brainstorms found (last 7 days) | Present list and ask: "I found these recent brainstorms. Would you like to base user stories on one of them, or start fresh?" |
| No recent brainstorms | Proceed to standalone mode (Phase 3) |
| User selects a brainstorm | Read the file, proceed to Phase 2 |
| User wants to start fresh | Proceed to Phase 3 |
Step 3: Check for existing user stories
Always check for existing stories to avoid duplication:
Read("docs/user-stories/INDEX.md") # If it exists
If existing stories overlap with the current scope, note them and ask whether to extend, revise, or create new epics.
Gather all relevant context before generating stories.
Always do:
Read brainstorm output (if available from Phase 1)
Read existing ADRs for architectural context:
Read("docs/decisions/INDEX.md")
# Then Quick Reference (first 10 lines) of relevant ADRs
Read existing user stories INDEX (if it exists):
Read("docs/user-stories/INDEX.md")
When project context is detected (user mentions codebase, files, modules):
Task(subagent_type="codebase-locator",
prompt="Find all files related to [feature area]")
Task(subagent_type="codebase-analyzer",
prompt="Analyze how [related functionality] is implemented")
After gathering context, present a summary:
## Context Summary
- **Source**: [Brainstorm file / Standalone input]
- **Existing Stories**: [None / EPIC-01, EPIC-02...]
- **Relevant ADRs**: [ADR-NNNN, ...]
- **Codebase Context**: [Key files and patterns found]
Then proceed to Phase 3 if standalone, or Phase 4 if brainstorm input provides sufficient context.
When working without brainstorm input, use targeted Socratic questioning to understand requirements.
Round 1: Users & Goals (ask 2-3 questions)
| Category | Example Questions |
|---|---|
| Users/Personas | "Who are the primary users of this system/feature?" |
| "Are there different user roles with different needs?" | |
| Core Goals | "What is the primary problem being solved?" |
| "What does success look like for the user?" |
Round 2: Scope & Constraints (ask 2-3 questions)
| Category | Example Questions |
|---|---|
| Scope | "What is explicitly in scope for this work?" |
| "What should be considered out of scope?" | |
| Constraints | "Are there technical constraints to be aware of?" |
| "Are there existing systems this must integrate with?" |
Round 3: Success Criteria (ask 2-3 questions)
| Category | Example Questions |
|---|---|
| Acceptance | "How will you know this feature is working correctly?" |
| "What are the key scenarios that must work?" | |
| Edge Cases | "What error cases or edge cases concern you most?" |
| "What happens when things go wrong?" |
Continuation Protocol:
Generate hierarchical user stories from the gathered context.
Step 1: Identify Epics
Extract high-level goals/capabilities from the input. Each epic represents a major user-facing capability.
Epic format:
ID: EPIC-NN
Title: [Capability name]
Description: As a [user type], I want [goal] so that [benefit]
Status: Draft
Limits: If more than 5-7 epics emerge, discuss with the user which to prioritize for this session.
Step 2: Decompose into Features
For each epic, identify 2-5 features that compose it:
Feature format:
ID: EPIC-NN.F-NN
Title: [Feature name]
Description: As a [user type], I want [specific capability] so that [benefit]
Limit: Max 5 features per epic. If more emerge, suggest splitting the epic.
Step 3: Decompose into Tasks
For each feature, identify 2-5 implementable tasks:
Task format (shared with create-plan phases):
ID: EPIC-NN.F-NN.T-NN
Title: [Task name]
**Objective**: [What this task accomplishes]
**Acceptance Criteria**:
- **Given** [precondition]
**When** [action]
**Then** [expected result]
**Tasks** (tests first, then implementation):
- [ ] Write tests: [test file] covering [scenarios]
- [ ] Implement: [file] to make tests pass
- [ ] Verify: [specific check or command]
**Exit Conditions**:
Build Verification:
- [ ] [build/lint/typecheck commands]
Runtime Verification:
- [ ] [start command, no errors]
Functional Verification:
- [ ] [test commands, specific checks]
Limit: Max 5 tasks per feature. If more emerge, suggest splitting the feature.
Step 4: Review with User
Before writing output, present the hierarchy for review:
## Story Hierarchy Preview
### EPIC-01: [Title]
- EPIC-01.F-01: [Feature title] (N tasks)
- EPIC-01.F-02: [Feature title] (N tasks)
### EPIC-02: [Title]
- EPIC-02.F-01: [Feature title] (N tasks)
Total: N epics, N features, N tasks
Does this decomposition look right? Any adjustments before I write the detailed stories?
Wait for user confirmation before proceeding to output.
Write the user story files following the conventions from ADR-0003 and ADR-0004.
Step 1: Create directory (if needed)
mkdir -p docs/user-stories
Step 2: Write epic files
For each epic, write a file using the template from references/story-template.md:
File: docs/user-stories/EPIC-NN-slug.md
See references/story-template.md for the complete format.
Step 3: Create/update INDEX.md
Write/update docs/user-stories/INDEX.md using the template from references/index-template.md.
Step 4: Report summary
After writing all files, present:
## User Stories Created
| File | Epic | Features | Tasks |
|------|------|----------|-------|
| [EPIC-01-slug.md](docs/user-stories/EPIC-01-slug.md) | [Title] | N | N |
| [EPIC-02-slug.md](docs/user-stories/EPIC-02-slug.md) | [Title] | N | N |
**Index**: docs/user-stories/INDEX.md
## Recommended Next Steps
1. Review and refine acceptance criteria
2. Create ADRs for any architectural decisions identified (`/adr`)
3. Create implementation plan from these stories (`/create-plan`)
Task-level stories share structure with create-plan phases per ADR-0005.
See references/shared-format.md for the exact contract.
Shared base (both user stories and plan phases):
User stories add:
Before finalizing output, verify:
Structure:
Content:
Context:
| Level | Represents | Timeframe | Example |
|---|---|---|---|
| Epic | Major user capability | Weeks-months | "User Authentication" |
| Feature | Deliverable functionality | Days-weeks | "Password Reset Flow" |
| Task | Single implementable unit | Hours-days | "Email Validation on Reset Form" |
When create-plan is invoked after user stories:
story-template.md - Epic file format and story structure at each levelindex-template.md - INDEX.md template for user stories directoryshared-format.md - Shared format contract between user stories and create-planWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
user-stories, requirements, acceptance-criteria, agile, planning
npx claudepluginhub mhylle/claude-skills-collection --plugin devflow35 skills in this plugin
/adrDocument architectural decisions in standardized ADR format. This skill should be used when making significant technical decisions, choosing between approaches, establishing patterns, or when other skills (create-plan, implement-plan, brainstorm) identify decisions that need documentation. Triggers on "document decision", "create ADR", "architectural decision", or automatically when invoked by other skills during planning and implementation./adversarial-reviewerAdversarial code review by three independent subagent personas (Saboteur, New Hire, Security Auditor) running in parallel, isolated contexts that know nothing of the author's intent or Claude's earlier conclusions. Reviews a diff by default (staged/unstaged, a ref or a file); --codebase reviews a whole repo or subtree for tech debt, attack surface and knowledge silos. Use before merging a PR; when the user asks for a hostile, harsh, critical, skeptical or second-opinion review; when a /devflow:code-review came back suspiciously clean; when the user is tired after a long session or has a gut feeling something is off; or for a quick audit of an inherited repo ("what am I inheriting"). Differs from /devflow:code-review (routine per-phase review, no isolation) and /devflow:security-review (single-lens OWASP depth)./agent-creatorCreate composable AI agent systems in NestJS projects following the "tools all the way down" architecture. Use this skill when users want to: (1) Create new AI agents with orchestrator/planner/executor/evaluator components, (2) Build agentic systems that can call other agents as tools, (3) Implement DAG-based planning with parallel execution, (4) Add database-backed state persistence for agent runs, (5) Create custom evaluators for quality assurance. Triggers on "create agent", "build agent", "agent system", "agentic", "orchestrator", "planner/executor pattern", or NestJS AI agent requests.
/brainstormRefine a rough idea into a well-structured concept through Socratic questioning, targeted research and one or two fitting analysis frameworks (Six Thinking Hats, SCAMPER, Premortem), then write it to docs/brainstorms/ as the input for planning. Use when the user wants to brainstorm, explore or think through an idea, find holes in a proposal, asks "what am I missing", or wants to shape a concept before planning, whether or not the work is tracked in TaskTracker. The output feeds /create-plan, /tt-create-plan and /user-story./codebase-auditLong-running, resumable adversarial audit of a whole codebase. Splits the repo into partitions, runs /adversarial-reviewer --codebase on each, then synthesizes a cross-partition risk register and a written remediation report. Use for onboarding audits of an inherited codebase, pre-acquisition due diligence, periodic tech-debt health checks, or when the user asks for a comprehensive, thorough, exhaustive or deep review of the whole codebase ("full codebase audit", "code due diligence", "tech debt audit", "what am I inheriting"). Differs from /adversarial-reviewer --codebase, which samples the repo in one pass, and from /code-quality-audit, which measures coverage, complexity, cycles and mutation scores./codebase-researchOrchestrates comprehensive codebase research by decomposing user queries into parallel sub-agent tasks and synthesizing findings. This skill should be used when users ask questions about how code works, where functionality exists, how components interact, or need comprehensive documentation of existing implementations. It focuses exclusively on documenting and explaining the codebase as it exists today.Other plugins' skills for the same job