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

@@ -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>