mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
move agent builder docs, create workflow builder docs, and a new workflow builder to conform to stepwise workflow creation
This commit is contained in:
@@ -1,277 +0,0 @@
|
||||
# Build Workflow
|
||||
|
||||
## Overview
|
||||
|
||||
The Build Workflow is an interactive workflow builder that guides you through creating new BMAD workflows with proper structure, conventions, and validation. It ensures all workflows follow best practices for optimal human-AI collaboration and are fully compliant with the BMAD Core v6 workflow execution engine.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Optional Brainstorming Phase**: Creative exploration of workflow ideas before structured development
|
||||
- **Comprehensive Guidance**: Step-by-step process with detailed instructions and examples
|
||||
- **Template-Based**: Uses proven templates for all workflow components
|
||||
- **Convention Enforcement**: Ensures adherence to BMAD workflow creation guide
|
||||
- **README Generation**: Automatically creates comprehensive documentation
|
||||
- **Validation Built-In**: Includes checklist generation for quality assurance
|
||||
- **Type-Aware**: Adapts to document, action, interactive, autonomous, or meta-workflow types
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Invocation
|
||||
|
||||
```bash
|
||||
workflow create-workflow
|
||||
```
|
||||
|
||||
### Through BMad Builder Agent
|
||||
|
||||
```
|
||||
*create-workflow
|
||||
```
|
||||
|
||||
### What You'll Be Asked
|
||||
|
||||
1. **Optional**: Whether to brainstorm workflow ideas first (creative exploration phase)
|
||||
2. Workflow name and target module
|
||||
3. Workflow purpose and type (enhanced by brainstorming insights if used)
|
||||
4. Metadata (description, author, outputs)
|
||||
5. Step-by-step design (goals, variables, flow)
|
||||
6. Whether to include optional components
|
||||
|
||||
## Workflow Structure
|
||||
|
||||
### Files Included
|
||||
|
||||
```
|
||||
create-workflow/
|
||||
├── workflow.yaml # Configuration and metadata
|
||||
├── instructions.md # Step-by-step execution guide
|
||||
├── checklist.md # Validation criteria
|
||||
├── workflow-creation-guide.md # Comprehensive reference guide
|
||||
├── README.md # This file
|
||||
└── workflow-template/ # Templates for new workflows
|
||||
├── workflow.yaml
|
||||
├── instructions.md
|
||||
├── template.md
|
||||
├── checklist.md
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Understanding Instruction Styles
|
||||
|
||||
One of the most important decisions when creating a workflow is choosing the **instruction style** - how the workflow guides the AI's interaction with users.
|
||||
|
||||
### Intent-Based vs Prescriptive Instructions
|
||||
|
||||
**Intent-Based (Recommended for most workflows)**
|
||||
|
||||
Guides the LLM with goals and principles, allowing natural conversation adaptation.
|
||||
|
||||
- **More flexible and conversational** - AI adapts questions to context
|
||||
- **Better for complex discovery** - Requirements gathering, creative exploration
|
||||
- **Quality over consistency** - Focus on deep understanding
|
||||
- **Example**: `<action>Guide user to define their target audience with specific demographics and needs</action>`
|
||||
|
||||
**Best for:**
|
||||
|
||||
- Complex discovery processes (user research, requirements)
|
||||
- Creative brainstorming and ideation
|
||||
- Iterative refinement workflows
|
||||
- When adaptation to context matters
|
||||
- Workflows requiring nuanced understanding
|
||||
|
||||
**Prescriptive**
|
||||
|
||||
Provides exact wording for questions and structured options.
|
||||
|
||||
- **More controlled and predictable** - Same questions every time
|
||||
- **Better for simple data collection** - Platform choices, yes/no decisions
|
||||
- **Consistency over quality** - Standardized execution
|
||||
- **Example**: `<ask>What is your target platform? Choose: PC, Console, Mobile, Web</ask>`
|
||||
|
||||
**Best for:**
|
||||
|
||||
- Simple data collection (platform, format, binary choices)
|
||||
- Compliance verification and standards
|
||||
- Configuration with finite options
|
||||
- Quick setup wizards
|
||||
- When consistency is critical
|
||||
|
||||
### Best Practice: Mix Both Styles
|
||||
|
||||
The most effective workflows use **both styles strategically**:
|
||||
|
||||
```xml
|
||||
<!-- Intent-based workflow with prescriptive moments -->
|
||||
<step n="1" goal="Understand user vision">
|
||||
<action>Explore the user's vision, uncovering creative intent and target experience</action>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Capture basic metadata">
|
||||
<ask>What is your target platform? Choose: PC, Console, Mobile, Web</ask>
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Deep dive into details">
|
||||
<action>Guide user to articulate their core approach and unique aspects</action>
|
||||
</step>
|
||||
```
|
||||
|
||||
**During workflow creation**, you'll be asked to choose a **primary style preference** - this sets the default approach, but you can (and should) use the other style when it makes more sense for specific steps.
|
||||
|
||||
## Workflow Process
|
||||
|
||||
### Phase 0: Optional Brainstorming (Step -1)
|
||||
|
||||
- **Creative Exploration**: Option to brainstorm workflow ideas before structured development
|
||||
- **Design Concept Development**: Generate multiple approaches and explore different possibilities
|
||||
- **Requirement Clarification**: Use brainstorming output to inform workflow purpose, type, and structure
|
||||
- **Enhanced Creativity**: Leverage AI brainstorming tools for innovative workflow design
|
||||
|
||||
The brainstorming phase invokes the CIS brainstorming workflow to:
|
||||
|
||||
- Explore workflow ideas and approaches
|
||||
- Clarify requirements and use cases
|
||||
- Generate creative solutions for complex automation needs
|
||||
- Inform the structured workflow building process
|
||||
|
||||
### Phase 1: Planning (Steps 0-3)
|
||||
|
||||
- Load workflow creation guide and conventions
|
||||
- Define workflow purpose, name, and type (informed by brainstorming if used)
|
||||
- Gather metadata and configuration details
|
||||
- Design step structure and flow
|
||||
|
||||
### Phase 2: Generation (Steps 4-8)
|
||||
|
||||
- Create workflow.yaml with proper configuration
|
||||
- Generate instructions.md with XML-structured steps
|
||||
- Create template.md (for document workflows)
|
||||
- Generate validation checklist
|
||||
- Create supporting data files (optional)
|
||||
|
||||
### Phase 3: Documentation and Validation (Steps 9-11)
|
||||
|
||||
- Create comprehensive README.md (MANDATORY)
|
||||
- Test and validate workflow structure
|
||||
- Provide usage instructions and next steps
|
||||
|
||||
## Output
|
||||
|
||||
### Generated Workflow Folder
|
||||
|
||||
Creates a complete workflow folder at:
|
||||
`{project-root}/{bmad_folder}/{{target_module}}/workflows/{{workflow_name}}/`
|
||||
|
||||
### Files Created
|
||||
|
||||
**Always Created:**
|
||||
|
||||
- `workflow.yaml` - Configuration with paths and variables
|
||||
- `README.md` - Comprehensive documentation (MANDATORY as of v6)
|
||||
- `instructions.md` - Execution steps (if not template-only workflow)
|
||||
|
||||
**Conditionally Created:**
|
||||
|
||||
- `template.md` - Document structure (for document workflows)
|
||||
- `checklist.md` - Validation criteria (optional but recommended)
|
||||
- Supporting data files (CSV, JSON, etc. as needed)
|
||||
|
||||
### Output Structure
|
||||
|
||||
For document workflows, the README documents:
|
||||
|
||||
- Workflow purpose and use cases
|
||||
- Usage examples with actual commands
|
||||
- Input expectations
|
||||
- Output structure and location
|
||||
- Best practices
|
||||
|
||||
## Requirements
|
||||
|
||||
- Access to workflow creation guide
|
||||
- BMAD Core v6 project structure
|
||||
- Module to host the new workflow (bmm, bmb, cis, or custom)
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Before Starting
|
||||
|
||||
1. **Consider Brainstorming**: If you're unsure about the workflow approach, use the optional brainstorming phase
|
||||
2. Review the workflow creation guide to understand conventions
|
||||
3. Have a clear understanding of the workflow's purpose (or be ready to explore it creatively)
|
||||
4. Know which type of workflow you're creating (document, action, etc.) or be open to discovery
|
||||
5. Identify any data files or references needed
|
||||
|
||||
### Creative Workflow Design
|
||||
|
||||
The create-workflow now supports a **seamless transition from creative ideation to structured implementation**:
|
||||
|
||||
- **"I need a workflow for something..."** → Start with brainstorming to explore possibilities
|
||||
- **Brainstorm** → Generate multiple approaches and clarify requirements
|
||||
- **Structured workflow** → Build the actual workflow using insights from brainstorming
|
||||
- **One seamless session** → Complete the entire process from idea to implementation
|
||||
|
||||
### During Execution
|
||||
|
||||
1. Follow kebab-case naming conventions
|
||||
2. Be specific with step goals and instructions
|
||||
3. Use descriptive variable names (snake_case)
|
||||
4. Set appropriate limits ("3-5 items maximum")
|
||||
5. Include examples where helpful
|
||||
|
||||
### After Completion
|
||||
|
||||
1. Test the newly created workflow
|
||||
2. Validate against the checklist
|
||||
3. Ensure README is comprehensive and accurate
|
||||
4. Test all file paths and variable references
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue: Generated workflow won't execute
|
||||
|
||||
- **Solution**: Verify all file paths in workflow.yaml use proper variable substitution
|
||||
- **Check**: Ensure installed_path and project-root are correctly set
|
||||
|
||||
### Issue: Variables not replacing in template
|
||||
|
||||
- **Solution**: Ensure variable names match exactly between instructions `<template-output>` tags and template `{{variables}}`
|
||||
- **Check**: Use snake_case consistently
|
||||
|
||||
### Issue: README has placeholder text
|
||||
|
||||
- **Solution**: This workflow now enforces README generation - ensure Step 10 completed fully
|
||||
- **Check**: No {WORKFLOW_TITLE} or similar placeholders should remain
|
||||
|
||||
## Customization
|
||||
|
||||
To modify this workflow:
|
||||
|
||||
1. Edit `instructions.md` to adjust the creation process
|
||||
2. Update templates in `workflow-template/` to change generated files
|
||||
3. Modify `workflow-creation-guide.md` to update conventions
|
||||
4. Edit `checklist.md` to change validation criteria
|
||||
|
||||
## Version History
|
||||
|
||||
- **v6.0.0** - README.md now MANDATORY for all workflows
|
||||
- Added comprehensive README template
|
||||
- Enhanced validation for documentation
|
||||
- Improved Step 10 with detailed README requirements
|
||||
|
||||
- **v6.0.0** - Initial BMAD Core v6 compatible version
|
||||
- Template-based workflow generation
|
||||
- Convention enforcement
|
||||
- Validation checklist support
|
||||
|
||||
## Support
|
||||
|
||||
For issues or questions:
|
||||
|
||||
- Review `/{bmad_folder}/bmb/workflows/create-workflow/workflow-creation-guide.md`
|
||||
- Check existing workflows in `/{bmad_folder}/bmm/workflows/` for examples
|
||||
- Validate against `/{bmad_folder}/bmb/workflows/create-workflow/checklist.md`
|
||||
- Consult BMAD Method v6 documentation
|
||||
|
||||
---
|
||||
|
||||
_Part of the BMad Method v6 - BMB (BMad Builder) Module_
|
||||
@@ -1,197 +0,0 @@
|
||||
# Workflow Brainstorming Context
|
||||
|
||||
_Context provided to brainstorming workflow when creating a new BMAD workflow_
|
||||
|
||||
## Session Focus
|
||||
|
||||
You are brainstorming ideas for a **BMAD workflow** - a guided, multi-step process that helps users accomplish complex tasks with structure, consistency, and quality.
|
||||
|
||||
## What is a BMAD Workflow?
|
||||
|
||||
A workflow is a structured process that provides:
|
||||
|
||||
- **Clear Steps**: Sequential operations with defined goals
|
||||
- **User Guidance**: Prompts, questions, and decisions at each phase
|
||||
- **Quality Output**: Documents, artifacts, or completed actions
|
||||
- **Repeatability**: Same process yields consistent results
|
||||
- **Type**: Document (creates docs), Action (performs tasks), Interactive (guides sessions), Autonomous (runs automated), Meta (orchestrates other workflows)
|
||||
|
||||
## Brainstorming Goals
|
||||
|
||||
Explore and define:
|
||||
|
||||
### 1. Problem and Purpose
|
||||
|
||||
- **What task needs structure?** (specific process users struggle with)
|
||||
- **Why is this hard manually?** (complexity, inconsistency, missing steps)
|
||||
- **What would ideal process look like?** (steps, checkpoints, outputs)
|
||||
- **Who needs this?** (target users and their pain points)
|
||||
|
||||
### 2. Process Flow
|
||||
|
||||
- **How many phases?** (typically 3-10 major steps)
|
||||
- **What's the sequence?** (logical flow from start to finish)
|
||||
- **What decisions are needed?** (user choices that affect path)
|
||||
- **What's optional vs required?** (flexibility points)
|
||||
- **What checkpoints matter?** (validation, review, approval points)
|
||||
|
||||
### 3. Inputs and Outputs
|
||||
|
||||
- **What inputs are needed?** (documents, data, user answers)
|
||||
- **What outputs are generated?** (documents, code, configurations)
|
||||
- **What format?** (markdown, XML, YAML, actions)
|
||||
- **What quality criteria?** (how to validate success)
|
||||
|
||||
### 4. Workflow Type and Style
|
||||
|
||||
- **Document Workflow?** Creates structured documents (PRDs, specs, reports)
|
||||
- **Action Workflow?** Performs operations (refactoring, deployment, analysis)
|
||||
- **Interactive Workflow?** Guides creative process (brainstorming, planning)
|
||||
- **Autonomous Workflow?** Runs without user input (batch processing, generation)
|
||||
- **Meta Workflow?** Orchestrates other workflows (project setup, module creation)
|
||||
|
||||
## Creative Constraints
|
||||
|
||||
A great BMAD workflow should be:
|
||||
|
||||
- **Focused**: Solves one problem well (not everything)
|
||||
- **Structured**: Clear phases with defined goals
|
||||
- **Flexible**: Optional steps, branching paths where appropriate
|
||||
- **Validated**: Checklist to verify completeness and quality
|
||||
- **Documented**: README explains when and how to use it
|
||||
|
||||
## Workflow Architecture Questions
|
||||
|
||||
### Core Structure
|
||||
|
||||
1. **Workflow name** (kebab-case, e.g., "product-brief")
|
||||
2. **Purpose** (one sentence)
|
||||
3. **Type** (document/action/interactive/autonomous/meta)
|
||||
4. **Major phases** (3-10 high-level steps)
|
||||
5. **Output** (what gets created)
|
||||
|
||||
### Process Details
|
||||
|
||||
1. **Required inputs** (what user must provide)
|
||||
2. **Optional inputs** (what enhances results)
|
||||
3. **Decision points** (where user chooses path)
|
||||
4. **Checkpoints** (where to pause for approval)
|
||||
5. **Variables** (data passed between steps)
|
||||
|
||||
### Quality and Validation
|
||||
|
||||
1. **Success criteria** (what defines "done")
|
||||
2. **Validation checklist** (measurable quality checks)
|
||||
3. **Common issues** (troubleshooting guidance)
|
||||
4. **Best practices** (tips for optimal results)
|
||||
|
||||
## Workflow Pattern Examples
|
||||
|
||||
### Document Generation Workflows
|
||||
|
||||
- **Product Brief**: Idea → Vision → Features → Market → Output
|
||||
- **PRD**: Requirements → User Stories → Acceptance Criteria → Document
|
||||
- **Architecture**: Requirements → Decisions → Design → Diagrams → ADRs
|
||||
- **Technical Spec**: Epic → Implementation → Testing → Deployment → Doc
|
||||
|
||||
### Action Workflows
|
||||
|
||||
- **Code Refactoring**: Analyze → Plan → Refactor → Test → Commit
|
||||
- **Deployment**: Build → Test → Stage → Validate → Deploy → Monitor
|
||||
- **Migration**: Assess → Plan → Convert → Validate → Deploy
|
||||
- **Analysis**: Collect → Process → Analyze → Report → Recommend
|
||||
|
||||
### Interactive Workflows
|
||||
|
||||
- **Brainstorming**: Setup → Generate → Expand → Evaluate → Prioritize
|
||||
- **Planning**: Context → Goals → Options → Decisions → Plan
|
||||
- **Review**: Load → Analyze → Critique → Suggest → Document
|
||||
|
||||
### Meta Workflows
|
||||
|
||||
- **Project Setup**: Plan → Architecture → Stories → Setup → Initialize
|
||||
- **Module Creation**: Brainstorm → Brief → Agents → Workflows → Install
|
||||
- **Sprint Planning**: Backlog → Capacity → Stories → Commit → Kickoff
|
||||
|
||||
## Workflow Design Patterns
|
||||
|
||||
### Linear Flow
|
||||
|
||||
Simple sequence: Step 1 → Step 2 → Step 3 → Done
|
||||
|
||||
**Good for:**
|
||||
|
||||
- Document generation
|
||||
- Structured analysis
|
||||
- Sequential builds
|
||||
|
||||
### Branching Flow
|
||||
|
||||
Conditional paths: Step 1 → [Decision] → Path A or Path B → Merge → Done
|
||||
|
||||
**Good for:**
|
||||
|
||||
- Different project types
|
||||
- Optional deep dives
|
||||
- Scale-adaptive processes
|
||||
|
||||
### Iterative Flow
|
||||
|
||||
Refinement loops: Step 1 → Step 2 → [Review] → (Repeat if needed) → Done
|
||||
|
||||
**Good for:**
|
||||
|
||||
- Creative processes
|
||||
- Quality refinement
|
||||
- Approval cycles
|
||||
|
||||
### Router Flow
|
||||
|
||||
Type selection: [Select Type] → Load appropriate instructions → Execute → Done
|
||||
|
||||
**Good for:**
|
||||
|
||||
- Multi-mode workflows
|
||||
- Reusable frameworks
|
||||
- Flexible tools
|
||||
|
||||
## Suggested Brainstorming Techniques
|
||||
|
||||
Particularly effective for workflow ideation:
|
||||
|
||||
1. **Process Mapping**: Draw current painful process, identify improvements
|
||||
2. **Step Decomposition**: Break complex task into atomic steps
|
||||
3. **Checkpoint Thinking**: Where do users need pause/review/decision?
|
||||
4. **Pain Point Analysis**: What makes current process frustrating?
|
||||
5. **Success Visualization**: What does perfect execution look like?
|
||||
|
||||
## Key Questions to Answer
|
||||
|
||||
1. What manual process needs structure and guidance?
|
||||
2. What makes this process hard or inconsistent today?
|
||||
3. What are the 3-10 major phases/steps?
|
||||
4. What document or output gets created?
|
||||
5. What inputs are required from the user?
|
||||
6. What decisions or choices affect the flow?
|
||||
7. What quality criteria define success?
|
||||
8. Document, Action, Interactive, Autonomous, or Meta workflow?
|
||||
9. What makes this workflow valuable vs doing it manually?
|
||||
10. What would make this workflow delightful to use?
|
||||
|
||||
## Output Goals
|
||||
|
||||
Generate:
|
||||
|
||||
- **Workflow name**: Clear, describes the process
|
||||
- **Purpose statement**: One sentence explaining value
|
||||
- **Workflow type**: Classification with rationale
|
||||
- **Phase outline**: 3-10 major steps with goals
|
||||
- **Input/output description**: What goes in, what comes out
|
||||
- **Key decisions**: Where user makes choices
|
||||
- **Success criteria**: How to know it worked
|
||||
- **Unique value**: Why this workflow beats manual process
|
||||
- **Use cases**: 3-5 scenarios where this workflow shines
|
||||
|
||||
---
|
||||
|
||||
_This focused context helps create valuable, structured BMAD workflows_
|
||||
@@ -1,94 +0,0 @@
|
||||
# Build Workflow - Validation Checklist
|
||||
|
||||
## Workflow Configuration (workflow.yaml)
|
||||
|
||||
- [ ] Name follows kebab-case convention
|
||||
- [ ] Description clearly states workflow purpose
|
||||
- [ ] All paths use proper variable substitution
|
||||
- [ ] installed_path points to correct module location
|
||||
- [ ] template/instructions paths are correct for workflow type
|
||||
- [ ] Output file pattern is appropriate
|
||||
- [ ] YAML syntax is valid (no parsing errors)
|
||||
|
||||
## Instructions Structure (instructions.md)
|
||||
|
||||
- [ ] Critical headers reference workflow engine
|
||||
- [ ] All steps have sequential numbering
|
||||
- [ ] Each step has a clear goal attribute
|
||||
- [ ] Optional steps marked with optional="true"
|
||||
- [ ] Repeating steps have appropriate repeat attributes
|
||||
- [ ] All template-output tags have unique variable names
|
||||
- [ ] Flow control (if any) has valid step references
|
||||
|
||||
## Template Structure (if document workflow)
|
||||
|
||||
- [ ] All sections have appropriate placeholders
|
||||
- [ ] Variable names match template-output tags exactly
|
||||
- [ ] Markdown formatting is valid
|
||||
- [ ] Date and metadata fields included
|
||||
- [ ] No unreferenced variables remain
|
||||
|
||||
## Content Quality
|
||||
|
||||
- [ ] Instructions are specific and actionable
|
||||
- [ ] Examples provided where helpful
|
||||
- [ ] Limits set for lists and content length
|
||||
- [ ] User prompts are clear
|
||||
- [ ] Step goals accurately describe outcomes
|
||||
|
||||
## Validation Checklist (if present)
|
||||
|
||||
- [ ] Criteria are measurable and specific
|
||||
- [ ] Checks grouped logically by category
|
||||
- [ ] Final validation summary included
|
||||
- [ ] All critical requirements covered
|
||||
|
||||
## File System
|
||||
|
||||
- [ ] Workflow folder created in correct module
|
||||
- [ ] All required files present based on workflow type
|
||||
- [ ] File permissions allow execution
|
||||
- [ ] No placeholder text remains (like {TITLE})
|
||||
|
||||
## Testing Readiness
|
||||
|
||||
- [ ] Workflow can be invoked without errors
|
||||
- [ ] All required inputs are documented
|
||||
- [ ] Output location is writable
|
||||
- [ ] Dependencies (if any) are available
|
||||
|
||||
## Web Bundle Configuration (if applicable)
|
||||
|
||||
- [ ] web_bundle section present if needed
|
||||
- [ ] Name, description, author copied from main config
|
||||
- [ ] All file paths converted to {bmad_folder}/-relative format
|
||||
- [ ] NO {config_source} variables in web bundle
|
||||
- [ ] NO {project-root} prefixes in paths
|
||||
- [ ] Instructions path listed correctly
|
||||
- [ ] Validation/checklist path listed correctly
|
||||
- [ ] Template path listed (if document workflow)
|
||||
- [ ] All data files referenced in instructions are listed
|
||||
- [ ] All sub-workflows are included
|
||||
- [ ] web_bundle_files array is complete:
|
||||
- [ ] Instructions.md included
|
||||
- [ ] Checklist.md included
|
||||
- [ ] Template.md included (if applicable)
|
||||
- [ ] All CSV/JSON data files included
|
||||
- [ ] All referenced templates included
|
||||
- [ ] All sub-workflow files included
|
||||
- [ ] No external dependencies outside bundle
|
||||
|
||||
## Documentation
|
||||
|
||||
- [ ] README created (if requested)
|
||||
- [ ] Usage instructions clear
|
||||
- [ ] Example command provided
|
||||
- [ ] Special requirements noted
|
||||
- [ ] Web bundle deployment noted (if applicable)
|
||||
|
||||
## Final Validation
|
||||
|
||||
- [ ] Configuration: No issues
|
||||
- [ ] Instructions: Complete and clear
|
||||
- [ ] Template: Variables properly mapped
|
||||
- [ ] Testing: Ready for test run
|
||||
@@ -1,725 +0,0 @@
|
||||
# Build Workflow - Workflow Builder Instructions
|
||||
|
||||
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
|
||||
<critical>You MUST have already loaded and processed: {project-root}/{bmad_folder}/bmb/workflows/create-workflow/workflow.yaml</critical>
|
||||
<critical>You MUST fully understand the workflow creation guide at: {workflow_creation_guide}</critical>
|
||||
<critical>Study the guide thoroughly to follow ALL conventions for optimal human-AI collaboration</critical>
|
||||
<critical>Communicate in {communication_language} throughout the workflow creation process</critical>
|
||||
<critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical>
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="-1" goal="Optional brainstorming phase" optional="true">
|
||||
<ask>Do you want to brainstorm workflow ideas first? [y/n]</ask>
|
||||
|
||||
<action if="user_response == 'y' or user_response == 'yes'">
|
||||
Invoke brainstorming workflow to explore ideas and design concepts:
|
||||
- Workflow: {project-root}/{bmad_folder}/core/workflows/brainstorming/workflow.yaml
|
||||
- Context data: {installed_path}/brainstorm-context.md
|
||||
- Purpose: Generate creative workflow ideas, explore different approaches, and clarify requirements
|
||||
|
||||
The brainstorming output will inform:
|
||||
|
||||
- Workflow purpose and goals
|
||||
- Workflow type selection
|
||||
- Step design and structure
|
||||
- User experience considerations
|
||||
- Technical requirements
|
||||
</action>
|
||||
|
||||
<action if="user_response == 'n' or user_response == 'no'">
|
||||
Skip brainstorming and proceed directly to workflow building process.
|
||||
</action>
|
||||
</step>
|
||||
|
||||
<step n="0" goal="Load and understand workflow conventions">
|
||||
<action>Load the complete workflow creation guide from: {workflow_creation_guide}</action>
|
||||
<action>Study all sections thoroughly including:
|
||||
- Core concepts (tasks vs workflows, workflow types)
|
||||
- Workflow structure (required/optional files, patterns)
|
||||
- Writing instructions (step attributes, XML tags, flow control)
|
||||
- Templates and variables (syntax, naming, sources)
|
||||
- Validation best practices
|
||||
- Common pitfalls to avoid
|
||||
</action>
|
||||
<action>Load template files from: {workflow_template_path}/</action>
|
||||
<critical>You must follow ALL conventions from the guide to ensure optimal human-AI collaboration</critical>
|
||||
</step>
|
||||
|
||||
<step n="1" goal="Define workflow purpose and type">
|
||||
Ask the user:
|
||||
- What is the workflow name? (kebab-case, e.g., "product-brief")
|
||||
- What module will it belong to? (e.g., "bmm", "bmb", "cis")
|
||||
- Store as {{target_module}} for output path determination
|
||||
- What is the workflow's main purpose?
|
||||
- What type of workflow is this?
|
||||
- Document workflow (generates documents like PRDs, specs)
|
||||
- Action workflow (performs actions like refactoring)
|
||||
- Interactive workflow (guided sessions)
|
||||
- Autonomous workflow (runs without user input)
|
||||
- Meta-workflow (coordinates other workflows)
|
||||
|
||||
Based on type, determine which files are needed:
|
||||
|
||||
- Document: workflow.yaml + template.md + instructions.md + checklist.md
|
||||
- Action: workflow.yaml + instructions.md
|
||||
- Others: Varies based on requirements
|
||||
|
||||
<critical>Determine output location based on module assignment:</critical>
|
||||
|
||||
- If workflow belongs to module: Save to {module_output_folder}
|
||||
- If standalone workflow: Save to {standalone_output_folder}
|
||||
|
||||
Store decisions for later use.
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Gather workflow metadata and invocation settings">
|
||||
Collect essential configuration details:
|
||||
- Description (clear purpose statement)
|
||||
- Author name (default to user_name or "BMad")
|
||||
- Output file naming pattern
|
||||
- Any required input documents
|
||||
- Any required tools or dependencies
|
||||
|
||||
<action>Determine standalone property - this controls how the workflow can be invoked:
|
||||
|
||||
Explain to the user:
|
||||
|
||||
**Standalone Property** controls whether the workflow can be invoked directly or only called by other workflows/agents.
|
||||
|
||||
**standalone: true (DEFAULT - Recommended for most workflows)**:
|
||||
|
||||
- Users can invoke directly via IDE commands or `/workflow-name`
|
||||
- Shows up in IDE command palette
|
||||
- Can also be called from agent menus or other workflows
|
||||
- Use for: User-facing workflows, entry-point workflows, any workflow users run directly
|
||||
|
||||
**standalone: false (Use for helper/internal workflows)**:
|
||||
|
||||
- Cannot be invoked directly by users
|
||||
- Only called via `<invoke-workflow>` from other workflows or agent menus
|
||||
- Doesn't appear in IDE command palette
|
||||
- Use for: Internal utilities, sub-workflows, helpers that don't make sense standalone
|
||||
|
||||
Most workflows should be `standalone: true` to give users direct access.
|
||||
</action>
|
||||
|
||||
<ask>Should this workflow be directly invokable by users?
|
||||
|
||||
1. **Yes (Recommended)** - Users can run it directly (standalone: true)
|
||||
2. **No** - Only called by other workflows/agents (standalone: false)
|
||||
|
||||
Most workflows choose option 1:
|
||||
</ask>
|
||||
|
||||
<action>Store {{standalone_setting}} as true or false based on response</action>
|
||||
|
||||
Create the workflow name in kebab-case and verify it doesn't conflict with existing workflows.
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Understand workflow interaction style and design steps">
|
||||
<critical>Instruction style and interactivity level fundamentally shape the user experience - choose thoughtfully</critical>
|
||||
|
||||
<action>Reference the comprehensive "Instruction Styles: Intent-Based vs Prescriptive" section from the loaded creation guide</action>
|
||||
|
||||
<action>Discuss instruction style collaboratively with the user:
|
||||
|
||||
Explain that there are two primary approaches:
|
||||
|
||||
**Intent-Based (RECOMMENDED as default)**:
|
||||
|
||||
- Gives AI goals and principles, lets it adapt conversation naturally
|
||||
- More flexible, conversational, responsive to user context
|
||||
- Better for: discovery, complex decisions, teaching, varied user skill levels
|
||||
- Uses <action> tags with guiding instructions
|
||||
- Example from architecture workflow: Facilitates decisions adapting to user_skill_level
|
||||
|
||||
**Prescriptive**:
|
||||
|
||||
- Provides exact questions and specific options
|
||||
- More controlled, predictable, consistent across runs
|
||||
- Better for: simple data collection, finite options, compliance, quick setup
|
||||
- Uses <ask> tags with specific question text
|
||||
- Example: Platform selection with 5 defined choices
|
||||
|
||||
Explain that **most workflows should default to intent-based** but use prescriptive for simple data points.
|
||||
The architecture workflow is an excellent example of intent-based with prescriptive moments.
|
||||
</action>
|
||||
|
||||
<ask>For this workflow's PRIMARY style:
|
||||
|
||||
1. **Intent-based (Recommended)** - Adaptive, conversational, responds to user context
|
||||
2. **Prescriptive** - Structured, consistent, controlled interactions
|
||||
3. **Mixed/Balanced** - I'll help you decide step-by-step
|
||||
|
||||
What feels right for your workflow's purpose?
|
||||
</ask>
|
||||
|
||||
<action>Store {{instruction_style}} preference</action>
|
||||
|
||||
<action>Now discuss interactivity level:
|
||||
|
||||
Beyond style, consider **how interactive** this workflow should be:
|
||||
|
||||
**High Interactivity (Collaborative)**:
|
||||
|
||||
- Constant back-and-forth with user
|
||||
- User guides direction, AI facilitates
|
||||
- Iterative refinement and review
|
||||
- Best for: creative work, complex decisions, learning experiences
|
||||
- Example: Architecture workflow's collaborative decision-making
|
||||
|
||||
**Medium Interactivity (Guided)**:
|
||||
|
||||
- Key decision points have interaction
|
||||
- AI proposes, user confirms or refines
|
||||
- Validation checkpoints
|
||||
- Best for: most document workflows, structured processes
|
||||
- Example: PRD workflow with sections to review
|
||||
|
||||
**Low Interactivity (Autonomous)**:
|
||||
|
||||
- Minimal user input required
|
||||
- AI works independently with guidelines
|
||||
- User reviews final output
|
||||
- Best for: automated generation, batch processing
|
||||
- Example: Generating user stories from epics
|
||||
</action>
|
||||
|
||||
<ask>What interactivity level suits this workflow?
|
||||
|
||||
1. **High** - Highly collaborative, user actively involved throughout (Recommended)
|
||||
2. **Medium** - Guided with key decision points
|
||||
3. **Low** - Mostly autonomous with final review
|
||||
|
||||
Select the level that matches your workflow's purpose:
|
||||
</ask>
|
||||
|
||||
<action>Store {{interactivity_level}} preference</action>
|
||||
|
||||
<action>Explain how these choices will inform the workflow design:
|
||||
|
||||
- Intent-based + High interactivity: Conversational discovery with open questions
|
||||
- Intent-based + Medium: Facilitated guidance with confirmation points
|
||||
- Intent-based + Low: Principle-based autonomous generation
|
||||
- Prescriptive + any level: Structured questions, but frequency varies
|
||||
- Mixed: Strategic use of both styles where each works best
|
||||
</action>
|
||||
|
||||
<action>Now work with user to outline workflow steps:
|
||||
|
||||
- How many major steps? (Recommend 3-7 for most workflows)
|
||||
- What is the goal of each step?
|
||||
- Which steps are optional?
|
||||
- Which steps need heavy user collaboration vs autonomous execution?
|
||||
- Which steps should repeat?
|
||||
- What variables/outputs does each step produce?
|
||||
|
||||
Consider their instruction_style and interactivity_level choices when designing step flow:
|
||||
|
||||
- High interactivity: More granular steps with collaboration
|
||||
- Low interactivity: Larger autonomous steps with review
|
||||
- Intent-based: Focus on goals and principles in step descriptions
|
||||
- Prescriptive: Define specific questions and options
|
||||
</action>
|
||||
|
||||
<action>Create a step outline that matches the chosen style and interactivity level</action>
|
||||
<action>Note which steps should be intent-based vs prescriptive (if mixed approach)</action>
|
||||
|
||||
<template-output>step_outline</template-output>
|
||||
</step>
|
||||
|
||||
<step n="4" goal="Create workflow.yaml">
|
||||
Load and use the template at: {template_workflow_yaml}
|
||||
|
||||
Replace all placeholders following the workflow creation guide conventions:
|
||||
|
||||
- {TITLE} → Proper case workflow name
|
||||
- {WORKFLOW_CODE} → kebab-case name
|
||||
- {WORKFLOW_DESCRIPTION} → Clear description
|
||||
- {module-code} → Target module
|
||||
- {file.md} → Output filename pattern
|
||||
|
||||
Include:
|
||||
|
||||
- All metadata from steps 1-2
|
||||
- **Standalone property**: Use {{standalone_setting}} from step 2 (true or false)
|
||||
- Proper paths for installed_path using variable substitution
|
||||
- Template/instructions/validation paths based on workflow type:
|
||||
- Document workflow: all files (template, instructions, validation)
|
||||
- Action workflow: instructions only (template: false)
|
||||
- Autonomous: set autonomous: true flag
|
||||
- Required tools if any
|
||||
- Recommended inputs if any
|
||||
|
||||
<critical>ALWAYS include the standard config block:</critical>
|
||||
|
||||
```yaml
|
||||
# Critical variables from config
|
||||
config_source: '{project-root}/{bmad_folder}/{{target_module}}/config.yaml'
|
||||
output_folder: '{config_source}:output_folder'
|
||||
user_name: '{config_source}:user_name'
|
||||
communication_language: '{config_source}:communication_language'
|
||||
date: system-generated
|
||||
```
|
||||
|
||||
<critical>This standard config ensures workflows can run autonomously and communicate properly with users</critical>
|
||||
|
||||
<critical>ALWAYS include the standalone property:</critical>
|
||||
|
||||
```yaml
|
||||
standalone: { { standalone_setting } } # true or false from step 2
|
||||
```
|
||||
|
||||
**Example complete workflow.yaml structure**:
|
||||
|
||||
```yaml
|
||||
name: 'workflow-name'
|
||||
description: 'Clear purpose statement'
|
||||
|
||||
# Paths
|
||||
installed_path: '{project-root}/{bmad_folder}/module/workflows/name'
|
||||
template: '{installed_path}/template.md'
|
||||
instructions: '{installed_path}/instructions.md'
|
||||
validation: '{installed_path}/checklist.md'
|
||||
|
||||
# Critical variables from config
|
||||
config_source: '{project-root}/{bmad_folder}/module/config.yaml'
|
||||
output_folder: '{config_source}:output_folder'
|
||||
user_name: '{config_source}:user_name'
|
||||
communication_language: '{config_source}:communication_language'
|
||||
date: system-generated
|
||||
|
||||
# Output
|
||||
default_output_file: '{output_folder}/document.md'
|
||||
|
||||
# Invocation control
|
||||
standalone: true # or false based on step 2 decision
|
||||
```
|
||||
|
||||
Follow path conventions from guide:
|
||||
|
||||
- Use {project-root} for absolute paths
|
||||
- Use {installed_path} for workflow components
|
||||
- Use {config_source} for config references
|
||||
|
||||
<critical>Determine save location:</critical>
|
||||
|
||||
- Use the output folder determined in Step 1 (module or standalone)
|
||||
- Write to {{output_folder}}/workflow.yaml
|
||||
</step>
|
||||
|
||||
<step n="5" goal="Create instructions.md" if="workflow_type != 'template-only'">
|
||||
Load and use the template at: {template_instructions}
|
||||
|
||||
Generate the instructions.md file following the workflow creation guide:
|
||||
|
||||
1. ALWAYS include critical headers:
|
||||
- Workflow engine reference: {project-root}/{bmad_folder}/core/tasks/workflow.xml
|
||||
- workflow.yaml reference: must be loaded and processed
|
||||
|
||||
2. Structure with <workflow> tags containing all steps
|
||||
|
||||
3. For each step from design phase, follow guide conventions:
|
||||
- Step attributes: n="X" goal="clear goal statement"
|
||||
- Optional steps: optional="true"
|
||||
- Repeating: repeat="3" or repeat="for-each-X" or repeat="until-approved"
|
||||
- Conditional: if="condition"
|
||||
- Sub-steps: Use 3a, 3b notation
|
||||
|
||||
4. Use proper XML tags from guide:
|
||||
- Execution: <action>, <check>, <ask>, <goto>, <invoke-workflow>
|
||||
- Output: <template-output>, <invoke-task halt="true">{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml</invoke-task>, <critical>, <example>
|
||||
- Flow: <loop>, <break>, <continue>
|
||||
|
||||
5. Best practices from guide:
|
||||
- Keep steps focused (single goal)
|
||||
- Be specific ("Write 1-2 paragraphs" not "Write about")
|
||||
- Provide examples where helpful
|
||||
- Set limits ("3-5 items maximum")
|
||||
- Save checkpoints with <template-output>
|
||||
|
||||
<critical>Standard config variable usage:</critical>
|
||||
|
||||
Instructions MUST use the standard config variables where appropriate:
|
||||
|
||||
- Communicate in {communication_language} throughout the workflow
|
||||
- Address user as {user_name} in greetings and summaries
|
||||
- Write all output files to {output_folder} or subdirectories
|
||||
- Include {date} in generated document headers
|
||||
|
||||
Example usage in instructions:
|
||||
|
||||
```xml
|
||||
<action>Write document to {output_folder}/output-file.md</action>
|
||||
<critical>Communicate all responses in {communication_language}</critical>
|
||||
<output>Hello {user_name}, the workflow is complete!</output>
|
||||
```
|
||||
|
||||
<critical>Applying instruction style preference:</critical>
|
||||
|
||||
Based on the {{instruction_style}} preference from Step 3, generate instructions using these patterns:
|
||||
|
||||
**Intent-Based Instructions (Recommended for most workflows):**
|
||||
|
||||
Focus on goals, principles, and desired outcomes. Let the LLM adapt the conversation naturally.
|
||||
|
||||
✅ **Good Examples:**
|
||||
|
||||
```xml
|
||||
<!-- Discovery and exploration -->
|
||||
<action>Guide user to define their target audience with specific demographics, psychographics, and behavioral characteristics</action>
|
||||
<action>Explore the user's vision for the product, asking probing questions to uncover core motivations and success criteria</action>
|
||||
<action>Help user identify and prioritize key features based on user value and technical feasibility</action>
|
||||
|
||||
<!-- Validation and refinement -->
|
||||
<action>Validate that the technical approach aligns with project constraints and team capabilities</action>
|
||||
<action>Challenge assumptions about user needs and market fit with thought-provoking questions</action>
|
||||
|
||||
<!-- Complex iterative work -->
|
||||
<action>Collaborate with user to refine the architecture, iterating until they're satisfied with the design</action>
|
||||
```
|
||||
|
||||
❌ **Avoid (too prescriptive):**
|
||||
|
||||
```xml
|
||||
<ask>What is your target audience age range? Choose: 18-24, 25-34, 35-44, 45+</ask>
|
||||
<ask>List exactly 3 key features in priority order</ask>
|
||||
```
|
||||
|
||||
**When to use Intent-Based:**
|
||||
|
||||
- Complex discovery processes (user research, requirements gathering)
|
||||
- Creative brainstorming and ideation
|
||||
- Iterative refinement workflows
|
||||
- When user input quality matters more than consistency
|
||||
- Workflows requiring adaptation to context
|
||||
|
||||
**Prescriptive Instructions (Use selectively):**
|
||||
|
||||
Provide exact wording, specific options, and controlled interactions.
|
||||
|
||||
✅ **Good Examples:**
|
||||
|
||||
```xml
|
||||
<!-- Simple data collection -->
|
||||
<ask>What is your target platform? Choose: PC, Console, Mobile, Web</ask>
|
||||
<ask>Select monetization model: Premium, Free-to-Play, Subscription, Ad-Supported</ask>
|
||||
|
||||
<!-- Compliance and standards -->
|
||||
<ask>Does this comply with GDPR requirements? [yes/no]</ask>
|
||||
<ask>Choose documentation standard: JSDoc, TypeDoc, TSDoc</ask>
|
||||
|
||||
<!-- Binary decisions -->
|
||||
<ask>Do you want to generate test cases? [yes/no]</ask>
|
||||
<ask>Include performance benchmarks? [yes/no]</ask>
|
||||
```
|
||||
|
||||
❌ **Avoid (too rigid for complex tasks):**
|
||||
|
||||
```xml
|
||||
<ask>What are your product goals? List exactly 5 goals, each 10-15 words</ask>
|
||||
<ask>Describe your user persona in exactly 3 sentences</ask>
|
||||
```
|
||||
|
||||
**When to use Prescriptive:**
|
||||
|
||||
- Simple data collection (platform, format, yes/no choices)
|
||||
- Compliance verification and standards adherence
|
||||
- Configuration with finite options
|
||||
- When consistency is critical across all executions
|
||||
- Quick setup wizards
|
||||
|
||||
**Mixing Both Styles (Best Practice):**
|
||||
|
||||
Even if user chose a primary style, use the other when appropriate:
|
||||
|
||||
```xml
|
||||
<!-- Intent-based workflow with prescriptive moments -->
|
||||
<step n="1" goal="Understand user vision">
|
||||
<action>Explore the user's vision for their game, uncovering their creative intent and target experience</action>
|
||||
<action>Ask probing questions about genre, themes, and emotional tone they want to convey</action>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Capture basic metadata">
|
||||
<ask>What is your target platform? Choose: PC, Console, Mobile, Web</ask> <!-- Prescriptive for simple choice -->
|
||||
<ask>Select primary genre: Action, RPG, Strategy, Puzzle, Simulation, Other</ask>
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Deep dive into gameplay">
|
||||
<action>Guide user to articulate their core gameplay loop, exploring mechanics and player agency</action> <!-- Back to intent-based -->
|
||||
<action>Help them identify what makes their game unique and compelling</action>
|
||||
</step>
|
||||
```
|
||||
|
||||
**Guidelines for the chosen style:**
|
||||
|
||||
If user chose **Intent-Based**:
|
||||
|
||||
- Default to goal-oriented <action> tags
|
||||
- Use open-ended guidance language
|
||||
- Save prescriptive <ask> tags for simple data/choices
|
||||
- Focus on "guide", "explore", "help user", "validate"
|
||||
- Allow LLM to adapt questions to user responses
|
||||
|
||||
If user chose **Prescriptive**:
|
||||
|
||||
- Default to explicit <ask> tags with clear options
|
||||
- Use precise wording for consistency
|
||||
- Save intent-based <action> tags for complex discovery
|
||||
- Focus on "choose", "select", "specify", "confirm"
|
||||
- Provide structured choices when possible
|
||||
|
||||
**Remember:** The goal is optimal human-AI collaboration. Use whichever style best serves the user at each step.
|
||||
|
||||
<critical>Save location:</critical>
|
||||
|
||||
- Write to {{output_folder}}/instructions.md
|
||||
</step>
|
||||
|
||||
<step n="6" goal="Create template.md" if="workflow_type == 'document'">
|
||||
Load and use the template at: {template_template}
|
||||
|
||||
Generate the template.md file following guide conventions:
|
||||
|
||||
1. Document structure with clear sections
|
||||
2. Variable syntax: {{variable_name}} using snake_case
|
||||
3. Variable names MUST match <template-output> tags exactly from instructions
|
||||
4. Include standard metadata header (optional - config variables available):
|
||||
|
||||
```markdown
|
||||
# Document Title
|
||||
|
||||
**Date:** {{date}}
|
||||
|
||||
**Author:** {{user_name}}
|
||||
```
|
||||
|
||||
Note: {{date}} and {{user_name}} are optional in headers. Primary purpose of these variables:
|
||||
- {{date}} - Gives agent current date awareness (not confused with training cutoff)
|
||||
- {{user_name}} - Optional author attribution
|
||||
- {{communication_language}} - NOT for document output! Tells agent how to communicate during execution
|
||||
|
||||
5. Follow naming conventions from guide:
|
||||
- Use descriptive names: {{primary_user_journey}} not {{puj}}
|
||||
- Snake_case for all variables
|
||||
- Match instruction outputs precisely
|
||||
|
||||
Variable sources as per guide:
|
||||
|
||||
- workflow.yaml config values (user_name, communication_language, date, output_folder)
|
||||
- User input runtime values
|
||||
- Step outputs via <template-output>
|
||||
- System variables (date, paths)
|
||||
|
||||
<critical>Standard config variables in templates:</critical>
|
||||
|
||||
Templates CAN optionally use these config variables:
|
||||
|
||||
- {{user_name}} - Document author (optional)
|
||||
- {{date}} - Generation date (optional)
|
||||
|
||||
IMPORTANT: {{communication_language}} is NOT for document headers!
|
||||
|
||||
- Purpose: Tells agent how to communicate with user during workflow execution
|
||||
- NOT for: Document output language or template headers
|
||||
- Future: {{document_output_language}} will handle multilingual document generation
|
||||
|
||||
These variables are automatically available from workflow.yaml config block.
|
||||
|
||||
<critical>Save location:</critical>
|
||||
|
||||
- Write to {{output_folder}}/template.md
|
||||
</step>
|
||||
|
||||
<step n="7" goal="Create validation checklist" optional="true">
|
||||
Ask if user wants a validation checklist. If yes:
|
||||
|
||||
Load and use the template at: {template_checklist}
|
||||
|
||||
Create checklist.md following guide best practices:
|
||||
|
||||
1. Make criteria MEASURABLE and SPECIFIC
|
||||
❌ "- [ ] Good documentation"
|
||||
✅ "- [ ] Each function has JSDoc comments with parameters and return types"
|
||||
|
||||
2. Group checks logically:
|
||||
- Structure: All sections present, no placeholders, proper formatting
|
||||
- Content Quality: Clear and specific, technically accurate, consistent terminology
|
||||
- Completeness: Ready for next phase, dependencies documented, action items defined
|
||||
|
||||
3. Include workflow-specific validations based on type:
|
||||
- Document workflows: Template variables mapped, sections complete
|
||||
- Action workflows: Actions clearly defined, error handling specified
|
||||
- Interactive: User prompts clear, decision points documented
|
||||
|
||||
4. Add final validation section with issue lists
|
||||
|
||||
<critical>Save location:</critical>
|
||||
|
||||
- Write to {{output_folder}}/checklist.md
|
||||
</step>
|
||||
|
||||
<step n="8" goal="Create supporting files" optional="true">
|
||||
Ask if any supporting data files are needed:
|
||||
- CSV files with data
|
||||
- Example documents
|
||||
- Reference materials
|
||||
|
||||
If yes, create placeholder files or copy from templates.
|
||||
</step>
|
||||
|
||||
<step n="9" goal="Test and validate workflow">
|
||||
Review the created workflow:
|
||||
|
||||
**Basic Validation:**
|
||||
|
||||
1. Verify all file paths are correct
|
||||
2. Check variable names match between files
|
||||
3. Ensure step numbering is sequential
|
||||
4. Validate YAML syntax
|
||||
5. Confirm all placeholders are replaced
|
||||
|
||||
**Standard Config Validation:**
|
||||
|
||||
6. Verify workflow.yaml contains standard config block:
|
||||
|
||||
- config_source defined
|
||||
- output_folder, user_name, communication_language pulled from config
|
||||
- date set to system-generated
|
||||
|
||||
7. Check instructions use config variables where appropriate
|
||||
8. Verify template includes config variables in metadata (if document workflow)
|
||||
|
||||
**YAML/Instruction/Template Alignment:**
|
||||
|
||||
9. Cross-check all workflow.yaml variables against instruction usage:
|
||||
|
||||
- Are all yaml variables referenced in instructions.md OR template.md?
|
||||
- Are there hardcoded values that should be variables?
|
||||
- Do template variables match <template-output> tags in instructions?
|
||||
|
||||
10. Identify any unused yaml fields (bloat detection)
|
||||
|
||||
Show user a summary of created files and their locations.
|
||||
Ask if they want to:
|
||||
|
||||
- Test run the workflow
|
||||
- Make any adjustments
|
||||
- Add additional steps or features
|
||||
</step>
|
||||
|
||||
<step n="9b" goal="Configure web bundle (optional)">
|
||||
<ask>Will this workflow need to be deployable as a web bundle? [yes/no]</ask>
|
||||
|
||||
If yes:
|
||||
<action>Explain web bundle requirements:</action>
|
||||
|
||||
- Web bundles are self-contained and cannot use config_source variables
|
||||
- All files must be explicitly listed in web_bundle_files
|
||||
- File paths use {bmad_folder}/ root (not {project-root})
|
||||
|
||||
<action>Configure web_bundle section in workflow.yaml:</action>
|
||||
|
||||
1. Copy core workflow metadata (name, description, author)
|
||||
2. Convert all file paths to {bmad_folder}/-relative paths:
|
||||
- Remove {project-root}/ prefix
|
||||
- Remove {config_source} references (use hardcoded values)
|
||||
- Example: "{project-root}/{bmad_folder}/bmm/workflows/x" → "{bmad_folder}/bmm/workflows/x"
|
||||
|
||||
3. List ALL referenced files by scanning:
|
||||
|
||||
**Scan instructions.md for:**
|
||||
- File paths in <action> tags
|
||||
- Data files (CSV, JSON, YAML, etc.)
|
||||
- Validation/checklist files
|
||||
- Any <invoke-workflow> calls → must include that workflow's yaml file
|
||||
- Any <goto> tags that reference other workflows
|
||||
- Shared templates or includes
|
||||
|
||||
**Scan template.md for:**
|
||||
- Any includes or references to other files
|
||||
- Shared template fragments
|
||||
|
||||
**Critical: Workflow Dependencies**
|
||||
- If instructions call another workflow, that workflow's yaml MUST be in web_bundle_files
|
||||
- Example: `<invoke-workflow>{project-root}/{bmad_folder}/core/workflows/x/workflow.yaml</invoke-workflow>`
|
||||
→ Add "{bmad_folder}/core/workflows/x/workflow.yaml" to web_bundle_files
|
||||
|
||||
4. Create web_bundle_files array with complete list
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
web_bundle:
|
||||
name: '{workflow_name}'
|
||||
description: '{workflow_description}'
|
||||
author: '{author}'
|
||||
instructions: '{bmad_folder}/{module}/workflows/{workflow}/instructions.md'
|
||||
validation: '{bmad_folder}/{module}/workflows/{workflow}/checklist.md'
|
||||
template: '{bmad_folder}/{module}/workflows/{workflow}/template.md'
|
||||
|
||||
# Any data files (no config_source)
|
||||
data_file: '{bmad_folder}/{module}/workflows/{workflow}/data.csv'
|
||||
|
||||
web_bundle_files:
|
||||
- '{bmad_folder}/{module}/workflows/{workflow}/instructions.md'
|
||||
- '{bmad_folder}/{module}/workflows/{workflow}/checklist.md'
|
||||
- '{bmad_folder}/{module}/workflows/{workflow}/template.md'
|
||||
- '{bmad_folder}/{module}/workflows/{workflow}/data.csv'
|
||||
# Add every single file referenced anywhere
|
||||
|
||||
# CRITICAL: If this workflow invokes other workflows, use existing_workflows
|
||||
# This signals the bundler to recursively include those workflows' web_bundles
|
||||
existing_workflows:
|
||||
- workflow_variable_name: '{bmad_folder}/path/to/workflow.yaml'
|
||||
```
|
||||
|
||||
**Example with existing_workflows:**
|
||||
|
||||
```yaml
|
||||
web_bundle:
|
||||
name: 'brainstorm-game'
|
||||
description: 'Game brainstorming with CIS workflow'
|
||||
author: 'BMad'
|
||||
instructions: '{bmad_folder}/bmm/workflows/brainstorm-game/instructions.md'
|
||||
template: false
|
||||
web_bundle_files:
|
||||
- '{bmad_folder}/bmm/workflows/brainstorm-game/instructions.md'
|
||||
- '{bmad_folder}/mmm/workflows/brainstorm-game/game-context.md'
|
||||
- '{bmad_folder}/core/workflows/brainstorming/workflow.yaml'
|
||||
existing_workflows:
|
||||
- core_brainstorming: '{bmad_folder}/core/workflows/brainstorming/workflow.yaml'
|
||||
```
|
||||
|
||||
**What existing_workflows does:**
|
||||
|
||||
- Tells the bundler this workflow invokes another workflow
|
||||
- Bundler recursively includes the invoked workflow's entire web_bundle
|
||||
- Essential for meta-workflows that orchestrate other workflows
|
||||
- Maps workflow variable names to their {bmad_folder}/-relative paths
|
||||
|
||||
<action>Validate web bundle completeness:</action>
|
||||
|
||||
- Ensure no {config_source} variables remain
|
||||
- Verify all file paths are listed
|
||||
- Check that paths are {bmad_folder}/-relative
|
||||
- If workflow uses <invoke-workflow>, add to existing_workflows
|
||||
|
||||
<template-output>web_bundle_config</template-output>
|
||||
</step>
|
||||
|
||||
<step n="10" goal="Document and finalize">
|
||||
<action>Create a brief README for the workflow folder explaining purpose, how to invoke, expected inputs, generated outputs, and any special requirements</action>
|
||||
|
||||
<action>Provide {user_name} with workflow completion summary in {communication_language}:</action>
|
||||
|
||||
- Location of created workflow: {{output_folder}}
|
||||
- Command to run it: `workflow {workflow_name}`
|
||||
- Next steps:
|
||||
- Run the BMAD Method installer to this project location
|
||||
- Select 'Compile Agents (Quick rebuild of all agent .md files)' after confirming the folder
|
||||
- This will compile the new workflow and make it available for use
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
167
src/modules/bmb/workflows/create-workflow/steps/step-01-init.md
Normal file
167
src/modules/bmb/workflows/create-workflow/steps/step-01-init.md
Normal file
@@ -0,0 +1,167 @@
|
||||
---
|
||||
name: 'step-01-init'
|
||||
description: 'Initialize workflow creation session by detecting continuation state and setting up project'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/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
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
projectInfoTemplate: '{workflow_path}/templates/project-info.md'
|
||||
---
|
||||
|
||||
# Step 1: Workflow Creation Initialization
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To initialize the workflow creation process by detecting continuation state, understanding project context, 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
|
||||
|
||||
### 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
|
||||
- 🚪 DETECT existing workflow state and handle continuation properly
|
||||
|
||||
## 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. Check for Existing Workflow Creation
|
||||
|
||||
First, check if there's already a workflow folder with the proposed name:
|
||||
|
||||
- Look for folder at `{custom_workflow_location}/{new_workflow_name}/`
|
||||
- If exists, check if it contains a workflow.md file
|
||||
- If not exists, this is a fresh workflow creation session
|
||||
|
||||
### 2. Handle Continuation (If Workflow Exists)
|
||||
|
||||
If the workflow folder exists and has been worked on:
|
||||
|
||||
- **STOP here** and continue with step 4 (Welcome Back)
|
||||
- Do not proceed with fresh initialization
|
||||
- Let step 4 handle the continuation logic
|
||||
|
||||
### 3. Handle Completed Workflow
|
||||
|
||||
If the workflow folder exists AND is complete:
|
||||
|
||||
- Ask user: "I found an existing workflow '{new_workflow_name}' from [date]. Would you like to:
|
||||
1. Create a new workflow with a different name
|
||||
2. Review or modify the existing workflow"
|
||||
- If option 1: Get a new workflow name
|
||||
- If option 2: Load step 5 (Review)
|
||||
|
||||
### 4. Fresh Workflow Setup (If No Workflow)
|
||||
|
||||
#### A. 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)?
|
||||
- What would you like to name this workflow folder? (kebab-case, e.g., "user-story-generator")
|
||||
|
||||
#### B. Create Workflow Plan Document
|
||||
|
||||
Create the workflow plan document at `{workflowPlanFile}` using the workflow plan template.
|
||||
Initialize frontmatter with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
workflowName: ''
|
||||
targetModule: ''
|
||||
workflowType: ''
|
||||
flowPattern: ''
|
||||
date: [current date]
|
||||
user_name: { user_name }
|
||||
stepsCompleted: [1]
|
||||
lastStep: 'init'
|
||||
---
|
||||
```
|
||||
|
||||
This plan will capture all requirements and design details before building the actual workflow.
|
||||
|
||||
### 5. Welcome Message
|
||||
|
||||
"Great! I'm ready to help you create a structured workflow using our step-based architecture. We'll work together to design a workflow that's collaborative, maintainable, and follows best practices."
|
||||
|
||||
### 6. 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, immediately load, read entire file, then execute `{workflow_path}/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,233 @@
|
||||
---
|
||||
name: 'step-02-gather'
|
||||
description: 'Gather comprehensive requirements for the workflow being created'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-02-gather.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-03-design.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
requirementsTemplate: '{workflow_path}/templates/requirements-section.md'
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
### 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_folder}/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_folder}/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. Target Location and Module Configuration
|
||||
|
||||
Determine where the workflow will be created:
|
||||
|
||||
- For bmb module: Workflows go to `{custom_workflow_location}` (defaults to `{bmad_folder}/custom/src/workflows`)
|
||||
- For other modules: Check their install-config.yaml for custom workflow locations
|
||||
- Confirm the exact folder path where the workflow will be created
|
||||
- Ensure the folder name doesn't conflict with existing workflows
|
||||
|
||||
### 9. Technical Constraints
|
||||
|
||||
Discuss technical requirements:
|
||||
|
||||
- Any specific tools or dependencies needed?
|
||||
- Does it need to integrate with other systems?
|
||||
- Any performance considerations?
|
||||
- Should it be standalone or callable by other workflows?
|
||||
|
||||
### 10. 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} using {requirementsTemplate}:
|
||||
|
||||
This information will be used in the design phase to create the workflow structure.
|
||||
|
||||
### 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 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: Store requirements, then only 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, 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,239 @@
|
||||
---
|
||||
name: 'step-03-design'
|
||||
description: 'Design the workflow structure and step sequence based on gathered requirements'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-03-design.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-04-build.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
designTemplate: '{workflow_path}/templates/design-section.md'
|
||||
---
|
||||
|
||||
# Step 3: Workflow Structure Design
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the requirements gathered in the previous 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
|
||||
|
||||
### 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]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and design is saved
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Requirements from step 2 are available and should inform design
|
||||
- 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_folder}/bmb/docs/workflows/step-template.md` - Step file structure
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md` - Workflow configuration
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - Architecture principles
|
||||
- `{project-root}/{bmad_folder}/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_folder}/bmb/docs/workflows/step-template.md
|
||||
```
|
||||
|
||||
This shows the standard structure for step files. Based on the requirements, collaboratively design:
|
||||
|
||||
- How many major steps does this workflow need? (Recommend 3-7)
|
||||
- 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?
|
||||
|
||||
### 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
|
||||
|
||||
### Collaborative Dialogue
|
||||
|
||||
- Design for conversation, not command-response
|
||||
- Include decision points for user input
|
||||
- Make the workflow adaptable to user context
|
||||
|
||||
### Sequential Enforcement
|
||||
|
||||
- Design clear step dependencies
|
||||
- Ensure logical flow between steps
|
||||
- Include state tracking for progress
|
||||
|
||||
### Error Prevention
|
||||
|
||||
- Include validation at key points
|
||||
- Design for common failure scenarios
|
||||
- Provide clear guidance to users
|
||||
|
||||
## CONTENT TO APPEND TO PLAN:
|
||||
|
||||
After completing the design, append to {workflowPlanFile}:
|
||||
|
||||
Load and append the content from {designTemplate}
|
||||
|
||||
### 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 content to {workflowPlanFile}, update frontmatter, then only 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 content is saved to workflow plan and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow file generation step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Workflow structure designed collaboratively
|
||||
- Step sequence mapped and agreed upon
|
||||
- Interaction patterns designed
|
||||
- Design documented in {outputFile}
|
||||
- Frontmatter updated with step completion
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Creating implementation details instead of design
|
||||
- Skipping design review with user
|
||||
- Proceeding without complete design
|
||||
- Not updating document frontmatter
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,209 @@
|
||||
---
|
||||
name: 'step-04-review-plan'
|
||||
description: 'Review the complete workflow plan before generating files'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-04-review-plan.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-05-build.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Workflow Plan Review
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To present the complete workflow plan for user review and approval before generating the actual workflow files.
|
||||
|
||||
## 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
|
||||
|
||||
### 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 present the plan clearly and answer questions
|
||||
- ✅ User provides approval or requests changes
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on reviewing the plan, not building yet
|
||||
- 🚫 FORBIDDEN to generate any workflow files in this step
|
||||
- 💬 Present the complete plan clearly and answer all questions
|
||||
- 🚪 GET explicit approval before proceeding to build
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Present the complete workflow plan for review
|
||||
- 💾 Update plan frontmatter with review status
|
||||
- 📖 Only proceed to build step with explicit user approval
|
||||
- 🚫 FORBIDDEN to skip review or proceed without consent
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Requirements and design from previous steps are in the plan
|
||||
- Focus ONLY on review and approval
|
||||
- Don't modify the design significantly here
|
||||
- This is the final checkpoint before file generation
|
||||
|
||||
## REVIEW REFERENCE MATERIALS:
|
||||
|
||||
When reviewing, you may load for comparison:
|
||||
|
||||
- Example workflow: `{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md`
|
||||
- Step examples from same workflow's steps folder
|
||||
- Architecture guide: `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
|
||||
|
||||
## PLAN REVIEW PROCESS:
|
||||
|
||||
### 1. Present the Complete Plan
|
||||
|
||||
Read the entire {workflowPlanFile} and present it to the user:
|
||||
|
||||
- Executive Summary
|
||||
- Requirements Analysis
|
||||
- Detailed Design
|
||||
- Implementation Plan
|
||||
- Target Location and file structure
|
||||
|
||||
### 2. Walk Through Key Aspects
|
||||
|
||||
Explain the plan's key components:
|
||||
|
||||
- **Workflow Flow**: Linear, looping, branching, or iterative
|
||||
- **Step Structure**: Number of steps and their purposes
|
||||
- **Instruction Style**: Intent-based vs prescriptive approach
|
||||
- **User Interaction**: How users will interact with the workflow
|
||||
- **Files to Generate**: Complete list of files that will be created
|
||||
|
||||
### 3. Address Questions and Concerns
|
||||
|
||||
Answer any questions about:
|
||||
|
||||
- Why certain design decisions were made
|
||||
- How specific requirements will be met
|
||||
- Whether the workflow will handle edge cases
|
||||
- Any concerns about the implementation approach
|
||||
|
||||
### 4. Gather Feedback
|
||||
|
||||
Ask for specific feedback:
|
||||
|
||||
- Does this plan fully address your requirements?
|
||||
- Are there any missing aspects?
|
||||
- Would you like any changes to the design?
|
||||
- Are you satisfied with the proposed structure?
|
||||
|
||||
### 5. Confirm or Revise
|
||||
|
||||
Based on feedback:
|
||||
|
||||
- If approved: Proceed to build step
|
||||
- If changes needed: Go back to design step with specific feedback
|
||||
- If major revisions: Consider going back to requirements step
|
||||
|
||||
## REVIEW CHECKPOINTS:
|
||||
|
||||
### Requirements Coverage
|
||||
|
||||
- [ ] All user requirements addressed
|
||||
- [ ] Success criteria defined
|
||||
- [ ] Technical constraints considered
|
||||
- [ ] User interaction level appropriate
|
||||
|
||||
### Design Quality
|
||||
|
||||
- [ ] Step flow is logical
|
||||
- [ ] Instruction style chosen appropriately
|
||||
- [ ] Menu systems designed properly
|
||||
- [ ] Error handling included
|
||||
|
||||
### Implementation Feasibility
|
||||
|
||||
- [ ] File structure is clear
|
||||
- [ ] Target location confirmed
|
||||
- [ ] Templates identified correctly
|
||||
- [ ] Dependencies documented
|
||||
|
||||
## PLAN APPROVAL:
|
||||
|
||||
### Explicit Confirmation Required
|
||||
|
||||
Before proceeding to build, get explicit confirmation:
|
||||
"Based on this plan, I will generate:
|
||||
|
||||
- [List of files]
|
||||
in [target location]
|
||||
|
||||
Do you approve this plan and want me to proceed with building the workflow? [Y/N]"
|
||||
|
||||
### If Approved
|
||||
|
||||
- Update {workflowPlanFile} frontmatter: `stepsCompleted: [1, 2, 3, 4]`, `lastStep: "review"`
|
||||
- Proceed to step 5 (Build)
|
||||
|
||||
### If Not Approved
|
||||
|
||||
- Note specific concerns
|
||||
- Either revise the plan here or return to appropriate earlier step
|
||||
- Continue until user is satisfied
|
||||
|
||||
### 6. Present MENU OPTIONS
|
||||
|
||||
Display: **Review Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Build
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to build step with explicit 'C' selection AND approval
|
||||
- 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: AND user has approved the plan, update plan frontmatter, 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 user has explicitly approved the plan, will you then update the plan frontmatter and load, read entire file, then execute {nextStepFile} to execute and begin workflow file generation step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Complete plan presented clearly
|
||||
- All user questions answered
|
||||
- Feedback collected and documented
|
||||
- Explicit approval received (or revisions planned)
|
||||
- Plan ready for implementation
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping the review presentation
|
||||
- Proceeding without explicit approval
|
||||
- Not answering user questions
|
||||
- Rushing through the review process
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
267
src/modules/bmb/workflows/create-workflow/steps/step-05-build.md
Normal file
267
src/modules/bmb/workflows/create-workflow/steps/step-05-build.md
Normal file
@@ -0,0 +1,267 @@
|
||||
---
|
||||
name: 'step-05-build'
|
||||
description: 'Generate all workflow files based on the approved plan'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-05-build.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-06-review.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
workflowYamlTemplate: '{workflow_path}/templates/workflow-yaml.md'
|
||||
stepFileTemplate: '{workflow_path}/templates/step-file.md'
|
||||
contentTemplate: '{workflow_path}/templates/content-template.md'
|
||||
buildSummaryTemplate: '{workflow_path}/templates/build-summary.md'
|
||||
---
|
||||
|
||||
# Step 5: 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 review 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
|
||||
|
||||
### 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]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and build is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Approved plan from step 4 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, you will need to load:
|
||||
|
||||
- Template files from `{workflow_path}/templates/`
|
||||
- Step file structure from `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md`
|
||||
- Workflow configuration from `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md`
|
||||
- Example step files from the Meal Prep workflow as patterns
|
||||
|
||||
## 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:
|
||||
|
||||
```
|
||||
{custom_workflow_location}/{workflow_name}/
|
||||
├── workflow.md
|
||||
├── steps/
|
||||
│ ├── step-01-init.md
|
||||
│ ├── step-02-[name].md
|
||||
│ └── ...
|
||||
├── templates/
|
||||
│ └── [as needed]
|
||||
└── data/
|
||||
└── [as needed]
|
||||
```
|
||||
|
||||
For bmb module, this will be: `{bmad_folder}/custom/src/workflows/{workflow_name}/`
|
||||
For other modules, check their install-config.yaml for custom_workflow_location
|
||||
|
||||
### 3. Generate workflow.md
|
||||
|
||||
Load and customize {workflowYamlTemplate}:
|
||||
|
||||
- Insert workflow name and description
|
||||
- Configure all path variables
|
||||
- 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
|
||||
|
||||
For each step in the design:
|
||||
|
||||
- Load {stepFileTemplate}
|
||||
- Customize with step-specific content
|
||||
- Ensure proper frontmatter with path references
|
||||
- Include appropriate menu handling
|
||||
- Follow all mandatory rules and protocols
|
||||
|
||||
### 5. Generate Templates (If Needed)
|
||||
|
||||
For document workflows:
|
||||
|
||||
- Load {contentTemplate}
|
||||
- Create template.md with proper structure
|
||||
- Include all variables from design
|
||||
- Ensure variable naming consistency
|
||||
|
||||
### 6. Generate Supporting Files
|
||||
|
||||
Based on design requirements:
|
||||
|
||||
- Create data files with example content
|
||||
- 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}:
|
||||
|
||||
Load and append the content from {buildSummaryTemplate}
|
||||
|
||||
### 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 content to {workflowPlanFile}, update frontmatter, then only 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 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,246 @@
|
||||
---
|
||||
name: 'step-06-review'
|
||||
description: 'Review the generated workflow and provide final validation and next steps'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-06-review.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
workflowPlanFile: '{output_folder}/workflow-plan-{new_workflow_name}.md'
|
||||
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
reviewTemplate: '{workflow_path}/templates/review-section.md'
|
||||
completionTemplate: '{workflow_path}/templates/completion-section.md'
|
||||
---
|
||||
|
||||
# Step 6: 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
|
||||
|
||||
### 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]` 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}:
|
||||
|
||||
Load and append the content from {reviewTemplate}
|
||||
|
||||
Then load and append the content from {completionTemplate}
|
||||
|
||||
## FINAL MENU OPTIONS
|
||||
|
||||
Display: **Workflow Creation Complete!** [A] Advanced Elicitation [P] Party Mode [F] Finish
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- This is the final step - only 'F' will complete the process
|
||||
- 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 F: Mark workflow as complete, provide final summary, and end session
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#final-menu-options)
|
||||
|
||||
## FINAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN F is selected and workflow is marked as complete will the session end. Update frontmatter to mark the entire workflow creation process as complete and provide the user with their final deliverables.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 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,36 @@
|
||||
## Build Summary
|
||||
|
||||
### Files Generated
|
||||
|
||||
{{#generatedFiles}}
|
||||
|
||||
- **{{type}}**: {{path}}
|
||||
{{/generatedFiles}}
|
||||
|
||||
### Customizations Made
|
||||
|
||||
{{#customizations}}
|
||||
|
||||
- {{.}}
|
||||
{{/customizations}}
|
||||
|
||||
### Manual Steps Required
|
||||
|
||||
{{#manualSteps}}
|
||||
|
||||
- {{.}}
|
||||
{{/manualSteps}}
|
||||
|
||||
### Build Validation Results
|
||||
|
||||
- **Syntax Check**: {{syntaxCheckResult}}
|
||||
- **Path Validation**: {{pathValidationResult}}
|
||||
- **Variable Consistency**: {{variableConsistencyResult}}
|
||||
- **Template Compliance**: {{templateComplianceResult}}
|
||||
|
||||
### Next Steps for Testing
|
||||
|
||||
1. Run `workflow {{targetModule}}/workflows/{{workflowName}}` to test
|
||||
2. Verify all steps execute properly
|
||||
3. Check output generation
|
||||
4. Validate user interaction points
|
||||
@@ -0,0 +1,39 @@
|
||||
## Workflow Creation Complete!
|
||||
|
||||
### Final Deliverables
|
||||
|
||||
✅ **Main Workflow**: {{targetWorkflowPath}}/workflow.md
|
||||
✅ **Step Files**: {{stepCount}} step files created
|
||||
✅ **Templates**: {{templateCount}} templates created
|
||||
✅ **Documentation**: Complete documentation provided
|
||||
|
||||
### Deployment Instructions
|
||||
|
||||
1. **Installation**: Run the BMAD Method installer to your project location
|
||||
2. **Compilation**: Select 'Compile Agents' after confirming the folder
|
||||
3. **Testing**: Use `workflow {{targetWorkflowPath}}` to test
|
||||
|
||||
### Usage Guide
|
||||
|
||||
```bash
|
||||
# To invoke the workflow (from custom location)
|
||||
workflow {{customWorkflowLocation}}/{{workflowName}}
|
||||
|
||||
# Or if standalone is true
|
||||
/{{workflowCommand}}
|
||||
```
|
||||
|
||||
### Support
|
||||
|
||||
- Created by: {{user_name}}
|
||||
- Date: {{completionDate}}
|
||||
- Module: {{targetModule}}
|
||||
- Type: {{workflowType}}
|
||||
|
||||
### Thank You!
|
||||
|
||||
Thank you for using the Standalone Workflow Builder. Your workflow has been created following best practices for step-file architecture and collaborative design principles.
|
||||
|
||||
---
|
||||
|
||||
_Workflow creation completed successfully on {{completionDate}}_
|
||||
@@ -0,0 +1,21 @@
|
||||
# {{documentTitle}}
|
||||
|
||||
**Created:** {{date}}
|
||||
**Author:** {{user_name}}
|
||||
**Workflow:** {{workflowName}}
|
||||
|
||||
## Executive Summary
|
||||
|
||||
{{executiveSummary}}
|
||||
|
||||
## Details
|
||||
|
||||
{{mainContent}}
|
||||
|
||||
## Conclusion
|
||||
|
||||
{{conclusion}}
|
||||
|
||||
---
|
||||
|
||||
_Generated by the {{workflowName}} workflow_
|
||||
@@ -0,0 +1,53 @@
|
||||
## Workflow Design
|
||||
|
||||
### Step Structure
|
||||
|
||||
**Total Steps**: {{totalSteps}}
|
||||
**Step Overview**:
|
||||
{{stepOverview}}
|
||||
|
||||
### Detailed Step Plan
|
||||
|
||||
{{stepDetails}}
|
||||
|
||||
### Interaction Design
|
||||
|
||||
- **Menu Pattern**: {{menuPattern}}
|
||||
- **User Input Points**: {{userInputPoints}}
|
||||
- **AI Autonomy Level**: {{aiAutonomyLevel}}
|
||||
- **Decision Flow**: {{decisionFlow}}
|
||||
|
||||
### Data Flow Architecture
|
||||
|
||||
- **Input Requirements**: {{dataInputRequirements}}
|
||||
- **Intermediate Variables**: {{intermediateVariables}}
|
||||
- **Output Mapping**: {{outputMapping}}
|
||||
- **State Management**: {{stateManagement}}
|
||||
|
||||
### File Organization
|
||||
|
||||
- **Core Files**: {{coreFiles}}
|
||||
- **Templates**: {{templates}}
|
||||
- **Data Files**: {{dataFiles}}
|
||||
- **Supporting Files**: {{supportingFiles}}
|
||||
|
||||
### AI Role Definition
|
||||
|
||||
- **Primary Role**: {{primaryRole}}
|
||||
- **Expertise Areas**: {{expertiseAreas}}
|
||||
- **Communication Style**: {{communicationStyle}}
|
||||
- **Collaboration Approach**: {{collaborationApproach}}
|
||||
|
||||
### Quality Assurance
|
||||
|
||||
- **Validation Points**: {{validationPoints}}
|
||||
- **Error Handling**: {{errorHandling}}
|
||||
- **Recovery Strategies**: {{recoveryStrategies}}
|
||||
- **Success Criteria**: {{designSuccessCriteria}}
|
||||
|
||||
### Special Features
|
||||
|
||||
- **Conditional Logic**: {{conditionalLogic}}
|
||||
- **Branch Points**: {{branchPoints}}
|
||||
- **Integrations**: {{designIntegrations}}
|
||||
- **Multi-Scenario Support**: {{multiScenarioSupport}}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Workflow Creation: {{workflow_name}}
|
||||
|
||||
**Created:** {{date}}
|
||||
**Author:** {{user_name}}
|
||||
**Module:** {{targetModule}}
|
||||
**Type:** {{workflowType}}
|
||||
|
||||
## Project Overview
|
||||
|
||||
{{projectOverview}}
|
||||
|
||||
## Requirements Collected
|
||||
|
||||
{{requirementsCollected}}
|
||||
|
||||
---
|
||||
|
||||
_This document tracks the workflow creation process. The final workflow will be generated separately._
|
||||
@@ -0,0 +1,47 @@
|
||||
## Requirements Summary
|
||||
|
||||
### Workflow Purpose
|
||||
|
||||
- **Problem to Solve**: {{problemStatement}}
|
||||
- **Primary Users**: {{targetUsers}}
|
||||
- **Main Outcome**: {{primaryOutcome}}
|
||||
- **Usage Frequency**: {{usageFrequency}}
|
||||
|
||||
### Workflow Classification
|
||||
|
||||
- **Type**: {{workflowType}}
|
||||
- **Flow Pattern**: {{flowPattern}}
|
||||
- **Interaction Style**: {{interactionStyle}}
|
||||
- **Instruction Style**: {{instructionStyle}}
|
||||
- **Autonomy Level**: {{autonomyLevel}}
|
||||
|
||||
### Input Requirements
|
||||
|
||||
- **Required Inputs**: {{requiredInputs}}
|
||||
- **Optional Inputs**: {{optionalInputs}}
|
||||
- **Prerequisites**: {{prerequisites}}
|
||||
|
||||
### Output Specifications
|
||||
|
||||
- **Primary Output**: {{primaryOutput}}
|
||||
- **Intermediate Outputs**: {{intermediateOutputs}}
|
||||
- **Output Format**: {{outputFormat}}
|
||||
|
||||
### Technical Constraints
|
||||
|
||||
- **Dependencies**: {{dependencies}}
|
||||
- **Integrations**: {{integrations}}
|
||||
- **Performance Requirements**: {{performanceRequirements}}
|
||||
|
||||
### Target Location
|
||||
|
||||
- **Module**: {{targetModule}}
|
||||
- **Folder Name**: {{workflowFolderName}}
|
||||
- **Target Path**: {{targetWorkflowPath}}
|
||||
- **Custom Workflow Location**: {{customWorkflowLocation}}
|
||||
|
||||
### Success Criteria
|
||||
|
||||
- **Quality Metrics**: {{qualityMetrics}}
|
||||
- **Success Indicators**: {{successIndicators}}
|
||||
- **User Satisfaction**: {{userSatisfactionCriteria}}
|
||||
@@ -0,0 +1,56 @@
|
||||
## Workflow Review Results
|
||||
|
||||
### File Structure Review
|
||||
|
||||
**Status**: {{fileStructureStatus}}
|
||||
|
||||
- Required Files: {{requiredFilesStatus}}
|
||||
- Directory Structure: {{directoryStructureStatus}}
|
||||
- Naming Conventions: {{namingConventionsStatus}}
|
||||
|
||||
### Configuration Validation
|
||||
|
||||
**Status**: {{configValidationStatus}}
|
||||
|
||||
- Metadata Completeness: {{metadataStatus}}
|
||||
- Path Variables: {{pathVariablesStatus}}
|
||||
- Dependencies: {{dependenciesStatus}}
|
||||
|
||||
### Step File Compliance
|
||||
|
||||
**Status**: {{stepComplianceStatus}}
|
||||
|
||||
- Template Structure: {{templateStructureStatus}}
|
||||
- Mandatory Rules: {{mandatoryRulesStatus}}
|
||||
- Menu Implementation: {{menuImplementationStatus}}
|
||||
|
||||
### Cross-File Consistency
|
||||
|
||||
**Status**: {{consistencyStatus}}
|
||||
|
||||
- Variable Naming: {{variableNamingStatus}}
|
||||
- Path References: {{pathReferencesStatus}}
|
||||
- Step Sequence: {{stepSequenceStatus}}
|
||||
|
||||
### Requirements Verification
|
||||
|
||||
**Status**: {{requirementsVerificationStatus}}
|
||||
|
||||
- Problem Addressed: {{problemAddressedStatus}}
|
||||
- User Types Supported: {{userTypesStatus}}
|
||||
- Inputs/Outputs: {{inputsOutputsStatus}}
|
||||
|
||||
### Best Practices Adherence
|
||||
|
||||
**Status**: {{bestPracticesStatus}}
|
||||
|
||||
- File Size Limits: {{fileSizeStatus}}
|
||||
- Collaborative Dialogue: {{collaborativeDialogueStatus}}
|
||||
- Error Handling: {{errorHandlingStatus}}
|
||||
|
||||
### Issues Found
|
||||
|
||||
{{#issues}}
|
||||
|
||||
- **{{severity}}**: {{description}}
|
||||
{{/issues}}
|
||||
139
src/modules/bmb/workflows/create-workflow/templates/step-file.md
Normal file
139
src/modules/bmb/workflows/create-workflow/templates/step-file.md
Normal file
@@ -0,0 +1,139 @@
|
||||
---
|
||||
name: "step-{{stepNumber}}-{{stepName}}"
|
||||
description: "{{stepDescription}}"
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: "{project-root}/{bmad_folder}/{{targetModule}}/workflows/{{workflowName}}"
|
||||
|
||||
# File References
|
||||
thisStepFile: "{workflow_path}/steps/step-{{stepNumber}}-{{stepName}}.md"
|
||||
{{#hasNextStep}}
|
||||
nextStepFile: "{workflow_path}/steps/step-{{nextStepNumber}}-{{nextStepName}}.md"
|
||||
{{/hasNextStep}}
|
||||
workflowFile: "{workflow_path}/workflow.md"
|
||||
{{#hasOutput}}
|
||||
outputFile: "{output_folder}/{{outputFileName}}-{project_name}.md"
|
||||
{{/hasOutput}}
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
|
||||
partyModeWorkflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md"
|
||||
|
||||
{{#hasTemplates}}
|
||||
# Template References
|
||||
{{#templates}}
|
||||
{{name}}: "{workflow_path}/templates/{{file}}"
|
||||
{{/templates}}
|
||||
{{/hasTemplates}}
|
||||
---
|
||||
|
||||
# Step {{stepNumber}}: {{stepTitle}}
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
{{stepGoal}}
|
||||
|
||||
## 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
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a {{aiRole}}
|
||||
- ✅ 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 {{aiExpertise}}, user brings {{userExpertise}}
|
||||
- ✅ Maintain collaborative {{collaborationStyle}} tone throughout
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus only on {{stepFocus}}
|
||||
- 🚫 FORBIDDEN to {{forbiddenAction}}
|
||||
- 💬 Approach: {{stepApproach}}
|
||||
- 📋 {{additionalRule}}
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
{{#executionProtocols}}
|
||||
|
||||
- 🎯 {{.}}
|
||||
{{/executionProtocols}}
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: {{availableContext}}
|
||||
- Focus: {{contextFocus}}
|
||||
- Limits: {{contextLimits}}
|
||||
- Dependencies: {{contextDependencies}}
|
||||
|
||||
## SEQUENCE OF INSTRUCTIONS (Do not deviate, skip, or optimize)
|
||||
|
||||
{{#instructions}}
|
||||
|
||||
### {{number}}. {{title}}
|
||||
|
||||
{{content}}
|
||||
|
||||
{{#hasContentToAppend}}
|
||||
|
||||
#### Content to Append (if applicable):
|
||||
|
||||
```markdown
|
||||
{{contentToAppend}}
|
||||
```
|
||||
|
||||
{{/hasContentToAppend}}
|
||||
|
||||
{{/instructions}}
|
||||
|
||||
{{#hasMenu}}
|
||||
|
||||
### {{menuNumber}}. Present MENU OPTIONS
|
||||
|
||||
Display: **{{menuDisplay}}**
|
||||
|
||||
#### 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:
|
||||
|
||||
{{#menuOptions}}
|
||||
|
||||
- IF {{key}}: {{action}}
|
||||
{{/menuOptions}}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#{{menuNumber}}-present-menu-options)
|
||||
{{/hasMenu}}
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
{{completionNote}}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
{{#successCriteria}}
|
||||
|
||||
- {{.}}
|
||||
{{/successCriteria}}
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
{{#failureModes}}
|
||||
|
||||
- {{.}}
|
||||
{{/failureModes}}
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,54 @@
|
||||
# Workflow Creation Plan: {{workflowName}}
|
||||
|
||||
**Created:** {{date}}
|
||||
**Author:** {{user_name}}
|
||||
**Module:** {{targetModule}}
|
||||
**Type:** {{workflowType}}
|
||||
|
||||
## Executive Summary
|
||||
|
||||
{{executiveSummary}}
|
||||
|
||||
## Requirements Analysis
|
||||
|
||||
[Requirements will be appended here from step 2]
|
||||
|
||||
## Detailed Design
|
||||
|
||||
[Design details will be appended here from step 3]
|
||||
|
||||
## Implementation Plan
|
||||
|
||||
[Implementation plan will be appended here from step 4]
|
||||
|
||||
## Review and Validation
|
||||
|
||||
[Review results will be appended here from step 5]
|
||||
|
||||
---
|
||||
|
||||
## Final Configuration
|
||||
|
||||
### Output Files to Generate
|
||||
|
||||
{{#outputFiles}}
|
||||
|
||||
- {{type}}: {{path}}
|
||||
{{/outputFiles}}
|
||||
|
||||
### Target Location
|
||||
|
||||
- **Folder**: {{targetWorkflowPath}}
|
||||
- **Module**: {{targetModule}}
|
||||
- **Custom Location**: {{customWorkflowLocation}}
|
||||
|
||||
### Final Checklist
|
||||
|
||||
- [ ] All requirements documented
|
||||
- [ ] Workflow designed and approved
|
||||
- [ ] Files generated successfully
|
||||
- [ ] Workflow tested and validated
|
||||
|
||||
## Ready for Implementation
|
||||
|
||||
When you approve this plan, I'll generate all the workflow files in the specified location with the exact structure and content outlined above.
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: { { workflowDisplayName } }
|
||||
description: { { workflowDescription } }
|
||||
web_bundle: { { webBundleFlag } }
|
||||
---
|
||||
|
||||
# {{workflowDisplayName}}
|
||||
|
||||
**Goal:** {{workflowGoal}}
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a {{aiRole}} collaborating with {{userType}}. This is a partnership, not a client-vendor relationship. You bring {{aiExpertise}}, while the user brings {{userExpertise}}. Work together as equals.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
||||
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
|
||||
- **Append-Only Building**: Build documents by appending content as directed to the output file
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
|
||||
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
||||
|
||||
### Critical Rules (NO EXCEPTIONS)
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
|
||||
- 🎯 **ALWAYS** follow the exact instructions in the step file
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for user input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from {project-root}/{bmad_folder}/{{targetModule}}/config.yaml and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
||||
|
||||
### 2. First Step EXECUTION
|
||||
|
||||
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
# {Title} Checklist Validation
|
||||
|
||||
## {Section Foo}
|
||||
|
||||
- [ ] Check 1
|
||||
- [ ] Check 2
|
||||
- [ ] ...
|
||||
- [ ] Check n
|
||||
|
||||
...
|
||||
|
||||
## {Section Bar}
|
||||
|
||||
- [ ] Check 1
|
||||
- [ ] Check 2
|
||||
- [ ] ...
|
||||
- [ ] Check n
|
||||
|
||||
## Final Validation
|
||||
|
||||
- [ ] Section Foo
|
||||
- Issue List
|
||||
- [ ] Section Bar
|
||||
- Issue List
|
||||
@@ -1,15 +0,0 @@
|
||||
# PRD Workflow Instructions
|
||||
|
||||
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
|
||||
<critical>You MUST have already loaded and processed: {project-related}/{bmad_folder}/{module-code}/workflows/{workflow}/workflow.yaml</critical>
|
||||
<critical>Communicate in {communication_language} throughout the workflow process</critical>
|
||||
|
||||
<!-- For planning/analysis workflows, add: <critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical> -->
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="1" goal="">
|
||||
...
|
||||
</step>
|
||||
...
|
||||
</workflow>
|
||||
@@ -1,9 +0,0 @@
|
||||
# Title
|
||||
|
||||
**Date:** {{date}}
|
||||
|
||||
## {Section 1}
|
||||
|
||||
{{section_1_results}}
|
||||
|
||||
etc...
|
||||
@@ -1,61 +0,0 @@
|
||||
# {TITLE} Workflow Template Configuration
|
||||
name: "{WORKFLOW_CODE}"
|
||||
description: "{WORKFLOW_DESCRIPTION}"
|
||||
author: "BMad"
|
||||
|
||||
# Critical variables load from config_source
|
||||
# Add Additional Config Pulled Variables Here
|
||||
config_source: "{project-root}/{module-code}/config.yaml"
|
||||
output_folder: "{config_source}:output_folder"
|
||||
user_name: "{config_source}:user_name"
|
||||
communication_language: "{config_source}:communication_language"
|
||||
date: system-generated
|
||||
|
||||
# Required Data Files - HALT if missing!
|
||||
# optional, can be omitted
|
||||
brain_techniques: "{installed_path}/{critical-data-file.csv}" # example, can be other formats or URLs
|
||||
|
||||
# Module path and component files
|
||||
installed_path: "{project-root}/{bmad_folder}/{module-code}/workflows/{workflow-code}"
|
||||
template: "{installed_path}/template.md" # optional, can be omitted
|
||||
instructions: "{installed_path}/instructions.md" # optional, can be omitted
|
||||
validation: "{installed_path}/checklist.md" # optional, can be omitted
|
||||
|
||||
# Output configuration
|
||||
default_output_file: "{output_folder}/{file.md}" # optional, can be omitted
|
||||
validation_output_file: "{output_folder}/{file-validation-report.md}" # optional, can be omitted
|
||||
|
||||
# Tool Requirements (MCP Required Tools or other tools needed to run this workflow)
|
||||
required_tools: #optional, can be omitted
|
||||
- "Tool Name": #example, can be omitted if none
|
||||
description: "Description of why this tool is needed"
|
||||
link: "https://link-to-tool.com"
|
||||
|
||||
# Web Bundle Configuration (optional - for web-deployable workflows)
|
||||
# IMPORTANT: Web bundles are self-contained and cannot use config_source variables
|
||||
# All referenced files must be listed in web_bundle_files
|
||||
web_bundle: #optional, can be omitted
|
||||
name: "{WORKFLOW_CODE}"
|
||||
description: "{WORKFLOW_DESCRIPTION}"
|
||||
author: "BMad"
|
||||
|
||||
# Core workflow files (paths relative to {bmad_folder}/ root)
|
||||
instructions: "{bmad_folder}/{module-code}/workflows/{workflow-code}/instructions.md"
|
||||
validation: "{bmad_folder}/{module-code}/workflows/{workflow-code}/checklist.md"
|
||||
template: "{bmad_folder}/{module-code}/workflows/{workflow-code}/template.md" # if document workflow
|
||||
|
||||
# Reference any data files or additional workflows (no config_source allowed)
|
||||
# brain_techniques: "{bmad_folder}/{module-code}/workflows/{workflow-code}/data-file.csv"
|
||||
# sub_workflow: "{bmad_folder}/{module-code}/workflows/other-workflow/workflow.yaml"
|
||||
|
||||
# CRITICAL: List ALL files used by this workflow
|
||||
# This includes instructions, validation, templates, data files,
|
||||
# and any files referenced within those files
|
||||
web_bundle_files:
|
||||
- "{bmad_folder}/{module-code}/workflows/{workflow-code}/instructions.md"
|
||||
- "{bmad_folder}/{module-code}/workflows/{workflow-code}/checklist.md"
|
||||
- "{bmad_folder}/{module-code}/workflows/{workflow-code}/template.md"
|
||||
# Add ALL referenced files here - examine instructions.md and template.md
|
||||
# for any file paths and include them all
|
||||
# - "{bmad_folder}/{module-code}/workflows/{workflow-code}/data/example.csv"
|
||||
# - "{bmad_folder}/{module-code}/templates/shared-template.md"
|
||||
58
src/modules/bmb/workflows/create-workflow/workflow.md
Normal file
58
src/modules/bmb/workflows/create-workflow/workflow.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: Create Workflow
|
||||
description: Create structured standalone workflows using markdown-based step architecture
|
||||
web_bundle: true
|
||||
---
|
||||
|
||||
# Create Workflow
|
||||
|
||||
**Goal:** Create structured, repeatable standalone workflows through collaborative conversation and step-by-step guidance.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a workflow architect and systems designer collaborating with a workflow creator. This is a partnership, not a client-vendor relationship. You bring expertise in workflow design patterns, step architecture, and collaborative facilitation, while the user brings their domain knowledge and specific workflow requirements. Work together as equals.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
||||
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
|
||||
- **Append-Only Building**: Build documents by appending content as directed to the output file
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
|
||||
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
||||
|
||||
### Critical Rules (NO EXCEPTIONS)
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
|
||||
- 🎯 **ALWAYS** follow the exact instructions in the step file
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for user input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from {project-root}/{bmad_folder}/bmb/config.yaml and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
||||
|
||||
### 2. First Step EXECUTION
|
||||
|
||||
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
|
||||
@@ -1,41 +0,0 @@
|
||||
# Build Workflow - Workflow Builder Configuration
|
||||
name: create-workflow
|
||||
description: "Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design."
|
||||
author: "BMad Builder"
|
||||
|
||||
# Critical variables
|
||||
config_source: "{project-root}/{bmad_folder}/bmb/config.yaml"
|
||||
custom_workflow_location: "{config_source}:custom_workflow_location"
|
||||
user_name: "{config_source}:user_name"
|
||||
communication_language: "{config_source}:communication_language"
|
||||
|
||||
# Template files for new workflows
|
||||
template_workflow_yaml: "{workflow_template_path}/workflow.yaml"
|
||||
template_instructions: "{workflow_template_path}/instructions.md"
|
||||
template_template: "{workflow_template_path}/template.md"
|
||||
template_checklist: "{workflow_template_path}/checklist.md"
|
||||
|
||||
# Module path and component files
|
||||
installed_path: "{project-root}/{bmad_folder}/bmb/workflows/create-workflow"
|
||||
template: false # This is an action workflow - no template needed
|
||||
instructions: "{installed_path}/instructions.md"
|
||||
validation: "{installed_path}/checklist.md"
|
||||
|
||||
# Required data files - CRITICAL for workflow conventions
|
||||
workflow_creation_guide: "{installed_path}/workflow-creation-guide.md"
|
||||
workflow_template_path: "{installed_path}/workflow-template"
|
||||
|
||||
# Reference examples - for learning patterns
|
||||
existing_workflows_dir: "{project-root}/{bmad_folder}/*/workflows/"
|
||||
bmm_workflows_dir: "{project-root}/{bmad_folder}/bmm/workflows/"
|
||||
|
||||
# Output configuration - Creates the new workflow folder with all files
|
||||
# If workflow belongs to a module: Save to module's workflows folder
|
||||
# If standalone workflow: Save to custom_workflow_location/{{workflow_name}}
|
||||
module_output_folder: "{project-root}/{bmad_folder}/{{target_module}}/workflows/{{workflow_name}}"
|
||||
standalone_output_folder: "{custom_workflow_location}/{{workflow_name}}"
|
||||
|
||||
standalone: true
|
||||
|
||||
# Web bundle configuration
|
||||
web_bundle: false # BMB workflows run locally in BMAD-METHOD project
|
||||
Reference in New Issue
Block a user