12 KiB
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 No workflow status found. To get started:Load analyst agent and run: workflow-init
This will guide you through project setup and create your workflow path. 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
Project: {{PROJECT_NAME}} (Level {{PROJECT_LEVEL}} {{PROJECT_TYPE}}) Phase: {{CURRENT_PHASE}} Current Workflow: {{CURRENT_WORKFLOW}}
{{#if CURRENT_PHASE == "4-Implementation"}} Development Queue:
- TODO: {{TODO_STORY}} - {{TODO_TITLE}}
- IN PROGRESS: {{IN_PROGRESS_STORY}} - {{IN_PROGRESS_TITLE}} {{/if}}
🎯 Your Options
{{#if CURRENT_WORKFLOW != "complete"}} Continue in progress:
- {{CURRENT_WORKFLOW}} ({{CURRENT_AGENT}} agent) {{/if}}
Next required step:
- Command:
{{NEXT_COMMAND}} - Agent: {{NEXT_AGENT}}
{{#if optional_workflows_available}} Optional workflows available: {{#each optional_workflows}}
- {{workflow_name}} ({{agent}}) {{/each}} {{/if}}
{{#if CURRENT_WORKFLOW != "complete"}}
- Continue current - Resume {{CURRENT_WORKFLOW}} {{/if}}
- Next required - {{NEXT_COMMAND}} {{#if optional_workflows_available}}
- Optional workflow - Choose from available options {{/if}}
- View full status - See complete status file
- 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_COMMANDstatus_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<check if="is optional">
<template-output>should_proceed = true</template-output>
<template-output>warning = "Running optional workflow {{calling_workflow}}"</template-output>
<template-output>suggestion = "This is optional. Expected next: {{next_workflow}}"</template-output>
</check>
<check if="not optional">
<template-output>should_proceed = true</template-output>
<template-output>warning = "⚠️ Out of sequence: Expected {{next_workflow}}, running {{calling_workflow}}"</template-output>
<template-output>suggestion = "Consider running {{next_workflow}} instead, or continue if intentional"</template-output>
</check>
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 outputsstatus_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)<action>Mark workflow complete:</action>
- Update CURRENT_WORKFLOW to "{{workflow_name}} - Complete"
<action>Find {{workflow_name}} in loaded path YAML</action>
<action>Determine next workflow from path sequence</action>
<action>Update Next Action fields:</action>
- 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
<action>Check if phase complete:</action>
- If {{workflow_name}} is last required workflow in current phase
- Update PHASE_X_COMPLETE to true
- Update CURRENT_PHASE to next phase (if applicable)
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
<template-output>next_workflow = {{determined next workflow}}</template-output>
<template-output>next_agent = {{determined next agent}}</template-output>
<template-output>phase_complete = {{true/false}}</template-output>
Get {{workflow_name}} parameter (required)
Get {{agent_name}} parameter (optional)
<action>Update current workflow:</action>
- CURRENT_WORKFLOW: {{workflow_name}}
- CURRENT_AGENT: {{agent_name or infer from path}}
<action>Find {{workflow_name}} in path to determine next:</action>
- NEXT_ACTION: Next workflow description
- NEXT_COMMAND: Next workflow command
- NEXT_AGENT: Next workflow agent
<action>Update LAST_UPDATED to {{date}}</action>
<action>Save status file</action>
<template-output>success = true</template-output>
success = false
error = "Unknown action: {{action}}. Valid actions: complete_workflow, set_current_workflow"
Return control to calling workflow with template outputs