7.6 KiB
PRD Workflow Router Instructions
This is the INITIAL ASSESSMENT phase - determines which instruction set to load ALWAYS check for existing project-workflow-analysis.md first The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml
Check if {output_folder}/project-workflow-analysis.md exists
If exists: Load the analysis file Check for existing workflow outputs based on level in analysis:
- 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
Previous analysis found (Level {{project_level}}).
Existing documents detected: {{list_existing_docs}}
Options:
- Continue where left off with existing documents
- Start fresh assessment (will archive existing work)
- Review and modify previous analysis
If not exists or starting fresh: Proceed to assessment
What type of planning do you need?
Quick Selection:
- Full project planning (PRD, Tech Spec, etc.)
- UX/UI specification only
- Tech spec only (for small changes)
- Generate AI Frontend Prompt from existing specs
Select an option or describe your needs:
If "UX/UI specification only": LOAD: {installed_path}/ux/instructions-ux.md Pass mode="standalone" to UX instructions Skip remaining router steps
If "Generate AI Frontend Prompt": Check for existing UX spec or PRD {project-root}/bmad/bmm/tasks/ai-fe-prompt.md Exit workflow after prompt generation
If "Tech spec only" or "Full project planning": Continue to step 3 for project assessment
Let's understand your project needs:
1. Project Type:
- Game
- Web application
- Mobile application
- Desktop application
- Backend service/API
- Library/package
- Other - Please specify
2. Project Context:
a. New project (greenfield) b. Adding to existing clean codebase c. Working with messy/legacy code (needs refactoring)
3. What are you building? (brief description)
Detect if project_type == "game"
If project_type == "game": Set workflow_type = "gdd" Skip level classification (GDD workflow handles all game project levels) Jump to step 5 for GDD-specific assessment
Else, based on their description, analyze and suggest scope level:
Examples:
- "Fix login bug" → Suggests Level 0 (single atomic change)
- "Add OAuth to existing app" → Suggests Level 1 (coherent feature)
- "Build internal admin dashboard" → Suggests Level 2 (small system)
- "Create customer portal with payments" → Suggests Level 3 (full product)
- "Multi-tenant SaaS platform" → Suggests Level 4 (platform)
Based on your description, this appears to be a {{suggested_level}} project.
3. Quick Scope Guide - Please confirm or adjust:
- Single atomic change → Bug fix, add endpoint, single file change (Level 0)
- Coherent feature → Add search, implement SSO, new component (Level 1)
- Small complete system → Admin tool, team app, prototype (Level 2)
- Full product → Customer portal, SaaS MVP (Level 3)
- Platform/ecosystem → Enterprise suite, multi-tenant system (Level 4)
4. Do you have existing documentation?
- Product Brief
- Market Research
- Technical docs/Architecture
- None
Based on responses, determine:
Level Classification:
- Level 0: Single atomic change → tech-spec only
- Level 1: Single feature, 1-10 stories → minimal PRD + tech-spec
- Level 2: Small system, 5-15 stories → focused PRD + tech-spec
- Level 3: Full product, 12-40 stories → full PRD + architect handoff
- Level 4: Platform, 40+ stories → enterprise PRD + architect handoff
For brownfield without docs:
- Levels 0-2: Can proceed with context gathering
- Levels 3-4: MUST run architect assessment first
Initialize analysis using analysis_template from workflow.yaml
Capture any technical preferences mentioned during assessment
Generate comprehensive analysis with all assessment data.
project_type project_level instruction_set scope_description story_count epic_count timeline field_type existing_docs team_size deployment_intent expected_outputs workflow_steps next_steps special_notes technical_preferences
Based on project type and level, load ONLY the needed instructions:
If workflow_type == "gdd" (Game projects): LOAD: {installed_path}/gdd/instructions-gdd.md If continuing:
- Load existing GDD.md if present
- Check which sections are complete
- Resume from last completed section
- GDD workflow handles all game project levels internally
If Level 0: LOAD: {installed_path}/tech-spec/instructions-sm.md If continuing:
- Load existing tech-spec.md
- Allow user to review and modify
- Complete any missing sections
If Level 1-2: LOAD: {installed_path}/prd/instructions-med.md If continuing:
- Load existing PRD.md if present
- Check which sections are complete
- Resume from last completed section
- If PRD done, show solutioning handoff instructions
If Level 3-4: LOAD: {installed_path}/prd/instructions-lg.md If continuing:
- Load existing PRD.md and epics.md
- Identify last completed step (check template variables)
- Resume from incomplete sections
- If all done, show architect handoff instructions
Pass continuation context to loaded instruction set:
- continuation_mode: true/false
- last_completed_step: {{step_number}}
- existing_documents: {{document_list}}
The loaded instruction set should check continuation_mode and adjust accordingly