# PRD Workflow Router Instructions This workflow requires a workflow status file to exist ALWAYS check for existing bmm-workflow-status.md first If no status file exists, direct user to run workflow-status first The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml Check if any bmm-workflow-status\*.md files exist in {output_folder}/ **⚠️ No Workflow Status File Found** The `plan-project` workflow requires an existing workflow status file. Please run `workflow-status` first to: - Map out your complete workflow journey - Determine project type and level - Create the status file with your planned workflow **To proceed:** 1. Load any agent (Analyst, PM, or use bmad-master) 2. Run: `workflow-status` 3. Complete the workflow planning 4. Return here to continue with `plan-project` Or tell me: "run workflow-status" Exit workflow - cannot proceed without status file Find the most recent bmm-workflow-status.md file Load the status file Extract key information: **From Status File:** - project_type: From "Project Type:" field - project_level: From "Project Level:" field (0, 1, 2, 3, or 4) - field_type: From "Greenfield/Brownfield:" field - planned_workflow: From "Planned Workflow Journey" table - current_step: From "Current Step:" field - next_step: From "Next Step:" field Validate this workflow is the correct next step **⚠️ Workflow Sequence Warning** According to your status file, your next planned step is: **{{next_step}}** But you're trying to run: **plan-project** Options: 1. **Continue anyway** - Run plan-project (status file will be updated) 2. **Follow planned workflow** - Run {{next_step}} instead 3. **Update workflow plan** - Run workflow-status to revise plan Your choice (1-3): **Recommended Next Step:** Load agent: {{next_step_agent}} Run: {{next_step}} Or tell me: "run {{next_step}}" Exit workflow **Update Workflow Plan:** Run: `workflow-status` After updating your plan, return here if needed. Exit workflow Set status_file_path = existing file path Check for existing workflow outputs based on level in status file: - Level 0: Check for tech-spec.md - Level 1-2: Check for PRD.md, epic-stories.md, tech-spec.md - Level 3-4: Check for PRD.md, epics.md Found existing workflow status file: bmm-workflow-status.md (Level {{project_level}}) **Existing documents detected:** {{list_existing_docs}} Options: 1. **Continue** - Update existing documents 2. **Start fresh** - Archive old documents, create new ones 3. **Exit** - I'm not ready to regenerate these Your choice (1-3): Set continuation_mode = true Will update existing documents Archive existing documents to: "{output_folder}/archive/" Set continuation_mode = false Will create fresh documents Exit workflow Set continuation_mode = false Ready to create new documents **Status File Data Loaded:** - Project Type: {{project_type}} - Project Level: {{project_level}} - Field Type: {{field_type}} - Current Phase: {{current_phase}} What type of planning do you need? **Based on your project (Level {{project_level}} {{project_type}}):** {{#if project_level == 0}} **Recommended:** Tech spec only (Level 0 path) {{/if}} {{#if project_level == 1}} **Recommended:** Tech spec + epic/stories (Level 1 path) {{/if}} {{#if project_level >= 2}} **Recommended:** Full PRD + epics (Level {{project_level}} path) {{/if}} **Other Options:** 1. **Follow recommended path** (recommended) 2. **UX/UI specification only** 3. **Generate AI Frontend Prompt** (from existing specs) 4. **Describe custom needs** Select an option (1-4): Capture user selection as {{planning_type}} {installed_path}/ux/workflow.yaml Pass mode="standalone" to UX workflow Exit router workflow (skip remaining steps) Check for existing UX spec or PRD {project-root}/bmad/bmm/tasks/ai-fe-prompt.md Exit router workflow after prompt generation Use project_level and project_type from status file to route to appropriate workflow Read status file to check if additional context is needed **⚠️ Brownfield Documentation Needed** Your status file indicates this brownfield project needs codebase documentation. The document-project workflow was flagged in your planned workflow. **Options:** 1. **Generate docs now** - Run document-project workflow (~10-15 min) 2. **Skip for now** - I'll provide context through questions 3. **Already have docs** - I have documentation to reference Choose option (1-3): Invoke document-project workflow before continuing {project-root}/bmad/bmm/workflows/1-analysis/document-project/workflow.yaml Wait for documentation to complete Update status file: Mark document-project as "Complete" in planned workflow Set gather_context_via_questions = true Will ask detailed questions during spec generation Set has_documentation = true Will reference existing documentation **Project Level Not Yet Determined** Your status file indicates the project level will be determined during planning. **Based on what you want to build, what level best describes your project?** 0. **Single atomic change** - Bug fix, add endpoint, single file change 1. **Coherent feature** - Add search, implement SSO, new component (2-3 stories) 2. **Small complete system** - Admin tool, team app, prototype (multiple epics) 3. **Full product** - Customer portal, SaaS MVP (subsystems, integrations) 4. **Platform/ecosystem** - Enterprise suite, multi-tenant system Your level (0-4): Capture confirmed_level Update status file with confirmed project_level **Project Type Clarification Needed** Please describe your project type so we can load the correct planning template. Examples: web, mobile, desktop, backend, library, cli, game, embedded, data, extension, infra Your project type: Capture and map to project_type_id from project-types.csv Update status file with confirmed project_type Update status file before proceeding: current_workflow Set to: "tech-spec (Level 0 - in progress)" Set to: "tech-spec (Level 1 - in progress)" Set to: "PRD (Level {{project_level}} - in progress)" current_step Set to: "plan-project" progress_percentage Increment by 10% (planning started) Add to decisions log: ``` - **{{date}}**: Started plan-project workflow. Routing to {{workflow_type}} workflow based on Level {{project_level}} {{project_type}} project. ``` Based on project type and level from status file, load ONLY the needed instructions: {installed_path}/gdd/workflow.yaml GDD workflow handles all game project levels internally Pass status_file_path and continuation_mode to workflow {installed_path}/tech-spec/workflow.yaml Pass level=0 to tech-spec workflow Tech-spec workflow will generate tech-spec + 1 story Pass status_file_path and continuation_mode to workflow {installed_path}/tech-spec/workflow.yaml Pass level=1 to tech-spec workflow Tech-spec workflow will generate tech-spec + epic + 2-3 stories Pass status_file_path and continuation_mode to workflow {installed_path}/prd/workflow.yaml Pass level=2 context to PRD workflow (loads instructions-med.md) Pass status_file_path and continuation_mode to workflow {installed_path}/prd/workflow.yaml Pass level context to PRD workflow (loads instructions-lg.md) Pass status_file_path and continuation_mode to workflow Pass context to invoked workflow: - status_file_path: {{status_file_path}} - continuation_mode: {{continuation_mode}} - existing_documents: {{document_list}} - project_level: {{project_level}} - project_type: {{project_type}} - field_type: {{field_type}} - gather_context_via_questions: {{gather_context_via_questions}} (if brownfield without docs) The invoked workflow will update the status file when complete