feat: security overhaul (proxy ssrf fix, streaming sanitization, docker optimization)

This commit is contained in:
Michael committed 2026-01-07 08:43:33 +01:00
1 parent 6d87ada2b8
commit 8df9a37baa
810 files changed
+131090 -151

No files matched your search

@@ -0,0 +1,158 @@
---
name: 'step-01-init'
description: 'Initialize workflow creation session by gathering project information and setting up unique workflow folder'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-01-init.md'
nextStepFile: '{workflow_path}/steps/step-02-gather.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
# No workflow plan template needed - will create plan file directly
---
# Step 1: Workflow Creation Initialization
## STEP GOAL:
To initialize the workflow creation process by understanding project context, determining a unique workflow name, and preparing for collaborative workflow 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 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 specific requirements
- ✅ Together we will create a structured, repeatable workflow
### Step-Specific Rules:
- 🎯 Focus ONLY on initialization and project understanding
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Ask questions conversationally to understand context
- 🚪 ENSURE unique workflow naming to avoid conflicts
## EXECUTION PROTOCOLS:
- 🎯 Show analysis before taking any action
- 💾 Initialize document and update frontmatter
- 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step
- 🚫 FORBIDDEN to load next step until initialization is complete
## CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- Previous context = what's in output document + frontmatter
- Don't assume knowledge from other steps
- Input discovery happens in this step
## INITIALIZATION SEQUENCE:
### 1. Project Discovery
Welcome the user and understand their needs:
"Welcome! I'm excited to help you create a new workflow. Let's start by understanding what you want to build."
Ask conversationally:
- What type of workflow are you looking to create?
- What problem will this workflow solve?
- Who will use this workflow?
- What module will it belong to (bmb, bmm, cis, custom, stand-alone)?
Also, Ask / suggest a workflow name / folder: (kebab-case, e.g., "user-story-generator")
### 2. Ensure Unique Workflow Name
After getting the workflow name:
**Check for existing workflows:**
- Look for folder at `{bmb_creations_output_folder}/workflows/{new_workflow_name}/`
- If it exists, inform the user and suggest or get from them a unique name or postfix
**Example alternatives:**
- Original: "user-story-generator"
- Alternatives: "user-story-creator", "user-story-generator-2025", "user-story-generator-enhanced"
**Loop until we have a unique name that doesn't conflict.**
### 3. Determine Target Location
Based on the module selection, confirm the target location:
- For bmb module: `{custom_workflow_location}` (defaults to `_bmad/custom/src/workflows`)
- For other modules: Check their module.yaml for custom workflow locations
- Confirm the exact folder path where the workflow will be created
- Store the confirmed path as `{targetWorkflowPath}`
### 4. Create Workflow Plan Document
Create the workflow plan document at `{workflowPlanFile}` with the following initial content:
```markdown
---
stepsCompleted: [1]
---
# Workflow Creation Plan: {new_workflow_name}
## Initial Project Context
- **Module:** [module from user]
- **Target Location:** {targetWorkflowPath}
- **Created:** [current date]
```
This plan will capture all requirements and design details before building the actual workflow.
### 5. Present MENU OPTIONS
Display: **Proceeding to requirements gathering...**
#### EXECUTION RULES:
- This is an initialization step with no user choices
- Proceed directly to next step after setup
- Use menu handling logic section below
#### Menu Handling Logic:
- After setup completion and the workflow folder with the workflow plan file created already, only then immediately load, read entire file, and then execute `{workflow_path}/steps/step-02-gather.md` to begin requirements gathering
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow name confirmed and validated
- Target folder location determined
- User welcomed and project context understood
- Ready to proceed to step 2
### ❌ SYSTEM FAILURE:
- Proceeding with step 2 without workflow name
- Not checking for existing workflow folders
- Not determining target location properly
- Skipping welcome message
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,212 @@
---
name: 'step-02-gather'
description: 'Gather comprehensive requirements for the workflow being created'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-02-gather.md'
nextStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append requirements directly to workflow plan
---
# Step 2: Requirements Gathering
## STEP GOAL:
To gather comprehensive requirements through collaborative conversation that will inform the design of a structured workflow tailored to the user's needs and use case.
## 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 and best practices
- ✅ User brings their domain knowledge and specific requirements
### Step-Specific Rules:
- 🎯 Focus ONLY on collecting requirements and understanding needs
- 🚫 FORBIDDEN to propose workflow solutions or step designs in this step
- 💬 Ask questions conversationally, not like a form
- 🚫 DO NOT skip any requirement area - each affects workflow design
## EXECUTION PROTOCOLS:
- 🎯 Engage in natural conversation to gather requirements
- 💾 Store all requirements information for workflow design
- 📖 Proceed to next step with 'C' selection
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Workflow name and target location from initialization
- Focus ONLY on collecting requirements and understanding needs
- Don't provide workflow designs in this step
- This is about understanding, not designing
## REQUIREMENTS GATHERING PROCESS:
### 1. Workflow Purpose and Scope
Explore through conversation:
- What specific problem will this workflow solve?
- Who is the primary user of this workflow?
- What is the main outcome or deliverable?
### 2. Workflow Type Classification
Help determine the workflow type:
- **Document Workflow**: Generates documents (PRDs, specs, plans)
- **Action Workflow**: Performs actions (refactoring, tools orchestration)
- **Interactive Workflow**: Guided sessions (brainstorming, coaching, training, practice)
- **Autonomous Workflow**: Runs without human input (batch processing, multi-step tasks)
- **Meta-Workflow**: Coordinates other workflows
### 3. Workflow Flow and Step Structure
Let's load some examples to help you decide the workflow pattern:
Load and reference the Meal Prep & Nutrition Plan workflow as an example:
```
Read: {project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md
```
This shows a linear workflow structure. Now let's explore your desired pattern:
- Should this be a linear workflow (step 1 → step 2 → step 3 → finish)?
- Or should it have loops/repeats (e.g., keep generating items until user says done)?
- Are there branching points based on user choices?
- Should some steps be optional?
- How many logical phases does this workflow need? (e.g., Gather → Design → Validate → Generate)
**Based on our reference examples:**
- **Linear**: Like Meal Prep Plan (Init → Profile → Assessment → Strategy → Shopping → Prep)
- See: `{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/`
- **Looping**: User Story Generator (Generate → Review → Refine → Generate more... until done)
- **Branching**: Architecture Decision (Analyze → Choose pattern → Implement based on choice)
- **Iterative**: Document Review (Load → Analyze → Suggest changes → Implement → Repeat until approved)
### 4. User Interaction Style
Understand the desired interaction level:
- How much user input is needed during execution?
- Should it be highly collaborative or mostly autonomous?
- Are there specific decision points where user must choose?
- Should the workflow adapt to user responses?
### 5. Instruction Style (Intent-Based vs Prescriptive)
Determine how the AI should execute in this workflow:
**Intent-Based (Recommended for most workflows)**:
- Steps describe goals and principles, letting the AI adapt conversation naturally
- More flexible, conversational, responsive to user context
- Example: "Guide user to define their requirements through open-ended discussion"
**Prescriptive**:
- Steps provide exact instructions and specific text to use
- More controlled, predictable, consistent across runs
- Example: "Ask: 'What is your primary goal? Choose from: A) Growth B) Efficiency C) Quality'"
Which style does this workflow need, or should it be a mix of both?
### 6. Input Requirements
Identify what the workflow needs:
- What documents or data does the workflow need to start?
- Are there prerequisites or dependencies?
- Will users need to provide specific information?
- Are there optional inputs that enhance the workflow?
### 7. Output Specifications
Define what the workflow produces:
- What is the primary output (document, action, decision)?
- Are there intermediate outputs or checkpoints?
- Should outputs be saved automatically?
- What format should outputs be in?
### 8. Success Criteria
Define what makes the workflow successful:
- How will you know the workflow achieved its goal?
- What are the quality criteria for outputs?
- Are there measurable outcomes?
- What would make a user satisfied with the result?
#### STORE REQUIREMENTS:
After collecting all requirements, append them to {workflowPlanFile} in a format that will be be used later to design in more detail and create the workflow structure.
### 9. 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: Append requirements 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](#8-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and requirements are stored in the output file, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow structure design step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Requirements collected through conversation (not interrogation)
- All workflow aspects documented
- Requirements stored using template
- Menu presented and user input handled correctly
### ❌ SYSTEM FAILURE:
- Generating workflow designs without requirements
- Skipping requirement areas
- Proceeding to next step without 'C' selection
- Not storing requirements properly
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,251 @@
---
name: 'step-03-tools-configuration'
description: 'Configure all required tools (core, memory, external) and installation requirements in one comprehensive step'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
nextStepFile: '{workflow_path}/steps/step-04-plan-review.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Documentation References
commonToolsCsv: '{project-root}/_bmad/bmb/docs/workflows/common-workflow-tools.csv'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append tools configuration directly to workflow plan
---
# Step 3: Tools Configuration
## STEP GOAL:
To comprehensively configure all tools needed for the workflow (core tools, memory, external tools) and determine installation 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 integration 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 expertise in BMAD tools and integration patterns
- ✅ User brings their workflow requirements and preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on configuring tools based on workflow requirements
- 🚫 FORBIDDEN to skip tool categories - each affects workflow design
- 💬 Present options clearly, let user make informed choices
- 🚫 DO NOT hardcode tool descriptions - reference CSV
## EXECUTION PROTOCOLS:
- 🎯 Load tools dynamically from CSV, not hardcoded
- 💾 Document all tool choices in workflow plan
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Requirements from step 2 inform tool selection
- All tool choices affect workflow design
- This is the ONLY tools configuration step
- Installation requirements affect implementation decisions
## TOOLS CONFIGURATION PROCESS:
### 1. Initialize Tools Configuration
"Configuring **Tools and Integrations**
Based on your workflow requirements, let's configure all the tools your workflow will need. This includes core BMAD tools, memory systems, and any external integrations."
### 2. Load and Present Available Tools
Load `{commonToolsCsv}` and present tools by category:
"**Available BMAD Tools and Integrations:**
**Core Tools (Always Available):**
- [List tools from CSV where propose='always', with descriptions]
**Optional Tools (Available When Needed):**
- [List tools from CSV where propose='example', with descriptions]
_Note: I'm loading these dynamically from our tools database to ensure you have the most current options._"
### 3. Configure Core BMAD Tools
"**Core BMAD Tools Configuration:**
These tools significantly enhance workflow quality and user experience:"
For each core tool from CSV (`propose='always'`):
1. **Party-Mode**
- Use case: [description from CSV]
- Where to integrate: [ask user for decision points, creative phases]
2. **Advanced Elicitation**
- Use case: [description from CSV]
- Where to integrate: [ask user for quality gates, review points]
3. **Brainstorming**
- Use case: [description from CSV]
- Where to integrate: [ask user for idea generation, innovation points]
### 4. Configure LLM Features
"**LLM Feature Integration:**
These capabilities enhance what your workflow can do:"
From CSV (`propose='always'` LLM features):
4. **Web-Browsing**
- Capability: [description from CSV]
- When needed: [ask user about real-time data needs]
5. **File I/O**
- Capability: [description from CSV]
- Operations: [ask user about file operations needed]
6. **Sub-Agents**
- Capability: [description from CSV]
- Use cases: [ask user about delegation needs]
7. **Sub-Processes**
- Capability: [description from CSV]
- Use cases: [ask user about parallel processing needs]
### 5. Configure Memory Systems
"**Memory and State Management:**
Determine if your workflow needs to maintain state between sessions:"
From CSV memory tools:
8. **Sidecar File**
- Use case: [description from CSV]
- Needed when: [ask about session continuity, agent initialization]
### 6. Configure External Tools (Optional)
"**External Integrations (Optional):**
These tools connect your workflow to external systems:"
From CSV (`propose='example'`):
- MCP integrations, database connections, APIs, etc.
- For each relevant tool: present description and ask if needed
- Note any installation requirements
### 7. Installation Requirements Assessment
"**Installation and Dependencies:**
Some tools require additional setup:"
Based on selected tools:
- Identify tools requiring installation
- Assess user's comfort level with installations
- Document installation requirements
### 8. Document Complete Tools Configuration
Append to {workflowPlanFile}:
```markdown
## Tools Configuration
### Core BMAD Tools
- **Party-Mode**: [included/excluded] - Integration points: [specific phases]
- **Advanced Elicitation**: [included/excluded] - Integration points: [specific phases]
- **Brainstorming**: [included/excluded] - Integration points: [specific phases]
### LLM Features
- **Web-Browsing**: [included/excluded] - Use cases: [specific needs]
- **File I/O**: [included/excluded] - Operations: [file management needs]
- **Sub-Agents**: [included/excluded] - Use cases: [delegation needs]
- **Sub-Processes**: [included/excluded] - Use cases: [parallel processing needs]
### Memory Systems
- **Sidecar File**: [included/excluded] - Purpose: [state management needs]
### External Integrations
- [List selected external tools with purposes]
### Installation Requirements
- [List tools requiring installation]
- **User Installation Preference**: [willing/not willing]
- **Alternative Options**: [if not installing certain tools]
```
### 9. 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 tools configuration 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](#9-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and tools configuration is saved will you load {nextStepFile} to review the complete plan.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All tool categories configured based on requirements
- User made informed choices for each tool
- Complete configuration documented in plan
- Installation requirements identified
- Ready to proceed to plan review
### ❌ SYSTEM FAILURE:
- Skipping tool categories
- Hardcoding tool descriptions instead of using CSV
- Not documenting user choices
- Proceeding without user confirmation
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,217 @@
---
name: 'step-04-plan-review'
description: 'Review complete workflow plan (requirements + tools) and get user approval before design'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-04-plan-review.md'
nextStepFormDesign: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepDesign: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append review summary directly to workflow plan
---
# Step 4: Plan Review and Approval
## STEP GOAL:
To present the complete workflow plan (requirements and tools configuration) for user review and approval before proceeding to 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 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 expertise in workflow design review and quality assurance
- ✅ User brings their specific requirements and approval authority
### Step-Specific Rules:
- 🎯 Focus ONLY on reviewing and refining the plan
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Present plan clearly and solicit feedback
- 🚫 DO NOT proceed to design without user approval
## EXECUTION PROTOCOLS:
- 🎯 Present complete plan summary from {workflowPlanFile}
- 💾 Capture any modifications or refinements
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
- 🚫 FORBIDDEN to load next step until user approves plan
## CONTEXT BOUNDARIES:
- All requirements from step 2 are available
- Tools configuration from step 3 is complete
- Focus ONLY on review and approval
- This is the final check before design phase
## PLAN REVIEW PROCESS:
### 1. Initialize Plan Review
"**Workflow Plan Review**
We've gathered all requirements and configured tools for your workflow. Let's review the complete plan to ensure it meets your needs before we start designing the workflow structure."
### 2. Present Complete Plan Summary
Load and present from {workflowPlanFile}:
"**Complete Workflow Plan: {new_workflow_name}**
**1. Project Overview:**
- [Present workflow purpose, user type, module from plan]
**2. Workflow Requirements:**
- [Present all gathered requirements]
**3. Tools Configuration:**
- [Present selected tools and integration points]
**4. Technical Specifications:**
- [Present technical constraints and requirements]
**5. Success Criteria:**
- [Present success metrics from requirements]"
### 3. Detailed Review by Category
"**Detailed Review:**
**A. Workflow Scope and Purpose**
- Is the workflow goal clearly defined?
- Are the boundaries appropriate?
- Any missing requirements?
**B. User Interaction Design**
- Does the interaction style match your needs?
- Are collaboration points clear?
- Any adjustments needed?
**C. Tools Integration**
- Are selected tools appropriate for your workflow?
- Are integration points logical?
- Any additional tools needed?
**D. Technical Feasibility**
- Are all requirements achievable?
- Any technical constraints missing?
- Installation requirements acceptable?"
### 4. Collect Feedback and Refinements
"**Review Feedback:**
Please review each section and provide feedback:
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?"
For each feedback item:
- Document the requested change
- Discuss implications on workflow design
- Confirm the refinement with user
### 5. Update Plan with Refinements
Update {workflowPlanFile} with any approved changes:
- Modify requirements section as needed
- Update tools configuration if changed
- Add any missing specifications
- Ensure all changes are clearly documented
### 6. Output Document Check
"**Output Document Check:**
Before we proceed to design, does your workflow produce any output documents or files?
Based on your requirements:
- [Analyze if workflow produces documents/files]
- Consider: Does it create reports, forms, stories, or any persistent output?"
**If NO:**
"Great! Your workflow focuses on actions/interactions without document output. We'll proceed directly to designing the workflow steps."
**If YES:**
"Perfect! Let's design your output format to ensure your workflow produces exactly what you need."
### 7. 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 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: Check if workflow produces documents:
- If YES: Update frontmatter, then load nextStepFormDesign
- If NO: Update frontmatter, then load nextStepDesign
- 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 the user has explicitly approved the plan and the plan document is updated as needed, then you load either {nextStepFormDesign} or {nextStepDesign}
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete plan presented clearly from {workflowPlanFile}
- User feedback collected and documented
- All refinements incorporated
- User explicitly approves the plan
- Plan ready for design phase
### ❌ SYSTEM FAILURE:
- Not loading plan from {workflowPlanFile}
- Skipping review categories
- Proceeding without user approval
- Not documenting refinements
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,290 @@
---
name: 'step-05-output-format-design'
description: 'Design the output format for workflows that produce documents or files'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepFile: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 5: Output Format Design
## STEP GOAL:
To design and document the output format for workflows that produce documents or files, determining whether they need strict templates or flexible formatting.
## 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 output format 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 expertise in document design and template creation
- ✅ User brings their specific output requirements and preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on output format design
- 🚫 FORBIDDEN to design workflow steps in this step
- 💬 Help user understand the format spectrum
- 🚫 DO NOT proceed without clear format requirements
## EXECUTION PROTOCOLS:
- 🎯 Guide user through format spectrum with examples
- 💾 Document format decisions in workflow plan
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved plan from step 4 is available
- Focus ONLY on output document formatting
- Skip this step if workflow produces no documents
- This step only runs when documents need structure
## OUTPUT FORMAT DESIGN PROCESS:
### 1. Initialize Output Format Discussion
"**Designing Your Output Format**
Based on your approved plan, your workflow will produce output documents. Let's design how these outputs should be formatted."
### 2. Present the Format Spectrum
"**Output Format Spectrum - Where does your workflow fit?**
**Strictly Structured Examples:**
- Government forms - exact fields, precise positions
- Legal documents - must follow specific templates
- Technical specifications - required sections, specific formats
- Compliance reports - mandatory fields, validation rules
**Structured Examples:**
- Project reports - required sections, flexible content
- Business proposals - consistent format, customizable sections
- Technical documentation - standard structure, adaptable content
- Research papers - IMRAD format, discipline-specific variations
**Semi-structured Examples:**
- Character sheets (D&D) - core stats + flexible background
- Lesson plans - required components, flexible delivery
- Recipes - ingredients/method format, flexible descriptions
- Meeting minutes - agenda/attendees/actions, flexible details
**Free-form Examples:**
- Creative stories - narrative flow, minimal structure
- Blog posts - title/body, organic organization
- Personal journals - date/entry, free expression
- Brainstorming outputs - ideas, flexible organization"
### 3. Determine Format Type
"**Which format type best fits your workflow?**
1. **Strict Template** - Must follow exact format with specific fields
2. **Structured** - Required sections but flexible within each
3. **Semi-structured** - Core sections plus optional additions
4. **Free-form** - Content-driven with minimal structure
Please choose 1-4:"
### 4. Deep Dive Based on Choice
#### IF Strict Template (Choice 1):
"**Strict Template Design**
You need exact formatting. Let's define your requirements:
**Template Source Options:**
A. Upload existing template/image to follow
B. Create new template from scratch
C. Use standard form (e.g., government, industry)
D. AI proposes template based on your needs
**Template Requirements:**
- Exact field names and positions
- Required vs optional fields
- Validation rules
- File format (PDF, DOCX, etc.)
- Any legal/compliance considerations"
#### IF Structured (Choice 2):
"**Structured Document Design**
You need consistent sections with flexibility:
**Section Definition:**
- What sections are required?
- Any optional sections?
- Section ordering rules?
- Cross-document consistency needs?
**Format Guidelines:**
- Any formatting standards (APA, MLA, corporate)?
- Section header styles?
- Content organization principles?"
#### IF Semi-structured (Choice 3):
"**Semi-structured Design**
Core sections with flexibility:
**Core Components:**
- What information must always appear?
- Which parts can vary?
- Any organizational preferences?
**Polishing Options:**
- Would you like automatic TOC generation?
- Summary section at the end?
- Consistent formatting options?"
#### IF Free-form (Choice 4):
"**Free-form Content Design**
Focus on content with minimal structure:
**Organization Needs:**
- Basic headers for readability?
- Date/title information?
- Any categorization needs?
**Final Polish Options:**
- Auto-generated summary?
- TOC based on content?
- Formatting for readability?"
### 5. Template Creation (if applicable)
For Strict/Structured workflows:
"**Template Creation Approach:**
A. **Design Together** - We'll create the template step by step
B. **AI Proposes** - I'll suggest a structure based on your needs
C. **Import Existing** - Use/upload your existing template
Which approach would you prefer?"
If A or B:
- Design/create template sections
- Define placeholders
- Specify field types and validation
- Document template structure in plan
If C:
- Request file upload or detailed description
- Analyze template structure
- Document requirements
### 6. Document Format Decisions
Append to {workflowPlanFile}:
```markdown
## Output Format Design
**Format Type**: [Strict/Structured/Semi-structured/Free-form]
**Output Requirements**:
- Document type: [report/form/story/etc]
- File format: [PDF/MD/DOCX/etc]
- Frequency: [single/batch/continuous]
**Structure Specifications**:
[Detailed structure based on format type]
**Template Information**:
- Template source: [created/imported/standard]
- Template file: [path if applicable]
- Placeholders: [list if applicable]
**Special Considerations**:
- Legal/compliance requirements
- Validation needs
- Accessibility requirements
```
### 7. 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 output format 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](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and output format is documented will you load {nextStepFile} to begin workflow step design.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- User understands format spectrum
- Format type clearly identified
- Template requirements documented (if applicable)
- Output format saved in plan
### ❌ SYSTEM FAILURE:
- Not showing format examples
- Skipping format requirements
- Not documenting decisions in plan
- Assuming format without asking
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,272 @@
---
name: 'step-06-design'
description: 'Design the workflow structure and step sequence based on gathered requirements, tools configuration, and output format'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-06-design.md'
nextStepFile: '{workflow_path}/steps/step-07-build.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References
# No template needed - will append design details directly to workflow plan
---
# 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 plan frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6]` before loading next step
- 🚫 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 may load these documents as needed:
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md` - Step file structure
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md` - Continuable init step template
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md` - Continuation step template
- `{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md` - Workflow configuration
- `{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md` - Complete example
## WORKFLOW DESIGN PROCESS:
### 1. Step Structure Design
Let's reference our step creation documentation for best practices:
Load and reference step-file architecture guide:
```
Read: {project-root}/_bmad/bmb/docs/workflows/templates/step-template.md
```
This shows the standard structure for step files. Also reference:
```
Read: {project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md
```
This shows the continuation step pattern for workflows that might take multiple sessions.
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
Design how users will interact with the workflow:
- Where should users provide input vs where the AI works autonomously?
- What type of menu options are needed at each step?
- 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?
### 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?
### 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.
@@ -0,0 +1,323 @@
---
name: 'step-07-build'
description: 'Generate all workflow files based on the approved plan'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-07-build.md'
nextStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
workflowTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md'
stepTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md'
stepInitContinuableTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md'
step1bTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md'
# No content templates needed - will create content as needed during build
# No build summary template needed - will append summary directly to workflow plan
---
# Step 7: Workflow File Generation
## STEP GOAL:
To generate all the workflow files (workflow.md, step files, templates, and supporting files) based on the approved plan from the previous design step.
## 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 generating files based on approved design
- 🚫 FORBIDDEN to modify the design without user consent
- 💬 Generate files collaboratively, getting approval at each stage
- 🚪 CREATE files in the correct target location
## EXECUTION PROTOCOLS:
- 🎯 Generate files systematically from design
- 💾 Document all generated files and their locations
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7]` before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C' and build is complete
## CONTEXT BOUNDARIES:
- Approved plan from step 6 guides implementation
- Generate files in target workflow location
- Load templates and documentation as needed during build
- Follow step-file architecture principles
## BUILD REFERENCE MATERIALS:
- When building each step file, you must follow template `{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md`
- When building continuable step-01-init.md files, use template `{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md`
- When building continuation steps, use template `{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md`
- When building the main workflow.md file, you must follow template `{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md`
- Example step files from {project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md for patterns - this is an idealized workflow so all files can give good insight into format and structure to be followed
## FILE GENERATION SEQUENCE:
### 1. Confirm Build Readiness
Based on the approved plan, confirm:
"I have your approved plan and I'm ready to generate the workflow files. The plan specifies creating:
- Main workflow.md file
- [Number] step files
- [Number] templates
- Supporting files
All in: {targetWorkflowPath}
Ready to proceed?"
### 2. Create Directory Structure
Create the workflow folder structure in the target location:
```
{bmb_creations_output_folder}/workflows/{workflow_name}/
├── workflow.md
├── steps/
│ ├── step-01-init.md
│ ├── step-01b-continue.md (if continuation support needed)
│ ├── step-02-[name].md
│ └── ...
├── templates/
│ └── [as needed]
└── data/
└── [as needed]
```
For bmb module, this will be: `_bmad/custom/src/workflows/{workflow_name}/`
For other modules, check their module.yaml for custom_workflow_location
### 3. Generate workflow.md
Load and follow {workflowTemplate}:
- Create workflow.md using template structure
- Insert workflow name and description
- Configure all path variables ({project-root}, _bmad, {workflow_path})
- Set web_bundle flag to true unless user has indicated otherwise
- Define role and goal
- Include initialization path to step-01
### 4. Generate Step Files
#### 4a. Check for Continuation Support
**Check the workflow plan for continuation support:**
- Look for "continuation support: true" or similar flag
- Check if step-01b-continue.md was included in the design
- If workflow generates output documents, continuation is typically needed
#### 4b. Generate step-01-init.md (with continuation logic)
If continuation support is needed:
- Load and follow {stepInitContinuableTemplate}
- This template automatically includes all required continuation detection logic
- Customize with workflow-specific information:
- Update workflow_path references
- Set correct outputFile and templateFile paths
- Adjust role and persona to match workflow type
- Customize welcome message for workflow context
- Configure input document discovery patterns (if any)
- Template automatically handles:
- continueFile reference in frontmatter
- Logic to check for existing output files with stepsCompleted
- Routing to step-01b-continue.md for continuation
- Fresh workflow initialization
#### 4c. Generate step-01b-continue.md (if needed)
**If continuation support is required:**
- Load and follow {step1bTemplate}
- Customize with workflow-specific information:
- Update workflow_path references
- Set correct outputFile path
- Adjust role and persona to match workflow type
- Customize welcome back message for workflow context
- Ensure proper nextStep detection logic based on step numbers
#### 4d. Generate Remaining Step Files
For each remaining step in the design:
- Load and follow {stepTemplate}
- Create step file using template structure
- Customize with step-specific content
- Ensure proper frontmatter with path references
- Include appropriate menu handling and universal rules
- Follow all mandatory rules and protocols from template
- **Critical**: Ensure each step updates `stepsCompleted` array when completing
### 5. Generate Templates (If Needed)
For document workflows:
- Create template.md with proper structure
- Include all variables from design
- Ensure variable naming consistency
Remember that the output format design we aligned on chose one of the following - and what it means practically when creating the workflow steps:
1. **Strict Template** - Must follow exact format with specific fields
1. This is similar to the example where there are multiple template fragements that are specific with all fields to be in the final output.
2. generally there will be 1 fragment to a step to complete in the overall template.
2. **Structured** - Required sections but flexible within each
1. Usually there will just be one template file - and in this mode it lists out all the section headings (generally level 2 sections in the md) with a handlebars style placeholder for each section.
2. Step files responsible for a specific section will upon user Continue of that step ensure output is written to the templates proper section
3. **Semi-structured** - Core sections plus optional additions
1. Similar to the prior 2, but not all sections or content are listed in the template, some steps might offer various paths or options to go to different steps (or variance within a step) that can determine what sections end up in the final document
4. **Free-form** - Content-driven with minimal structure
1. These are the easiest and most flexible. The single template usually only has the front matter fence with a stepsCompleted array and maybe some other fields, and outside of the front matter just the level 1 doc title
2. With free form, any step that could produce content just appends to the end of the document, so its progressively build in the order of ste[s completed.
3. Its good to have in this type of workflow a final polish output doc type step that cohesively can update the doc built up in this progressive manner, improving flow, reducing duplication, and ensure all information is aligned and where it belongs.
### 6. Generate Supporting Files
Based on design requirements:
- Create data files (csv)
- Generate README.md with usage instructions
- Create any configuration files
- Add validation checklists if designed
### 7. Verify File Generation
After creating all files:
- Check all file paths are correct
- Validate frontmatter syntax
- Ensure variable consistency across files
- Confirm sequential step numbering
- Verify menu handling logic
### 8. Document Generated Files
Create a summary of what was generated:
- List all files created with full paths
- Note any customizations from templates
- Identify any manual steps needed
- Provide next steps for testing
## QUALITY CHECKS DURING BUILD:
### Frontmatter Validation
- All YAML syntax is correct
- Required fields are present
- Path variables use correct format
- No hardcoded paths exist
### Step File Compliance
- Each step follows the template structure
- All mandatory rules are included
- Menu handling is properly implemented
- Step numbering is sequential
### Cross-File Consistency
- Variable names match across files
- Path references are consistent
- Dependencies are correctly defined
- No orphaned references exist
## BUILD PRINCIPLES:
### Follow Design Exactly
- Implement the design as approved
- Don't add or remove steps without consultation
- Maintain the interaction patterns designed
- Preserve the data flow architecture
### Maintain Best Practices
- Keep step files focused and reasonably sized (typically 5-10KB)
- Use collaborative dialogue patterns
- Include proper error handling
- Follow naming conventions
### Ensure Extensibility
- Design for future modifications
- Include clear documentation
- Make code readable and maintainable
- Provide examples where helpful
## CONTENT TO APPEND TO PLAN:
After generating all files, append to {workflowPlanFile}:
Create a build summary including:
- List of all files created with full paths
- Any customizations from templates
- Manual steps needed
- Next steps for testing
### 9. Present MENU OPTIONS
Display: **Build Complete - Select an Option:** [C] Continue to Review
#### EXECUTION RULES:
- Build complete - all files generated
- Present simple completion status
- User selects [C] to continue to review step
#### Menu Handling Logic:
- IF C: Save build summary to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and content is saved to plan and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow review step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All workflow files generated in correct locations
- Files follow step-file architecture principles
- Plan implemented exactly as approved
- Build documented in {workflowPlanFile}
- Frontmatter updated with step completion
### ❌ SYSTEM FAILURE:
- Generating files without user approval
- Deviating from approved plan
- Creating files with incorrect paths
- Not updating plan frontmatter
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,285 @@
---
name: 'step-08-review'
description: 'Review the generated workflow and provide final validation and next steps'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References
# No review template needed - will append review summary directly to workflow plan
# No completion template needed - will append completion details directly
# Next step reference
nextStepFile: '{workflow_path}/steps/step-09-complete.md'
---
# Step 8: Workflow Review and Completion
## STEP GOAL:
To review the generated workflow for completeness, accuracy, and adherence to best practices, then provide next steps for deployment and usage.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: Always 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 quality assurance expertise and validation knowledge
- ✅ User provides final approval and feedback
### Step-Specific Rules:
- 🎯 Focus ONLY on reviewing and validating generated workflow
- 🚫 FORBIDDEN to make changes without user approval
- 💬 Guide review process collaboratively
- 🚪 COMPLETE the workflow creation process
## EXECUTION PROTOCOLS:
- 🎯 Conduct thorough review of generated workflow
- 💾 Document review findings and completion status
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8]` and mark complete
- 🚫 This is the final step - no next step to load
## CONTEXT BOUNDARIES:
- Generated workflow files are available for review
- Focus on validation and quality assurance
- This step completes the workflow creation process
- No file modifications without explicit user approval
## WORKFLOW REVIEW PROCESS:
### 1. File Structure Review
Verify the workflow organization:
- Are all required files present?
- Is the directory structure correct?
- Are file names following conventions?
- Are paths properly configured?
### 2. Configuration Validation
Check workflow.yaml:
- Is all metadata correctly filled?
- Are path variables properly formatted?
- Is the standalone property set correctly?
- Are all dependencies declared?
### 3. Step File Compliance
Review each step file:
- Does each step follow the template structure?
- Are all mandatory rules included?
- Is menu handling properly implemented?
- Are frontmatter variables correct?
- Are steps properly numbered?
### 4. Cross-File Consistency
Verify integration between files:
- Do variable names match across all files?
- Are path references consistent?
- Is the step sequence logical?
- Are there any broken references?
### 5. Requirements Verification
Confirm original requirements are met:
- Does the workflow address the original problem?
- Are all user types supported?
- Are inputs and outputs as specified?
- Is the interaction style as designed?
### 6. Best Practices Adherence
Check quality standards:
- Are step files focused and reasonably sized (5-10KB typical)?
- Is collaborative dialogue implemented?
- Is error handling included?
- Are naming conventions followed?
### 7. Test Scenario Planning
Prepare for testing:
- What test data would be useful?
- What scenarios should be tested?
- How can the workflow be invoked?
- What would indicate successful execution?
### 8. Deployment Preparation
Provide next steps:
- Installation requirements
- Invocation commands
- Testing procedures
- Documentation needs
## REVIEW FINDINGS DOCUMENTATION:
### Issues Found
Document any issues discovered:
- **Critical Issues**: Must fix before use
- **Warnings**: Should fix for better experience
- **Suggestions**: Nice to have improvements
### Validation Results
Record validation outcomes:
- Configuration validation: PASSED/FAILED
- Step compliance: PASSED/FAILED
- Cross-file consistency: PASSED/FAILED
- Requirements verification: PASSED/FAILED
### Recommendations
Provide specific recommendations:
- Immediate actions needed
- Future improvements
- Training needs
- Maintenance considerations
## COMPLETION CHECKLIST:
### Final Validations
- [ ] All files generated successfully
- [ ] No syntax errors in YAML
- [ ] All paths are correct
- [ ] Variables are consistent
- [ ] Design requirements met
- [ ] Best practices followed
### User Acceptance
- [ ] User has reviewed generated workflow
- [ ] User approves of the implementation
- [ ] User understands next steps
- [ ] User satisfied with the result
### Documentation
- [ ] Build summary complete
- [ ] Review findings documented
- [ ] Next steps provided
- [ ] Contact information for support
## CONTENT TO APPEND TO PLAN:
After completing review, append to {workflowPlanFile}:
Append review findings to {workflowPlanFile}:
Create a review summary including:
- Completeness check results
- Accuracy validation
- Compliance with best practices
- Any issues found
Then append completion details:
- Final approval status
- Deployment recommendations
- Usage guidance
### 10. Present MENU OPTIONS
Display: **Select an Option:** [C] Continue to Completion
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- 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 C: Save review 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)
## COMPLIANCE CHECK INSTRUCTIONS
When user selects [C], provide these instructions:
**🎯 Workflow Creation Complete! Your new workflow is ready at:**
`{target_workflow_path}`
**⚠️ IMPORTANT - Run Compliance Check in New Context:**
To validate your workflow meets BMAD standards:
1. **Start a new Claude conversation** (fresh context)
2. **Use this command:** `/bmad:bmm:workflows:workflow-compliance-check`
3. **Provide the path:** `{target_workflow_path}/workflow.md`
4. **Follow the validation process** to identify and fix any violations
**Why New Context?**
- Compliance checking requires fresh analysis without workflow creation context
- Ensures objective validation against template standards
- Provides detailed violation reporting with specific fix recommendations
**Your workflow will be checked for:**
- Template compliance and structure
- Step-by-step validation standards
- File optimization and formatting
- Meta-workflow best practices
Ready to validate when you are! [Start new context and run compliance check]
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Generated workflow thoroughly reviewed
- All validations performed
- Issues documented with solutions
- User approves final workflow
- Complete documentation provided
### ❌ SYSTEM FAILURE:
- Skipping review steps
- Not documenting findings
- Ending without user approval
- Not providing next steps
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,188 @@
---
name: 'step-09-complete'
description: 'Final completion and wrap-up of workflow creation process'
# Path Definitions
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
# File References
thisStepFile: '{workflow_path}/steps/step-09-complete.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
completionFile: '{targetWorkflowPath}/completion-summary-{new_workflow_name}.md'
---
# Step 9: Workflow Creation Complete
## STEP GOAL:
To complete the workflow creation process with a final summary, confirmation, and next steps for using the new workflow.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 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 expertise in workflow deployment and usage guidance
- ✅ User brings their specific workflow needs
### Step-Specific Rules:
- 🎯 Focus ONLY on completion and next steps
- 🚫 FORBIDDEN to modify the generated workflow
- 💬 Provide clear guidance on how to use the workflow
- 🚫 This is the final step - no next step to load
## EXECUTION PROTOCOLS:
- 🎯 Present completion summary
- 💾 Create final completion documentation
- 📖 Update plan frontmatter with completion status
- 🚫 This is the final step
## CONTEXT BOUNDARIES:
- All previous steps are complete
- Workflow has been generated and reviewed
- Focus ONLY on completion and next steps
- This step concludes the create-workflow process
## COMPLETION PROCESS:
### 1. Initialize Completion
"**Workflow Creation Complete!**
Congratulations! We've successfully created your new workflow. Let's finalize everything and ensure you have everything you need to start using it."
### 2. Final Summary
Present a complete summary of what was created:
**Workflow Created:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Files Generated:** [list from build step]
### 3. Create Completion Summary
Create {completionFile} with:
```markdown
---
workflowName: { new_workflow_name }
creationDate: [current date]
module: [module from plan]
status: COMPLETE
stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
---
# Workflow Creation Summary
## Workflow Information
- **Name:** {new_workflow_name}
- **Module:** [module]
- **Created:** [date]
- **Location:** {targetWorkflowPath}
## Generated Files
[List all files created]
## Quick Start Guide
[How to run the new workflow]
## Next Steps
[Post-creation recommendations]
```
### 4. Usage Guidance
Provide clear instructions on how to use the new workflow:
**How to Use Your New Workflow:**
1. **Running the Workflow:**
- [Instructions based on workflow type]
- [Initial setup if needed]
2. **Common Use Cases:**
- [Typical scenarios for using the workflow]
- [Expected inputs and outputs]
3. **Tips for Success:**
- [Best practices for this specific workflow]
- [Common pitfalls to avoid]
### 5. Post-Creation Recommendations
"**Next Steps:**
1. **Test the Workflow:** Run it with sample data to ensure it works as expected
2. **Customize if Needed:** You can modify the workflow based on your specific needs
3. **Share with Team:** If others will use this workflow, provide them with the location and instructions
4. **Monitor Usage:** Keep track of how well the workflow meets your needs"
### 6. Final Confirmation
"**Is there anything else you need help with regarding your new workflow?**
- I can help you test it
- We can make adjustments if needed
- I can help you create documentation for users
- Or any other support you need"
### 7. Update Final Status
Update {workflowPlanFile} frontmatter:
- Set status to COMPLETE
- Set completion date
- Add stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
## MENU OPTIONS
Display: **Workflow Creation Complete!** [T] Test Workflow [M] Make Adjustments [D] Get Help
### Menu Handling Logic:
- IF T: Offer to run the newly created workflow with sample data
- IF M: Offer to make specific adjustments to the workflow
- IF D: Provide additional help and resources
- IF Any other: Respond to user needs
## CRITICAL STEP COMPLETION NOTE
This is the final step. When the user is satisfied, the workflow creation process is complete.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow fully created and reviewed
- Completion summary generated
- User understands how to use the workflow
- All documentation is in place
### ❌ SYSTEM FAILURE:
- Not providing clear usage instructions
- Not creating completion summary
- Leaving user without next steps
**Master Rule:** Ensure the user has everything needed to successfully use their new workflow.