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 7869c112..66e86369 100644 --- a/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md @@ -4,7 +4,35 @@ - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow generates brainstorming ideas for game ideation (optional Phase 1 workflow). + +Options: + +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? +If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to brainstorm-game" +If user chooses option 2 → Set standalone_mode = true and continue +If user chooses option 3 → HALT + + + + Read the game context document from: {game_context} This context provides game-specific guidance including: - Focus areas for game ideation (mechanics, narrative, experience, etc.) @@ -22,7 +50,7 @@ - + Execute the CIS brainstorming workflow with game context and additional techniques The CIS brainstorming workflow will: @@ -34,10 +62,68 @@ - - Confirm brainstorming session completed successfully - Brainstorming results saved by CIS workflow - Report workflow completion - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + current_step + Set to: "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 saved to {output_folder}/brainstorming-session-results-{{date}}.md. Next: Review game ideas and consider running research or game-brief workflows. + ``` + + **✅ Game Brainstorming Session Complete** + +**Session Results:** + +- Game brainstorming results saved to: {output_folder}/brainstorming-session-results-{{date}}.md + +**Status file updated:** + +- Current step: brainstorm-game ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review game brainstorming results +2. Consider running: + - `research` workflow for market/game research + - `game-brief` workflow to formalize game vision + - Or proceed directly to `plan-project` if ready + +Check status anytime with: `workflow-status` + + + + + **✅ Game Brainstorming Session Complete** + +**Session Results:** + +- Game brainstorming results saved to: {output_folder}/brainstorming-session-results-{{date}}.md + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** + +1. Review game brainstorming results +2. Run research or game-brief workflows + + + 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 bf65b5fd..951db5c1 100644 --- a/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md @@ -1,13 +1,40 @@ # Brainstorm Project - 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 This is a meta-workflow that orchestrates the CIS brainstorming workflow with project-specific context - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow generates brainstorming ideas for project ideation (optional Phase 1 workflow). + +Options: +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? + If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to brainstorm-project" + If user chooses option 2 → Set standalone_mode = true and continue + If user chooses option 3 → HALT + + + + Read the project context document from: {project_context} This context provides project-specific guidance including: - Focus areas for project ideation @@ -17,7 +44,7 @@ - + Execute the CIS brainstorming workflow with project context The CIS brainstorming workflow will: @@ -28,11 +55,64 @@ - - Confirm brainstorming session completed successfully - Brainstorming results saved by CIS workflow - Report workflow completion + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + current_step + Set to: "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 saved to {output_folder}/brainstorming-session-results-{{date}}.md. Next: Review ideas and consider running research or product-brief workflows. + ``` + + **✅ Brainstorming Session Complete** + +**Session Results:** +- Brainstorming results saved to: {output_folder}/brainstorming-session-results-{{date}}.md + +**Status file updated:** +- Current step: brainstorm-project ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** +1. Review brainstorming results +2. Consider running: + - `research` workflow for market/technical research + - `product-brief` workflow to formalize product vision + - Or proceed directly to `plan-project` if ready + +Check status anytime with: `workflow-status` + + + + + **✅ Brainstorming Session Complete** + +**Session Results:** +- Brainstorming results saved to: {output_folder}/brainstorming-session-results-{{date}}.md + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** +1. Review brainstorming results +2. Run research or product-brief workflows + + -``` +```` 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 af9b8a50..8c67ee5b 100644 --- a/src/modules/bmm/workflows/1-analysis/document-project/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/document-project/instructions.md @@ -6,7 +6,91 @@ You MUST have already loaded and processed: {project-root}/bmad/bmm/workflows/document-project/workflow.yaml This router determines workflow mode and delegates to specialized sub-workflows - + + +Search {output_folder}/ for files matching pattern: project-workflow-status\*.md +Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Extract key information: + +- current_step: From "Current Step:" field +- next_step: From "Next Step:" field +- planned_workflow: From "Planned Workflow Journey" table +- progress_percentage: From "Overall Progress:" field +- current_phase: From "Current Phase:" field +- field_type: From "Greenfield/Brownfield:" field + +Validate this workflow is in the planned workflow +Set status_file_path = file path +Set status_file_found = true + + + **⚠️ Workflow Sequence Note** + +According to your status file, your next planned step is: **{{next_step}}** + +But you're running: **document-project** + +This is expected if plan-project invoked this workflow automatically for brownfield documentation. + +Options: + +1. **Continue** - Run document-project (status will be updated) +2. **Exit** - I'll follow the planned sequence instead + +Your choice (1-2): + + + **Recommended Next Step:** + +Run: {{next_step}} + +You can return to document-project later if needed. + +Exit workflow + + + + + + **ℹ️ No Workflow Status File Found** + +This workflow works best with a workflow status file for progress tracking. + +Options: + +1. **Run workflow-status first** - Create status file and plan workflow (recommended) +2. **Continue anyway** - Run document-project standalone +3. **Exit** - I'll set up the workflow first + +Your choice (1-3): + + + **To create status file:** + +Load any agent and run: `workflow-status` + +After planning your workflow, you can return here or follow the planned sequence. + +Exit workflow + + + + Set status_file_found = false + Set standalone_mode = true + Continue without status file integration + + + + Exit workflow + + + + + + SMART LOADING STRATEGY: Check state file FIRST before loading any CSV files Check for existing state file at: {output_folder}/project-scan-report.json @@ -80,7 +164,7 @@ Your choice [1/2/3]: - + Check if {output_folder}/index.md exists @@ -102,6 +186,7 @@ Your choice [1/2/3]: Set workflow_mode = "full_rescan" Display: "Starting full project rescan..." Load and execute: {installed_path}/workflows/full-scan-instructions.md + After sub-workflow completes, continue to Step 4 @@ -109,6 +194,7 @@ Your choice [1/2/3]: Set scan_level = "exhaustive" Display: "Starting deep-dive documentation mode..." Load and execute: {installed_path}/workflows/deep-dive-instructions.md + After sub-workflow completes, continue to Step 4 @@ -121,6 +207,74 @@ Your choice [1/2/3]: Set workflow_mode = "initial_scan" Display: "No existing documentation found. Starting initial project scan..." Load and execute: {installed_path}/workflows/full-scan-instructions.md + After sub-workflow completes, continue to Step 4 + + + + + + + + Load the status file from {{status_file_path}} + +planned_workflow +Find "document-project" in the planned_workflow table +Update Status field from "Planned" or "In Progress" to "Complete" + +current_step +Set to: "document-project" + +next_step +Find next item with Status != "Complete" in planned_workflow table +Set to: "{{next_workflow_step}} ({{next_workflow_agent}} agent)" + +progress_percentage +Increment by: 10% + +current_workflow +Set to: "document-project - Complete" + +decisions_log +Add entry: + +``` +- **{{date}}**: Completed document-project workflow ({{workflow_mode}} mode, {{scan_level}} scan). Generated brownfield documentation in {output_folder}/. Next: {{next_step}}. +``` + +**✅ Document Project Workflow Complete** + +**Documentation Generated:** + +- Mode: {{workflow_mode}} +- Scan Level: {{scan_level}} +- Output: {output_folder}/index.md and related files + +**Status file updated:** + +- Current step: document-project ✓ +- Next step: {{next_step}} +- Progress: {{new_progress_percentage}}% + +**To proceed:** +Load {{next_agent}} and run: `{{next_command}}` + +Or check status anytime with: `workflow-status` + + + + + **✅ Document Project Workflow Complete** + +**Documentation Generated:** + +- Mode: {{workflow_mode}} +- Scan Level: {{scan_level}} +- Output: {output_folder}/index.md and related files + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first next time. + 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 33376518..966e36b8 100644 --- a/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md @@ -5,7 +5,35 @@ - + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow creates a Game Brief document (optional Phase 1 workflow). + +Options: + +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? +If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to game-brief" +If user chooses option 2 → Set standalone_mode = true and continue +If user chooses option 3 → HALT + + + + Welcome the user to the Game Brief creation process Explain this is a collaborative process to define their game vision What is the working title for your game? @@ -514,4 +542,68 @@ This brief will serve as the primary input for creating the Game Design Document final_brief + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +current_step +Set to: "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 and saved. Next: Proceed to plan-project workflow to create Game Design Document (GDD). +``` + +**✅ Game Brief Complete** + +**Brief Document:** + +- Game brief saved and ready for GDD creation + +**Status file updated:** + +- Current step: game-brief ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review the game brief document +2. Consider creating a prototype of core mechanic +3. Run `plan-project` workflow to create GDD from this brief +4. Validate assumptions with target players + +Check status anytime with: `workflow-status` + + + + + **✅ Game Brief Complete** + +**Brief Document:** + +- Game brief saved and ready for GDD creation + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** + +1. Review the game brief document +2. Run `plan-project` workflow to create GDD + + + + 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 2a027e88..c0ef3919 100644 --- a/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md @@ -5,7 +5,35 @@ - + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow creates a Product Brief document (optional Phase 1 workflow). + +Options: + +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? +If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to product-brief" +If user chooses option 2 → Set standalone_mode = true and continue +If user chooses option 3 → HALT + + + + Welcome the user to the Product Brief creation process Explain this is a collaborative process to define their product vision Ask the user to provide the project name for this product brief @@ -350,4 +378,67 @@ This brief will serve as the primary input for creating the Product Requirements final_brief + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +current_step +Set to: "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). +``` + +**✅ Product Brief Complete** + +**Brief Document:** + +- Product brief saved and ready for handoff + +**Status file updated:** + +- Current step: product-brief ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review the product brief document +2. Gather any additional stakeholder input +3. Run `plan-project` workflow to create PRD from this brief + +Check status anytime with: `workflow-status` + + + + + **✅ Product Brief Complete** + +**Brief Document:** + +- Product brief saved and ready for handoff + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** + +1. Review the product brief document +2. Run `plan-project` workflow to create PRD + + + + 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 4ed5e3e9..059d0a13 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 @@ -374,4 +374,66 @@ Select option (1-4): + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +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. +``` + +**✅ Deep Research Prompt Generated** + +**Research Prompt:** + +- Structured research prompt generated and saved +- Ready to execute with ChatGPT, Claude, Gemini, or Grok + +**Status file updated:** + +- Current step: research (deep-prompt) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Execute the research prompt with your chosen AI platform +2. Gather and analyze findings +3. Run `plan-project` to incorporate findings + +Check status anytime with: `workflow-status` + + + + + **✅ Deep Research Prompt Generated** + +**Research Prompt:** + +- Structured research prompt generated and saved + +Note: Running in standalone mode (no status file). + +**Next Steps:** + +1. Execute the research prompt with AI platform +2. Run plan-project workflow + + + + 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 b7fe5dfe..e59af7bf 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-market.md @@ -554,4 +554,69 @@ Create compelling executive summary with: + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +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. +``` + +**✅ Research Complete ({{research_mode}} mode)** + +**Research Report:** + +- Research report generated and saved + +**Status file updated:** + +- Current step: research ({{research_mode}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review research findings +2. Share with stakeholders +3. Consider running: + - `product-brief` or `game-brief` to formalize vision + - `plan-project` if ready to create PRD/GDD + +Check status anytime with: `workflow-status` + + + + + **✅ Research Complete ({{research_mode}} mode)** + +**Research Report:** + +- Research report generated and saved + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** + +1. Review research findings +2. Run product-brief or plan-project workflows + + + + diff --git a/src/modules/bmm/workflows/1-analysis/research/instructions-router.md b/src/modules/bmm/workflows/1-analysis/research/instructions-router.md index a7026474..ce583388 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-router.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-router.md @@ -8,7 +8,35 @@ - + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow conducts research (optional Phase 1 workflow). + +Options: + +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? +If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to research" +If user chooses option 2 → Set standalone_mode = true and continue +If user chooses option 3 → HALT + + + + Welcome the user to the Research Workflow **The Research Workflow supports multiple research types:** @@ -47,7 +75,7 @@ Present the user with research type options: - + Based on user selection, load the appropriate instruction set 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 9ee1bc39..2e1ae870 100644 --- a/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md +++ b/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md @@ -442,4 +442,65 @@ Select option (1-5): + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +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. +``` + +**✅ Technical Research Complete** + +**Research Report:** + +- Technical research report generated and saved + +**Status file updated:** + +- Current step: research (technical) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review technical research findings +2. Share with architecture team +3. Run `plan-project` to incorporate findings into PRD + +Check status anytime with: `workflow-status` + + + + + **✅ Technical Research Complete** + +**Research Report:** + +- Technical research report generated and saved + +Note: Running in standalone mode (no status file). + +**Next Steps:** + +1. Review technical research findings +2. Run plan-project workflow + + + + diff --git a/src/modules/bmm/workflows/3-solutioning/instructions.md b/src/modules/bmm/workflows/3-solutioning/instructions.md index 55736f1e..629b0759 100644 --- a/src/modules/bmm/workflows/3-solutioning/instructions.md +++ b/src/modules/bmm/workflows/3-solutioning/instructions.md @@ -7,10 +7,55 @@ This workflow generates scale-adaptive solution architecture documentation that -1. Read project-workflow-status.md: - Path: {{project_workflow_analysis_path}} +1. Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) -2. Extract: +2. Check if status file exists: + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + Validate workflow sequence: + + **⚠️ Workflow Sequence Note** + +Status file shows: +- Current step: {{current_step}} +- Expected next: {{next_step}} + +This workflow (solution-architecture) is typically run after plan-project for Level 3-4 projects. + +Options: +1. Continue anyway (if you're resuming work) +2. Exit and run the expected workflow: {{next_step}} +3. Check status with workflow-status + +What would you like to do? + If user chooses exit → HALT with message: "Run workflow-status to see current state" + + + + + **No workflow status file found.** + +The status file tracks progress across all workflows and stores project configuration. + +Options: +1. Run workflow-status first to create the status file (recommended) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? + If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to solution-architecture" + If user chooses option 2 → Set standalone_mode = true and continue + If user chooses option 3 → HALT + + +3. Extract project configuration from status file: + Path: {{status_file_path}} + + Extract: - project_level: {{0|1|2|3|4}} - field_type: {{greenfield|brownfield}} - project_type: {{web|mobile|embedded|game|library}} @@ -19,7 +64,7 @@ This workflow generates scale-adaptive solution architecture documentation that - ux_spec_path: /docs/ux-spec.md (if exists) - prd_status: {{complete|incomplete}} -3. Validate Prerequisites (BLOCKING): +4. Validate Prerequisites (BLOCKING): Check 1: PRD complete? IF prd_status != complete: @@ -67,7 +112,7 @@ This workflow generates scale-adaptive solution architecture documentation that - UX Spec: {{complete | not_applicable}} Proceeding with solution architecture workflow... -4. Determine workflow path: +5. Determine workflow path: IF project_level == 0: - Skip solution architecture entirely - Output: "Level 0 project - validate/update tech-spec.md only" @@ -745,6 +790,86 @@ Would you like to proceed with story drafting now? (y/n) + + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + +Load the status file + +current_step +Set to: "solution-architecture" + +current_workflow +Set to: "solution-architecture - Complete" + +progress_percentage +Increment by: 15% (solution-architecture is a major workflow) + +decisions_log +Add entry: +``` + +- **{{date}}**: Completed solution-architecture workflow. Generated solution-architecture.md, cohesion-check-report.md, and {{epic_count}} tech-spec files. Populated story backlog with {{total_story_count}} stories. Phase 3 complete. Next: SM agent should run create-story to draft first story ({{first_story_id}}). + +``` + +next_action +Set to: "Draft first user story ({{first_story_id}})" + +next_command +Set to: "Load SM agent and run 'create-story' workflow" + +next_agent +Set to: "bmad/bmm/agents/sm.md" + +**✅ Solution Architecture Complete** + +**Architecture Documents:** +- solution-architecture.md (main architecture document) +- cohesion-check-report.md (validation report) +- tech-spec-epic-1.md through tech-spec-epic-{{epic_count}}.md ({{epic_count}} specs) + +**Story Backlog:** +- {{total_story_count}} stories populated in status file +- First story: {{first_story_id}} ({{first_story_title}}) + +**Status file updated:** +- Current step: solution-architecture ✓ +- Progress: {{new_progress_percentage}}% +- Phase 3 (Solutioning) complete +- Ready for Phase 4 (Implementation) + +**Next Steps:** +1. Load SM agent (bmad/bmm/agents/sm.md) +2. Run `create-story` workflow to draft story {{first_story_id}} +3. Review drafted story +4. Run `story-ready` to approve for development + +Check status anytime with: `workflow-status` + + + + +**✅ Solution Architecture Complete** + +**Architecture Documents:** +- solution-architecture.md +- cohesion-check-report.md +- tech-spec-epic-1.md through tech-spec-epic-{{epic_count}}.md + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** +1. Load SM agent and run `create-story` to draft stories + + + + ``` 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 debbbeb0..cfcb97a4 100644 --- a/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md +++ b/src/modules/bmm/workflows/3-solutioning/tech-spec/instructions.md @@ -1,13 +1,66 @@ -```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 This workflow generates a comprehensive Technical Specification from PRD and Architecture, including detailed design, NFRs, acceptance criteria, and traceability mapping. Default execution mode: #yolo (non-interactive). If required inputs cannot be auto-discovered and {{non_interactive}} == true, HALT with a clear message listing missing documents; do not prompt. - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Extract key information: + - current_step: What workflow was last run + - next_step: What workflow should run next + - planned_workflow: The complete workflow journey table + - progress_percentage: Current progress + - project_level: Project complexity level (0-4) + + Set status_file_found = true + Store status_file_path for later updates + + + **⚠️ Project Level Notice** + +Status file shows project_level = {{project_level}}. + +Tech-spec workflow is typically only needed for Level 3-4 projects. +For Level 0-2, solution-architecture usually generates tech specs automatically. + +Options: +1. Continue anyway (manual tech spec generation) +2. Exit (check if solution-architecture already generated tech specs) +3. Run workflow-status to verify project configuration + +What would you like to do? + If user chooses exit → HALT with message: "Check docs/ folder for existing tech-spec files" + + + + + **No workflow status file found.** + +The status file tracks progress across all workflows and stores project configuration. + +Note: This workflow is typically invoked automatically by solution-architecture, or manually for JIT epic tech specs. + +Options: +1. Run workflow-status first to create the status file (recommended) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? + If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to tech-spec" + If user chooses option 2 → Set standalone_mode = true and continue + If user chooses option 3 → HALT + + + + Identify PRD and Architecture documents from recommended_inputs. Attempt to auto-discover at default paths. If inputs are missing, ask the user for file paths. @@ -17,7 +70,7 @@ Resolve output file path using workflow variables and initialize by writing the template. - + Read COMPLETE PRD and Architecture files. Replace {{overview}} with a concise 1-2 paragraph summary referencing PRD context and goals @@ -26,7 +79,7 @@ - + Derive concrete implementation specifics from Architecture and PRD (NO invention). Replace {{services_modules}} with a table or bullets listing services/modules with responsibilities, inputs/outputs, and owners @@ -36,7 +89,7 @@ - + Replace {{nfr_performance}} with measurable targets (latency, throughput); link to any performance requirements in PRD/Architecture Replace {{nfr_security}} with authn/z requirements, data handling, threat notes; cite source sections @@ -45,14 +98,14 @@ - + Scan repository for dependency manifests (e.g., package.json, pyproject.toml, go.mod, Unity Packages/manifest.json). Replace {{dependencies_integrations}} with a structured list of dependencies and integration points with version or commit constraints when known - + Extract acceptance criteria from PRD; normalize into atomic, testable statements. Replace {{acceptance_criteria}} with a numbered list of testable acceptance criteria @@ -60,16 +113,80 @@ - + Replace {{risks_assumptions_questions}} with explicit list (each item labeled as Risk/Assumption/Question) with mitigation or next step Replace {{test_strategy}} with a brief plan (test levels, frameworks, coverage of ACs, edge cases) - + Validate against checklist at {installed_path}/checklist.md using bmad/core/tasks/validate-workflow.xml + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + 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 + + **✅ Tech Spec Generated Successfully** + +**Epic Details:** +- Epic ID: {{epic_id}} +- Epic Title: {{epic_title}} +- Tech Spec File: {{default_output_file}} + +**Status file updated:** +- Current step: tech-spec (Epic {{epic_id}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Note:** This is a JIT (Just-In-Time) workflow. +- Run again for other epics that need detailed tech specs +- Or proceed to Phase 4 (Implementation) if all tech specs are complete + +**Next Steps:** +1. If more epics need tech specs: Run tech-spec again with different epic_id +2. If all tech specs complete: Proceed to Phase 4 implementation +3. Check status anytime with: `workflow-status` + + + + + **✅ Tech Spec Generated Successfully** + +**Epic Details:** +- Epic ID: {{epic_id}} +- Epic Title: {{epic_title}} +- Tech Spec File: {{default_output_file}} + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Note:** This is a JIT workflow - run again for other epics as needed. + + + + -``` +```` 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 91b03580..c68b2634 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 This workflow creates or updates the next user story from epics/PRD and architecture context, saving to the configured stories directory and optionally invoking Story Context. @@ -120,5 +120,63 @@ Report created/updated story path + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + 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. + ``` + + **✅ Story Created Successfully** + +**Story Details:** +- Story ID: {{story_id}} +- File: {{story_file}} +- Status: Draft (needs review) + +**Status file updated:** +- Current step: create-story (Story {{story_id}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** +1. Review the drafted story in {{story_file}} +2. When satisfied, run `story-ready` to approve for development +3. Or edit the story file and re-run `create-story` to update + +Check status anytime with: `workflow-status` + + + + + **✅ Story Created Successfully** + +**Story Details:** +- Story ID: {{story_id}} +- File: {{story_file}} +- Status: Draft + +Note: Running in standalone mode (no status file). + +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 3a6a160e..56524cff 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 Only modify the story file in these areas: Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status @@ -11,19 +11,44 @@ - - If {{story_path}} was explicitly provided and is valid → use it. Otherwise, attempt auto-discovery. - Auto-discovery: Read {{story_dir}} from config (dev_story_location). If invalid/missing or contains no .md files, ASK user to provide either: (a) a story file path, or (b) a directory to scan. - If a directory is provided, list story markdown files recursively under that directory matching pattern: "story-*.md". - Sort candidates by last modified time (newest first) and take the top {{story_selection_limit}} items. - Present the list with index, filename, and modified time. Ask: "Select a story (1-{{story_selection_limit}}) or enter a path:" - Resolve the selected item into {{story_path}} - Read the COMPLETE story file from {{story_path}} - Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status - Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope - If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and Continue - If story file inaccessible → HALT: "Cannot develop story without access to story file" - If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation" + + Read {output_folder}/project-workflow-status.md (if exists) + Navigate to "### Implementation Progress (Phase 4 Only)" section + Find "#### IN PROGRESS (Approved for Development)" section + + + Extract story information: + - current_story_id: The story ID (e.g., "1.1", "auth-feature-1", "login-fix") + - current_story_title: The story title + - current_story_file: The exact story file path + - current_story_context_file: The context file path (if exists) + + DO NOT SEARCH for stories - the status file tells you exactly which story is IN PROGRESS + + Set {{story_path}} = {story_dir}/{current_story_file} + Read the COMPLETE story file from {{story_path}} + Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status + Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope + If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and Continue + If story file inaccessible → HALT: "Cannot develop story without access to story file" + If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation" + + + + Fall back to legacy auto-discovery: + If {{story_path}} was explicitly provided and is valid → use it. Otherwise, attempt auto-discovery. + Auto-discovery: Read {{story_dir}} from config (dev_story_location). If invalid/missing or contains no .md files, ASK user to provide either: (a) a story file path, or (b) a directory to scan. + If a directory is provided, list story markdown files recursively under that directory matching pattern: "story-*.md". + Sort candidates by last modified time (newest first) and take the top {{story_selection_limit}} items. + Present the list with index, filename, and modified time. Ask: "Select a story (1-{{story_selection_limit}}) or enter a path:" + Resolve the selected item into {{story_path}} + Read the COMPLETE story file from {{story_path}} + Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status + Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope + If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and Continue + If story file inaccessible → HALT: "Cannot develop story without access to story file" + If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation" + @@ -83,5 +108,65 @@ Communicate that the story is Ready for Review + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + 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. + ``` + + **✅ Story Implementation Complete** + +**Story Details:** +- Story ID: {{current_story_id}} +- Title: {{current_story_title}} +- File: {{story_path}} +- Status: Ready for Review + +**Status file updated:** +- Current step: dev-story (Story {{current_story_id}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** +1. Review the implemented story and test the changes +2. Verify all acceptance criteria are met +3. When satisfied, run `story-approved` to mark story complete and advance the queue + +Or check status anytime with: `workflow-status` + + + + + **✅ Story Implementation Complete** + +**Story Details:** +- Story ID: {{current_story_id}} +- Title: {{current_story_title}} +- File: {{story_path}} +- Status: Ready for Review + +Note: Running in standalone mode (no status file). + +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 00f1480d..482d8796 100644 --- a/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md @@ -15,7 +15,35 @@ FACILITATION NOTES: - + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow conducts epic retrospective (optional Phase 4 workflow). + +Options: + +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? +If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to retrospective" +If user chooses option 2 → Set standalone_mode = true and continue +If user chooses option 3 → HALT + + + + Identify the completed epic Which epic has just been completed? (Enter epic number, e.g., "003" or auto-detect from highest completed story) @@ -370,6 +398,72 @@ See you at sprint planning once prep work is done!" Remind user to schedule prep sprint if needed + +Search {output_folder}/ for files matching pattern: project-workflow-status*.md +Find the most recent file (by date in filename) + + + Load the status file + +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}}. +``` + +**✅ Retrospective Complete** + +**Epic Review:** + +- Epic {{completed_number}}: {{epic_title}} reviewed +- Action Items: {{action_count}} +- Preparation Tasks: {{prep_task_count}} +- Critical Path Items: {{critical_count}} + +**Status file updated:** + +- Current step: retrospective (Epic {{completed_number}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** + +1. Review retrospective summary: {output_folder}/retrospectives/epic-{{completed_number}}-retro-{{date}}.md +2. Execute preparation sprint (Est: {{prep_days}} days) +3. Complete critical path items before Epic {{next_number}} +4. Begin Epic {{next_number}} planning when preparation complete + +Check status anytime with: `workflow-status` + + + + + **✅ Retrospective Complete** + +**Epic Review:** + +- Epic {{completed_number}}: {{epic_title}} reviewed +- Retrospective saved: {output_folder}/retrospectives/epic-{{completed_number}}-retro-{{date}}.md + +Note: Running in standalone mode (no status file). + +**Next Steps:** + +1. Execute preparation sprint +2. Begin Epic {{next_number}} planning + + + + 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 4dfee7af..3321fa99 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 This workflow performs a Senior Developer Review on a story flagged Ready for Review, appends structured review notes, and can update the story status based on the outcome. @@ -10,7 +10,34 @@ - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Set status_file_found = true + Store status_file_path for later updates + + + + **No workflow status file found.** + +This workflow performs Senior Developer Review on a story (optional Phase 4 workflow). + +Options: +1. Run workflow-status first to create the status file (recommended for progress tracking) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? + If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to review-story" + If user chooses option 2 → Set standalone_mode = true and continue + If user chooses option 3 → HALT + + + + If {{story_path}} was provided → use it. Else auto-discover from {{story_dir}} by listing files matching pattern: "story-*.md" (recursive), sort by last modified (newest first), present top {{story_selection_limit}}. Select a story (1-{{story_selection_limit}}) or enter a path: Resolve {{story_path}} and read the COMPLETE file. @@ -172,5 +199,64 @@ Report workflow completion. + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + 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. + ``` + + **✅ Story Review Complete** + +**Story Details:** +- Story: {{epic_num}}.{{story_num}} +- Review Outcome: {{outcome}} +- Action Items: {{action_item_count}} + +**Status file updated:** +- Current step: review-story (Story {{epic_num}}.{{story_num}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** +1. Review the Senior Developer Review notes appended to story +2. Address any action items or changes requested +3. When ready, run `story-approved` to mark story complete + +Check status anytime with: `workflow-status` + + + + + **✅ Story Review Complete** + +**Story Details:** +- Story: {{epic_num}}.{{story_num}} +- Review Outcome: {{outcome}} + +Note: Running in standalone mode (no status file). + +**Next Steps:** +1. Review the Senior Developer Review notes +2. Address any action items + + + + -``` +```` 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 f3fde5c0..cae0bb4a 100644 --- a/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-approved/instructions.md @@ -149,7 +149,7 @@ If BACKLOG had 1 story and is now empty: - + Add to "## Decision Log" section: @@ -157,6 +157,19 @@ If BACKLOG had 1 story and is now empty: - **{{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: 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 6d4715fd..a19f02ca 100644 --- a/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-context/instructions.md @@ -1,13 +1,65 @@ -```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 This workflow assembles a Story Context XML for a single user story by extracting ACs, tasks, relevant docs/code, interfaces, constraints, and testing guidance to support implementation. Default execution mode: #yolo (non-interactive). Only ask if {{non_interactive}} == false. If auto-discovery fails, HALT and request 'story_path' or 'story_dir'. - + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md) + + + Load the status file + Extract key information: + - current_step: What workflow was last run + - next_step: What workflow should run next + - planned_workflow: The complete workflow journey table + - progress_percentage: Current progress + - IN PROGRESS story: The story being worked on (from Implementation Progress section) + + Set status_file_found = true + Store status_file_path for later updates + + + **⚠️ Workflow Sequence Note** + +Status file shows: +- Current step: {{current_step}} +- Expected next: {{next_step}} + +This workflow (story-context) is typically run after story-ready. + +Options: +1. Continue anyway (story-context is optional) +2. Exit and run the expected workflow: {{next_step}} +3. Check status with workflow-status + +What would you like to do? + If user chooses exit → HALT with message: "Run workflow-status to see current state" + + + + + **No workflow status file found.** + +The status file tracks progress across all workflows and provides context about which story to work on. + +Options: +1. Run workflow-status first to create the status file (recommended) +2. Continue in standalone mode (no progress tracking) +3. Exit + +What would you like to do? + If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to story-context" + If user chooses option 2 → Set standalone_mode = true and continue + If user chooses option 3 → HALT + + + + If {{story_path}} provided and valid → use it; else auto-discover from {{story_dir}}. Auto-discovery: read {{story_dir}} (dev_story_location). If invalid/missing or contains no .md files, ASK for a story file path or directory to scan. If a directory is provided, list markdown files named "story-*.md" recursively; sort by last modified time; display top {{story_selection_limit}} with index, filename, path, modified time. @@ -21,7 +73,7 @@ so_that - + Scan docs and src module docs for items relevant to this story's domain: search keywords from story title, ACs, and tasks< Prefer authoritative sources: PRD, Architecture, Front-end Spec, Testing standards, module-specific docs. @@ -29,7 +81,7 @@ - + Search source tree for modules, files, and symbols matching story intent and AC keywords (controllers, services, components, tests). Identify existing interfaces/APIs the story should reuse rather than recreate. Extract development constraints from Dev Notes and architecture (patterns, layers, testing requirements). @@ -40,7 +92,7 @@ - + Detect dependency manifests and frameworks in the repo: - Node: package.json (dependencies/devDependencies) - Python: pyproject.toml/requirements.txt @@ -52,7 +104,7 @@ - + From Dev Notes, architecture docs, testing docs, and existing tests, extract testing standards (frameworks, patterns, locations). Populate tests.standards with a concise paragraph @@ -61,16 +113,77 @@ - + Validate output XML structure and content. Validate against checklist at {installed_path}/checklist.md using bmad/core/tasks/validate-workflow.xml - + Open {{story_path}}; if Status == 'Draft' then set to 'ContextReadyDraft'; otherwise leave unchanged. Under 'Dev Agent Record' → 'Context Reference' (create if missing), add or update a list item for {default_output_file}. Save the story file. + + Search {output_folder}/ for files matching pattern: project-workflow-status*.md + Find the most recent file (by date in filename) + + + Load the status file + + 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. + ``` + + **✅ Story Context Generated Successfully** + +**Story Details:** +- Story ID: {{story_id}} +- Title: {{story_title}} +- Context File: {{default_output_file}} + +**Status file updated:** +- Current step: story-context (Story {{story_id}}) ✓ +- Progress: {{new_progress_percentage}}% + +**Next Steps:** +1. Load DEV agent (bmad/bmm/agents/dev.md) +2. Run `dev-story` workflow to implement the story +3. The context file will provide comprehensive implementation guidance + +Check status anytime with: `workflow-status` + + + + + **✅ Story Context Generated Successfully** + +**Story Details:** +- Story ID: {{story_id}} +- Title: {{story_title}} +- Context File: {{default_output_file}} + +Note: Running in standalone mode (no status file). + +To track progress across workflows, run `workflow-status` first. + +**Next Steps:** +1. Load DEV agent and run `dev-story` to implement + + + + -``` +```` 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 cb8ba5a0..bd44e5c3 100644 --- a/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md @@ -92,7 +92,7 @@ If BACKLOG had 1 story and is now empty: - + Add to "## Decision Log" section: @@ -100,6 +100,16 @@ If BACKLOG had 1 story and is now empty: - **{{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: ```