# Workflow Status - Master Router and Status Tracker 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/1-analysis/workflow-status/workflow.yaml Communicate all responses in {communication_language} This is the UNIVERSAL ENTRY POINT for all BMM workflows Can be invoked by bmad-master, analyst, or pm agents Checks for existing workflow status and suggests next actions If no status exists, helps user plan their workflow approach Search {output_folder}/ for files matching pattern: bmm-workflow-status\*.md Use glob or list_files to find all matching files Find the most recent file (by date in filename: bmm-workflow-status.md) Set status_file_found = true Set status_file_path = most recent file path Go to Step 2 (Read existing status) Set status_file_found = false Go to Step 3 (Initial workflow planning) Read {status_file_path} Extract key information: **Project Context:** - project_name: From "Project:" field - start_date: From "Created:" field - last_updated: From "Last Updated:" field **Current State:** - current_phase: From "Current Phase:" field (1-Analysis, 2-Plan, 3-Solutioning, 4-Implementation) - current_workflow: From "Current Workflow:" field - progress_percentage: From "Overall Progress:" field - project_level: From "Project Level:" field (0, 1, 2, 3, or 4) - project_type: From "Project Type:" field - field_type: From "Greenfield/Brownfield:" field **Phase Completion:** - phase_1_complete: Check if "1-Analysis" checkbox is checked - phase_2_complete: Check if "2-Plan" checkbox is checked - phase_3_complete: Check if "3-Solutioning" checkbox is checked - phase_4_complete: Check if "4-Implementation" checkbox is checked **Implementation Progress (if Phase 4):** - Read "### Implementation Progress (Phase 4 Only)" section - Extract TODO story (if exists) - Extract IN PROGRESS story (if exists) - Extract BACKLOG count - Extract DONE count **Next Action:** - next_action: From "What to do next:" field - next_command: From "Command to run:" field - next_agent: From "Agent to load:" field Analyze the current state to determine recommendation Display comprehensive status summary **πŸ“Š Current Workflow Status** **Project:** {{project_name}} **Started:** {{start_date}} **Last Updated:** {{last_updated}} **Current Phase:** {{current_phase}} ({{progress_percentage}}% complete) **Current Workflow:** {{current_workflow}} **Phase Completion:** - [{{phase_1_complete ? 'x' : ' '}}] Phase 1: Analysis - [{{phase_2_complete ? 'x' : ' '}}] Phase 2: Planning - [{{phase_3_complete ? 'x' : ' '}}] Phase 3: Solutioning ({{project_level < 3 ? 'skipped for Level ' + project_level : 'required'}}) - [{{phase_4_complete ? 'x' : ' '}}] Phase 4: Implementation **Project Details:** - **Level:** {{project_level}} ({{get_level_description(project_level)}}) - **Type:** {{project_type}} - **Context:** {{field_type}} {{#if current_phase == '4-Implementation'}} **Implementation Progress:** - **BACKLOG:** {{backlog_count}} stories - **TODO:** {{todo_story_id}} ({{todo_story_status}}) - **IN PROGRESS:** {{current_story_id}} ({{current_story_status}}) - **DONE:** {{done_count}} stories ({{done_points}} points) {{/if}} --- **🎯 Recommended Next Action:** {{next_action}} **Command:** {{next_command}} **Agent:** {{next_agent}} Would you like to: 1. **Proceed with recommended action** ({{next_command}}) 2. **View detailed status** (show full status file) 3. **Change workflow** (modify current workflow or start new phase) 4. **Display agent menu** (see all available options) 5. **Exit** (return to agent) Select option (1-5): Suggest loading the recommended agent and running the command **To proceed:** Load agent: `{{next_agent}}` Run command: `{{next_command}}` Or tell me: "load {{next_agent}} and {{next_command}}" Display full status file contents Return to menu Go to Step 4 (Change workflow) Go to Step 5 (Display agent menu) Exit workflow Display welcome message in {communication_language} **πŸš€ Welcome to BMad Method Workflows, {user_name}!** No workflow status file found. Let's plan your complete workflow journey. This step will map out your ENTIRE workflow before executing anything Goal: Document planned phases, current step, and next step in status file **Step 1: Project Context** **Is this a new or existing codebase?** a. **Greenfield** - Starting from scratch b. **Brownfield** - Adding to existing codebase Your choice (a/b): Capture field_type = "greenfield" or "brownfield" **Step 2: Brownfield Documentation Status** Do you have: - Architecture documentation? - Code structure overview? - API documentation? - Clear understanding of existing patterns? Options: a. **Yes** - I have good documentation b. **No** - Codebase is undocumented or poorly documented c. **Partial** - Some docs exist but incomplete Your choice (a/b/c): Capture brownfield_docs_status **⚠️ Documentation Needed** For accurate planning, brownfield projects benefit from codebase documentation. We'll add `document-project` to your planned workflow. Set needs_documentation = true Set needs_documentation = false Set needs_documentation = false **Step 3: Project Type** What type of project are you building? 1. **Game** - Video games for PC, console, mobile, or web 2. **Web Application** - Websites, web apps, SPAs 3. **Mobile Application** - iOS, Android apps 4. **Desktop Application** - Windows, macOS, Linux apps 5. **Backend/API Service** - Backend services, APIs, microservices 6. **Library/SDK** - Reusable libraries, packages, SDKs 7. **CLI Tool** - Command-line tools and utilities 8. **Embedded System** - IoT, firmware, embedded devices 9. **Data/ML/Analytics** - Data pipelines, ML projects, analytics 10. **Browser Extension** - Chrome, Firefox extensions 11. **Infrastructure/DevOps** - Terraform, K8s operators, CI/CD 12. **Other** - Describe your project type Your choice (1-12): Capture project_type_choice Map choice to project_type_id using project-types.csv: - 1 β†’ game - 2 β†’ web - 3 β†’ mobile - 4 β†’ desktop - 5 β†’ backend - 6 β†’ library - 7 β†’ cli - 8 β†’ embedded - 9 β†’ data - 10 β†’ extension - 11 β†’ infra - 12 β†’ custom (capture description) Set project_type = mapped project_type_id **Step 4: User Interface Components** Does your project involve user-facing UI components? a. **Yes** - Project has user interface elements (web pages, mobile screens, desktop UI, game UI) b. **No** - Backend-only, API, CLI, or no visual interface Your choice (a/b): Capture has_ui_components Set needs_ux_workflow = true **βœ… UX Workflow Detected** Since your project has UI components, we'll include the UX specification workflow in Phase 2. This ensures proper UX/UI design happens between PRD and architecture/implementation. Set needs_ux_workflow = false **Step 5: Understanding Your Workflow** Before we plan your workflow, let's determine the scope and complexity of your project. The BMad Method uses 5 project levels (0-4) that determine which phases you'll need: - **Level 0:** Single atomic change (1 story) - Phases 2 β†’ 4 - **Level 1:** Small feature (2-3 stories, 1 epic) - Phases 2 β†’ 4 - **Level 2:** Medium project (multiple epics) - Phases 2 β†’ 4 - **Level 3:** Complex system (subsystems, integrations) - Phases 2 β†’ 3 β†’ 4 - **Level 4:** Enterprise scale (multiple products) - Phases 2 β†’ 3 β†’ 4 **Optional Phase 1 (Analysis):** Brainstorming, research, and brief creation can precede any level. **Step 6: Project Scope Assessment** Do you already know your project's approximate size/scope? a. **Yes** - I can describe the general scope b. **No** - Not sure yet, need help determining it c. **Want analysis first** - Do brainstorming/research before deciding Your choice (a/b/c): Capture scope_knowledge **Based on the descriptions above, what level best describes your project?** 0. Single atomic change (bug fix, tiny feature) 1. Small coherent feature (2-3 stories) 2. Medium project (multiple features/epics) 3. Complex system (subsystems, architectural decisions) 4. Enterprise scale (multiple products/systems) Your estimated level (0-4): Capture estimated_level Set level_known = true **Level determination deferred** {{#if scope_knowledge == "b"}} No problem! The `plan-project` workflow will help you determine the project level through guided questions. {{/if}} {{#if scope_knowledge == "c"}} Great! Analysis workflows will help clarify scope before determining the level. {{/if}} We'll determine your project level during Phase 2 (Planning). Set level_known = false Set estimated_level = "TBD" **Step 7: Choose Your Starting Point** Now let's determine where you want to begin: **Option A: Full Analysis Phase First** - Brainstorming (explore ideas, validate concepts) - Research (market, technical, competitive analysis) - Product/Game Brief (strategic foundation) β†’ Best for: New ideas, uncertain requirements, need validation **Option B: Skip to Planning** - You know what to build - Jump to PRD/GDD/Tech-Spec generation β†’ Best for: Clear requirements, existing ideas **Option C: Just Show Menu** - Create status file with planned workflow - I'll manually choose which workflow to run first β†’ Best for: Experienced users, custom paths Your choice (A/B/C): Capture starting_point **Full Analysis - Choose your first workflow:** 1. **brainstorm-project** (Analyst) - Explore software solution ideas 2. **brainstorm-game** (Game Designer) - Game concept ideation 3. **research** (Analyst) - Market/technical research 4. **product-brief** (Analyst) - Strategic product foundation 5. **game-brief** (Game Designer) - Game design foundation Which workflow? (1-5): Capture first_workflow Set include_analysis = true Set include_analysis = false Set first_workflow = "plan-project" Set include_analysis = false Set first_workflow = "user-choice" Now build the complete planned workflow **πŸ—ΊοΈ Your Planned Workflow** Based on your responses, here's your complete workflow journey: Build planned_workflow array with all phases in order: Add to planned_workflow: - Phase: "1-Analysis" - Step: "document-project" - Agent: "Analyst" - Description: "Generate brownfield codebase documentation" - Status: "Planned" Add analysis workflows to planned_workflow based on first_workflow choice {{#if first_workflow == "brainstorm-project"}} - Phase: "1-Analysis", Step: "brainstorm-project", Agent: "Analyst", Status: "Planned" - Phase: "1-Analysis", Step: "research (optional)", Agent: "Analyst", Status: "Optional" - Phase: "1-Analysis", Step: "product-brief", Agent: "Analyst", Status: "Planned" {{/if}} {{#if first_workflow == "brainstorm-game"}} - Phase: "1-Analysis", Step: "brainstorm-game", Agent: "Game Designer", Status: "Planned" - Phase: "1-Analysis", Step: "research (optional)", Agent: "Analyst", Status: "Optional" - Phase: "1-Analysis", Step: "game-brief", Agent: "Game Designer", Status: "Planned" {{/if}} {{#if first_workflow == "research"}} - Phase: "1-Analysis", Step: "research", Agent: "Analyst", Status: "Planned" - Phase: "1-Analysis", Step: "product-brief or game-brief", Agent: "Analyst/Game Designer", Status: "Planned" {{/if}} {{#if first_workflow == "product-brief"}} - Phase: "1-Analysis", Step: "product-brief", Agent: "Analyst", Status: "Planned" {{/if}} {{#if first_workflow == "game-brief"}} - Phase: "1-Analysis", Step: "game-brief", Agent: "Game Designer", Status: "Planned" {{/if}} Always add Phase 2 (required for all levels) - route based on project type and level Add game planning workflow - Phase: "2-Plan" - Step: "gdd" - Agent: "PM" - Description: "Create Game Design Document" - Status: "Planned" Add tech-spec workflow (Levels 0-1) - Phase: "2-Plan" - Step: "tech-spec" - Agent: "Architect" - Description: "Create technical specification and stories" - Status: "Planned" Add PRD workflow (Levels 2-4) - Phase: "2-Plan" - Step: "prd" - Agent: "PM" - Description: "Create Product Requirements Document and epics" - Status: "Planned" Add conditional planning note - Phase: "2-Plan" - Step: "TBD - Level 0-1 β†’ tech-spec, Level 2-4 β†’ prd" - Agent: "PM or Architect" - Description: "Workflow determined after level assessment" - Status: "Conditional" Add UX workflow to Phase 2 planning (runs after PRD, before Phase 3) - Phase: "2-Plan" - Step: "ux-spec" - Agent: "PM" - Description: "UX/UI specification (user flows, wireframes, components)" - Status: "Planned" - Note: "Required for projects with UI components" Add Phase 3 (required for Level 3-4) - Phase: "3-Solutioning" - Step: "solution-architecture" - Agent: "Architect" - Description: "Design overall architecture" - Status: "Planned" - Phase: "3-Solutioning" - Step: "tech-spec (per epic, JIT)" - Agent: "Architect" - Description: "Epic-specific technical specs" - Status: "Planned" Add conditional Phase 3 note - Phase: "3-Solutioning" - Step: "TBD - depends on level from Phase 2" - Agent: "Architect" - Description: "Required if Level 3-4, skipped if Level 0-2" - Status: "Conditional" Always add Phase 4 (implementation) - Phase: "4-Implementation" - Step: "create-story (iterative)" - Agent: "SM" - Description: "Draft stories from backlog" - Status: "Planned" - Phase: "4-Implementation" - Step: "story-ready" - Agent: "SM" - Description: "Approve story for dev" - Status: "Planned" - Phase: "4-Implementation" - Step: "story-context" - Agent: "SM" - Description: "Generate context XML" - Status: "Planned" - Phase: "4-Implementation" - Step: "dev-story (iterative)" - Agent: "DEV" - Description: "Implement stories" - Status: "Planned" - Phase: "4-Implementation" - Step: "story-approved" - Agent: "DEV" - Description: "Mark complete, advance queue" - Status: "Planned" Display the complete planned workflow **πŸ“‹ Your Complete Planned Workflow:** {{#each planned_workflow}} **{{phase}}** - {{step}} - Agent: {{agent}} - Description: {{description}} - Status: {{status}} {{/each}} --- **Current Step:** Workflow Definition Phase (this workflow) **Next Step:** {{planned_workflow[0].step}} ({{planned_workflow[0].agent}} agent) **Ready to create your workflow status file?** This will create: `bmm-workflow-status.md` The status file will document: - Your complete planned workflow (phases and steps) - Current phase: "Workflow Definition" - Next action: {{planned_workflow[0].step}} Create status file? (y/n) Create bmm-workflow-status.md file Set current_phase = "Workflow Definition" Set next_action = planned_workflow[0].step Set next_agent = planned_workflow[0].agent Include complete planned_workflow in status file **βœ… Status file created, {user_name}!** File: `bmm-workflow-status.md` **To proceed with your first step:** {{#if needs_documentation == true AND planned_workflow[0].step == "document-project"}} Load Analyst: `bmad analyst document-project` After documentation is complete, return to check status: `bmad analyst workflow-status` {{/if}} {{#if planned_workflow[0].step != "document-project" AND planned_workflow[0].step != "user-choice"}} {{#if planned_workflow[0].step == "gdd"}} Load PM: `bmad pm gdd` {{else if planned_workflow[0].step == "tech-spec"}} Load Architect: `bmad architect tech-spec` {{else if planned_workflow[0].step == "prd"}} Load PM: `bmad pm prd` {{else}} Load {{planned_workflow[0].agent}}: `bmad {{lowercase planned_workflow[0].agent}} {{planned_workflow[0].step}}` {{/if}} {{/if}} {{#if planned_workflow[0].step == "user-choice"}} Your status file is ready! Run `workflow-status` anytime to see recommendations. Choose any workflow from the menu to begin. {{/if}} You can always check your status with: `workflow-status` Go to Step 5 (Display agent menu) **Change Workflow Options:** 1. **Start new workflow** (will archive current status, create new dated file) 2. **Jump to different phase** (manual phase override) 3. **Modify current workflow** (change current_workflow field) 4. **View phase options** (see what's available for current level) 5. **Cancel** (return to status display) Your choice (1-5): Handle workflow change based on choice **Start New Workflow** This will: - Archive current status: `bmm-workflow-status.md` β†’ `archive/` - Create new status: `bmm-workflow-status.md` - Start fresh assessment Continue? (y/n) **To start new workflow:** Run: `bmad analyst workflow-status` This will guide you through fresh workflow assessment and create a new status file. **Jump to Phase:** Current phase: {{current_phase}} Available phases: 1. Phase 1: Analysis 2. Phase 2: Planning 3. Phase 3: Solutioning ({{project_level >= 3 ? 'required for your level' : 'skipped for Level ' + project_level}}) 4. Phase 4: Implementation Which phase? (1-4) Provide guidance for jumping to selected phase Display comprehensive agent menu based on current context **πŸ“‹ BMad Method Agent Menu** {{#if status_file_found}} **Current Phase:** {{current_phase}} {{/if}} **Available Workflows by Phase:** **Phase 1: Analysis (Optional)** - `brainstorm-project` - Software solution exploration - `brainstorm-game` - Game concept ideation - `research` - Market/technical research - `product-brief` - Strategic product foundation - `game-brief` - Game design foundation **Phase 2: Planning (Required)** - `prd` - Product Requirements Document (Level 2-4 software projects) - `tech-spec` - Technical specification (Level 0-1 software projects) - `gdd` - Game Design Document (game projects) - `ux-spec` - UX/UI specification (for projects with UI components) **Phase 3: Solutioning (Level 3-4 Only)** - `solution-architecture` - Overall architecture design - `tech-spec` - Epic-specific technical specs (JIT) **Phase 4: Implementation (Iterative)** - `create-story` - Draft story from TODO - `story-ready` - Approve story for development - `story-context` - Generate context XML - `dev-story` - Implement story - `story-approved` - Mark story done - `review-story` - Quality validation - `correct-course` - Handle issues - `retrospective` - Epic learnings **Utility Workflows:** - `workflow-status` - Check status and get recommendations (you are here!) {{#if status_file_found}} **🎯 Recommended for Your Current Phase ({{current_phase}}):** {{#if current_phase == '1-Analysis'}} Continue analysis or move to Phase 2 Planning (prd/tech-spec/gdd based on your project) {{/if}} {{#if current_phase == '2-Plan'}} {{#if project_level < 2}} Ready for Phase 4! Run `create-story` (SM agent) {{else if project_level == 2}} Run `tech-spec` workflow for lightweight technical planning, then Phase 4 {{else}} Ready for Phase 3! Run `solution-architecture` (Architect agent) {{/if}} {{/if}} {{#if current_phase == '3-Solutioning'}} Continue with tech-specs or move to Phase 4 `create-story` {{/if}} {{#if current_phase == '4-Implementation'}} **Current Story:** {{todo_story_id || current_story_id || 'Check status file'}} **Next Action:** {{next_command}} {{/if}} {{/if}} Would you like to: 1. Run a specific workflow (tell me which one) 2. Return to status display 3. Exit Your choice: