# Workflow Status Check - Multi-Mode Service
The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml
You MUST have already loaded and processed: {project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml
This workflow operates in multiple modes: interactive (default), validate, data, init-check, update
Other workflows can call this as a service to avoid duplicating status logic
Check for {{mode}} parameter passed by calling workflow
Default mode = "interactive" if not specified
Continue to Step 1 for normal status check flow
Jump to Step 10 for workflow validation service
Jump to Step 20 for data extraction service
Jump to Step 30 for simple init check
Jump to Step 40 for status update service
Search {output_folder}/ for file: bmm-workflow-status.md
Exit workflow
Continue to step 2
Read bmm-workflow-status.md
Extract key-value pairs from status file:
Parse these fields:
- PROJECT_NAME
- PROJECT_TYPE
- PROJECT_LEVEL
- FIELD_TYPE
- CURRENT_PHASE
- CURRENT_WORKFLOW
- NEXT_ACTION
- NEXT_COMMAND
- NEXT_AGENT
Load workflow path file to check for optional steps
Check if current workflow is in progress or complete
What would you like to do?
{{#if CURRENT_WORKFLOW != "complete"}}
1. **Continue current** - Resume {{CURRENT_WORKFLOW}}
{{/if}}
2. **Next required** - {{NEXT_COMMAND}}
{{#if optional_workflows_available}}
3. **Optional workflow** - Choose from available options
{{/if}}
4. **View full status** - See complete status file
5. **Exit** - Return to agent
Your choice:
Handle user selection based on available options
Read {output_folder}/bmm-workflow-status.md if exists
status_exists = false
should_proceed = true
warning = "No status file found. Running without progress tracking."
suggestion = "Consider running workflow-init first for progress tracking"
Return to calling workflow
Parse status file fields
Load workflow path file from WORKFLOW_PATH field
Check if {{calling_workflow}} matches CURRENT_WORKFLOW or NEXT_COMMAND
status_exists = true
current_phase = {{CURRENT_PHASE}}
current_workflow = {{CURRENT_WORKFLOW}}
next_workflow = {{NEXT_COMMAND}}
project_level = {{PROJECT_LEVEL}}
project_type = {{PROJECT_TYPE}}
field_type = {{FIELD_TYPE}}
should_proceed = true
warning = ""
suggestion = "Resuming {{current_workflow}}"
should_proceed = true
warning = ""
suggestion = "Proceeding with planned next step"
Check if calling_workflow is in optional workflows list
should_proceed = true
warning = "Running optional workflow {{calling_workflow}}"
suggestion = "This is optional. Expected next: {{next_workflow}}"
should_proceed = true
warning = "⚠️ Out of sequence: Expected {{next_workflow}}, running {{calling_workflow}}"
suggestion = "Consider running {{next_workflow}} instead, or continue if intentional"
status_file_path = {{path to bmm-workflow-status.md}}
Return control to calling workflow with all template outputs
Read {output_folder}/bmm-workflow-status.md if exists
status_exists = false
error = "No status file to extract data from"
Return to calling workflow
Parse status file completely
status_exists = true
project_name = {{PROJECT_NAME}}
project_type = {{PROJECT_TYPE}}
project_level = {{PROJECT_LEVEL}}
field_type = {{FIELD_TYPE}}
workflow_path = {{WORKFLOW_PATH}}
current_phase = {{CURRENT_PHASE}}
phase_1_complete = {{PHASE_1_COMPLETE}}
phase_2_complete = {{PHASE_2_COMPLETE}}
phase_3_complete = {{PHASE_3_COMPLETE}}
phase_4_complete = {{PHASE_4_COMPLETE}}
Return all parsed fields as template outputs
status_file_path = {{path to bmm-workflow-status.md}}
Return control to calling workflow with requested data
Check if {output_folder}/bmm-workflow-status.md exists
status_exists = true
suggestion = "Status file found. Ready to proceed."
status_exists = false
suggestion = "No status file. Run workflow-init to create one (optional for progress tracking)"
Return immediately to calling workflow
Read {output_folder}/bmm-workflow-status.md
success = false
error = "No status file found. Cannot update."
Return to calling workflow
Parse all current values from status file
Load workflow path file from WORKFLOW_PATH field
Check {{action}} parameter to determine update type
Get {{workflow_name}} parameter (required)
Mark workflow complete:
- Update CURRENT_WORKFLOW to "{{workflow_name}} - Complete"
Find {{workflow_name}} in loaded path YAML
Determine next workflow from path sequence
Update Next Action fields:
- NEXT_ACTION: Description from next workflow in path
- NEXT_COMMAND: Command for next workflow
- NEXT_AGENT: Agent for next workflow
- CURRENT_WORKFLOW: Set to next workflow name (or "Complete" if no more)
- CURRENT_AGENT: Set to next agent
Check if phase complete:
- If {{workflow_name}} is last required workflow in current phase
- Update PHASE_X_COMPLETE to true
- Update CURRENT_PHASE to next phase (if applicable)
Update LAST_UPDATED to {{date}}
Save status file
success = true
next_workflow = {{determined next workflow}}
next_agent = {{determined next agent}}
phase_complete = {{true/false}}
Get {{workflow_name}} parameter (required)
Get {{agent_name}} parameter (optional)
Update current workflow:
- CURRENT_WORKFLOW: {{workflow_name}}
- CURRENT_AGENT: {{agent_name or infer from path}}
Find {{workflow_name}} in path to determine next:
- NEXT_ACTION: Next workflow description
- NEXT_COMMAND: Next workflow command
- NEXT_AGENT: Next workflow agent
Update LAST_UPDATED to {{date}}
Save status file
success = true
success = false
error = "Unknown action: {{action}}. Valid actions: complete_workflow, set_current_workflow"
Return control to calling workflow with template outputs