Workflow Variables Reference
Complete reference for workflow frontmatter variables, path rules, and naming conventions.
Standard Variables
Section titled âStandard VariablesâAvailable to all workflows regardless of module affiliation:
| Variable | Example | Description |
|---|---|---|
{project-root} | /Users/user/dev/my-project | Project root directory |
{project_name} | my-project | Project name from configuration |
{output_folder} | /Users/user/dev/my-project/output | Configured output folder |
{user_name} | Brian | User name from configuration |
{communication_language} | english | Language for AI responses |
{document_output_language} | english | Language for document output |
Module-Specific Variables
Section titled âModule-Specific VariablesâAvailable to workflows within a module (defined in module.yaml):
BMB Module Variables
Section titled âBMB Module Variablesâ| Variable | Example | Description |
|---|---|---|
{bmb_creations_output_folder} | {project-root}/_bmad/bmb-creations | Output for BMB-created workflows |
BMM Module Variables
Section titled âBMM Module Variablesâ| Variable | Example | Description |
|---|---|---|
{planning_artifacts} | {project-root}/_bmad/bmm/planning-artifacts | Planning document storage |
Defining Module Variables
Section titled âDefining Module VariablesâDefine module variables in module.yaml:
module: config: variables: my_custom_folder: '{project-root}/custom/output'Path Rules
Section titled âPath RulesâWithin Workflow Folder
Section titled âWithin Workflow FolderâUse relative paths for references within the same workflow:
| Type | Format | Example |
|---|---|---|
| Step to Step (same folder) | ./filename.md | ./step-02-vision.md |
| Step to Template (parent) | ../filename.md | ../template.md |
| Step to Subfolder | ./subfolder/file.md | ./data/config.csv |
External References
Section titled âExternal ReferencesâUse {project-root} for references outside the workflow folder:
| Type | Format | Example |
|---|---|---|
| Core workflows | {project-root}/_bmad/core/workflows/... | {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml |
| Module outputs | {module_output_folder}/... | {bmm_creations_output_folder}/prd-my-project.md |
Output File Paths
Section titled âOutput File PathsâUse folder variables for output file paths:
| Type | Format | Example |
|---|---|---|
| Standard output | {output_folder}/file.md | {output_folder}/workflow-output.md |
| Module output | {module_folder}/file.md | {bmb_creations_output_folder}/my-workflow.md |
| Time-stamped | {output_folder}/file-{timestamp}.md | {output_folder}/plan-2025-01-15.md |
Variable Naming Conventions
Section titled âVariable Naming ConventionsâNaming Pattern
Section titled âNaming PatternâUse snake_case with descriptive suffixes:
| Suffix | Usage | Example |
|---|---|---|
*_File | File references | outputFile, nextStepFile |
*_Task | Task references | advancedElicitationTask |
*_Workflow | Workflow references | partyModeWorkflow |
*_Template | Templates | productBriefTemplate |
*_Data | Data files | dietaryData |
Variable Types
Section titled âVariable Typesâ| Type | Pattern | Example |
|---|---|---|
| File paths | *_File, *_Path | outputFile, workflowPath |
| Workflow references | *_Workflow | partyModeWorkflow |
| Task references | *_Task | advancedElicitationTask |
| Template references | *_Template | profileTemplate |
Frontmatter Structure
Section titled âFrontmatter StructureâRequired Fields
Section titled âRequired FieldsâEvery step frontmatter must include:
---name: 'step-01-init'description: 'What this step does'---File References
Section titled âFile ReferencesâOnly include variables actually used in the step body:
---# Required fieldsname: 'step-01-init'description: 'Initialize the workflow'
# File references (only if used)nextStepFile: './step-02-discovery.md'outputFile: '{output_folder}/workflow-plan.md'workflowPlanTemplate: '../templates/plan-template.md'---Defining New Variables
Section titled âDefining New VariablesâSteps can define new variables for future steps:
Step 01 defines:
---targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{workflow_name}'---Step 02 uses:
---targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{workflow_name}'workflowPlanFile: '{targetWorkflowPath}/plan.md'---Continuable Workflow Variables
Section titled âContinuable Workflow VariablesâFor continuable workflows, track progress in output file frontmatter:
---stepsCompleted: ['step-01-init', 'step-02-discovery', 'step-03-strategy']lastStep: 'step-03-strategy'lastContinued: '2025-01-15'status: IN_PROGRESSdate: '2025-01-14'user_name: 'Brian'---| Field | Type | Description |
|---|---|---|
stepsCompleted | array | List of completed step names |
lastStep | string | Most recent completed step |
lastContinued | date | Last continuation date |
status | string | IN_PROGRESS or COMPLETE |
date | date | Workflow start date |
user_name | string | User who created the workflow |
Template Variables
Section titled âTemplate VariablesâTemplates use placeholder syntax for dynamic content:
# {{title}}
Created: {{date}}
## Summary{{summary}}
## Details{{details}}Template Syntax
Section titled âTemplate Syntaxâ| Syntax | Example |
|---|---|
{{variable}} | {{title}} (preferred) |
[variable] | [title] (also supported) |
Common Variable Patterns
Section titled âCommon Variable PatternsâInput Discovery Pattern
Section titled âInput Discovery PatternâFor workflows that require input from prior workflows:
---inputDocuments: []requiredInputCount: 1moduleInputFolder: '{module_output_folder}'inputFilePatterns: - '*-prd.md' - '*-ux.md'---Output Path Pattern
Section titled âOutput Path PatternâFor workflows that produce output:
---outputFile: '{output_folder}/workflow-output-{project_name}.md'---Template Reference Pattern
Section titled âTemplate Reference PatternâFor workflows that use templates:
---workflowPlanTemplate: '../templates/plan-template.md'productBriefTemplate: '../templates/brief-template.md'---Task Reference Pattern
Section titled âTask Reference PatternâFor workflows that invoke other workflows:
---advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'---Variable Resolution
Section titled âVariable ResolutionâVariables resolve in this order:
- Standard variables â Always available from global config
- Module variables â Available if workflow is in a module
- User-defined variables â Defined in prior steps, available to subsequent steps
- Output frontmatter variables â Available to continuation steps
Path Validation Rules
Section titled âPath Validation Rulesâ| Rule | Correct | Incorrect |
|---|---|---|
| Step to step | ./step-02.md | {workflow_path}/step-02.md |
| Step to template | ../template.md | {workflow_path}/template.md |
| Step to data | ./data/file.csv | {workflow_path}/data/file.csv |
| External ref | {project-root}/_bmad/... | Hardcoded absolute path |
| Output file | {output_folder}/file.md | Hardcoded absolute path |
Common Variable Violations
Section titled âCommon Variable Violationsâ| Violation | Fix |
|---|---|
| Unused variable in frontmatter | Remove unused variables |
| Hardcoded file path | Use {variable} format |
{workflow_path} in same-folder reference | Use relative path ./file.md |
| Absolute path for external reference | Use {project-root}/... |
Resources
Section titled âResourcesâ| Resource | Description |
|---|---|
| Workflow Schema | Complete workflow structure reference |
| Frontmatter Standards | Source documentation |
| Menu Handling Standards | Menu patterns |