# Epic and Story Decomposition Workflow
name: create-epics-and-stories
description: "Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams."
author: "BMad"

# Critical variables from config
config_source: "{project-root}/{bmad_folder}/bmm/config.yaml"
project_name: "{config_source}:project_name"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
user_skill_level: "{config_source}:user_skill_level"
date: system-generated

# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
input_file_patterns:
  prd:
    description: "Product Requirements Document with FRs and NFRs (required)"
    whole: "{output_folder}/*prd*.md"
    sharded: "{output_folder}/*prd*/index.md"
    load_strategy: "INDEX_GUIDED"
  architecture:
    description: "Architecture decisions and technical design (required)"
    whole: "{output_folder}/*architecture*.md"
    sharded: "{output_folder}/*architecture*/index.md"
    load_strategy: "FULL_LOAD"
  ux_design:
    description: "UX design specification for interaction patterns (recommended if UI exists)"
    whole: "{output_folder}/*ux*.md"
    sharded: "{output_folder}/*ux*/index.md"
    load_strategy: "FULL_LOAD"

# Module path and component files
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories"
instructions: "{installed_path}/instructions.md"
template: "{installed_path}/epics-template.md"

# Output configuration
default_output_file: "{output_folder}/epics.md"

standalone: true

web_bundle:
  name: "create-epics-and-stories"
  description: "Transform PRD requirements into bite-sized stories organized in epics for 200k context dev agents"
  author: "BMad"
  instructions: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md"
  template: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md"
  web_bundle_files:
    - "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md"
    - "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md"
