The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xmlYou MUST have already loaded and processed: {installed_path}/workflow.yamlCommunicate all responses in {communication_language}🤖 AUTONOMOUS EPIC PROCESSING - Full automation of epic completion!This workflow orchestrates create-story and super-dev-story for each story in an epicTASK-BASED COMPLETION: A story is ONLY complete when it has ZERO unchecked tasks (- [ ])⚡ AUTONOMOUS MODE: When auto_accept_gap_analysis=true in workflow.yaml, you MUST:
- NEVER ask the user to approve gap analysis refinements
- AUTOMATICALLY accept all gap analysis proposals
- PROCEED immediately without waiting for user input on gap analysis
- Only ask for user input at the START of the workflow (epic selection, Y/D/n choice)
⚡ INVOKING SUB-WORKFLOWS: When you see invoke-workflow, you must:
1. Load the referenced workflow.yaml file
2. Load its instructions.xml file
3. Execute that workflow completely
4. Return to this workflow and continue
Use provided epic numberEnter epic number to process (e.g., "2" or "epic-3"), or [q] to quit:Parse epic number from inputHALTLoad {{sprint_status}} fileFind epic-{{epic_num}} entry and all story entries for this epicFor each story in epic:
1. Read the story file from {{story_dir}}/{{story_key}}.md
2. Count unchecked tasks: grep -c "^- \[ \]" or regex match "- \[ \]"
3. Count checked tasks: grep -c "^- \[x\]" or regex match "- \[x\]"
4. Categorize story:
- "truly_done": status=done AND unchecked_tasks=0
- "needs_work": unchecked_tasks > 0 (regardless of status)
- "backlog": status=backlog (file may not exist yet)
**Proceed with autonomous processing?**
[Y] Yes - Use story-pipeline (full lifecycle with post-validation)
[n] No - Cancel
Note: story-pipeline is now the default, replacing super-dev-story with 65% token savings!
Set {{use_story_pipeline}} = trueHALTGet current branch name and store as {{current_branch}}Create new branch: auto-epic-{{epic_num}}Initialize progress tracking file:
- epic_num
- started timestamp
- total_stories
- completed_stories: []
- current_story: null
- status: running
🔄 STORY LOOP - Create and develop each story until ALL tasks completeBuild ordered list of stories needing work:
1. All stories with unchecked tasks (regardless of status)
2. All backlog stories
3. Sort by story number (ascending)
Initialize counters: success=0, failure=0Set {{current_story}}Read story file and count unchecked tasksFull lifecycle: create (if backlog) → validate → ATDD → implement → post-validate → review → commitRe-read story file and count unchecked tasksLog incomplete tasks for reviewMark as partial successUpdate story status to "done" in sprint-status.yamlIncrement success_countUpdate progress fileAdd to failed_stories with error detailsIncrement failure_countUpdate progress file status: completeRe-scan all epic stories for unchecked tasksCalculate: total_remaining_tasks across all storiesUpdate sprint-status: epic-{{epic_num}} = "done"Remove progress file