Workflow Customization
Workflows support powerful customization patterns through tri-modal architecture, step replacement, and cross-mode integration. This enables workflows to adapt to your specific project needs while maintaining best practices.
Tri-Modal Workflow Structure
Section titled “Tri-Modal Workflow Structure”Complex workflows use tri-modal architecture — separate flows for create, edit, and validate operations:
workflow-name/├── workflow.md # Entry point with mode routing├── data/ # SHARED standards and reference├── steps-c/ # Create (self-contained)│ ├── step-01-init.md│ └── step-N-complete.md├── steps-e/ # Edit (self-contained)│ ├── step-01-assess.md│ └── step-N-complete.md└── steps-v/ # Validate (self-contained) └── step-01-validate.mdMode Responsibilities
Section titled “Mode Responsibilities”| Mode | Purpose | Key Patterns |
|---|---|---|
| Create | Build new entities from scratch | Step-00-conversion for non-compliant input |
| Edit | Modify existing compliant entities | Assess compliance first, route to conversion if needed |
| Validate | Standalone validation against standards | Auto-proceeds through checks, generates report |
Key principle: Each mode is self-contained with no shared step files. The data/ folder is shared to prevent drift.
Cross-Mode Integration
Section titled “Cross-Mode Integration”Workflows support seamless integration between modes:
Edit to Create (Non-Compliant Detection)
Section titled “Edit to Create (Non-Compliant Detection)”When editing detects a non-compliant workflow:
Check workflow compliance: - Compliant → Continue to edit steps - Non-compliant → Offer conversion - IF user accepts: Load steps-c/step-00-conversion.mdCreate/Edit to Validation
Section titled “Create/Edit to Validation”After creation or editing, workflows can automatically invoke validation:
Offer: "Run validation?" - IF yes: Load ../steps-v/step-01-validate.md - Validation runs standalone, returns report - Resume with validation resultsValidation to Edit
Section titled “Validation to Edit”Validation reports can be consumed by edit mode for fixes:
"Fix issues found?" - IF yes: Load steps-e/step-01-assess.md with validationReport pathWorkflow Conversion
Section titled “Workflow Conversion”Workflows can convert non-compliant input to BMad-compliant format through step-00-conversion:
Conversion process:
- Load non-compliant workflow
- Extract essence and structure
- Create plan with
conversionFrommetadata - Build compliant workflow
- Verify coverage of original functionality
Coverage tracking:
# In create step-10-confirmationCheck workflowPlan metadata: - IF conversionFrom exists: - Load original workflow - Compare each step/instruction - Report coverage percentage - ELSE (new workflow): - Validate all plan requirements implementedStep Replacement and Extension
Section titled “Step Replacement and Extension”Adding Steps
Section titled “Adding Steps”To add a step to an existing workflow:
- Create new step file:
step-XX-new-step.md - Update previous step’s
nextStepFileto load the new step - Set the new step’s
nextStepFileto continue the sequence - Validate with
[VW]orvalidate-workflow
Replacing Steps
Section titled “Replacing Steps”To replace a step entirely:
- Create replacement step file with same or new name
- Update previous step’s
nextStepFileto load replacement - Remove or archive old step file
- Validate the workflow
Extracting to Data Files
Section titled “Extracting to Data Files”When a step exceeds 200-250 lines, extract content to /data/ files:
Good candidates for extraction:
- Domain-specific reference materials
- Reusable patterns or examples
- Configuration data
- Large lookup tables
Menu Customization
Section titled “Menu Customization”Menu Patterns
Section titled “Menu Patterns”| Pattern | Use Case | Options |
|---|---|---|
| Standard A/P/C | Collaborative content generation | Advanced, Party, Continue |
| C Only | Data gathering, simple progression | Continue only |
| Branching | User choice determines path | Custom letters (L/R/F) |
| Auto-proceed | Init steps, validation sequences | No menu |
Custom Menu Options
Section titled “Custom Menu Options”Workflows can define custom menu letters:
Display: "**Select:** [L] Load Existing [N] Create New [C] Continue"
#### Menu Handling Logic:- IF L: Load existing document, then execute {stepForExisting}- IF N: Create new document, then execute {stepForNew}- IF C: Save content, check condition, load appropriate stepTemplate Customization
Section titled “Template Customization”Template Types
Section titled “Template Types”| Type | Description | Use Case |
|---|---|---|
| Free-form | Minimal template, progressive append | Most workflows |
| Structured | Single template with placeholders | Consistent formatting needed |
| Semi-structured | Core sections + optional additions | Flexible but organized |
| Strict | Multiple templates, exact definitions | Compliance, regulated industries |
Template Syntax
Section titled “Template Syntax”{{variable}} # Handlebars style (preferred)[variable] # Bracket style (also supported)Output Customization
Section titled “Output Customization”Output Patterns
Section titled “Output Patterns”Plan-then-Build:
Step 1 → Creates plan.mdStep 2 → Appends requirementsStep 3 → Appends designStep 4 → Build step consumes planDirect-to-Final:
Step 1 → Creates final-doc.mdStep 2 → Appends Section 1Step 3 → Appends Section 2Step 4 → Polish step optimizes entire documentFinal Polish Step
Section titled “Final Polish Step”For free-form workflows, include a polish step that:
- Loads entire document
- Reviews for flow and coherence
- Reduces duplication
- Ensures proper headers
- Improves transitions
Pattern Resources
Section titled “Pattern Resources”| Resource | Description |
|---|---|
| Workflow Patterns | Step types and structure patterns |
| Workflow Schema | Technical reference |
| Edit Agents and Workflows | Step-by-step editing guide |