2025-10-01 18:28:35 -05:00
# Create Story Workflow
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
Just-in-time story generation creating one story at a time based on epic backlog state. Run by Scrum Master (SM) agent to ensure planned stories align with approved epics.
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
## Table of Contents
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
- [Usage ](#usage )
- [Key Features ](#key-features )
- [Inputs & Outputs ](#inputs--outputs )
- [Workflow Behavior ](#workflow-behavior )
- [Integration ](#integration )
2025-09-28 23:17:07 -05:00
2025-10-01 18:28:35 -05:00
## Usage
2025-09-28 23:17:07 -05:00
2025-10-01 18:28:35 -05:00
```bash
2025-10-30 11:26:15 -05:00
# SM initiates next story creation
2025-10-01 18:28:35 -05:00
bmad sm *create-story
```
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
**When to run:**
- Sprint has capacity for new work
- Previous story is Done/Approved
- Team ready for next planned story
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
## Key Features
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
### Strict Planning Enforcement
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
- **Only creates stories enumerated in epics.md**
- Halts if story not found in epic plan
- Prevents scope creep through validation
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
### Intelligent Document Discovery
2025-09-28 23:17:07 -05:00
2025-10-30 11:26:15 -05:00
- Auto-finds tech spec: `tech-spec-epic-{N}-*.md`
- Discovers architecture docs across directories
- Builds prioritized requirement sources
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Source Document Grounding
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- Every requirement traced to source
- No invention of domain facts
- Citations included in output
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Non-Interactive Mode
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- Default "#yolo " mode minimizes prompts
- Smooth automated story preparation
- Only prompts when critical
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
## Inputs & Outputs
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Required Files
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
| File | Purpose | Priority |
| ------------------------ | ----------------------------- | -------- |
| epics.md | Story enumeration (MANDATORY) | Critical |
| tech-spec-epic-{N}-\*.md | Epic technical spec | High |
| PRD.md | Product requirements | Medium |
| Architecture docs | Technical constraints | Low |
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Auto-Discovered Docs
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- `tech-stack.md` , `unified-project-structure.md`
- `testing-strategy.md` , `backend/frontend-architecture.md`
- `data-models.md` , `database-schema.md` , `api-specs.md`
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Output
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
**Story Document:** `{story_dir}/story-{epic}.{story}.md`
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- User story statement (role, action, benefit)
- Acceptance criteria from tech spec/epics
- Tasks mapped to ACs
- Testing requirements
- Dev notes with sources
- Status: "Draft"
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
## Workflow Behavior
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Story Number Management
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- Auto-detects next story number
- No duplicates or skipped numbers
- Maintains epic.story convention
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Update vs Create
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
- **If current story not Done:** Updates existing
- **If current story Done:** Creates next (if planned)
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Validation Safeguards
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
**No Story Found:**
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
```
"No planned next story found in epics.md for epic {N}.
Run *correct-course to add/modify epic stories."
```
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
**Missing Config:**
Ensure `dev_story_location` set in config.yaml
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
## Integration
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### v6 Implementation Cycle
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
1. **create-story** ← Current step (defines "what")
2. story-context (adds technical "how")
3. dev-story (implementation)
4. code-review (validation)
5. correct-course (if needed)
6. retrospective (after epic)
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
### Document Priority
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
1. **tech_spec_file** - Epic-specific spec
2. **epics_file** - Story breakdown
3. **prd_file** - Business requirements
4. **architecture_docs** - Technical guidance
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
## Configuration
```yaml
# bmad/bmm/config.yaml
dev_story_location: ./stories
output_folder: ./output
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
# workflow.yaml defaults
non_interactive: true
auto_run_context: true
```
## Troubleshooting
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
| Issue | Solution |
| ----------------------- | ------------------------------------------ |
| "No planned next story" | Run `*correct-course` to add story to epic |
| Missing story_dir | Set `dev_story_location` in config |
| Tech spec not found | Use naming: `tech-spec-epic-{N}-*.md` |
| No architecture docs | Add docs to docs/ or output/ folder |
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
---
2025-10-01 18:28:35 -05:00
2025-10-30 11:26:15 -05:00
For workflow details, see [instructions.md ](./instructions.md ) and [checklist.md ](./checklist.md ).