workflow builder understands how to build continuable workflows

This commit is contained in:
Brian Madison
2025-12-01 21:51:00 -06:00
parent fe0817f590
commit 6365a63dff
49 changed files with 811 additions and 347 deletions

View File

@@ -70,8 +70,10 @@ To collaboratively design the workflow structure, step sequence, and interaction
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/templates/step-template.md` - Step file structure
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md` - Continuable init step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md` - Continuation step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/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
@@ -84,10 +86,18 @@ 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
Read: {project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md
```
This shows the standard structure for step files. Based on the requirements, collaboratively design:
This shows the standard structure for step files. Also reference:
```
Read: {project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md
```
This shows the continuation step pattern for workflows that might take multiple sessions.
Based on the requirements, collaboratively design:
- How many major steps does this workflow need? (Recommend 3-7)
- What is the goal of each step?
@@ -95,6 +105,25 @@ This shows the standard structure for step files. Based on the requirements, col
- Should any steps repeat or loop?
- What are the decision points within steps?
### 1a. Continuation Support Assessment
**Ask the user:**
"Will this workflow potentially take multiple sessions to complete? Consider:
- Does this workflow generate a document/output file?
- Might users need to pause and resume the workflow?
- Does the workflow involve extensive data collection or analysis?
- Are there complex decisions that might require multiple sessions?
If **YES** to any of these, we should include continuation support using step-01b-continue.md."
**If continuation support is needed:**
- Include step-01-init.md (with continuation detection logic)
- Include step-01b-continue.md (for resuming workflows)
- Ensure every step updates `stepsCompleted` in output frontmatter
- Design the workflow to persist state between sessions
### 2. Interaction Pattern Design
Design how users will interact with the workflow:

View File

@@ -18,8 +18,10 @@ advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elici
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
stepInitContinuableTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md'
step1bTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md'
contentTemplate: '{workflow_path}/templates/content-template.md'
buildSummaryTemplate: '{workflow_path}/templates/build-summary.md'
---
@@ -70,8 +72,10 @@ To generate all the workflow files (workflow.md, step files, templates, and supp
## BUILD REFERENCE MATERIALS:
- When building each step file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md`
- When building the main workflow.md file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md`
- When building each step file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md`
- When building continuable step-01-init.md files, use template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md`
- When building continuation steps, use template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md`
- When building the main workflow.md file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md`
- Example step files from {project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md for patterns
## FILE GENERATION SEQUENCE:
@@ -99,6 +103,7 @@ Create the workflow folder structure in the target location:
├── workflow.md
├── steps/
│ ├── step-01-init.md
│ ├── step-01b-continue.md (if continuation support needed)
│ ├── step-02-[name].md
│ └── ...
├── templates/
@@ -123,7 +128,47 @@ Load and follow {workflowTemplate}:
### 4. Generate Step Files
For each step in the design:
#### 4a. Check for Continuation Support
**Check the workflow plan for continuation support:**
- Look for "continuation support: true" or similar flag
- Check if step-01b-continue.md was included in the design
- If workflow generates output documents, continuation is typically needed
#### 4b. Generate step-01-init.md (with continuation logic)
If continuation support is needed:
- Load and follow {stepInitContinuableTemplate}
- This template automatically includes all required continuation detection logic
- Customize with workflow-specific information:
- Update workflow_path references
- Set correct outputFile and templateFile paths
- Adjust role and persona to match workflow type
- Customize welcome message for workflow context
- Configure input document discovery patterns (if any)
- Template automatically handles:
- continueFile reference in frontmatter
- Logic to check for existing output files with stepsCompleted
- Routing to step-01b-continue.md for continuation
- Fresh workflow initialization
#### 4c. Generate step-01b-continue.md (if needed)
**If continuation support is required:**
- Load and follow {step1bTemplate}
- Customize with workflow-specific information:
- Update workflow_path references
- Set correct outputFile path
- Adjust role and persona to match workflow type
- Customize welcome back message for workflow context
- Ensure proper nextStep detection logic based on step numbers
#### 4d. Generate Remaining Step Files
For each remaining step in the design:
- Load and follow {stepTemplate}
- Create step file using template structure
@@ -131,6 +176,7 @@ For each step in the design:
- Ensure proper frontmatter with path references
- Include appropriate menu handling and universal rules
- Follow all mandatory rules and protocols from template
- **Critical**: Ensure each step updates `stepsCompleted` array when completing
### 5. Generate Templates (If Needed)