workflows consistent method to update status file

This commit is contained in:
Brian Madison
2025-10-17 23:44:43 -05:00
parent 5788be64d0
commit 36231173d1
25 changed files with 624 additions and 700 deletions

View File

@@ -68,18 +68,15 @@
<step n="4" goal="Update status and complete">
<check if="standalone_mode != true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: brainstorm-game</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "brainstorm-game - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed brainstorm-game workflow. Generated game brainstorming session results. Next: Review game ideas and consider research or game-brief workflows."</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Game Brainstorming Session Complete, {user_name}!**

View File

@@ -53,18 +53,15 @@
<step n="4" goal="Update status and complete">
<check if="standalone_mode != true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: brainstorm-project</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "brainstorm-project - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed brainstorm-project workflow. Generated brainstorming session results. Next: Review ideas and consider research or product-brief workflows."</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Brainstorming Session Complete, {user_name}!**

View File

@@ -179,18 +179,15 @@ Your choice [1/2/3]:
<step n="4" goal="Update status and complete">
<check if="status_file_found == true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: document-project</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "document-project - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 10%</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed document-project workflow ({{workflow_mode}} mode). Generated documentation in {output_folder}/."</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Document Project Workflow Complete, {user_name}!**

View File

@@ -310,18 +310,15 @@ This brief will serve as the primary input for creating the Game Design Document
<step n="16" goal="Update status and complete">
<check if="standalone_mode != true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: game-brief</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "game-brief - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 10% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed game-brief workflow. Game brief document generated. Next: Proceed to plan-project workflow to create Game Design Document (GDD)."</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Game Brief Complete, {user_name}!**

View File

@@ -274,18 +274,15 @@ This brief will serve as the primary input for creating the Product Requirements
<step n="16" goal="Update status file on completion">
<check if="standalone_mode != true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: product-brief</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "product-brief - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 10% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed product-brief workflow. Product brief document generated and saved. Next: Proceed to plan-project workflow to create Product Requirements Document (PRD)."</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Product Brief Complete, {user_name}!**

View File

@@ -379,23 +379,15 @@ Select option (1-4):</ask>
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: research</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "research (deep-prompt)"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "research (deep-prompt) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed research workflow (deep-prompt mode). Research prompt generated and saved. Next: Execute prompt with AI platform or continue with plan-project workflow.
```
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
<output>**✅ Deep Research Prompt Generated**

View File

@@ -559,23 +559,16 @@ Create compelling executive summary with:
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: research</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "research ({{research_mode}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "research ({{research_mode}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed research workflow ({{research_mode}} mode). Research report generated and saved. Next: Review findings and consider product-brief or plan-project workflows.
```
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Research Complete ({{research_mode}} mode)**

View File

