# Workflow Init - Project Setup Instructions
The workflow execution engine is governed by: {project-root}/.bmad/core/tasks/workflow.xml
You MUST have already loaded and processed: workflow-init/workflow.yaml
Communicate in {communication_language} with {user_name}
This workflow handles BOTH new projects AND legacy projects being migrated to BMad Method
Perform comprehensive scan for existing work:
- BMM artifacts: PRD, tech-spec, epics, architecture, UX, brief, research, brainstorm
- Implementation: stories, sprint-status, workflow-status
- Codebase: source directories, package files, git repo
- Check both {output_folder} and {sprint_artifacts} locations
Categorize into one of these states:
- CLEAN: No artifacts or code (or scaffold only)
- PLANNING: Has PRD/spec but no implementation
- ACTIVE: Has stories or sprint status
- LEGACY: Has code but no BMM artifacts
- UNCLEAR: Mixed state needs clarification
What's your project called? {{#if project_name}}(Config shows: {{project_name}}){{/if}}
Store project_name
project_name
Continue to step 3
Exit workflow (already initialized)
How would you like to proceed?
a) **Continue** - Work with existing artifacts
b) **Archive & Start Fresh** - Move old work to archive
c) **Express Setup** - I know exactly what I need
d) **Guided Setup** - Walk me through options
Choice [a/b/c/d]:
Set continuing_existing = true
Store found artifacts
Continue to step 7 (detect track from artifacts)
Archive existing work? (y/n)
Move artifacts to {output_folder}/archive/
Continue to step 3
Jump to step 3 (express path)
Continue to step 4 (guided path)
Setup approach:
a) **Express** - I know what I need
b) **Guided** - Show me the options
Choice [a/b]:
Continue to step 3 (express)
Continue to step 4 (guided)
Is this for:
1) **New project** (greenfield)
2) **Existing codebase** (brownfield)
Choice [1/2]:
Set field_type based on choice
Planning approach:
1. **Quick Flow** - Minimal planning, fast to code
2. **BMad Method** - Full planning for complex projects
3. **Enterprise Method** - Extended planning with security/DevOps
Choice [1/2/3]:
Map to selected_track: quick-flow/method/enterprise
field_type
selected_track
Jump to step 6 (discovery options)
Tell me about what you're working on. What's the goal?
Store user_description
Analyze for field type indicators:
- Brownfield: "existing", "current", "enhance", "modify"
- Greenfield: "new", "build", "create", "from scratch"
- If codebase exists, default to brownfield unless user indicates scaffold
I see existing code. Are you:
1) **Modifying** existing codebase (brownfield)
2) **Starting fresh** - code is just scaffold (greenfield)
Choice [1/2]:
Set field_type based on answer
Set based on codebase presence
Check for game development keywords
Choice:
Exit workflow
user_description
field_type
Continue to step 5
Which approach fits best?
1. Quick Flow
2. BMad Method {{#if recommended}}(recommended){{/if}}
3. Enterprise Method
4. Help me decide
Choice [1/2/3/4]:
What concerns you about choosing?
Provide tailored guidance based on concerns
Loop back to choice
Map choice to selected_track
selected_track
Determine available discovery workflows based on:
- field_type (greenfield gets product-brief option)
- selected_track (quick-flow skips product-brief)
Select any you'd like to include:
1. 🧠 **Brainstorm** - Creative exploration and ideation
2. 🔍 **Research** - Technical/competitive analysis
3. 📋 **Product Brief** - Strategic product planning (recommended)
Enter numbers (e.g., "1,3" or "all" or "none"):
Include any of these?
1. 🧠 **Brainstorm** - Creative exploration
2. 🔍 **Research** - Domain analysis
Enter numbers (e.g., "1,2" or "none"):
Parse selections and set:
- brainstorm_requested
- research_requested
- product_brief_requested (if applicable)
brainstorm_requested
research_requested
product_brief_requested
Analyze artifacts to detect track:
- Has PRD → BMad Method
- Has tech-spec only → Quick Flow
- Has Security/DevOps → Enterprise Method
Correct? (y/n)
Which track instead?
1. Quick Flow
2. BMad Method
3. Enterprise Method
Choice:
Set selected_track
selected_track
Load path file: {path_files}/{{selected_track}}-{{field_type}}.yaml
Build workflow_items from path file
Scan for existing completed work and update statuses
Set generated date
generated
workflow_path_file
workflow_items
Create workflow tracking file? (y/n)
Generate YAML from template with all variables
Save to {output_folder}/bmm-workflow-status.yaml
Identify next workflow and agent