workflow builder understand existing_workflows tag for web bundles, and cleanup comtinues
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
- [ ] validation/checklist file listed in web_bundle_files (if exists)
|
||||
- [ ] All data files (CSV, JSON, YAML) listed in web_bundle_files
|
||||
- [ ] All <invoke-workflow> called workflows have their .yaml files in web_bundle_files
|
||||
- [ ] **CRITICAL**: If workflow invokes other workflows, existing_workflows field is present
|
||||
- [ ] existing_workflows maps workflow variables to bmad/-relative paths correctly
|
||||
- [ ] All files referenced in instructions <action> tags listed in web_bundle_files
|
||||
- [ ] No files listed in web_bundle_files that don't exist
|
||||
- [ ] Web bundle metadata (name, description, author) matches top-level metadata
|
||||
|
||||
@@ -145,6 +145,11 @@ Display summary:
|
||||
<action>Scan instructions.md for <invoke-workflow> tags</action>
|
||||
<action>Extract workflow paths from invocations</action>
|
||||
<action>Verify each called workflow.yaml is in web_bundle_files</action>
|
||||
<action>**CRITICAL**: Check if existing_workflows field is present when workflows are invoked</action>
|
||||
<action>If <invoke-workflow> calls exist, existing_workflows MUST map workflow variables to paths</action>
|
||||
<action>Example: If instructions use {core_brainstorming}, web_bundle needs:
|
||||
existing_workflows: - core_brainstorming: "bmad/core/workflows/brainstorming/workflow.yaml"
|
||||
</action>
|
||||
|
||||
**File Reference Scan:**
|
||||
<action>Scan instructions.md for file references in <action> tags</action>
|
||||
|
||||
@@ -379,13 +379,43 @@ web_bundle:
|
||||
- 'bmad/{module}/workflows/{workflow}/template.md'
|
||||
- 'bmad/{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/path/to/workflow.yaml'
|
||||
```
|
||||
|
||||
**Example with existing_workflows:**
|
||||
|
||||
```yaml
|
||||
web_bundle:
|
||||
name: 'brainstorm-game'
|
||||
description: 'Game brainstorming with CIS workflow'
|
||||
author: 'BMad'
|
||||
instructions: 'bmad/bmm/workflows/brainstorm-game/instructions.md'
|
||||
template: false
|
||||
web_bundle_files:
|
||||
- 'bmad/bmm/workflows/brainstorm-game/instructions.md'
|
||||
- 'bmad/mmm/workflows/brainstorm-game/game-context.md'
|
||||
- 'bmad/core/workflows/brainstorming/workflow.yaml'
|
||||
existing_workflows:
|
||||
- core_brainstorming: 'bmad/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/-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/-relative
|
||||
- If workflow uses <invoke-workflow>, add to existing_workflows
|
||||
|
||||
<template-output>web_bundle_config</template-output>
|
||||
</step>
|
||||
|
||||
@@ -146,7 +146,12 @@ If creating new web bundle:
|
||||
- Any included files
|
||||
5. Scan template.md for any includes
|
||||
6. Create complete web_bundle_files array
|
||||
7. Generate web_bundle section
|
||||
7. **CRITICAL**: Check for <invoke-workflow> calls in instructions:
|
||||
- If workflow invokes other workflows, add existing_workflows field
|
||||
- Maps workflow variable name to bmad/-relative path
|
||||
- Signals bundler to recursively include invoked workflow's web_bundle
|
||||
- Example: `existing_workflows: - core_brainstorming: "bmad/core/workflows/brainstorming/workflow.yaml"`
|
||||
8. Generate web_bundle section
|
||||
|
||||
If updating existing web bundle:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user