@@ -447,23 +447,16 @@ Select option (1-5):</ask>
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: research</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "research (technical)"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "research (technical) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional Phase 1 workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed research workflow (technical mode). Technical research report generated and saved. Next: Review findings and consider plan-project workflow.
```
<check if="success == true">
<output>Status updated! Next: {{next_workflow}}</output>
</check>
</check>
<output>**✅ Technical Research Complete**

View File

@@ -326,24 +326,17 @@ For each {{placeholder}} in the fragment, elicit and capture that information.
<step n="15" goal="Update status and populate story sequence">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: gdd</param>
<param>populate_stories_from: {epics_output_file}</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "gdd - Complete"</action>
<template-output file="{{status_file_path}}">phase_2_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment appropriately based on level</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed GDD workflow. Created bmm-GDD.md and bmm-epics.md with full story breakdown."</action>
<action>Populate STORIES_SEQUENCE from epics.md story list</action>
<action>Count total stories and update story counts</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}} ({{next_agent}} agent)</output>
<output>Loaded {{total_stories}} stories from epics.</output>
</check>
</step>

View File

@@ -542,17 +542,15 @@ Which would you like?</ask>
<step n="17" goal="Update status if tracking enabled">
<check if="tracking_mode == true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: narrative</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "narrative - Complete"</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed narrative workflow. Created bmm-narrative-design.md with detailed story and character documentation."</action>
<action>Save {{status_file_path}}</action>
<output>Status tracking updated.</output>
<check if="success == true">
<output>✅ Status updated! Next: {{next_workflow}}</output>
</check>
</check>
</step>

View File

@@ -407,21 +407,17 @@ For each epic from the epic list, expand with full story details:
<step n="10" goal="Update status and complete">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: prd</param>
<param>populate_stories_from: {epics_output_file}</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "prd - Complete"</action>
<template-output file="{{status_file_path}}">phase_2_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed PRD workflow. Created PRD.md and epics.md with full story breakdown."</action>
<action>Populate STORIES_SEQUENCE from epics.md story list</action>
<action>Count total stories and update story counts</action>
<action>Save {{status_file_path}}</action>
<check if="success == true">
<output>Status updated! Next: {{next_workflow}} ({{next_agent}} agent)</output>
<output>Loaded {{total_stories}} stories from epics.</output>
</check>
<output>**✅ PRD Workflow Complete, {user_name}!**

View File

@@ -98,91 +98,27 @@
</step>
<step n="4" goal="Update bmm-workflow-status and initialize Phase 4">
<step n="4" goal="Update status - Level 0 single story">
<action>Open {output_folder}/bmm-workflow-status.md</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: tech-spec</param>
</invoke-workflow>
<action>Update "Workflow Status Tracker" section:</action>
<check if="success == true">
<output>✅ Tech-spec complete! Next: {{next_workflow}}</output>
</check>
- Set current_phase = "4-Implementation" (Level 0 skips Phase 3)
- Set current_workflow = "tech-spec (Level 0 - story generation complete, ready for implementation)"
- Check "2-Plan" checkbox in Phase Completion Status
- Set progress_percentage = 40% (planning complete, skipping solutioning)
<action>Load {{status_file_path}}</action>
<action>Set STORIES_SEQUENCE: [{slug}]</action>
<action>Set TODO_STORY: {slug}</action>
<action>Set TODO_TITLE: {{story_title}}</action>
<action>Set IN_PROGRESS_STORY: (empty)</action>
<action>Set STORIES_DONE: []</action>
<action>Save {{status_file_path}}</action>
<action>Update Development Queue section:</action>
- Set STORIES_SEQUENCE = "[{slug}]" (Level 0 has single story)
- Set TODO_STORY = "{slug}"
- Set TODO_TITLE = "{{story_title}}"
- Set IN_PROGRESS_STORY = ""
- Set IN_PROGRESS_TITLE = ""
- Set STORIES_DONE = "[]"
<action>Initialize Phase 4 Implementation Progress section:</action>
#### BACKLOG (Not Yet Drafted)
**Ordered story sequence - populated at Phase 4 start:**
| Epic | Story | ID | Title | File |
| ---------------------------------- | ----- | --- | ----- | ---- |
| (empty - Level 0 has only 1 story) | | | | |
**Total in backlog:** 0 stories
**NOTE:** Level 0 has single story only. No additional stories in backlog.
#### TODO (Needs Drafting)
Initialize with the ONLY story (already drafted):
- **Story ID:** {slug}
- **Story Title:** {{story_title}}
- **Story File:** `story-{slug}.md`
- **Status:** Draft (needs review before development)
- **Action:** User reviews drafted story, then runs SM agent `story-ready` workflow to approve
#### IN PROGRESS (Approved for Development)
Leave empty initially:
(Story will be moved here by SM agent `story-ready` workflow after user approves story-{slug}.md)
#### DONE (Completed Stories)
Initialize empty table:
| Story ID | File | Completed Date | Points |
| ---------- | ---- | -------------- | ------ |
| (none yet) | | | |
**Total completed:** 0 stories
**Total points completed:** 0 points
<action>Add to Artifacts Generated table:</action>
```
| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} |
| story-{slug}.md | Draft | {dev_story_location}/story-{slug}.md | {{date}} |
```
<action>Update "Next Action Required":</action>
```
**What to do next:** Review drafted story-{slug}.md, then mark it ready for development
**Command to run:** Load SM agent and run 'story-ready' workflow (confirms story-{slug}.md is ready)
**Agent to load:** bmad/bmm/agents/sm.md
```
<action>Add to Decision Log:</action>
```
- **{{date}}**: Level 0 tech-spec and story generation completed. Skipping Phase 3 (solutioning) - moving directly to Phase 4 (implementation). Single story (story-{slug}.md) drafted and ready for review.
```
<action>Save bmm-workflow-status.md</action>
<output>Story queue initialized with single story: {slug}</output>
</step>

View File

@@ -194,109 +194,23 @@ Epic: Icon Reliability
</step>
<step n="6" goal="Update bmm-workflow-status and populate backlog for Phase 4">
<step n="6" goal="Update status and populate story backlog">
<action>Open {output_folder}/bmm-workflow-status.md</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: tech-spec</param>
<param>populate_stories_from: {epics_output_file}</param>
</invoke-workflow>
<action>Update "Workflow Status Tracker" section:</action>
<check if="success == true">
<output>✅ Status updated! Loaded {{total_stories}} stories from epics.</output>
<output>Next: {{next_workflow}} ({{next_agent}} agent)</output>
</check>
- Set current_phase = "4-Implementation" (Level 1 skips Phase 3)
- Set current_workflow = "tech-spec (Level 1 - epic and stories generation complete, ready for implementation)"
- Check "2-Plan" checkbox in Phase Completion Status
- Set progress_percentage = 40% (planning complete, skipping solutioning)
<action>Update Development Queue section:</action>
<action>Generate story sequence list based on story_count:</action>
{{#if story_count == 2}}
- Set STORIES_SEQUENCE = "[{epic_slug}-1, {epic_slug}-2]"
{{/if}}
{{#if story_count == 3}}
- Set STORIES_SEQUENCE = "[{epic_slug}-1, {epic_slug}-2, {epic_slug}-3]"
{{/if}}
- Set TODO_STORY = "{epic_slug}-1"
- Set TODO_TITLE = "{{story_1_title}}"
- Set IN_PROGRESS_STORY = ""
- Set IN_PROGRESS_TITLE = ""
- Set STORIES_DONE = "[]"
<action>Populate story backlog in "### Implementation Progress (Phase 4 Only)" section:</action>
#### BACKLOG (Not Yet Drafted)
**Ordered story sequence - populated at Phase 4 start:**
| Epic | Story | ID | Title | File |
| ---- | ----- | --- | ----- | ---- |
{{#if story_2}}
| 1 | 2 | {epic_slug}-2 | {{story_2_title}} | story-{epic_slug}-2.md |
{{/if}}
{{#if story_3}}
| 1 | 3 | {epic_slug}-3 | {{story_3_title}} | story-{epic_slug}-3.md |
{{/if}}
**Total in backlog:** {{story_count - 1}} stories
**NOTE:** Level 1 uses slug-based IDs like "{epic_slug}-1", "{epic_slug}-2" instead of numeric "1.1", "1.2"
#### TODO (Needs Drafting)
Initialize with FIRST story (already drafted):
- **Story ID:** {epic_slug}-1
- **Story Title:** {{story_1_title}}
- **Story File:** `story-{epic_slug}-1.md`
- **Status:** Draft (needs review before development)
- **Action:** User reviews drafted story, then runs SM agent `story-ready` workflow to approve
#### IN PROGRESS (Approved for Development)
Leave empty initially:
(Story will be moved here by SM agent `story-ready` workflow after user approves story-{epic_slug}-1.md)
#### DONE (Completed Stories)
Initialize empty table:
| Story ID | File | Completed Date | Points |
| ---------- | ---- | -------------- | ------ |
| (none yet) | | | |
**Total completed:** 0 stories
**Total points completed:** 0 points
<action>Add to Artifacts Generated table:</action>
```
| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} |
| epics.md | Complete | {output_folder}/epics.md | {{date}} |
| story-{epic_slug}-1.md | Draft | {dev_story_location}/story-{epic_slug}-1.md | {{date}} |
| story-{epic_slug}-2.md | Draft | {dev_story_location}/story-{epic_slug}-2.md | {{date}} |
{{#if story_3}}
| story-{epic_slug}-3.md | Draft | {dev_story_location}/story-{epic_slug}-3.md | {{date}} |
{{/if}}
```
<action>Update "Next Action Required":</action>
```
**What to do next:** Review drafted story-{epic_slug}-1.md, then mark it ready for development
**Command to run:** Load SM agent and run 'story-ready' workflow (confirms story-{epic_slug}-1.md is ready)
**Agent to load:** bmad/bmm/agents/sm.md
```
<action>Add to Decision Log:</action>
```
- **{{date}}**: Level 1 tech-spec and epic/stories generation completed. {{story_count}} stories created. Skipping Phase 3 (solutioning) - moving directly to Phase 4 (implementation). Story backlog populated. First story (story-{epic_slug}-1.md) drafted and ready for review.
```
<action>Save bmm-workflow-status.md</action>
<check if="success == false">
<output>⚠️ Status update failed: {{error}}</output>
</check>
</step>

View File

@@ -390,17 +390,15 @@ Select option (1-3):</ask>
<step n="12" goal="Update status if tracking enabled">
<check if="tracking_mode == true">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: ux</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "ux - Complete"</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed UX workflow. Created bmm-ux-spec.md with comprehensive UX/UI specifications."</action>
<action>Save {{status_file_path}}</action>
<output>Status tracking updated.</output>
<check if="success == true">
<output>✅ Status updated! Next: {{next_workflow}}</output>
</check>
</check>
</step>

View File

@@ -417,27 +417,22 @@ The document MUST be optimized for LLM consumption:
<step n="12" goal="Update status and complete">
<action>Load {{status_file_path}}</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: solution-architecture</param>
<param>populate_stories_from: {epics_file}</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "solution-architecture - Complete"</action>
<check if="success == true">
<output>✅ Status updated! Loaded {{total_stories}} stories from epics.</output>
<output>Next: {{next_workflow}} ({{next_agent}} agent)</output>
<output>Phase 3 complete!</output>
</check>
<template-output file="{{status_file_path}}">phase_3_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 15% (solution-architecture is a major workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed solution-architecture workflow. Generated bmm-solution-architecture.md, bmm-cohesion-check-report.md, and {{epic_count}} tech-spec files. Populated story backlog with {{total_story_count}} stories. Phase 3 complete."</action>
<template-output file="{{status_file_path}}">STORIES_SEQUENCE</template-output>
<action>Populate with ordered list of all stories from epics</action>
<template-output file="{{status_file_path}}">TODO_STORY</template-output>
<action>Set to: "{{first_story_id}}"</action>
<action>Save {{status_file_path}}</action>
<check if="success == false">
<output>⚠️ Status update failed: {{error}}</output>
</check>
<output>**✅ Solution Architecture Complete, {user_name}!**

View File

@@ -1,6 +1,6 @@
<!-- BMAD BMM Tech Spec Workflow Instructions (v6) -->
````xml
```xml
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language}</critical>
@@ -130,25 +130,15 @@ What would you like to do?</ask>
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: tech-spec</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "tech-spec (Epic {{epic_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "tech-spec (Epic {{epic_id}}: {{epic_title}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (tech-spec generates one epic spec)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed tech-spec for Epic {{epic_id}} ({{epic_title}}). Tech spec file: {{default_output_file}}. This is a JIT workflow that can be run multiple times for different epics. Next: Continue with remaining epics or proceed to Phase 4 implementation.
```
<template-output file="{{status_file_path}}">planned_workflow</template-output>
<action>Mark "tech-spec (Epic {{epic_id}})" as complete in the planned workflow table</action>
<check if="success == true">
<output>✅ Status updated for Epic {{epic_id}} tech-spec</output>
</check>
<output>**✅ Tech Spec Generated Successfully, {user_name}!**
@@ -190,4 +180,4 @@ To track progress across workflows, run `workflow-status` first.
</step>
</workflow>
````
```

View File

@@ -1,6 +1,6 @@
# Create Story - Workflow Instructions (Spec-compliant, non-interactive by default)
````xml
```xml
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
@@ -109,23 +109,15 @@
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: set_current_workflow</param>
<param>workflow_name: create-story</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "create-story (Story {{story_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "create-story (Story {{story_id}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} * 2 (create-story weight is ~2% per story)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed create-story for Story {{story_id}} ({{story_title}}). Story file: {{story_file}}. Status: Draft (needs review via story-ready). Next: Review and approve story.
```
<check if="success == true">
<output>✅ Status updated: Story {{story_id}} drafted</output>
</check>
<output>**✅ Story Created Successfully, {user_name}!**
@@ -163,4 +155,4 @@ To track progress across workflows, run `workflow-status` first.
</step>
</workflow>
````
```

View File

@@ -1,6 +1,6 @@
# Develop Story - Workflow Instructions
````xml
```xml
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
@@ -111,23 +111,15 @@
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: set_current_workflow</param>
<param>workflow_name: dev-story</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "dev-story (Story {{current_story_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "dev-story (Story {{current_story_id}}) - Complete (Ready for Review)"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} * 5 (dev-story weight is ~5% per story - largest weight)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed dev-story for Story {{current_story_id}} ({{current_story_title}}). All tasks complete, tests passing. Story status: Ready for Review. Next: User reviews and runs story-approved when satisfied with implementation.
```
<check if="success == true">
<output>✅ Status updated: Story {{current_story_id}} ready for review</output>
</check>
<output>**✅ Story Implementation Complete, {user_name}!**
@@ -167,4 +159,4 @@ To track progress across workflows, run `workflow-status` first.
</step>
</workflow>
````
```

View File

@@ -385,23 +385,16 @@ See you at sprint planning once prep work is done!"
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: retrospective</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "retrospective (Epic {{completed_number}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "retrospective (Epic {{completed_number}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment by: 5% (optional epic boundary workflow)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed retrospective for Epic {{completed_number}}. Action items: {{action_count}}. Preparation tasks: {{prep_task_count}}. Critical path items: {{critical_count}}. Next: Execute preparation sprint before beginning Epic {{next_number}}.
```
<check if="success == true">
<output>✅ Status updated: Retrospective complete for Epic {{completed_number}}</output>
</check>
</check>
<output>**✅ Retrospective Complete**

View File

@@ -1,6 +1,6 @@
# Senior Developer Review - Workflow Instructions
````xml
```xml
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
@@ -196,23 +196,15 @@ Running in standalone mode - no progress tracking.</output>
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: set_current_workflow</param>
<param>workflow_name: review-story</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "review-story (Story {{epic_num}}.{{story_num}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "review-story (Story {{epic_num}}.{{story_num}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} * 2 (review-story ~2% per story)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed review-story for Story {{epic_num}}.{{story_num}}. Review outcome: {{outcome}}. Action items: {{action_item_count}}. Next: Address review feedback if needed, then continue with story-approved when ready.
```
<check if="success == true">
<output>✅ Status updated: Story {{epic_num}}.{{story_num}} reviewed</output>
</check>
<output>**✅ Story Review Complete, {user_name}!**
@@ -251,4 +243,4 @@ Note: Running in standalone mode (no status file).
</step>
</workflow>
````
```

View File

@@ -62,158 +62,31 @@ Find "## Dev Agent Record" section and add:
</step>
<step n="3" goal="Move story IN PROGRESS → DONE, advance the queue">
<step n="3" goal="Update status file - advance story queue">
<action>Open {output_folder}/bmm-workflow-status.md</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_story</param>
</invoke-workflow>
<action>Update "#### DONE (Completed Stories)" section:</action>
Add the completed story to the table:
| Story ID | File | Completed Date | Points |
| -------------------- | ---------------------- | -------------- | ------------------------ |
| {{current_story_id}} | {{current_story_file}} | {{date}} | {{current_story_points}} |
... (existing done stories)
**Total completed:** {{done_count + 1}} stories
**Total points completed:** {{done_points + current_story_points}} points
<action>Update "#### IN PROGRESS (Approved for Development)" section:</action>
<check if="todo_story exists">
Move the TODO story to IN PROGRESS:
#### IN PROGRESS (Approved for Development)
- **Story ID:** {{todo_story_id}}
- **Story Title:** {{todo_story_title}}
- **Story File:** `{{todo_story_file}}`
- **Story Status:** Ready (OR Draft if not yet reviewed)
- **Context File:** `{{context_file_path}}` (if exists, otherwise note "Context not yet generated")
- **Action:** DEV should run `dev-story` workflow to implement this story
</check>
<check if="todo_story does NOT exist">
Mark IN PROGRESS as empty:
#### IN PROGRESS (Approved for Development)
(No story currently in progress - all stories complete!)
<check if="success == false">
<output>⚠️ Failed to update status: {{error}}</output>
<output>Story file was updated, but status file update failed.</output>
</check>
<action>Update "#### TODO (Needs Drafting)" section:</action>
<check if="next_backlog_story exists">
Move the first BACKLOG story to TODO:
#### TODO (Needs Drafting)
- **Story ID:** {{next_backlog_story_id}}
- **Story Title:** {{next_backlog_story_title}}
- **Story File:** `{{next_backlog_story_file}}`
- **Status:** Not created OR Draft (needs review)
- **Action:** SM should run `create-story` workflow to draft this story
<check if="success == true">
<output>Status updated: Story {{completed_story}} marked done.</output>
<check if="all_complete == true">
<output>🎉 All stories complete! Phase 4 done!</output>
</check>
<check if="all_complete == false">
<output>{{stories_remaining}} stories remaining.</output>
</check>
<check if="next_backlog_story does NOT exist">
Mark TODO as empty:
#### TODO (Needs Drafting)
(No more stories to draft - all stories are drafted or complete)
</check>
<action>Update "#### BACKLOG (Not Yet Drafted)" section:</action>
Remove the first story from the BACKLOG table (the one we just moved to TODO).
If BACKLOG had 1 story and is now empty:
| Epic | Story | ID | Title | File |
| ----------------------------- | ----- | --- | ----- | ---- |
| (empty - all stories drafted) | | | | |
**Total in backlog:** 0 stories
<action>Update story counts in "#### Epic/Story Summary" section:</action>
- Increment done_count by 1
- Increment done_points by {{current_story_points}}
- Decrement backlog_count by 1 (if story was moved from BACKLOG → TODO)
- Update epic breakdown:
- Increment epic_done_stories for the current story's epic
<check if="all stories complete">
<action>Check "4-Implementation" checkbox in "### Phase Completion Status"</action>
<action>Set progress_percentage = 100%</action>
</check>
</step>
<step n="4" goal="Update Decision Log, Progress, and Next Action">
<action>Add to "## Decision Log" section:</action>
```
- **{{date}}**: Story {{current_story_id}} ({{current_story_title}}) approved and marked done by DEV agent. Moved from IN PROGRESS → DONE. {{#if todo_story}}Story {{todo_story_id}} moved from TODO → IN PROGRESS.{{/if}} {{#if next_backlog_story}}Story {{next_backlog_story_id}} moved from BACKLOG → TODO.{{/if}}
```
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "story-approved (Story {{current_story_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "story-approved (Story {{current_story_id}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} \* 1 (story-approved weight is ~1% per story)</action>
<check if="all stories complete">
<action>Set progress_percentage = 100%</action>
</check>
<action>Update "### Next Action Required" section:</action>
<check if="todo_story exists">
```
**What to do next:** {{#if todo_story_status == 'Draft'}}Review drafted story {{todo_story_id}}, then mark it ready{{else}}Implement story {{todo_story_id}}{{/if}}
**Command to run:** {{#if todo_story_status == 'Draft'}}Load SM agent and run 'story-ready' workflow{{else}}Run 'dev-story' workflow to implement{{/if}}
**Agent to load:** {{#if todo_story_status == 'Draft'}}bmad/bmm/agents/sm.md{{else}}bmad/bmm/agents/dev.md{{/if}}
```
</check>
<check if="todo_story does NOT exist AND backlog not empty">
```
**What to do next:** Draft the next story ({{next_backlog_story_id}})
**Command to run:** Load SM agent and run 'create-story' workflow
**Agent to load:** bmad/bmm/agents/sm.md
```
</check>
<check if="all stories complete">
```
**What to do next:** All stories complete! Run retrospective workflow or close project.
**Command to run:** Load PM agent and run 'retrospective' workflow
**Agent to load:** bmad/bmm/agents/pm.md
```
</check>
<action>Save bmm-workflow-status.md</action>
</step>
<step n="5" goal="Confirm completion to user">
<step n="4" goal="Confirm completion to user">
<action>Display summary</action>
@@ -225,6 +98,7 @@ If BACKLOG had 1 story and is now empty:
{{#if next_backlog_story}}✅ Next story moved: BACKLOG → TODO ({{next_backlog_story_id}}: {{next_backlog_story_title}}){{/if}}
**Completed Story:**
- **ID:** {{current_story_id}}
- **Title:** {{current_story_title}}
- **File:** `{{current_story_file}}`
@@ -232,6 +106,7 @@ If BACKLOG had 1 story and is now empty:
- **Completed:** {{date}}
**Progress Summary:**
- **Stories Completed:** {{done_count}} / {{total_stories}}
- **Points Completed:** {{done_points}} / {{total_points}}
- **Progress:** {{progress_percentage}}%
@@ -242,13 +117,15 @@ If BACKLOG had 1 story and is now empty:
Congratulations! You have completed all stories for this project.
**Next Steps:**
1. Run `retrospective` workflow with PM agent to review the project
2. Close out the project
3. Celebrate! 🎊
{{/if}}
{{/if}}
{{#if todo_story}}
**Next Story (IN PROGRESS):**
- **ID:** {{todo_story_id}}
- **Title:** {{todo_story_title}}
- **File:** `{{todo_story_file}}`
@@ -256,24 +133,27 @@ Congratulations! You have completed all stories for this project.
**Next Steps:**
{{#if todo_story_status == 'Draft'}}
1. Review the drafted story {{todo_story_file}}
2. Load SM agent and run `story-ready` workflow to approve it
3. Then return to DEV agent to implement
{{else}}
1. Stay with DEV agent and run `dev-story` workflow
2. Implement story {{todo_story_id}}
{{/if}}
{{/if}}
{{else}}
4. Stay with DEV agent and run `dev-story` workflow
5. Implement story {{todo_story_id}}
{{/if}}
{{/if}}
{{#if backlog_not_empty AND todo_empty}}
**Next Story (TODO):**
- **ID:** {{next_backlog_story_id}}
- **Title:** {{next_backlog_story_title}}
**Next Steps:**
1. Load SM agent
2. Run `create-story` workflow to draft story {{next_backlog_story_id}}
{{/if}}
{{/if}}
</step>

View File

@@ -1,6 +1,6 @@
<!-- BMAD BMM Story Context Assembly Instructions (v6) -->
````xml
```xml
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
@@ -120,23 +120,15 @@
<action>Find the most recent file (by date in filename)</action>
<check if="status file exists">
<action>Load the status file</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: set_current_workflow</param>
<param>workflow_name: story-context</param>
</invoke-workflow>
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "story-context (Story {{story_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "story-context (Story {{story_id}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} * 1 (story-context weight is ~1% per story)</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry:</action>
```
- **{{date}}**: Completed story-context for Story {{story_id}} ({{story_title}}). Context file: {{default_output_file}}. Next: DEV agent should run dev-story to implement.
```
<check if="success == true">
<output>✅ Status updated: Context generated for Story {{story_id}}</output>
</check>
<output>**✅ Story Context Generated Successfully, {user_name}!**
@@ -177,4 +169,4 @@ To track progress across workflows, run `workflow-status` first.
</step>
</workflow>
````
```

View File

@@ -51,94 +51,28 @@ Run `workflow-status` to check your project state.</output>
</step>
<step n="3" goal="Move story from TODO → IN PROGRESS in status file">
<step n="3" goal="Update status file - move story TODO → IN PROGRESS">
<action>Open {output_folder}/bmm-workflow-status.md</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: start_story</param>
</invoke-workflow>
<action>Update "#### TODO (Needs Drafting)" section:</action>
<check if="success == false">
<output>⚠️ Failed to update status: {{error}}</output>
<output>Story file was updated, but status file update failed.</output>
</check>
Read the BACKLOG section to get the next story. If BACKLOG is empty:
#### TODO (Needs Drafting)
(No more stories to draft - all stories are drafted or complete)
If BACKLOG has stories, move the first BACKLOG story to TODO:
#### TODO (Needs Drafting)
- **Story ID:** {{next_backlog_story_id}}
- **Story Title:** {{next_backlog_story_title}}
- **Story File:** `{{next_backlog_story_file}}`
- **Status:** Not created OR Draft (needs review)
- **Action:** SM should run `create-story` workflow to draft this story
<action>Update "#### IN PROGRESS (Approved for Development)" section:</action>
Move the TODO story here:
#### IN PROGRESS (Approved for Development)
- **Story ID:** {{todo_story_id}}
- **Story Title:** {{todo_story_title}}
- **Story File:** `{{todo_story_file}}`
- **Story Status:** Ready
- **Context File:** `{{context_file_path}}` (if exists, otherwise note "Context not yet generated")
- **Action:** DEV should run `dev-story` workflow to implement this story
<action>Update "#### BACKLOG (Not Yet Drafted)" section:</action>
Remove the first story from the BACKLOG table (the one we just moved to TODO).
If BACKLOG had 1 story and is now empty:
| Epic | Story | ID | Title | File |
| ----------------------------- | ----- | --- | ----- | ---- |
| (empty - all stories drafted) | | | | |
**Total in backlog:** 0 stories
<action>Update story counts in "#### Epic/Story Summary" section:</action>
- Decrement backlog_count by 1 (if story was moved from BACKLOG → TODO)
- Keep in_progress_count = 1
- Keep todo_count = 1 or 0 (depending on if there's a next story)
<check if="success == true">
<output>Status updated: Story {{in_progress_story}} ready for development.</output>
<check if="next_todo != ''">
<output>Next TODO: {{next_todo}}</output>
</check>
</check>
</step>
<step n="4" goal="Update Decision Log, Progress, and Next Action">
<action>Add to "## Decision Log" section:</action>
```
- **{{date}}**: Story {{todo_story_id}} ({{todo_story_title}}) marked ready for development by SM agent. Moved from TODO → IN PROGRESS. {{#if next_story}}Next story {{next_story_id}} moved from BACKLOG → TODO.{{/if}}
```
<template-output file="{{status_file_path}}">current_step</template-output>
<action>Set to: "story-ready (Story {{todo_story_id}})"</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "story-ready (Story {{todo_story_id}}) - Complete"</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
<action>Increment by: {{per_story_weight}} \* 1 (story-ready weight is ~1% per story)</action>
<action>Update "### Next Action Required" section:</action>
```
**What to do next:** Generate context for story {{todo_story_id}}, then implement it
**Command to run:** Run 'story-context' workflow to generate implementation context (or skip to dev-story)
**Agent to load:** bmad/bmm/agents/sm.md (for story-context) OR bmad/bmm/agents/dev.md (for dev-story)
```
<action>Save bmm-workflow-status.md</action>
</step>
<step n="5" goal="Confirm completion to user">
<step n="4" goal="Confirm completion to user">
<action>Display summary</action>

View File

@@ -126,6 +126,84 @@ With the new service call:
## Available Modes
### `update` Mode ⭐ NEW - Centralized Status Updates
- **Purpose**: Centralized status file updates - **NO MORE manual template-output hackery!**
- **Parameters**: `action` + action-specific params
- **Returns**: `success`, action-specific outputs
#### Available Actions:
**1. complete_workflow** - Mark workflow done, advance to next in path
```xml
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: prd</param>
<param>populate_stories_from: {output_folder}/bmm-epics.md</param> <!-- optional -->
</invoke-workflow>
<check if="success == true">
<output>PRD complete! Next: {{next_workflow}} ({{next_agent}} agent)</output>
</check>
```
**2. populate_stories** - Load story queue from epics.md
```xml
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: populate_stories</param>
<param>epics_file: {output_folder}/bmm-epics.md</param>
</invoke-workflow>
<check if="success == true">
<output>Loaded {{total_stories}} stories. First: {{first_story}}</output>
</check>
```
**3. start_story** - Move TODO → IN PROGRESS
```xml
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: start_story</param>
</invoke-workflow>
<check if="success == true">
<output>Started: {{in_progress_story}}. Next TODO: {{next_todo}}</output>
</check>
```
**4. complete_story** - Move IN PROGRESS → DONE, advance queue
```xml
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_story</param>
</invoke-workflow>
<check if="success == true">
<output>Completed: {{completed_story}}. {{stories_remaining}} remaining.</output>
<check if="all_complete == true">
<output>🎉 All stories complete!</output>
</check>
</check>
```
**5. set_current_workflow** - Manual override (rarely needed)
```xml
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: set_current_workflow</param>
<param>workflow_name: tech-spec</param>
</invoke-workflow>
```
---
### `validate` Mode
- **Purpose**: Check if this workflow should run
@@ -167,11 +245,73 @@ With the new service call:
3. Gradually migrate others as they're updated
4. Old workflows continue to work unchanged
## Before & After: The Power of Update Mode
### OLD WAY (PRD workflow) - 40+ lines of pollution:
```xml
<step n="10" goal="Update status and complete">
<action>Load {{status_file_path}}</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "prd - Complete"</action>
<template-output file="{{status_file_path}}">phase_2_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed PRD workflow..."</action>
<action>Populate STORIES_SEQUENCE from epics.md story list</action>
<action>Count total stories and update story counts</action>
<action>Save {{status_file_path}}</action>
</step>
```
### NEW WAY - 6 clean lines:
```xml
<step n="10" goal="Mark PRD complete">
<invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
<param>mode: update</param>
<param>action: complete_workflow</param>
<param>workflow_name: prd</param>
<param>populate_stories_from: {output_folder}/bmm-epics.md</param>
</invoke-workflow>
<output>PRD complete! Next: {{next_workflow}}</output>
</step>
```
**Benefits:**
- ✅ No manual file manipulation
- ✅ No template-output pollution
- ✅ Centralized logic handles path navigation
- ✅ Story population happens automatically
- ✅ Status file stays clean (just key-value pairs)
---
## Migration Priority
**High Priority (Complex Status Updates):**
1. Phase 2: prd, gdd, tech-spec - populate stories + complete workflow
2. Phase 4: story-approved, story-ready - complex queue management
**Medium Priority (Simple Completions):** 3. Phase 1: product-brief, brainstorm-project, research 4. Phase 3: solution-architecture, tech-spec
**Low Priority (Minimal/No Updates):** 5. Phase 4: create-story, dev-story - mostly just read status
---
## Next Steps
To integrate into your workflow:
To migrate a workflow:
1. Replace your Step 0 with appropriate service call
2. Remove duplicate status checking logic
3. Use returned values for workflow decisions
4. Update status file at completion (if status_exists == true)
1. **Step 0**: Keep `validate` or `data` mode calls (for reading)
2. **Final Step**: Replace all `template-output` with single `update` mode call
3. **Test**: Verify status file stays clean (no prose pollution)
4. **Delete**: Remove 30-100 lines of status manipulation code 🎉

View File

@@ -2,7 +2,7 @@
<critical>The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml</critical>
<critical>This workflow operates in multiple modes: interactive (default), validate, data, init-check</critical>
<critical>This workflow operates in multiple modes: interactive (default), validate, data, init-check, update</critical>
<critical>Other workflows can call this as a service to avoid duplicating status logic</critical>
<workflow>
@@ -26,6 +26,10 @@
<check if="mode == init-check">
<action>Jump to Step 30 for simple init check</action>
</check>
<check if="mode == update">
<action>Jump to Step 40 for status update service</action>
</check>
</step>
<step n="1" goal="Check for status file">
@@ -263,4 +267,226 @@ Your choice:</ask>
<action>Return immediately to calling workflow</action>
</step>
<step n="40" goal="Update mode - Centralized status file updates">
<action>Read {output_folder}/bmm-workflow-status.md</action>
<check if="status file not found">
<template-output>success = false</template-output>
<template-output>error = "No status file found. Cannot update."</template-output>
<action>Return to calling workflow</action>
</check>
<check if="status file found">
<action>Parse all current values from status file</action>
<action>Load workflow path file from WORKFLOW_PATH field</action>
<action>Check {{action}} parameter to determine update type</action>
<!-- ============================================= -->
<!-- ACTION: complete_workflow -->
<!-- ============================================= -->
<check if="action == complete_workflow">
<action>Get {{workflow_name}} parameter (required)</action>
<action>Mark workflow complete:</action>
- Update CURRENT_WORKFLOW to "{{workflow_name}} - Complete"
<action>Find {{workflow_name}} in loaded path YAML</action>
<action>Determine next workflow from path sequence</action>
<action>Update Next Action fields:</action>
- NEXT_ACTION: Description from next workflow in path
- NEXT_COMMAND: Command for next workflow
- NEXT_AGENT: Agent for next workflow
- CURRENT_WORKFLOW: Set to next workflow name (or "Complete" if no more)
- CURRENT_AGENT: Set to next agent
<action>Check if phase complete:</action>
- If {{workflow_name}} is last required workflow in current phase
- Update PHASE_X_COMPLETE to true
- Update CURRENT_PHASE to next phase (if applicable)
<check if="populate_stories_from parameter provided">
<action>Trigger story population (see populate_stories action below)</action>
</check>
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
<template-output>next_workflow = {{determined next workflow}}</template-output>
<template-output>next_agent = {{determined next agent}}</template-output>
<template-output>phase_complete = {{true/false}}</template-output>
</check>
<!-- ============================================= -->
<!-- ACTION: populate_stories -->
<!-- ============================================= -->
<check if="action == populate_stories">
<action>Get {{epics_file}} parameter (required - path to epics.md)</action>
<action>Read {{epics_file}} completely</action>
<action>Parse all story definitions from epic sections</action>
<action>Extract story IDs in sequential order (e.g., story-1.1, story-1.2, story-2.1...)</action>
<action>Extract story titles for each ID</action>
<action>Build ordered story list:</action>
- Format: JSON array or comma-separated
- Example: ["story-1.1", "story-1.2", "story-1.3", "story-2.1"]
<action>Update status file:</action>
- STORIES_SEQUENCE: {{ordered_story_list}}
- TODO_STORY: {{first_story_id}}
- TODO_TITLE: {{first_story_title}}
- IN_PROGRESS_STORY: (empty)
- IN_PROGRESS_TITLE: (empty)
- STORIES_DONE: []
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
<template-output>total_stories = {{count}}</template-output>
<template-output>first_story = {{first_story_id}}</template-output>
</check>
<!-- ============================================= -->
<!-- ACTION: start_story (TODO → IN PROGRESS) -->
<!-- ============================================= -->
<check if="action == start_story">
<action>Get current TODO_STORY from status file</action>
<check if="TODO_STORY is empty">
<template-output>success = false</template-output>
<template-output>error = "No TODO story to start"</template-output>
<action>Return to calling workflow</action>
</check>
<action>Move TODO → IN PROGRESS:</action>
- IN_PROGRESS_STORY: {{current TODO_STORY}}
- IN_PROGRESS_TITLE: {{current TODO_TITLE}}
<action>Find next story in STORIES_SEQUENCE after current TODO_STORY</action>
<check if="next story found">
<action>Move next story to TODO:</action>
- TODO_STORY: {{next_story_id}}
- TODO_TITLE: {{next_story_title}}
</check>
<check if="no next story">
<action>Clear TODO:</action>
- TODO_STORY: (empty)
- TODO_TITLE: (empty)
</check>
<action>Update NEXT_ACTION and NEXT_COMMAND:</action>
- NEXT_ACTION: "Implement story {{IN_PROGRESS_STORY}}"
- NEXT_COMMAND: "dev-story"
- NEXT_AGENT: "dev"
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
<template-output>in_progress_story = {{IN_PROGRESS_STORY}}</template-output>
<template-output>next_todo = {{TODO_STORY or empty}}</template-output>
</check>
<!-- ============================================= -->
<!-- ACTION: complete_story (IN PROGRESS → DONE) -->
<!-- ============================================= -->
<check if="action == complete_story">
<action>Get current IN_PROGRESS_STORY from status file</action>
<check if="IN_PROGRESS_STORY is empty">
<template-output>success = false</template-output>
<template-output>error = "No IN PROGRESS story to complete"</template-output>
<action>Return to calling workflow</action>
</check>
<action>Move IN PROGRESS → DONE:</action>
- Add {{IN_PROGRESS_STORY}} to STORIES_DONE list
<action>Move TODO → IN PROGRESS:</action>
- IN_PROGRESS_STORY: {{current TODO_STORY}}
- IN_PROGRESS_TITLE: {{current TODO_TITLE}}
<action>Find next story in STORIES_SEQUENCE after current TODO_STORY</action>
<check if="next story found">
<action>Move next story to TODO:</action>
- TODO_STORY: {{next_story_id}}
- TODO_TITLE: {{next_story_title}}
</check>
<check if="no next story">
<action>Clear TODO:</action>
- TODO_STORY: (empty)
- TODO_TITLE: (empty)
</check>
<check if="all stories complete (STORIES_DONE == STORIES_SEQUENCE)">
<action>Mark Phase 4 complete:</action>
- PHASE_4_COMPLETE: true
- CURRENT_WORKFLOW: "Complete"
- NEXT_ACTION: "All stories complete!"
- NEXT_COMMAND: (empty)
</check>
<check if="stories remain">
<action>Update NEXT_ACTION:</action>
- If IN_PROGRESS_STORY exists: "Implement story {{IN_PROGRESS_STORY}}"
- If only TODO_STORY exists: "Draft story {{TODO_STORY}}"
- NEXT_COMMAND: "dev-story" or "create-story"
</check>
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
<template-output>completed_story = {{completed_story_id}}</template-output>
<template-output>stories_remaining = {{count}}</template-output>
<template-output>all_complete = {{true/false}}</template-output>
</check>
<!-- ============================================= -->
<!-- ACTION: set_current_workflow (manual override) -->
<!-- ============================================= -->
<check if="action == set_current_workflow">
<action>Get {{workflow_name}} parameter (required)</action>
<action>Get {{agent_name}} parameter (optional)</action>
<action>Update current workflow:</action>
- CURRENT_WORKFLOW: {{workflow_name}}
- CURRENT_AGENT: {{agent_name or infer from path}}
<action>Find {{workflow_name}} in path to determine next:</action>
- NEXT_ACTION: Next workflow description
- NEXT_COMMAND: Next workflow command
- NEXT_AGENT: Next workflow agent
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
</check>
<!-- ============================================= -->
<!-- Unknown action -->
<!-- ============================================= -->
<check if="action not recognized">
<template-output>success = false</template-output>
<template-output>error = "Unknown action: {{action}}. Valid actions: complete_workflow, populate_stories, start_story, complete_story, set_current_workflow"</template-output>
</check>
</check>
<action>Return control to calling workflow with template outputs</action>
</step>
</workflow>