fix: ChatBubble crash and DeepSeek API compatibility

- Fix ChatBubble to handle non-string content with String() wrapper
- Fix API route to use generateText for non-streaming requests
- Add @ai-sdk/openai-compatible for non-OpenAI providers (DeepSeek, etc.)
- Use Chat Completions API instead of Responses API for compatible providers
- Update ChatBubble tests and fix component exports to kebab-case
- Remove stale PascalCase ChatBubble.tsx file
This commit is contained in:
Max
2026-01-26 16:55:05 +07:00
parent 6b113e0392
commit e9e6fadb1d
544 changed files with 113077 additions and 427 deletions

View File

@@ -0,0 +1,262 @@
---
name: 'step-00-conversion'
description: 'Convert existing workflow to BMAD compliant format by reading all instructions and extracting plan'
nextStepFile: './step-02-classification.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
---
# Step 0: Workflow Conversion
## STEP GOAL:
Convert an existing workflow (any format) to BMAD compliant format by fully reading and understanding every instruction, extracting the essence, and creating a plan document.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER skip reading the entire source workflow
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous converter
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow analyst and conversion specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow architecture expertise, user brings their existing workflow
- ✅ Together we will extract the essence and rebuild compliantly
### Step-Specific Rules:
- 🎯 Focus on understanding the COMPLETE existing workflow
- 🚫 FORBIDDEN to skip any instruction or file
- 💬 Read EVERYTHING - instructions.md, workflow.yaml, step files, templates
- 📋 Document the essence succinctly
## EXECUTION PROTOCOLS:
- 🎯 Load and read the ENTIRE source workflow
- 💾 Extract: goal, steps, output, input requirements
- 📖 Create plan with conversionFrom metadata
- 🚫 FORBIDDEN to proceed without complete understanding
## CONTEXT BOUNDARIES:
- User provides existing workflow path (from routing or direct)
- This REPLACES step-01-discovery - we skip to step-02-classification
- The source workflow can be ANY format (legacy XML, partial, other systems)
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Get Source Workflow Path
**If path was passed from routing (e.g., from edit workflow):**
- Use `{sourceWorkflowPath}` provided
**If no path was passed:**
"I can help you convert an existing workflow to BMAD compliant format.
**Please provide the path to the workflow you want to convert:**
This could be:
- A folder containing workflow.md
- A folder with workflow.yaml (legacy format)
- A folder with instructions.md
- Any workflow from another system
**Path:** {user provides path}"
### 2. Load EVERYTHING - DO NOT BE LAZY
"**Loading source workflow for complete analysis...**
**CRITICAL:** I will read EVERY file in this workflow to understand it completely."
**Load these files based on what exists:**
**If workflow.md exists:**
- Load workflow.md completely
- Load all step files (steps/*, steps-c/*, steps-v/*, steps-e/*)
- Load all data files (data/*)
- Load all templates (templates/*)
**If workflow.yaml exists (legacy XML format):**
- Load workflow.yaml completely
- Load instructions.md completely
- Load all step files, templates, data
**If other format:**
- Load every file that exists
- Read everything to understand the structure
**⚠️ DO NOT BE LAZY - Load and READ COMPLETELY:**
For each step file, read:
- The STEP GOAL
- All MANDATORY EXECUTION RULES
- All instructions in EXECUTION PROTOCOLS
- All menu options
- All templates and outputs
"**✅ Source workflow loaded completely**
**Files read:** {count} files
**Format detected:** {format}
**Structure identified:** {brief description}"
### 3. Extract and Document Workflow Essence
Create the workflow plan with complete extraction:
"**Extracting workflow essence...**"
Create `{workflowPlanFile}`:
```markdown
---
conversionFrom: '{sourceWorkflowPath}'
originalFormat: '{detected format}'
stepsCompleted: ['step-00-conversion']
created: {current date}
status: CONVERSION
---
# Workflow Creation Plan
## Conversion Source
**Original Path:** {sourceWorkflowPath}
**Original Format:** {workflow.yaml / workflow.md / custom / etc.}
**Detected Structure:** {describe what was found}
---
## Original Workflow Analysis
### Goal (from source)
{Extract the exact goal from the source workflow}
### Original Steps (Complete List)
{Create succinct bullet list of EVERY step from the source:}
**Step 1:** {Step name} - {Brief purpose}
**Step 2:** {Step name} - {Brief purpose}
**Step 3:** {Step name} - {Brief purpose}
...
**Step N:** {Step name} - {Brief purpose}
### Output / Deliverable
{What does this workflow produce?}
### Input Requirements
{What inputs does this workflow need from the user?}
### Key Instructions to LLM
{Extract the key instruction patterns - how does the workflow talk to the LLM?
What style? What level of detail? What collaborative approach?}
---
## Conversion Notes
**What works well in original:**
{List strengths to preserve}
**What needs improvement:**
{List issues to address}
**Compliance gaps identified:**
{List what's missing for BMAD compliance}
```
### 4. Present Extracted Information to User
"**I've analyzed your existing workflow completely. Here's what I found:**
---
**Workflow Goal:**
{goal from analysis}
**Steps ({count}):**
{Display succinct bullet list}
**Output:**
{what it produces}
**Input Requirements:**
{what it needs from user}
---
**Format:** {originalFormat}
**Compliance Status:** {compliant / non-compliant / partial}
**Key observations:**
{Share 2-3 key insights about the workflow}"
### 5. Discovery Questions for Conversion
Even though this is a conversion, we need to understand some things:
"**A few questions to ensure the conversion captures your intent:**
1. **What's working well** in this workflow that we should definitely preserve?
2. **What problems** have you encountered with this workflow that we should fix?
3. **Any missing features** or improvements you'd like to add during conversion?
4. **Who will use** the converted workflow - same audience or different?"
### 6. Confirm and Proceed to Classification
"**Based on my analysis and your answers, I'm ready to proceed with classification.**
**Next step:** We'll classify the workflow type (document, action, interactive, autonomous, meta), determine structure (continuable or single-session), and decide if it needs validation steps.
**Ready to proceed?** [C] Continue to Classification"
#### Menu Handling Logic:
- IF C: Update workflowPlanFile with conversion notes, then load, read entirely, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN the entire source workflow has been read and analyzed, and the plan document contains the complete extraction (goal, steps, output, inputs) and conversionFrom metadata, will you then load and read fully `{nextStepFile}` to execute classification.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- ENTIRE source workflow loaded and read
- Every step documented in plan
- Goal, output, inputs extracted
- conversionFrom metadata set
- User confirms understanding
- Proceeding to classification
### ❌ SYSTEM FAILURE:
- Not loading all files in source workflow
- Skipping step files
- Not reading instructions completely
- Missing steps in documentation
- Not setting conversionFrom metadata
- Proceeding without complete understanding
**Master Rule:** DO NOT BE LAZY. Read EVERYTHING. Document the COMPLETE workflow essence. The conversion must capture ALL of the original workflow's intent and functionality.

View File

@@ -0,0 +1,194 @@
---
name: 'step-01-discovery'
description: 'Discover and understand the user workflow idea through collaborative conversation'
nextStepFile: './step-02-classification.md'
workflowExamples: '../data/workflow-examples.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
---
# Step 1: Discovery
## STEP GOAL:
To understand the user's workflow idea through open-ended conversation, showing them what's possible, and discovering their vision before making any structural decisions.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow design expertise, user brings their vision
- ✅ Together we will discover what they need
### Step-Specific Rules:
- 🎯 Focus ONLY on understanding their idea
- 🚫 FORBIDDEN to ask for name, module, or technical decisions in this step
- 💬 Ask 1-2 questions at a time, think about their response before probing deeper
- 🚪 DON'T rush to classification - understand first
## EXECUTION PROTOCOLS:
- 🎯 Load examples FIRST to show what's possible
- 💬 Start with open-ended "Tell me about your idea..."
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until we understand their vision
## CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- This is pure discovery - no decisions yet
- Don't ask technical questions yet
- Focus on the problem space and user's vision
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Context FIRST
Load `{workflowExamples}` BEFORE talking to the user.
**Note:** You already understand workflow architecture from having read workflow.md to get here. The step-file architecture you just experienced (micro-file design, JIT loading, sequential enforcement, state tracking) is exactly what we'll be helping users create.
**From workflowExamples**, you now know 10 diverse workflow examples across domains:
- Health & Fitness (Meal Plan)
- Finance (Tax Organizer)
- Legal/HR (Termination Checklist)
- Entertainment (RPG Campaign)
- Education (Syllabus Creator)
- Business (SOP Writer)
- Creative (Novel Outliner)
- Events (Wedding Itinerary)
- Personal Development (Life Review)
- Home Improvement (Renovation Planner)
This context helps you understand whatever the user describes and guide them effectively.
### 2. Open-Ended Invitation
Start with:
"**Welcome! I'm here to help you create a workflow.**
Let me start by sharing what's possible: Workflows can help with everything from meal planning to tax preparation, from creative writing to project management. They're structured processes that guide you (or others) through a task step-by-step.
**Tell me about your idea** - what problem are you trying to solve? What's the vision?"
### 3. Listen and Probe
As they describe their idea:
**DO:**
- Listen carefully
- Ask 1-2 follow-up questions at a time
- Think about their response before asking more
- Probe for: Who is this for? What's the outcome? What's the challenge they're facing?
- Use "Think about their response before..." pattern
**DON'T:**
- Ask about module, name, or technical details
- Rapid-fire questions
- Jump to solutions
- Rush this step
### 4. Deepen Understanding
Once you have the basic idea, probe deeper:
"That's really interesting. Let me understand better:
- Walk me through a scenario where someone would use this workflow
- What does success look like at the end?
- Who would be running this workflow - you, your team, customers?
- Is this something you'd do once, or repeat over time?
**Think about their response before continuing...**"
### 5. Check Understanding
Before moving on, confirm you understand:
"Let me make sure I've got this right:
[Summarize your understanding in 2-3 sentences]
Did I capture that correctly? What should I adjust?"
### 6. Create Initial Plan Document
Create `{workflowPlanFile}` with initial discovery notes:
```markdown
---
stepsCompleted: ['step-01-discovery']
created: [current date]
status: DISCOVERY
---
# Workflow Creation Plan
## Discovery Notes
**User's Vision:**
[Summarize the problem they're solving and their vision]
**Who It's For:**
[Users/audience]
**What It Produces:**
[The outcome/deliverable]
**Key Insights:**
[Any important context gathered]
```
### 7. Transition to Classification
"Great! I understand what you're trying to build. Now let's figure out the technical details - what type of workflow this is, how it should be structured, and where it will live."
### 8. Present MENU OPTIONS
Display: **Proceeding to workflow classification...**
#### EXECUTION RULES:
- This is a discovery step with no user choices at the end
- Proceed directly to next step after discovery is complete
- Always halt if user wants to continue discussing their idea
#### Menu Handling Logic:
- After discovery complete and plan document created, immediately load and execute `{nextStepFile}` to begin classification
- IF user wants to keep discussing their idea: continue conversation, then repeat menu check
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- User's vision clearly understood
- Discovery notes captured in plan document
- User feels heard and understood
- Ready to proceed to classification
### ❌ SYSTEM FAILURE:
- Rushing to technical decisions before understanding
- Asking for name/module in this step
- Not loading examples first
- Rapid-fire questions without thinking about responses
**Master Rule:** Understand first, classify second. Discovery comes before structure.

View File

@@ -0,0 +1,3 @@
# TODO - THIS IS A PLACE HOLDER NOT IMPLEMENTED YET IN THIS FLOW
<attention-llm>YOU CAN CALL OUT AS A WARNING IN ANY VALIDATION CHECKS of this specific workflow - but this is a known pending todo to implement.</attention-llm>

View File

@@ -0,0 +1,269 @@
---
name: 'step-02-classification'
description: 'Classify the workflow by answering the 4 key structural decisions'
nextStepFile: './step-03-requirements.md'
workflowTypeCriteria: '../data/workflow-type-criteria.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
bmbCreationsOutputFolder: '{bmb_creations_output_folder}'
customWorkflowLocation: '{custom_workflow_location}'
---
# Step 2: Workflow Classification
## STEP GOAL:
To determine the 4 key structural decisions that define how the workflow will be built: module affiliation, continuable vs single-session, tri-modal vs create-only, and document output.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect helping classify their workflow
- ✅ Explain the trade-offs of each decision clearly
- ✅ Help them make informed choices
- ✅ These 4 decisions affect the entire workflow structure
### Step-Specific Rules:
- 🎯 Focus ONLY on the 4 key structural decisions
- 🚫 FORBIDDEN to skip any of the 4 decisions
- 💬 Explain each decision in plain language before asking
- 🚪 These decisions determine file structure, naming, and location
## EXECUTION PROTOCOLS:
- 🎯 Load workflowTypeCriteria for the decision framework
- 💾 Document each decision in the plan
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until all 4 decisions are made
## CONTEXT BOUNDARIES:
- Discovery from Step 1 informs these decisions
- These are STRUCTURAL decisions that affect everything else
- Once made, changing them is difficult
- Take time to explain trade-offs
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 0. Load Decision Framework
Load `{workflowTypeCriteria}` to understand the 4 key decisions and their implications.
### 1. Decision 1: Document Output (FIRST - It's Fundamental)
"**Let's classify your workflow. I'll walk you through 4 key decisions that determine how it's built.**
**Decision 1: What does your workflow produce?**
Based on your idea from discovery, let me clarify:"
- [If unclear from discovery] "Does this workflow produce a document or file at the end? A report, a plan, a story, a checklist?"
Present the two options:
**A. Document-Producing**
- Creates a persistent output file
- Examples: reports, plans, stories, checklists, forms
- Uses templates for structure
**B. Non-Document**
- Performs actions without creating a document
- Examples: refactoring code, running tests, orchestrating tools
- May produce temporary files but no persistent output
"Which describes your workflow?"
**Think about their response before continuing...**
Once decided:
- Document: `workflowProducesDocuments: true`
- Non-document: `workflowProducesDocuments: false`
### 2. Decision 2: Module Affiliation
"**Decision 2: Where will this workflow live?**
Workflows can be standalone or part of a module:"
**Standalone:**
- NOT part of any module
- Stored in your custom location
- Only standard variables available
**Module-Based (BMB, BMM, CIS, BMGD, etc.):**
- Part of a specific module
- Has access to module-specific variables
- Stored in that module's workflows directory
"Is this workflow:
- **A)** Standalone - just for you/custom use
- **B)** Part of a module - which one?"
**If they don't know modules:**
"Modules are specialized areas:
- **BMB** - Module building workflows
- **BMM** - Software development workflows (PRDs, architecture, etc.)
- **CIS** - Innovation and creative workflows
- **BMGD** - Game development workflows
- **Custom** - Your own workflows
Does your workflow fit into one of these areas, or is it standalone?"
Document the result.
### 3. Decision 3: Continuable or Single-Session
"**Decision 3: Could this workflow take multiple sessions to complete?**
Think about: Will this workflow consume many tokens or take a long time? Might users need to pause and come back later?"
**Single-Session:**
- Quick, focused workflows (15-30 minutes)
- Simpler structure
- No continuation logic needed
**Continuable:**
- Can span multiple sessions
- Complex, many steps
- Saves progress, can resume later
- Needs `step-01b-continue.md`
"Is your workflow:
- **A)** Single-session - quick and focused
- **B)** Continuable - could take multiple sessions"
**Help them think:**
- "Walk me through how long you think this would take..."
- "What happens if someone gets halfway through and has to stop?"
Document the result.
### 4. Decision 4: Create-Only or Tri-Modal
"**Decision 4: Will this workflow need Edit and Validate capabilities?**
Some workflows are simple - you create them once and use them. Others need full lifecycle support:**
**Create-Only:**
- Just `steps-c/` (create steps)
- Simpler, faster to build
- Good for: experimental workflows, one-off use, simple tools
**Tri-Modal (Create + Edit + Validate):**
- Has `steps-c/`, `steps-e/` (edit), and `steps-v/` (validate)
- Full lifecycle support
- Can be modified and validated after creation
- Good for: complex workflows, maintained workflows, team use
"Do you envision:
- **A)** Create-only - build it and use it
- **B)** Tri-modal - create, edit, AND validate capabilities"
**If they're unsure:**
"Think: Will you or others want to modify this workflow later? Does it need quality checking/validation?"
Document the result.
### 5. Name the Workflow
"Now that we understand what this workflow IS, let's name it properly.
Based on everything we've discovered, what would you call this?
Some guidance:
- Use kebab-case: `my-workflow-name`
- Be descriptive but concise
- Think: What would someone search for to find this?
[Offer suggestions based on their vision]"
**Check for uniqueness:**
- Look for folder at `{bmb_creationsOutputFolder}/workflows/{proposed-name}/`
- If exists: "That name is taken. Want to try a variant like...?"
- Loop until unique name confirmed
Document the final name.
### 6. Confirm Target Location
Based on module decision, confirm and document the target path:
**For standalone/custom:**
- Target: `{customWorkflowLocation}/{workflow-name}/`
- Typically: `_bmad/custom/src/workflows/{workflow-name}/`
**For modules:**
- Check module's workflow location from module.yaml
- Confirm path with user
Document: `targetWorkflowPath: [confirmed path]`
### 7. Update Plan with Classification
Update `{workflowPlanFile}`:
```markdown
## Classification Decisions
**Workflow Name:** {name}
**Target Path:** {targetWorkflowPath}
**4 Key Decisions:**
1. **Document Output:** {true/false}
2. **Module Affiliation:** {standalone/module-name}
3. **Session Type:** {single-session/continuable}
4. **Lifecycle Support:** {create-only/tri-modal}
**Structure Implications:**
- [Document what this means: e.g., "Needs steps-c/, steps-e/, steps-v/", "Needs step-01b-continue.md", etc.]
```
### 8. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
- IF P: Execute {project-root}/_bmad/core/workflows/party-mode/workflow.md
- IF C: Update plan frontmatter with stepsCompleted and classification, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All 4 key decisions made and documented
- Workflow named appropriately
- Target location confirmed
- Structural implications understood
- Plan updated with classification
### ❌ SYSTEM FAILURE:
- Skipping any of the 4 key decisions
- Naming before understanding (old pattern)
- Not explaining trade-offs
- Not checking for name conflicts
**Master Rule:** The 4 key decisions determine everything else. Get them right before proceeding.

View File

@@ -0,0 +1,282 @@
---
name: 'step-03-requirements'
description: 'Gather detailed requirements through collaborative conversation'
nextStepFile: './step-04-tools.md'
workflowExamples: '../data/workflow-examples.md'
outputFormatStandards: '../data/output-format-standards.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 3: Requirements Gathering
## STEP GOAL:
To gather comprehensive requirements through conversation, building on the classification decisions, and document them in a standardized format for the design phase.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect gathering requirements
- ✅ Build on what we discovered and classified
- ✅ Ask 1-2 questions at a time, think about responses
- ✅ We already know the 4 key decisions - now we get details
### Step-Specific Rules:
- 🎯 Focus ONLY on requirements gathering
- 🚫 FORBIDDEN to propose workflow designs yet
- 💬 Ask conversationally, not like a form
- 📋 Use the standardized template (below) for consistent storage
## EXECUTION PROTOCOLS:
- 🎯 Load references as needed
- 💾 Store to standardized template in plan document
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until requirements are complete
## CONTEXT BOUNDARIES:
- Discovery (Step 1) gave us the vision
- Classification (Step 2) gave us the 4 key decisions
- Now we gather detailed requirements
- Don't design workflow steps yet - that's Step 6
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Initialize Requirements
"**Let's gather the requirements for your workflow.**
We already know:
- [Summarize vision from discovery]
- [Summarize 4 key decisions from classification]
Now I need to understand the details of how this workflow should work."
### 2. Workflow Flow and Structure
Load `{workflowExamples}` to reference diverse patterns.
"**How should this workflow flow?**
From our examples, workflows can be structured differently:"
**Flow Patterns:**
- **Linear:** Step 1 → Step 2 → Step 3 → Finish
- **Looping:** Generate → Review → Generate more... until done
- **Branching:** Different paths based on user choices
- **Repeating:** Same steps, new content each session
"Think about your workflow:
- Should it go straight through, or loop/branch?
- How many logical phases does it need?
- What are the major milestones?"
**Think about their response...**
### 3. User Interaction Style
"**How collaborative should this be?**
Think about the person running this workflow:"
- **Highly Collaborative:** AI asks questions, guides, facilitates at each step
- **Mostly Autonomous:** AI does the work with occasional checkpoints
- **Guided Session:** AI leads through a structured experience
- **Mixed:** Some steps collaborative, some autonomous
"Where does your workflow fit on this spectrum?
And are there specific decision points where the user MUST choose something?"
### 4. Input Requirements
"**What does this workflow need to start?**"
- What documents or data must be provided?
- Are there prerequisites or dependencies?
- Will users need to provide specific information?
- Any optional inputs that enhance the workflow?
"**Think about their response before continuing...**"
### 5. Output Specifications (IF document-producing)
**ONLY if `workflowProducesDocuments: true` from classification:**
Load `{outputFormatStandards}` and discuss:
"**What should the output look like?**
Since your workflow produces a document, let's decide the format:"
**Four Template Types:**
1. **Free-form (Recommended)** - Minimal structure, content-driven
- Use for: Most collaborative workflows
- Has: Basic frontmatter, progressive content, final polish step
2. **Structured** - Required sections, flexible within each
- Use for: Reports, proposals, documentation
- Has: Clear section headers, consistent structure
3. **Semi-structured** - Core sections + optional additions
- Use for: Forms, checklists, meeting minutes
- Has: Required fields, optional extras
4. **Strict** - Exact format, specific fields
- Use for: Compliance, legal, regulated (rare)
- Has: Precise requirements, validation
"Which format fits your workflow best?"
**If Free-form (most common):**
- "We'll use a minimal template with basic frontmatter. The workflow will build the document section by section, with a final polish step to optimize flow."
**If Structured/Semi-structured:**
- "What sections are required? Any optional sections?"
**If Strict:**
- "Do you have an existing template to follow, or should we design one?"
Document the output format decision.
### 6. Output Specifications (IF non-document)
**ONLY if `workflowProducesDocuments: false` from classification:**
"**What does this workflow produce if not a document?**
- Actions performed?
- Changes made to code/files?
- A decision or recommendation?
- A temporary artifact?"
Document what the workflow produces.
### 7. Success Criteria
"**How will we know this workflow succeeded?**
Think about the end result:
- What does 'done' look like?
- What would make a user satisfied?
- Are there quality criteria?
- Can we measure success?"
"**Think about their response...**"
### 8. Instruction Style (NOW, Not Earlier)
**We ask this NOW because we understand the workflow:**
"**How should the AI executing this workflow behave?**"
**Intent-Based (Recommended for most):**
- Steps describe goals and principles
- AI adapts conversation naturally
- More flexible and responsive
- Example: "Guide user to define requirements through open-ended discussion"
**Prescriptive:**
- Steps provide exact instructions
- More controlled and predictable
- Example: "Ask: 'What is your primary goal? A) Growth B) Efficiency C) Quality'"
**Mixed:**
- Some steps prescriptive, others intent-based
- Use prescriptive for critical/required steps
- Use intent-based for creative/facilitative steps
"Which style fits your workflow, or should it be mixed?"
### 9. Store to Standardized Template
Update `{workflowPlanFile}` with the requirements section:
```markdown
## Requirements
**Flow Structure:**
- Pattern: [linear/looping/branching/repeating]
- Phases: [list major phases]
- Estimated steps: [rough count]
**User Interaction:**
- Style: [highly collaborative/mostly autonomous/guided/mixed]
- Decision points: [where user must choose]
- Checkpoint frequency: [how often to pause]
**Inputs Required:**
- Required: [list]
- Optional: [list]
- Prerequisites: [list]
**Output Specifications:**
- Type: [document/action/decision/temporary]
- Format: [free-form/structured/semi-structured/strict OR describe non-document output]
- Sections: [if structured]
- Frequency: [single/batch/continuous]
**Success Criteria:**
- [list what success looks like]
**Instruction Style:**
- Overall: [intent-based/prescriptive/mixed]
- Notes: [any specific style requirements]
```
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save requirements to plan, update frontmatter, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Requirements gathered through conversation (not interrogation)
- Flow structure clearly understood
- Input/output specifications defined
- Output format decided (if document-producing)
- Success criteria established
- Instruction style determined
- All stored in standardized template
### ❌ SYSTEM FAILURE:
- Asking for instruction style before understanding the workflow
- Skipping output format discussion
- Not storing to standardized template
- Proceeding without understanding the flow
**Master Rule:** Requirements build on classification. Use the standardized template so the next steps can read consistent data.

View File

@@ -0,0 +1,281 @@
---
name: 'step-04-tools'
description: 'Preview workflow structure, then configure tools with context'
nextStepFile: './step-05-plan-review.md'
commonToolsCsv: '../data/common-workflow-tools.csv'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 4: Tools Configuration
## STEP GOAL:
To preview the workflow structure FIRST, then configure tools with clear context on where and how they'll be used.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect
- ✅ Tools need context to be configured intelligently
- ✅ We preview structure BEFORE deciding tool integration points
### Step-Specific Rules:
- 🎯 Preview workflow structure BEFORE configuring tools
- 🚫 FORBIDDEN to skip the preview - tools can't be configured without it
- 💬 Use the preview to make tool discussions concrete
- 🚫 Load tools from CSV, don't hardcode descriptions
## EXECUTION PROTOCOLS:
- 🎯 Present design preview based on requirements
- 💬 Discuss tools WITHIN the context of the preview
- 💾 Document tool decisions with integration points
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until tools are configured
## CONTEXT BOUNDARIES:
- Discovery → Classification → Requirements are complete
- We know the flow pattern, phases, interaction style
- NOW we can talk about tools with concrete examples
- This creates an intelligent tool configuration
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Present Design Preview
"**Before we configure tools, let me preview what your workflow structure might look like.**
Based on everything we've gathered, here's a rough outline:"
Create a concrete preview showing:
```markdown
## Workflow Structure Preview: {workflow-name}
**Phase 1: Initialization**
- Welcome user, explain the workflow
- Gather any starting inputs
- [Specific to this workflow]
**Phase 2: [Name from requirements]**
- [What happens in this phase]
- [User interaction point]
**Phase 3: [Name from requirements]**
- [What happens in this phase]
- [User interaction point]
**Phase 4: Completion**
- [What happens at the end]
- [Output/final step]
```
"This is just a preview - we'll design the actual steps in detail next. But this gives us context for discussing tools."
**Ask:** "Does this structure feel right? Any major phases I'm missing?"
### 2. Initialize Tools Discussion
"**Now let's configure the tools and integrations for your workflow.**
Since we can see the structure, we can talk about tools concretely: 'Party Mode could fit here in Phase 2 for creative brainstorming...' instead of abstractly."
### 3. Load and Present Available Tools
Load `{commonToolsCsv}` and present by category:
"**Available BMAD Tools:**
**Core Tools:**
- [List from CSV with descriptions]
**Optional Tools:**
- [List from CSV with descriptions]"
### 4. Configure Core Tools WITH Context
Go through each core tool, referencing the preview:
"**Party Mode** - For creative, unrestricted exploration
Looking at your workflow structure, I see potential in:
- [Specific phase from preview] for [specific reason]
Should we include Party Mode? If so, where would it fit best?"
"**Advanced Elicitation** - For deep exploration and quality
This could work well in:
- [Specific phase] for [specific reason]
Should we include Advanced Elicitation? Where would you want quality gates or deeper exploration?"
"**Brainstorming** - For idea generation
In your workflow, this might fit in:
- [Specific phase if applicable]
Should we include Brainstorming?"
### 5. Configure LLM Features WITH Context
"**LLM Features to enhance your workflow:**"
"**Web-Browsing** - For real-time information
Would your workflow benefit from:
- Current data/information
- Research during execution
- Live references
If yes, where in the structure would this be needed?"
"**File I/O** - For reading/writing files
Your workflow [will/won't] need file operations based on:
- [Input requirements from requirements]
- [Output specifications from requirements]
Any specific file operations needed?"
"**Sub-Agents** - For delegating specialized tasks
Could any part of your workflow benefit from:
- Specialized expertise
- Parallel processing
- Focused sub-tasks
Looking at your structure, [specific phase] might benefit..."
"**Sub-Processes** - For parallel workflows
Would any phase benefit from:
- Running multiple processes in parallel
- Coordinating multiple workflows
If so, which phase?"
### 6. Configure Memory Systems
"**Memory and State Management**"
**If continuable from classification:**
"Since your workflow is continuable, it needs to track progress between sessions.
We'll use:
- `stepsCompleted` array in output frontmatter
- `lastStep` tracking
- `step-01b-continue.md` for resuming
Any additional state we need to track?"
**If single-session:**
"Your workflow is single-session, so we'll keep state simple - no complex memory needed."
### 7. External Integrations (Optional)
"**External Integrations** - MCP, databases, APIs
Based on your workflow, are there any external systems it needs to connect to?
- Databases?
- APIs?
- MCP servers?
- Other tools?"
If yes, note installation requirements.
### 8. Installation Assessment
"**Installation and Dependencies**
Some tools require additional setup.
Based on what we've selected:
- [List any tools requiring installation]
- [Assess user comfort level]
Are you comfortable with these installations, or should we consider alternatives?"
### 9. Store Tools Configuration
Update `{workflowPlanFile}`:
```markdown
## Tools Configuration
**Core BMAD Tools:**
- **Party Mode:** [included/excluded] - Integration point: [specific phase/reason]
- **Advanced Elicitation:** [included/excluded] - Integration point: [specific phase/reason]
- **Brainstorming:** [included/excluded] - Integration point: [specific phase/reason]
**LLM Features:**
- **Web-Browsing:** [included/excluded] - Use case: [specific need]
- **File I/O:** [included/excluded] - Operations: [specific needs]
- **Sub-Agents:** [included/excluded] - Use case: [specific need]
- **Sub-Processes:** [included/excluded] - Use case: [specific need]
**Memory:**
- Type: [continuable/single-session]
- Tracking: [stepsCompleted, lastStep, etc.]
**External Integrations:**
- [List any selected with purposes]
**Installation Requirements:**
- [List tools needing installation]
- User preference: [willing/not willing/alternatives]
```
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save tools to plan, update frontmatter, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Design preview presented BEFORE tools discussion
- Tools discussed WITHIN concrete context
- Integration points clearly identified
- User can visualize where tools fit
- All decisions documented in plan
### ❌ SYSTEM FAILURE:
- Configuring tools without design preview
- Abstract tool discussions ("it could go somewhere")
- Not identifying concrete integration points
- Hardcoding tool descriptions instead of using CSV
**Master Rule:** Tools need context. Preview structure first, then configure tools with concrete integration points.

View File

@@ -0,0 +1,242 @@
---
name: 'step-05-plan-review'
description: 'Review the complete workflow plan and approve before design'
nextStepFile: './step-06-design.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 5: Plan Review and Approval
## STEP GOAL:
To present the complete workflow plan (discovery, classification, requirements, tools) for review and approval before proceeding to the design phase.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect conducting a design review
- ✅ Present the complete plan clearly
- ✅ Solicit feedback and make refinements
- ✅ Get explicit approval before proceeding to design
### Step-Specific Rules:
- 🎯 Focus ONLY on review and refinement
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Present plan clearly, ask targeted questions
- 🚫 DO NOT proceed to design without user approval
## EXECUTION PROTOCOLS:
- 🎯 Present complete plan from {workflowPlanFile}
- 💾 Capture any modifications or refinements
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until user approves
## CONTEXT BOUNDARIES:
- Discovery (Step 1) → Classification (Step 2) → Requirements (Step 3) → Tools (Step 4)
- ALL the information needed for design is now captured
- This is the final checkpoint before designing the workflow structure
- Once we proceed to Step 6, we'll be designing actual step files
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Initialize Review
"**Let's review the complete plan before we start designing.**
We've covered a lot of ground. Let me walk you through everything we've decided, and you can tell me what looks right and what needs adjustment."
### 2. Present Complete Plan
Load and present from `{workflowPlanFile}`:
"**Complete Workflow Plan: {workflow-name}**
---
**1. DISCOVERY** (from Step 1)
**Your Vision:**
[Present user's vision]
**Who It's For:**
[Present users/audience]
**Key Insights:**
[Present important context]
---
**2. CLASSIFICATION** (from Step 2)
**The 4 Key Decisions:**
1. **Document Output:** {true/false} - [what it produces]
2. **Module Affiliation:** {standalone/module} - {target path}
3. **Session Type:** {single-session/continuable} - [implications]
4. **Lifecycle Support:** {create-only/tri-modal} - [implications]
**Workflow Name:** {name}
**Target Location:** {path}
---
**3. REQUIREMENTS** (from Step 3)
**Flow Structure:**
- Pattern: {linear/looping/branching/repeating}
- Phases: {list major phases}
- Estimated steps: {count}
**User Interaction:**
- Style: {collaborative/autonomous/guided/mixed}
- Decision points: {where user must choose}
**Inputs:** {required and optional}
**Output:** {type and format}
**Success Criteria:** {what success looks like}
**Instruction Style:** {intent/prescriptive/mixed}
---
**4. TOOLS CONFIGURATION** (from Step 4)
**Core Tools:**
- Party Mode: {included/excluded} - {integration point}
- Advanced Elicitation: {included/excluded} - {integration point}
- Brainstorming: {included/excluded} - {integration point}
**LLM Features:**
- Web-Browsing: {included/excluded}
- File I/O: {included/excluded}
- Sub-Agents: {included/excluded}
- Sub-Processes: {included/excluded}
**Memory:** {continuable/single-session}
---
### 3. Detailed Review by Section
"**Let's go through this systematically. I want your feedback on each area:**"
**A. Vision and Scope (Discovery)**
- "Does the 'Your Vision' section capture what you're trying to build?"
- "Anything we missed in the key insights?"
**B. Structural Decisions (Classification)**
- "Do the 4 key decisions still feel right?"
- "Any second thoughts on continuable vs single-session?"
- "Create-only or tri-modal - still the right call?"
**C. Requirements (Details)**
- "Does the flow structure match what you envisioned?"
- "Are the interaction style and decision points accurate?"
- "Input/output specifications complete?"
- "Success criteria clear?"
**D. Tools (Integrations)**
- "Do the selected tools make sense?"
- "Integration points feel right?"
- "Any tools we should add or remove?"
### 4. Collect Feedback
"**Your feedback:**
For each section above, tell me:
1. What looks good and should stay as-is
2. What needs modification or refinement
3. What's missing that should be added
4. Anything unclear or confusing
**Take your time - this is our last chance to make changes before we start designing the actual workflow.**"
### 5. Process Feedback and Refine
For each feedback item:
- Document the requested change
- Discuss implications on workflow design
- Make the refinement
- Confirm with user
Update `{workflowPlanFile}` with all approved changes.
### 6. Final Confirmation
"**One last check before we proceed to design:**
Based on everything we've discussed:
- [Re-state the workflow's purpose in one sentence]
- [Re-state the key structural decision: continuable/tri-modal]
- [Re-state the flow pattern]
You're approving this plan to move into the actual workflow design phase.
Ready to proceed?"
### 7. Update Plan Status
Update `{workflowPlanFile}` frontmatter:
```yaml
status: APPROVED_FOR_DESIGN
approvedDate: [current date]
```
### 8. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Design
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Update plan frontmatter with approval, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete plan presented clearly from the plan document
- All 4 sections reviewed systematically
- User feedback collected and incorporated
- User explicitly approves the plan
- Plan status updated to APPROVED_FOR_DESIGN
- Ready to proceed to design phase
### ❌ SYSTEM FAILURE:
- Not loading plan from {workflowPlanFile}
- Skipping review sections
- Not documenting refinements
- Proceeding without explicit approval
- Not updating plan status
**Master Rule:** The plan must be complete and approved before design. This is the gatekeeper step.

View File

@@ -0,0 +1,329 @@
---
name: 'step-06-design'
description: 'Design the workflow structure and step sequence based on gathered requirements, tools configuration, and output format'
nextStepFile: './step-07-foundation.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
frontmatterStandards: '../data/frontmatter-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
inputDiscoveryStandards: '../data/input-discovery-standards.md'
workflowChainingStandards: '../data/workflow-chaining-standards.md'
trimodalWorkflowStructure: '../data/trimodal-workflow-structure.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
---
# Step 6: Workflow Structure Design
## STEP GOAL:
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the approved plan and output format requirements.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow design patterns and architectural expertise
- ✅ User brings their domain requirements and workflow preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on designing structure, not implementation details
- 🚫 FORBIDDEN to write actual step content or code in this step
- 💬 Collaboratively design the flow and sequence
- 🚫 DO NOT finalize design without user agreement
## EXECUTION PROTOCOLS:
- 🎯 Guide collaborative design process
- 💾 After completing design, append to {workflowPlanFile}
- 📖 Update frontmatter stepsCompleted to add this step when completed.
- 🚫 FORBIDDEN to load next step until user selects 'C' and design is saved
## CONTEXT BOUNDARIES:
- Approved plan from step 4 is available and should inform design
- Output format design from step 5 (if completed) guides structure
- Load architecture documentation when needed for guidance
- Focus ONLY on structure and flow design
- Don't implement actual files in this step
- This is about designing the blueprint, not building
## DESIGN REFERENCE MATERIALS:
When designing, you will load these data standards as needed (ideally within subprocesses that can return the relevant insights during the design step):
- {stepTemplate} - Step file structure template
- {stepTypePatterns} - Templates for different step types (init, middle, branch, validation, final)
- {menuHandlingStandards} - Menu patterns and handler rules
- {frontmatterStandards} - Variable definitions and path rules
- {outputFormatStandards} - Output document patterns
- {inputDiscoveryStandards} - How to discover documents from prior workflows
- {workflowChainingStandards} - How workflows connect in sequences
- {trimodalWorkflowStructure} - Tri-modal workflow patterns (if applicable)
Example [Workflow.md](../workflow.md) for reference of a perfect workflow.md with some complex options (not all workflows will offer multiple next step options like this one - most will just auto route right to a step 1 file)
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Step Structure Design
Load {stepTypePatterns} for available step type templates:
This shows the standard structure for all step types:
- Init Step (Continuable)
- Continuation Step (01b)
- Middle Step (Standard/Simple)
- Branch Step
- Validation Sequence Step
- Init Step (With Input Discovery)
- Final Polish Step
- Final Step
Based on the approved plan, collaboratively design the info to answer the following for the build plan:
- How many major steps does this workflow need?
- What is the goal of each step?
- Which steps are optional vs required?
- Should any steps repeat or loop?
- What are the decision points within steps?
### 1a. Continuation Support Assessment
**Ask the user:**
"Will this workflow potentially take multiple sessions to complete? Consider:
- Does this workflow generate a document/output file?
- Might users need to pause and resume the workflow?
- Does the workflow involve extensive data collection or analysis?
- Are there complex decisions that might require multiple sessions?
If **YES** to any of these, we should include continuation support using step-01b-continue.md."
**If continuation support is needed:**
- Include step-01-init.md (with continuation detection logic)
- Include step-01b-continue.md (for resuming workflows)
- Ensure every step updates `stepsCompleted` in output frontmatter
- Design the workflow to persist state between sessions
### 2. Interaction Pattern Design
Load {menuHandlingStandards} for menu pattern options:
Design how users will interact with the workflow:
- Where should users provide input vs where the AI works autonomously?
- What menu pattern does each step need? (Standard A/P/C, Auto-proceed, Custom, Conditional)
- Should there be Advanced Elicitation or Party Mode options?
- How will users know their progress?
- What confirmation points are needed?
### 3. Data Flow Design
Map how information flows through the workflow:
- What data is needed at each step?
- What outputs does each step produce?
- How is state tracked between steps?
- Where are checkpoints and saves needed?
- How are errors or exceptions handled?
### 4. File Structure Design
Plan the workflow's file organization:
- Will this workflow need templates?
- Are there data files required?
- Is a validation checklist needed?
- What supporting files will be useful?
- How will variables be managed?
### 5. Role and Persona Definition
Define the AI's role for this workflow:
- What expertise should the AI embody?
- How should the AI communicate with users?
- What tone and style is appropriate?
- How collaborative vs prescriptive should the AI be?
### 6. Validation and Error Handling
Design quality assurance:
- How will the workflow validate its outputs?
- What happens if a user provides invalid input?
- Are there checkpoints for review?
- How can users recover from errors?
- What constitutes successful completion?
### 6a. Subprocess Optimization Design
Load {subprocessPatterns} to understand subprocess optimization patterns that can save context and improve performance during workflow execution.
Ask the user:
"**Should we design this workflow to leverage subprocess optimization patterns?** Consider:
- **Pattern 1 (Grep/Regex):** Will any step search across many files or documents for patterns?
- **Pattern 2 (Deep Analysis):** Will any step analyze multiple files for prose, logic, quality, or flow?
- **Pattern 3 (Data Operations):** Will any step load large reference data, knowledge bases, or datasets?
- **Pattern 4 (Parallel Execution):** Can any validation or analysis checks run in parallel instead of sequentially?
If **YES** to any of these, we should design those steps with subprocess optimization in mind."
**If subprocess optimization is applicable:**
For each step that could benefit from subprocesses:
- Identify which pattern(s) apply (Pattern 1, 2, 3, or 4)
- Design what the subprocess should return (findings only, not full content)
- Plan graceful fallback for LLMs without subprocess capability
- Document optimization strategy in the build plan
**Example subprocess integration:**
```markdown
### Step-Specific Rules:
- 🎯 Analyze X files for Y - use subprocess per file (Pattern 2)
- 💬 Subprocess returns structured findings, not full content
- ⚙️ If subprocess unavailable: Perform analysis in main thread
```
**Document in the plan:**
For each step identified for subprocess optimization, record:
- Step number and name
- Pattern type(s) to apply
- What the subprocess will analyze
- Expected return structure
- Fallback approach
### 7. Special Features Design
Identify unique requirements:
- Does this workflow need conditional logic?
- Are there branch points based on user choices?
- Should it integrate with other workflows?
- Does it need to handle multiple scenarios?
**Input Discovery:**
If this workflow depends on documents from prior workflows, load {inputDiscoveryStandards}:
- What prior workflow outputs does this workflow need?
- Are these required or optional inputs?
- How will the workflow discover these documents?
**Workflow Chaining:**
If this workflow is part of a sequence, load {workflowChainingStandards}:
- What workflow comes before this one?
- What workflow comes after this one?
- What outputs does this workflow produce for the next?
### 8. Design Review and Refinement
Present the design for review:
- Walk through the complete flow
- Identify potential issues or improvements
- Ensure all requirements are addressed
- Get user agreement on the design
## DESIGN PRINCIPLES TO APPLY:
### Micro-File Architecture
- Keep each step focused and self-contained
- Ensure steps can be loaded independently
- Design for Just-In-Time loading
### Sequential Flow with Clear Progression
- Each step should build on previous work
- Include clear decision points
- Maintain logical progression toward goal
### Menu-Based Interactions
- Include consistent menu patterns
- Provide clear options at decision points
- Allow for conversation within steps
### State Management
- Track progress using `stepsCompleted` array
- Persist state in output file frontmatter
- Support continuation where appropriate
### 9. Document Design in Plan
Append to {workflowPlanFile}:
- Complete step outline with names and purposes
- Flow diagram or sequence description
- Interaction patterns
- File structure requirements
- Special features and handling
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and design is saved will you load {nextStepFile} to begin implementation.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow structure designed collaboratively
- All steps clearly defined and sequenced
- Interaction patterns established
- File structure planned
- User agreement on design
### ❌ SYSTEM FAILURE:
- Designing without user collaboration
- Skipping design principles
- Not documenting design in plan
- Proceeding without user agreement
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,238 @@
---
name: 'step-07-foundation'
description: 'Create workflow folder structure, workflow.md, and main output template(s)'
nextStepFile: './step-08-build-step-01.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
workflowTemplate: '../templates/workflow-template.md'
outputFormatStandards: '../data/output-format-standards.md'
minimalOutputTemplate: '../templates/minimal-output-template.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 7: Foundation Build
## STEP GOAL:
To create the workflow folder structure, the main workflow.md file, and the primary output template(s) that step files will reference.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Focus ONLY on creating foundation elements (folder, workflow.md, main template)
- 🚫 FORBIDDEN to create step files yet - that comes next
- 💬 Get confirmation before creating each foundation element
- 🚪 CREATE files in the correct target location
## EXECUTION PROTOCOLS:
- 🎯 Create foundation systematically from approved design
- 💾 Document what was created in the plan
- 📖 Update frontmatter stepsCompleted to add this step when completed
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved plan from step 6 guides implementation
- Design specifies: workflow name, continuable or not, document output type, step count
- Load templates and documentation as needed during build
- Follow step-file architecture principles
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Confirm Foundation Readiness
Based on the approved design from step 6, confirm:
"**I have your approved design and I'm ready to create the workflow foundation.**
From your design, I'll be creating:
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Type:** [continuable/single-session]
**Document Output:** [yes/no - template type if yes]
**Estimated Steps:** [number from design]
Ready to proceed with creating the folder structure?"
### 2. Create Folder Structure
Create the workflow folder structure:
```
{targetWorkflowPath}/
├── workflow.md # To be created
├── steps-c/ # Create flow steps
│ ├── step-01-init.md
│ ├── step-01b-continue.md # If continuable
│ └── [remaining steps]
├── steps-v/ # Validate flow steps (to be created later)
├── data/ # Shared reference data
└── templates/ # Output templates
```
**For BMB module workflows:** The target will be `_bmad/custom/src/workflows/{workflow_name}/`
**For other modules:** Check module's custom_workflow_location
Create the folders and confirm structure.
### 3. Generate workflow.md
Load {workflowTemplate} and create workflow.md with:
**Frontmatter:**
```yaml
---
name: '{workflow-name-from-design}'
description: '{description-from-design}'
web_bundle: true
---
```
**Content:**
- Workflow name and description
- Goal statement
- Role definition
- Meta-context (if applicable)
- Initialization sequence pointing to steps-c/step-01-init.md
- Configuration loading instructions
**If tri-modal (Create + Edit + Validate):**
Add mode routing logic to workflow.md:
- IF invoked with -c: Load ./steps-c/step-01-init.md
- IF invoked with -v: Load ./steps-v/step-01-validate.md
- IF invoked with -e: Load ./steps-e/step-01-edit.md
### 4. Create Main Output Template
**Load {outputFormatStandards} to determine template type.**
**From the design, determine:**
- Free-form (recommended) - Minimal frontmatter + progressive append
- Structured - Required sections with flexible content
- Semi-structured - Core sections + optional additions
- Strict - Exact format (rare, compliance/legal)
**For Free-form (most common):**
Create `templates/output-template.md`:
```yaml
---
stepsCompleted: []
lastStep: ''
date: ''
user_name: ''
---
```
If the workflow produces a document with sections:
```markdown
# {{document_title}}
[Content appended progressively by workflow steps]
```
**For Structured/Semi-structured:**
Create template with section placeholders based on design:
```markdown
# {{title}}
## {{section_1}}
[Content to be filled]
## {{section_2}}
[Content to be filled]
```
**For Non-Document Workflows:**
No output template needed. Document this in the plan.
### 5. Document Foundation in Plan
Append to {workflowPlanFile}:
```markdown
## Foundation Build Complete
**Created:**
- Folder structure at: {targetWorkflowPath}
- workflow.md
- Main template: [template-name]
**Configuration:**
- Workflow name: {name}
- Continuable: [yes/no]
- Document output: [yes/no - type]
- Mode: [create-only or tri-modal]
**Next Steps:**
- Step 8: Build step-01 (and step-01b if continuable)
- Step 9: Build remaining steps (repeatable)
```
### 6. Present MENU OPTIONS
Display: **Foundation Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Step 01 Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save foundation summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and foundation is saved to plan will you load {nextStepFile} to begin building step-01.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Folder structure created in correct location
- workflow.md created with proper frontmatter and initialization
- Main output template created (if document-producing workflow)
- Foundation documented in {workflowPlanFile}
- Frontmatter updated with stepsCompleted
### ❌ SYSTEM FAILURE:
- Creating folders without user confirmation
- Missing mode routing for tri-modal workflows
- Wrong template type for output format
- Not documenting what was created
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,377 @@
---
name: 'step-08-build-step-01'
description: 'Build step-01-init.md and step-01b-continue.md (if continuable) with any supporting files'
nextStepFile: './step-09-build-next-step.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
inputDiscoveryStandards: '../data/input-discovery-standards.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 8: Build Step 01 (and 01b if Continuable)
## STEP GOAL:
To build the first step file(s) for the new workflow - step-01-init.md and step-01b-continue.md if the workflow is continuable - including any supporting files these steps need.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Focus ONLY on building step-01 (and 01b if continuable)
- 🚫 FORBIDDEN to build other steps yet - use step-09 for those
- 💬 Generate step content collaboratively based on approved design
- 🚪 CREATE files in the correct target location
## EXECUTION PROTOCOLS:
- 🎯 Load standards to understand step type patterns
- 💾 Document what was created in the plan
- 📖 Update frontmatter stepsCompleted to add this step when completed
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved design from step 6 specifies step-01's purpose and type
- Load step type patterns to understand init step structure
- Frontmatter and menu standards ensure compliance
- This is the FIRST step - sets up everything that follows
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Standards for Init Steps
**Load {stepTypePatterns}** to understand the init step patterns:
- Init Step (Non-Continuable) - For single-session workflows
- Init Step (Continuable) - For multi-session workflows
- Init Step (With Input Discovery) - If workflow needs prior documents
**Load {frontmatterStandards}** for variable and path rules.
**Load {menuHandlingStandards}** for menu patterns (init steps typically use auto-proceed or C-only).
### 2. Determine Step 01 Type
From the approved design, determine:
**Is the workflow continuable?**
- **YES:** Use Init Step (Continuable) pattern
- **NO:** Use Init Step (Non-Continuable) pattern
**Does the workflow need input discovery?**
- **YES:** Use Init Step (With Input Discovery) pattern
- **NO:** Standard init pattern
Confirm with user: "Based on your design, step-01 will be [continuable/non-continuable] with [input discovery/standard init]. Is this correct?"
### 3. Build step-01-init.md
**Load {stepTemplate}** for base structure.
Create `steps-c/step-01-init.md` with:
**Frontmatter:**
```yaml
---
name: 'step-01-init'
description: '[from design]'
# File references (ONLY variables used in this step)
nextStepFile: './step-02-[next-step-name].md'
outputFile: '{output_folder}/[output-name].md'
templateFile: '../templates/output-template.md' # If applicable
# Continuation support (if continuable)
continueFile: './step-01b-continue.md' # If continuable
# Input discovery (if needed)
inputDocuments: []
requiredInputCount: [number]
moduleInputFolder: '{module_output_folder}'
inputFilePatterns: ['*-prd.md', '*-ux.md'] # From design
# Tasks (if A/P menu used)
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
```
**Content Structure:**
```markdown
# Step 1: [Step Name From Design]
## STEP GOAL:
[Single sentence goal from design]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are [role from design]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [expertise], user brings [theirs]
- ✅ Together we produce something better
### Step-Specific Rules:
- 🎯 Focus only on [specific task for step-01]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage]
## EXECUTION PROTOCOLS:
- 🎯 [Protocol 1]
- 💾 [Protocol 2 - create/append to output]
- 📖 [Protocol 3 - tracking]
- 🚫 This is the init step - sets up everything
## CONTEXT BOUNDARIES:
- [What's available at step 01]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [none - this is first step]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. [First action - from design]
[Instructions for step-01 - intent-based, not prescriptive]
### 2. [Second action - from design]
[Instructions]
### ... [continue for all actions in step-01]
### N. Present MENU OPTIONS
[Menu from design - typically C-only for init, or A/P/C if appropriate]
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
#### Menu Handling Logic:
- IF C: Create/append to {outputFile} with content, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user, then redisplay menu
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS:
[What success looks like for step-01]
### ❌ SYSTEM FAILURE:
[What failure looks like]
**Master Rule:** Skipping steps is FORBIDDEN.
```
**Customize content based on:**
- The step's goal from the design
- The workflow's role and persona
- Whether it's continuable
- Whether it needs input discovery
- The template type (if document-producing)
### 4. Build step-01b-continue.md (If Continuable)
**If workflow is continuable**, create `steps-c/step-01b-continue.md`:
**Frontmatter:**
```yaml
---
name: 'step-01b-continue'
description: 'Handle workflow continuation from previous session'
outputFile: '{output_folder}/[output-name].md'
workflowFile: '../workflow.md'
nextStepOptions:
step-02: './step-02-[name].md'
step-03: './step-03-[name].md'
# ... add all subsequent steps
---
```
**Content:**
```markdown
# Step 1b: Continue Workflow
## STEP GOAL:
To resume the workflow from where it was left off in a previous session.
## MANDATORY EXECUTION RULES:
[Standard universal rules]
## CONTEXT BOUNDARIES:
- User has run this workflow before
- Output file exists with stepsCompleted array
- Need to route to the correct next step
## MANDATORY SEQUENCE
### 1. Welcome Back
"**Welcome back!** Let me check where we left off..."
### 2. Read stepsCompleted from Output
Load {outputFile} and read frontmatter `stepsCompleted` array.
### 3. Determine Next Step
Find the last completed step and identify the next step to load.
### 4. Route to Correct Step
Load the appropriate next step file based on stepsCompleted.
## MENU OPTIONS
Display continuation status and offer to proceed.
## SUCCESS/FAILURE METRICS
[Standard metrics]
```
### 5. Create Supporting Files (If Needed)
**Does step-01 need any:**
**Small templates?** (inline in step, no separate file needed)
**Data files?** (create if step references CSV data)
**Validation checklists?** (create if step validates something)
**If supporting files are needed, create them in `data/` folder and update step-01 frontmatter to reference them.**
### 5a. Apply Subprocess Optimization (If Designed)
**Check the approved design from step 6:** Was subprocess optimization identified for step-01?
**If YES, apply the appropriate pattern(s):**
Load {subprocessPatterns} and implement the subprocess optimization:
1. **Identify the pattern(s) from the design:**
- Pattern 1: Single subprocess for grep/regex across many files
- Pattern 2: Per-file subprocess for deep analysis
- Pattern 3: Subprocess for data file operations
- Pattern 4: Parallel execution of independent operations
2. **Add subprocess-specific Step-Specific Rules:**
```markdown
### Step-Specific Rules:
- 🎯 [Brief description of which pattern applies]
- 💬 Subprocess must either update report OR return findings to parent
- 🚫 DO NOT BE LAZY - [specific guidance if Pattern 2]
- ⚙️ TOOL/SUBPROCESS FALLBACK: If subprocess unavailable, perform in main thread
```
3. **Implement subprocess directives in the MANDATORY SEQUENCE:**
- Use appropriate subprocess language:
- Pattern 1: "Launch a subprocess that runs [command] across all files, returns [results]"
- Pattern 2: "DO NOT BE LAZY - For EACH file, launch a subprocess that [analyzes], returns [findings]"
- Pattern 3: "Launch a subprocess that loads [data file], performs [operation], returns [results]"
- Pattern 4: "Launch subprocesses in parallel that [operations], aggregate results"
4. **Ensure return patterns are specified:**
- Subprocess updates report directly OR
- Subprocess returns structured findings to parent for aggregation
5. **Verify graceful fallback is documented:**
- Universal fallback rule in Universal Rules
- Step-specific fallback in Step-Specific Rules
- Clear instructions for LLMs without subprocess capability
**If NO subprocess optimization was designed for step-01:**
Skip this section and proceed to document build in plan.
### 6. Document Build in Plan
Append to {workflowPlanFile}:
```markdown
## Step 01 Build Complete
**Created:**
- steps-c/step-01-init.md
- steps-c/step-01b-continue.md [if continuable]
- [any supporting files]
**Step Configuration:**
- Type: [continuable/non-continuable]
- Input Discovery: [yes/no]
- Next Step: step-02-[name]
**Supporting Files:**
- [list any data files, templates created]
```
### 7. Present MENU OPTIONS
Display: **Step 01 Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Next Step Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save build summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and build is saved to plan will you load {nextStepFile} to begin building the next step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- step-01-init.md created with proper structure
- step-01b-continue.md created (if continuable)
- Frontmatter follows {frontmatterStandards}
- Menu handling follows {menuHandlingStandards}
- Step type pattern followed correctly
- Supporting files created (if needed)
- Build documented in plan
### ❌ SYSTEM FAILURE:
- Creating step without following template
- Missing continuation support for continuable workflow
- Wrong menu pattern for step type
- Frontmatter variables not used in step body
- Hardcoded paths instead of variables
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,350 @@
---
name: 'step-09-build-next-step'
description: 'Build the next step in the workflow sequence - repeatable until all steps are built'
nextStepFile: './step-09-build-next-step.md' # Self-referencing - repeats until complete
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
csvDataFileStandards: '../data/csv-data-file-standards.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 9: Build Next Step (Repeatable)
## STEP GOAL:
To build the next step file in the workflow sequence based on the approved design. This step is REPEATABLE - continue running it until all steps from the design have been built.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Load the plan to determine WHICH step to build next
- 🚫 FORBIDDEN to skip steps or build out of order
- 💬 Each step is built collaboratively based on approved design
- 🚪 This step REPEATS until all workflow steps are built
## EXECUTION PROTOCOLS:
- 🎯 Always check what's been built, then build the next one
- 💾 Document each step in the plan as it's built
- 📖 Update frontmatter stepsCompleted to add each step when completed
- 🚫 Don't proceed to completion until ALL workflow steps are built
## CONTEXT BOUNDARIES:
- Approved design from step 6 specifies all steps
- The plan tracks which steps have been built
- Load step type patterns to understand each step's structure
- This step continues until the design is fully implemented
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Check Build Status
Load {workflowPlanFile} and check:
**What steps have been built so far?**
- Step 01: Always built in step-08
- Subsequent steps: Track in plan
**What is the NEXT step to build?**
From the design in the plan, identify:
- Step number and name
- Step type (Middle/Standard, Middle/Simple, Branch, Validation, Final Polish, Final)
- This step's goal and purpose
Confirm: "The next step to build is **step-{N}-{name}** which is a [step type]. Its goal is: [goal from design]. Ready to proceed?"
### 2. Load Standards for This Step Type
**Load {stepTypePatterns}** and find the pattern for this step type:
- Middle Step (Standard) - A/P/C menu, collaborative content
- Middle Step (Simple) - C only menu, no A/P
- Branch Step - Custom menu with routing logic
- Validation Sequence - Auto-proceed through checks
- Final Polish Step - Optimizes document built section-by-section
- Final Step - Completion, no next step
**Load {frontmatterStandards}** for variable rules.
**Load {menuHandlingStandards}** for menu patterns.
**Load {outputFormatStandards}** if this step outputs to document.
### 2a. Apply Subprocess Optimization (If Designed for This Step)
**Check the approved design from step 6:** Was subprocess optimization identified for this step?
**If YES, apply the appropriate pattern(s):**
Load {subprocessPatterns} and implement the subprocess optimization for this step:
1. **Identify the pattern(s) from the design for this step:**
- Pattern 1: Single subprocess for grep/regex across many files
- Pattern 2: Per-file subprocess for deep analysis
- Pattern 3: Subprocess for data file operations
- Pattern 4: Parallel execution of independent operations
2. **Add subprocess-specific Step-Specific Rules to this step:**
```markdown
### Step-Specific Rules:
- 🎯 [Brief description of which pattern applies]
- 💬 Subprocess must either update report OR return findings to parent
- 🚫 DO NOT BE LAZY - [specific guidance if Pattern 2]
- ⚙️ TOOL/SUBPROCESS FALLBACK: If subprocess unavailable, perform in main thread
```
3. **Implement subprocess directives in the MANDATORY SEQUENCE:**
- Use appropriate subprocess language:
- Pattern 1: "Launch a subprocess that runs [command] across all files, returns [results]"
- Pattern 2: "DO NOT BE LAZY - For EACH file, launch a subprocess that [analyzes], returns [findings]"
- Pattern 3: "Launch a subprocess that loads [data file], performs [operation], returns [results]"
- Pattern 4: "Launch subprocesses in parallel that [operations], aggregate results"
4. **Ensure return patterns are specified:**
- Subprocess updates report directly OR
- Subprocess returns structured findings to parent for aggregation
5. **Verify graceful fallback is documented:**
- Universal fallback rule in Universal Rules
- Step-specific fallback in Step-Specific Rules
- Clear instructions for LLMs without subprocess capability
**If NO subprocess optimization was designed for this step:**
Skip this section and proceed to build the step file.
### 3. Build the Step File
**Load {stepTemplate}** for base structure.
Create `steps-c/step-{N}-{name}.md` with:
**Frontmatter:**
```yaml
---
name: 'step-{N}-{name}'
description: '[what this step does]'
# File references (ONLY variables used in this step)
nextStepFile: './step-{N+1}-[next-name].md' # Omit for final step
outputFile: '{output_folder}/[output-name].md'
templateFile: '../templates/[template-name].md' # If applicable
# Data files (if this step needs them)
someData: '../data/[data-file].csv' # If applicable
# Tasks (if A/P menu used)
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
```
**Content Structure:** (Same pattern as step-01, customized for this step)
```markdown
# Step {N}: [Step Name From Design]
## STEP GOAL:
[Single sentence goal from design]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are [role from design]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [expertise for this step], user brings [theirs]
### Step-Specific Rules:
- 🎯 Focus only on [specific task for this step]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage for this step]
## EXECUTION PROTOCOLS:
- 🎯 Follow the MANDATORY SEQUENCE exactly
- 💾 [Protocol - append to output if this step outputs]
- 📖 [Protocol - tracking if applicable]
## CONTEXT BOUNDARIES:
- [What's available at this step]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [what this step depends on from previous steps]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. [First action - from design]
[Intent-based instructions for this step]
### 2. [Second action - from design]
[Intent-based instructions]
### ... [continue for all actions in this step]
### N. Present MENU OPTIONS
[Menu based on step type - Standard A/P/C, Simple C-only, Branching, Auto-proceed]
#### EXECUTION RULES:
[Based on menu type from {menuHandlingStandards}]
#### Menu Handling Logic:
[Handler for this step's menu]
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS:
[What success looks like for this step]
### ❌ SYSTEM FAILURE:
[What failure looks like]
**Master Rule:** Skipping steps is FORBIDDEN.
```
**Customize based on:**
- Step type pattern from {stepTypePatterns}
- The step's specific goal and actions from design
- What this step outputs (if document-producing workflow)
- Menu pattern appropriate for step type
### 4. Create Supporting Files (If Needed)
**Does this step need any:**
**Small templates?** - Inline in step content or create small template file
**Data files?** - If step references CSV data, create in `data/` folder
- Load {csvDataFileStandards} for CSV structure
- Create CSV with proper headers and data
**Validation checklists?** - If this step validates something, create checklist
**Section templates?** - If step outputs to specific document section
**If supporting files are created:**
1. Create in appropriate folder (`data/` or `templates/`)
2. Update step frontmatter to reference them
3. Document in plan
### 5. Document Build in Plan
Append to {workflowPlanFile}:
```markdown
## Step {N} Build Complete
**Created:**
- steps-c/step-{N}-{name}.md
- [any supporting files]
**Step Configuration:**
- Type: [step type]
- Outputs to: [output section or file]
- Next Step: [next step or "final step"]
**Supporting Files:**
- [list any data files, templates created for this step]
```
### 6. Check If More Steps Needed
After documenting, check the design:
**Are all steps from the design now built?**
- **YES:** Proceed to completion menu (option 7 below)
- **NO:** Present continuation menu (option 6 below)
### 6a. Present MENU OPTIONS (More Steps Remaining)
Display: **Step {N} Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Build Next Step
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY build next step when user selects 'C'
- After other menu items execution, return to this menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save build summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile} (which is THIS FILE - self-referencing for next iteration)
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6a-present-menu-options-more-steps-remaining)
### 6b. Present MENU OPTIONS (All Steps Complete)
Display: **All Workflow Steps Built! Select an Option:** [R] Review Built Steps [V] Proceed to Validation [C] Complete Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- User selects final action
#### Menu Handling Logic:
- IF R: List all built steps with their paths, allow review, then redisplay menu
- IF V: Save final build summary to {workflowPlanFile}, update frontmatter stepsCompleted to include ALL steps, then load `./step-10-confirmation.md`
- IF C: Same as V (complete and proceed)
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6b-present-menu-options-all-steps-complete)
## CRITICAL STEP COMPLETION NOTE
This step REPEATS until all workflow steps from the design are built. When complete, user selects V or C to proceed to completion.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Each step file created with proper structure for its type
- Frontmatter follows {frontmatterStandards}
- Menu handling follows {menuHandlingStandards}
- Step type pattern followed correctly
- Supporting files created as needed
- Each build documented in plan
- Process continues until ALL design steps are built
### ❌ SYSTEM FAILURE:
- Building steps out of order
- Skipping steps from the design
- Wrong menu pattern for step type
- Not documenting each step in plan
- Proceeding to completion before all steps built
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,320 @@
---
name: 'step-10-confirmation'
description: 'Confirm workflow completion - validate plan completion or conversion coverage'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
nextStepFile: './step-11-completion.md'
validationWorkflow: '{targetWorkflowPath}/steps-v/step-01-validate.md'
---
# Step 10: Confirmation
## STEP GOAL:
Confirm the workflow build is complete by checking plan metadata. If this is a conversion, verify all original workflow elements are covered. If new, validate all plan requirements were met.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER skip reading the plan file completely
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous converter
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow quality assurance specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring thorough review expertise
- ✅ User confirms everything is complete
### Step-Specific Rules:
- 🎯 Focus on confirmation and verification
- 🚫 FORBIDDEN to skip checking plan metadata
- 💬 MUST read the entire plan to verify completion
- 📋 Different paths for conversion vs new workflows
## EXECUTION PROTOCOLS:
- 🎯 Load and read workflow plan completely
- 💾 Check for conversionFrom metadata field
- 📖 Route to appropriate confirmation path
- 🚫 FORBIDDEN to proceed without verification
## CONTEXT BOUNDARIES:
- All build steps are complete
- This is the final verification before completion
- Conversion workflows get coverage check
- New workflows get plan completion check
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Load Workflow Plan
**Load the workflowPlanFile completely:**
Read `{workflowPlanFile}` entirely to extract:
- Frontmatter metadata (check for `conversionFrom`)
- Discovery notes
- All requirements from classification, design, tools sections
- Original workflow analysis (if conversion)
"**Loading workflow plan for confirmation...**"
### 2. Check Conversion Metadata
**Examine plan frontmatter for `conversionFrom` field:**
```yaml
conversionFrom: '{path to source workflow if this is a conversion}'
```
**IF conversionFrom EXISTS:**
Route to [Conversion Confirmation](#3-conversion-confirmation-path)
**ELSE (no conversionFrom):**
Route to [New Workflow Confirmation](#4-new-workflow-confirmation-path)
---
### 3. Conversion Confirmation Path
**DO NOT BE LAZY - Load and review the ORIGINAL workflow completely:**
"**This is a workflow conversion. Verifying all original elements are covered...**"
**Load the original workflow from conversionFrom path:**
- Read EVERY file from the source workflow
- Extract original goal, steps, instructions
**For each element from the original, verify coverage:**
#### A. Original Goal Coverage
"**Original Goal:** {from source}
**✅ Covered in new workflow:** {how it's covered}
OR
**⚠️ Partial coverage:** {what's covered} - {what might be missing}
OR
**❌ Not covered:** {explain gap}"
#### B. Original Step Coverage
**For EACH step from the original workflow:**
| Original Step | Purpose | Covered In | Status |
|---------------|---------|------------|--------|
| {step name} | {purpose} | {new step location} | ✅ Full / ⚠️ Partial / ❌ Missing |
"**Step-by-step coverage:** {count} of {total} steps fully covered"
#### C. Original Instruction Patterns
**Review how the original workflow instructed the LLM:**
"**Original instruction style:** {describe}
**New workflow instruction style:** {describe}
**Collaborative patterns preserved:** {yes/no + details}
**Key LLM instructions covered:**
{List the key instruction patterns and how they're preserved}"
#### D. Conversion Coverage Summary
Present findings:
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Conversion Coverage Report**
**Source:** {conversionFrom}
**Target:** {targetWorkflowPath}
**Overall Coverage:** {percentage}%
| Category | Total | Covered | Partial | Missing |
|----------|-------|---------|---------|---------|
| Goal | 1 | 1 | 0 | 0 |
| Steps | {count} | {count} | {count} | {count} |
| Instructions | {count} | {count} | {count} | {count} |
| Output | 1 | 1 | 0 | 0 |
---
**Missing Elements:** {count}
{List any gaps found}
**Improvements Made:** {count}
{List enhancements beyond original}
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Does this coverage look complete? Any gaps to address?**
[C] Continue - Coverage is complete
[F] Fix gaps - Address missing elements
[R] Review details - See full comparison"
**Menu Handling Logic:**
- IF C: Proceed to [Completion Handoff](#5-completion-handoff)
- IF F: Return to build steps to address gaps (route to step-09-build-next-step.md)
- IF R: Present detailed step-by-step comparison, then redisplay menu
- IF Any other: help user respond, then redisplay menu
---
### 4. New Workflow Confirmation Path
**This is a new workflow (not a conversion). Validate all plan requirements were met.**
"**Verifying all requirements from the plan were implemented...**"
#### A. Load Plan Requirements
**From workflowPlanFile, extract ALL requirements:**
- Discovery: User's vision, who it's for, what it produces
- Classification: Type, structure, mode decisions
- Requirements: Specific features, inputs, outputs
- Design: Step structure, flow, key decisions
- Tools: Data files, templates, references
#### B. Verify Each Requirement
**For EACH requirement from the plan:**
| Requirement Area | Specified | Implemented | Location | Status |
|------------------|-----------|-------------|----------|--------|
| {area} | {what was specified} | {what was built} | {file/step} | ✅/⚠️/❌ |
#### C. Plan Completion Summary
Present findings:
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Plan Completion Report**
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Overall Completion:** {percentage}%
| Requirement Area | Specified | Implemented | Status |
|------------------|-----------|-------------|--------|
| Discovery Vision | {from plan} | {what was built} | ✅/⚠️ |
| Workflow Type | {from plan} | {what was built} | ✅/⚠️ |
| Structure | {from plan} | {what was built} | ✅/⚠️ |
| Key Features | {from plan} | {what was built} | ✅/⚠️ |
| Data/Tools | {from plan} | {what was built} | ✅/⚠️ |
---
**Missing Requirements:** {count}
{List any unmet requirements}
**Beyond Plan:** {count}
{List any additional features added during build}
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Does this implementation match your vision?**
[C] Continue - Implementation is complete
[F] Fix gaps - Address missing requirements
[R] Review details - See full comparison"
**Menu Handling Logic:**
- IF C: Proceed to [Completion Handoff](#5-completion-handoff)
- IF F: Return to build steps to address gaps (route to step-09-build-next-step.md)
- IF R: Present detailed requirement-by-requirement comparison, then redisplay menu
- IF Any other: help user respond, then redisplay menu
---
### 5. Completion Handoff
**After user confirms coverage/completion:**
Update `{workflowPlanFile}` frontmatter:
```yaml
status: CONFIRMED
confirmationDate: {current date}
confirmationType: {conversion / new_workflow}
coverageStatus: {complete / gaps_accepted}
```
Proceed to [Validation Offer](#6-validation-offer).
---
### 6. Validation Offer
"**✅ Workflow build confirmed!**
**Before using your workflow, I recommend running extensive validation.**
The validation phase will systematically check:
- File structure & size
- Frontmatter compliance
- Menu handling patterns
- Step type patterns
- Output format standards
- Instruction style
- Overall quality
**Would you like to run validation?**"
Display: **Build Confirmed! Select an Option:** [V] Start Validation [S] Skip - Complete Now
#### Menu Handling Logic:
- IF V: "Loading validation phase..." → Save confirmation status, update frontmatter, then load, read entire file, then execute {validationWorkflow}
- IF S: "Skipping validation. Proceeding to completion..." → Load, read entire file, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ALWAYS check plan metadata for conversionFrom field. Route to appropriate confirmation path. Only proceed after user confirms coverage/completion is satisfactory.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Plan file loaded completely
- ConversionFrom metadata checked
- Appropriate confirmation path executed
- Original workflow reviewed (if conversion)
- Plan requirements verified (if new)
- Coverage/completion report presented clearly
- User confirms and proceeds
### ❌ SYSTEM FAILURE:
- Not loading plan file completely
- Not checking conversionFrom metadata
- Skipping original workflow review (conversion)
- Not verifying plan requirements (new)
- Proceeding without user confirmation
- Missing gaps in coverage
**Master Rule:** Check conversionFrom metadata first. For conversions, REVIEW THE ORIGINAL COMPLETELY. For new workflows, VERIFY ALL PLAN REQUIREMENTS. Only proceed after user confirms.

View File

@@ -0,0 +1,191 @@
---
name: 'step-11-completion'
description: 'Complete the workflow creation and provide next steps'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
---
# Step 11: Completion
## STEP GOAL:
Complete the workflow creation process with a summary of what was built and next steps guidance.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER modify the completed workflow at this stage
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring completion expertise
- ✅ User decides next steps
### Step-Specific Rules:
- 🎯 Focus ONLY on summary and next steps
- 🚫 FORBIDDEN to modify the built workflow
- 💬 Present options clearly
- 🚪 This is the final step
## EXECUTION PROTOCOLS:
- 🎯 Present completion summary
- 💾 Finalize plan document
- 📖 Provide usage guidance
- 🚫 No more modifications at this stage
## CONTEXT BOUNDARIES:
- All workflow steps have been built
- Confirmation has been completed
- Validation may or may not have been run
- This is the final step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Present Completion Summary
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
# Workflow Creation Complete!
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Created:** {current date}
---
## What Was Built
**Workflow Structure:**
- **Type:** [continuable/single-session]
- **Mode:** [create-only/tri-modal]
- **Steps Created:** [count]
**Files Created:**
- workflow.md (entry point)
- [count] step files in steps-c/
- [count] validation files in steps-v/ (if tri-modal)
- [count] edit files in steps-e/ (if tri-modal)
- [count] supporting files in data/
- [count] templates in templates/
---
## Your Workflow Is Ready!
**To use your new workflow:**
1. Navigate to: {targetWorkflowPath}
2. Load workflow.md to start
3. Follow the step-by-step instructions
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**"
### 2. Update Plan with Completion Status
Update {workflowPlanFile} frontmatter:
```yaml
---
workflowName: {new_workflow_name}
creationDate: [original creation date]
completionDate: [current date]
status: COMPLETE
stepsCompleted: ['step-01-discovery' or 'step-00-conversion', 'step-02-classification', 'step-03-requirements', 'step-04-tools', 'step-05-plan-review', 'step-06-design', 'step-07-foundation', 'step-08-build-step-01', 'step-09-build-next-step', 'step-10-confirmation', 'step-11-completion']
---
```
### 3. Provide Next Steps Guidance
"**Next Steps:**
**Test your workflow:**
- Run through it end-to-end
- Try with sample data
- Verify all steps work as expected
**Get user feedback:**
- If others will use it, have them test
- Gather feedback on facilitation
- Note any friction points
**Future maintenance:**
- Use validation mode to check compliance
- Use edit mode to make changes
- Validation can be run anytime
**Resources:**
- **Validate later:** Load {targetWorkflowPath}/workflow.md with -v flag
- **Edit later:** Load {targetWorkflowPath}/workflow.md with -e flag
- **Build more:** Use create workflow mode for new workflows"
### 4. Conversion-Specific Summary (If Applicable)
**Check workflowPlanFile frontmatter for `conversionFrom`:**
**IF this was a conversion:**
"**Conversion Complete!**
**Original workflow:** {conversionFrom}
**New location:** {targetWorkflowPath}
**Preserved:**
- Original goal and purpose
- All {count} steps
- Key instruction patterns
- Output format
**Improvements made:**
- BMAD compliance
- Better structure
- Enhanced collaboration
- Standards adherence
**Review the conversion report** in the confirmation step for full details."
### 5. Final Completion Message
"**Thank you for using BMAD Workflow Creator!**
Your workflow **{new_workflow_name}** is complete and ready to use.
**Workflow location:** {targetWorkflowPath}/workflow.md
Happy workflowing! ✅"
## CRITICAL STEP COMPLETION NOTE
This is the final step. Present completion summary, finalize plan, and provide next steps. No further modifications.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Completion summary presented clearly
- Plan finalized with COMPLETE status
- Usage guidance provided
- Conversion specifics noted (if applicable)
- Session ends positively
### ❌ SYSTEM FAILURE:
- Not providing clear summary
- Not finalizing plan status
- Missing usage guidance
**Master Rule:** End on a positive note with clear summary and next steps. The workflow is ready to use.