Create Epic Stories

Create and validate all missing stories for an epic until ready for implementation

husams 1 updated 10mo ago
Claude CodeGeneric
View source ↗
---
description: Create and validate all missing stories for an epic until ready for implementation
argument-hint: "[epic-id]"
---
Epic ID: $ARGUMENTS

## Workflow: Create Missing Stories for Epic

I'll orchestrate the story creation process for epic $ARGUMENTS, working through each missing story until all are validated and ready for implementation.

### Step 1: Identify Missing Stories
Check the epic definition to determine which stories need to be created:
- Read epic requirements from `docs/epics/epic-{$ARGUMENTS}-*.md`
- List existing story files in `docs/stories/`
- Identify gaps between epic requirements and existing stories

### Step 2: Story Creation Loop
For each missing story identified:

#### Phase A: Draft Story
Use the story-drafter agent to create the initial story draft:
- Agent reads epic from `docs/epics/epic-{$ARGUMENTS}.md`
- Pulls story requirements from the epic file
- Creates story file in `docs/stories/` with naming: `{epicNum}.{storyNum}.story.md`
- Generates acceptance criteria in Given-When-Then format
- Includes all necessary implementation details

#### Phase B: Validate Story
Use the story-validator agent to check if the story is implementation-ready:
- Agent reads the drafted story from `docs/stories/{N}.{M}.story.md`
- Validates story structure and completeness
- Ensures acceptance criteria are testable
- Verifies story aligns with epic definition
- Checks all required sections are present
- Returns validation result with specific feedback

#### Phase C: Refinement (if needed)
Based on validation results:

**If validation PASSES:**
- Story is marked as ready for implementation
- Continue to next missing story
- Report: "✅ Story {N}.{M} is ready for implementation"

**If validation FAILS:**
- Collect validation feedback from story-validator
- Use story-drafter agent to refine the story based on feedback
- Story-drafter updates the story file with improvements
- Return to Phase B for re-validation with story-validator
- Repeat draft → validate → refine cycle until validation passes

### Step 3: Completion
Once all stories for the epic are created and validated:
- Provide summary of all stories created
- Confirm all stories are in "ready for implementation" state
- Report total stories created and validation cycles required

### Orchestration Rules
1. I will NOT modify stories directly - only coordinate agents
2. Agents work ONLY with `docs/epics/` and `docs/stories/` directories
3. Stories are created based on epic definitions only
4. Validation feedback drives refinement iterations
5. Process continues until ALL stories pass validation
6. Only report completion when stories meet implementation criteria

### Directory Structure

docs/ ├── epics/ # Epic definitions │ └── epic-{N}.md # Individual epic files └── stories/ # User stories └── {N}.{M}.story.md # Story files (N=epic, M=story number)


### Expected Output
When this workflow completes, you'll receive:
- Confirmation that all stories for epic $ARGUMENTS are ready
- List of story files created (e.g., `1.1.story.md`, `1.2.story.md`)
- Number of refinement cycles each story required
- Final status: "All stories validated and ready for implementation"

Maintain Create Epic Stories?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Create Epic Stories on getagentictools](https://getagentictools.com/loops/husams-create-epic-stories?ref=badge)