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.
+ ```
+
+
+
+
+
+
+
+
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.
+ ```
+
+
+
+
+
+
+
-```
+````
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):
+
+
+
+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):
+
+
+
+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}}.
+```
+
+
+
+
+
+
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).
+```
+
+
+
+
+
+
+
+
+
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).
+```
+
+
+
+
+
+
+
+
+
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.
+```
+
+
+
+
+
+
+
+
+
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.
+```
+
+
+
+
+
+
+
+
+
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.
+```
+
+
+
+
+
+
+
+
+
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"
+
+
+
+
+
+
+
+
+
```
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
+
+
+
+
+
+
+
+
+
-```
+````
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.
+ ```
+
+
+
+
+
+
+
+
+
-```
+````
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.
+ ```
+
+
+
+
+
+
+
+
+
-```
+````
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}}.
+```
+
+
+
+
+
+
+
+
+
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.
+ ```
+
+
+
+
+
+
+
+
+
-```
+````
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.
+ ```
+
+
+
+
+
+
+
+
+
-```
+````
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:
```