diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md b/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md index eb9ec7ad..5002f54f 100644 --- a/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md @@ -68,18 +68,15 @@ - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: brainstorm-game + - current_workflow - Set to: "brainstorm-game - Complete" - - progress_percentage - Increment by: 5% (optional Phase 1 workflow) - - decisions_log - Add entry: "- **{{date}}**: Completed brainstorm-game workflow. Generated game brainstorming session results. Next: Review game ideas and consider research or game-brief workflows." - - Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} + **✅ Game Brainstorming Session Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md b/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md index 99e6af83..dc1013b1 100644 --- a/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md @@ -53,18 +53,15 @@ - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: brainstorm-project + - current_workflow - Set to: "brainstorm-project - Complete" - - progress_percentage - Increment by: 5% (optional Phase 1 workflow) - - decisions_log - Add entry: "- **{{date}}**: Completed brainstorm-project workflow. Generated brainstorming session results. Next: Review ideas and consider research or product-brief workflows." - - Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} + **✅ Brainstorming Session Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/1-analysis/document-project/instructions.md b/src/modules/bmm/workflows/1-analysis/document-project/instructions.md index c963e2a7..88693ac6 100644 --- a/src/modules/bmm/workflows/1-analysis/document-project/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/document-project/instructions.md @@ -179,18 +179,15 @@ Your choice [1/2/3]: - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: document-project + -current_workflow -Set to: "document-project - Complete" - -progress_percentage -Increment by: 10% - -decisions_log -Add entry: "- **{{date}}**: Completed document-project workflow ({{workflow_mode}} mode). Generated documentation in {output_folder}/." - -Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} + **✅ Document Project Workflow Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md b/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md index 7694b22f..35317a63 100644 --- a/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md @@ -310,18 +310,15 @@ This brief will serve as the primary input for creating the Game Design Document - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: game-brief + -current_workflow -Set to: "game-brief - Complete" - -progress_percentage -Increment by: 10% (optional Phase 1 workflow) - -decisions_log -Add entry: "- **{{date}}**: Completed game-brief workflow. Game brief document generated. Next: Proceed to plan-project workflow to create Game Design Document (GDD)." - -Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} + **✅ Game Brief Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md b/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md index ba9c99de..9312ec97 100644 --- a/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md @@ -274,18 +274,15 @@ This brief will serve as the primary input for creating the Product Requirements - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: product-brief + -current_workflow -Set to: "product-brief - Complete" - -progress_percentage -Increment by: 10% (optional Phase 1 workflow) - -decisions_log -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)." - -Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} + **✅ Product Brief Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md b/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md index 44300437..8e832167 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md @@ -379,23 +379,15 @@ Select option (1-4): Find the most recent file (by date in filename) - Load the status file + + mode: update + action: complete_workflow + workflow_name: research + -current_step -Set to: "research (deep-prompt)" - -current_workflow -Set to: "research (deep-prompt) - Complete" - -progress_percentage -Increment by: 5% (optional Phase 1 workflow) - -decisions_log -Add entry: - -``` -- **{{date}}**: Completed research workflow (deep-prompt mode). Research prompt generated and saved. Next: Execute prompt with AI platform or continue with plan-project workflow. -``` + + Status updated! Next: {{next_workflow}} + **✅ Deep Research Prompt Generated** diff --git a/src/modules/bmm/workflows/1-analysis/research/instructions-market.md b/src/modules/bmm/workflows/1-analysis/research/instructions-market.md index 346aa975..748a81e0 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-market.md @@ -559,23 +559,16 @@ Create compelling executive summary with: Find the most recent file (by date in filename) - Load the status file + + mode: update + action: complete_workflow + workflow_name: research + -current_step -Set to: "research ({{research_mode}})" - -current_workflow -Set to: "research ({{research_mode}}) - Complete" - -progress_percentage -Increment by: 5% (optional Phase 1 workflow) - -decisions_log -Add entry: - -``` -- **{{date}}**: Completed research workflow ({{research_mode}} mode). Research report generated and saved. Next: Review findings and consider product-brief or plan-project workflows. -``` + + Status updated! Next: {{next_workflow}} + + **✅ Research Complete ({{research_mode}} mode)** diff --git a/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md b/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md index b8563441..2078c4e9 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md @@ -447,23 +447,16 @@ Select option (1-5): Find the most recent file (by date in filename) - Load the status file + + mode: update + action: complete_workflow + workflow_name: research + -current_step -Set to: "research (technical)" - -current_workflow -Set to: "research (technical) - Complete" - -progress_percentage -Increment by: 5% (optional Phase 1 workflow) - -decisions_log -Add entry: - -``` -- **{{date}}**: Completed research workflow (technical mode). Technical research report generated and saved. Next: Review findings and consider plan-project workflow. -``` + + Status updated! Next: {{next_workflow}} + + **✅ Technical Research Complete** diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md b/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md index 630c35f5..4c7d1418 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md +++ b/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md @@ -326,24 +326,17 @@ For each {{placeholder}} in the fragment, elicit and capture that information. -Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: gdd + populate_stories_from: {epics_output_file} + -current_workflow -Set to: "gdd - Complete" - -phase_2_complete -Set to: true - -progress_percentage -Increment appropriately based on level - -decisions_log -Add entry: "- **{{date}}**: Completed GDD workflow. Created bmm-GDD.md and bmm-epics.md with full story breakdown." - -Populate STORIES_SEQUENCE from epics.md story list -Count total stories and update story counts - -Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} ({{next_agent}} agent) + Loaded {{total_stories}} stories from epics. + diff --git a/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md b/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md index 27b51065..218e9627 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md +++ b/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md @@ -542,17 +542,15 @@ Which would you like? - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: narrative + -current_workflow -Set to: "narrative - Complete" - -decisions_log -Add entry: "- **{{date}}**: Completed narrative workflow. Created bmm-narrative-design.md with detailed story and character documentation." - -Save {{status_file_path}} - -Status tracking updated. + + ✅ Status updated! Next: {{next_workflow}} + diff --git a/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md b/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md index b1f1a768..304a2a11 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +++ b/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md @@ -407,21 +407,17 @@ For each epic from the epic list, expand with full story details: -Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: prd + populate_stories_from: {epics_output_file} + -current_workflow -Set to: "prd - Complete" - -phase_2_complete -Set to: true - -decisions_log -Add entry: "- **{{date}}**: Completed PRD workflow. Created PRD.md and epics.md with full story breakdown." - -Populate STORIES_SEQUENCE from epics.md story list -Count total stories and update story counts - -Save {{status_file_path}} + + Status updated! Next: {{next_workflow}} ({{next_agent}} agent) + Loaded {{total_stories}} stories from epics. + **✅ PRD Workflow Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md index 44a6688a..636986e0 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +++ b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md @@ -98,91 +98,27 @@ - + -Open {output_folder}/bmm-workflow-status.md + + mode: update + action: complete_workflow + workflow_name: tech-spec + -Update "Workflow Status Tracker" section: + + ✅ Tech-spec complete! Next: {{next_workflow}} + -- 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) +Load {{status_file_path}} +Set STORIES_SEQUENCE: [{slug}] +Set TODO_STORY: {slug} +Set TODO_TITLE: {{story_title}} +Set IN_PROGRESS_STORY: (empty) +Set STORIES_DONE: [] +Save {{status_file_path}} -Update Development Queue section: - -- 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 = "[]" - -Initialize Phase 4 Implementation Progress section: - -#### 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 - -Add to Artifacts Generated table: - -``` -| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} | -| story-{slug}.md | Draft | {dev_story_location}/story-{slug}.md | {{date}} | -``` - -Update "Next Action Required": - -``` -**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 -``` - -Add to Decision Log: - -``` -- **{{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. -``` - -Save bmm-workflow-status.md +Story queue initialized with single story: {slug} diff --git a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md index c9a09667..258f3c33 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +++ b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md @@ -194,109 +194,23 @@ Epic: Icon Reliability - + -Open {output_folder}/bmm-workflow-status.md + + mode: update + action: complete_workflow + workflow_name: tech-spec + populate_stories_from: {epics_output_file} + -Update "Workflow Status Tracker" section: + + ✅ Status updated! Loaded {{total_stories}} stories from epics. + Next: {{next_workflow}} ({{next_agent}} agent) + -- 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) - -Update Development Queue section: - -Generate story sequence list based on story_count: -{{#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 = "[]" - -Populate story backlog in "### Implementation Progress (Phase 4 Only)" section: - -#### 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 - -Add to Artifacts Generated table: - -``` -| 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}} -``` - -Update "Next Action Required": - -``` -**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 -``` - -Add to Decision Log: - -``` -- **{{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. -``` - -Save bmm-workflow-status.md + + ⚠️ Status update failed: {{error}} + diff --git a/src/modules/bmm/workflows/2-plan-workflows/ux/instructions-ux.md b/src/modules/bmm/workflows/2-plan-workflows/ux/instructions-ux.md index 2084d13d..dc388ec6 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/ux/instructions-ux.md +++ b/src/modules/bmm/workflows/2-plan-workflows/ux/instructions-ux.md @@ -390,17 +390,15 @@ Select option (1-3): - Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: ux + -current_workflow -Set to: "ux - Complete" - -decisions_log -Add entry: "- **{{date}}**: Completed UX workflow. Created bmm-ux-spec.md with comprehensive UX/UI specifications." - -Save {{status_file_path}} - -Status tracking updated. + + ✅ Status updated! Next: {{next_workflow}} + diff --git a/src/modules/bmm/workflows/3-solutioning/instructions.md b/src/modules/bmm/workflows/3-solutioning/instructions.md index a453ee60..392667aa 100644 --- a/src/modules/bmm/workflows/3-solutioning/instructions.md +++ b/src/modules/bmm/workflows/3-solutioning/instructions.md @@ -417,27 +417,22 @@ The document MUST be optimized for LLM consumption: -Load {{status_file_path}} + + mode: update + action: complete_workflow + workflow_name: solution-architecture + populate_stories_from: {epics_file} + -current_workflow -Set to: "solution-architecture - Complete" + + ✅ Status updated! Loaded {{total_stories}} stories from epics. + Next: {{next_workflow}} ({{next_agent}} agent) + Phase 3 complete! + -phase_3_complete -Set to: true - -progress_percentage -Increment by: 15% (solution-architecture is a major workflow) - -decisions_log -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." - -STORIES_SEQUENCE -Populate with ordered list of all stories from epics - -TODO_STORY -Set to: "{{first_story_id}}" - -Save {{status_file_path}} + + ⚠️ Status update failed: {{error}} + **✅ Solution Architecture Complete, {user_name}!** diff --git a/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md b/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md index c5588162..8950763f 100644 --- a/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md +++ b/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md @@ -1,6 +1,6 @@ -````xml +```xml The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} @@ -130,25 +130,15 @@ What would you like to do? Find the most recent file (by date in filename) - Load the status file + + mode: update + action: complete_workflow + workflow_name: tech-spec + - current_step - Set to: "tech-spec (Epic {{epic_id}})" - - current_workflow - Set to: "tech-spec (Epic {{epic_id}}: {{epic_title}}) - Complete" - - progress_percentage - Increment by: 5% (tech-spec generates one epic spec) - - decisions_log - Add entry: - ``` - - **{{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. - ``` - - planned_workflow - Mark "tech-spec (Epic {{epic_id}})" as complete in the planned workflow table + + ✅ Status updated for Epic {{epic_id}} tech-spec + **✅ Tech Spec Generated Successfully, {user_name}!** @@ -190,4 +180,4 @@ To track progress across workflows, run `workflow-status` first. -```` +``` diff --git a/src/modules/bmm/workflows/4-implementation/create-story/instructions.md b/src/modules/bmm/workflows/4-implementation/create-story/instructions.md index ed127c87..bd4a7285 100644 --- a/src/modules/bmm/workflows/4-implementation/create-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/create-story/instructions.md @@ -1,6 +1,6 @@ # Create Story - Workflow Instructions (Spec-compliant, non-interactive by default) -````xml +```xml The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} @@ -109,23 +109,15 @@ Find the most recent file (by date in filename) - Load the status file + + mode: update + action: set_current_workflow + workflow_name: create-story + - current_step - Set to: "create-story (Story {{story_id}})" - - current_workflow - Set to: "create-story (Story {{story_id}}) - Complete" - - progress_percentage - Calculate per-story weight: remaining_40_percent / total_stories / 5 - Increment by: {{per_story_weight}} * 2 (create-story weight is ~2% per story) - - decisions_log - Add entry: - ``` - - **{{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. - ``` + + ✅ Status updated: Story {{story_id}} drafted + **✅ Story Created Successfully, {user_name}!** @@ -163,4 +155,4 @@ To track progress across workflows, run `workflow-status` first. -```` +``` diff --git a/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md b/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md index b7bfb1fe..974c6687 100644 --- a/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md @@ -1,6 +1,6 @@ # Develop Story - Workflow Instructions -````xml +```xml The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} @@ -111,23 +111,15 @@ Find the most recent file (by date in filename) - Load the status file + + mode: update + action: set_current_workflow + workflow_name: dev-story + - current_step - Set to: "dev-story (Story {{current_story_id}})" - - current_workflow - Set to: "dev-story (Story {{current_story_id}}) - Complete (Ready for Review)" - - progress_percentage - Calculate per-story weight: remaining_40_percent / total_stories / 5 - Increment by: {{per_story_weight}} * 5 (dev-story weight is ~5% per story - largest weight) - - decisions_log - Add entry: - ``` - - **{{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. - ``` + + ✅ Status updated: Story {{current_story_id}} ready for review + **✅ Story Implementation Complete, {user_name}!** @@ -167,4 +159,4 @@ To track progress across workflows, run `workflow-status` first. -```` +``` diff --git a/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md b/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md index bd6eeeda..9a587fc3 100644 --- a/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md @@ -385,23 +385,16 @@ See you at sprint planning once prep work is done!" Find the most recent file (by date in filename) - Load the status file + + mode: update + action: complete_workflow + workflow_name: retrospective + -current_step -Set to: "retrospective (Epic {{completed_number}})" - -current_workflow -Set to: "retrospective (Epic {{completed_number}}) - Complete" - -progress_percentage -Increment by: 5% (optional epic boundary workflow) - -decisions_log -Add entry: - -``` -- **{{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}}. -``` + + ✅ Status updated: Retrospective complete for Epic {{completed_number}} + + **✅ Retrospective Complete** diff --git a/src/modules/bmm/workflows/4-implementation/review-story/instructions.md b/src/modules/bmm/workflows/4-implementation/review-story/instructions.md index 7016ad54..6a72cde3 100644 --- a/src/modules/bmm/workflows/4-implementation/review-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/review-story/instructions.md @@ -1,6 +1,6 @@ # Senior Developer Review - Workflow Instructions -````xml +```xml The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} @@ -196,23 +196,15 @@ Running in standalone mode - no progress tracking. Find the most recent file (by date in filename) - Load the status file + + mode: update + action: set_current_workflow + workflow_name: review-story + - current_step - Set to: "review-story (Story {{epic_num}}.{{story_num}})" - - current_workflow - Set to: "review-story (Story {{epic_num}}.{{story_num}}) - Complete" - - progress_percentage - Calculate per-story weight: remaining_40_percent / total_stories / 5 - Increment by: {{per_story_weight}} * 2 (review-story ~2% per story) - - decisions_log - Add entry: - ``` - - **{{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. - ``` + + ✅ Status updated: Story {{epic_num}}.{{story_num}} reviewed + **✅ Story Review Complete, {user_name}!** @@ -251,4 +243,4 @@ Note: Running in standalone mode (no status file). -```` +``` diff --git a/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md b/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md index b1dfb131..0b243a3c 100644 --- a/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md @@ -62,158 +62,31 @@ Find "## Dev Agent Record" section and add: - + -Open {output_folder}/bmm-workflow-status.md + + mode: update + action: complete_story + -Update "#### DONE (Completed Stories)" section: - -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 - -Update "#### IN PROGRESS (Approved for Development)" section: - - - 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 - - - - Mark IN PROGRESS as empty: - -#### IN PROGRESS (Approved for Development) - -(No story currently in progress - all stories complete!) + + ⚠️ Failed to update status: {{error}} + Story file was updated, but status file update failed. -Update "#### TODO (Needs Drafting)" section: - - - 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 + + Status updated: Story {{completed_story}} marked done. + + 🎉 All stories complete! Phase 4 done! + + + {{stories_remaining}} stories remaining. - - - Mark TODO as empty: - -#### TODO (Needs Drafting) - -(No more stories to draft - all stories are drafted or complete) - - -Update "#### BACKLOG (Not Yet Drafted)" section: - -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 - -Update story counts in "#### Epic/Story Summary" section: - -- 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 "4-Implementation" checkbox in "### Phase Completion Status" - Set progress_percentage = 100% - - -Add to "## Decision Log" section: - -``` -- **{{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}} -``` - -current_step -Set to: "story-approved (Story {{current_story_id}})" - -current_workflow -Set to: "story-approved (Story {{current_story_id}}) - Complete" - -progress_percentage -Calculate per-story weight: remaining_40_percent / total_stories / 5 -Increment by: {{per_story_weight}} \* 1 (story-approved weight is ~1% per story) - -Set progress_percentage = 100% - - -Update "### Next Action Required" section: - - -``` -**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}} - -``` - - - -``` - -**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 - -``` - - - -``` - -**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 - -``` - - -Save bmm-workflow-status.md - - - - + Display summary @@ -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}} diff --git a/src/modules/bmm/workflows/4-implementation/story-context/instructions.md b/src/modules/bmm/workflows/4-implementation/story-context/instructions.md index 3ee9aef7..62a65b13 100644 --- a/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-context/instructions.md @@ -1,6 +1,6 @@ -````xml +```xml The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} @@ -120,23 +120,15 @@ Find the most recent file (by date in filename) - Load the status file + + mode: update + action: set_current_workflow + workflow_name: story-context + - current_step - Set to: "story-context (Story {{story_id}})" - - current_workflow - Set to: "story-context (Story {{story_id}}) - Complete" - - progress_percentage - Calculate per-story weight: remaining_40_percent / total_stories / 5 - Increment by: {{per_story_weight}} * 1 (story-context weight is ~1% per story) - - decisions_log - Add entry: - ``` - - **{{date}}**: Completed story-context for Story {{story_id}} ({{story_title}}). Context file: {{default_output_file}}. Next: DEV agent should run dev-story to implement. - ``` + + ✅ Status updated: Context generated for Story {{story_id}} + **✅ Story Context Generated Successfully, {user_name}!** @@ -177,4 +169,4 @@ To track progress across workflows, run `workflow-status` first. -```` +``` diff --git a/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md b/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md index 16562f0c..4acb5309 100644 --- a/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md @@ -51,94 +51,28 @@ Run `workflow-status` to check your project state. - + -Open {output_folder}/bmm-workflow-status.md + + mode: update + action: start_story + -Update "#### TODO (Needs Drafting)" section: + + ⚠️ Failed to update status: {{error}} + Story file was updated, but status file update failed. + -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 - -Update "#### IN PROGRESS (Approved for Development)" section: - -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 - -Update "#### BACKLOG (Not Yet Drafted)" section: - -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 - -Update story counts in "#### Epic/Story Summary" section: - -- 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) + + Status updated: Story {{in_progress_story}} ready for development. + + Next TODO: {{next_todo}} + + - - -Add to "## Decision Log" section: - -``` -- **{{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}} -``` - -current_step -Set to: "story-ready (Story {{todo_story_id}})" - -current_workflow -Set to: "story-ready (Story {{todo_story_id}}) - Complete" - -progress_percentage -Calculate per-story weight: remaining_40_percent / total_stories / 5 -Increment by: {{per_story_weight}} \* 1 (story-ready weight is ~1% per story) - -Update "### Next Action Required" section: - -``` -**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) -``` - -Save bmm-workflow-status.md - - - - + Display summary diff --git a/src/modules/bmm/workflows/workflow-status/INTEGRATION-EXAMPLE.md b/src/modules/bmm/workflows/workflow-status/INTEGRATION-EXAMPLE.md index 91c16a41..54810df5 100644 --- a/src/modules/bmm/workflows/workflow-status/INTEGRATION-EXAMPLE.md +++ b/src/modules/bmm/workflows/workflow-status/INTEGRATION-EXAMPLE.md @@ -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 + + mode: update + action: complete_workflow + workflow_name: prd + populate_stories_from: {output_folder}/bmm-epics.md + + + + PRD complete! Next: {{next_workflow}} ({{next_agent}} agent) + +``` + +**2. populate_stories** - Load story queue from epics.md + +```xml + + mode: update + action: populate_stories + epics_file: {output_folder}/bmm-epics.md + + + + Loaded {{total_stories}} stories. First: {{first_story}} + +``` + +**3. start_story** - Move TODO → IN PROGRESS + +```xml + + mode: update + action: start_story + + + + Started: {{in_progress_story}}. Next TODO: {{next_todo}} + +``` + +**4. complete_story** - Move IN PROGRESS → DONE, advance queue + +```xml + + mode: update + action: complete_story + + + + Completed: {{completed_story}}. {{stories_remaining}} remaining. + + 🎉 All stories complete! + + +``` + +**5. set_current_workflow** - Manual override (rarely needed) + +```xml + + mode: update + action: set_current_workflow + workflow_name: tech-spec + +``` + +--- + ### `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 + + Load {{status_file_path}} + + current_workflow + Set to: "prd - Complete" + + phase_2_complete + Set to: true + + decisions_log + Add entry: "- **{{date}}**: Completed PRD workflow..." + + Populate STORIES_SEQUENCE from epics.md story list + Count total stories and update story counts + + Save {{status_file_path}} + +``` + +### NEW WAY - 6 clean lines: + +```xml + + + mode: update + action: complete_workflow + workflow_name: prd + populate_stories_from: {output_folder}/bmm-epics.md + + + PRD complete! Next: {{next_workflow}} + +``` + +**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 🎉 diff --git a/src/modules/bmm/workflows/workflow-status/instructions.md b/src/modules/bmm/workflows/workflow-status/instructions.md index 7a946c77..95193613 100644 --- a/src/modules/bmm/workflows/workflow-status/instructions.md +++ b/src/modules/bmm/workflows/workflow-status/instructions.md @@ -2,7 +2,7 @@ The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml -This workflow operates in multiple modes: interactive (default), validate, data, init-check +This workflow operates in multiple modes: interactive (default), validate, data, init-check, update Other workflows can call this as a service to avoid duplicating status logic @@ -26,6 +26,10 @@ Jump to Step 30 for simple init check + + + Jump to Step 40 for status update service + @@ -263,4 +267,226 @@ Your choice: Return immediately to calling workflow + +Read {output_folder}/bmm-workflow-status.md + + + success = false + error = "No status file found. Cannot update." + Return to calling workflow + + + + Parse all current values from status file + Load workflow path file from WORKFLOW_PATH field + Check {{action}} parameter to determine update type + + + + + + Get {{workflow_name}} parameter (required) + + Mark workflow complete: + - Update CURRENT_WORKFLOW to "{{workflow_name}} - Complete" + + Find {{workflow_name}} in loaded path YAML + Determine next workflow from path sequence + + Update Next Action fields: + - 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 + + Check if phase complete: + - If {{workflow_name}} is last required workflow in current phase + - Update PHASE_X_COMPLETE to true + - Update CURRENT_PHASE to next phase (if applicable) + + + Trigger story population (see populate_stories action below) + + + Update LAST_UPDATED to {{date}} + Save status file + + success = true + next_workflow = {{determined next workflow}} + next_agent = {{determined next agent}} + phase_complete = {{true/false}} + + + + + + + + Get {{epics_file}} parameter (required - path to epics.md) + + Read {{epics_file}} completely + Parse all story definitions from epic sections + Extract story IDs in sequential order (e.g., story-1.1, story-1.2, story-2.1...) + Extract story titles for each ID + + Build ordered story list: + - Format: JSON array or comma-separated + - Example: ["story-1.1", "story-1.2", "story-1.3", "story-2.1"] + + Update status file: + - 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: [] + + Update LAST_UPDATED to {{date}} + Save status file + + success = true + total_stories = {{count}} + first_story = {{first_story_id}} + + + + + + + + Get current TODO_STORY from status file + + + success = false + error = "No TODO story to start" + Return to calling workflow + + + Move TODO → IN PROGRESS: + - IN_PROGRESS_STORY: {{current TODO_STORY}} + - IN_PROGRESS_TITLE: {{current TODO_TITLE}} + + Find next story in STORIES_SEQUENCE after current TODO_STORY + + + Move next story to TODO: + - TODO_STORY: {{next_story_id}} + - TODO_TITLE: {{next_story_title}} + + + + Clear TODO: + - TODO_STORY: (empty) + - TODO_TITLE: (empty) + + + Update NEXT_ACTION and NEXT_COMMAND: + - NEXT_ACTION: "Implement story {{IN_PROGRESS_STORY}}" + - NEXT_COMMAND: "dev-story" + - NEXT_AGENT: "dev" + + Update LAST_UPDATED to {{date}} + Save status file + + success = true + in_progress_story = {{IN_PROGRESS_STORY}} + next_todo = {{TODO_STORY or empty}} + + + + + + + + Get current IN_PROGRESS_STORY from status file + + + success = false + error = "No IN PROGRESS story to complete" + Return to calling workflow + + + Move IN PROGRESS → DONE: + - Add {{IN_PROGRESS_STORY}} to STORIES_DONE list + + Move TODO → IN PROGRESS: + - IN_PROGRESS_STORY: {{current TODO_STORY}} + - IN_PROGRESS_TITLE: {{current TODO_TITLE}} + + Find next story in STORIES_SEQUENCE after current TODO_STORY + + + Move next story to TODO: + - TODO_STORY: {{next_story_id}} + - TODO_TITLE: {{next_story_title}} + + + + Clear TODO: + - TODO_STORY: (empty) + - TODO_TITLE: (empty) + + + + Mark Phase 4 complete: + - PHASE_4_COMPLETE: true + - CURRENT_WORKFLOW: "Complete" + - NEXT_ACTION: "All stories complete!" + - NEXT_COMMAND: (empty) + + + + Update NEXT_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" + + + Update LAST_UPDATED to {{date}} + Save status file + + success = true + completed_story = {{completed_story_id}} + stories_remaining = {{count}} + all_complete = {{true/false}} + + + + + + + + Get {{workflow_name}} parameter (required) + Get {{agent_name}} parameter (optional) + + Update current workflow: + - CURRENT_WORKFLOW: {{workflow_name}} + - CURRENT_AGENT: {{agent_name or infer from path}} + + Find {{workflow_name}} in path to determine next: + - NEXT_ACTION: Next workflow description + - NEXT_COMMAND: Next workflow command + - NEXT_AGENT: Next workflow agent + + Update LAST_UPDATED to {{date}} + Save status file + + success = true + + + + + + + + success = false + error = "Unknown action: {{action}}. Valid actions: complete_workflow, populate_stories, start_story, complete_story, set_current_workflow" + + + + +Return control to calling workflow with template outputs + +