Skip to content
🤖 AI-optimized docs: llms-full.txt

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.

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.md
ModePurposeKey Patterns
CreateBuild new entities from scratchStep-00-conversion for non-compliant input
EditModify existing compliant entitiesAssess compliance first, route to conversion if needed
ValidateStandalone validation against standardsAuto-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.

Workflows support seamless integration between modes:

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.md

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 results

Validation reports can be consumed by edit mode for fixes:

"Fix issues found?"
- IF yes: Load steps-e/step-01-assess.md with validationReport path

Workflows can convert non-compliant input to BMad-compliant format through step-00-conversion:

Conversion process:

  1. Load non-compliant workflow
  2. Extract essence and structure
  3. Create plan with conversionFrom metadata
  4. Build compliant workflow
  5. Verify coverage of original functionality

Coverage tracking:

# In create step-10-confirmation
Check workflowPlan metadata:
- IF conversionFrom exists:
- Load original workflow
- Compare each step/instruction
- Report coverage percentage
- ELSE (new workflow):
- Validate all plan requirements implemented

To add a step to an existing workflow:

  1. Create new step file: step-XX-new-step.md
  2. Update previous step’s nextStepFile to load the new step
  3. Set the new step’s nextStepFile to continue the sequence
  4. Validate with [VW] or validate-workflow

To replace a step entirely:

  1. Create replacement step file with same or new name
  2. Update previous step’s nextStepFile to load replacement
  3. Remove or archive old step file
  4. Validate the workflow

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
PatternUse CaseOptions
Standard A/P/CCollaborative content generationAdvanced, Party, Continue
C OnlyData gathering, simple progressionContinue only
BranchingUser choice determines pathCustom letters (L/R/F)
Auto-proceedInit steps, validation sequencesNo menu

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 step
TypeDescriptionUse Case
Free-formMinimal template, progressive appendMost workflows
StructuredSingle template with placeholdersConsistent formatting needed
Semi-structuredCore sections + optional additionsFlexible but organized
StrictMultiple templates, exact definitionsCompliance, regulated industries
{{variable}} # Handlebars style (preferred)
[variable] # Bracket style (also supported)

Plan-then-Build:

Step 1 → Creates plan.md
Step 2 → Appends requirements
Step 3 → Appends design
Step 4 → Build step consumes plan

Direct-to-Final:

Step 1 → Creates final-doc.md
Step 2 → Appends Section 1
Step 3 → Appends Section 2
Step 4 → Polish step optimizes entire document

For free-form workflows, include a polish step that:

  1. Loads entire document
  2. Reviews for flow and coherence
  3. Reduces duplication
  4. Ensures proper headers
  5. Improves transitions
ResourceDescription
Workflow PatternsStep types and structure patterns
Workflow SchemaTechnical reference
Edit Agents and WorkflowsStep-by-step editing guide