$npx -y skills add aj-geddes/claude-code-bmad-skills --skill bmad-epics-and-storiesSolutioning flagship — shards a PRD + architecture into epics.md and individual {epic}.{story}.{slug}.story.md context objects, the LAST planning artifact before external dev handoff. Each story is a self-contained ~8K-token compiled context object: Dev Notes with SOURCE CITATION
| 1 | # BMAD Epics & Stories |
| 2 | |
| 3 | **Track-adaptive sharding.** Turn approved planning docs into the executable backlog: one |
| 4 | `epics.md` map plus per-story context objects. This is the final planning step — the next |
| 5 | thing that touches a story is an **external dev tool**, not this plugin. |
| 6 | |
| 7 | **Persona flavor:** the Architect (Winston) shards; the PM (John) confirms scope. Lightweight |
| 8 | flavor only — this is a workflow. |
| 9 | |
| 10 | ## Scope Law (read first) |
| 11 | |
| 12 | This skill PLANS. It NEVER writes application code, runs tests, lints, checks coverage, or |
| 13 | builds. The last artifact it emits is a story file marked `status: ready-for-dev`. Acceptance |
| 14 | Criteria, a Testing **strategy**, and Dev Notes are planning outputs you author. Executing |
| 15 | tests or writing implementation is out of scope — plan it and hand it off. If tempted to |
| 16 | "implement" or "run the suite", STOP. |
| 17 | |
| 18 | ## Inputs (load these first) |
| 19 | |
| 20 | | File | Why | |
| 21 | |------|-----| |
| 22 | | `bmad-output/project-context.md` | Project constitution — load every run | |
| 23 | | `bmad-output/prd.md` | Functional requirements, epic intent | |
| 24 | | `bmad-output/architecture.md` | Tech stack, components, module boundaries | |
| 25 | | `bmad-output/ux-design.md` (if present) | UI acceptance details | |
| 26 | | `bmad-output/decision-log.md` | Threaded decisions to honor | |
| 27 | | existing `bmad-output/stories/*.story.md` | Learnings + ID continuity | |
| 28 | |
| 29 | Output folder default: `bmad-output/` (honor user override). Stories go in |
| 30 | `bmad-output/stories/`, the map in `bmad-output/epics.md`. |
| 31 | |
| 32 | ## Three Intents |
| 33 | |
| 34 | - **Create** — shard PRD+architecture into `epics.md`, then compile story files. |
| 35 | - **Update** — revise an existing story (scope, ACs, learnings). Respect LOCKED sections. |
| 36 | - **Validate** — check a draft story against the Context Object contract; report gaps. |
| 37 | |
| 38 | Ask which intent if ambiguous. Do not silently regenerate existing stories. |
| 39 | |
| 40 | ## Tracks (never numbered levels) |
| 41 | |
| 42 | Pick interactively; the heuristic suggests, the user confirms. |
| 43 | |
| 44 | - **Quick Flow** (1-15 stories) — tech-spec only; shard straight to stories, thin `epics.md`. |
| 45 | - **BMad Method** (10-50+) — PRD + Architecture (+ optional UX); full epic map then stories. |
| 46 | - **Enterprise** (30+) — adds Security + DevOps story streams. |
| 47 | |
| 48 | ## Sizing Rule (count-based, no points) |
| 49 | |
| 50 | A story must be **small enough for one agent session — roughly 2-8h, one dev-day max.** |
| 51 | If a story is larger, **split it**; never inflate scope to fill a sprint. There are NO |
| 52 | Fibonacci points, NO velocity, NO burndown. Delivery is tracked by COUNT: stories remaining |
| 53 | vs. completion rate. See [REFERENCE.md](REFERENCE.md) for the split heuristics. |
| 54 | |
| 55 | ## Workflow — Create |
| 56 | |
| 57 | 1. **Load context** — read the inputs above; note the chosen track. |
| 58 | 2. **Derive epics** — group PRD requirements into epics (each a shippable slice of value). |
| 59 | Write `bmad-output/epics.md` from [templates/epic.template.md](templates/epic.template.md): |
| 60 | epic goal, in-scope requirements (cited), ordered story list, cross-epic dependencies. |
| 61 | 3. **Confirm** the epic map with the user before compiling stories. |
| 62 | 4. **Generate IDs** — `bash ${CLAUDE_PLUGIN_ROOT}/skills/bmad-epics-and-stories/scripts/generate-story-id.sh <epic-number>` |
| 63 | gives the next `{epic}.{story}` and a slug stub. Filename: `{epic}.{story}.{slug}.story.md`. |
| 64 | 5. **Compile each story** as a CONTEXT OBJECT from |
| 65 | [templates/story.template.md](templates/story.template.md). It MUST be self-contained |
| 66 | (~8K tokens) so a dev agent needs no other file. Fill every section: |
| 67 | - **Story** — as-a / I-want / so-that. |
| 68 | - **Acceptance Criteria** — numbered, testable. **LOCKED.** |
| 69 | - **Tasks/Subtasks** — checkboxes, each mapped to an AC via `(AC: #N)`. |
| 70 | - **Dev Notes** — concrete guidance WITH SOURCE CITATIONS (e.g. |
| 71 | `[Source: architecture.md#auth-service]`, `[Source: prd.md#FR-12]`). **LOCKED.** |
| 72 | - **Testing** — strategy only (what to verify, test types, fixtures). No execution. **LOCKED.* |