Ignore and untrack BMad directories

This commit is contained in:
Max
2026-01-26 15:49:36 +07:00
parent 7b732372e3
commit 6b113e0392
525 changed files with 2 additions and 112645 deletions

View File

@@ -1,152 +0,0 @@
# Workflow Architecture
**Purpose:** Core structural patterns for BMAD workflows.
---
## Structure
```
workflow-folder/
├── workflow.md # Entry point, configuration
├── steps-c/ # Create flow steps
│ ├── step-01-init.md
│ ├── step-02-[name].md
│ └── step-N-[name].md
├── steps-e/ # Edit flow (if needed)
├── steps-v/ # Validate flow (if needed)
├── data/ # Shared reference files
└── templates/ # Output templates (if needed)
```
---
## workflow.md File Standards
**CRITICAL:** The workflow.md file MUST be lean. It is the entry point and should NOT contain:
-**Listing of all steps** - This defeats progressive disclosure
-**Detailed descriptions of what each step does** - Steps are self-documenting
-**Validation checklists** - These belong in steps-v/, not workflow.md
-**Implementation details** - These belong in step files
**The workflow.md SHOULD contain:**
- ✅ Frontmatter: name, description, web_bundle
- ✅ Goal: What the workflow accomplishes
- ✅ Role: Who the AI embodies when running this workflow
- ✅ Meta-context: Background about the architecture (if demonstrating a pattern)
- ✅ Core architecture principles (step-file design, JIT loading, etc.)
- ✅ Initialization/routing: How to start and which step to load first
**Progressive Disclosure Rule:**
Users should ONLY know about the current step they're executing. The workflow.md routes to the first step, and each step routes to the next. No step lists in workflow.md!
---
## Core Principles
### 1. Micro-File Design
- Each step is a focused file (~80-200 lines)
- One concept per step
- Self-contained instructions
### 2. Just-In-Time Loading
- Only current step file is in memory
- Never load future steps until user selects 'C'
- Progressive disclosure - LLM stays focused
### 3. Sequential Enforcement
- Steps execute in order
- No skipping, no optimization
- Each step completes before next loads
### 4. State Tracking
For continuable workflows:
```yaml
stepsCompleted: ['step-01-init', 'step-02-gather', 'step-03-design']
lastStep: 'step-03-design'
lastContinued: '2025-01-02'
```
Each step appends its name to `stepsCompleted` before loading next.
---
## Execution Flow
### Fresh Start
```
workflow.md → step-01-init.md → step-02-[name].md → ... → step-N-final.md
```
### Continuation (Resumed)
```
workflow.md → step-01-init.md (detects existing) → step-01b-continue.md → [appropriate next step]
```
---
## Frontmatter Variables
### Standard (All Workflows)
```yaml
workflow_path: '{project-root}/_bmad/[module]/workflows/[name]'
thisStepFile: './step-[N]-[name].md'
nextStepFile: './step-[N+1]-[name].md'
outputFile: '{output_folder}/[output].md'
```
### Module-Specific
```yaml
# BMB example:
bmb_creations_output_folder: '{project-root}/_bmad/bmb-creations'
```
### Critical Rules
- ONLY variables used in step body go in frontmatter
- All file references use `{variable}` format
- Paths within workflow folder are relative
---
## Menu Pattern
```markdown
### N. Present MENU OPTIONS
Display: "**Select:** [A] [action] [P] [action] [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {task}, then redisplay menu
- IF P: Execute {task}, then redisplay menu
- IF C: Save to {outputFile}, update frontmatter, then load {nextStepFile}
- IF Any other: help user, then redisplay menu
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed to next step when user selects 'C'
```
**A/P not needed in:** Step 1 (init), validation sequences, simple data gathering
---
## Output Pattern
Every step writes to a document BEFORE loading next step:
1. **Plan-then-build:** Steps append to plan.md → build step consumes plan
2. **Direct-to-final:** Steps append directly to final document
See: `output-format-standards.md`
---
## Critical Rules
- 🛑 NEVER load multiple step files simultaneously
- 📖 ALWAYS read entire step file before execution
- 🚫 NEVER skip steps or optimize the sequence
- 💾 ALWAYS update frontmatter when step completes
- ⏸️ ALWAYS halt at menus and wait for input
- 📋 NEVER create mental todos from future steps

View File

@@ -1,19 +0,0 @@
propose,type,tool_name,description,url,requires_install
always,workflow,party-mode,"Enables collaborative idea generation by managing turn-taking, summarizing contributions, and synthesizing ideas from multiple AI personas in structured conversation sessions about workflow steps or work in progress.",{project-root}/_bmad/core/workflows/party-mode/workflow.md,no
always,workflow,advanced-elicitation,"Employs diverse elicitation strategies such as Socratic questioning, role-playing, and counterfactual analysis to critically evaluate and enhance LLM outputs, forcing assessment from multiple perspectives and techniques.",{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml,no
always,task,brainstorming,"Facilitates idea generation by prompting users with targeted questions, encouraging divergent thinking, and synthesizing concepts into actionable insights through collaborative creative exploration.",{project-root}/_bmad/core/tasks/brainstorming.xml,no
always,llm-tool-feature,web-browsing,"Provides LLM with capabilities to perform real-time web searches, extract relevant data, and incorporate current information into responses when up-to-date information is required beyond training knowledge.",,no
always,llm-tool-feature,file-io,"Enables LLM to manage file operations such as creating, reading, updating, and deleting files, facilitating seamless data handling, storage, and document management within user environments.",,no
always,llm-tool-feature,sub-agents,"Allows LLM to create and manage specialized sub-agents that handle specific tasks or modules within larger workflows, improving efficiency through parallel processing and modular task delegation.",,no
always,llm-tool-feature,sub-processes,"Enables LLM to initiate and manage subprocesses that operate independently, allowing for parallel processing of complex tasks and improved resource utilization during long-running operations.",,no
always,tool-memory,sidecar-file,"Creates a persistent history file that gets written during workflow execution and loaded on future runs, enabling continuity through session-to-session state management. Used for agent or workflow initialization with previous session context, learning from past interactions, and maintaining progress across multiple executions.",,no
example,tool-memory,vector-database,"Stores and retrieves semantic information through embeddings for intelligent memory access, enabling workflows to find relevant past experiences, patterns, or context based on meaning rather than exact matches. Useful for complex learning systems, pattern recognition, and semantic search across workflow history.",https://github.com/modelcontextprotocol/servers/tree/main/src/rag-agent,yes
example,mcp,context-7,"A curated knowledge base of API documentation and third-party tool references, enabling LLM to access accurate and current information for integration and development tasks when specific technical documentation is needed.",https://github.com/modelcontextprotocol/servers/tree/main/src/context-7,yes
example,mcp,playwright,"Provides capabilities for LLM to perform web browser automation including navigation, form submission, data extraction, and testing actions on web pages, facilitating automated web interactions and quality assurance.",https://github.com/modelcontextprotocol/servers/tree/main/src/playwright,yes
example,workflow,security-auditor,"Analyzes workflows and code for security vulnerabilities, compliance issues, and best practices violations, providing detailed security assessments and remediation recommendations for production-ready systems.",,no
example,task,code-review,"Performs systematic code analysis with peer review perspectives, identifying bugs, performance issues, style violations, and architectural problems through adversarial review techniques.",,no
example,mcp,git-integration,"Enables direct Git repository operations including commits, branches, merges, and history analysis, allowing workflows to interact with version control systems for code management and collaboration.",https://github.com/modelcontextprotocol/servers/tree/main/src/git,yes
example,mcp,database-connector,"Provides direct database connectivity for querying, updating, and managing data across multiple database types, enabling workflows to interact with structured data sources and perform data-driven operations.",https://github.com/modelcontextprotocol/servers/tree/main/src/postgres,yes
example,task,api-testing,"Automated API endpoint testing with request/response validation, authentication handling, and comprehensive reporting for REST, GraphQL, and other API types through systematic test generation.",,no
example,workflow,deployment-manager,"Orchestrates application deployment across multiple environments with rollback capabilities, health checks, and automated release pipelines for continuous integration and delivery workflows.",,no
example,task,data-validator,"Validates data quality, schema compliance, and business rules through comprehensive data profiling with detailed reporting and anomaly detection for data-intensive workflows.",,no
1 propose type tool_name description url requires_install
2 always workflow party-mode Enables collaborative idea generation by managing turn-taking, summarizing contributions, and synthesizing ideas from multiple AI personas in structured conversation sessions about workflow steps or work in progress. {project-root}/_bmad/core/workflows/party-mode/workflow.md no
3 always workflow advanced-elicitation Employs diverse elicitation strategies such as Socratic questioning, role-playing, and counterfactual analysis to critically evaluate and enhance LLM outputs, forcing assessment from multiple perspectives and techniques. {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml no
4 always task brainstorming Facilitates idea generation by prompting users with targeted questions, encouraging divergent thinking, and synthesizing concepts into actionable insights through collaborative creative exploration. {project-root}/_bmad/core/tasks/brainstorming.xml no
5 always llm-tool-feature web-browsing Provides LLM with capabilities to perform real-time web searches, extract relevant data, and incorporate current information into responses when up-to-date information is required beyond training knowledge. no
6 always llm-tool-feature file-io Enables LLM to manage file operations such as creating, reading, updating, and deleting files, facilitating seamless data handling, storage, and document management within user environments. no
7 always llm-tool-feature sub-agents Allows LLM to create and manage specialized sub-agents that handle specific tasks or modules within larger workflows, improving efficiency through parallel processing and modular task delegation. no
8 always llm-tool-feature sub-processes Enables LLM to initiate and manage subprocesses that operate independently, allowing for parallel processing of complex tasks and improved resource utilization during long-running operations. no
9 always tool-memory sidecar-file Creates a persistent history file that gets written during workflow execution and loaded on future runs, enabling continuity through session-to-session state management. Used for agent or workflow initialization with previous session context, learning from past interactions, and maintaining progress across multiple executions. no
10 example tool-memory vector-database Stores and retrieves semantic information through embeddings for intelligent memory access, enabling workflows to find relevant past experiences, patterns, or context based on meaning rather than exact matches. Useful for complex learning systems, pattern recognition, and semantic search across workflow history. https://github.com/modelcontextprotocol/servers/tree/main/src/rag-agent yes
11 example mcp context-7 A curated knowledge base of API documentation and third-party tool references, enabling LLM to access accurate and current information for integration and development tasks when specific technical documentation is needed. https://github.com/modelcontextprotocol/servers/tree/main/src/context-7 yes
12 example mcp playwright Provides capabilities for LLM to perform web browser automation including navigation, form submission, data extraction, and testing actions on web pages, facilitating automated web interactions and quality assurance. https://github.com/modelcontextprotocol/servers/tree/main/src/playwright yes
13 example workflow security-auditor Analyzes workflows and code for security vulnerabilities, compliance issues, and best practices violations, providing detailed security assessments and remediation recommendations for production-ready systems. no
14 example task code-review Performs systematic code analysis with peer review perspectives, identifying bugs, performance issues, style violations, and architectural problems through adversarial review techniques. no
15 example mcp git-integration Enables direct Git repository operations including commits, branches, merges, and history analysis, allowing workflows to interact with version control systems for code management and collaboration. https://github.com/modelcontextprotocol/servers/tree/main/src/git yes
16 example mcp database-connector Provides direct database connectivity for querying, updating, and managing data across multiple database types, enabling workflows to interact with structured data sources and perform data-driven operations. https://github.com/modelcontextprotocol/servers/tree/main/src/postgres yes
17 example task api-testing Automated API endpoint testing with request/response validation, authentication handling, and comprehensive reporting for REST, GraphQL, and other API types through systematic test generation. no
18 example workflow deployment-manager Orchestrates application deployment across multiple environments with rollback capabilities, health checks, and automated release pipelines for continuous integration and delivery workflows. no
19 example task data-validator Validates data quality, schema compliance, and business rules through comprehensive data profiling with detailed reporting and anomaly detection for data-intensive workflows. no

View File

@@ -1,81 +0,0 @@
# CSV Data File Standards
**Purpose:** When workflows need structured data that LLMs cannot generate.
---
## When to Use CSV
Use CSV for data that is:
- Domain-specific and not in training data
- Too large for prompt context
- Needs structured lookup/reference
- Must be consistent across sessions
**Don't use for:**
- Web-searchable information
- Common programming syntax
- General knowledge
- Things LLMs can generate
---
## CSV Structure
```csv
category,name,pattern,description
"collaboration","Think Aloud Protocol","user speaks thoughts → facilitator captures","Make thinking visible during work"
"creative","SCAMPER","substitute→combine→adapt→modify→put→eliminate→reverse","Systematic creative thinking"
```
**Rules:**
- Header row required, descriptive column names
- Consistent data types per column
- UTF-8 encoding
- All columns must be used in workflow
---
## Common Use Cases
### 1. Method Registry
Advanced Elicitation uses CSV to select techniques dynamically:
```csv
category,name,pattern
collaboration,Think Aloud,user speaks thoughts → facilitator captures
advanced,Six Thinking Hats,view problem from 6 perspectives
```
### 2. Knowledge Base Index
Map keywords to document locations for surgical lookup:
```csv
keywords,document_path,section
"nutrition,macros",data/nutrition-reference.md,## Daily Targets
```
### 3. Configuration Lookup
Map scenarios to parameters:
```csv
scenario,required_steps,output_sections
"2D Platformer",step-01,step-03,step-07,movement,physics,collision
```
---
## Best Practices
- Keep files small (<1MB if possible)
- No unused columns
- Document each CSV's purpose
- Validate data quality
- Use efficient encoding (codes vs full descriptions)
---
## Validation Checklist
For each CSV file:
- [ ] Purpose is essential (can't be generated by LLM)
- [ ] All columns are used somewhere
- [ ] Properly formatted (consistent, UTF-8)
- [ ] Documented with examples

View File

@@ -1,225 +0,0 @@
# Frontmatter Standards
**Purpose:** Variables, paths, and frontmatter rules for workflow steps.
---
## Golden Rules
1. **Only variables USED in the step** may be in frontmatter
2. **All file references MUST use `{variable}` format** - no hardcoded paths
3. **Paths within workflow folder MUST be relative** - NO `workflow_path` variable allowed
---
## Standard Variables (Always Available)
| Variable | Example Value |
| ---------------------------- | ------------------------------------ |
| `{project-root}` | `/Users/user/dev/BMAD-METHOD` |
| `{project_name}` | `my-project` |
| `{output_folder}` | `/Users/user/dev/BMAD-METHOD/output` |
| `{user_name}` | `Brian` |
| `{communication_language}` | `english` |
| `{document_output_language}` | `english` |
---
## Module-Specific Variables
Workflows in a MODULE can access additional variables from its `module.yaml`.
**BMB Module example:**
```yaml
bmb_creations_output_folder: '{project-root}/_bmad/bmb-creations'
```
**Standalone workflows:** Only have access to standard variables.
---
## Frontmatter Structure
### Required Fields
```yaml
---
name: 'step-[N]-[name]'
description: '[what this step does]'
---
```
### File References - ONLY variables used in this step
```yaml
---
# Step to step (SAME folder) - use ./filename.md
nextStepFile: './step-02-vision.md'
# Step to template (PARENT folder) - use ../filename.md
productBriefTemplate: '../product-brief.template.md'
# Step to data (SUBFOLDER) - use ./data/filename.md
someData: './data/config.csv'
# Output files - use variable
outputFile: '{planning_artifacts}/product-brief-{{project_name}}-{{date}}.md'
# External references - use {project-root}
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
```
---
## Critical Rule: Unused Variables Forbidden
### ❌ VIOLATION - Variable defined but never used
```yaml
---
outputFile: '{output_folder}/output.md'
thisStepFile: './step-01-init.md' # ❌ NEVER USED in body
workflowFile: './workflow.md' # ❌ NEVER USED in body
---
# Step body never mentions {thisStepFile} or {workflowFile}
```
### ✅ CORRECT - Only variables that are used
```yaml
---
outputFile: '{output_folder}/output.md'
nextStepFile: './step-02-foo.md'
---
# Step body uses {outputFile} and {nextStepFile}
```
**Detection Rule:** For EVERY variable in frontmatter, search the step body for `{variableName}`. If not found, it's a violation.
---
## Path Rules - NO EXCEPTIONS
### 1. Step to Step (SAME folder) = ./filename.md
```yaml
# ❌ WRONG
nextStepFile: './step-02.md'
nextStepFile: '{project-root}/_bmad/bmm/workflows/foo/steps/step-02.md'
# ✅ CORRECT
nextStepFile: './step-02-vision.md'
```
### 2. Step to Template (PARENT folder) = ../filename.md
```yaml
# ❌ WRONG
someTemplate: '{workflow_path}/templates/template.md'
# ✅ CORRECT
someTemplate: '../template.md'
```
### 3. Step to Subfolder = ./subfolder/file.md
```yaml
# ❌ WRONG
dataFile: '{workflow_path}/data/config.csv'
# ✅ CORRECT
dataFile: './data/config.csv'
```
### 4. External References = {project-root}/...
```yaml
# ✅ CORRECT
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
```
### 5. Output Files = Use folder variable
```yaml
# ✅ CORRECT
outputFile: '{planning_artifacts}/workflow-output-{project_name}.md'
outputFile: '{output_folder}/output.md'
```
---
## ❌ FORBIDDEN Patterns
These patterns are **NEVER ALLOWED** in workflow step frontmatter:
| Pattern | Why It's Wrong |
| ------------------------------------- | ----------------------------------------------------- |
| `workflow_path: '{project-root}/...'` | Use relative paths instead |
| `thisStepFile: './step-XX.md'` | Almost never used - remove unless actually referenced |
| `workflowFile: './workflow.md'` | Almost never used - remove unless actually referenced |
| `./...` | Use `./step-XX.md` (same folder) |
| `{workflow_path}/templates/...` | Use `../template.md` (parent folder) |
| `{workflow_path}/data/...` | Use `./data/file.md` (subfolder) |
---
## Variable Naming
Use `snake_case` with descriptive prefixes:
| Pattern | Usage | Example |
| -------------- | ------------------- | ---------------------------- |
| `{*_File}` | File references | `outputFile`, `nextStepFile` |
| `{*_Task}` | Task references | `advancedElicitationTask` |
| `{*_Workflow}` | Workflow references | `partyModeWorkflow` |
| `{*_Template}` | Templates | `productBriefTemplate` |
| `{*_Data}` | Data files | `dietaryData` |
---
## Defining New Variables
Steps can define NEW variables that future steps will use.
**Step 01 defines:**
```yaml
---
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{workflow_name}'
---
# Uses {targetWorkflowPath} in body
```
**Step 02 uses:**
```yaml
---
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/plan.md'
---
# Uses {targetWorkflowPath} and {workflowPlanFile} in body
```
---
## Continuable Workflow Frontmatter
```yaml
---
stepsCompleted: ['step-01-init', 'step-02-gather', 'step-03-design']
lastStep: 'step-03-design'
lastContinued: '2025-01-02'
date: '2025-01-01'
---
```
**Step tracking:** Each step appends its NAME to `stepsCompleted`.
---
## Validation Checklist
For EVERY step frontmatter, verify:
- [ ] `name` present, kebab-case format
- [ ] `description` present
- [ ] Extract ALL variable names from frontmatter (between `---` markers)
- [ ] For EACH variable, search body: is `{variableName}` present?
- [ ] If variable NOT in body → ❌ VIOLATION, remove from frontmatter
- [ ] All step-to-step paths use `./filename.md` format (same folder)
- [ ] All parent-folder paths use `../filename.md` format
- [ ] All subfolder paths use `./subfolder/filename.md` format
- [ ] NO `{workflow_path}` variable exists
- [ ] External paths use `{project-root}` variable
- [ ] Module variables only used if workflow belongs to that module

View File

@@ -1,269 +0,0 @@
# Input Document Discovery Standards
**Purpose:** How workflows discover, validate, and select input documents from prior workflows or external sources.
---
## Discovery Patterns
### Pattern 1: Prior Workflow Output
**Use when:** Workflow is part of a sequence (e.g., PRD → Architecture → Epics)
**Example:** BMM module pipeline - each of these are a workflow with many steps:
```
brainstorming → research → brief → PRD → UX → architecture → epics → sprint-planning
```
Each workflow checks for output from prior workflow(s).
### Pattern 2: Module Folder Search
**Use when:** Documents stored in known project location
**Example:** Manager review workflow searches `{project_folder}/employee-notes/`
### Pattern 3: User-Specified Paths
**Use when:** User provides document locations
**Example:** Tax workflow asks for financial statement paths
### Pattern 4: Pattern-Based Discovery
**Use when:** Search by file naming pattern
**Example:** Find all `*-brief.md` files in `{planning_artifacts}/`
---
## Discovery Step Pattern
**When:** Step 1 (init) or Step 2 (discovery)
**Frontmatter:**
```yaml
---
# Input discovery variables
inputDocuments: [] # Populated with discovered docs
requiredInputCount: 1 # Minimum required to proceed
optionalInputCount: 0 # Additional docs user may provide
moduleInputFolder: '{planning_artifacts}' # Where to search
inputFilePatterns: # File patterns to match
- '*-prd.md'
- '*-ux.md'
---
```
**Discovery Logic:**
```markdown
## 1. Check for Known Prior Workflow Outputs
Search in order:
1. {module_output_folder}/[known-prior-workflow-output].md
2. {project_folder}/[standard-locations]/
3. {planning_artifacts}/
4. User-provided paths
## 2. Pattern-Based Search
If no known prior workflow, search by patterns:
- Look for files matching {inputFilePatterns}
- Search in {moduleInputFolder}
- Search in {project_folder}/docs/
## 3. Present Findings to User
"Found these documents that may be relevant:
- [1] prd-my-project.md (created 3 days ago)
- [2] ux-research.md (created 1 week ago)
- [3] competitor-analysis.md
Which would you like to use? You can select multiple, or provide additional paths."
## 4. Confirm and Load
User confirms selection → Load selected documents
Add to {inputDocuments} array in output frontmatter
```
---
## Required vs Optional Inputs
### Required Inputs
Workflow cannot proceed without these.
**Example:** Architecture workflow requires PRD
```markdown
## INPUT REQUIREMENT:
This workflow requires a Product Requirements Document to proceed.
Searching for PRD in:
- {bmm_creations_output_folder}/prd-*.md
- {planning_artifacts}/*-prd.md
- {project_folder}/docs/*-prd.md
[If found:]
"Found PRD: prd-my-project.md. Use this?"
[If not found:]
"No PRD found. This workflow requires a PRD to continue.
Please provide the path to your PRD, or run the PRD workflow first."
```
### Optional Inputs
Workflow can proceed without these, but user may include.
**Example:** UX workflow can use research docs if available
```markdown
## OPTIONAL INPUTS:
This workflow can incorporate research documents if available.
Searching for research in:
- {bmm_creations_output_folder}/research-*.md
- {project_folder}/research/
[If found:]
"Found these research documents:
- [1] user-interviews.md
- [2] competitive-analysis.md
Include any? (None required to proceed)"
```
---
## Module Workflow Chaining
**For modules with sequential workflows:**
**Frontmatter in workflow.md:**
```yaml
---
## INPUT FROM PRIOR WORKFLOFS
### Required Inputs:
- {module_output_folder}/prd-{project_name}.md
### Optional Inputs:
- {module_output_folder}/ux-research-{project_name}.md
- {project_folder}/docs/competitor-analysis.md
---
```
**Step 1 discovery:**
```markdown
## 1. Discover Prior Workflow Outputs
Check for required inputs:
1. Look for {module_output_folder}/prd-{project_name}.md
2. If missing → Error: "Please run PRD workflow first"
3. If found → Confirm with user
Check for optional inputs:
1. Search {module_output_folder}/ for research-*.md
2. Search {project_folder}/docs/ for *-analysis.md
3. Present findings to user
4. Add selections to {inputDocuments}
```
---
## Input Validation
After discovery, validate inputs:
```markdown
## INPUT VALIDATION:
For each discovered document:
1. Load and read frontmatter
2. Check workflowType field (should match expected)
3. Check completeness (stepsCompleted should be complete)
4. Check date (warn if document is very old)
[If validation fails:]
"Document prd-my-project.md appears incomplete.
Last step: step-06 (of 11)
Recommend completing PRD workflow before proceeding.
Proceed anyway? [Y]es [N]o"
```
---
## Multiple Input Selection
**When user can select multiple documents:**
```markdown
## Document Selection
"Found these relevant documents:
[1] prd-my-project.md (3 days ago) ✓ Recommended
[2] prd-v1.md (2 months ago) ⚠ Older version
[3] ux-research.md (1 week ago)
Enter numbers to include (comma-separated), or 'none' to skip:
> 1, 3
Selected: prd-my-project.md, ux-research.md"
```
**Track in frontmatter:**
```yaml
---
inputDocuments:
- path: '{output_folder}/prd-my-project.md'
type: 'prd'
source: 'prior-workflow'
selected: true
- path: '{output_folder}/ux-research.md'
type: 'research'
source: 'prior-workflow'
selected: true
---
```
---
## Search Path Variables
Common module variables for input discovery:
| Variable | Purpose |
| ------------------------ | -------------------------- |
| `{module_output_folder}` | Prior workflow outputs |
| `{planning_artifacts}` | General planning docs |
| `{project_folder}/docs` | Project documentation |
| `{product_knowledge}` | Product-specific knowledge |
| `{user_documents}` | User-provided location |
---
## Discovery Step Template
```markdown
---
name: 'step-01-init'
description: 'Initialize and discover input documents'
# Input Discovery
inputDocuments: []
requiredInputCount: 1
moduleInputFolder: '{module_output_folder}'
inputFilePatterns:
- '*-prd.md'
---
```
---
## Validation Checklist
For input discovery:
- [ ] Required inputs defined in step frontmatter
- [ ] Search paths defined (module variables or patterns)
- [ ] User confirmation before using documents
- [ ] Validation of document completeness
- [ ] Clear error messages when required inputs missing
- [ ] Support for multiple document selection
- [ ] Optional inputs clearly marked as optional

View File

@@ -1,50 +0,0 @@
# Intent vs Prescriptive Spectrum
**Principle:** Workflows lean toward **intent** (goals) not **prescription** (exact wording). The more intent-based, the more adaptive and creative the LLM can be.
---
## When to Use Each
### Intent-Based (Default)
**Use for:** Most workflows - creative, exploratory, collaborative
**Step instruction:** "Help the user understand X using multi-turn conversation. Probe to get good answers. Ask 1-2 questions at a time, not a laundry list."
**LLM figures out:** Exact wording, question order, how to respond
### Prescriptive (Exception)
**Use for:** Compliance, safety, legal, medical, regulated industries
**Step instruction:** "Say exactly: 'Do you currently experience fever, cough, or fatigue?' Wait for response. Then ask exactly: 'When did symptoms begin?'"
**LLM follows:** Exact script, specific order, no deviation
---
## Examples
### Intent-Based (Good for most)
```
"Guide the user through discovering their ideal nutrition plan.
Use multi-turn conversation. Ask 1-2 questions at a time.
Think about their responses before asking follow-ups.
Probe to understand preferences, restrictions, goals."
```
### Prescriptive (Only when required)
```
"Medical intake - ask exactly:
1. 'Do you have any of these symptoms: fever, cough, fatigue?'
2. 'When did symptoms begin?'
3. 'Have you traveled recently in the last 14 days?'
Follow sequence precisely. Do not deviate."
```
---
## Step Writing Tips
- **Default to intent** - give goals, not scripts
- **Use "think"** - "Think about their response before..."
- **Multi-turn** - "Use conversation, not interrogation"
- **Progressive** - "Ask 1-2 questions at a time"
- **Probe** - "Ask follow-ups to understand deeper"
Only use prescriptive when compliance/regulation requires it.

View File

@@ -1,167 +0,0 @@
# Menu Handling Standards
**CRITICAL:** Every menu MUST have a handler section. No exceptions.
---
## Reserved Letters
| Letter | Purpose | After Execution |
| ------ | -------------------- | ------------------------------ |
| **A** | Advanced Elicitation | Redisplay menu |
| **P** | Party Mode | Redisplay menu |
| **C** | Continue/Accept | Save → update → load next step |
| **X** | Exit/Cancel | End workflow |
**Custom letters** allowed (L/R/F/etc.) but don't conflict with reserved.
---
## Required Structure
### Section 1: Display
```markdown
### N. Present MENU OPTIONS
Display: "**Select:** [A] [action] [P] [action] [C] Continue"
```
### Section 2: Handler (MANDATORY)
```markdown
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user, then [Redisplay Menu Options](#n-present-menu-options)
```
### Section 3: Execution Rules
```markdown
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
```
---
## When To Include A/P
### DON'T Include A/P:
- Step 1 (init) - no content to refine yet
- Step 2 if only loading documents
- Validation sequences - auto-flow instead
- Simple data gathering
### DO Include A/P:
- Collaborative content creation
- User might want alternatives
- Quality gate before proceeding
- Creative exploration valuable
---
## Menu Patterns
### Pattern 1: Standard A/P/C
```markdown
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user, then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
```
### Pattern 2: C Only (No A/P)
```markdown
Display: "**Select:** [C] Continue"
#### Menu Handling Logic:
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user, then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
```
**Use for:** Step 1, document discovery, simple progression
### Pattern 3: Auto-Proceed (No Menu)
```markdown
Display: "**Proceeding to [next step]...**"
#### Menu Handling Logic:
- After [completion condition], immediately load, read entire file, then execute {nextStepFile}
#### EXECUTION RULES:
- This is an [auto-proceed reason] step with no user choices
- Proceed directly to next step after setup
```
**Use for:** Init steps, validation sequences
### Pattern 4: Branching
```markdown
Display: "**Select:** [L] Load Existing [N] Create New [C] Continue"
#### Menu Handling Logic:
- IF L: Load existing document, then load, read entire file, then execute {stepForExisting}
- IF N: Create new document, then load, read entire file, then execute {stepForNew}
- IF C: Save content to {outputFile}, update frontmatter, check {condition}, then load appropriate step
- IF Any other: help user, then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- Branching options load different steps based on user choice
```
---
## Critical Violations
### ❌ DON'T:
```markdown
# Missing Handler Section
Display: "**Select:** [C] Continue"
[NO HANDLER - CRITICAL ERROR!]
# A/P in Step 1 (doesn't make sense)
Display: "**Select:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
# Forgetting redisplay
- IF A: Execute {advancedElicitationTask}
# Should end with: ", and when finished redisplay the menu"
# Missing halt instruction
#### EXECUTION RULES:
- ONLY proceed to next step when user selects 'C'
# MISSING: "ALWAYS halt and wait for user input after presenting menu"
```
### ✅ DO:
- Handler section immediately follows Display
- "Halt and wait" in EXECUTION RULES
- Non-C options specify "redisplay menu"
- A/P only when appropriate for step type
---
## Validation Checklist
For every menu:
- [ ] Display section present
- [ ] Handler section immediately follows
- [ ] EXECUTION RULES section present
- [ ] "Halt and wait" instruction included
- [ ] A/P options appropriate for step type
- [ ] Non-C options redisplay menu
- [ ] C option: save → update → load next
- [ ] All file references use variables

View File

@@ -1,188 +0,0 @@
# Output Format Standards
**Purpose:** How workflows produce documents and handle step output.
---
## Golden Rule
**Every step MUST output to a document BEFORE loading the next step.**
Two patterns:
1. **Direct-to-Final:** Steps append to final document
2. **Plan-then-Build:** Steps append to plan → build step consumes plan
---
## Menu C Option Sequence
When user selects **C (Continue)**:
1. **Append/Write** to document (plan or final)
2. **Update frontmatter** (append this step to `stepsCompleted`)
3. **THEN** load next step
```markdown
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
```
---
## Output Patterns
### Pattern 1: Plan-then-Build
**Use when:** Design/plan before building/creating
```
Step 1 (init) → Creates plan.md from template
Step 2 (gather) → Appends requirements to plan.md
Step 3 (design) → Appends design decisions to plan.md
Step 4 (review) → Appends review/approval to plan.md
Step 5 (build) → READS plan.md, CREATES final artifacts
```
**Plan frontmatter:**
```yaml
workflowName: [name]
creationDate: [date]
stepsCompleted: ['step-01-init', 'step-02-gather']
status: PLANNING_COMPLETE
```
**Example:** Workflow creation - steps append to plan, build step generates files
### Pattern 2: Direct-to-Final
**Use when:** Each step contributes to final deliverable
```
Step 1 (init) → Creates final-doc.md from minimal template
Step 2 (section) → Appends Section 1
Step 3 (section) → Appends Section 2
Step 4 (section) → Appends Section 3
Step 5 (polish) → Optimizes entire document
```
**Example:** Meal prep nutrition plan - each step adds a section
---
## Four Template Types
### 1. Free-Form (RECOMMENDED)
**Characteristics:** Minimal template, progressive append, final polish
**Template:**
```yaml
---
stepsCompleted: []
lastStep: ''
date: ''
user_name: ''
---
# {{document_title}}
[Content appended progressively by workflow steps]
```
**Use when:** Most workflows - flexible, collaborative
### 2. Structured
**Characteristics:** Single template with placeholders, clear sections
**Template:**
```markdown
# {{title}}
## {{section_1}}
[Content to be filled]
## {{section_2}}
[Content to be filled]
```
**Use when:** Reports, proposals, documentation
### 3. Semi-Structured
**Characteristics:** Core required sections + optional additions
**Use when:** Forms, checklists, meeting minutes
### 4. Strict
**Characteristics:** Multiple templates, exact field definitions
**Use when:** Rarely - compliance, legal, regulated
---
## Template Syntax
```markdown
{{variable}} # Handlebars style (preferred)
[variable] # Bracket style (also supported)
```
**Keep templates lean** - structure only, not content.
---
## Step-to-Output Mapping
Steps should be in ORDER of document appearance:
```
Step 1: Init (creates doc)
Step 2: → ## Section 1
Step 3: → ## Section 2
Step 4: → ## Section 3
Step 5: → ## Section 4
Step 6: Polish (optimizes entire doc)
```
**Critical:** Use ## Level 2 headers for main sections - allows document splitting if needed.
---
## Final Polish Step
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 ## Level 2 headers
5. Improves transitions
6. Keeps general order but optimizes readability
---
## Output File Patterns
```yaml
# Single output
outputFile: '{output_folder}/document-{project_name}.md'
# Time-stamped
outputFile: '{output_folder}/document-{project_name}-{timestamp}.md'
# User-specific
outputFile: '{output_folder}/document-{user_name}-{project_name}.md'
```
---
## Validation Checklist
For workflow output design:
- [ ] Output format type selected
- [ ] Template created if needed
- [ ] Steps ordered to match document structure
- [ ] Each step outputs to document (except init/final)
- [ ] Level 2 headers for main sections
- [ ] Final polish step for free-form workflows
- [ ] Frontmatter tracking for continuable workflows
- [ ] Templates use consistent placeholder syntax

View File

@@ -1,235 +0,0 @@
# Step File Rules
**Purpose:** Quick reference for step file structure and compliance. See linked data files for detailed standards.
---
## File Size Limits
| Metric | Value |
| ----------- | -------- |
| Recommended | < 200 lines |
| Absolute Maximum | 250 lines |
**If exceeded:** Split into multiple steps or extract content to `/data/` files.
---
## Required Step Structure
```markdown
---
name: 'step-[N]-[name]'
description: '[what this step does]'
# File References (ONLY variables used in this step!)
[file references in {variable} format]
---
# Step [N]: [Name]
## STEP GOAL:
[Single sentence: what this step accomplishes]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a [specific role]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [expertise], user brings [theirs]
- ✅ Together we produce something better
### Step-Specific Rules:
- 🎯 Focus only on [specific task]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage]
## EXECUTION PROTOCOLS:
- 🎯 [Protocol 1]
- 💾 [Protocol 2 - save/update]
- 📖 [Protocol 3 - tracking]
## CONTEXT BOUNDARIES:
- Available context: [what's available]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [what this depends on]
## Sequence of Instructions:
### 1. [Action]
[Instructions]
### N. Present MENU OPTIONS
[Menu section - see menu-handling-standards.md]
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS:
[Success criteria]
### ❌ SYSTEM FAILURE:
[Failure criteria]
**Master Rule:** Skipping steps is FORBIDDEN.
```
---
## Critical Rules (Quick Reference)
### Frontmatter
- Only variables USED in the step body
- All file references use `{variable}` format
- Relative paths within workflow folder
- See: `frontmatter-standards.md`
### Menus
- Handler section MUST follow display
- "Halt and wait" in execution rules
- A/P options only when appropriate
- Non-C options redisplay menu
- See: `menu-handling-standards.md`
### Progressive Disclosure
- Only load next step when user selects 'C'
- Read entire step file before execution
- Don't create mental todos from future steps
### Continuable Workflows
- Append step number to `stepsCompleted`
- Don't hardcode full array
- See: `workflow-type-criteria.md`
---
## Data Files Reference
| File | Purpose |
| ----------------------- | --------------------------------------------- |
| `frontmatter-standards.md` | Variables, paths, frontmatter rules |
| `menu-handling-standards.md` | Menu patterns, handler requirements |
| `output-format-standards.md` | Document output, template types |
| `workflow-type-criteria.md` | Continuable, module, tri-modal decisions |
| `step-type-patterns.md` | Templates for init/middle/final/branch steps |
| `trimodal-workflow-structure.md` | Create/Edit/Validate folder structure |
---
## Step Type Reference
| Step Type | Template/Reference |
| ------------------- | ------------------------------------------- |
| Init (non-continuable) | Auto-proceed, no continuation logic |
| Init (continuable) | `step-01-init-continuable-template.md` |
| Continuation (01b) | `step-1b-template.md` |
| Middle (standard) | A/P/C menu, collaborative content |
| Middle (simple) | C only menu, no A/P |
| Branch/Conditional | Custom menu options, routing to different steps |
| Validation sequence | Auto-proceed through checks |
| Final | No next step, completion message |
See: `step-type-patterns.md`
---
## Frontmatter Variables
### Standard (Always Available)
- `{project-root}`
- `{project_name}`
- `{output_folder}`
- `{user_name}`
- `{communication_language}`
- `{document_output_language}`
### Module-Specific (e.g., BMB)
- `{bmb_creations_output_folder}`
### User-Defined
- New variables can be defined in steps for future steps
See: `frontmatter-standards.md`
---
## Validation Checklist
For every step file:
- [ ] File < 200 lines (250 max)
- [ ] `name` and `description` in frontmatter
- [ ] All frontmatter variables are used
- [ ] File references use `{variable}` format
- [ ] Relative paths within workflow folder
- [ ] Handler section follows menu display
- [ ] "Halt and wait" in execution rules
- [ ] A/P options appropriate for step type
- [ ] C option saves and loads next step
- [ ] Non-C options redisplay menu
- [ ] StepsCompleted appended (if continuable)
- [ ] Success/failure metrics present
---
## Quick Menu Reference
```markdown
### N. Present MENU OPTIONS
Display: "**Select:** [A] [action A] [P] [action P] [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
```
---
## Common Violations
| Violation | Fix |
| ------------------------------------- | ---------------------------------------------- |
| Unused variable in frontmatter | Remove unused variables |
| Hardcoded file path | Use `{variable}` format |
| A/P menu in step 1 | Remove A/P (inappropriate for init) |
| Missing handler section | Add handler after menu display |
| No "halt and wait" instruction | Add to EXECUTION RULES |
| Hardcoded `stepsCompleted: [1,2,3]` | Append: "update stepsCompleted to add this step" |
| File > 250 lines | Split into multiple steps or extract to /data/ |
| Absolute path for same-folder ref | Use relative path or `{workflow_path}` |
---
## When to Extract to Data Files
Extract step content to `/data/` when:
- Step file exceeds 200 lines
- Content is reference material
- Content is reused across steps
- Content is domain-specific (examples, patterns)
**Data file types:**
- `.md` - Reference documentation
- `.csv` - Structured data for lookup
- `examples/` - Reference implementations
---
## Tri-Modal Workflow Note
For Create/Edit/Validate workflows:
- Each mode has its own `steps-c/`, `steps-e/`, `steps-v/` folder
- NO shared step files (`s-*.md`) between modes
- All modes share `/data/` folder
- This prevents confusion and routing errors
See: `trimodal-workflow-structure.md`

View File

@@ -1,311 +0,0 @@
# Step Type Patterns
**Purpose:** Templates for different step types.
---
## Core Step Structure
All steps share this skeleton:
```markdown
---
name: 'step-[N]-[name]'
description: '[what it does]'
[file references - relative path and only if used in this steps file]
---
# Step [N]: [Name]
## STEP GOAL:
[Single sentence goal]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read complete step file before action
- 🔄 CRITICAL: When loading next with 'C', read entire file
- 📋 YOU ARE A FACILITATOR, not content generator
### Role Reinforcement:
- ✅ You are [specific role]
- ✅ Collaborative dialogue, not command-response
- ✅ You bring [expertise], user brings [theirs]
### Step-Specific Rules:
- 🎯 Focus only on [specific task]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage]
## EXECUTION PROTOCOLS:
- 🎯 Follow the MANDATORY SEQUENCE exactly
- 💾 [Additional protocol]
- 📖 [Additional protocol]
## CONTEXT BOUNDARIES:
- Available context: [what's available]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [what this depends on]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. [First action]
[Instructions]
### N. Present MENU OPTIONS
[Menu section - see menu-handling-standards.md]
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS: [criteria]
### ❌ SYSTEM FAILURE: [criteria]
**Master Rule:** Skipping steps is FORBIDDEN.
```
---
## Step Types
### 1. Init Step (Non-Continuable)
**Use:** Single-session workflow
**Frontmatter:**
```yaml
---
name: 'step-01-init'
description: 'Initialize [workflow]'
nextStepFile: './step-02-[name].md'
outputFile: '{output_folder}/[output].md'
templateFile: '../templates/[template].md'
---
```
**Characteristics:**
- No continuation detection
- Auto-proceeds to step 2
- No A/P menu
- Creates output from template
**Menu:** Auto-proceed (no user choice)
### 2. Init Step (Continuable)
**Use:** Multi-session workflow
**Frontmatter:** Add `continueFile` reference
```yaml
continueFile: './step-01b-continue.md'
```
**Logic:**
```markdown
## 1. Check for Existing Workflow
- Look for {outputFile}
- If exists AND has stepsCompleted → STOP, load {continueFile}
- If not exists → continue to setup
```
**Reference:** `step-01-init-continuable-template.md`
### 3. Continuation Step (01b)
**Use:** Paired with continuable init
**Frontmatter:**
```yaml
---
name: 'step-01b-continue'
description: 'Handle workflow continuation'
outputFile: '{output_folder}/[output].md'
workflowFile: '{workflow_path}/workflow.md'
---
```
**Logic:**
1. Read `stepsCompleted` array from output
2. Read last completed step file to find nextStep
3. Welcome user back
4. Route to appropriate step
**Reference:** `step-1b-template.md`
### 4. Middle Step (Standard)
**Use:** Collaborative content generation
**Frontmatter:**
```yaml
---
name: 'step-[N]-[name]'
nextStepFile: './step-[N+1]-[name].md'
outputFile: '{output_folder}/[output].md'
advancedElicitationTask: '{project-root}/.../advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/.../party-mode/workflow.md'
---
```
**Menu:** A/P/C pattern
### 5. Middle Step (Simple)
**Use:** Data gathering, no refinement needed
**Menu:** C only (no A/P)
### 6. Branch Step
**Use:** User choice determines next path
**Frontmatter:**
```yaml
nextStepFile: './step-[default].md'
altStepFile: './step-[alternate].md'
```
**Menu:** Custom letters (L/R/etc.) with branching logic
### 7. Validation Sequence Step
**Use:** Multiple checks without user interruption
**Menu:** Auto-proceed to next validation
**Pattern:**
```markdown
## 1. Perform validation check
[Check logic]
## 2. Write results to {outputFile}
Append findings
## 3. Proceed to next validation
Display: "**Proceeding to next check...**"
→ Immediately load {nextValidationStep}
```
### 8. Init Step (With Input Discovery)
**Use:** Workflow that requires documents from prior workflows or external sources
**Frontmatter:**
```yaml
---
name: 'step-01-init'
description: 'Initialize and discover input documents'
inputDocuments: []
requiredInputCount: 1
moduleInputFolder: '{module_output_folder}'
inputFilePatterns:
- '*-prd.md'
- '*-ux.md'
---
```
**Characteristics:**
- Discovers documents from prior workflows
- Searches by folder, pattern, or user-provided paths
- Validates inputs are complete
- User confirms which documents to use
- Auto-proceeds when required inputs found
**Logic:**
```markdown
## 1. Discover Required Inputs
Search {moduleInputFolder} for {inputFilePatterns}
Search {project_folder}/docs/ for {inputFilePatterns}
## 2. Present Findings
"Found these documents:
[1] prd-my-project.md (3 days ago) ✓
[2] ux-research.md (1 week ago)
Which would you like to use?"
## 3. Validate and Load
Check workflowType, stepsCompleted, date
Load selected documents
Add to {inputDocuments} array
## 4. Auto-Proceed
If all required inputs found → proceed to step 2
If missing → Error with guidance
```
**Reference:** `input-discovery-standards.md`
### 9. Final Polish Step
**Use:** Optimizes document built section-by-section
**Frontmatter:**
```yaml
---
name: 'step-[N]-polish'
description: 'Optimize and finalize document'
outputFile: '{output_folder}/[document].md'
---
```
**Characteristics:**
- Loads entire document
- Reviews for flow and coherence
- Reduces duplication
- Ensures proper ## Level 2 headers
- Improves transitions
- Keeps general order but optimizes readability
**Logic:**
```markdown
## 1. Load Complete Document
Read {outputFile} entirely
## 2. Document Optimization
Review entire document for:
1. Flow and coherence
2. Duplication (remove while preserving essential info)
3. Proper ## Level 2 section headers
4. Smooth transitions between sections
5. Overall readability
## 3. Optimize
Make improvements while maintaining:
- General order of sections
- Essential information
- User's voice and intent
## 4. Final Output
Save optimized document
Mark workflow complete
```
**Use for:** Free-form output workflows (most document-producing workflows)
### 10. Final Step
**Use:** Last step, completion
**Frontmatter:** No `nextStepFile`
**Logic:**
- Update frontmatter to mark workflow complete
- Provide final summary
- No next step
---
## Step Size Guidelines
| Type | Recommended | Maximum |
| --------------------- | ----------- | ------- |
| Init | < 100 | 150 |
| Init (with discovery) | < 150 | 200 |
| Continuation | < 150 | 200 |
| Middle (simple) | < 150 | 200 |
| Middle (complex) | < 200 | 250 |
| Branch | < 150 | 200 |
| Validation sequence | < 100 | 150 |
| Final polish | < 150 | 200 |
| Final | < 150 | 200 |
**If exceeded:** Split into multiple steps or extract to `/data/` files.

View File

@@ -1,386 +0,0 @@
# Subprocess Optimization Patterns
**Purpose:** Context-saving and performance patterns for subprocess/subagent usage in BMAD workflows.
---
## Golden Rules
1. **Subprocess when operations benefit from parallelization or context isolation**
2. **Return ONLY findings to parent, not full file contents** (massive context savings)
3. **Always provide graceful fallback** for LLMs without subprocess capability
4. **Match pattern to operation type** - grep/regex, deep analysis, or data operations
---
## The Three Patterns
### Pattern 1: Single Subprocess for Grep/Regex Across Many Files
**Use when:** You can run one command across many files and just need matches/failures
**Context savings:** Massive - returns only matching lines, not full file contents
**Template:**
```markdown
**Launch a subprocess that:**
1. Runs grep/regex across all target files
2. Extracts only matching lines or failures
3. Returns structured findings to parent
```bash
# Example: Find hardcoded paths across all files
for file in steps-c/*.md; do
grep -n "{project-root}/" "$file" || echo "No matches in: $file"
done
```
**Subprocess returns to parent:**
```json
{
"violations": [
{"file": "step-02.md", "line": 45, "match": "{project-root}/_bmad/bmb/..."}
],
"summary": {"total_files_checked": 10, "violations_found": 3}
}
```
**❌ BAD - Loads all files into parent:**
```markdown
"For EACH file, load the file and search for {project-root}/"
# Parent context gets 10 full files × 200 lines = 2000 lines loaded
```
**✅ GOOD - Single subprocess returns only matches:**
```markdown
"Launch a subprocess to grep all files for {project-root}/, return only matches"
# Parent context gets only matching lines = ~50 lines returned
```
---
### Pattern 2: Separate Subprocess Per File for Deep Analysis
**Use when:** You need to read and understand each file's prose, logic, quality, or flow
**Context savings:** High - each subprocess returns analysis, not full content
**Template:**
```markdown
**DO NOT BE LAZY - For EACH file, launch a subprocess that:**
1. Loads that file
2. Reads and analyzes content deeply (prose, logic, flow, quality)
3. Returns structured analysis findings to parent for aggregation
**Subprocess returns to parent:**
```json
{
"file": "step-03-inquiry.md",
"analysis": {
"instruction_style": "Intent-based ✅",
"collaborative_quality": "Good - asks 1-2 questions at a time",
"issues": ["Line 67: Laundry list of 7 questions detected"]
},
"optimization_opportunities": ["Could use Pattern 1 for menu validation checks"]
}
```
**Example use cases:**
- Instruction style validation (read prose, classify intent vs prescriptive)
- Collaborative quality assessment (analyze question patterns)
- Frontmatter compliance (check each variable is used)
- Step type validation (verify step follows its type pattern)
**❌ BAD - Parent loads all files:**
```markdown
"Load every step file and analyze its instruction style"
# Parent context: 10 files × 200 lines = 2000 lines
```
**✅ GOOD - Per-file subprocess returns analysis:**
```markdown
"DO NOT BE LAZY - For EACH step file, launch a subprocess to analyze instruction style, return findings"
# Parent context: 10 structured analysis objects = ~200 lines
```
---
### Pattern 3: Subprocess for Data File Operations
**Use when:** Loading reference data, finding fuzzy/best matches, summarizing key findings from large datasets
**Context savings:** Massive - returns only matching rows or summaries, not entire data file
**Template:**
```markdown
**Launch a subprocess that:**
1. Loads the data file (reference docs, CSV, knowledge base)
2. Performs lookup, matching, or summarization
3. Returns ONLY relevant rows or key findings to parent
**Subprocess returns to parent:**
```json
{
"matches": [
{"row": 42, "rule": "Frontmatter variables must be used in body", "applies": true},
{"row": 87, "rule": "Relative paths for same-folder refs", "applies": true}
],
"summary": {"total_rules": 150, "applicable_rules": 2}
}
```
**Example use cases:**
- **Reference rules lookup**: Load 500-line standards file, return only applicable rules
- **CSV fuzzy matching**: Load product database, find best matching category
- **Document summarization**: Review 10 documents, extract only key requirements
- **Knowledge base search**: Search large knowledge base, return only top matches
**❌ BAD - Parent loads entire data file:**
```markdown
"Load {dataFile} with 500 rules and find applicable ones"
# Parent context: All 500 rules loaded (5000+ lines)
```
**✅ GOOD - Subprocess returns only matches:**
```markdown
"Launch subprocess to load {dataFile}, find applicable rules, return only those"
# Parent context: Only 2 applicable rules returned (~50 lines)
```
**Advanced example - Document review:**
```markdown
**Review 10 requirement documents to extract key details:**
"DO NOT BE LAZY - For EACH document, launch a subprocess that:
1. Loads that document
2. Extracts key requirements, decisions, constraints
3. Returns structured summary to parent
**Subprocess returns:**
```json
{
"document": "prd-requirements.md",
"key_findings": {
"requirements": ["User auth", "Data export", "API integration"],
"decisions": ["Use JWT", "PostgreSQL", "REST API"],
"constraints": ["HIPAA compliant", "Max 100ms response"]
}
}
```
# Parent gets summaries, not 10 full documents
```
---
## Pattern 4: Parallel Execution Opportunities
**Use when:** Multiple independent operations could run simultaneously
**Performance gain:** Reduced total execution time via parallelization
**Template:**
```markdown
**Launch subprocesses in parallel that:**
1. Each subprocess handles one independent operation
2. All subprocesses run simultaneously
3. Parent aggregates results when all complete
**Example:**
```markdown
# Instead of sequential (3× time):
"Check frontmatter, then check menu, then check step types"
# Use parallel (1× time):
"Launch 3 subprocesses in parallel:
- Subprocess 1: Check frontmatter compliance
- Subprocess 2: Check menu compliance
- Subprocess 3: Check step type compliance
Aggregate all findings"
```
---
## Graceful Fallback Pattern
**CRITICAL:** Always ensure LLMs without subprocess capability can still execute
**Universal Rule:**
```markdown
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
```
**Implementation:**
```markdown
### Step-Specific Rules:
- 🎯 Use subprocess optimization when available - [pattern description]
- 💬 If subprocess unavailable, perform operations in main thread
### Execution:
- LLMs with subprocess: Launch subprocess, aggregate findings
- LLMs without subprocess: Perform same operations sequentially in main context
```
---
## Return Pattern for Subprocesses
**Subprocesses must either:**
**Option A: Update report directly**
```markdown
"Subprocess loads validation report, appends findings, saves"
# Parent doesn't need to aggregate
```
**Option B: Return structured findings to parent**
```markdown
"Subprocess returns JSON findings to parent for aggregation"
# Parent compiles all subprocess results into report
```
**✅ GOOD - Structured return:**
```json
{
"file": "step-02.md",
"violations": ["..."],
"opportunities": ["..."],
"priority": "HIGH"
}
```
**❌ BAD - Returns full content:**
```markdown
"Subprocess loads file and returns full content to parent"
# Defeats purpose - parent gets full context anyway
```
---
## When to Use Each Pattern
| Pattern | Use When | Context Savings | Example |
| -------- | -------- | --------------- | ------- |
| **Pattern 1: Single subprocess for grep/regex** | Finding patterns across many files | Massive (1000:1 ratio) | Validate frontmatter across all steps |
| **Pattern 2: Per-file subprocess for deep analysis** | Understanding prose, logic, quality | High (10:1 ratio) | Instruction style validation |
| **Pattern 3: Data file operations** | Loading reference data, matching, summarizing | Massive (100:1 ratio) | Find applicable rules from standards |
| **Pattern 4: Parallel execution** | Independent operations that can run simultaneously | Performance gain | Frontmatter + Menu + Step type checks |
---
## Step File Integration
**How to add subprocess patterns to step files:**
### 1. Universal Rule (add to all steps)
```markdown
### Universal Rules:
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
```
### 2. Step-Specific Rules (pattern-specific)
```markdown
### Step-Specific Rules:
- 🎯 [Brief: which pattern applies]
- 💬 Subprocess must either update report OR return findings to parent
- 🚫 DO NOT BE LAZY - [specific "do not be lazy" guidance if applicable]
```
### 3. Command Sequence (detailed pattern)
```markdown
### 1. [Operation Name]
**[Appropriate subprocess directive]:**
For [Pattern 1 - grep/regex]:
"Launch a subprocess that runs [command] across all files, returns [results]"
For [Pattern 2 - per-file analysis]:
"DO NOT BE LAZY - For EACH file, launch a subprocess that [analyzes], returns [findings]"
For [Pattern 3 - data ops]:
"Launch a subprocess that loads [data file], performs [operation], returns [results]"
```
---
## Subprocess Loading Reference Data (Meta-Pattern!)
**Context-saving optimization:**
When a step needs to understand subprocess patterns with examples, load this reference file in a subprocess:
```markdown
### Step-Specific Rules:
- 🎯 Analyze subprocess optimization opportunities - use subprocess to load reference patterns for detailed examples
- 💬 Subprocess loads {subprocessPatterns} to understand patterns deeply, returns specific opportunities
- 🚫 If subprocess unavailable: Load {subprocessPatterns} in main context
**Execution:**
- With subprocess: Launch subprocess to load this file, understand patterns, identify opportunities
- Without subprocess: Load this file in main context (larger context but still functional)
```
**This step file (step-08b) demonstrates this pattern!**
---
## Validation Checklist
For subprocess optimization in step files:
- [ ] Universal fallback rule present
- [ ] Step-specific rules mention which pattern applies
- [ ] Command sequence uses appropriate subprocess directive
- [ ] "DO NOT BE LAZY" language included for Pattern 2
- [ ] Return pattern specified (update report OR return to parent)
- [ ] Graceful fallback addressed
- [ ] Context savings estimated (if applicable)
- [ ] Pattern matches operation type (grep/regex, deep analysis, or data ops)
---
## Anti-Patterns to Avoid
### ❌ Loading full files into parent
```markdown
"For EACH file, load the file, analyze it, and add to report"
# Defeats purpose - parent gets full context
```
### ❌ Subprocess returns raw content
```markdown
"Subprocess loads file and returns content to parent"
# Parent gets full content anyway
```
### ❌ No graceful fallback
```markdown
"Use subprocess to [operation]"
# LLMs without subprocess cannot proceed
```
### ❌ Wrong pattern for operation
```markdown
"Launch a subprocess per file to grep for pattern"
# Should use Pattern 1 (single subprocess for all files)
```
### ❌ Missing return specification
```markdown
"Launch a subprocess to analyze files"
# Unclear what subprocess returns to parent
```
---
## See Also
- `step-file-rules.md` - When to extract content to data files
- `step-08b-subprocess-optimization.md` - Validation step that identifies optimization opportunities
- `../steps-v/step-02b-path-violations.md` - Example of Pattern 1 (grep across files)
- `../steps-v/step-08b-subprocess-optimization.md` - Example of Pattern 2 (per-file analysis)

View File

@@ -1,209 +0,0 @@
# Tri-Modal Workflow Structure
**Purpose:** The golden rule standard for complex critical workflows that require create, validate, and edit capabilities.
---
## The Golden Rule
**For complex critical workflows: Implement tri-modal structure (create/validate/edit) with cross-mode integration.**
This pattern ensures:
- Quality through standalone validation
- Maintainability through dedicated edit mode
- Flexibility through conversion paths for non-compliant input
**Cross-mode integration patterns:**
- Create → Validation (handoff after build)
- Edit → Validation (verify changes)
- Edit → Create/conversion (for non-compliant input)
- Validation → Edit (fix issues found)
- All modes run standalone via workflow.md routing
---
## Directory Structure
```
workflow-name/
├── workflow.md # Entry point with mode routing
├── data/ # SHARED standards and reference
│ ├── [domain]-standards.md
│ └── [domain]-patterns.md
├── steps-c/ # Create (self-contained)
│ ├── step-00-conversion.md # Entry for non-compliant input
│ ├── step-01-init.md
│ └── step-N-complete.md
├── steps-e/ # Edit (self-contained)
│ ├── step-01-assess.md # Checks compliance, routes if needed
│ └── step-N-complete.md
└── steps-v/ # Validate (self-contained, runs standalone)
└── step-01-validate.md
```
---
## Mode Responsibilities
### Create Mode (steps-c/)
**Primary:** Build new entities from scratch
**Secondary:** Convert non-compliant input via step-00-conversion
**Key patterns:**
- step-00-conversion: Loads non-compliant input, extracts essence, creates plan with `conversionFrom` metadata
- Final step routes to validation (optional but recommended)
- Confirmation step checks `conversionFrom` to verify coverage vs new workflow
### Edit Mode (steps-e/)
**Primary:** Modify existing compliant entities
**Secondary:** Detect non-compliance and route to conversion
**Key patterns:**
- step-01-assess: Checks compliance first
- Non-compliant → Offer route to step-00-conversion (not step-01-discovery)
- Post-edit → Offer validation (reuse validation workflow)
- During edits → Check standards, offer to fix non-compliance
### Validate Mode (steps-v/)
**Primary:** Standalone validation against standards
**Secondary:** Generates actionable reports
**Key patterns:**
- Runs standalone (invoked via -v flag or direct call)
- Auto-proceeds through all checks
- Generates report with issue severity
- Report consumed by edit mode for fixes
---
## workflow.md Routing Pattern
```yaml
## INITIALIZATION SEQUENCE
### 1. Mode Determination
**Check invocation:**
- "create" / -c → mode = create
- "validate" / -v → mode = validate
- "edit" / -e → mode = edit
**If create mode:** Ask "From scratch or convert existing?"
- From scratch → steps-c/step-01-init.md
- Convert → steps-c/step-00-conversion.md
**If unclear:** Ask user to select mode
### 2. Route to First Step
**IF mode == create:**
Route to appropriate create entry (init or conversion)
**IF mode == validate:**
Prompt for path → load steps-v/step-01-validate.md
**IF mode == edit:**
Prompt for path → load steps-e/step-01-assess.md
```
**Critical:** workflow.md is lean. No step listings. Only routing logic.
---
## Cross-Mode Integration Points
### 1. Edit → Create (Non-Compliant Detection)
**In edit step-01-assess:**
```yaml
Check workflow compliance:
- Compliant → Continue to edit steps
- Non-compliant → Offer conversion
- IF user accepts: Load steps-c/step-00-conversion.md with sourceWorkflowPath
```
### 2. Create/Edit → Validation
**Both create and edit can invoke validation:**
```yaml
# In create final step or edit post-edit step
Offer: "Run validation?"
- IF yes: Load ../steps-v/step-01-validate.md
- Validation runs standalone, returns report
- Resume create/edit with validation results
```
### 3. Validation → Edit
**After validation generates report:**
```yaml
# User can invoke edit mode with report as input
"Fix issues found?"
- IF yes: Load steps-e/step-01-assess.md with validationReport path
```
### 4. Conversion Coverage Tracking
**In create step-10-confirmation:**
```yaml
Check workflowPlan metadata:
- IF conversionFrom exists:
- Load original workflow
- Compare each step/instruction
- Report coverage percentage
- ELSE (new workflow):
- Validate all plan requirements implemented
```
---
## When to Use Tri-Modal
**Use Tri-Modal for:**
- Complex workflows requiring quality assurance
- Workflows that will be maintained over time
- Workflows where non-compliant input may be offered
- Critical workflows where standards compliance matters
**Use Create-Only for:**
- Simple one-off workflows
- Experimental workflows
- Workflows unlikely to need editing or validation
---
## Frontmatter Standards for Cross-Mode References
**Never inline file paths. Always use frontmatter variables:**
```yaml
---
# Create mode step calling validation
validationWorkflow: '../steps-v/step-01-validate.md'
---
# Edit mode step routing to conversion
conversionStep: '../steps-c/step-00-conversion.md'
---
# Create conversion step receiving from edit
sourceWorkflowPath: '{targetWorkflowPath}' # Passed from edit
---
```
---
## Validation Checklist
For tri-modal workflow design:
- [ ] Each mode has self-contained steps folder
- [ ] No shared step files (shared data in /data/ only)
- [ ] workflow.md has lean routing (no step listings)
- [ ] Edit mode checks compliance, routes to conversion if needed
- [ ] Create mode has step-00-conversion for non-compliant input
- [ ] Create/Edit can invoke validation workflow
- [ ] Validation runs standalone and generates reports
- [ ] Confirmation step checks `conversionFrom` metadata

View File

@@ -1,271 +0,0 @@
# Workflow Chaining Standards
**Purpose:** How workflows connect in sequences within modules, passing outputs as inputs to next workflows.
---
## Module Workflow Pipeline
**Example:** BMM Module - Idea to Implementation
```
brainstorming → research → brief → PRD → UX → architecture → epics → sprint-planning
implement-story → review → repeat
```
Each workflow:
1. Checks for required inputs from prior workflows
2. Validates inputs are complete
3. Produces output for next workflow
4. Recommends next workflow in sequence
---
## Input/Output Contract
### Output Contract (What Each Workflow Produces)
**Every workflow should:**
1. Create output document with predictable filename
2. Include `workflowType` in frontmatter for identification
3. Mark `stepsCompleted: [all steps]` when complete
4. Store in known location (`{module_output_folder}`)
**Example frontmatter:**
```yaml
---
workflowType: 'prd'
stepsCompleted: ['step-01-init', ..., 'step-11-complete']
project_name: 'my-project'
date: '2025-01-02'
nextWorkflow: 'create-ux'
previousWorkflow: 'create-brief'
---
```
### Input Contract (What Each Workflow Consumes)
**Every workflow should:**
1. Define required inputs in Step 1
2. Search in `{module_output_folder}` for prior outputs
3. Validate inputs are complete
4. Allow user to select from discovered documents
---
## Step 1: Input Discovery Pattern
```markdown
## 1. Discover Required Inputs
### Required Inputs:
- {module_output_folder}/prd-{project_name}.md
### Search:
1. Look for prd-{project_name}.md in {module_output_folder}
2. If found → validate completeness
3. If missing or incomplete → error with guidance
"Error: This workflow requires a completed PRD.
Expected location: {module_output_folder}/prd-{project_name}.md
To fix: Run the PRD workflow first, or provide the path to your PRD."
```
---
## Final Step: Next Workflow Recommendation
```markdown
## Next Steps
Based on your completed [workflow], recommended next workflows:
1. **[next-workflow-name]** - [why it's next]
2. **[alternative-workflow]** - [when to use this instead]
Would you like to:
- Run [next-workflow-name] now?
- Run a different workflow?
- Exit for now?
```
**Update output frontmatter:**
```yaml
nextWorkflow: 'create-ux'
nextWorkflowRecommended: true
```
---
## Cross-Workflow Status Tracking
**Optional:** Module can maintain `workflow-status.yaml`:
```yaml
---
current_workflow: 'create-prd'
completed_workflows:
- brainstorming
- research
- brief
pending_workflows:
- create-ux
- create-architecture
- create-epics
- sprint-planning
outputs:
brief: '{module_output_folder}/brief-{project_name}.md'
prd: '{module_output_folder}/prd-{project_name}.md'
---
```
**Workflow checks this file to:**
- Validate sequence (don't run UX before PRD)
- Find output locations
- Track overall progress
---
## Branching Workflows
**Some workflows have multiple valid next steps:**
```markdown
## Next Steps
Based on your project type:
**For software projects:**
- create-architecture - Technical architecture
- create-epics - Break down into epics
**For data projects:**
- data-modeling - Database schema design
- etl-pipeline - Data pipeline design
Which workflow would you like to run next?
```
---
## Required vs Optional Sequences
### Required Sequence
**PRD must come before Architecture:**
```yaml
# In architecture workflow.md
## PREREQUISITE:
This workflow requires a completed PRD.
## INITIALIZATION:
IF prd-{project_name}.md exists AND is complete:
→ Proceed with architecture workflow
ELSE:
→ Error: "Please complete PRD workflow first"
```
### Optional Sequence
**UX research helps Architecture but isn't required:**
```yaml
# In architecture workflow.md
## OPTIONAL INPUTS:
UX research documents can inform technical decisions.
IF ux-research-{project_name}.md exists:
→ "Found UX research. Include findings in architecture design?"
ELSE:
→ "No UX research found. Continuing without it."
```
---
## Filename Conventions for Chaining
**Standard pattern:** `{workflow-name}-{project-name}.md`
| Workflow | Output Filename Pattern |
|----------| ---------------------- |
| brainstorming | `brainstorming-{project_name}.md` |
| brief | `brief-{project_name}.md` |
| PRD | `prd-{project_name}.md` |
| UX | `ux-design-{project_name}.md` |
| architecture | `architecture-{project_name}.md` |
| epics | `epics-{project_name}.md` |
**Predictable filenames enable:**
- Automatic discovery
- Clear dependencies
- Easy validation
---
## Module-Level Workflow Registry
**Module can define `workflows.yaml`:**
```yaml
---
module: 'bmm'
workflows:
brainstorming:
output: 'brainstorming-{project_name}.md'
next: ['research']
research:
output: 'research-{project_name}.md'
next: ['brief']
brief:
output: 'brief-{project_name}.md'
next: ['prd']
prd:
output: 'prd-{project_name}.md'
next: ['create-ux', 'create-architecture']
create-ux:
output: 'ux-design-{project_name}.md'
next: ['create-architecture']
create-architecture:
output: 'architecture-{project_name}.md'
next: ['create-epics']
create-epics:
output: 'epics-{project_name}.md'
next: ['sprint-planning']
---
```
**Workflows read this to:**
- Know what outputs exist
- Know valid next steps
- Know output filenames
---
## Cross-Module Dependencies
**Workflows can depend on outputs from other modules:**
```yaml
# In BMGD narrative workflow
## INPUT REQUIREMENTS:
### Required:
- {bmm_output_folder}/prd-{project_name}.md
- {bmm_output_folder}/architecture-{project_name}.md
### From BMGD:
- {bmgd_output_folder}/gdd-{project_name}.md (Game Design Document)
```
---
## Validation Checklist
For workflow chaining:
- [ ] Output filename follows convention
- [ ] Frontmatter includes `workflowType`
- [ ] `stepsCompleted` marked complete when done
- [ ] Required inputs clearly defined
- [ ] Input validation with helpful errors
- [ ] Next workflow recommendations in final step
- [ ] Module registry (if using sequence tracking)

View File

@@ -1,276 +0,0 @@
# Novel Workflow Examples
**Purpose:** Illustrative examples of workflows across diverse domains to demonstrate the range of what users can create.
---
## Understanding Workflow Structure
**Each arrow (→) in the "Flow" column represents a potential step file.**
```
Flow: Discovery → Assessment → Strategy → Shopping List → Prep Schedule
↓ ↓ ↓ ↓ ↓
step-01- step-02- step-03- step-04- step-05-
discovery assessment strategy shopping-list prep-schedule
```
**Each step file contains internal structure:**
- STEP GOAL
- MANDATORY EXECUTION RULES
- EXECUTION PROTOCOLS
- MANDATORY SEQUENCE (numbered sub-steps)
- Menu options
- Success/failure metrics
**Key insight:** A simple workflow might have 3-4 step files. A complex workflow might have 10+. Each step file is a focused, self-contained instruction.
---
## Example 1: Personalized Meal Plan Generator
**Domain:** Health & Fitness
| Aspect | Details |
|--------|---------|
| **Flow** (each → = step file) | Discovery → Assessment → Strategy → Shopping List → Prep Schedule |
| **Step Files** | ~5 files: step-01-discovery, step-02-assessment, step-03-strategy, step-04-shopping, step-05-prep |
| **Output** | Direct-to-final document, each step appends a section |
| **Intent/Prescriptive** | Intent-based - Facilitates discovery of preferences |
| **Planning** | No - builds final meal plan directly |
| **Continuable** | Yes - Can be 200+ tokens, users may need multiple sessions |
| **Structure** | Linear, 5 steps, no branching |
| **Conversation** | Open-ended with progressive questioning (1-2 at a time, probe preferences) |
**Description:** Helps users create personalized weekly meal plans based on dietary restrictions, health goals, and cooking habits.
---
## Example 2: Year-End Tax Organizer
**Domain:** Finance
| Aspect | Details |
|--------|---------|
| **Flow** (each → = step file) | Input Discovery → Document Categorization → Missing Document Alert → Final Summary |
| **Step Files** | 4 files: step-01-input-discovery, step-02-categorize, step-03-missing-alerts, step-04-summary |
| **Output** | Analysis-only + checklist of missing docs |
| **Intent/Prescriptive** | Highly Prescriptive - Tax compliance, exact categories |
| **Planning** | N/A |
| **Continuable** | No - Simple single-session checklist |
| **Structure** | Linear, 4 steps |
| **Conversation** | Focused - specific questions, document what user provides |
**Description:** Organizes financial documents for tax preparation, categorizes income/deductions, alerts to missing documents.
---
## Example 3: Employee Termination Checklist
**Domain:** Legal / HR / Compliance
| Aspect | Details |
|--------|---------|
| **Flow** (each → = step file) | Context → Regulatory Check → Document Requirements → Notification Timeline → Final Checklist |
| **Step Files** | 5 files: step-01-context, step-02-regulatory, step-03-documents, step-04-timeline, step-05-checklist. Some steps branch internally based on reason/location. |
| **Output** | Direct-to-final compliance checklist |
| **Intent/Prescriptive** | Highly Prescriptive - Legal compliance, state-specific |
| **Planning** | No |
| **Continuable** | No - Focused, single-session |
| **Structure** | Branching - Different paths within steps based on: reason, location, employee count |
| **Conversation** | Focused - specific classification questions, present requirements |
**Description:** Generates legally-compliant termination checklists that vary by state, termination reason, and employee count.
---
## Example 4: Tabletop RPG Campaign Builder
**Domain:** Entertainment / Games
| Aspect | Details |
|--------|---------|
| **Flow** (each → = step file) | Session Concept → NPC Creation → Scene Setup → Key Beats → Generate → [Repeat for next session] |
| **Step Files** | 4 core files: step-01-concept, step-02-npc, step-03-scene, step-04-beats, step-05-generate. Same files reused each session. |
| **Output** | Per-session document, maintains campaign continuity |
| **Intent/Prescriptive** | Intent-based - Creative facilitation |
| **Planning** | No - Each session builds directly to playable content |
| **Continuable** | Yes - Campaign has many sessions over months |
| **Structure** | Repeating loop - Same steps, new content each session |
| **Conversation** | Open-ended creative facilitation, "What if..." prompts |
**Description:** Helps Game Masters create individual RPG session content while tracking campaign continuity across multiple sessions.
---
## Example 5: Course Syllabus Creator
**Domain:** Education
| Aspect | Details |
|--------|---------|
| **Flow** | Course Type → Learning Objectives → Module Breakdown → Assessment → [Branch: academic] → Accreditation → [Branch: vocational] → Certification → Final |
| **Output** | Direct-to-final syllabus document |
| **Intent/Prescriptive** | Balanced - Framework prescriptive, content flexible |
| **Planning** | No |
| **Continuable** | Yes - Complex syllabus may require multiple sessions |
| **Structure** | Branching - Course type determines different sections |
| **Conversation** | Mixed - Framework questions (prescriptive) + content discovery (intent) |
**Description:** Creates course syllabi that adapt based on course type (academic, vocational, self-paced) with appropriate accreditation requirements.
---
## Example 6: SOP Writer
**Domain:** Business Process
| Aspect | Details |
|--------|---------|
| **Flow** | Process Selection → Scope Definition → Documentation → Review → [Generate] → "Create another?" → If yes, repeat |
| **Output** | Each SOP is independent, stored in `{sop_folder}/` |
| **Intent/Prescriptive** | Prescriptive - SOPs must be exact, unambiguous |
| **Planning** | No - Each SOP generated directly |
| **Continuable** | No - Single SOP per run, but workflow is repeatable |
| **Structure** | Repeating - Can create multiple SOPs in one session |
| **Conversation** | Focused on process details - "Walk me through step 1" |
**Description:** Generates Standard Operating Procedure documents for business processes. Can create multiple SOPs in one session, each stored independently.
---
## Example 7: Novel Outliner
**Domain:** Creative Writing
| Aspect | Details |
|--------|---------|
| **Flow** | Structure Selection → Character Arcs → Beat Breakdown → Pacing Review → Final Polish |
| **Output** | Free-form with Final Polish step to ensure flow and coherence |
| **Intent/Prescriptive** | Intent-based - "What does your character want?" |
| **Planning** | No - Builds outline directly |
| **Continuable** | Yes - Long-form creative work, sessions span weeks |
| **Structure** | Branching - Different flows based on structure choice |
| **Conversation** | Open-ended creative coaching, provocations |
**Description:** Helps authors create novel outlines with proper story structure (3-Act, Hero's Journey, etc.), character arcs, and beat sheets.
---
## Example 8: Wedding Itinerary Coordinator
**Domain:** Event Planning
| Aspect | Details |
|--------|---------|
| **Flow** | Venue Type → Vendor Coordination → Timeline → Guest Experience → [Branch: hybrid] → Virtual Setup → Day-of Schedule |
| **Output** | Direct-to-final itinerary |
| **Intent/Prescriptive** | Intent-based - Facilitates couple's vision |
| **Planning** | No |
| **Continuable** | Yes - Wedding planning takes months |
| **Structure** | Branching - Venue type affects required sections |
| **Conversation** | Open-ended discovery of preferences, budget, constraints |
**Description:** Creates detailed wedding day itineraries, adapting to venue type (indoor/outdoor/hybrid) and guest experience goals.
---
## Example 9: Annual Life Review
**Domain:** Personal Development
| Aspect | Details |
|--------|---------|
| **Flow** | Input Discovery (last year's goals) → Life Areas Assessment → Reflections → Goal Setting → Action Planning → Final Polish |
| **Output** | Free-form with Final Polish, discovers prior review first |
| **Intent/Prescriptive** | Intent-based - Coaching questions |
| **Planning** | No - Direct to life plan document |
| **Continuable** | Yes - Deep reflection may need multiple sessions |
| **Structure** | Linear with Input Discovery at start |
| **Conversation** | Open-ended coaching, progressive questioning |
**Description:** Annual review workflow that discovers prior year's goals, facilitates reflection across life areas, and sets intentional goals for coming year.
---
## Example 10: Room Renovation Planner
**Domain:** Home Improvement
| Aspect | Details |
|--------|---------|
| **Flow** | Room Type → Budget Assessment → Phase Planning → Materials → Contractor Timeline → [Branch: DIY] → Instructions |
| **Output** | Direct-to-final renovation plan |
| **Intent/Prescriptive** | Balanced - Code compliance prescriptive, design intent-based |
| **Planning** | No |
| **Continuable** | Yes - Complex planning, multi-session |
| **Structure** | Branching - Room type and DIY vs pro affect content |
| **Conversation** | Mixed - "What's your budget?" + "Describe your vision" |
**Description:** Creates room-specific renovation plans with material selection, contractor coordination, and optional DIY instructions.
---
## Pattern Analysis
### Structure Types
| Type | Count | Examples |
|------|-------|----------|
| Linear | 5 | Meal Plan, Tax, Termination, Life Review, Renovation |
| Branching | 5 | Termination, Syllabus, Novel, Wedding, Renovation |
| Repeating Loop | 2 | RPG Campaign, SOP Writer |
### Intent Spectrum
| Type | Count | Examples |
|------|-------|----------|
| Intent-based | 7 | Meal Plan, RPG Campaign, Syllabus (partial), Novel, Wedding, Life Review, Renovation (partial) |
| Prescriptive | 1 | Tax, Termination, SOP |
| Balanced | 2 | Syllabus, Renovation |
### Continuable vs Single-Session
| Type | Count | Examples |
|------|-------|----------|
| Continuable | 7 | Meal Plan, RPG Campaign, Syllabus, Novel, Wedding, Life Review, Renovation |
| Single-Session | 3 | Tax, Termination, SOP (repeatable but single-output) |
### Output Patterns
| Type | Count | Examples |
|------|-------|----------|
| Direct-to-Final | 9 | All except Tax |
| Analysis Only | 1 | Tax |
| With Final Polish | 1 | Novel |
| Input Discovery | 1 | Life Review |
| Repeating Output | 2 | RPG Campaign (sessions), SOP Writer (multiple SOPs) |
---
## Key Insights
1. **Continuable workflows are the norm** - 7 of 10 examples are continuable
2. **Intent-based dominates** - 7 of 10 are primarily intent-based facilitation
3. **Branching is common** - 5 of 10 have conditional paths based on user choices
4. **Input discovery matters** - Workflows in sequences (like BMM pipeline) need to find prior documents
5. **Final polish is critical** - Complex documents built section-by-section need optimization step
6. **Repeating loops exist** - Some workflows generate multiple outputs per session or repeat across sessions
7. **Mixed conversation styles** - Most use focused questions for data, open-ended for creative
---
## Workflow Design Questions
When creating a new workflow, ask:
1. **Domain:** What problem space does this operate in?
2. **Output:** What does this workflow produce? (Document, checklist, analysis, physical output?)
3. **Intent:** Is this prescriptive (compliance) or intent-based (creative)?
4. **Planning:** Plan-then-build or direct-to-final?
5. **Continuable:** Could this take multiple sessions or consume many tokens?
6. **Structure:** Linear, branching, or repeating loop?
7. **Inputs:** Does this require documents from prior workflows or external sources?
8. **Chaining:** Is this part of a module sequence? What comes before/after?
9. **Polish:** Does the final output need optimization for flow and coherence?
10. **Conversation:** Focused questions or open-ended facilitation?

View File

@@ -1,172 +0,0 @@
# Workflow Type Criteria
**Purpose:** Key decisions when designing a workflow.
---
## Key Decisions
1. **Module affiliation** - Standalone or part of a module?
2. **Continuable** - Can it span multiple sessions?
3. **Edit/Validate support** - Will it have edit and validate flows?
4. **Document output** - Does it produce a document?
---
## 1. Module Affiliation
### Standalone Workflow
- NOT part of any module
- Stored in user's custom location
- Only standard variables available
### Module-Based Workflow
- Part of a specific module (e.g., BMB)
- Has access to module-specific variables
- Stored in module's workflows directory
**BMB additional variable:** `{bmb_creations_output_folder}`
---
## 2. Continuable or Single-Session?
### Continuable (Multi-Session)
**Use when:** Workflow might consume MASSIVE tokens, complex, many steps
**Required:**
- `step-01-init.md` with continuation detection
- `step-01b-continue.md` for resuming
- `stepsCompleted` tracking in output frontmatter
**Frontmatter:**
```yaml
stepsCompleted: ['step-01-init', 'step-02-gather']
lastStep: 'step-02-gather'
lastContinued: '2025-01-02'
```
**Rule:** Each step appends its NAME to `stepsCompleted`
### Single-Session
**Use when:** Simple, quick (<15 min), token-efficient
**Required:**
- Standard `step-01-init.md` (no continuation logic)
- No `stepsCompleted` tracking needed
---
## 3. Edit/Validate Support
### Create-Only
```
workflow-folder/
├── workflow.md
├── data/
└── steps-c/
├── step-01-init.md
└── step-N-final.md
```
**Use when:** Simple workflows, experimental, one-off
### Create + Edit + Validate (Tri-Modal)
```
workflow-folder/
├── workflow.md
├── data/ # SHARED
├── steps-c/ # Create
├── steps-e/ # Edit
└── steps-v/ # Validate
```
**Key:**
- Each mode is SELF-CONTAINED
- NO shared step files between modes
- DATA folder is SHARED (prevents drift)
- Duplicative steps OK (better than confusion)
**Use when:** Complex workflows that will be maintained
---
## 4. Document Output
### Document-Producing
- Creates persistent output file
- Uses templates for structure
- Each step contributes to document
- Consider final polish step
### Non-Document
- Performs actions without persistent output
- May produce temporary files
- Focus on execution, not creation
---
## Decision Tree
```
START: Creating a workflow
├─ Part of a module?
│ ├─ YES → Module-based (include module variables)
│ └─ NO → Standalone (standard variables only)
├─ Could this take multiple sessions / lots of tokens?
│ ├─ YES → Continuable (add step-01b-continue.md)
│ └─ NO → Single-session (simpler init)
└─ Will users need to edit/validate this workflow?
├─ YES → Tri-modal (steps-c/, steps-e/, steps-v/)
└─ NO → Create-only (steps-c/ only)
```
---
## Questions to Ask User
**Module:**
"Is this workflow standalone or part of a specific module (BMB, BMM, CIS, BMGD)?"
**Continuable:**
"Could this workflow consume many tokens or require multiple sessions?
- If YES: Add continuation support
- If NO: Keep it simple for single-session"
**Edit/Validate:**
"Will this workflow need edit and validate capabilities, or just create?
- Create only: Simpler, faster
- Create + Edit + Validate: More robust, maintainable"
**Document:**
"Does this workflow produce a document/output file?"
- If YES: Use free-form template (recommended)
- If NO: What does it produce?
---
## Output Format Decision
| Workflow Type | Init Template | Output Format |
| ----------------------- | ------------------------ | ------------- |
| Continuable + Document | step-01-init-continuable | Free-form |
| Single-Session + Document| Standard init | Free-form |
| Continuable + No Doc | step-01-init-continuable | N/A |
| Single-Session + No Doc | Standard init | N/A |
**Free-form template** (recommended):
```yaml
---
stepsCompleted: []
lastStep: ''
date: ''
user_name: ''
---
# {{document_title}}
[Content appended progressively]
```

View File

@@ -1,262 +0,0 @@
---
name: 'step-00-conversion'
description: 'Convert existing workflow to BMAD compliant format by reading all instructions and extracting plan'
nextStepFile: './step-02-classification.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
---
# Step 0: Workflow Conversion
## STEP GOAL:
Convert an existing workflow (any format) to BMAD compliant format by fully reading and understanding every instruction, extracting the essence, and creating a plan document.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER skip reading the entire source workflow
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous converter
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow analyst and conversion specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow architecture expertise, user brings their existing workflow
- ✅ Together we will extract the essence and rebuild compliantly
### Step-Specific Rules:
- 🎯 Focus on understanding the COMPLETE existing workflow
- 🚫 FORBIDDEN to skip any instruction or file
- 💬 Read EVERYTHING - instructions.md, workflow.yaml, step files, templates
- 📋 Document the essence succinctly
## EXECUTION PROTOCOLS:
- 🎯 Load and read the ENTIRE source workflow
- 💾 Extract: goal, steps, output, input requirements
- 📖 Create plan with conversionFrom metadata
- 🚫 FORBIDDEN to proceed without complete understanding
## CONTEXT BOUNDARIES:
- User provides existing workflow path (from routing or direct)
- This REPLACES step-01-discovery - we skip to step-02-classification
- The source workflow can be ANY format (legacy XML, partial, other systems)
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Get Source Workflow Path
**If path was passed from routing (e.g., from edit workflow):**
- Use `{sourceWorkflowPath}` provided
**If no path was passed:**
"I can help you convert an existing workflow to BMAD compliant format.
**Please provide the path to the workflow you want to convert:**
This could be:
- A folder containing workflow.md
- A folder with workflow.yaml (legacy format)
- A folder with instructions.md
- Any workflow from another system
**Path:** {user provides path}"
### 2. Load EVERYTHING - DO NOT BE LAZY
"**Loading source workflow for complete analysis...**
**CRITICAL:** I will read EVERY file in this workflow to understand it completely."
**Load these files based on what exists:**
**If workflow.md exists:**
- Load workflow.md completely
- Load all step files (steps/*, steps-c/*, steps-v/*, steps-e/*)
- Load all data files (data/*)
- Load all templates (templates/*)
**If workflow.yaml exists (legacy XML format):**
- Load workflow.yaml completely
- Load instructions.md completely
- Load all step files, templates, data
**If other format:**
- Load every file that exists
- Read everything to understand the structure
**⚠️ DO NOT BE LAZY - Load and READ COMPLETELY:**
For each step file, read:
- The STEP GOAL
- All MANDATORY EXECUTION RULES
- All instructions in EXECUTION PROTOCOLS
- All menu options
- All templates and outputs
"**✅ Source workflow loaded completely**
**Files read:** {count} files
**Format detected:** {format}
**Structure identified:** {brief description}"
### 3. Extract and Document Workflow Essence
Create the workflow plan with complete extraction:
"**Extracting workflow essence...**"
Create `{workflowPlanFile}`:
```markdown
---
conversionFrom: '{sourceWorkflowPath}'
originalFormat: '{detected format}'
stepsCompleted: ['step-00-conversion']
created: {current date}
status: CONVERSION
---
# Workflow Creation Plan
## Conversion Source
**Original Path:** {sourceWorkflowPath}
**Original Format:** {workflow.yaml / workflow.md / custom / etc.}
**Detected Structure:** {describe what was found}
---
## Original Workflow Analysis
### Goal (from source)
{Extract the exact goal from the source workflow}
### Original Steps (Complete List)
{Create succinct bullet list of EVERY step from the source:}
**Step 1:** {Step name} - {Brief purpose}
**Step 2:** {Step name} - {Brief purpose}
**Step 3:** {Step name} - {Brief purpose}
...
**Step N:** {Step name} - {Brief purpose}
### Output / Deliverable
{What does this workflow produce?}
### Input Requirements
{What inputs does this workflow need from the user?}
### Key Instructions to LLM
{Extract the key instruction patterns - how does the workflow talk to the LLM?
What style? What level of detail? What collaborative approach?}
---
## Conversion Notes
**What works well in original:**
{List strengths to preserve}
**What needs improvement:**
{List issues to address}
**Compliance gaps identified:**
{List what's missing for BMAD compliance}
```
### 4. Present Extracted Information to User
"**I've analyzed your existing workflow completely. Here's what I found:**
---
**Workflow Goal:**
{goal from analysis}
**Steps ({count}):**
{Display succinct bullet list}
**Output:**
{what it produces}
**Input Requirements:**
{what it needs from user}
---
**Format:** {originalFormat}
**Compliance Status:** {compliant / non-compliant / partial}
**Key observations:**
{Share 2-3 key insights about the workflow}"
### 5. Discovery Questions for Conversion
Even though this is a conversion, we need to understand some things:
"**A few questions to ensure the conversion captures your intent:**
1. **What's working well** in this workflow that we should definitely preserve?
2. **What problems** have you encountered with this workflow that we should fix?
3. **Any missing features** or improvements you'd like to add during conversion?
4. **Who will use** the converted workflow - same audience or different?"
### 6. Confirm and Proceed to Classification
"**Based on my analysis and your answers, I'm ready to proceed with classification.**
**Next step:** We'll classify the workflow type (document, action, interactive, autonomous, meta), determine structure (continuable or single-session), and decide if it needs validation steps.
**Ready to proceed?** [C] Continue to Classification"
#### Menu Handling Logic:
- IF C: Update workflowPlanFile with conversion notes, then load, read entirely, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN the entire source workflow has been read and analyzed, and the plan document contains the complete extraction (goal, steps, output, inputs) and conversionFrom metadata, will you then load and read fully `{nextStepFile}` to execute classification.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- ENTIRE source workflow loaded and read
- Every step documented in plan
- Goal, output, inputs extracted
- conversionFrom metadata set
- User confirms understanding
- Proceeding to classification
### ❌ SYSTEM FAILURE:
- Not loading all files in source workflow
- Skipping step files
- Not reading instructions completely
- Missing steps in documentation
- Not setting conversionFrom metadata
- Proceeding without complete understanding
**Master Rule:** DO NOT BE LAZY. Read EVERYTHING. Document the COMPLETE workflow essence. The conversion must capture ALL of the original workflow's intent and functionality.

View File

@@ -1,194 +0,0 @@
---
name: 'step-01-discovery'
description: 'Discover and understand the user workflow idea through collaborative conversation'
nextStepFile: './step-02-classification.md'
workflowExamples: '../data/workflow-examples.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
---
# Step 1: Discovery
## STEP GOAL:
To understand the user's workflow idea through open-ended conversation, showing them what's possible, and discovering their vision before making any structural decisions.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow design expertise, user brings their vision
- ✅ Together we will discover what they need
### Step-Specific Rules:
- 🎯 Focus ONLY on understanding their idea
- 🚫 FORBIDDEN to ask for name, module, or technical decisions in this step
- 💬 Ask 1-2 questions at a time, think about their response before probing deeper
- 🚪 DON'T rush to classification - understand first
## EXECUTION PROTOCOLS:
- 🎯 Load examples FIRST to show what's possible
- 💬 Start with open-ended "Tell me about your idea..."
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until we understand their vision
## CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- This is pure discovery - no decisions yet
- Don't ask technical questions yet
- Focus on the problem space and user's vision
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Context FIRST
Load `{workflowExamples}` BEFORE talking to the user.
**Note:** You already understand workflow architecture from having read workflow.md to get here. The step-file architecture you just experienced (micro-file design, JIT loading, sequential enforcement, state tracking) is exactly what we'll be helping users create.
**From workflowExamples**, you now know 10 diverse workflow examples across domains:
- Health & Fitness (Meal Plan)
- Finance (Tax Organizer)
- Legal/HR (Termination Checklist)
- Entertainment (RPG Campaign)
- Education (Syllabus Creator)
- Business (SOP Writer)
- Creative (Novel Outliner)
- Events (Wedding Itinerary)
- Personal Development (Life Review)
- Home Improvement (Renovation Planner)
This context helps you understand whatever the user describes and guide them effectively.
### 2. Open-Ended Invitation
Start with:
"**Welcome! I'm here to help you create a workflow.**
Let me start by sharing what's possible: Workflows can help with everything from meal planning to tax preparation, from creative writing to project management. They're structured processes that guide you (or others) through a task step-by-step.
**Tell me about your idea** - what problem are you trying to solve? What's the vision?"
### 3. Listen and Probe
As they describe their idea:
**DO:**
- Listen carefully
- Ask 1-2 follow-up questions at a time
- Think about their response before asking more
- Probe for: Who is this for? What's the outcome? What's the challenge they're facing?
- Use "Think about their response before..." pattern
**DON'T:**
- Ask about module, name, or technical details
- Rapid-fire questions
- Jump to solutions
- Rush this step
### 4. Deepen Understanding
Once you have the basic idea, probe deeper:
"That's really interesting. Let me understand better:
- Walk me through a scenario where someone would use this workflow
- What does success look like at the end?
- Who would be running this workflow - you, your team, customers?
- Is this something you'd do once, or repeat over time?
**Think about their response before continuing...**"
### 5. Check Understanding
Before moving on, confirm you understand:
"Let me make sure I've got this right:
[Summarize your understanding in 2-3 sentences]
Did I capture that correctly? What should I adjust?"
### 6. Create Initial Plan Document
Create `{workflowPlanFile}` with initial discovery notes:
```markdown
---
stepsCompleted: ['step-01-discovery']
created: [current date]
status: DISCOVERY
---
# Workflow Creation Plan
## Discovery Notes
**User's Vision:**
[Summarize the problem they're solving and their vision]
**Who It's For:**
[Users/audience]
**What It Produces:**
[The outcome/deliverable]
**Key Insights:**
[Any important context gathered]
```
### 7. Transition to Classification
"Great! I understand what you're trying to build. Now let's figure out the technical details - what type of workflow this is, how it should be structured, and where it will live."
### 8. Present MENU OPTIONS
Display: **Proceeding to workflow classification...**
#### EXECUTION RULES:
- This is a discovery step with no user choices at the end
- Proceed directly to next step after discovery is complete
- Always halt if user wants to continue discussing their idea
#### Menu Handling Logic:
- After discovery complete and plan document created, immediately load and execute `{nextStepFile}` to begin classification
- IF user wants to keep discussing their idea: continue conversation, then repeat menu check
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- User's vision clearly understood
- Discovery notes captured in plan document
- User feels heard and understood
- Ready to proceed to classification
### ❌ SYSTEM FAILURE:
- Rushing to technical decisions before understanding
- Asking for name/module in this step
- Not loading examples first
- Rapid-fire questions without thinking about responses
**Master Rule:** Understand first, classify second. Discovery comes before structure.

View File

@@ -1,3 +0,0 @@
# TODO - THIS IS A PLACE HOLDER NOT IMPLEMENTED YET IN THIS FLOW
<attention-llm>YOU CAN CALL OUT AS A WARNING IN ANY VALIDATION CHECKS of this specific workflow - but this is a known pending todo to implement.</attention-llm>

View File

@@ -1,269 +0,0 @@
---
name: 'step-02-classification'
description: 'Classify the workflow by answering the 4 key structural decisions'
nextStepFile: './step-03-requirements.md'
workflowTypeCriteria: '../data/workflow-type-criteria.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
bmbCreationsOutputFolder: '{bmb_creations_output_folder}'
customWorkflowLocation: '{custom_workflow_location}'
---
# Step 2: Workflow Classification
## STEP GOAL:
To determine the 4 key structural decisions that define how the workflow will be built: module affiliation, continuable vs single-session, tri-modal vs create-only, and document output.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect helping classify their workflow
- ✅ Explain the trade-offs of each decision clearly
- ✅ Help them make informed choices
- ✅ These 4 decisions affect the entire workflow structure
### Step-Specific Rules:
- 🎯 Focus ONLY on the 4 key structural decisions
- 🚫 FORBIDDEN to skip any of the 4 decisions
- 💬 Explain each decision in plain language before asking
- 🚪 These decisions determine file structure, naming, and location
## EXECUTION PROTOCOLS:
- 🎯 Load workflowTypeCriteria for the decision framework
- 💾 Document each decision in the plan
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until all 4 decisions are made
## CONTEXT BOUNDARIES:
- Discovery from Step 1 informs these decisions
- These are STRUCTURAL decisions that affect everything else
- Once made, changing them is difficult
- Take time to explain trade-offs
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 0. Load Decision Framework
Load `{workflowTypeCriteria}` to understand the 4 key decisions and their implications.
### 1. Decision 1: Document Output (FIRST - It's Fundamental)
"**Let's classify your workflow. I'll walk you through 4 key decisions that determine how it's built.**
**Decision 1: What does your workflow produce?**
Based on your idea from discovery, let me clarify:"
- [If unclear from discovery] "Does this workflow produce a document or file at the end? A report, a plan, a story, a checklist?"
Present the two options:
**A. Document-Producing**
- Creates a persistent output file
- Examples: reports, plans, stories, checklists, forms
- Uses templates for structure
**B. Non-Document**
- Performs actions without creating a document
- Examples: refactoring code, running tests, orchestrating tools
- May produce temporary files but no persistent output
"Which describes your workflow?"
**Think about their response before continuing...**
Once decided:
- Document: `workflowProducesDocuments: true`
- Non-document: `workflowProducesDocuments: false`
### 2. Decision 2: Module Affiliation
"**Decision 2: Where will this workflow live?**
Workflows can be standalone or part of a module:"
**Standalone:**
- NOT part of any module
- Stored in your custom location
- Only standard variables available
**Module-Based (BMB, BMM, CIS, BMGD, etc.):**
- Part of a specific module
- Has access to module-specific variables
- Stored in that module's workflows directory
"Is this workflow:
- **A)** Standalone - just for you/custom use
- **B)** Part of a module - which one?"
**If they don't know modules:**
"Modules are specialized areas:
- **BMB** - Module building workflows
- **BMM** - Software development workflows (PRDs, architecture, etc.)
- **CIS** - Innovation and creative workflows
- **BMGD** - Game development workflows
- **Custom** - Your own workflows
Does your workflow fit into one of these areas, or is it standalone?"
Document the result.
### 3. Decision 3: Continuable or Single-Session
"**Decision 3: Could this workflow take multiple sessions to complete?**
Think about: Will this workflow consume many tokens or take a long time? Might users need to pause and come back later?"
**Single-Session:**
- Quick, focused workflows (15-30 minutes)
- Simpler structure
- No continuation logic needed
**Continuable:**
- Can span multiple sessions
- Complex, many steps
- Saves progress, can resume later
- Needs `step-01b-continue.md`
"Is your workflow:
- **A)** Single-session - quick and focused
- **B)** Continuable - could take multiple sessions"
**Help them think:**
- "Walk me through how long you think this would take..."
- "What happens if someone gets halfway through and has to stop?"
Document the result.
### 4. Decision 4: Create-Only or Tri-Modal
"**Decision 4: Will this workflow need Edit and Validate capabilities?**
Some workflows are simple - you create them once and use them. Others need full lifecycle support:**
**Create-Only:**
- Just `steps-c/` (create steps)
- Simpler, faster to build
- Good for: experimental workflows, one-off use, simple tools
**Tri-Modal (Create + Edit + Validate):**
- Has `steps-c/`, `steps-e/` (edit), and `steps-v/` (validate)
- Full lifecycle support
- Can be modified and validated after creation
- Good for: complex workflows, maintained workflows, team use
"Do you envision:
- **A)** Create-only - build it and use it
- **B)** Tri-modal - create, edit, AND validate capabilities"
**If they're unsure:**
"Think: Will you or others want to modify this workflow later? Does it need quality checking/validation?"
Document the result.
### 5. Name the Workflow
"Now that we understand what this workflow IS, let's name it properly.
Based on everything we've discovered, what would you call this?
Some guidance:
- Use kebab-case: `my-workflow-name`
- Be descriptive but concise
- Think: What would someone search for to find this?
[Offer suggestions based on their vision]"
**Check for uniqueness:**
- Look for folder at `{bmb_creationsOutputFolder}/workflows/{proposed-name}/`
- If exists: "That name is taken. Want to try a variant like...?"
- Loop until unique name confirmed
Document the final name.
### 6. Confirm Target Location
Based on module decision, confirm and document the target path:
**For standalone/custom:**
- Target: `{customWorkflowLocation}/{workflow-name}/`
- Typically: `_bmad/custom/src/workflows/{workflow-name}/`
**For modules:**
- Check module's workflow location from module.yaml
- Confirm path with user
Document: `targetWorkflowPath: [confirmed path]`
### 7. Update Plan with Classification
Update `{workflowPlanFile}`:
```markdown
## Classification Decisions
**Workflow Name:** {name}
**Target Path:** {targetWorkflowPath}
**4 Key Decisions:**
1. **Document Output:** {true/false}
2. **Module Affiliation:** {standalone/module-name}
3. **Session Type:** {single-session/continuable}
4. **Lifecycle Support:** {create-only/tri-modal}
**Structure Implications:**
- [Document what this means: e.g., "Needs steps-c/, steps-e/, steps-v/", "Needs step-01b-continue.md", etc.]
```
### 8. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
- IF P: Execute {project-root}/_bmad/core/workflows/party-mode/workflow.md
- IF C: Update plan frontmatter with stepsCompleted and classification, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All 4 key decisions made and documented
- Workflow named appropriately
- Target location confirmed
- Structural implications understood
- Plan updated with classification
### ❌ SYSTEM FAILURE:
- Skipping any of the 4 key decisions
- Naming before understanding (old pattern)
- Not explaining trade-offs
- Not checking for name conflicts
**Master Rule:** The 4 key decisions determine everything else. Get them right before proceeding.

View File

@@ -1,282 +0,0 @@
---
name: 'step-03-requirements'
description: 'Gather detailed requirements through collaborative conversation'
nextStepFile: './step-04-tools.md'
workflowExamples: '../data/workflow-examples.md'
outputFormatStandards: '../data/output-format-standards.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 3: Requirements Gathering
## STEP GOAL:
To gather comprehensive requirements through conversation, building on the classification decisions, and document them in a standardized format for the design phase.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect gathering requirements
- ✅ Build on what we discovered and classified
- ✅ Ask 1-2 questions at a time, think about responses
- ✅ We already know the 4 key decisions - now we get details
### Step-Specific Rules:
- 🎯 Focus ONLY on requirements gathering
- 🚫 FORBIDDEN to propose workflow designs yet
- 💬 Ask conversationally, not like a form
- 📋 Use the standardized template (below) for consistent storage
## EXECUTION PROTOCOLS:
- 🎯 Load references as needed
- 💾 Store to standardized template in plan document
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until requirements are complete
## CONTEXT BOUNDARIES:
- Discovery (Step 1) gave us the vision
- Classification (Step 2) gave us the 4 key decisions
- Now we gather detailed requirements
- Don't design workflow steps yet - that's Step 6
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Initialize Requirements
"**Let's gather the requirements for your workflow.**
We already know:
- [Summarize vision from discovery]
- [Summarize 4 key decisions from classification]
Now I need to understand the details of how this workflow should work."
### 2. Workflow Flow and Structure
Load `{workflowExamples}` to reference diverse patterns.
"**How should this workflow flow?**
From our examples, workflows can be structured differently:"
**Flow Patterns:**
- **Linear:** Step 1 → Step 2 → Step 3 → Finish
- **Looping:** Generate → Review → Generate more... until done
- **Branching:** Different paths based on user choices
- **Repeating:** Same steps, new content each session
"Think about your workflow:
- Should it go straight through, or loop/branch?
- How many logical phases does it need?
- What are the major milestones?"
**Think about their response...**
### 3. User Interaction Style
"**How collaborative should this be?**
Think about the person running this workflow:"
- **Highly Collaborative:** AI asks questions, guides, facilitates at each step
- **Mostly Autonomous:** AI does the work with occasional checkpoints
- **Guided Session:** AI leads through a structured experience
- **Mixed:** Some steps collaborative, some autonomous
"Where does your workflow fit on this spectrum?
And are there specific decision points where the user MUST choose something?"
### 4. Input Requirements
"**What does this workflow need to start?**"
- What documents or data must be provided?
- Are there prerequisites or dependencies?
- Will users need to provide specific information?
- Any optional inputs that enhance the workflow?
"**Think about their response before continuing...**"
### 5. Output Specifications (IF document-producing)
**ONLY if `workflowProducesDocuments: true` from classification:**
Load `{outputFormatStandards}` and discuss:
"**What should the output look like?**
Since your workflow produces a document, let's decide the format:"
**Four Template Types:**
1. **Free-form (Recommended)** - Minimal structure, content-driven
- Use for: Most collaborative workflows
- Has: Basic frontmatter, progressive content, final polish step
2. **Structured** - Required sections, flexible within each
- Use for: Reports, proposals, documentation
- Has: Clear section headers, consistent structure
3. **Semi-structured** - Core sections + optional additions
- Use for: Forms, checklists, meeting minutes
- Has: Required fields, optional extras
4. **Strict** - Exact format, specific fields
- Use for: Compliance, legal, regulated (rare)
- Has: Precise requirements, validation
"Which format fits your workflow best?"
**If Free-form (most common):**
- "We'll use a minimal template with basic frontmatter. The workflow will build the document section by section, with a final polish step to optimize flow."
**If Structured/Semi-structured:**
- "What sections are required? Any optional sections?"
**If Strict:**
- "Do you have an existing template to follow, or should we design one?"
Document the output format decision.
### 6. Output Specifications (IF non-document)
**ONLY if `workflowProducesDocuments: false` from classification:**
"**What does this workflow produce if not a document?**
- Actions performed?
- Changes made to code/files?
- A decision or recommendation?
- A temporary artifact?"
Document what the workflow produces.
### 7. Success Criteria
"**How will we know this workflow succeeded?**
Think about the end result:
- What does 'done' look like?
- What would make a user satisfied?
- Are there quality criteria?
- Can we measure success?"
"**Think about their response...**"
### 8. Instruction Style (NOW, Not Earlier)
**We ask this NOW because we understand the workflow:**
"**How should the AI executing this workflow behave?**"
**Intent-Based (Recommended for most):**
- Steps describe goals and principles
- AI adapts conversation naturally
- More flexible and responsive
- Example: "Guide user to define requirements through open-ended discussion"
**Prescriptive:**
- Steps provide exact instructions
- More controlled and predictable
- Example: "Ask: 'What is your primary goal? A) Growth B) Efficiency C) Quality'"
**Mixed:**
- Some steps prescriptive, others intent-based
- Use prescriptive for critical/required steps
- Use intent-based for creative/facilitative steps
"Which style fits your workflow, or should it be mixed?"
### 9. Store to Standardized Template
Update `{workflowPlanFile}` with the requirements section:
```markdown
## Requirements
**Flow Structure:**
- Pattern: [linear/looping/branching/repeating]
- Phases: [list major phases]
- Estimated steps: [rough count]
**User Interaction:**
- Style: [highly collaborative/mostly autonomous/guided/mixed]
- Decision points: [where user must choose]
- Checkpoint frequency: [how often to pause]
**Inputs Required:**
- Required: [list]
- Optional: [list]
- Prerequisites: [list]
**Output Specifications:**
- Type: [document/action/decision/temporary]
- Format: [free-form/structured/semi-structured/strict OR describe non-document output]
- Sections: [if structured]
- Frequency: [single/batch/continuous]
**Success Criteria:**
- [list what success looks like]
**Instruction Style:**
- Overall: [intent-based/prescriptive/mixed]
- Notes: [any specific style requirements]
```
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save requirements to plan, update frontmatter, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Requirements gathered through conversation (not interrogation)
- Flow structure clearly understood
- Input/output specifications defined
- Output format decided (if document-producing)
- Success criteria established
- Instruction style determined
- All stored in standardized template
### ❌ SYSTEM FAILURE:
- Asking for instruction style before understanding the workflow
- Skipping output format discussion
- Not storing to standardized template
- Proceeding without understanding the flow
**Master Rule:** Requirements build on classification. Use the standardized template so the next steps can read consistent data.

View File

@@ -1,281 +0,0 @@
---
name: 'step-04-tools'
description: 'Preview workflow structure, then configure tools with context'
nextStepFile: './step-05-plan-review.md'
commonToolsCsv: '../data/common-workflow-tools.csv'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 4: Tools Configuration
## STEP GOAL:
To preview the workflow structure FIRST, then configure tools with clear context on where and how they'll be used.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect
- ✅ Tools need context to be configured intelligently
- ✅ We preview structure BEFORE deciding tool integration points
### Step-Specific Rules:
- 🎯 Preview workflow structure BEFORE configuring tools
- 🚫 FORBIDDEN to skip the preview - tools can't be configured without it
- 💬 Use the preview to make tool discussions concrete
- 🚫 Load tools from CSV, don't hardcode descriptions
## EXECUTION PROTOCOLS:
- 🎯 Present design preview based on requirements
- 💬 Discuss tools WITHIN the context of the preview
- 💾 Document tool decisions with integration points
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until tools are configured
## CONTEXT BOUNDARIES:
- Discovery → Classification → Requirements are complete
- We know the flow pattern, phases, interaction style
- NOW we can talk about tools with concrete examples
- This creates an intelligent tool configuration
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Present Design Preview
"**Before we configure tools, let me preview what your workflow structure might look like.**
Based on everything we've gathered, here's a rough outline:"
Create a concrete preview showing:
```markdown
## Workflow Structure Preview: {workflow-name}
**Phase 1: Initialization**
- Welcome user, explain the workflow
- Gather any starting inputs
- [Specific to this workflow]
**Phase 2: [Name from requirements]**
- [What happens in this phase]
- [User interaction point]
**Phase 3: [Name from requirements]**
- [What happens in this phase]
- [User interaction point]
**Phase 4: Completion**
- [What happens at the end]
- [Output/final step]
```
"This is just a preview - we'll design the actual steps in detail next. But this gives us context for discussing tools."
**Ask:** "Does this structure feel right? Any major phases I'm missing?"
### 2. Initialize Tools Discussion
"**Now let's configure the tools and integrations for your workflow.**
Since we can see the structure, we can talk about tools concretely: 'Party Mode could fit here in Phase 2 for creative brainstorming...' instead of abstractly."
### 3. Load and Present Available Tools
Load `{commonToolsCsv}` and present by category:
"**Available BMAD Tools:**
**Core Tools:**
- [List from CSV with descriptions]
**Optional Tools:**
- [List from CSV with descriptions]"
### 4. Configure Core Tools WITH Context
Go through each core tool, referencing the preview:
"**Party Mode** - For creative, unrestricted exploration
Looking at your workflow structure, I see potential in:
- [Specific phase from preview] for [specific reason]
Should we include Party Mode? If so, where would it fit best?"
"**Advanced Elicitation** - For deep exploration and quality
This could work well in:
- [Specific phase] for [specific reason]
Should we include Advanced Elicitation? Where would you want quality gates or deeper exploration?"
"**Brainstorming** - For idea generation
In your workflow, this might fit in:
- [Specific phase if applicable]
Should we include Brainstorming?"
### 5. Configure LLM Features WITH Context
"**LLM Features to enhance your workflow:**"
"**Web-Browsing** - For real-time information
Would your workflow benefit from:
- Current data/information
- Research during execution
- Live references
If yes, where in the structure would this be needed?"
"**File I/O** - For reading/writing files
Your workflow [will/won't] need file operations based on:
- [Input requirements from requirements]
- [Output specifications from requirements]
Any specific file operations needed?"
"**Sub-Agents** - For delegating specialized tasks
Could any part of your workflow benefit from:
- Specialized expertise
- Parallel processing
- Focused sub-tasks
Looking at your structure, [specific phase] might benefit..."
"**Sub-Processes** - For parallel workflows
Would any phase benefit from:
- Running multiple processes in parallel
- Coordinating multiple workflows
If so, which phase?"
### 6. Configure Memory Systems
"**Memory and State Management**"
**If continuable from classification:**
"Since your workflow is continuable, it needs to track progress between sessions.
We'll use:
- `stepsCompleted` array in output frontmatter
- `lastStep` tracking
- `step-01b-continue.md` for resuming
Any additional state we need to track?"
**If single-session:**
"Your workflow is single-session, so we'll keep state simple - no complex memory needed."
### 7. External Integrations (Optional)
"**External Integrations** - MCP, databases, APIs
Based on your workflow, are there any external systems it needs to connect to?
- Databases?
- APIs?
- MCP servers?
- Other tools?"
If yes, note installation requirements.
### 8. Installation Assessment
"**Installation and Dependencies**
Some tools require additional setup.
Based on what we've selected:
- [List any tools requiring installation]
- [Assess user comfort level]
Are you comfortable with these installations, or should we consider alternatives?"
### 9. Store Tools Configuration
Update `{workflowPlanFile}`:
```markdown
## Tools Configuration
**Core BMAD Tools:**
- **Party Mode:** [included/excluded] - Integration point: [specific phase/reason]
- **Advanced Elicitation:** [included/excluded] - Integration point: [specific phase/reason]
- **Brainstorming:** [included/excluded] - Integration point: [specific phase/reason]
**LLM Features:**
- **Web-Browsing:** [included/excluded] - Use case: [specific need]
- **File I/O:** [included/excluded] - Operations: [specific needs]
- **Sub-Agents:** [included/excluded] - Use case: [specific need]
- **Sub-Processes:** [included/excluded] - Use case: [specific need]
**Memory:**
- Type: [continuable/single-session]
- Tracking: [stepsCompleted, lastStep, etc.]
**External Integrations:**
- [List any selected with purposes]
**Installation Requirements:**
- [List tools needing installation]
- User preference: [willing/not willing/alternatives]
```
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save tools to plan, update frontmatter, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Design preview presented BEFORE tools discussion
- Tools discussed WITHIN concrete context
- Integration points clearly identified
- User can visualize where tools fit
- All decisions documented in plan
### ❌ SYSTEM FAILURE:
- Configuring tools without design preview
- Abstract tool discussions ("it could go somewhere")
- Not identifying concrete integration points
- Hardcoding tool descriptions instead of using CSV
**Master Rule:** Tools need context. Preview structure first, then configure tools with concrete integration points.

View File

@@ -1,242 +0,0 @@
---
name: 'step-05-plan-review'
description: 'Review the complete workflow plan and approve before design'
nextStepFile: './step-06-design.md'
workflowPlanFile: '{bmb_creations_output_folder}/workflows/{new_workflow_name}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 5: Plan Review and Approval
## STEP GOAL:
To present the complete workflow plan (discovery, classification, requirements, tools) for review and approval before proceeding to the design phase.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect conducting a design review
- ✅ Present the complete plan clearly
- ✅ Solicit feedback and make refinements
- ✅ Get explicit approval before proceeding to design
### Step-Specific Rules:
- 🎯 Focus ONLY on review and refinement
- 🚫 FORBIDDEN to start designing workflow steps in this step
- 💬 Present plan clearly, ask targeted questions
- 🚫 DO NOT proceed to design without user approval
## EXECUTION PROTOCOLS:
- 🎯 Present complete plan from {workflowPlanFile}
- 💾 Capture any modifications or refinements
- 📖 Update frontmatter stepsCompleted when complete
- 🚫 FORBIDDEN to load next step until user approves
## CONTEXT BOUNDARIES:
- Discovery (Step 1) → Classification (Step 2) → Requirements (Step 3) → Tools (Step 4)
- ALL the information needed for design is now captured
- This is the final checkpoint before designing the workflow structure
- Once we proceed to Step 6, we'll be designing actual step files
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Initialize Review
"**Let's review the complete plan before we start designing.**
We've covered a lot of ground. Let me walk you through everything we've decided, and you can tell me what looks right and what needs adjustment."
### 2. Present Complete Plan
Load and present from `{workflowPlanFile}`:
"**Complete Workflow Plan: {workflow-name}**
---
**1. DISCOVERY** (from Step 1)
**Your Vision:**
[Present user's vision]
**Who It's For:**
[Present users/audience]
**Key Insights:**
[Present important context]
---
**2. CLASSIFICATION** (from Step 2)
**The 4 Key Decisions:**
1. **Document Output:** {true/false} - [what it produces]
2. **Module Affiliation:** {standalone/module} - {target path}
3. **Session Type:** {single-session/continuable} - [implications]
4. **Lifecycle Support:** {create-only/tri-modal} - [implications]
**Workflow Name:** {name}
**Target Location:** {path}
---
**3. REQUIREMENTS** (from Step 3)
**Flow Structure:**
- Pattern: {linear/looping/branching/repeating}
- Phases: {list major phases}
- Estimated steps: {count}
**User Interaction:**
- Style: {collaborative/autonomous/guided/mixed}
- Decision points: {where user must choose}
**Inputs:** {required and optional}
**Output:** {type and format}
**Success Criteria:** {what success looks like}
**Instruction Style:** {intent/prescriptive/mixed}
---
**4. TOOLS CONFIGURATION** (from Step 4)
**Core Tools:**
- Party Mode: {included/excluded} - {integration point}
- Advanced Elicitation: {included/excluded} - {integration point}
- Brainstorming: {included/excluded} - {integration point}
**LLM Features:**
- Web-Browsing: {included/excluded}
- File I/O: {included/excluded}
- Sub-Agents: {included/excluded}
- Sub-Processes: {included/excluded}
**Memory:** {continuable/single-session}
---
### 3. Detailed Review by Section
"**Let's go through this systematically. I want your feedback on each area:**"
**A. Vision and Scope (Discovery)**
- "Does the 'Your Vision' section capture what you're trying to build?"
- "Anything we missed in the key insights?"
**B. Structural Decisions (Classification)**
- "Do the 4 key decisions still feel right?"
- "Any second thoughts on continuable vs single-session?"
- "Create-only or tri-modal - still the right call?"
**C. Requirements (Details)**
- "Does the flow structure match what you envisioned?"
- "Are the interaction style and decision points accurate?"
- "Input/output specifications complete?"
- "Success criteria clear?"
**D. Tools (Integrations)**
- "Do the selected tools make sense?"
- "Integration points feel right?"
- "Any tools we should add or remove?"
### 4. Collect Feedback
"**Your feedback:**
For each section above, tell me:
1. What looks good and should stay as-is
2. What needs modification or refinement
3. What's missing that should be added
4. Anything unclear or confusing
**Take your time - this is our last chance to make changes before we start designing the actual workflow.**"
### 5. Process Feedback and Refine
For each feedback item:
- Document the requested change
- Discuss implications on workflow design
- Make the refinement
- Confirm with user
Update `{workflowPlanFile}` with all approved changes.
### 6. Final Confirmation
"**One last check before we proceed to design:**
Based on everything we've discussed:
- [Re-state the workflow's purpose in one sentence]
- [Re-state the key structural decision: continuable/tri-modal]
- [Re-state the flow pattern]
You're approving this plan to move into the actual workflow design phase.
Ready to proceed?"
### 7. Update Plan Status
Update `{workflowPlanFile}` frontmatter:
```yaml
status: APPROVED_FOR_DESIGN
approvedDate: [current date]
```
### 8. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Design
#### EXECUTION RULES:
- ALWAYS halt and wait for user input
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Update plan frontmatter with approval, then load `{nextStepFile}`
- IF Any other: Help user, then redisplay menu
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete plan presented clearly from the plan document
- All 4 sections reviewed systematically
- User feedback collected and incorporated
- User explicitly approves the plan
- Plan status updated to APPROVED_FOR_DESIGN
- Ready to proceed to design phase
### ❌ SYSTEM FAILURE:
- Not loading plan from {workflowPlanFile}
- Skipping review sections
- Not documenting refinements
- Proceeding without explicit approval
- Not updating plan status
**Master Rule:** The plan must be complete and approved before design. This is the gatekeeper step.

View File

@@ -1,329 +0,0 @@
---
name: 'step-06-design'
description: 'Design the workflow structure and step sequence based on gathered requirements, tools configuration, and output format'
nextStepFile: './step-07-foundation.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
frontmatterStandards: '../data/frontmatter-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
inputDiscoveryStandards: '../data/input-discovery-standards.md'
workflowChainingStandards: '../data/workflow-chaining-standards.md'
trimodalWorkflowStructure: '../data/trimodal-workflow-structure.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
---
# Step 6: Workflow Structure Design
## STEP GOAL:
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the approved plan and output format requirements.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring workflow design patterns and architectural expertise
- ✅ User brings their domain requirements and workflow preferences
### Step-Specific Rules:
- 🎯 Focus ONLY on designing structure, not implementation details
- 🚫 FORBIDDEN to write actual step content or code in this step
- 💬 Collaboratively design the flow and sequence
- 🚫 DO NOT finalize design without user agreement
## EXECUTION PROTOCOLS:
- 🎯 Guide collaborative design process
- 💾 After completing design, append to {workflowPlanFile}
- 📖 Update frontmatter stepsCompleted to add this step when completed.
- 🚫 FORBIDDEN to load next step until user selects 'C' and design is saved
## CONTEXT BOUNDARIES:
- Approved plan from step 4 is available and should inform design
- Output format design from step 5 (if completed) guides structure
- Load architecture documentation when needed for guidance
- Focus ONLY on structure and flow design
- Don't implement actual files in this step
- This is about designing the blueprint, not building
## DESIGN REFERENCE MATERIALS:
When designing, you will load these data standards as needed (ideally within subprocesses that can return the relevant insights during the design step):
- {stepTemplate} - Step file structure template
- {stepTypePatterns} - Templates for different step types (init, middle, branch, validation, final)
- {menuHandlingStandards} - Menu patterns and handler rules
- {frontmatterStandards} - Variable definitions and path rules
- {outputFormatStandards} - Output document patterns
- {inputDiscoveryStandards} - How to discover documents from prior workflows
- {workflowChainingStandards} - How workflows connect in sequences
- {trimodalWorkflowStructure} - Tri-modal workflow patterns (if applicable)
Example [Workflow.md](../workflow.md) for reference of a perfect workflow.md with some complex options (not all workflows will offer multiple next step options like this one - most will just auto route right to a step 1 file)
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Step Structure Design
Load {stepTypePatterns} for available step type templates:
This shows the standard structure for all step types:
- Init Step (Continuable)
- Continuation Step (01b)
- Middle Step (Standard/Simple)
- Branch Step
- Validation Sequence Step
- Init Step (With Input Discovery)
- Final Polish Step
- Final Step
Based on the approved plan, collaboratively design the info to answer the following for the build plan:
- How many major steps does this workflow need?
- What is the goal of each step?
- Which steps are optional vs required?
- 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
Load {menuHandlingStandards} for menu pattern options:
Design how users will interact with the workflow:
- Where should users provide input vs where the AI works autonomously?
- What menu pattern does each step need? (Standard A/P/C, Auto-proceed, Custom, Conditional)
- Should there be Advanced Elicitation or Party Mode options?
- How will users know their progress?
- What confirmation points are needed?
### 3. Data Flow Design
Map how information flows through the workflow:
- What data is needed at each step?
- What outputs does each step produce?
- How is state tracked between steps?
- Where are checkpoints and saves needed?
- How are errors or exceptions handled?
### 4. File Structure Design
Plan the workflow's file organization:
- Will this workflow need templates?
- Are there data files required?
- Is a validation checklist needed?
- What supporting files will be useful?
- How will variables be managed?
### 5. Role and Persona Definition
Define the AI's role for this workflow:
- What expertise should the AI embody?
- How should the AI communicate with users?
- What tone and style is appropriate?
- How collaborative vs prescriptive should the AI be?
### 6. Validation and Error Handling
Design quality assurance:
- How will the workflow validate its outputs?
- What happens if a user provides invalid input?
- Are there checkpoints for review?
- How can users recover from errors?
- What constitutes successful completion?
### 6a. Subprocess Optimization Design
Load {subprocessPatterns} to understand subprocess optimization patterns that can save context and improve performance during workflow execution.
Ask the user:
"**Should we design this workflow to leverage subprocess optimization patterns?** Consider:
- **Pattern 1 (Grep/Regex):** Will any step search across many files or documents for patterns?
- **Pattern 2 (Deep Analysis):** Will any step analyze multiple files for prose, logic, quality, or flow?
- **Pattern 3 (Data Operations):** Will any step load large reference data, knowledge bases, or datasets?
- **Pattern 4 (Parallel Execution):** Can any validation or analysis checks run in parallel instead of sequentially?
If **YES** to any of these, we should design those steps with subprocess optimization in mind."
**If subprocess optimization is applicable:**
For each step that could benefit from subprocesses:
- Identify which pattern(s) apply (Pattern 1, 2, 3, or 4)
- Design what the subprocess should return (findings only, not full content)
- Plan graceful fallback for LLMs without subprocess capability
- Document optimization strategy in the build plan
**Example subprocess integration:**
```markdown
### Step-Specific Rules:
- 🎯 Analyze X files for Y - use subprocess per file (Pattern 2)
- 💬 Subprocess returns structured findings, not full content
- ⚙️ If subprocess unavailable: Perform analysis in main thread
```
**Document in the plan:**
For each step identified for subprocess optimization, record:
- Step number and name
- Pattern type(s) to apply
- What the subprocess will analyze
- Expected return structure
- Fallback approach
### 7. Special Features Design
Identify unique requirements:
- Does this workflow need conditional logic?
- Are there branch points based on user choices?
- Should it integrate with other workflows?
- Does it need to handle multiple scenarios?
**Input Discovery:**
If this workflow depends on documents from prior workflows, load {inputDiscoveryStandards}:
- What prior workflow outputs does this workflow need?
- Are these required or optional inputs?
- How will the workflow discover these documents?
**Workflow Chaining:**
If this workflow is part of a sequence, load {workflowChainingStandards}:
- What workflow comes before this one?
- What workflow comes after this one?
- What outputs does this workflow produce for the next?
### 8. Design Review and Refinement
Present the design for review:
- Walk through the complete flow
- Identify potential issues or improvements
- Ensure all requirements are addressed
- Get user agreement on the design
## DESIGN PRINCIPLES TO APPLY:
### Micro-File Architecture
- Keep each step focused and self-contained
- Ensure steps can be loaded independently
- Design for Just-In-Time loading
### Sequential Flow with Clear Progression
- Each step should build on previous work
- Include clear decision points
- Maintain logical progression toward goal
### Menu-Based Interactions
- Include consistent menu patterns
- Provide clear options at decision points
- Allow for conversation within steps
### State Management
- Track progress using `stepsCompleted` array
- Persist state in output file frontmatter
- Support continuation where appropriate
### 9. Document Design in Plan
Append to {workflowPlanFile}:
- Complete step outline with names and purposes
- Flow diagram or sequence description
- Interaction patterns
- File structure requirements
- Special features and handling
### 10. Present MENU OPTIONS
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
- Use menu handling logic section below
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and design is saved will you load {nextStepFile} to begin implementation.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow structure designed collaboratively
- All steps clearly defined and sequenced
- Interaction patterns established
- File structure planned
- User agreement on design
### ❌ SYSTEM FAILURE:
- Designing without user collaboration
- Skipping design principles
- Not documenting design in plan
- Proceeding without user agreement
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -1,238 +0,0 @@
---
name: 'step-07-foundation'
description: 'Create workflow folder structure, workflow.md, and main output template(s)'
nextStepFile: './step-08-build-step-01.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
workflowTemplate: '../templates/workflow-template.md'
outputFormatStandards: '../data/output-format-standards.md'
minimalOutputTemplate: '../templates/minimal-output-template.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 7: Foundation Build
## STEP GOAL:
To create the workflow folder structure, the main workflow.md file, and the primary output template(s) that step files will reference.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Focus ONLY on creating foundation elements (folder, workflow.md, main template)
- 🚫 FORBIDDEN to create step files yet - that comes next
- 💬 Get confirmation before creating each foundation element
- 🚪 CREATE files in the correct target location
## EXECUTION PROTOCOLS:
- 🎯 Create foundation systematically from approved design
- 💾 Document what was created in the plan
- 📖 Update frontmatter stepsCompleted to add this step when completed
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved plan from step 6 guides implementation
- Design specifies: workflow name, continuable or not, document output type, step count
- Load templates and documentation as needed during build
- Follow step-file architecture principles
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Confirm Foundation Readiness
Based on the approved design from step 6, confirm:
"**I have your approved design and I'm ready to create the workflow foundation.**
From your design, I'll be creating:
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Type:** [continuable/single-session]
**Document Output:** [yes/no - template type if yes]
**Estimated Steps:** [number from design]
Ready to proceed with creating the folder structure?"
### 2. Create Folder Structure
Create the workflow folder structure:
```
{targetWorkflowPath}/
├── workflow.md # To be created
├── steps-c/ # Create flow steps
│ ├── step-01-init.md
│ ├── step-01b-continue.md # If continuable
│ └── [remaining steps]
├── steps-v/ # Validate flow steps (to be created later)
├── data/ # Shared reference data
└── templates/ # Output templates
```
**For BMB module workflows:** The target will be `_bmad/custom/src/workflows/{workflow_name}/`
**For other modules:** Check module's custom_workflow_location
Create the folders and confirm structure.
### 3. Generate workflow.md
Load {workflowTemplate} and create workflow.md with:
**Frontmatter:**
```yaml
---
name: '{workflow-name-from-design}'
description: '{description-from-design}'
web_bundle: true
---
```
**Content:**
- Workflow name and description
- Goal statement
- Role definition
- Meta-context (if applicable)
- Initialization sequence pointing to steps-c/step-01-init.md
- Configuration loading instructions
**If tri-modal (Create + Edit + Validate):**
Add mode routing logic to workflow.md:
- IF invoked with -c: Load ./steps-c/step-01-init.md
- IF invoked with -v: Load ./steps-v/step-01-validate.md
- IF invoked with -e: Load ./steps-e/step-01-edit.md
### 4. Create Main Output Template
**Load {outputFormatStandards} to determine template type.**
**From the design, determine:**
- Free-form (recommended) - Minimal frontmatter + progressive append
- Structured - Required sections with flexible content
- Semi-structured - Core sections + optional additions
- Strict - Exact format (rare, compliance/legal)
**For Free-form (most common):**
Create `templates/output-template.md`:
```yaml
---
stepsCompleted: []
lastStep: ''
date: ''
user_name: ''
---
```
If the workflow produces a document with sections:
```markdown
# {{document_title}}
[Content appended progressively by workflow steps]
```
**For Structured/Semi-structured:**
Create template with section placeholders based on design:
```markdown
# {{title}}
## {{section_1}}
[Content to be filled]
## {{section_2}}
[Content to be filled]
```
**For Non-Document Workflows:**
No output template needed. Document this in the plan.
### 5. Document Foundation in Plan
Append to {workflowPlanFile}:
```markdown
## Foundation Build Complete
**Created:**
- Folder structure at: {targetWorkflowPath}
- workflow.md
- Main template: [template-name]
**Configuration:**
- Workflow name: {name}
- Continuable: [yes/no]
- Document output: [yes/no - type]
- Mode: [create-only or tri-modal]
**Next Steps:**
- Step 8: Build step-01 (and step-01b if continuable)
- Step 9: Build remaining steps (repeatable)
```
### 6. Present MENU OPTIONS
Display: **Foundation Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Step 01 Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then redisplay menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save foundation summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and foundation is saved to plan will you load {nextStepFile} to begin building step-01.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Folder structure created in correct location
- workflow.md created with proper frontmatter and initialization
- Main output template created (if document-producing workflow)
- Foundation documented in {workflowPlanFile}
- Frontmatter updated with stepsCompleted
### ❌ SYSTEM FAILURE:
- Creating folders without user confirmation
- Missing mode routing for tri-modal workflows
- Wrong template type for output format
- Not documenting what was created
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -1,377 +0,0 @@
---
name: 'step-08-build-step-01'
description: 'Build step-01-init.md and step-01b-continue.md (if continuable) with any supporting files'
nextStepFile: './step-09-build-next-step.md'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
inputDiscoveryStandards: '../data/input-discovery-standards.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 8: Build Step 01 (and 01b if Continuable)
## STEP GOAL:
To build the first step file(s) for the new workflow - step-01-init.md and step-01b-continue.md if the workflow is continuable - including any supporting files these steps need.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Focus ONLY on building step-01 (and 01b if continuable)
- 🚫 FORBIDDEN to build other steps yet - use step-09 for those
- 💬 Generate step content collaboratively based on approved design
- 🚪 CREATE files in the correct target location
## EXECUTION PROTOCOLS:
- 🎯 Load standards to understand step type patterns
- 💾 Document what was created in the plan
- 📖 Update frontmatter stepsCompleted to add this step when completed
- 🚫 FORBIDDEN to load next step until user selects 'C'
## CONTEXT BOUNDARIES:
- Approved design from step 6 specifies step-01's purpose and type
- Load step type patterns to understand init step structure
- Frontmatter and menu standards ensure compliance
- This is the FIRST step - sets up everything that follows
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Standards for Init Steps
**Load {stepTypePatterns}** to understand the init step patterns:
- Init Step (Non-Continuable) - For single-session workflows
- Init Step (Continuable) - For multi-session workflows
- Init Step (With Input Discovery) - If workflow needs prior documents
**Load {frontmatterStandards}** for variable and path rules.
**Load {menuHandlingStandards}** for menu patterns (init steps typically use auto-proceed or C-only).
### 2. Determine Step 01 Type
From the approved design, determine:
**Is the workflow continuable?**
- **YES:** Use Init Step (Continuable) pattern
- **NO:** Use Init Step (Non-Continuable) pattern
**Does the workflow need input discovery?**
- **YES:** Use Init Step (With Input Discovery) pattern
- **NO:** Standard init pattern
Confirm with user: "Based on your design, step-01 will be [continuable/non-continuable] with [input discovery/standard init]. Is this correct?"
### 3. Build step-01-init.md
**Load {stepTemplate}** for base structure.
Create `steps-c/step-01-init.md` with:
**Frontmatter:**
```yaml
---
name: 'step-01-init'
description: '[from design]'
# File references (ONLY variables used in this step)
nextStepFile: './step-02-[next-step-name].md'
outputFile: '{output_folder}/[output-name].md'
templateFile: '../templates/output-template.md' # If applicable
# Continuation support (if continuable)
continueFile: './step-01b-continue.md' # If continuable
# Input discovery (if needed)
inputDocuments: []
requiredInputCount: [number]
moduleInputFolder: '{module_output_folder}'
inputFilePatterns: ['*-prd.md', '*-ux.md'] # From design
# Tasks (if A/P menu used)
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
```
**Content Structure:**
```markdown
# Step 1: [Step Name From Design]
## STEP GOAL:
[Single sentence goal from design]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are [role from design]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [expertise], user brings [theirs]
- ✅ Together we produce something better
### Step-Specific Rules:
- 🎯 Focus only on [specific task for step-01]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage]
## EXECUTION PROTOCOLS:
- 🎯 [Protocol 1]
- 💾 [Protocol 2 - create/append to output]
- 📖 [Protocol 3 - tracking]
- 🚫 This is the init step - sets up everything
## CONTEXT BOUNDARIES:
- [What's available at step 01]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [none - this is first step]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. [First action - from design]
[Instructions for step-01 - intent-based, not prescriptive]
### 2. [Second action - from design]
[Instructions]
### ... [continue for all actions in step-01]
### N. Present MENU OPTIONS
[Menu from design - typically C-only for init, or A/P/C if appropriate]
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
#### Menu Handling Logic:
- IF C: Create/append to {outputFile} with content, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user, then redisplay menu
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS:
[What success looks like for step-01]
### ❌ SYSTEM FAILURE:
[What failure looks like]
**Master Rule:** Skipping steps is FORBIDDEN.
```
**Customize content based on:**
- The step's goal from the design
- The workflow's role and persona
- Whether it's continuable
- Whether it needs input discovery
- The template type (if document-producing)
### 4. Build step-01b-continue.md (If Continuable)
**If workflow is continuable**, create `steps-c/step-01b-continue.md`:
**Frontmatter:**
```yaml
---
name: 'step-01b-continue'
description: 'Handle workflow continuation from previous session'
outputFile: '{output_folder}/[output-name].md'
workflowFile: '../workflow.md'
nextStepOptions:
step-02: './step-02-[name].md'
step-03: './step-03-[name].md'
# ... add all subsequent steps
---
```
**Content:**
```markdown
# Step 1b: Continue Workflow
## STEP GOAL:
To resume the workflow from where it was left off in a previous session.
## MANDATORY EXECUTION RULES:
[Standard universal rules]
## CONTEXT BOUNDARIES:
- User has run this workflow before
- Output file exists with stepsCompleted array
- Need to route to the correct next step
## MANDATORY SEQUENCE
### 1. Welcome Back
"**Welcome back!** Let me check where we left off..."
### 2. Read stepsCompleted from Output
Load {outputFile} and read frontmatter `stepsCompleted` array.
### 3. Determine Next Step
Find the last completed step and identify the next step to load.
### 4. Route to Correct Step
Load the appropriate next step file based on stepsCompleted.
## MENU OPTIONS
Display continuation status and offer to proceed.
## SUCCESS/FAILURE METRICS
[Standard metrics]
```
### 5. Create Supporting Files (If Needed)
**Does step-01 need any:**
**Small templates?** (inline in step, no separate file needed)
**Data files?** (create if step references CSV data)
**Validation checklists?** (create if step validates something)
**If supporting files are needed, create them in `data/` folder and update step-01 frontmatter to reference them.**
### 5a. Apply Subprocess Optimization (If Designed)
**Check the approved design from step 6:** Was subprocess optimization identified for step-01?
**If YES, apply the appropriate pattern(s):**
Load {subprocessPatterns} and implement the subprocess optimization:
1. **Identify the pattern(s) from the design:**
- Pattern 1: Single subprocess for grep/regex across many files
- Pattern 2: Per-file subprocess for deep analysis
- Pattern 3: Subprocess for data file operations
- Pattern 4: Parallel execution of independent operations
2. **Add subprocess-specific Step-Specific Rules:**
```markdown
### Step-Specific Rules:
- 🎯 [Brief description of which pattern applies]
- 💬 Subprocess must either update report OR return findings to parent
- 🚫 DO NOT BE LAZY - [specific guidance if Pattern 2]
- ⚙️ TOOL/SUBPROCESS FALLBACK: If subprocess unavailable, perform in main thread
```
3. **Implement subprocess directives in the MANDATORY SEQUENCE:**
- Use appropriate subprocess language:
- Pattern 1: "Launch a subprocess that runs [command] across all files, returns [results]"
- Pattern 2: "DO NOT BE LAZY - For EACH file, launch a subprocess that [analyzes], returns [findings]"
- Pattern 3: "Launch a subprocess that loads [data file], performs [operation], returns [results]"
- Pattern 4: "Launch subprocesses in parallel that [operations], aggregate results"
4. **Ensure return patterns are specified:**
- Subprocess updates report directly OR
- Subprocess returns structured findings to parent for aggregation
5. **Verify graceful fallback is documented:**
- Universal fallback rule in Universal Rules
- Step-specific fallback in Step-Specific Rules
- Clear instructions for LLMs without subprocess capability
**If NO subprocess optimization was designed for step-01:**
Skip this section and proceed to document build in plan.
### 6. Document Build in Plan
Append to {workflowPlanFile}:
```markdown
## Step 01 Build Complete
**Created:**
- steps-c/step-01-init.md
- steps-c/step-01b-continue.md [if continuable]
- [any supporting files]
**Step Configuration:**
- Type: [continuable/non-continuable]
- Input Discovery: [yes/no]
- Next Step: step-02-[name]
**Supporting Files:**
- [list any data files, templates created]
```
### 7. Present MENU OPTIONS
Display: **Step 01 Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Next Step Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save build summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and build is saved to plan will you load {nextStepFile} to begin building the next step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- step-01-init.md created with proper structure
- step-01b-continue.md created (if continuable)
- Frontmatter follows {frontmatterStandards}
- Menu handling follows {menuHandlingStandards}
- Step type pattern followed correctly
- Supporting files created (if needed)
- Build documented in plan
### ❌ SYSTEM FAILURE:
- Creating step without following template
- Missing continuation support for continuable workflow
- Wrong menu pattern for step type
- Frontmatter variables not used in step body
- Hardcoded paths instead of variables
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -1,350 +0,0 @@
---
name: 'step-09-build-next-step'
description: 'Build the next step in the workflow sequence - repeatable until all steps are built'
nextStepFile: './step-09-build-next-step.md' # Self-referencing - repeats until complete
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
stepTemplate: '../templates/step-template.md'
stepTypePatterns: '../data/step-type-patterns.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
csvDataFileStandards: '../data/csv-data-file-standards.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Step 9: Build Next Step (Repeatable)
## STEP GOAL:
To build the next step file in the workflow sequence based on the approved design. This step is REPEATABLE - continue running it until all steps from the design have been built.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring implementation expertise and best practices
- ✅ User brings their specific requirements and design approvals
### Step-Specific Rules:
- 🎯 Load the plan to determine WHICH step to build next
- 🚫 FORBIDDEN to skip steps or build out of order
- 💬 Each step is built collaboratively based on approved design
- 🚪 This step REPEATS until all workflow steps are built
## EXECUTION PROTOCOLS:
- 🎯 Always check what's been built, then build the next one
- 💾 Document each step in the plan as it's built
- 📖 Update frontmatter stepsCompleted to add each step when completed
- 🚫 Don't proceed to completion until ALL workflow steps are built
## CONTEXT BOUNDARIES:
- Approved design from step 6 specifies all steps
- The plan tracks which steps have been built
- Load step type patterns to understand each step's structure
- This step continues until the design is fully implemented
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Check Build Status
Load {workflowPlanFile} and check:
**What steps have been built so far?**
- Step 01: Always built in step-08
- Subsequent steps: Track in plan
**What is the NEXT step to build?**
From the design in the plan, identify:
- Step number and name
- Step type (Middle/Standard, Middle/Simple, Branch, Validation, Final Polish, Final)
- This step's goal and purpose
Confirm: "The next step to build is **step-{N}-{name}** which is a [step type]. Its goal is: [goal from design]. Ready to proceed?"
### 2. Load Standards for This Step Type
**Load {stepTypePatterns}** and find the pattern for this step type:
- Middle Step (Standard) - A/P/C menu, collaborative content
- Middle Step (Simple) - C only menu, no A/P
- Branch Step - Custom menu with routing logic
- Validation Sequence - Auto-proceed through checks
- Final Polish Step - Optimizes document built section-by-section
- Final Step - Completion, no next step
**Load {frontmatterStandards}** for variable rules.
**Load {menuHandlingStandards}** for menu patterns.
**Load {outputFormatStandards}** if this step outputs to document.
### 2a. Apply Subprocess Optimization (If Designed for This Step)
**Check the approved design from step 6:** Was subprocess optimization identified for this step?
**If YES, apply the appropriate pattern(s):**
Load {subprocessPatterns} and implement the subprocess optimization for this step:
1. **Identify the pattern(s) from the design for this step:**
- Pattern 1: Single subprocess for grep/regex across many files
- Pattern 2: Per-file subprocess for deep analysis
- Pattern 3: Subprocess for data file operations
- Pattern 4: Parallel execution of independent operations
2. **Add subprocess-specific Step-Specific Rules to this step:**
```markdown
### Step-Specific Rules:
- 🎯 [Brief description of which pattern applies]
- 💬 Subprocess must either update report OR return findings to parent
- 🚫 DO NOT BE LAZY - [specific guidance if Pattern 2]
- ⚙️ TOOL/SUBPROCESS FALLBACK: If subprocess unavailable, perform in main thread
```
3. **Implement subprocess directives in the MANDATORY SEQUENCE:**
- Use appropriate subprocess language:
- Pattern 1: "Launch a subprocess that runs [command] across all files, returns [results]"
- Pattern 2: "DO NOT BE LAZY - For EACH file, launch a subprocess that [analyzes], returns [findings]"
- Pattern 3: "Launch a subprocess that loads [data file], performs [operation], returns [results]"
- Pattern 4: "Launch subprocesses in parallel that [operations], aggregate results"
4. **Ensure return patterns are specified:**
- Subprocess updates report directly OR
- Subprocess returns structured findings to parent for aggregation
5. **Verify graceful fallback is documented:**
- Universal fallback rule in Universal Rules
- Step-specific fallback in Step-Specific Rules
- Clear instructions for LLMs without subprocess capability
**If NO subprocess optimization was designed for this step:**
Skip this section and proceed to build the step file.
### 3. Build the Step File
**Load {stepTemplate}** for base structure.
Create `steps-c/step-{N}-{name}.md` with:
**Frontmatter:**
```yaml
---
name: 'step-{N}-{name}'
description: '[what this step does]'
# File references (ONLY variables used in this step)
nextStepFile: './step-{N+1}-[next-name].md' # Omit for final step
outputFile: '{output_folder}/[output-name].md'
templateFile: '../templates/[template-name].md' # If applicable
# Data files (if this step needs them)
someData: '../data/[data-file].csv' # If applicable
# Tasks (if A/P menu used)
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
```
**Content Structure:** (Same pattern as step-01, customized for this step)
```markdown
# Step {N}: [Step Name From Design]
## STEP GOAL:
[Single sentence goal from design]
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are [role from design]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [expertise for this step], user brings [theirs]
### Step-Specific Rules:
- 🎯 Focus only on [specific task for this step]
- 🚫 FORBIDDEN to [prohibited action]
- 💬 Approach: [how to engage for this step]
## EXECUTION PROTOCOLS:
- 🎯 Follow the MANDATORY SEQUENCE exactly
- 💾 [Protocol - append to output if this step outputs]
- 📖 [Protocol - tracking if applicable]
## CONTEXT BOUNDARIES:
- [What's available at this step]
- Focus: [what to focus on]
- Limits: [boundaries]
- Dependencies: [what this step depends on from previous steps]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. [First action - from design]
[Intent-based instructions for this step]
### 2. [Second action - from design]
[Intent-based instructions]
### ... [continue for all actions in this step]
### N. Present MENU OPTIONS
[Menu based on step type - Standard A/P/C, Simple C-only, Branching, Auto-proceed]
#### EXECUTION RULES:
[Based on menu type from {menuHandlingStandards}]
#### Menu Handling Logic:
[Handler for this step's menu]
## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
### ✅ SUCCESS:
[What success looks like for this step]
### ❌ SYSTEM FAILURE:
[What failure looks like]
**Master Rule:** Skipping steps is FORBIDDEN.
```
**Customize based on:**
- Step type pattern from {stepTypePatterns}
- The step's specific goal and actions from design
- What this step outputs (if document-producing workflow)
- Menu pattern appropriate for step type
### 4. Create Supporting Files (If Needed)
**Does this step need any:**
**Small templates?** - Inline in step content or create small template file
**Data files?** - If step references CSV data, create in `data/` folder
- Load {csvDataFileStandards} for CSV structure
- Create CSV with proper headers and data
**Validation checklists?** - If this step validates something, create checklist
**Section templates?** - If step outputs to specific document section
**If supporting files are created:**
1. Create in appropriate folder (`data/` or `templates/`)
2. Update step frontmatter to reference them
3. Document in plan
### 5. Document Build in Plan
Append to {workflowPlanFile}:
```markdown
## Step {N} Build Complete
**Created:**
- steps-c/step-{N}-{name}.md
- [any supporting files]
**Step Configuration:**
- Type: [step type]
- Outputs to: [output section or file]
- Next Step: [next step or "final step"]
**Supporting Files:**
- [list any data files, templates created for this step]
```
### 6. Check If More Steps Needed
After documenting, check the design:
**Are all steps from the design now built?**
- **YES:** Proceed to completion menu (option 7 below)
- **NO:** Present continuation menu (option 6 below)
### 6a. Present MENU OPTIONS (More Steps Remaining)
Display: **Step {N} Complete - Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Build Next Step
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY build next step when user selects 'C'
- After other menu items execution, return to this menu
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save build summary to {workflowPlanFile}, update frontmatter stepsCompleted, then load, read entire file, then execute {nextStepFile} (which is THIS FILE - self-referencing for next iteration)
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6a-present-menu-options-more-steps-remaining)
### 6b. Present MENU OPTIONS (All Steps Complete)
Display: **All Workflow Steps Built! Select an Option:** [R] Review Built Steps [V] Proceed to Validation [C] Complete Build
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- User selects final action
#### Menu Handling Logic:
- IF R: List all built steps with their paths, allow review, then redisplay menu
- IF V: Save final build summary to {workflowPlanFile}, update frontmatter stepsCompleted to include ALL steps, then load `./step-10-confirmation.md`
- IF C: Same as V (complete and proceed)
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6b-present-menu-options-all-steps-complete)
## CRITICAL STEP COMPLETION NOTE
This step REPEATS until all workflow steps from the design are built. When complete, user selects V or C to proceed to completion.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Each step file created with proper structure for its type
- Frontmatter follows {frontmatterStandards}
- Menu handling follows {menuHandlingStandards}
- Step type pattern followed correctly
- Supporting files created as needed
- Each build documented in plan
- Process continues until ALL design steps are built
### ❌ SYSTEM FAILURE:
- Building steps out of order
- Skipping steps from the design
- Wrong menu pattern for step type
- Not documenting each step in plan
- Proceeding to completion before all steps built
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -1,320 +0,0 @@
---
name: 'step-10-confirmation'
description: 'Confirm workflow completion - validate plan completion or conversion coverage'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
nextStepFile: './step-11-completion.md'
validationWorkflow: '{targetWorkflowPath}/steps-v/step-01-validate.md'
---
# Step 10: Confirmation
## STEP GOAL:
Confirm the workflow build is complete by checking plan metadata. If this is a conversion, verify all original workflow elements are covered. If new, validate all plan requirements were met.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER skip reading the plan file completely
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous converter
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow quality assurance specialist
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring thorough review expertise
- ✅ User confirms everything is complete
### Step-Specific Rules:
- 🎯 Focus on confirmation and verification
- 🚫 FORBIDDEN to skip checking plan metadata
- 💬 MUST read the entire plan to verify completion
- 📋 Different paths for conversion vs new workflows
## EXECUTION PROTOCOLS:
- 🎯 Load and read workflow plan completely
- 💾 Check for conversionFrom metadata field
- 📖 Route to appropriate confirmation path
- 🚫 FORBIDDEN to proceed without verification
## CONTEXT BOUNDARIES:
- All build steps are complete
- This is the final verification before completion
- Conversion workflows get coverage check
- New workflows get plan completion check
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Load Workflow Plan
**Load the workflowPlanFile completely:**
Read `{workflowPlanFile}` entirely to extract:
- Frontmatter metadata (check for `conversionFrom`)
- Discovery notes
- All requirements from classification, design, tools sections
- Original workflow analysis (if conversion)
"**Loading workflow plan for confirmation...**"
### 2. Check Conversion Metadata
**Examine plan frontmatter for `conversionFrom` field:**
```yaml
conversionFrom: '{path to source workflow if this is a conversion}'
```
**IF conversionFrom EXISTS:**
Route to [Conversion Confirmation](#3-conversion-confirmation-path)
**ELSE (no conversionFrom):**
Route to [New Workflow Confirmation](#4-new-workflow-confirmation-path)
---
### 3. Conversion Confirmation Path
**DO NOT BE LAZY - Load and review the ORIGINAL workflow completely:**
"**This is a workflow conversion. Verifying all original elements are covered...**"
**Load the original workflow from conversionFrom path:**
- Read EVERY file from the source workflow
- Extract original goal, steps, instructions
**For each element from the original, verify coverage:**
#### A. Original Goal Coverage
"**Original Goal:** {from source}
**✅ Covered in new workflow:** {how it's covered}
OR
**⚠️ Partial coverage:** {what's covered} - {what might be missing}
OR
**❌ Not covered:** {explain gap}"
#### B. Original Step Coverage
**For EACH step from the original workflow:**
| Original Step | Purpose | Covered In | Status |
|---------------|---------|------------|--------|
| {step name} | {purpose} | {new step location} | ✅ Full / ⚠️ Partial / ❌ Missing |
"**Step-by-step coverage:** {count} of {total} steps fully covered"
#### C. Original Instruction Patterns
**Review how the original workflow instructed the LLM:**
"**Original instruction style:** {describe}
**New workflow instruction style:** {describe}
**Collaborative patterns preserved:** {yes/no + details}
**Key LLM instructions covered:**
{List the key instruction patterns and how they're preserved}"
#### D. Conversion Coverage Summary
Present findings:
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Conversion Coverage Report**
**Source:** {conversionFrom}
**Target:** {targetWorkflowPath}
**Overall Coverage:** {percentage}%
| Category | Total | Covered | Partial | Missing |
|----------|-------|---------|---------|---------|
| Goal | 1 | 1 | 0 | 0 |
| Steps | {count} | {count} | {count} | {count} |
| Instructions | {count} | {count} | {count} | {count} |
| Output | 1 | 1 | 0 | 0 |
---
**Missing Elements:** {count}
{List any gaps found}
**Improvements Made:** {count}
{List enhancements beyond original}
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Does this coverage look complete? Any gaps to address?**
[C] Continue - Coverage is complete
[F] Fix gaps - Address missing elements
[R] Review details - See full comparison"
**Menu Handling Logic:**
- IF C: Proceed to [Completion Handoff](#5-completion-handoff)
- IF F: Return to build steps to address gaps (route to step-09-build-next-step.md)
- IF R: Present detailed step-by-step comparison, then redisplay menu
- IF Any other: help user respond, then redisplay menu
---
### 4. New Workflow Confirmation Path
**This is a new workflow (not a conversion). Validate all plan requirements were met.**
"**Verifying all requirements from the plan were implemented...**"
#### A. Load Plan Requirements
**From workflowPlanFile, extract ALL requirements:**
- Discovery: User's vision, who it's for, what it produces
- Classification: Type, structure, mode decisions
- Requirements: Specific features, inputs, outputs
- Design: Step structure, flow, key decisions
- Tools: Data files, templates, references
#### B. Verify Each Requirement
**For EACH requirement from the plan:**
| Requirement Area | Specified | Implemented | Location | Status |
|------------------|-----------|-------------|----------|--------|
| {area} | {what was specified} | {what was built} | {file/step} | ✅/⚠️/❌ |
#### C. Plan Completion Summary
Present findings:
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Plan Completion Report**
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Overall Completion:** {percentage}%
| Requirement Area | Specified | Implemented | Status |
|------------------|-----------|-------------|--------|
| Discovery Vision | {from plan} | {what was built} | ✅/⚠️ |
| Workflow Type | {from plan} | {what was built} | ✅/⚠️ |
| Structure | {from plan} | {what was built} | ✅/⚠️ |
| Key Features | {from plan} | {what was built} | ✅/⚠️ |
| Data/Tools | {from plan} | {what was built} | ✅/⚠️ |
---
**Missing Requirements:** {count}
{List any unmet requirements}
**Beyond Plan:** {count}
{List any additional features added during build}
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
**Does this implementation match your vision?**
[C] Continue - Implementation is complete
[F] Fix gaps - Address missing requirements
[R] Review details - See full comparison"
**Menu Handling Logic:**
- IF C: Proceed to [Completion Handoff](#5-completion-handoff)
- IF F: Return to build steps to address gaps (route to step-09-build-next-step.md)
- IF R: Present detailed requirement-by-requirement comparison, then redisplay menu
- IF Any other: help user respond, then redisplay menu
---
### 5. Completion Handoff
**After user confirms coverage/completion:**
Update `{workflowPlanFile}` frontmatter:
```yaml
status: CONFIRMED
confirmationDate: {current date}
confirmationType: {conversion / new_workflow}
coverageStatus: {complete / gaps_accepted}
```
Proceed to [Validation Offer](#6-validation-offer).
---
### 6. Validation Offer
"**✅ Workflow build confirmed!**
**Before using your workflow, I recommend running extensive validation.**
The validation phase will systematically check:
- File structure & size
- Frontmatter compliance
- Menu handling patterns
- Step type patterns
- Output format standards
- Instruction style
- Overall quality
**Would you like to run validation?**"
Display: **Build Confirmed! Select an Option:** [V] Start Validation [S] Skip - Complete Now
#### Menu Handling Logic:
- IF V: "Loading validation phase..." → Save confirmation status, update frontmatter, then load, read entire file, then execute {validationWorkflow}
- IF S: "Skipping validation. Proceeding to completion..." → Load, read entire file, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ALWAYS check plan metadata for conversionFrom field. Route to appropriate confirmation path. Only proceed after user confirms coverage/completion is satisfactory.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Plan file loaded completely
- ConversionFrom metadata checked
- Appropriate confirmation path executed
- Original workflow reviewed (if conversion)
- Plan requirements verified (if new)
- Coverage/completion report presented clearly
- User confirms and proceeds
### ❌ SYSTEM FAILURE:
- Not loading plan file completely
- Not checking conversionFrom metadata
- Skipping original workflow review (conversion)
- Not verifying plan requirements (new)
- Proceeding without user confirmation
- Missing gaps in coverage
**Master Rule:** Check conversionFrom metadata first. For conversions, REVIEW THE ORIGINAL COMPLETELY. For new workflows, VERIFY ALL PLAN REQUIREMENTS. Only proceed after user confirms.

View File

@@ -1,191 +0,0 @@
---
name: 'step-11-completion'
description: 'Complete the workflow creation and provide next steps'
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
---
# Step 11: Completion
## STEP GOAL:
Complete the workflow creation process with a summary of what was built and next steps guidance.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER modify the completed workflow at this stage
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are a workflow architect and systems designer
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring completion expertise
- ✅ User decides next steps
### Step-Specific Rules:
- 🎯 Focus ONLY on summary and next steps
- 🚫 FORBIDDEN to modify the built workflow
- 💬 Present options clearly
- 🚪 This is the final step
## EXECUTION PROTOCOLS:
- 🎯 Present completion summary
- 💾 Finalize plan document
- 📖 Provide usage guidance
- 🚫 No more modifications at this stage
## CONTEXT BOUNDARIES:
- All workflow steps have been built
- Confirmation has been completed
- Validation may or may not have been run
- This is the final step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
### 1. Present Completion Summary
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
# Workflow Creation Complete!
**Workflow:** {new_workflow_name}
**Location:** {targetWorkflowPath}
**Created:** {current date}
---
## What Was Built
**Workflow Structure:**
- **Type:** [continuable/single-session]
- **Mode:** [create-only/tri-modal]
- **Steps Created:** [count]
**Files Created:**
- workflow.md (entry point)
- [count] step files in steps-c/
- [count] validation files in steps-v/ (if tri-modal)
- [count] edit files in steps-e/ (if tri-modal)
- [count] supporting files in data/
- [count] templates in templates/
---
## Your Workflow Is Ready!
**To use your new workflow:**
1. Navigate to: {targetWorkflowPath}
2. Load workflow.md to start
3. Follow the step-by-step instructions
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**"
### 2. Update Plan with Completion Status
Update {workflowPlanFile} frontmatter:
```yaml
---
workflowName: {new_workflow_name}
creationDate: [original creation date]
completionDate: [current date]
status: COMPLETE
stepsCompleted: ['step-01-discovery' or 'step-00-conversion', 'step-02-classification', 'step-03-requirements', 'step-04-tools', 'step-05-plan-review', 'step-06-design', 'step-07-foundation', 'step-08-build-step-01', 'step-09-build-next-step', 'step-10-confirmation', 'step-11-completion']
---
```
### 3. Provide Next Steps Guidance
"**Next Steps:**
**Test your workflow:**
- Run through it end-to-end
- Try with sample data
- Verify all steps work as expected
**Get user feedback:**
- If others will use it, have them test
- Gather feedback on facilitation
- Note any friction points
**Future maintenance:**
- Use validation mode to check compliance
- Use edit mode to make changes
- Validation can be run anytime
**Resources:**
- **Validate later:** Load {targetWorkflowPath}/workflow.md with -v flag
- **Edit later:** Load {targetWorkflowPath}/workflow.md with -e flag
- **Build more:** Use create workflow mode for new workflows"
### 4. Conversion-Specific Summary (If Applicable)
**Check workflowPlanFile frontmatter for `conversionFrom`:**
**IF this was a conversion:**
"**Conversion Complete!**
**Original workflow:** {conversionFrom}
**New location:** {targetWorkflowPath}
**Preserved:**
- Original goal and purpose
- All {count} steps
- Key instruction patterns
- Output format
**Improvements made:**
- BMAD compliance
- Better structure
- Enhanced collaboration
- Standards adherence
**Review the conversion report** in the confirmation step for full details."
### 5. Final Completion Message
"**Thank you for using BMAD Workflow Creator!**
Your workflow **{new_workflow_name}** is complete and ready to use.
**Workflow location:** {targetWorkflowPath}/workflow.md
Happy workflowing! ✅"
## CRITICAL STEP COMPLETION NOTE
This is the final step. Present completion summary, finalize plan, and provide next steps. No further modifications.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Completion summary presented clearly
- Plan finalized with COMPLETE status
- Usage guidance provided
- Conversion specifics noted (if applicable)
- Session ends positively
### ❌ SYSTEM FAILURE:
- Not providing clear summary
- Not finalizing plan status
- Missing usage guidance
**Master Rule:** End on a positive note with clear summary and next steps. The workflow is ready to use.

View File

@@ -1,237 +0,0 @@
---
name: 'step-e-01-assess-workflow'
description: 'Load target workflow, check compliance, check for validation report, offer validation if needed'
# File References
nextStepFile: './step-e-02-discover-edits.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
validationWorkflow: '../steps-v/step-01-validate.md'
conversionStep: '../steps-c/step-00-conversion.md'
---
# Edit Step 1: Assess Workflow
## STEP GOAL:
Load the target workflow, check if it follows BMAD step-file architecture, check for existing validation report, and offer to run validation if needed.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus ONLY on assessment - no editing yet
- 🚫 FORBIDDEN to proceed without loading workflow completely
- 💬 Explain findings clearly and get user confirmation
- 🚪 ROUTE non-compliant workflows to create flow
## EXECUTION PROTOCOLS:
- 🎯 Load and analyze target workflow
- 💾 Create edit plan document
- 📖 Check for validation report
- 🚫 FORBIDDEN to proceed without user confirmation
## CONTEXT BOUNDARIES:
- User provides workflow path from workflow.md routing
- Focus: Assessment and routing
- This is NOT about making changes yet
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Get Workflow Path
From the user input provided by workflow.md routing, extract:
- `targetWorkflowPath` - path to workflow.md file
- `workflowName` - derived from path
**If path was not provided:**
"Which workflow would you like to edit? Please provide the path to the workflow.md file."
### 2. Load Workflow Completely
**Load these files:**
1. `{targetWorkflowPath}/workflow.md` - Must exist - if the user indicates is something else, ask if this is a conversion to the compliant v6 format
2. Check for step folders: `steps*`
3. Check for `data/` folder
4. Check for `templates/` folder
### 3. Compliance Check
**Determine if workflow is BMAD-compliant:**
**Compliant workflow has:**
- ✅ workflow.md file exists at root
- ✅ At least one step folder exists (steps-c/, steps-v/, or steps-e/)
- ✅ Step files use markdown format (.md)
- ✅ workflow.md has frontmatter (name, description)
**Non-compliant workflow:**
- ❌ No workflow.md file
- ❌ Has workflow.yaml or instructions.md (legacy format)
- ❌ No step folders
- ❌ Step files are not markdown
### 4. Route Based on Compliance
**IF NON-COMPLIANT:**
"**Workflow Assessment Result: Non-Compliant Format**
I found that this workflow does not follow BMAD step-file architecture:
- [Describe what was found - e.g., legacy format, missing workflow.md, etc.]
**Recommendation:** This workflow should be converted using the create workflow process. The create workflow can use your existing workflow as input discovery material to build a new compliant workflow.
**Would you like to:**
1. **[C]onvert to Compliant Workflow** - Use existing workflow as input to build compliant version
2. **[E]xplore manual conversion** - I can explain what needs to change
3. **[X] Exit** - Cancel this operation
#### Menu Handling Logic:
- IF C: Route to create workflow conversion mode → Load {conversionStep} with sourceWorkflowPath set to {targetWorkflowPath}
- IF E: Explain conversion requirements, then redisplay menu
- IF X: Exit with guidance
- IF Any other: help user, then redisplay menu"
**IF COMPLIANT:**
"**Workflow Assessment Result: Compliant Format**
This workflow follows BMAD step-file architecture:
- ✅ workflow.md found
- ✅ Step folders: [list which ones exist]
- ✅ Data folder: [yes/no]
- ✅ Templates folder: [yes/no]"
Continue to step 5.
### 5. Check for Validation Report
**Look for validation report:**
- Check `{targetWorkflowPath}/validation-report-{workflow_name}.md`
- Check if report exists and read completion status
**IF NO VALIDATION REPORT EXISTS:**
"This workflow has not been validated yet.
**Recommendation:** Running validation first can help identify issues before editing. Would you like to:
1. **[V]alidate first** - Run comprehensive validation, then proceed with edits
2. **[S]kip validation** - Proceed directly to editing
#### Menu Handling Logic:
- IF V: Load, read entirely, then execute {validationWorkflow}. After validation completes, return to this step and proceed to step 6.
- IF S: Proceed directly to step 6 (Discover Edits)
- IF Any other: help user, then redisplay menu"
**IF VALIDATION REPORT EXISTS:**
Read the validation report and note:
- Overall status (COMPLETE/INCOMPLETE)
- Critical issues count
- Warning issues count
"**Existing Validation Report Found:**
- Status: [status]
- Critical Issues: [count]
- Warnings: [count]
I'll keep this report in mind during editing."
Continue to step 6.
### 6. Create Edit Plan Document
**Initialize edit plan:**
```markdown
---
mode: edit
targetWorkflowPath: '{targetWorkflowPath}'
workflowName: '{workflow_name}'
editSessionDate: '{current-date}'
stepsCompleted:
- step-e-01-assess-workflow.md
hasValidationReport: [true/false]
validationStatus: [from report if exists]
---
# Edit Plan: {workflow_name}
## Workflow Snapshot
**Path:** {targetWorkflowPath}
**Format:** BMAD Compliant ✅
**Step Folders:** [list found]
## Validation Status
[If report exists: summary of validation status]
[If no report: No validation run yet]
---
## Edit Goals
*To be populated in next step*
---
## Edits Applied
*To track changes made*
```
Write to `{editPlan}`.
### 7. Present MENU OPTIONS
Display: "**Assessment Complete. Select an Option:** [C] Continue to Discovery"
#### Menu Handling Logic:
- IF C: Update editPlan, then load, read entire file, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN user selects [C] and edit plan is created, will you then load and read fully `{nextStepFile}` to execute and begin edit discovery.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow loaded completely
- Compliance status determined
- Non-compliant workflows routed to create flow
- Edit plan document created
- Validation report checked
- User confirmed to proceed
### ❌ SYSTEM FAILURE:
- Not loading workflow completely
- Misclassifying non-compliant workflow as compliant
- Not routing non-compliant to create flow
- Not checking for validation report
- Not creating edit plan
**Master Rule:** Assessment must be thorough. Non-compliant workflows MUST be routed to create flow. Always check for validation report before editing.

View File

@@ -1,248 +0,0 @@
---
name: 'step-e-02-discover-edits'
description: 'Discover what user wants to change - fix validation issues, make changes, or both'
# File References
nextStepFile: './step-e-03-fix-validation.md'
directEditStep: './step-e-04-direct-edit.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
validationReport: '{targetWorkflowPath}/validation-report-{workflow_name}.md'
---
# Edit Step 2: Discover Edits
## STEP GOAL:
Discover what the user wants to do: fix validation issues, make specific changes, or both. Document edit goals in the edit plan.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER assume what edits are needed
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus ONLY on understanding edit goals
- 🚫 FORBIDDEN to make any modifications yet
- 💬 Ask clarifying questions
- 🚪 CATEGORIZE edits by type
## EXECUTION PROTOCOLS:
- 🎯 Guide discovery conversation
- 💾 Document edit goals in edit plan
- 📖 Determine which next step to load
- 🚫 FORBIDDEN to proceed without user confirmation
## CONTEXT BOUNDARIES:
- Edit plan from previous step provides context
- Validation report (if exists) provides issues to fix
- Focus: What does user want to change?
- This is discovery, not implementation
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Edit Plan Context
**Load the editPlan file:**
Read `{editPlan}` to understand the workflow context and validation status.
### 2. Determine Discovery Approach
**IF validation report exists AND has issues:**
Present fix-or-change options (step 3a)
**ELSE (no validation report or no issues):**
Present direct change options (step 3b)
---
### 3a. Discovery With Validation Issues
**IF validation report exists with issues:**
"**I found an existing validation report for this workflow.**
**Validation Summary:**
- Status: {status from report}
- Critical Issues: {count}
- Warnings: {count}
**What would you like to do?**
**[F]ix Validation Issues** - Systematically fix issues found in validation
**[C]hange Something** - Make a specific change (add feature, modify step, etc.)
**[B]oth** - Fix validation issues, then make a change
**[R]eview Report** - See detailed validation findings first
#### Menu Handling Logic:
- IF F: Proceed to [Document Fix Goals](#4-document-fix-goals), then route to {nextStepFile}
- IF C: Proceed to [Document Change Goals](#3b-discovery-for-direct-change)
- IF B: Document both fix and change goals, then route to {nextStepFile} for fixes first
- IF R: Present key findings from validation report, then redisplay this menu
- IF Any other: help user, then redisplay menu"
---
### 3b. Discovery For Direct Change
**IF no validation report or no issues:**
"**What would you like to change about this workflow?**
I can help you modify:
**[W]orkflow.md** - Goal, role, initialization, routing
**[S]tep Files** - Add, remove, or modify steps
**[D]ata Files** - Add or modify reference data in data/ folder
**[T]emplates** - Add or modify output templates
**[M]ultiple** - Changes across multiple areas
**[O]ther** - Something else
Which areas would you like to edit?"
#### For Each Selected Category:
**If Workflow.md selected:**
- "What aspects need change?"
- Goal or description?
- Role definition?
- Architecture principles?
- Initialization/routing?
**If Step Files selected:**
- "What type of step changes?"
- Add new step?
- Remove existing step?
- Modify step content?
- Reorder steps?
**If Data Files selected:**
- "What data changes?"
- Add new data file?
- Modify existing data?
- Add/remove data entries?
**If Templates selected:**
- "What template changes?"
- Add new template?
- Modify template structure?
- Change variable references?"
**If Multiple selected:**
- Walk through each area systematically
**If Other selected:**
- "Describe what you'd like to change..."
---
### 4. Document Fix Goals (For Validation Issues)
**Append to editPlan:**
```markdown
## Edit Goals
### Fix Validation Issues
**Priority: High** - These issues prevent compliance
**Critical Issues to Fix:**
- [ ] {issue from validation report}
- [ ] {issue from validation report}
**Warnings to Address:**
- [ ] {warning from validation report}
- [ ] {warning from validation report}
```
---
### 5. Document Change Goals
**Append to editPlan:**
```markdown
### Direct Changes
**Category:** [workflow.md / step files / data / templates / other]
**Changes Requested:**
- [ ] {specific change description}
- [ ] {specific change description}
**Rationale:**
{user's explanation of why this change is needed}
```
---
### 6. Confirm and Route
**Present summary for confirmation:**
"**Here's what I heard you want to do:**
{Summarize all edit goals clearly}
**Did I capture everything correctly?**
- [C] Yes, continue
- [M] Modify the plan
- [X] Cancel"
#### Menu Handling Logic:
- IF C: Update editPlan stepsCompleted, then route based on goals:
- **If Fix goals only**: Load, read entirely, then execute {nextStepFile} (fix-validation)
- **If Change goals only**: Load, read entirely, then execute {directEditStep}
- **If Both**: Load, read entirely, then execute {nextStepFile} (fix first, then direct edit after)
- IF M: Return to relevant discovery section
- IF X: Exit with explanation
- IF Any other: help user, then redisplay menu
### 7. Present MENU OPTIONS (Final)
Display: "**Edit Goals Confirmed. Select an Option:** [C] Continue to Edits"
#### Menu Handling Logic:
- IF C: Save editPlan with confirmed goals, then load appropriate next step based on [Route Based on Goals](#6-confirm-and-route)
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN user confirms goals and routing is determined, will you then load and read fully the appropriate next step file to execute.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Edit goals clearly documented
- User confirmed the plan
- Routing determined (fix vs direct vs both)
- Edit plan updated with goals
- Appropriate next step selected
### ❌ SYSTEM FAILURE:
- Not documenting edit goals
- Routing to wrong next step
- Not getting user confirmation
- Missing changes user mentioned
**Master Rule:** Discovery must be thorough. Document all goals. Route correctly based on whether fixes, changes, or both are needed.

View File

@@ -1,252 +0,0 @@
---
name: 'step-e-03-fix-validation'
description: 'Systematically fix validation issues from validation report'
# File References
nextStepFile: './step-e-05-apply-edit.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
validationReport: '{targetWorkflowPath}/validation-report-{workflow_name}.md'
# Standards References
architecture: '../data/architecture.md'
stepFileRules: '../data/step-file-rules.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
stepTypePatterns: '../data/step-type-patterns.md'
---
# Edit Step 3: Fix Validation Issues
## STEP GOAL:
Systematically fix all issues identified in the validation report, working through each issue with user approval and loading relevant standards.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER make changes without user approval
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus on fixing validation issues systematically
- 🚫 FORBIDDEN to skip issues or fix without approval
- 💬 Explain each issue and proposed fix
- 📋 Load relevant standards for each fix type
## EXECUTION PROTOCOLS:
- 🎯 Work through issues systematically
- 💾 Document each fix in edit plan
- 📖 Load appropriate standards for each issue type
- 🚫 FORBIDDEN to proceed without user approval for each fix
## CONTEXT BOUNDARIES:
- Validation report provides list of issues
- Edit plan documents fix goals
- Focus: Fix each issue with standards adherence
- This is systematic remediation, not creative editing
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Context Files
**Load these files first:**
1. `{editPlan}` - Review fix goals
2. `{validationReport}` - Get full list of issues
### 2. Organize Issues by Type
**From validation report, categorize issues:**
| Issue Type | Standard File | Count |
|------------|---------------|-------|
| workflow.md violations | {architecture} | |
| Step file structure | {stepFileRules} | |
| Frontmatter issues | {frontmatterStandards} | |
| Menu handling | {menuHandlingStandards} | |
| Output format | {outputFormatStandards} | |
| Step type issues | {stepTypePatterns} | |
### 3. Work Through Issues Systematically
**For EACH issue in order of severity (Critical → Warning):**
#### A. Load Relevant Standard
**Before proposing fix, load the relevant standard file:**
- If workflow.md issue → Load {architecture}
- If step file issue → Load {stepFileRules}
- If frontmatter issue → Load {frontmatterStandards}
- If menu issue → Load {menuHandlingStandards}
- If output issue → Load {outputFormatStandards}
- If step type issue → Load {stepTypePatterns}
#### B. Explain the Issue
"**Issue: [{issue type}] {file}:{location if applicable}**
**What the validation found:**
{Quote the validation finding}
**Why this is a problem:**
{Explain the impact based on the standard}
**Standard reference:**
{Cite the specific standard from the loaded file}"
#### C. Propose Fix
"**Proposed fix:**
{Specific change needed}
**This will:**
- ✅ Fix the compliance issue
- ✅ Align with: {specific standard}
- ⚠️ Potential impact: {any side effects}
**Should I apply this fix?**"
#### D. Get User Approval
Wait for user response:
- **Yes/Y** - Apply the fix
- **No/N** - Skip this issue (document why)
- **Modify** - User suggests alternative approach
- **Explain** - Provide more detail
#### E. Apply Fix (If Approved)
**Load the target file, make the change:**
```markdown
**Applying fix to: {file}**
**Before:**
{show relevant section}
**After:**
{show modified section}
**Fix applied.** ✅"
```
**Update editPlan:**
```markdown
### Fixes Applied
**[{issue type}]** {file}
- ✅ Fixed: {description}
- Standard: {standard reference}
- User approved: Yes
```
### 4. Handle Skip/Modify Responses
**IF user skips an issue:**
"**Issue skipped.**
Documenting in edit plan:
- [{issue type}] {file} - SKIPPED per user request
- Reason: {user's reason if provided}
**Note:** This issue will remain in the validation report.
Continue to next issue?"
**IF user wants to modify the fix:**
Discuss alternative approach, get agreement, then apply modified fix.
### 5. After All Issues Complete
**Present summary:**
"**Validation Fix Summary:**
**Total Issues Found:** {count}
**Fixed:** {count}
**Skipped:** {count}
**Modified:** {count}
**Remaining Issues:** {list any skipped or remaining warnings}
**Files Modified:**
- {file1}
- {file2}
- etc."
### 6. Check for Direct Edit Goals
**Load editPlan and check:**
**IF edit plan includes direct change goals (beyond validation fixes):**
"Your edit plan also includes direct changes. After we apply these validation fixes, we'll proceed to those changes."
Update editPlan frontmatter:
```yaml
validationFixesComplete: true
```
Then route to {nextStepFile} for direct edits.
**ELSE (no direct changes - validation fixes only):**
"Validation fixes are complete! Would you like to:
1. **[R]e-run validation** - Verify all fixes are working
2. **[C]omplete** - Finish editing with these fixes
3. **[M]ake additional changes** - Add more edits"
#### Menu Handling Logic:
- IF R: Run validation workflow, then return to this step
- IF C: Route to step-e-07-complete.md
- IF M: Route to step-e-02-discover-edits.md
- IF Any other: help user, then redisplay menu
### 7. Present MENU OPTIONS (If Proceeding)
Display: "**Validation Fixes Applied. Select an Option:** [C] Continue"
#### Menu Handling Logic:
- IF C: Update editPlan stepsCompleted, then load, read entirely, then execute appropriate next step
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN all validation issues are addressed (fixed, skipped, or documented) and user confirms, will you then route to the appropriate next step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All issues presented to user systematically
- Relevant standards loaded for each issue
- User approval obtained for each fix
- Fixes applied correctly
- Edit plan updated with all changes
- Files properly modified
### ❌ SYSTEM FAILURE:
- Skipping issues without user approval
- Not loading relevant standards
- Making changes without user confirmation
- Not documenting fixes in edit plan
- Applying fixes incorrectly
**Master Rule:** Work through issues systematically. Load standards for each issue type. Get explicit approval before applying any fix.

View File

@@ -1,275 +0,0 @@
---
name: 'step-e-04-direct-edit'
description: 'Apply direct user-requested changes to workflow'
# File References
nextStepFile: './step-e-05-apply-edit.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
# Standards References
architecture: '../data/architecture.md'
stepFileRules: '../data/step-file-rules.md'
frontmatterStandards: '../data/frontmatter-standards.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
outputFormatStandards: '../data/output-format-standards.md'
stepTypePatterns: '../data/step-type-patterns.md'
workflowTypeCriteria: '../data/workflow-type-criteria.md'
inputDiscoveryStandards: '../data/input-discovery-standards.md'
csvDataFileStandards: '../data/csv-data-file-standards.md'
intentVsPrescriptive: '../data/intent-vs-prescriptive-spectrum.md'
---
# Edit Step 4: Direct Edit
## STEP GOAL:
Apply direct user-requested changes to the workflow, loading relevant standards and checking for non-compliance during editing.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER make changes without user approval
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus on user-requested changes
- 🚫 FORBIDDEN to make changes without approval
- 💬 Check for non-compliance while editing
- 📋 Load relevant standards for each change type
## EXECUTION PROTOCOLS:
- 🎯 Work through each requested change
- 💾 Document each change in edit plan
- 📖 Load appropriate standards for each change type
- 🚫 IF non-compliance found: offer to fix before proceeding
## CONTEXT BOUNDARIES:
- Edit plan contains direct change goals
- Focus: Apply user's requested changes
- Must check for compliance issues during edits
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Edit Plan
**Load the editPlan:**
Read `{editPlan}` to review direct change goals from step 2.
### 2. For Each Direct Change Goal
**Work through each change systematically:**
#### A. Identify Change Type and Load Standards
**For workflow.md changes:**
- Load {architecture}
**For step file changes:**
- Load {stepFileRules}
- Load {stepTypePatterns}
- Load {intentVsPrescriptive}
**For frontmatter changes:**
- Load {frontmatterStandards}
**For menu changes:**
- Load {menuHandlingStandards}
**For output/template changes:**
- Load {outputFormatStandards}
**For data file changes:**
- Load {csvDataFileStandards}
**For workflow type changes:**
- Load {workflowTypeCriteria}
**For discovery/input changes:**
- Load {inputDiscoveryStandards}
#### B. Load Target File and Check Compliance
**Load the file to be edited and review against standards:**
"**Loading: {filename}**
**Standard: {standard file loaded}**
**Checking file against standards before making your change...**"
**IF NON-COMPLIANCE FOUND:**
"**⚠️ Compliance Issue Detected**
Before I apply your change, I noticed this file is not fully compliant with {standard}:
**Issue:** {describe the non-compliance}
**This could cause:** {explain impact}
**Should I fix this compliance issue before applying your change?**
1. **[F]ix first** - Fix compliance, then apply your change
2. **[C]ontinue anyway** - Apply your change without fixing
3. **[E]xplain more** - More details about the issue
#### Menu Handling Logic:
- IF F: Fix compliance first, then proceed to apply change
- IF C: Document user accepted risk, proceed with change
- IF E: Provide more details, then redisplay menu
- IF Any other: help user, then redisplay menu"
**IF COMPLIANT:**
"**File is compliant.** Proceeding with your change."
#### C. Present Current State and Proposed Change
"**Current state of: {filename}**
{show relevant section}
**Your requested change:**
{summarize the change from edit plan}
**Proposed modification:**
{show how the change will be made}
**Should I apply this change?**"
Wait for user approval.
#### D. Apply Change (If Approved)
**Load the file, make the change:**
```markdown
**Applying change to: {filename}**
**Before:**
{show relevant section}
**After:**
{show modified section}
**Change applied.** ✅"
```
**Update editPlan:**
```markdown
### Direct Changes Applied
**[{change type}]** {filename}
- ✅ Changed: {description}
- User approved: Yes
- Compliance check: Passed/Fixed/Accepted risk
```
### 3. Handle Common Change Patterns
#### Adding a New Step
1. Load {stepFileRules}, {stepTypePatterns}, {intentVsPrescriptive}
2. Check existing step numbering
3. Determine appropriate step type
4. Create step file with proper structure
5. Update nextStepFile references in adjacent steps
6. Verify menu handling compliance
#### Removing a Step
1. Load {architecture}
2. Check if step is referenced by other steps
3. Update nextStepFile in previous step
4. Confirm with user about impact
5. Remove step file
6. Verify no broken references
#### Modifying workflow.md
1. Load {architecture}
2. Check for progressive disclosure compliance (no step listings!)
3. Update goal/role/routing as requested
4. Ensure last section is routing
5. Verify frontmatter completeness
#### Adding/Modifying Data Files
1. Load {csvDataFileStandards}
2. Check file size (warn if >500 lines)
3. Verify CSV format if applicable
4. Ensure proper headers
5. Update step frontmatter references
#### Adding/Modifying Templates
1. Load {outputFormatStandards}
2. Determine template type
3. Ensure variable consistency
4. Update step frontmatter references
### 4. After All Changes Complete
**Present summary:**
"**Direct Edit Summary:**
**Total Changes Requested:** {count}
**Applied:** {count}
**Skipped:** {count}
**Modified:** {count}
**Compliance Issues Found During Editing:** {count}
- Fixed: {count}
- User accepted risk: {count}
**Files Modified:**
- {file1}
- {file2}
- etc."
### 5. Present MENU OPTIONS
Display: "**Direct Edits Applied. Select an Option:** [C] Continue"
#### Menu Handling Logic:
- IF C: Update editPlan stepsCompleted, then load, read entirely, then execute {nextStepFile}
- IF Any other: help user respond, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN all direct changes are applied (or documented) and user confirms, will you then load and read fully `{nextStepFile}` to execute.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All requested changes presented to user
- Relevant standards loaded for each change
- Compliance checked before each change
- User approval obtained for each change
- Non-compliance found and offered fix
- Changes applied correctly
- Edit plan updated
### ❌ SYSTEM FAILURE:
- Not loading relevant standards
- Not checking compliance before editing
- Making changes without user approval
- Missing non-compliance issues
- Not documenting changes
**Master Rule:** Load standards for each change type. Check compliance BEFORE applying changes. Offer to fix non-compliance when found.

View File

@@ -1,154 +0,0 @@
---
name: 'step-e-05-apply-edit'
description: 'Offer validation after edits, complete or continue editing'
# File References
nextStepFile: './step-e-06-validate-after.md'
completeStep: './step-e-07-complete.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
validationWorkflow: '../steps-v/step-01-validate.md'
---
# Edit Step 5: Post-Edit Options
## STEP GOAL:
Present options after edits are applied: run validation, make more edits, or complete.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus on next steps after edits
- 💬 Present clear options
- 🚪 Route based on user choice
## EXECUTION PROTOCOLS:
- 🎯 Present post-edit options
- 💾 Update edit plan if needed
- 📖 Route to appropriate next step
## CONTEXT BOUNDARIES:
- Edits have been applied (validation fixes, direct changes, or both)
- Focus: What's next?
- This is a routing step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Edit Plan
**Load the editPlan:**
Read `{editPlan}` to understand what edits were applied.
### 2. Present Edit Summary
"**Edit Session Summary:**
**Workflow:** {workflow_name}
**Path:** {targetWorkflowPath}
**Edits Applied:**
{Summarize from edit plan}
**Files Modified:**
{List files changed}
**Compliance Status:**
{Any compliance issues found and fixed}
---
**What would you like to do next?**
**[V]alidate** - Run comprehensive validation to verify all changes
**[M]ore edits** - Make additional changes
**[C]omplete** - Finish editing (without validation)
**[R]eview changes** - See detailed change log"
### 3. Menu Handling Logic
- **IF V:** Load, read entirely, then execute {validationWorkflow}. After validation completes, return to this step.
- **IF M:** Route to step-e-02-discover-edits.md for more changes
- **IF C:** Load, read entirely, then execute {completeStep}
- **IF R:** Present detailed edit log from editPlan, then redisplay this menu
- **IF Any other:** help user respond, then redisplay menu
### 4. Update Edit Plan (If Completing Without Validation)
**IF user selects [C] Complete:**
Update editPlan frontmatter:
```yaml
completionDate: '{current-date}'
validationAfterEdit: skipped
completionStatus: complete_without_validation
```
Document in editPlan:
```markdown
## Completion
**Completed:** {current-date}
**Validation:** Skipped per user request
**Recommendation:** Run validation before using workflow in production
```
### 5. Handle Validation Return
**IF validation was run and completed:**
Load and review validation report. Present findings:
"**Validation Complete:**
**Overall Status:** {status}
**New Issues:** {count}
**Remaining Issues:** {count}
**Would you like to:**
1. **[F]ix new issues** - Return to fix-validation step
2. **[M]ore edits** - Make additional changes
3. **[C]omplete** - Finish with current validation status"
#### Menu Handling Logic:
- IF F: Route to step-e-03-fix-validation.md
- IF M: Route to step-e-02-discover-edits.md
- IF C: Load, read entirely, then execute {completeStep}
- IF Any other: help user, then redisplay menu
## CRITICAL STEP COMPLETION NOTE
This is a routing step. Route user to appropriate next step based on their choice. Always offer validation before completing.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Edit summary presented clearly
- All options explained
- User routed to appropriate next step
- Validation offered before completion
- Edit plan updated if completing
### ❌ SYSTEM FAILURE:
- Not offering validation
- Routing to wrong step
- Not updating edit plan when completing
**Master Rule:** Always offer validation after edits. Route correctly based on user choice.

View File

@@ -1,190 +0,0 @@
---
name: 'step-e-06-validate-after'
description: 'Run validation after edits and present results'
# File References
nextStepFile: './step-e-07-complete.md'
fixStep: './step-e-03-fix-validation.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
validationWorkflow: '../steps-v/step-01-validate.md'
validationReport: '{targetWorkflowPath}/validation-report-{workflow_name}.md'
---
# Edit Step 6: Validate After Edit
## STEP GOAL:
Run validation workflow after edits are complete, present results, and offer next steps.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus on running validation and presenting results
- 💬 Explain validation outcomes clearly
- 🚪 Route based on validation results
## EXECUTION PROTOCOLS:
- 🎯 Execute validation workflow
- 💾 Present results to user
- 📖 Offer next steps based on findings
## CONTEXT BOUNDARIES:
- Edits have been applied
- Focus: Verify quality after edits
- This is quality assurance step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Edit Plan
**Load the editPlan:**
Read `{editPlan}` to understand what edits were applied.
### 2. Execute Validation Workflow
"**Running comprehensive validation on your edited workflow...**
**Target:** {targetWorkflowPath}
**Validation scope:** Full workflow compliance check
This may take a few moments..."
**Load, read entirely, then execute:** {validationWorkflow}
### 3. Review Validation Results
**After validation completes, load the validation report:**
Read `{validationReport}` and extract:
- Overall status
- Critical issues count
- Warning issues count
- New issues vs pre-existing issues
### 4. Present Validation Results
"**Validation Complete!**
**Overall Assessment:** [PASS/PARTIAL/FAIL]
**Summary:**
| Category | Before Edits | After Edits | Change |
|----------|--------------|-------------|--------|
| Critical Issues | {count} | {count} | {delta} |
| Warnings | {count} | {count} | {delta} |
| Compliance Score | {score} | {score} | {delta} |
---
**New Issues Found:** {count}
**Issues Fixed:** {count}
**Remaining Issues:** {count}
---
**What would you like to do?**"
### 5. Menu Options Based on Results
**IF NEW CRITICAL ISSUES FOUND:**
"**[F]ix new issues** - Return to fix-validation step to address new critical issues
**[R]eview report** - See detailed validation findings
**[C]omplete anyway** - Finish editing with remaining issues (not recommended)"
#### Menu Handling Logic:
- IF F: Load, read entirely, then execute {fixStep}
- IF R: Present detailed findings from validation report, then redisplay this menu
- IF C: Warn user, then if confirmed, load, read entirely, then execute {nextStepFile}
- IF Any other: help user, then redisplay menu
**IF NO NEW CRITICAL ISSUES (warnings OK):**
"**[R]eview report** - See detailed validation findings
**[C]omplete** - Finish editing - workflow looks good!
**[M]ore edits** - Make additional changes"
#### Menu Handling Logic (Issues Found):
- IF R: Present detailed findings from validation report, then redisplay this menu
- IF C: Load, read entirely, then execute {nextStepFile}
- IF M: Route to step-e-02-discover-edits.md
- IF Any other: help user, then redisplay menu
**IF FULL PASS (no issues):**
"**🎉 Excellent! Your workflow is fully compliant!**
**[C]omplete** - Finish editing
**[R]eview report** - See validation details
**[M]ore edits** - Make additional changes"
#### Menu Handling Logic (Full Pass):
- IF C: Load, read entirely, then execute {nextStepFile}
- IF R: Present validation summary, then redisplay this menu
- IF M: Route to step-e-02-discover-edits.md
- IF Any other: help user, then redisplay menu
### 6. Update Edit Plan
**Before routing to complete:**
Update editPlan frontmatter:
```yaml
completionDate: '{current-date}'
validationAfterEdit: complete
finalValidationStatus: {status from validation report}
remainingCriticalIssues: {count}
remainingWarnings: {count}
```
Document in editPlan:
```markdown
## Final Validation
**Validation Date:** {current-date}
**Status:** {status}
**Issues After Editing:**
- Critical: {count}
- Warnings: {count}
**Recommendation:** {if issues remain, suggest next steps}
```
## CRITICAL STEP COMPLETION NOTE
ALWAYS present validation results clearly. Route based on severity of findings. Update edit plan with final validation status before completing.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Validation workflow executed
- Results presented clearly with before/after comparison
- User routed appropriately based on findings
- Edit plan updated with final status
### ❌ SYSTEM FAILURE:
- Not running validation
- Not presenting results clearly
- Routing to complete with critical issues without warning
- Not updating edit plan
**Master Rule:** Always run validation after edits. Present clear before/after comparison. Warn user about remaining issues.

View File

@@ -1,206 +0,0 @@
---
name: 'step-e-07-complete'
description: 'Complete the edit session with summary and next steps'
# File References
editPlan: '{bmb_creations_output_folder}/edit-plan-{workflow_name}.md'
targetWorkflowPath: '{targetWorkflowPath}'
validationReport: '{targetWorkflowPath}/validation-report-{workflow_name}.md'
---
# Edit Step 7: Complete
## STEP GOAL:
Complete the edit session with a comprehensive summary of changes made and provide next steps guidance.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not an autonomous editor
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Focus on summary and completion
- 💬 Present clear change summary
- 🚫 No more edits at this stage
## EXECUTION PROTOCOLS:
- 🎯 Generate comprehensive summary
- 💾 Finalize edit plan document
- 📖 Provide next steps guidance
## CONTEXT BOUNDARIES:
- All edits are complete
- Focus: Summary and closure
- This is the final step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Read Edit Plan and Validation Report
**Load both files:**
1. `{editPlan}` - Full edit session history
2. `{validationReport}` - Final validation status (if exists)
### 2. Generate Completion Summary
"**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**
# Edit Session Complete
**Workflow:** {workflow_name}
**Path:** {targetWorkflowPath}
**Session Date:** {editSessionDate}
---
## Changes Made
**Validation Fixes Applied:** {count}
{list from edit plan}
**Direct Changes Applied:** {count}
{list from edit plan}
**Files Modified:**
{List all files that were changed}
---
## Final Validation Status
**Status:** {status from report or 'Not run'}
**Issues:**
- Critical: {count}
- Warnings: {count}
---
## Edit Session Summary
Your workflow has been successfully edited. Here's what was accomplished:
{Summarize the transformation in 2-3 sentences}
**━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**"
### 3. Update Edit Plan with Completion
**Append final completion section to editPlan:**
```markdown
## Completion Summary
**Completed:** {current-date}
**Session Duration:** {from start to end}
**Total Edits:** {count}
- Validation Fixes: {count}
- Direct Changes: {count}
**Files Modified:** {count}
**Final Validation Status:** {status}
**Workflow is ready for:** {use/testing/production with caveats}
```
### 4. Provide Next Steps Guidance
"**Next Steps for Your Workflow:**
1. **Test the workflow** - Run through the workflow end-to-end to verify changes
2. **Get user feedback** - If this is for others, have them test it
3. **Monitor for issues** - Watch for any problems in actual use
4. **Re-validate periodically** - Run validation again after future changes
**Resources:**
- Edit this workflow again: Edit workflow mode
- Run validation: Validate workflow mode
- Build new workflow: Create workflow mode
---
**Thank you for using BMAD Workflow Creator!**
Your edit session for **{workflow_name}** is complete. ✅"
### 5. Final Confirmation
"**Edit Session Complete.**
**[F]inish** - End the edit session
**[S]ave summary** - Save a copy of the edit summary to your output folder
**[R]eview** - Review the full edit plan one more time"
#### Menu Handling Logic:
- IF F: End the session
- IF S: Save edit summary to output folder, then end
- IF R: Display full edit plan, then redisplay this menu
- IF Any other: help user, then redisplay menu
### 6. Save Summary (If Requested)
**IF user selects [S]ave summary:**
Create summary file at `{output_folder}/workflow-edit-summary-{workflow_name}-{date}.md`:
```markdown
# Workflow Edit Summary
**Workflow:** {workflow_name}
**Path:** {targetWorkflowPath}
**Edit Date:** {current-date}
## Changes Made
{All changes from edit plan}
## Files Modified
{List with paths}
## Validation Status
{Final validation results}
## Next Steps
{Recommendations}
```
"**Summary saved to:** {output_folder}/workflow-edit-summary-{workflow_name}-{date}.md"
## CRITICAL STEP COMPLETION NOTE
This is the final step. Ensure edit plan is complete, summary is presented, and user has all information needed. End session gracefully.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Comprehensive summary presented
- All changes documented clearly
- Edit plan finalized
- Next steps guidance provided
- Session ended gracefully
### ❌ SYSTEM FAILURE:
- Not summarizing all changes
- Missing files from change list
- Not providing next steps
- Ending without user confirmation
**Master Rule:** Provide complete summary of all changes. Document everything. Give clear next steps. End on a positive note.

View File

@@ -1,109 +0,0 @@
---
name: 'step-01-validate'
description: 'Initialize validation: create report and check file structure & size'
parallel-steps: ['./step-01b-structure.md', './step-02-frontmatter-validation.md', './step-02b-path-violations.md', './step-03-menu-validation.md' './step-04-step-type-validation.md', './step-05-output-format-validation.md', './step-06-validation-design-check.md', './step-07-instruction-style-check.md', './step-08-collaborative-experience-check.md', './step-08b-subprocess-optimization.md', './step-09-cohesive-review.md']
nextStep: './step-10-report-complete.md'
targetWorkflowPath: '{workflow_folder_path}'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
partialValidationFragmentFile: '{workflow_folder_path}/validation-report-{step-name}.md'
stepFileRules: '../data/step-file-rules.md'
---
# Validation Step 1: File Structure & Size
## STEP GOAL:
To create the validation report that all parallel tasks that this will kick off will be able to report to.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Create validation report with header structure using subprocess optimization when available
- 🚫 DO NOT skip checking any file - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load and check EVERY file in the workflow using subprocess optimization when available - single subprocess for bash/grep operations, separate subprocess per file for size analysis
- 💾 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Save report before loading next validation step
- 🚫 DO NOT halt for user input - validation runs to completion
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut. IF there is no subprocess type tool available that can achieve running a process in a subprocess and handle starting multiple - let the user know they need to restart validation specifically NOT using max-parallel mode and HALT and end this workflow!
### 1. Create Validation Report
Create {validationReportFile} with header structure:
```markdown
---
validationDate: [current date]
workflowName: {new_workflow_name}
workflowPath: {workflow_folder_path}
validationStatus: IN_PROGRESS
---
# Validation Report: {new_workflow_name}
**Validation Started:** [current date]
**Validator:** BMAD Workflow Validation System
**Standards Version:** BMAD Workflow Standards
{{TOC}}
{{#each parallel-steps}}
## {{title}}
{{results}}
{{/each}}
```
Save the file (without the handlebars output of course) before proceeding.
### 2. Launch Mass Parallelization and consolidate results!
Utilizing a subprocess for each step file in {parallel-steps} - complete all of these - with the caveat indication to the subprocess that at the end of the specific step it will not on its own proceed to the nextStep file!
Critically - instruct that instructions to write out or return results within each subprocess for a step file in the array MUST ensure that it writes it to {partialValidationFragmentFile} file name even though the step file it loads might indicate otherwise!
Once every process has completed - there should be a separate validation file for each given step. Also - each step should return JUST its results and recommendations to you also.
### 3. CRITICAL WRITES to the report.
You MUST now ensure that all results are added to the final cohesive {validationReportFile} following the indicated handlebars sequence - and then after appending each subprocess report to a level 2 section - and the TOC to accurately reflect the documents state using proper markdown linking conventions to the actual heading names you created.
IF a file is missing or empty from a given subprocess - but it did return to you results - you will append those results - ONLY do this if you cannot access the specific steps file produced or it is empty though. IE File from subprocess is primary, results returned from step complete are backup insurance.
### 4. Proceed to Completion Step
ONLY after ensuring all has been written to the final report, let the user know about the final report that is a consolidation - and they can ignore or remove the smaller files or use them as they like to focus on a specific validation (but its all in the master doc), and then proceed to {nextStep}, ensuring that in the {nextStep} it is focused on the {validationReportFile}
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Validation report created with header structure
- EVERY section of the template is filled in with content from a subprocess that added the results of its area of expertise
### ❌ SYSTEM FAILURE:
- Output Report does not exist with content all filled in
- EVERY step listed in {parallel-steps} was not executed in a subprocess and completed with its results captured in output

View File

@@ -1,221 +0,0 @@
---
name: 'step-01-validate'
description: 'Initialize validation: create report and check file structure & size'
nextStepFile: './step-02-frontmatter-validation.md'
targetWorkflowPath: '{workflow_folder_path}'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
stepFileRules: '../data/step-file-rules.md'
---
# Validation Step 1: File Structure & Size
## STEP GOAL:
To create the validation report and check that the workflow has correct file structure and all step files are within size limits.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Create validation report with header structure using subprocess optimization when available
- 🚫 DO NOT skip checking any file - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load and check EVERY file in the workflow using subprocess optimization when available - single subprocess for bash/grep operations, separate subprocess per file for size analysis
- 💾 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Save report before loading next validation step
- 🚫 DO NOT halt for user input - validation runs to completion
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Create Validation Report
Create {validationReportFile} with header structure:
```markdown
---
validationDate: [current date]
workflowName: {new_workflow_name}
workflowPath: {workflow_folder_path}
validationStatus: IN_PROGRESS
---
# Validation Report: {new_workflow_name}
**Validation Started:** [current date]
**Validator:** BMAD Workflow Validation System
**Standards Version:** BMAD Workflow Standards
---
## File Structure & Size
*Validation in progress...*
## Frontmatter Validation
*Pending...*
## Critical Path Violations
*Pending...*
## Menu Handling Validation
*Pending...*
## Step Type Validation
*Pending...*
## Output Format Validation
*Pending...*
## Validation Design Check
*Pending...*
## Instruction Style Check
*Pending...*
## Collaborative Experience Check
*Pending...*
## Subprocess Optimization Opportunities
*Pending...*
## Cohesive Review
*Pending...*
## Plan Quality Validation
*Pending...*
## Summary
*Pending...*
```
### 2. Load File Structure Standards
Load {stepFileRules} to understand:
- File size limits (<200 recommended, 250 max)
- Required folder structure
- Required files
### 3. Check Folder Structure
**Launch a single subprocess that:**
1. Lists the entire folder structure using bash commands
2. Verifies all required folders and files exist
3. Returns structured findings to parent for aggregation
```bash
# List folder structure
find {targetWorkflowPath} -type f -name "*.md" | sort
```
**Expected structure:**
```
{targetWorkflowPath}/
├── workflow.md
├── steps*/ potentially more than one folder like this (such as steps-v, steps-c - the folder name is not critical but should make sense)
│ ├── step-01-init.md
│ ├── step-01b-continue.md (if continuable)
│ ├── step-02-*.md
│ └── ...
├── */ # any other random files - critical will be later ensure its all used - aside from potential documentation for user later.
├── data/
│ └── [as needed]
└── templates/
└── [as needed]
```
**Check:**
- workflow.md exists
- step files are in a well organized folder
- non step reference files are organized in other folders such as data, templates, or others that make sense for the workflow
- Folder names make sense
### 4. Check File Sizes
**DO NOT BE LAZY - For EACH step file in steps-c/, launch a subprocess that:**
1. Loads that step file
2. Counts lines and checks against size limits
3. Returns structured findings to parent for aggregation
**Limits:**
- < 200 lines: Good
- 200-250 lines: Approaching limit
- > 250 lines: ❌ Exceeds limit
**Subprocess returns:** File name, line count, status (Good/Approaching limit/Exceeds limit), and any issues found.
**Subprocess must either:**
- Update validation report directly with findings, OR
- Return structured findings to parent for aggregation into report
**Document findings in validation report:**
- List all step files checked with their line counts
- Note any files approaching or exceeding size limits (<200 recommended, 250 max)
- Check data and reference files for size issues (large files should be sharded or indexed)
- Identify specific size violations and recommendations
### 5. Verify File Presence
From the design in {workflowPlanFile}, verify:
- Every step from design has a corresponding file
- Step files are numbered sequentially
- No gaps in numbering
- Final step exists
### 6. Append Findings to Report
Replace the "## File Structure & Size" section in {validationReportFile} with actual findings:
**Document the following:**
- Folder structure assessment
- Required files presence check
- File size analysis results
- List of any issues found (missing files, extra files, size violations, naming issues)
- Overall validation status (PASS/FAIL/WARNINGS)
### 7. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**File Structure & Size validation complete.** Proceeding to Frontmatter Validation..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Validation report created with header structure
- EVERY file checked for structure and size
- Findings appended to report
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking every file
- Skipping size checks
- Not saving report before proceeding
- Halting for user input
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check EVERY file. Auto-proceed through all validation steps.

View File

@@ -1,152 +0,0 @@
---
name: 'step-01-validate'
description: 'Initialize validation: create report and check file structure & size'
nextStepFile: './step-02-frontmatter-validation.md'
targetWorkflowPath: '{workflow_folder_path}'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
stepFileRules: '../data/step-file-rules.md'
---
# Validation Step 1: File Structure & Size
## STEP GOAL:
To create the validation report and check that the workflow has correct file structure and all step files are within size limits.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Create validation report with header structure using subprocess optimization when available
- 🚫 DO NOT skip checking any file - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load and check EVERY file in the workflow using subprocess optimization when available - single subprocess for bash/grep operations, separate subprocess per file for size analysis
- 💾 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Save report before loading next validation step
- 🚫 DO NOT halt for user input - validation runs to completion
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Check Folder Structure
**Launch a single subprocess that will do all of the following for items:**
1. Load {stepFileRules} to understand:
- File size limits (<200 recommended, 250 max)
- Required folder structure
- Required files
2. Lists the entire folder structure using bash commands
3. Verifies all required folders and files exist
4. Returns structured findings to parent for aggregation
```bash
# List folder structure
find {targetWorkflowPath} -type f -name "*.md" | sort
```
**Expected structure:**
```
{targetWorkflowPath}/
├── workflow.md
├── steps*/ potentially more than one folder like this (such as steps-v, steps-c - the folder name is not critical but should make sense)
│ ├── step-01-init.md
│ ├── step-01b-continue.md (if continuable)
│ ├── step-02-*.md
│ └── ...
├── */ # any other random files - critical will be later ensure its all used - aside from potential documentation for user later.
├── data/
│ └── [as needed]
└── templates/
└── [as needed]
```
**Check:**
- workflow.md exists
- step files are in a well organized folder
- non step reference files are organized in other folders such as data, templates, or others that make sense for the workflow
- Folder names make sense
### 4. Check File Sizes
**DO NOT BE LAZY - For EACH step file in steps-c/, launch a subprocess that:**
1. Loads that step file
2. Counts lines and checks against size limits
3. Returns structured findings to parent for aggregation
**Limits:**
- < 200 lines: Good
- 200-300 lines: Approaching limit
- > 300 lines: ❌ Exceeds limit
**Subprocess returns:** File name, line count, status (Good/Approaching limit/Exceeds limit), and any issues found.
**Subprocess must either:**
- Update validation report directly with findings, OR
- Return structured findings to parent for aggregation into report
**Document findings in validation report:**
- List all step files checked with their line counts
- Note any files approaching or exceeding size limits (<200 recommended, 250 max)
- Check data and reference files for size issues (large files should be sharded or indexed)
- Identify specific size violations and recommendations
### 5. Verify File Presence
From the design in {workflowPlanFile}, verify:
- Every step from design has a corresponding file
- Step files are numbered sequentially
- No gaps in numbering
- Final step exists
### 6. Document all findings in a report
**Document the following:**
- Folder structure assessment
- Required files presence check
- File size analysis results
- List of any issues found (missing files, extra files, size violations, naming issues)
- Overall validation status (PASS/FAIL/WARNINGS)
### 7. Save Report
**CRITICAL:** Save the validation report BEFORE COMPLETING THIS STEP
**Display:** "**File Structure & Size validation complete.**"
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Validation report created with header structure
- EVERY file checked for structure and size
- Findings appended to report
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking every file
- Skipping size checks
- Not saving report before proceeding
- Halting for user input
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check EVERY file. Auto-proceed through all validation steps.

View File

@@ -1,199 +0,0 @@
---
name: 'step-02-frontmatter-validation'
description: 'Validate frontmatter compliance across all step files'
nextStepFile: './step-02b-path-violations.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
frontmatterStandards: '../data/frontmatter-standards.md'
---
# Validation Step 2: Frontmatter Validation
## STEP GOAL:
To validate that EVERY step file's frontmatter follows the frontmatter standards - correct variables, proper relative paths, NO unused variables.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - VALIDATE EVERY FILE'S FRONTMATTER
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
### Step-Specific Rules:
- 🎯 Validate EVERY step file's frontmatter using subprocess optimization - each file in its own subprocess
- 🚫 DO NOT skip any files or checks - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough using per-file deep analysis (Pattern 2)
## EXECUTION PROTOCOLS:
- 🎯 Load frontmatter standards first, then validate each file in its own subprocess for deep analysis
- 💾 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Aggregate all findings into validation report before loading next step
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- All step files in the workflow must be validated
- Load {frontmatterStandards} for validation criteria
- Check for: unused variables, non-relative paths, missing required fields, forbidden patterns
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Frontmatter Standards
Load {frontmatterStandards} to understand validation criteria.
**Key Rules:**
1. Only variables USED in the step may be in frontmatter
2. All file references MUST use `{variable}` format
3. Paths within workflow folder MUST be relative - NO `workflow_path` allowed
**Forbidden Patterns:**
- `workflow_path: '...'` - use relative paths instead
- `thisStepFile: '...'` - remove unless actually referenced in body
- `workflowFile: '...'` - remove unless actually referenced in body
- `./...` - use `./step-XX.md`
- `{workflow_path}/templates/...` - use `../template.md`
### 2. Validate EVERY Step File - Systematic Algorithm with Subprocess Optimization
**DO NOT BE LAZY - For EACH step file, launch a subprocess that:**
1. Loads that file
2. Loads {frontmatterStandards} to understand validation criteria
3. Performs all frontmatter validation checks on that file (extract variables, check usage, validate paths)
4. **EITHER** updates the validation report directly with its findings
5. **OR** returns structured findings to parent for aggregation
**SUBPROCESS ANALYSIS PATTERN:**
For each file, the subprocess performs the following deep analysis:
#### Step 2.1: Extract Frontmatter Variables
```python
# Algorithm to extract variables from frontmatter:
1. Find content between first `---` and second `---`
2. For each line, extract key before `:`
3. Skip `name`, `description`, and comment lines starting with `#`
4. Collect all variable names
```
Example frontmatter:
```yaml
---
# File References
nextStepFile: './step-02-vision.md'
outputFile: '{planning_artifacts}/product-brief-{{project_name}}.md'
workflow_path: '{project-root}/...' # ❌ FORBIDDEN
thisStepFile: './step-01-init.md' # ❌ Likely unused
---
```
Variables extracted: `nextStepFile`, `outputFile`, `workflow_path`, `thisStepFile`
#### Step 2.2: Check Each Variable Is Used
```python
# Algorithm to check variable usage:
for each variable in extracted_variables:
search_body = "{variableName}" # with curly braces
if search_body NOT found in step body (after frontmatter):
MARK_AS_UNUSED(variable)
```
**Example:**
- Variable `nextStepFile`: Search body for `{nextStepFile}` → Found in line 166 ✅
- Variable `thisStepFile`: Search body for `{thisStepFile}` → Not found ❌ VIOLATION
#### Step 2.3: Check Path Formats
For each variable containing a file path:
```python
# Algorithm to validate paths:
if path contains "{workflow_path}":
MARK_AS_VIOLATION("workflow_path is forbidden - use relative paths")
if path is to another step file:
if not path.startswith("./step-"):
MARK_AS_VIOLATION("Step-to-step paths must be ./filename.md")
if path is to parent folder template:
if not path.startswith("../"):
MARK_AS_VIOLATION("Parent folder paths must be ../filename.md")
if path contains "{project-root}" and is internal workflow reference:
MARK_AS_VIOLATION("Internal paths must be relative, not project-root")
```
**RETURN FORMAT:**
Subprocess returns file name, frontmatter compliance status, unused variables found, path violations, and overall status (PASS/FAIL). Include specific variable names and violation details for documentation.
Check ALL files systematically. Return findings for compilation and appendage to validation report.
### 3. Aggregate Findings and Document Results
Document frontmatter validation results in the validation report showing:
- Which files were checked
- Frontmatter compliance status for each file
- Unused variables found in each file
- Path violations detected
- Overall pass/fail status for each file
### 4. List All Violations
Document all violations found in the validation report, including:
- Specific files with violations
- Unused variable names and why they're unused
- Forbidden patterns detected with explanation
- Path format violations with details
- Files that passed all checks
### 5. Append to Report
Update {validationReportFile} - replace "## Frontmatter Validation *Pending...*" with actual findings.
### 6. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Frontmatter validation complete.** Proceeding to Menu Handling Validation..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- EVERY step file validated using subprocess optimization (Pattern 2: per-file deep analysis)
- Each subprocess validates frontmatter, checks variable usage, validates paths
- Structured findings returned to parent OR report updated directly by subprocesses
- All violations documented with specific variable names
- Findings aggregated into validation report
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not validating every file using subprocess optimization
- Not systematically checking each variable for usage in subprocess
- Missing forbidden pattern detection
- Not documenting violations with specific details
- Not returning structured findings OR updating report from subprocess
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough using subprocess optimization. DO NOT BE LAZY. For EACH file, launch a subprocess that validates frontmatter, checks variable usage, validates paths, and returns findings. Auto-proceed through all validation steps.

View File

@@ -1,265 +0,0 @@
---
name: 'step-02b-path-violations'
description: 'CRITICAL: Catch path violations step-02 misses - hardcoded paths, dead links, module awareness'
nextStepFile: './step-03-menu-validation.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
---
# Validation Step 2b: Critical Path Violations
## STEP GOAL:
CRITICAL path checks that step-02's frontmatter validation MISSES. This catches violations in CONTENT (not frontmatter), dead links, and module path unawareness using grep/bash (ideally in a subprocess that can update the report or return all results to parent).
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - CHECK EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction in this file references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the instructed outcome in your main context thread and available toolset
### Step-Specific Rules:
- 🎯 Perform systematic bash/grep checks using subprocess optimization - single subprocess for grep/regex across many files
- 🚫 DO NOT skip any file or violation type - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This catches what step-02 misses - CONTENT violations, dead links, module awareness, links in code and not in front matter
## EXECUTION PROTOCOLS:
- 🎯 Perform systematic checks using subprocess optimization when available - single subprocess for grep/regex across many files, separate subprocess per file for deep analysis, subprocess for data file operations
- 💾 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Save report before continuing to {nextStepFile}
## CONTEXT BOUNDARIES:
- Step-02 validated frontmatter (variables, relative paths)
- This step validates CONTENT and file existence with a Focus on: hardcoded paths in body, dead links, module awareness in every file found under {targetWorkflowPath}
- **CRITICAL:** Output files the workflow itself being validated produces won't exist during validation - <example> a contract document creation workflow might have a reference to said output - but it of course will not yet exist during workflow validation</example>
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Perform Critical Path Violation Detection
**Perform systematic path violation checks on EVERY workflow file using subprocess optimization when available - each file in its own subprocess:**
**SUBPROCESS EXECUTION PATTERN:**
For EACH file in the workflow being validated, launch a subprocess that:
1. Loads any reference files it needs (to avoid bloating parent context)
2. Performs all required checks on that file
3. **EITHER** updates the validation report directly with its findings
4. **OR** returns structured findings to parent for aggregation
**DO NOT BE LAZY - Use appropriate subprocess pattern for each check:**
- **Single subprocess for grep/regex**: Run one command across many files, return matches
- **Separate subprocess per file**: When deep analysis of each file's content is required
- **Subprocess for data operations**: Load reference data, find matches, summarize key findings
**PHASE 1: Identify Config Variables (EXCEPTIONS to path checks):**
Read {targetWorkflowPath}/workflow.md to extract known config variables from the Configuration Loading section:
```bash
# Extract config variables from workflow.md
grep -A 20 "Configuration Loading" {targetWorkflowPath}/workflow.md | grep -E "^\s+-\s+`\{[^}]+\}`" | sed "s/.*//;s/[`']//g"
```
**Store these as KNOWN_CONFIG_VARIABLES for reference in later checks.**
These are EXCEPTIONS - paths using these variables are VALID even if not relative:
- Example: `{output_folder}/doc.md` - VALID (uses config variable)
- Example: `{planning_artifacts}/prd.md` - VALID (uses config variable)
- These paths won't exist during validation (workflow not running yet)
---
**PHASE 2: Hardcoded paths in CONTENT (CRITICAL):**
Step-02 checks frontmatter - this checks CONTENT (body text after frontmatter).
**Launch a single subprocess that:**
1. Runs grep across all step files to find hardcoded {project-root}/ paths in content
2. Extracts content after frontmatter from each file
3. Returns all findings to parent for aggregation
```bash
# Extract content after frontmatter from all files, search for {project-root}/
for file in steps-c/*.md; do
awk '/^---$/,0 {if (p) print; p=1} /^---$/{p=1}' "$file" | grep -n "{project-root}/" && echo "Found in: $file"
done
```
**What we're catching:**
- Content like: `Load {project-root}/_bmad/foo/workflows/.../file.csv`
- Should be: `Load {dataFile}` (frontmatter variable with a relative path like ../data/file.csv)
**SKIP:** Paths using KNOWN_CONFIG_VARIABLES (these are valid exceptions)
---
**PHASE 3: Dead or bad links - referenced files don't exist (CRITICAL):**
**Launch a single subprocess that:**
1. Extracts all frontmatter path references from all files
2. Tests file existence for each reference (skipping output files that use config variables)
3. Returns all dead link findings to parent for aggregation
**CRITICAL DISTINCTION:**
- **Output files using config variables:** Skip (won't exist yet - workflow not installed/running)
- Example: `{output_folder}/my-doc.md` - SKIP
- Example: `{planning_artifacts}/prd.md` - SKIP
- Example: `{bmb_creations_output_folder}/file.md` - SKIP
- **Data files, step files, other workflows:** MUST EXIST - flag if missing
- Example: `{dataFile}` where value is `../data/config.csv` - MUST EXIST
- Example: `{nextStepFile}` where value is `./step-02.md` - MUST EXIST
- Example: `{advancedElicitationTask}` - MUST EXIST
- Example: `{partyModeWorkflow}` - MUST EXIST
**Bash execution pattern:**
```bash
# Extract all frontmatter path references from all files
for file in steps-c/*.md; do
# Extract file reference variables from frontmatter
grep "^\w*File:" "$file" | sed "s/.*: //"
# Resolve path (handle relative paths)
resolved_path=$(resolve_relative_path "$file" "$value")
# Check file existence - BUT SKIP output files using config variables
if ! path_uses_known_config_variable "$value"; then
if ! test -f "$resolved_path"; then
echo "DEAD LINK: $file references $resolved_path (not found)"
fi
fi
done
```
**What we're catching:**
- Dead links to any files that don't exist that the workflow needs during execution
---
**PHASE 4: Module path awareness:**
**Launch a single subprocess that:**
1. Determines if current workflow is in a non-bmb module
2. If yes, runs grep across all files to find bmb-specific path assumptions
3. Returns all module awareness issues to parent for aggregation
```bash
# Check if in non-bmb module, then search for bmb-specific paths
if pwd | grep -q "/modules/[^/]\+/" && ! pwd | grep -q "/bmb/"; then
grep -rn "{project-root}/_bmad/bmb/" steps-c/ steps-e/ steps-v/ 2>/dev/null || echo "No bmb-specific paths found"
fi
```
---
**RETURN FORMAT:**
```json
{
"known_config_variables": ["output_folder", "planning_artifacts", "bmb_creations_output_folder", ...],
"content_violations": [
{"file": "step-v-01-discovery.md", "line": 63, "violation": "hardcoded path in content", "details": "{project-root}/src/modules/.../prd-purpose.md"}
],
"dead_links": [
{"file": "step-06-innovation.md", "line": 215, "violation": "dead link", "details": "nextStepFile './step-07-project-type.md' should be './step-07-project-type.md'"}
],
"module_awareness_issues": [
{"file": "step-XX.md", "issue": "using bmb-specific path in non-bmb module"}
],
"summary": {"critical": N, "high": N, "medium": N}
}
```
Check ALL files systematically. Return structured report for compilation and appendage to validation report.
### 2. Process Findings and Update Report
**Create/Update "Critical Path Violations" section in {validationReportFile}:**
If ANY violations found:
```markdown
## Critical Path Violations
### Config Variables (Exceptions)
The following config variables were identified from workflow.md Configuration Loading section.
Paths using these variables are valid even if not relative (they reference post-install output locations):
{list of known_config_variables found}
### Content Path Violations
| File | Line | Issue | Details |
| ---- | ---- | ----- | ------- |
{table from content_violations}
### Dead Links
| File | Line | Issue | Details |
| ---- | ---- | ----- | ------- |
{table from dead_links}
**Note:** Output files using config variables were correctly skipped during existence checks.
### Module Awareness
{module_awareness_issues}
### Summary
- **CRITICAL:** {critical_count} violations (must fix - workflow will break)
- **HIGH:** {high_count} violations (should fix)
- **MEDIUM:** {medium_count} violations (review)
**Status:** {"❌ FAIL - Critical violations detected" or "⚠️ WARNINGS - Review recommended" or "✅ PASS - No violations"}
```
### 3. Handle Critical Violations
**If CRITICAL violations found (content violations OR dead links):**
Halt process once all files have been checked and aggregated - and share the severity of the issue with the user and ask them if they want to stop and you can try to fix these now, or else go to the next item in this list. If not proceeding - its still critical all findings thus far are documented in the report output.
### 4. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report to {validationReportFile} BEFORE loading and executing {nextStepFile}.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Config variables identified from workflow.md FIRST
- Known config variables used as exceptions in later checks
- ALL step files checked for content path violations
- Dead links detected via file existence tests (skipping output files)
- Module awareness issues flagged
- Findings appended to validation report
- CRITICAL violations halt validation
- Clean workflows proceed to step-03
### ❌ SYSTEM FAILURE:
- Not identifying config variables first
- Not skipping output files during existence checks
- Not checking content (only frontmatter)
- Missing dead link detection
- Not detecting module-specific assumptions
- Proceeding despite critical violations

View File

@@ -1,164 +0,0 @@
---
name: 'step-03-menu-validation'
description: 'Validate menu handling compliance across all step files'
nextStepFile: './step-04-step-type-validation.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
menuHandlingStandards: '../data/menu-handling-standards.md'
---
# Validation Step 3: Menu Handling Validation
## STEP GOAL:
To validate that EVERY step file's menus follow the menu handling standards - proper handlers, execution rules, appropriate menu types.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Validate EVERY step file's menus using subprocess optimization - per-file deep analysis pattern (Pattern 2)
- 🚫 DO NOT skip any files or checks - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough, leveraging per-file subprocess for menu structure analysis
## EXECUTION PROTOCOLS:
- 🎯 Load menu standards first
- 💾 Check EVERY file's menu structure using subprocess optimization when available - per-file deep analysis for menu structure validation
- 📖 Append findings to validation report (subprocesses either update report OR return findings for parent aggregation)
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- All step files in steps-c/ must be validated
- Load {menuHandlingStandards} for validation criteria
- Check for: handler section, execution rules, reserved letters, inappropriate A/P
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Menu Standards
Load {menuHandlingStandards} to understand validation criteria:
**Reserved Letters:** A (Advanced Elicitation), P (Party Mode), C (Continue/Accept), X (Exit/Cancel)
**Required Structure:**
1. Display section
2. Handler section (MANDATORY)
3. Execution Rules section
**When To Include A/P:**
- DON'T: Step 1 (init), validation sequences, simple data gathering
- DO: Collaborative content creation, user might want alternatives, quality gates
### 2. Check EVERY Step File
**DO NOT BE LAZY - For EVERY file in steps-c/, launch a subprocess that:**
1. Loads that step file
2. Loads {menuHandlingStandards} to understand validation criteria
3. Validates menu structure deeply (handler section, execution rules, A/P appropriateness, reserved letter compliance)
4. **EITHER** updates validation report directly with findings
5. **OR** returns structured validation findings to parent for aggregation
**SUBPROCESS VALIDATION PATTERN - Each subprocess checks for:**
**Check 1: Handler Section Exists**
- ✅ Handler section immediately follows Display
- ❌ If missing: mark as violation
**Check 2: Execution Rules Section Exists**
- ✅ "EXECUTION RULES" section present
- ✅ Contains "halt and wait" instruction
- ❌ If missing: mark as violation
**Check 3: Non-C Options Redisplay Menu**
- ✅ A/P options specify "redisplay menu"
- ❌ If missing: mark as violation
**Check 4: C Option Sequence**
- ✅ C option: save → update frontmatter → load next step
- ❌ If sequence wrong: mark as violation
**Check 5: A/P Only Where Appropriate**
- Step 01 should NOT have A/P (inappropriate for init)
- Validation sequences should auto-proceed, not have menus
- ❌ If A/P in wrong place: mark as violation
**RETURN FORMAT:**
Each subprocess should return validation findings for its assigned file including:
- File name
- Whether a menu is present
- Results of all 5 checks (handler section, execution rules, redisplay menu, C sequence, A/P appropriateness)
- List of any violations found
- Overall status (PASS/FAIL/WARN)
**Context savings estimate:** Each subprocess returns structured findings vs full file content. Parent aggregates all findings into final report table.
### 3. Aggregate Findings and Document Results
After ALL files have been validated (either via subprocess or main context), document the menu handling validation results in the validation report, including:
- Overall assessment of menu handling compliance across all step files
- Summary of files checked and their menu status
- Files that passed all menu validation checks
- Files with warnings or issues that need attention
- Files that failed validation with specific violations
### 4. List Violations
Compile and document all violations found during validation, organizing them by file and providing clear descriptions of each issue, such as:
- Missing handler sections
- Incomplete execution rules
- Improper A/P usage
- Missing redisplay menu instructions
- Any other menu handling standard violations
### 5. Append to Report
Update {validationReportFile} - replace "## Menu Handling Validation *Pending...*" with actual findings.
### 6. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Menu Handling validation complete.** Proceeding to Step Type Validation..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Menu standards loaded and understood
- EVERY step file's menus validated via subprocess (per-file deep analysis) OR main context
- All violations documented across handler sections, execution rules, A/P appropriateness
- Findings aggregated into validation report (subprocesses either updated report OR returned findings)
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking every file's menus
- Skipping menu structure checks
- Not documenting violations
- Not saving report before proceeding
- Loading full file contents into parent context instead of using subprocess analysis
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Use subprocess optimization (Pattern 2) - each file in its own subprocess for deep menu structure analysis. Subprocess returns only findings to parent. Auto-proceed through all validation steps.

View File

@@ -1,211 +0,0 @@
---
name: 'step-04-step-type-validation'
description: 'Validate that each step follows its correct step type pattern'
nextStepFile: './step-05-output-format-validation.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
stepTypePatterns: '../data/step-type-patterns.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 4: Step Type Validation
## STEP GOAL:
To validate that each step file follows the correct pattern for its step type - init, continuation, middle, branch, validation, final polish, or final.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Load and validate EVERY step against its type pattern - use subprocess optimization (Pattern 2: per-file deep analysis) when available
- 🚫 DO NOT skip any files or checks - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load step type patterns first (use subprocess for data operations when available)
- 💾 Check EACH file follows its designated type pattern - use per-file subprocesses for deep analysis when available
- 📖 Append findings to validation report (subprocess updates report OR returns findings to parent)
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- All step files in steps-c/ must be validated
- Load {stepTypePatterns} for pattern definitions
- The design in {workflowPlanFile} specifies what each step should be
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Step Type Patterns
**Load {stepTypePatterns} to understand the pattern for each type:**
**If subprocess capability available:**
```markdown
Launch a subprocess that:
1. Loads {stepTypePatterns}
2. Extracts all pattern definitions deeply
3. Returns summary of patterns to parent (not full file - saves context)
```
**If subprocess unavailable:**
```markdown
Load {stepTypePatterns} in main context
# Larger context but still functional - demonstrates graceful fallback
```
**Step Types:**
1. **Init (Non-Continuable)** - Auto-proceed, no continuation logic
2. **Init (Continuable)** - Has continueFile reference, continuation detection
3. **Continuation (01b)** - Paired with continuable init, routes based on stepsCompleted
4. **Middle (Standard)** - A/P/C menu, collaborative content
5. **Middle (Simple)** - C only menu, no A/P
6. **Branch** - Custom menu with routing to different steps
7. **Validation Sequence** - Auto-proceed through checks, no menu
8. **Init (With Input Discovery)** - Has inputDocuments array, discovery logic
9. **Final Polish** - Loads entire doc, optimizes flow
10. **Final** - No next step, completion message
### 2. Check EACH Step Against Its Type
**DO NOT BE LAZY - For EACH file in steps-c/, launch a subprocess that:**
1. Determines what type this step SHOULD be from:
- Step number (01 = init, 01b = continuation, last = final)
- Design in {workflowPlanFile}
- Step name pattern
2. Loads the step file
3. Validates it follows the pattern for its type
4. **EITHER** updates the validation report directly with its findings
5. **OR** returns structured findings to parent for aggregation
**SUBPROCESS ANALYSIS PATTERN - Validate each step file for:**
**For Init Steps:**
- ✅ Creates output from template (if document-producing)
- ✅ No A/P menu (or C-only)
- ✅ If continuable: has continueFile reference
**For Continuation (01b):**
- ✅ Has nextStepOptions in frontmatter
- ✅ Reads stepsCompleted from output
- ✅ Routes to appropriate step
**For Middle (Standard):**
- ✅ Has A/P/C menu
- ✅ Outputs to document (if applicable)
- ✅ Has mandatory execution rules
**For Middle (Simple):**
- ✅ Has C-only menu
- ✅ No A/P options
**For Branch:**
- ✅ Has custom menu letters
- ✅ Handler routes to different steps
**For Validation Sequence:**
- ✅ Auto-proceeds (no user choice)
- ✅ Proceeds to next validation
**For Final Polish:**
- ✅ Loads entire document
- ✅ Optimizes flow, removes duplication
- ✅ Uses ## Level 2 headers
**For Final:**
- ✅ No nextStepFile in frontmatter
- ✅ Completion message
- ✅ No next step to load
**RETURN FORMAT:**
Return a concise summary containing:
- File name analyzed
- What type the step should be
- What type it actually is
- Whether it follows the correct pattern
- List of any violations found
- Overall pass/fail status
**Context savings:** Each subprocess returns only validation findings, not full file contents. Parent receives structured analysis objects instead of 10+ full step files.
### 3. Aggregate Findings and Document
**After ALL files analyzed, aggregate findings from subprocesses and document results:**
**Document the following in the validation report:**
- Overall summary of step type validation (how many steps checked, pass/fail counts)
- For each step file:
- File name
- What type the step should be (based on design, step number, naming)
- What type it actually is
- Whether it follows the correct pattern for its type
- Any violations or issues found
- Pass/fail/warning status
**Format:** Create a clear, readable section in the validation report that shows the validation results for each step file.
### 4. List Violations
**Compile and document all violations found:**
**Document the following for any violations:**
- File name with violation
- What the violation is (specifically what doesn't match the expected pattern)
- What should be changed to fix it
- Severity level (error/warning)
**For files that pass validation:** Briefly note they follow their type patterns correctly.
### 5. Append to Report
Update {validationReportFile} - replace "## Step Type Validation *Pending...*" with actual findings.
### 6. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Step Type validation complete.** Proceeding to Output Format Validation..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- EVERY step validated against its type pattern (ideally using per-file subprocess optimization)
- All violations documented with structured findings
- Findings aggregated from subprocesses into report
- Report saved before proceeding
- Next validation step loaded
- Context saved: parent receives only findings, not full file contents
### ❌ SYSTEM FAILURE:
- Not checking every file's type pattern
- Skipping type-specific checks
- Not documenting violations
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check EVERY file's type pattern. Auto-proceed through all validation steps.

View File

@@ -1,200 +0,0 @@
---
name: 'step-05-output-format-validation'
description: 'Validate output format compliance - template type, final polish, step-to-output mapping'
nextStepFile: './step-06-validation-design-check.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
outputFormatStandards: '../data/output-format-standards.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 5: Output Format Validation
## STEP GOAL:
To validate that the workflow's output format matches the design - correct template type, proper final polish step if needed, and step-to-output mapping is correct.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
### Step-Specific Rules:
- 🎯 Validate output format using subprocess optimization - per-file subprocess for step-to-output validation
- 🚫 DO NOT skip any checks - DO NOT BE LAZY
- 💬 Subprocess must either update validation report OR return findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load output format standards first
- 💾 Check template type matches design
- 📖 Check for final polish step if needed
- 🔍 Use subprocess optimization for step-to-output mapping validation - per-file subprocess for deep analysis
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- Check template file in templates/ folder
- Review design in {workflowPlanFile} for output format specification
- Validate step-to-output mapping
- Check if final polish step is present (if needed)
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Output Format Standards
Load {outputFormatStandards} to understand:
**Golden Rule:** Every step MUST output to document BEFORE loading next step.
**Four Template Types:**
1. **Free-form** (Recommended) - Minimal structure, progressive append
2. **Structured** - Required sections, flexible within each
3. **Semi-structured** - Core sections plus optional additions
4. **Strict** - Exact format, specific fields (rare)
**Final Polish Step:**
- For free-form workflows, include a polish step that optimizes the entire document
- Loads entire document, reviews for flow, removes duplication
### 2. Check Design Specification
From {workflowPlanFile}, identify:
- Does this workflow produce a document?
- If yes, what template type was designed?
- Is a final polish step needed?
### 3. Validate Template File
**If workflow produces documents:**
1. Load the template file from `templates/` folder
2. Check it matches the designed type:
**For Free-form (most common):**
- ✅ Has frontmatter with `stepsCompleted: []`
- ✅ Has `lastStep: ''`
- ✅ Has `date: ''`
- ✅ Has `user_name: ''`
- ✅ Document title header
- ✅ No rigid section structure (progressive append)
**For Structured:**
- ✅ Has clear section headers
- ✅ Section placeholders with {{variable}} syntax
- ✅ Consistent structure
**For Semi-structured:**
- ✅ Has core required sections
- ✅ Has optional section placeholders
**For Strict:**
- ✅ Has exact field definitions
- ✅ Validation rules specified
### 4. Check for Final Polish Step
**If free-form template:**
- ✅ A final polish step should exist in the design
- ✅ The step loads entire document
- ✅ The step optimizes flow and coherence
- ✅ The step removes duplication
- ✅ The step ensures ## Level 2 headers
**If no final polish step for free-form:**
- ⚠️ WARNING - Free-form workflows typically need final polish
### 5. Validate Step-to-Output Mapping
**DO NOT BE LAZY - For EACH step that outputs to document, launch a subprocess that:**
1. Loads that step file
2. Analyzes frontmatter for `outputFile` variable
3. Analyzes step body to verify output is written before loading next step
4. Checks menu C option saves to output before proceeding
5. Returns structured findings to parent for aggregation
**SUBPROCESS EXECUTION PATTERN:**
**For EACH step file, launch a subprocess that:**
1. Loads the step file
2. Performs deep analysis of output operations (frontmatter, body, menu options)
3. Returns findings to parent for aggregation
**RETURN FORMAT:**
Each subprocess should return:
- Step filename
- Whether output variable exists in frontmatter
- Whether output is saved before loading next step
- Whether menu option C saves to output before proceeding
- Output order number (if applicable)
- Any issues found
- Overall status (PASS/FAIL/WARNING)
**Parent aggregates findings into:**
**Steps should be in ORDER of document appearance:**
- Step 1 creates doc
- Step 2 → ## Section 1
- Step 3 → ## Section 2
- Step N → Polish step
### 6. Document Findings
Document your output format validation findings in the validation report. Include:
- **Document Production**: Whether the workflow produces documents and what template type it uses
- **Template Assessment**: Template file existence, whether it matches the designed type, and frontmatter correctness
- **Final Polish Evaluation**: Whether a final polish step is required (for free-form workflows) and if present, whether it properly loads the entire document and optimizes flow
- **Step-to-Output Mapping**: For each step that outputs to the document, document whether it has the output variable in frontmatter, saves output before loading the next step, and properly saves in menu option C
- **Subprocess Analysis Summary**: Count of total steps analyzed, steps with output, steps saving correctly, and steps with issues
- **Issues Identified**: List any problems found with template structure, polish step, or output mapping
- **Overall Status**: Pass, fail, or warning designation
### 7. Append to Report
Update {validationReportFile} - replace "## Output Format Validation *Pending...*" with actual findings.
### 8. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Output Format validation complete.** Proceeding to Validation Design Check..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Template type matches design
- Final polish step present if needed
- Step-to-output mapping validated via subprocess optimization
- All findings documented
- Report saved before proceeding
- Next validation step loaded
- Subprocess pattern applied correctly (per-file analysis for step-to-output validation)
### ❌ SYSTEM FAILURE:
- Not checking template file
- Missing final polish step for free-form
- Not documenting mapping issues
- Not saving report before proceeding
- Not using subprocess optimization for step-to-output validation
- Loading all step files into parent context instead of per-file subprocess
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check template, polish step, and mapping. Use subprocess optimization for step-to-output validation - per-file subprocess returns analysis, not full content. Auto-proceed through all validation steps.

View File

@@ -1,195 +0,0 @@
---
name: 'step-06-validation-design-check'
description: 'Check if workflow has proper validation steps that load validation data (if validation is critical)'
nextStepFile: './step-07-instruction-style-check.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
trimodalWorkflowStructure: '../data/trimodal-workflow-structure.md'
---
# Validation Step 6: Validation Design Check
## STEP GOAL:
To check if the workflow has proper validation steps when validation is critical - validation steps should load from validation data and perform systematic checks.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Check if workflow needs validation steps - use subprocess optimization (per-file deep analysis for Pattern 2)
- 🚫 DO NOT skip any validation step reviews - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Determine if validation is critical for this workflow - use subprocess optimization when available
- 💾 Check validation steps exist and are well-designed - launch subprocess for per-file deep analysis (Pattern 2)
- 💬 Subprocesses must either update validation report OR return findings for parent aggregation
- 📖 Append findings to validation report
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- Some workflows need validation (compliance, safety, quality gates)
- Others don't (creative, exploratory)
- Check the design to determine if validation steps are needed
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Determine If Validation Is Critical
From {workflowPlanFile}, check:
**Does this workflow NEED validation?**
**YES - Validation Critical If:**
- Compliance/regulatory requirements (tax, legal, medical)
- Safety-critical outputs
- Quality gates required
- User explicitly requested validation steps
**NO - Validation Not Critical If:**
- Creative/exploratory workflow
- User-driven without formal requirements
- Output is user's responsibility to validate
### 2. If Validation Is Critical, Check Validation Steps
**DO NOT BE LAZY - For EVERY validation step file, launch a subprocess that:**
1. Loads that validation step file
2. Reads and analyzes the step's content deeply (prose, logic, quality, flow, anti-lazy language)
3. Returns structured analysis findings to parent for aggregation
**SUBPROCESS ANALYSIS PATTERN - Check each validation step file for:**
**Proper Validation Step Design:**
- ✅ Loads validation data/standards from `data/` folder
- ✅ Has systematic check sequence (not hand-wavy)
- ✅ Auto-proceeds through checks (not stopping for each)
- ✅ Clear pass/fail criteria
- ✅ Reports findings to user
**"DO NOT BE LAZY" Language Check:**
- ✅ Step includes "DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE" or similar mandate
- ✅ Step instructs to "Load and review EVERY file" not "sample files"
- ✅ Step has "DO NOT SKIP" or "DO NOT SHORTCUT" language
- ⚠️ WARNING if validation step lacks anti-lazy language
**Critical Flow Check:**
- ✅ For critical flows (compliance, safety, quality gates): validation steps are in steps-v/ folder (tri-modal)
- ✅ Validation steps are segregated from create flow
- ✅ Validation can be run independently
- ⚠️ For non-critical flows (entertainment, therapy, casual): validation may be inline
- ❌ ERROR if critical validation is mixed into create steps
**RETURN FORMAT:**
Return a structured analysis containing:
- Step file name
- Proper design checklist (loads data, systematic checks, auto-proceeds, clear criteria, reports findings)
- Anti-lazy language check (has mandate, mandate text, comprehensive coverage)
- Critical flow check (location, segregation, independence)
- Any issues found
- Overall status (PASS/FAIL/WARN)
**Context savings:** Each subprocess returns analysis (~30 lines), not full step file (~200 lines). Parent gets structured findings, not file contents.
### 3. Aggregate Findings from All Subprocesses
After all validation step files have been analyzed in subprocesses, aggregate findings:
**Process subprocess results:**
- Compile all structured analysis findings
- Identify patterns across validation steps
- Note any critical issues or warnings
### 4. Check Validation Data Files
**If workflow has validation steps:**
1. Check `data/` folder for validation data
2. Verify data files exist and are properly structured:
- CSV files have headers
- Markdown files have clear criteria
- Data is referenced in step frontmatter
### 5. Document Findings
**Create/Update "Validation Design Check" section in {validationReportFile} using aggregated subprocess findings:**
Document the following information:
**Whether validation is required:** Indicate if this workflow needs validation steps based on its domain type (critical/compliance/safety workflows vs. creative/exploratory ones)
**List of validation steps found:** Provide the names/paths of all validation step files in the workflow
**Validation step quality assessment:** For each validation step, document:
- Whether it loads validation data/standards from the data/ folder
- Whether it has a systematic check sequence
- Whether it auto-proceeds through checks (vs. stopping for user input)
- Whether it includes "DO NOT BE LAZY" or similar anti-lazy language mandates
- Whether it has clear pass/fail criteria
- Overall status (PASS/FAIL/WARN)
**"DO NOT BE LAZY" language presence:** For each validation step, note whether anti-lazy language is present and what it says
**Critical flow segregation:** For workflows requiring validation, document:
- The workflow domain type
- Whether validation steps are in the steps-v/ folder (tri-modal structure) or inline with create steps
- Whether this segregation is appropriate for the workflow type
**Validation data files:** List any validation data files found in the data/ folder, or note if they are missing
**Issues identified:** List any problems found with the validation design, missing data files, or quality concerns
**Overall status:** Provide final assessment (PASS/FAIL/WARN/N/A) with reasoning
### 6. Append to Report
Update {validationReportFile} - replace "## Validation Design Check *Pending...*" with actual findings from subprocess aggregation.
### 7. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Validation Design check complete.** Proceeding to Instruction Style Check..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Determined if validation is critical
- If critical: checked all validation steps
- Validated validation step quality
- Checked validation data files
- Findings documented
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking validation steps when critical
- Missing validation data files
- Not documenting validation design issues
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check validation steps thoroughly. Auto-proceed through all validation steps.

View File

@@ -1,209 +0,0 @@
---
name: 'step-07-instruction-style-check'
description: 'Check instruction style - intent-based vs prescriptive, appropriate for domain'
nextStepFile: './step-08-collaborative-experience-check.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
intentVsPrescriptive: '../data/intent-vs-prescriptive-spectrum.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 7: Instruction Style Check
## STEP GOAL:
To validate that workflow instructions use appropriate style - intent-based for creative/facilitative workflows, prescriptive only where absolutely required (compliance, legal).
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Review EVERY step's instruction style using subprocess optimization - separate subprocess per file for deep analysis
- 🚫 DO NOT skip any files or style checks - DO NOT BE LAZY
- 💬 Subprocess must either update validation report OR return structured findings to parent for aggregation
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Load intent vs prescriptive standards
- 💾 Check EACH step's instruction style using subprocess optimization - each file in its own subprocess
- 📖 Validate style is appropriate for domain
- 🚫 DO NOT halt for user input - validation runs to completion
- 💬 Subprocesses must either update validation report OR return findings for parent aggregation
## CONTEXT BOUNDARIES:
- Instruction style should match domain
- Creative/facilitative → Intent-based (default)
- Compliance/legal → Prescriptive (exception)
- Check EVERY step for style consistency
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Instruction Style Standards
Load {intentVsPrescriptive} to understand:
**Intent-Based (Default):**
- Use for: Most workflows - creative, exploratory, collaborative
- Step instruction describes goals and principles
- AI adapts conversation naturally
- More flexible and responsive
- Example: "Guide user to define requirements through open-ended discussion"
**Prescriptive (Exception):**
- Use for: Compliance, safety, legal, medical, regulated industries
- Step provides exact instructions
- More controlled and predictable
- Example: "Ask exactly: 'Do you currently experience fever, cough, or fatigue?'"
### 2. Determine Domain Type
From {workflowPlanFile}, identify the workflow domain:
**Intent-Based Domains (Default):**
- Creative work (writing, design, brainstorming)
- Personal development (planning, goals, reflection)
- Exploration (research, discovery)
- Collaboration (facilitation, coaching)
**Prescriptive Domains (Exception):**
- Legal/Compliance (contracts, regulations)
- Medical (health assessments, triage)
- Financial (tax, regulatory compliance)
- Safety (risk assessments, safety checks)
### 3. Check EACH Step's Instruction Style
**DO NOT BE LAZY - For EACH step file, launch a subprocess that:**
1. Loads that step file
2. Reads the instruction sections (MANDATORY SEQUENCE)
3. Analyzes and classifies instruction style deeply
4. **EITHER** updates validation report directly with findings
5. **OR** returns structured analysis findings to parent for aggregation
**SUBPROCESS ANALYSIS PATTERN:**
Each subprocess performs deep analysis of instruction prose to classify style:
**Intent-Based Indicators:**
- ✅ Describes goals/outcomes, not exact wording
- ✅ Uses "think about" language
- ✅ Multi-turn conversation encouraged
- ✅ "Ask 1-2 questions at a time, not a laundry list"
- ✅ "Probe to understand deeper"
- ✅ Flexible: "guide user through..." not "say exactly..."
**Prescriptive Indicators:**
- Exact questions specified
- Specific wording required
- Sequence that must be followed precisely
- "Say exactly:" or "Ask precisely:"
**Mixed Style:**
- Some steps prescriptive (critical/required)
- Others intent-based (creative/facilitative)
**RETURN FORMAT:**
Each subprocess should return findings including:
- Step file identifier
- Instruction style classification (Intent-based/Prescriptive/Mixed)
- Style indicators observed
- Appropriateness assessment (PASS/WARN/FAIL)
- Specific notes and observations
- Examples of good and concerning instruction patterns
**Parent aggregates all subprocess findings into unified report section.**
### 4. Validate Appropriateness
**For Intent-Based Domains:**
- ✅ Instructions should be intent-based
- ❌ Prescriptive instructions inappropriate (unless specific section requires it)
**For Prescriptive Domains:**
- ✅ Instructions should be prescriptive where compliance matters
- ⚠️ May have intent-based sections for creative elements
### 5. Aggregate Findings and Document
After ALL subprocesses have analyzed their respective step files, aggregate findings and create/update section in {validationReportFile}.
Document the following:
**Workflow Domain Assessment:**
- Document the domain type (creative/interactive vs compliance/legal)
- State the appropriate instruction style for this domain
**Instruction Style Findings:**
- List each step and its instruction style classification (intent-based/prescriptive/mixed)
- Note whether the style is appropriate for the domain
- Document specific examples of instruction language that demonstrate the style
- Identify any steps with inappropriate style (e.g., prescriptive in creative domain)
**Issues Identified:**
- List any steps that are overly prescriptive for their domain
- List any steps that should be more prescriptive (for compliance domains)
- Note any style inconsistencies across steps
**Positive Findings:**
- Highlight steps with excellent instruction style
- Note effective use of intent-based facilitation language
- Identify appropriate use of prescriptive instructions (if applicable)
**Overall Status:**
- Provide final assessment (PASS/FAIL/WARN)
- Summarize key findings
**Context Savings Note:** Using subprocess pattern (Pattern 2: per-file deep analysis), parent context receives only structured analysis findings (~50-100 lines per file) instead of full file contents (~200+ lines per file). For 10 steps: ~500-1000 lines received vs ~2000+ lines if loading all files in parent.
### 6. Update Report with Aggregated Findings
Update {validationReportFile} - replace "## Instruction Style Check *Pending...*" with actual aggregated findings from all subprocesses.
### 7. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Instruction Style check complete.** Proceeding to Collaborative Experience Check..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- EVERY step's instruction style reviewed via subprocess optimization (Pattern 2: per-file deep analysis)
- Each step analyzed in its own subprocess for style classification
- Style validated against domain appropriateness
- Issues documented with specific examples
- Subprocess findings aggregated into unified report section
- Context savings achieved (~500-1000 lines received vs ~2000+ if loading all files)
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking every step's style via subprocess
- Not analyzing each file in its own subprocess
- Not validating against domain
- Not documenting style issues
- Not aggregating subprocess findings
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. For EACH step file, launch a subprocess to analyze instruction style deeply. Aggregate findings. Auto-proceed through all validation steps. Use graceful fallback if subprocess unavailable.

View File

@@ -1,199 +0,0 @@
---
name: 'step-08-collaborative-experience-check'
description: 'Check collaborative quality - does this workflow facilitate well or just interrogate?'
nextStepFile: './step-08b-subprocess-optimization.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 8: Collaborative Experience Check
## STEP GOAL:
To validate that the workflow actually facilitates well - natural conversation, not interrogation. Questions asked progressively, not in laundry lists.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
### Step-Specific Rules:
- 🎯 Review EVERY step for collaborative quality
- 🚫 DO NOT skip any files or experience checks
- 💬 Append findings to report, then auto-load next step
- 🚪 This is validation - systematic and thorough
## EXECUTION PROTOCOLS:
- 🎯 Walk through the workflow as a user would
- 💾 Check conversation flow in each step
- 📖 Validate facilitation quality
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- Good workflows facilitate, don't interrogate
- Questions should be 1-2 at a time
- Conversation should feel natural
- Check EVERY step for collaborative patterns
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load the Workflow Design
From {workflowPlanFile}, understand:
- What is the workflow's goal?
- Who is the user?
- What interaction style was designed?
### 2. Review EACH Step for Collaborative Quality
**DO NOT BE LAZY - For EACH step file:**
1. Load the step
2. Read the MANDATORY SEQUENCE section
3. Evaluate against collaborative quality criteria:
**Good Facilitation Indicators:**
- ✅ "Ask 1-2 questions at a time"
- ✅ "Think about their response before continuing"
- ✅ "Use conversation, not interrogation"
- ✅ "Probe to understand deeper"
- ✅ Natural language in instructions
- ✅ Allows for back-and-forth
**Bad Interrogation Indicators:**
- ❌ Laundry lists of questions
- ❌ "Ask the following: 1, 2, 3, 4, 5, 6..."
- ❌ Form-filling approach
- ❌ No space for conversation
- ❌ Rigid sequences without flexibility
**Role Reinforcement Check:**
- ✅ "You are a [role], we engage in collaborative dialogue"
- ✅ "Together we produce something better"
- ❌ "You are a form filler" (obviously bad, but check for patterns)
### 3. Check Progression and Arc
**Does the workflow have:**
- ✅ Clear progression from step to step?
- ✅ Each step builds on previous work?
- ✅ User knows where they are in the process?
- ✅ Satisfying completion at the end?
**Or does it:**
- ❌ Feel disjointed?
- ❌ Lack clear progression?
- ❌ Leave user unsure of status?
### 4. Check Error Handling
**Do steps handle:**
- ✅ Invalid input gracefully?
- ✅ User uncertainty with guidance?
- ✅ Off-track conversation with redirection?
- ✅ Edge cases with helpful messages?
### 5. Document Findings
```markdown
### Collaborative Experience Check Results
**Overall Facilitation Quality:** [Excellent/Good/Fair/Poor]
**Step-by-Step Analysis:**
**step-01-init.md:**
- Question style: [Progressive/Laundry list]
- Conversation flow: [Natural/Rigid]
- Role clarity: ✅/❌
- Status: ✅ PASS / ❌ FAIL
**step-02-*.md:**
- Question style: [Progressive/laundry list - "Ask 1-2 at a time" / Lists 5+ questions]
- Allows conversation: ✅/❌
- Thinks before continuing: ✅/❌
- Status: ✅ PASS / ❌ FAIL
[Continue for ALL steps...]
**Collaborative Strengths Found:**
- [List examples of good facilitation]
- [Highlight steps that excel at collaboration]
**Collaborative Issues Found:**
**Laundry List Questions:**
- [List steps with question dumps]
- Example: "step-03-*.md asks 7 questions at once"
**Rigid Sequences:**
- [List steps that don't allow conversation]
- Example: "step-04-*.md has no space for back-and-forth"
**Form-Filling Patterns:**
- [List steps that feel like form filling]
- Example: "step-05-*.md collects data without facilitation"
**Progression Issues:**
- [List problems with flow/arc]
- Example: "step-06-*.md doesn't connect to previous step"
**User Experience Assessment:**
**Would this workflow feel like:**
- [ ] A collaborative partner working WITH the user
- [ ] A form collecting data FROM the user
- [ ] An interrogation extracting information
- [ ] A mix - depends on step
**Overall Collaborative Rating:** ⭐⭐⭐⭐⭐ [1-5 stars]
**Status:** ✅ EXCELLENT / ✅ GOOD / ⚠️ NEEDS IMPROVEMENT / ❌ POOR
```
### 6. Append to Report
Update {validationReportFile} - replace "## Collaborative Experience Check *Pending...*" with actual findings.
### 7. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Collaborative Experience check complete.** Proceeding to Cohesive Review..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- EVERY step reviewed for collaborative quality
- Question patterns analyzed (progressive vs laundry list)
- Conversation flow validated
- Issues documented with specific examples
- Findings appended to report
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not checking every step's collaborative quality
- Missing question pattern analysis
- Not documenting experience issues
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check EVERY step's collaborative quality. Auto-proceed through all validation steps.

View File

@@ -1,179 +0,0 @@
---
name: 'step-08b-subprocess-optimization'
description: 'Identify subprocess optimization opportunities - reduce context load, improve performance'
nextStepFile: './step-09-cohesive-review.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
subprocessPatterns: '../data/subprocess-optimization-patterns.md'
---
# Validation Step 8b: Subprocess Optimization Analysis
## STEP GOAL:
To identify opportunities for subprocess optimization throughout the workflow - reducing context load, improving performance, and enabling massive operations that would otherwise exceed context limits.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - ANALYZE EVERY FILE IN ITS OWN SUBPROCESS
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess/subagent/tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Analyze EVERY step file for subprocess optimization - each file in its own subprocess
- 🚫 DO NOT skip any file - DO NOT BE LAZY
- 💬 Load {subprocessPatterns} in subprocess performing some action required to understand patterns deeply with examples (if subprocess available), else load in main context
- 🚪 This identifies context-saving and performance-optimizing opportunities
## EXECUTION PROTOCOLS:
- 🎯 Analyze each step file in its own subprocess - deep analysis of subprocess potential
- 💾 Subprocesses must identify optimization patterns and return findings to parent for aggregation
- 📖 Aggregate findings into validation report before loading next step
## CONTEXT BOUNDARIES:
- Three patterns: grep/regex across files, per-file deep analysis, data file operations, parallel execution
- **Context-saving goal**: Return ONLY key findings to parent, not full file contents
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load Subprocess Pattern Reference (Context Optimization!)
**First, understand the subprocess optimization patterns by loading {subprocessPatterns}:**
**If subprocess capability available:**
```markdown
Launch a subprocess that:
1. Loads {subprocessPatterns}
2. Studies all patterns and examples deeply (Pattern 3: data operations!)
3. Returns summary of key patterns to parent (not full file - saves context)
```
**If subprocess unavailable:**
```markdown
Load {subprocessPatterns} in main context
# Larger context but still functional - demonstrates graceful fallback
```
**This step itself demonstrates Pattern 3 from the reference!**
---
### 2. Perform Subprocess Optimization Analysis
**DO NOT BE LAZY - For EVERY step file, launch a subprocess that:**
1. Loads that step file
2. ALSO loads {subprocessPatterns} to understand all patterns deeply (subprocess needs full context!)
3. Analyzes the step against each pattern looking for optimization opportunities
4. Returns specific, actionable suggestions to parent
**Subprocess gets full context:**
- The step file being analyzed
- The subprocess-optimization-patterns.md reference (all examples and patterns)
- Returns only findings to parent (context savings!)
**SUBPROCESS ANALYSIS PATTERN - Check each step file for:**
**Pattern 1: Single subprocess for grep/regex** - Operations that check/search multiple files for patterns (frontmatter validation, menu checks, path searches). Suggest: "Use single grep subprocess, return only matches"
**Pattern 2: Separate subprocess per file** - Operations requiring deep analysis of prose/logic/quality/style/flow per file (instruction review, collaborative quality assessment, step type compliance). Suggest: "Each file in own subprocess, return analysis findings"
**Pattern 3: Subprocess for data operations** - Operations loading large data files to find matches, extract key details, or summarize findings. Suggest: "Subprocess loads data, returns ONLY relevant rows/findings"
**Pattern 4: Parallel execution** - Independent operations that could run simultaneously. Suggest: "Run in parallel subprocesses to reduce execution time"
**RETURN FORMAT (example structure, adapt as needed):**
```json
{
"step_file": "step-02-*.md",
"opportunities": [
{
"pattern": "grep/regex|per-file|data-ops|parallel",
"location": "Line XX: [quote relevant instruction]",
"issue": "Loads all files into parent context",
"suggestion": "Use single grep subprocess, return only failures",
"impact": "Saves ~N lines per file, faster execution",
"priority": "HIGH|MEDIUM|LOW"
}
]
}
```
### 2. Aggregate Findings and Create Report Section
After ALL files analyzed, create/update section in {validationReportFile}:
```markdown
## Subprocess Optimization Opportunities
**Total Opportunities:** {count} | **High Priority:** {count} | **Estimated Context Savings:** {description}
### High-Priority Opportunities
**{Step Name}** - {Pattern Type}
- **Current:** {brief description of current approach}
- **Suggested:** {specific optimization suggestion}
- **Impact:** {context savings, performance gain}
- **Example:** `{brief code/pseudocode}`
[Repeat for each high-priority opportunity...]
### Moderate/Low-Priority Opportunities
{List with brief descriptions}
### Summary by Pattern
- **Pattern 1 (grep/regex):** {count} opportunities - {total savings}
- **Pattern 2 (per-file):** {count} opportunities - {total savings}
- **Pattern 3 (data ops):** {count} opportunities - {total savings}
- **Pattern 4 (parallel):** {count} opportunities - {performance gain}
### Implementation Recommendations
**Quick Wins:** {easy implementations with big savings}
**Strategic:** {higher effort but big payoff}
**Future:** {moderate impact, consider later}
**Status:** ✅ Complete / ⚠️ Review recommended
```
### 3. Save Report and Auto-Proceed
**CRITICAL:** Save report BEFORE loading next step.
Then load, read entire file, execute {nextStepFile}.
**Display:** "**Subprocess optimization analysis complete.** Identified {count} opportunities with potential context savings. Proceeding to Cohesive Review..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- EVERY step file analyzed in its own subprocess
- ALL optimization opportunities identified
- Findings aggregated into report
- Prioritized recommendations with context savings
- Report saved, next step loaded
### ❌ SYSTEM FAILURE:
- Not analyzing every file
- Skipping opportunity identification
- Not providing specific suggestions
- Not estimating savings
- Not aggregating findings
**Master Rule:** DO NOT BE LAZY. Analyze EVERY file in its own subprocess. Identify ALL optimization opportunities across 4 patterns. Provide specific, actionable recommendations with context savings. Return findings to parent. Auto-proceed.

View File

@@ -1,186 +0,0 @@
---
name: 'step-09-cohesive-review'
description: 'Cohesive ultra-think review - overall quality, does this workflow actually facilitate well?'
nextStepFile: './step-10-report-complete.md'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 9: Cohesive Review
## STEP GOAL:
To perform a cohesive "ultra-think" review of the entire workflow - walk through it as a whole, assess overall quality, does it actually facilitate well?
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step, ensure entire file is read
- ✅ Validation does NOT stop for user input - auto-proceed through all validation steps
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 Review the workflow as a cohesive whole - **NOTE: This step loads ENTIRE workflow for holistic review (different pattern from other validation steps)**
- 🚫 DO NOT skip any aspect of the review - DO NOT BE LAZY
- 💬 Subprocess optimization: When available, can use subprocesses to load individual step files and return structured summaries to parent for aggregation
- 💬 However, since cohesive review requires understanding the COMPLETE workflow as one unit, parent may need full context for proper holistic assessment
- 🚪 This is the meta-review - overall assessment
## EXECUTION PROTOCOLS:
- 🎯 Walk through the ENTIRE workflow end-to-end using subprocess optimization when available
- 💬 When using subprocesses: Each subprocess loads one step file, performs deep analysis, returns structured findings to parent for aggregation
- 💬 Subprocess must either update validation report directly OR return findings to parent for compilation
- 💾 Assess overall quality, not just individual components
- 📖 Think deeply: would this actually work well?
- 🚫 DO NOT halt for user input - validation runs to completion
## CONTEXT BOUNDARIES:
- This is the cohesive review - look at the workflow as a whole
- Consider user experience from start to finish
- Assess whether the workflow achieves its goal
- Be thorough and thoughtful
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Load the Entire Workflow
**DO NOT BE LAZY - Load EVERY step file using subprocess optimization when available:**
**SUBPROCESS APPROACH (when available):**
For EACH workflow file (workflow.md + all step files in order), launch a subprocess that:
1. Loads that single file
2. Performs deep analysis of content, flow, quality, and connection points
3. Returns structured findings to parent for holistic aggregation
**Subprocess should return:**
- File name analyzed
- Purpose and flow position within the workflow
- How it connects to previous and next steps
- Quality indicators and any issues found
- Voice and tone consistency assessment
**FALLBACK APPROACH (if subprocess unavailable):**
Load workflow.md and EVERY step file in steps-c/ sequentially in main context:
1. Load workflow.md
2. Load EVERY step file in steps-c/ in order
3. Read through each step
4. Understand the complete flow
**CRITICAL:** Whether using subprocess or main context, you must understand the COMPLETE workflow as one cohesive unit before proceeding to assessment.
### 2. Walk Through the Workflow Mentally
**Imagine you are a user running this workflow:**
- Starting from workflow.md
- Going through step-01
- Progressing through each step
- Experiencing the interactions
- Reaching the end
**Ask yourself:**
- Does this make sense?
- Is the flow logical?
- Would I feel guided or confused?
- Does it achieve its goal?
### 3. Assess Cohesiveness
**Check for:**
**✅ Cohesive Indicators:**
- Each step builds on previous work
- Clear progression toward goal
- Consistent voice and approach throughout
- User always knows where they are
- Satisfying completion
**❌ Incohesive Indicators:**
- Steps feel disconnected
- Jumps in logic or flow
- Inconsistent patterns
- User might be confused
- Abrupt or unclear ending
### 4. Assess Overall Quality
**Evaluate the workflow across key dimensions:**
Consider goal clarity, logical flow, facilitation quality, user experience, and goal achievement. Provide an overall quality assessment based on these dimensions.
### 5. Identify Strengths and Weaknesses
**Strengths:**
- What does this workflow do well?
- What makes it excellent?
- What should other workflows emulate?
**Weaknesses:**
- What could be improved?
- What doesn't work well?
- What would confuse users?
**Critical Issues:**
- Are there any show-stopper problems?
- Would this workflow fail in practice?
### 6. Provide Recommendation
**Assess overall workflow readiness:**
Determine if the workflow is excellent (ready to use, exemplifies best practices), good (solid with minor improvements possible), needs work (has issues to address), or problematic (major issues requiring significant revision). Provide a clear recommendation on readiness for use.
### 7. Document Findings
**Document your cohesive review findings in the validation report:**
Include your overall assessment (excellent/good/needs work/problematic), quality evaluation across key dimensions, cohesiveness analysis (flow, progression, voice and tone), identified strengths and weaknesses, any critical issues, what makes the workflow work well, what could be improved, user experience forecast, and your recommendation on readiness for use.
### 8. Append to Report
Update {validationReportFile} - replace "## Cohesive Review *Pending...*" with actual findings.
### 9. Save Report and Auto-Proceed
**CRITICAL:** Save the validation report BEFORE loading next step.
Then immediately load, read entire file, then execute {nextStepFile}.
**Display:**
"**Cohesive Review complete.** Proceeding to finalize validation report..."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- ENTIRE workflow reviewed end-to-end
- Quality assessed across multiple dimensions
- Strengths and weaknesses documented
- Thoughtful recommendation provided
- Findings appended to report
- Report saved before proceeding
- Next validation step loaded
### ❌ SYSTEM FAILURE:
- Not reviewing the entire workflow
- Superficial or lazy assessment
- Not documenting strengths/weaknesses
- Not providing clear recommendation
- Not saving report before proceeding
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Review the ENTIRE workflow cohesively. Think deeply about quality. Auto-proceed through all validation steps.

View File

@@ -1,154 +0,0 @@
---
name: 'step-10-report-complete'
description: 'Finalize validation report - check for plan file, summarize all findings, present to user'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
planValidationStep: './step-11-plan-validation.md'
---
# Validation Step 10: Report Complete
## STEP GOAL:
To check if a plan file exists (and run plan validation if it does), then summarize all validation findings and present to the user.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 📖 CRITICAL: Read the complete step file before taking any action
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context
### Step-Specific Rules:
- 🎯 This is the final validation step - present findings
- 🚫 DO NOT modify the workflow without user request
- 💬 Present summary and ask what changes are needed
- 🚪 This ends validation - user decides next steps
## EXECUTION PROTOCOLS:
- 🎯 Load the complete validation report
- 💾 Summarize ALL findings
- 📖 Update report status to COMPLETE
- 🚫 DO NOT proceed without user review
## CONTEXT BOUNDARIES:
- All 10 previous validation steps have completed
- Report contains findings from all checks
- User needs to see summary and decide on changes
- This step DOES NOT auto-proceed
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip or shortcut.
### 1. Check for Plan File
Before finalizing the report, check if a plan file exists:
**Check if {workflowPlanFile} exists:**
- **IF YES:** Run plan validation first
- Load, read entire file, then execute {planValidationStep}
- The plan validation will append its findings to the report
- Then return to this step to finalize the report
- **IF NO:** Proceed to finalize the report (no plan to validate)
### 2. Load Complete Validation Report
After plan validation (if applicable), load {validationReportFile} and read ALL findings from every validation step.
### 3. Create Summary Section
At the end of {validationReportFile}, replace "## Summary *Pending...*" with a comprehensive summary that includes:
- Validation completion date
- Overall status assessment (based on all validation steps)
- List of all validation steps completed with their individual results
- Summary of critical issues that must be fixed (or note if none found)
- Summary of warnings that should be addressed (or note if none found)
- Key strengths identified during validation
- Overall assessment of workflow quality
- Recommendation on readiness (ready to use / needs tweaks / needs revision / major rework needed)
- Suggested next steps for the user
Present this information in a clear, readable format - the exact structure is flexible as long as it covers all these points.
### 4. Update Report Status
Update the frontmatter of {validationReportFile} to set validationStatus to COMPLETE and add the completionDate. Keep existing fields like validationDate, workflowName, and workflowPath unchanged.
### 5. Present Summary to User
Present a clear summary to the user that includes:
- Confirmation that validation is complete
- Overall status of the workflow
- Quick results overview showing each validation step and its result
- Count of critical issues and warnings (or note if none found)
- Recommendation on workflow readiness
- Path to the full validation report
- Options for next steps (review detailed findings, make changes, explain results, or other actions)
Present this information in a natural, conversational way - the exact format doesn't matter as long as all this information is clearly communicated.
### 6. Present MENU OPTIONS
Display: **Validation Complete! Select an Option:** [R] Review Detailed Findings [F] Fix Issues [X] Exit Validation
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- User chooses their next action
#### Menu Handling Logic:
- IF R: Walk through the validation report section by section, explaining findings, then redisplay menu
- IF F: "What issues would you like to fix?" → Discuss specific changes needed → User can make edits manually OR you can help edit files
- IF X: "Validation complete. Your workflow is at: {targetWorkflowPath}. You can make changes and re-run validation anytime."
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
### 7. If User Wants to Fix Issues
Explain the available options for fixing issues:
- Manual edits: User edits files directly, then re-runs validation
- Guided edits: User specifies what to fix, help create specific edits for user approval
- Edit workflow: If the workflow has steps-e/, use the edit workflow to make systematic changes
The exact format doesn't matter - just ensure the user understands their options for addressing issues.
### 8. Update Plan with Validation Status
If a plan file exists at {workflowPlanFile}, update its frontmatter to include the validation status (COMPLETE), the current validation date, and a reference to the validation report file.
## CRITICAL STEP COMPLETION NOTE
This is the final validation step. User reviews findings and decides whether to make changes. Validation workflow ends here.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All validation findings summarized
- Complete report presented to user
- Summary section added to report
- Report status updated to COMPLETE
- User can review findings and decide on changes
- Plan updated with validation status
### ❌ SYSTEM FAILURE:
- Not summarizing all findings
- Not presenting complete report to user
- Not updating report status
- Not giving user clear options for next steps
**Master Rule:** Validation is complete. User reviews findings and decides what changes to make. Provide clear summary and options.

View File

@@ -1,237 +0,0 @@
---
name: 'step-11-plan-validation'
description: 'Validate plan quality - ensure all user intent and requirements are implemented'
targetWorkflowPath: '{workflow_folder_path}'
validationReportFile: '{workflow_folder_path}/validation-report-{datetime}.md'
workflowPlanFile: '{workflow_folder_path}/workflow-plan.md'
---
# Validation Step 11: Plan Quality Validation
## STEP GOAL:
To validate that a workflow plan (if it exists) has been fully implemented - all user intent captured, all requirements met with high quality.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 DO NOT BE LAZY - LOAD AND REVIEW EVERY FILE
- 📖 CRITICAL: Read the complete step file before taking any action
- ✅ This validation step only runs if a plan file exists
- ⚙️ If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
### Step-Specific Rules:
- 🎯 Validate plan requirements using subprocess optimization - separate subprocess per requirement area for deep analysis
- 🚫 DO NOT skip checking any requirement from the plan - DO NOT BE LAZY
- 💬 Subprocess must either update validation report directly OR return structured findings to parent for aggregation
- 🚪 This ensures the build actually delivered what was planned
## EXECUTION PROTOCOLS:
- 🎯 Load plan and extract all requirements/intent using subprocess optimization when available - separate subprocess per requirement area for deep analysis
- 💾 Subprocesses validate implementation against plan requirements and return findings for aggregation
- 📖 Document gaps and quality issues
- 🚫 Only run this step if workflowPlanFile exists
## CONTEXT BOUNDARIES:
- This step runs AFTER the workflow is built
- Compares what was planned vs what was implemented
- Checks for: missing features, quality gaps, unmet user intent
## MANDATORY SEQUENCE
**CRITICAL:** Only run this step if {workflowPlanFile} exists. If it doesn't exist, skip to final summary.
### 1. Check if Plan Exists
First, check if {workflowPlanFile} exists:
**IF plan file does NOT exist:**
- Skip this validation step
- Proceed to summary with note: "No plan file found - workflow may have been built without BMAD create-workflow process"
**IF plan file exists:**
- Load the complete plan file
- Proceed with validation
### 2. Extract Plan Requirements
**DO NOT BE LAZY - Extract EVERY requirement from the plan:**
**SUBPROCESS EXECUTION PATTERN:**
Launch a subprocess that:
1. Loads {workflowPlanFile}
2. Extracts all requirements from each section (Discovery, Classification, Requirements, Design, Tools)
3. Returns structured requirements list to parent
**SUBPROCESS RETURNS:**
Structured requirements list organized by section (discovery, classification, requirements, design, tools) with all extracted items and a count of total requirements.
**If subprocess unavailable:** Load {workflowPlanFile} in main context and extract requirements (larger context but still functional - demonstrates graceful fallback).
---
### 3. Validate Each Requirement Against Built Workflow
**DO NOT BE LAZY - For EACH requirement area, launch a subprocess that:**
1. Loads relevant workflow files (workflow.md, step files, etc.)
2. Validates that specific requirement area is implemented correctly
3. Assesses quality of implementation
4. **EITHER** updates validation report directly with findings
5. **OR** returns structured validation results to parent for aggregation
**PATTERN 2: Separate subprocess per requirement area for deep analysis**
Each subprocess gets full context to deeply understand that requirement area and validate implementation quality:
---
**SUBPROCESS 1: Discovery Validation**
**Subprocess analyzes:**
- ✅ Built workflow addresses the original problem?
- ✅ Vision from discovery is reflected in final workflow?
**Subprocess returns:**
Discovery validation results indicating whether the original problem and vision from the plan are addressed in the built workflow, with quality assessment, status (✅/❌), and any gaps identified.
---
**SUBPROCESS 2: Classification Validation**
**Subprocess analyzes:**
- ✅ Document output matches plan (yes/no)?
- ✅ Module affiliation correct?
- ✅ Continuable support as specified?
- ✅ Tri-modal structure as specified?
**Subprocess returns:**
Classification validation results for each classification attribute (document output, module, continuable, tri-modal) comparing what was specified vs what was implemented, with overall quality assessment, status (✅/❌), and any gaps.
---
**SUBPROCESS 3: Requirements Validation**
**Subprocess analyzes:**
- ✅ Flow structure matches plan?
- ✅ User interaction style as specified?
- ✅ All required inputs configured?
- ✅ Output format matches specification?
- ✅ Success criteria achievable?
**Subprocess returns:**
Requirements validation results for flow structure, interaction style, inputs, outputs, and success criteria comparing what was specified vs what was implemented, with overall quality assessment, status (✅/❌), and any gaps.
---
**SUBPROCESS 4: Design Validation**
**Subprocess analyzes:**
- ✅ All steps from design present in workflow?
- ✅ Step purposes match design?
- ✅ Flow follows design diagram?
- ✅ Interaction patterns as specified?
**Subprocess returns:**
Design validation results for each step from the plan checking if it exists in the workflow and if the purpose matches, along with whether the flow follows the design diagram and interaction patterns match, with overall quality assessment, status (✅/❌), and any gaps.
---
**SUBPROCESS 5: Tools Validation**
**Subprocess analyzes:**
- ✅ Specified tools configured in workflow?
- ✅ Data files created as specified?
**Subprocess returns:**
Tools validation results checking which specified tools are configured and which data files were created, with overall quality assessment, status (✅/❌), and any gaps.
---
**If subprocess unavailable:** Validate each requirement area sequentially in main context (larger context but still functional - demonstrates graceful fallback).
---
### 4. Aggregate Findings and Update Report
After ALL requirement area subprocesses complete, aggregate findings into validation report.
Document the following information:
**Plan Information:**
- Plan file location
- Whether a plan was found
- Total number of requirements extracted from the plan
**Implementation Coverage:**
For each requirement area from the plan (Discovery/Vision, Classification attributes, Requirements specifications, Design elements, Tools):
- What was specified in the plan
- Whether it was implemented in the workflow
- Quality assessment (High/Medium/Low)
- Implementation status
**Implementation Gaps:**
List any requirements from the plan that are NOT present in the built workflow
**Quality Issues:**
List any requirements that are implemented but with quality concerns
**Plan-Reality Alignment:**
Describe where the built workflow doesn't match what was planned
**Overall Assessment:**
- Plan implementation score (percentage)
- Overall status (Fully Implemented/Partially Implemented/Poorly Implemented/Missing Critical Items)
**Quality Assessment Framework:**
For each implemented requirement, assess quality:
- **High Quality**: Implementation follows best practices, would facilitate effectively
- **Medium Quality**: Functional but has issues or gaps
- **Low Quality**: Minimal/barely working, would not facilitate well
Examples:
- Plan specifies "Highly collaborative, intent-based facilitation" and implementation has A/P menus with intent-based language = High Quality
- Plan specifies "Continuable workflow with session resume" and implementation has step-01b-continue.md tracking stepsCompleted = High Quality
### 5. Append to Report
Append the aggregated findings to {validationReportFile} after the "## Cohesive Review" section.
### 6. Save and Complete
Save the validation report. This is the final validation step.
**Display:**
"**Plan Quality validation complete.** Validation report finalized."
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Plan file loaded completely (in subprocess or main context)
- Every requirement extracted and validated using subprocess optimization when available
- Each requirement area analyzed in separate subprocess (or main context with graceful fallback)
- Implementation gaps documented with structured findings
- Quality assessed for each requirement
- Findings aggregated and appended to report
- Context saved via subprocess pattern (return only findings, not full file contents)
### ❌ SYSTEM FAILURE:
- Not loading complete plan
- Skipping requirement checks
- Not validating each requirement area deeply
- Not using subprocess optimization when available
- Not documenting implementation gaps
- Not assessing quality
- Loading full file contents into parent instead of returning only findings
**Master Rule:** Validation is systematic and thorough. DO NOT BE LAZY. Check EVERY requirement from the plan. Use subprocess optimization (Pattern 2: per-requirement deep analysis) when available. Document all gaps. Return only findings to parent, not full file contents.

View File

@@ -1,11 +0,0 @@
---
stepsCompleted: []
lastStep: ''
date: ''
user_name: ''
project_name: ''
---
# {{document_title}}
[Content will be progressively appended by workflow steps]

View File

@@ -1,241 +0,0 @@
# BMAD Continuable Step 01 Init Template
This template provides the standard structure for step-01-init files that support workflow continuation. It includes logic to detect existing workflows and route to step-01b-continue.md for resumption.
Use this template when creating workflows that generate output documents and might take multiple sessions to complete.
<!-- TEMPLATE START -->
---
name: 'step-01-init'
description: 'Initialize the [workflow-type] workflow by detecting continuation state and creating output document'
<!-- Path Definitions -->
workflow\*path: `{project-root}/_bmad/[module-path]/workflows/[workflow-name]`
# File References (all use {variable} format in file)
thisStepFile: `./step-01-init.md`
nextStepFile: `./step-02-[step-name].md`
workflowFile: `{workflow_path}/workflow.md`
outputFile: `{output_folder}/[output-file-name]-{project_name}.md`
continueFile: `./step-01b-continue.md`
templateFile: `{workflow_path}/templates/[main-template].md`
# Template References
# This step doesn't use content templates, only the main template
---
# Step 1: Workflow Initialization
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a [specific role, e.g., "business analyst" or "technical architect"]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout
### Step-Specific Rules:
- 🎯 Focus ONLY on initialization and setup
- 🚫 FORBIDDEN to look ahead to future steps
- 💬 Handle initialization professionally
- 🚪 DETECT existing workflow state and handle continuation properly
## EXECUTION PROTOCOLS:
- 🎯 Show analysis before taking any action
- 💾 Initialize document and update frontmatter
- 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step
- 🚫 FORBIDDEN to load next step until setup is complete
## CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- Previous context = what's in output document + frontmatter
- Don't assume knowledge from other steps
- Input document discovery happens in this step
## STEP GOAL:
To initialize the [workflow-type] workflow by detecting continuation state, creating the output document, and preparing for the first collaborative session.
## INITIALIZATION SEQUENCE:
### 1. Check for Existing Workflow
First, check if the output document already exists:
- Look for file at `{output_folder}/[output-file-name]-{project_name}.md`
- If exists, read the complete file including frontmatter
- If not exists, this is a fresh workflow
### 2. Handle Continuation (If Document Exists)
If the document exists and has frontmatter with `stepsCompleted`:
- **STOP here** and load `./step-01b-continue.md` immediately
- Do not proceed with any initialization tasks
- Let step-01b handle the continuation logic
### 3. Handle Completed Workflow
If the document exists AND all steps are marked complete in `stepsCompleted`:
- Ask user: "I found an existing [workflow-output] from [date]. Would you like to:
1. Create a new [workflow-output]
2. Update/modify the existing [workflow-output]"
- If option 1: Create new document with timestamp suffix
- If option 2: Load step-01b-continue.md
### 4. Fresh Workflow Setup (If No Document)
If no document exists or no `stepsCompleted` in frontmatter:
#### A. Input Document Discovery
This workflow requires [describe input documents if any]:
**[Document Type] Documents (Optional):**
- Look for: `{output_folder}/*[pattern1]*.md`
- Look for: `{output_folder}/*[pattern2]*.md`
- If found, load completely and add to `inputDocuments` frontmatter
#### B. Create Initial Document
Copy the template from `{templateFile}` to `{output_folder}/[output-file-name]-{project_name}.md`
Initialize frontmatter with:
```yaml
---
stepsCompleted: [1]
lastStep: 'init'
inputDocuments: []
date: [current date]
user_name: { user_name }
[additional workflow-specific fields]
---
```
#### C. Show Welcome Message
"[Welcome message appropriate for workflow type]
Let's begin by [brief description of first activity]."
## ✅ SUCCESS METRICS:
- Document created from template (for fresh workflows)
- Frontmatter initialized with step 1 marked complete
- User welcomed to the process
- Ready to proceed to step 2
- OR continuation properly routed to step-01b-continue.md
## ❌ FAILURE MODES TO AVOID:
- Proceeding with step 2 without document initialization
- Not checking for existing documents properly
- Creating duplicate documents
- Skipping welcome message
- Not routing to step-01b-continue.md when needed
### 5. Present MENU OPTIONS
Display: **Proceeding to [next step description]...**
#### EXECUTION RULES:
- This is an initialization step with no user choices
- Proceed directly to next step after setup
- Use menu handling logic section below
#### Menu Handling Logic:
- After setup completion, immediately load, read entire file, then execute `{nextStepFile}` to begin [next step description]
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Document created from template (for fresh workflows)
- update frontmatter `stepsCompleted` to add 1 at the end of the array before loading next step
- Frontmatter initialized with `stepsCompleted: [1]`
- User welcomed to the process
- Ready to proceed to step 2
- OR existing workflow properly routed to step-01b-continue.md
### ❌ SYSTEM FAILURE:
- Proceeding with step 2 without document initialization
- Not checking for existing documents properly
- Creating duplicate documents
- Skipping welcome message
- Not routing to step-01b-continue.md when appropriate
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN initialization setup is complete and document is created (OR continuation is properly routed), will you then immediately load, read entire file, then execute `{nextStepFile}` to begin [next step description].
<!-- TEMPLATE END -->
## Customization Guidelines
When adapting this template for your specific workflow:
### 1. Update Placeholders
Replace bracketed placeholders with your specific values:
- `[workflow-type]` - e.g., "nutrition planning", "project requirements"
- `[module-path]` - e.g., "bmb/reference" or "custom"
- `[workflow-name]` - your workflow directory name
- `[output-file-name]` - base name for output document
- `[step-name]` - name for step 2 (e.g., "gather", "profile")
- `[main-template]` - name of your main template file
- `[workflow-output]` - what the workflow produces
- `[Document Type]` - type of input documents (if any)
- `[pattern1]`, `[pattern2]` - search patterns for input documents
- `[additional workflow-specific fields]` - any extra frontmatter fields needed
### 2. Customize Welcome Message
Adapt the welcome message in section 4C to match your workflow's tone and purpose.
### 3. Update Success Metrics
Ensure success metrics reflect your specific workflow requirements.
### 4. Adjust Next Step References
Update `{nextStepFile}` to point to your actual step 2 file.
## Implementation Notes
1. **This step MUST include continuation detection logic** - this is the key pattern
2. **Always include `continueFile` reference** in frontmatter
3. **Proper frontmatter initialization** is critical for continuation tracking
4. **Auto-proceed pattern** - this step should not have user choice menus (except for completed workflow handling)
5. **Template-based document creation** - ensures consistent output structure
## Integration with step-01b-continue.md
This template is designed to work seamlessly with the step-01b-template.md continuation step. The two steps together provide a complete pause/resume workflow capability.

View File

@@ -1,223 +0,0 @@
# BMAD Workflow Step 1B Continuation Template
This template provides the standard structure for workflow continuation steps. It handles resuming workflows that were started but not completed, ensuring seamless continuation across multiple sessions.
Use this template alongside **step-01-init-continuable-template.md** to create workflows that can be paused and resumed. The init template handles the detection and routing logic, while this template handles the resumption logic.
<!-- TEMPLATE START -->
---
name: 'step-01b-continue'
description: 'Handle workflow continuation from previous session'
<!-- Path Definitions -->
workflow\*path: '{project-root}/_bmad/[module-path]/workflows/[workflow-name]'
# File References (all use {variable} format in file)
thisStepFile: './step-01b-continue.md'
outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
workflowFile: '{workflow_path}/workflow.md'
# Template References (if needed for analysis)
## analysisTemplate: '{workflow_path}/templates/[some-template].md'
# Step 1B: Workflow Continuation
## STEP GOAL:
To resume the [workflow-type] workflow from where it was left off, ensuring smooth continuation without loss of context or progress.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a [specific role, e.g., "business analyst" or "technical architect"]
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout
### Step-Specific Rules:
- 🎯 Focus ONLY on analyzing and resuming workflow state
- 🚫 FORBIDDEN to modify content completed in previous steps
- 💬 Maintain continuity with previous sessions
- 🚪 DETECT exact continuation point from frontmatter of incomplete file {outputFile}
## EXECUTION PROTOCOLS:
- 🎯 Show your analysis of current state before taking action
- 💾 Keep existing frontmatter `stepsCompleted` values intact
- 📖 Review the template content already generated in {outputFile}
- 🚫 FORBIDDEN to modify content that was completed in previous steps
- 📝 Update frontmatter with continuation timestamp when resuming
## CONTEXT BOUNDARIES:
- Current [output-file-name] document is already loaded
- Previous context = complete template + existing frontmatter
- [Key data collected] already gathered in previous sessions
- Last completed step = last value in `stepsCompleted` array from frontmatter
## CONTINUATION SEQUENCE:
### 1. Analyze Current State
Review the frontmatter of {outputFile} to understand:
- `stepsCompleted`: Which steps are already done (the rightmost value is the last step completed)
- `lastStep`: Name/description of last completed step (if exists)
- `date`: Original workflow start date
- `inputDocuments`: Any documents loaded during initialization
- [Other relevant frontmatter fields]
Example: If `stepsCompleted: [1, 2, 3, 4]`, then step 4 was the last completed step.
### 2. Read All Completed Step Files
For each step number in `stepsCompleted` array (excluding step 1, which is init):
1. **Construct step filename**: `step-[N]-[name].md`
2. **Read the complete step file** to understand:
- What that step accomplished
- What the next step should be (from nextStep references)
- Any specific context or decisions made
Example: If `stepsCompleted: [1, 2, 3]`:
- Read `step-02-[name].md`
- Read `step-03-[name].md`
- The last file will tell you what step-04 should be
### 3. Review Previous Output
Read the complete {outputFile} to understand:
- Content generated so far
- Sections completed vs pending
- User decisions and preferences
- Current state of the deliverable
### 4. Determine Next Step
Based on the last completed step file:
1. **Find the nextStep reference** in the last completed step file
2. **Validate the file exists** at the referenced path
3. **Confirm the workflow is incomplete** (not all steps finished)
### 5. Welcome Back Dialog
Present a warm, context-aware welcome:
"Welcome back! I see we've completed [X] steps of your [workflow-type].
We last worked on [brief description of last step].
Based on our progress, we're ready to continue with [next step description].
Are you ready to continue where we left off?"
### 6. Validate Continuation Intent
Ask confirmation questions if needed:
"Has anything changed since our last session that might affect our approach?"
"Are you still aligned with the goals and decisions we made earlier?"
"Would you like to review what we've accomplished so far?"
### 7. Present MENU OPTIONS
Display: "**Resuming workflow - Select an Option:** [C] Continue to [Next Step Name]"
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and then end with display again of the menu options
- Update frontmatter with continuation timestamp when 'C' is selected
#### Menu Handling Logic:
- IF C:
1. Update frontmatter: add `lastContinued: [current date]`
2. Load, read entire file, then execute the appropriate next step file (determined in section 4)
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and continuation analysis is complete, will you then:
1. Update frontmatter in {outputFile} with continuation timestamp
2. Load, read entire file, then execute the next step file determined from the analysis
Do NOT modify any other content in the output document during this continuation step.
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Correctly identified last completed step from `stepsCompleted` array
- Read and understood all previous step contexts
- User confirmed readiness to continue
- Frontmatter updated with continuation timestamp
- Workflow resumed at appropriate next step
### ❌ SYSTEM FAILURE:
- Skipping analysis of existing state
- Modifying content from previous steps
- Loading wrong next step file
- Not updating frontmatter with continuation info
- Proceeding without user confirmation
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
<!-- TEMPLATE END -->
## Customization Guidelines
When adapting this template for your specific workflow:
### 1. Update Placeholders
Replace bracketed placeholders with your specific values:
- `[module-path]` - e.g., "bmb/reference" or "custom"
- `[workflow-name]` - your workflow directory name
- `[workflow-type]` - e.g., "nutrition planning", "project requirements"
- `[output-file-name]` - base name for output document
- `[specific role]` - the role this workflow plays
- `[your expertise]` - what expertise you bring
- `[their expertise]` - what expertise user brings
### 2. Add Workflow-Specific Context
Add any workflow-specific fields to section 1 (Analyze Current State) if your workflow uses additional frontmatter fields for tracking.
### 3. Customize Welcome Message
Adapt the welcome dialog in section 5 to match your workflow's tone and context.
### 4. Add Continuation-Specific Validations
If your workflow has specific checkpoints or validation requirements, add them to section 6.
## Implementation Notes
1. **This step should NEVER modify the output content** - only analyze and prepare for continuation
2. **Always preserve the `stepsCompleted` array** - don't modify it in this step
3. **Timestamp tracking** - helps users understand when workflows were resumed
4. **Context preservation** - the key is maintaining all previous work and decisions
5. **Seamless experience** - user should feel like they never left the workflow

View File

@@ -1,290 +0,0 @@
# BMAD Workflow Step Template
This template provides the standard structure for all BMAD workflow step files. Copy and modify this template for each new step you create.
<!-- TEMPLATE START -->
---
name: 'step-[N]-[short-name]'
description: '[Brief description of what this step accomplishes]'
<!-- Path Definitions -->
workflow\*path: '{project-root}/_bmad/[module]/reference/workflows/[workflow-name]' # the folder the workflow.md file is in
# File References (all use {variable} format in file)
thisStepFile: './step-[N]-[short-name].md'
nextStep{N+1}: './step-[N+1]-[next-short-name].md' # Remove for final step or no next step
altStep{Y}: './step-[Y]-[some-other-step].md' # if there is an alternate next story depending on logic
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
# Task References (IF THE workflow uses and it makes sense in this step to have these )
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
# Template References (if this step uses a specific templates)
profileTemplate: '{workflow_path}/templates/profile-section.md'
assessmentTemplate: '{workflow_path}/templates/assessment-section.md'
strategyTemplate: '{workflow_path}/templates/strategy-section.md'
# Data (CSV for example) References (if used in this step)
someData: '{workflow_path}/data/foo.csv'
# Add more as needed - but ONLY what is used in this specific step file!
---
# Step [N]: [Step Name]
## STEP GOAL:
[State the goal in context of the overall workflow goal. Be specific about what this step accomplishes and how it contributes to the workflow's purpose.]
Example: "To analyze user requirements and document functional specifications that will guide the development process"
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a [specific role, e.g., "business analyst" or "technical architect"]
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout
### Step-Specific Rules:
- 🎯 Focus only on [specific task for this step]
- 🚫 FORBIDDEN to [what not to do in this step]
- 💬 Approach: [how to handle this specific task]
- 📋 Additional rule relevant to this step
## EXECUTION PROTOCOLS:
- 🎯 Follow the MANDATORY SEQUENCE exactly
- 💾 [Step-specific protocol 2 - e.g., document updates]
- 📖 [Step-specific protocol 3 - e.g., tracking requirements]
- 🚫 [Step-specific restriction]
## CONTEXT BOUNDARIES:
- Available context: [what context is available from previous steps]
- Focus: [what this step should concentrate on]
- Limits: [what not to assume or do]
- Dependencies: [what this step depends on]
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Title
[Specific instructions for first part of the work]
### 2. Title
[Specific instructions for second part of the work]
### N. Title (as many as needed)
<!-- not ever step will include advanced elicitation or party mode, in which case generally will just have the C option -->
<!-- for example an init step 1 that loads data, or step 1b continues a workflow would not need advanced elicitation or party mode - but any step where the user and the llm work together on content, thats where it makes sense to include them -->
### N. Present MENU OPTIONS
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask} # Or custom action
- IF P: Execute {partyModeWorkflow} # Or custom action
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution completes, redisplay the menu
- User can chat or ask questions - always respond when conversation ends, redisplay the menu
## CRITICAL STEP COMPLETION NOTE
[Specific conditions for completing this step and transitioning to the next, such as output to file being created with this tasks updates]
ONLY WHEN [C continue option] is selected and [completion requirements], will you then load and read fully `[installed_path]/step-[next-number]-[name].md` to execute and begin [next step description].
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- [Step-specific success criteria 1]
- [Step-specific success criteria 2]
- Content properly saved/document updated
- Menu presented and user input handled correctly
- [General success criteria]
### ❌ SYSTEM FAILURE:
- [Step-specific failure mode 1]
- [Step-specific failure mode 2]
- Proceeding without user input/selection
- Not updating required documents/frontmatter
- [Step-specific failure mode N]
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
<!-- TEMPLATE END-->
## Common Menu Patterns to use in the final sequence item in a step file
FYI Again - party mode is useful for the user to reach out and get opinions from other agents.
Advanced elicitation is use to direct you to think of alternative outputs of a sequence you just performed.
### Standard Menu - when a sequence in a step results in content produced by the agent or human that could be improved before proceeding
```markdown
### N. Present MENU OPTIONS
Display: "**Select an Option:** [A] [Advanced Elicitation] [P] Party Mode [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
```
### Optional Menu - Auto-Proceed Menu (No User Choice or confirm, just flow right to the next step once completed)
```markdown
### N. Present MENU OPTIONS
Display: "**Proceeding to [next action]...**"
#### Menu Handling Logic:
- After [completion condition], immediately load, read entire file, then execute {nextStepFile}
#### EXECUTION RULES:
- This is an [auto-proceed reason] step with no user choices
- Proceed directly to next step after setup
```
### Custom Menu Options
```markdown
### N. Present MENU OPTIONS
Display: "**Select an Option:** [A] [Custom Action 1] [B] [Custom Action 2] [C] Continue"
#### Menu Handling Logic:
- IF A: [Custom handler route for option A]
- IF B: [Custom handler route for option B]
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
```
### Conditional Menu (Based on Workflow State)
```markdown
### N. Present MENU OPTIONS
Display: "**Select an Option:** [A] [Continue to Step Foo] [A] [Continue to Step Bar]"
#### Menu Handling Logic:
- IF A: Execute {customAction}
- IF C: Save content to {outputFile}, update frontmatter, check [condition]:
- IF [condition true]: load, read entire file, then execute {pathA}
- IF [condition false]: load, read entire file, then execute {pathB}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
- User can chat or ask questions - always respond and then end with display again of the menu options
```
## Example Step Implementations
### Initialization Step Example
See [step-01-discovery.md](../steps-c/step-01-discovery.md) for an example of:
- Detecting existing workflow state and short circuit to 1b
- Creating output documents from templates
- Auto-proceeding to the next step (this is not the normal behavior of most steps)
- Handling continuation scenarios
### Continuation Step Example
See [step-01b-continue.md](../steps-c/step-01b-continuation.md) for an example of:
- Handling already-in-progress workflows that the user now wants to continue progress
- Detecting completion status (which step was already completed last)
- Presenting update vs new plan options
- Seamless workflow resumption by reviewing existing plan and output thus far that has been recorded and then jumping to the proper step
### Standard Step with Menu Example
See [step-02-classification.md](../steps-c/step-02-classification.md#8-present-menu-options) for an example of:
- Presenting a menu with A/P/C options
- Forcing halt until user selects 'C' (Continue)
- Writing all collected content to output file only when 'C' is selected
- Updating frontmatter with step completion before proceeding
- Using frontmatter variables for file references
### Final Step Example
See [step-11-completion.md](../steps-c/step-11-completion.md) for an example of:
- Completing workflow deliverables
- Marking workflow as complete in frontmatter
- Providing final success messages
- Ending the workflow session gracefully or moving on to a validation workflow if applicable
## Best Practices
1. **Keep step files focused** - Each step should do one thing well
2. **Be explicit in instructions** - No ambiguity about what to do
3. **Include all critical rules** - Don't assume anything from other steps
4. **Use clear, concise language** - Avoid jargon unless necessary
5. **Ensure all menu paths have handlers** - Ensure every option has clear instructions - use menu items that make sense for the situation.
6. **Document dependencies** - Clearly state what this step needs with full paths in front matter
7. **Define success and failure clearly** - Both for the step and the workflow
8. **Mark completion clearly** - Ensure final steps update frontmatter to indicate workflow completion

View File

@@ -1,102 +0,0 @@
# BMAD Workflow Template
This template provides the standard structure for all BMAD workflow files. Copy and modify this template for each new workflow you create.
<!-- TEMPLATE START -->
---
name: [WORKFLOW_DISPLAY_NAME]
description: [Brief description of what this workflow accomplishes]
web_bundle: [true/false] # Set to true for inclusion in web bundle builds
---
# [WORKFLOW_DISPLAY_NAME]
**Goal:** [State the primary goal of this workflow in one clear sentence]
**Your Role:** In addition to your name, communication_style, and persona, you are also a [role] collaborating with [user type]. This is a partnership, not a client-vendor relationship. You bring [your expertise], while the user brings [their expertise]. Work together as equals.
## WORKFLOW ARCHITECTURE
### Core Principles
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
- **Append-Only Building**: Build documents by appending content as directed to the output file
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🚫 **NEVER** skip steps or optimize the sequence
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
---
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/_bmad/[MODULE FOLDER]/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, [MODULE VARS]
### 2. First Step EXECUTION
Load, read the full file and then execute [FIRST STEP FILE PATH] to begin the workflow.
<!-- TEMPLATE END -->
## How to Use This Template
### Step 1: Copy and Replace Placeholders
Copy the template above and replace:
- `[WORKFLOW_DISPLAY_NAME]` → Your workflow's display name
- `[MODULE FOLDER]` → Default is `core` unless this is for another module (such as bmm, cis, or another as directed by user)
- `[Brief description]` → One-sentence description
- `[true/false]` → Whether to include in web bundle
- `[role]` → AI's role in this workflow
- `[user type]` → Who the user is
- `[CONFIG_PATH]` → Path to config file (usually `bmm/config.yaml` or `bmb/config.yaml`)
- `[WORKFLOW_PATH]` → Path to your workflow folder
- `[MODULE VARS]` → Extra config variables available in a module configuration that the workflow would need to use
### Step 2: Create the Folder Structure
```
[workflow-folder]/
├── workflow.md # This file
├── data/ # (Optional csv or other data files)
├── templates/ # template files for output
└── steps/
├── step-01-init.md
├── step-02-[name].md
└── ...
```
### Step 3: Configure the Initialization Path
Update the last line of the workflow.md being created to replace [FIRST STEP FILE PATH] with the path to the actual first step file.
Example: Load, read the full file and then execute `./step-01-init.md` to begin the workflow.
### NOTE: You can View a real example of a perfect workflow.md file from the one you were executed from `../workflow.md`

View File

@@ -1,109 +0,0 @@
---
name: workflow
description: "Create structured standalone workflows using markdown-based step architecture (tri-modal: create, validate, edit)"
web_bundle: true
---
# Create Workflow
**Goal:** Create structured, repeatable standalone workflows through collaborative conversation and step-by-step guidance.
**Your Role:** In addition to your name, communication_style, and persona, you are also a workflow architect and systems designer collaborating with a workflow creator. This is a partnership, not a client-vendor relationship. You bring expertise in workflow design patterns, step architecture, and collaborative facilitation, while the user brings their domain knowledge and specific workflow requirements. Work together as equals.
**Meta-Context:** The workflow architecture described below (step-file architecture, micro-file design, JIT loading, sequential enforcement, state tracking) is exactly what you'll be helping users create for their own workflows. You're demonstrating the pattern while building it with them.
---
## WORKFLOW ARCHITECTURE
This uses **step-file architecture** for disciplined execution:
### Core Principles
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
- **Append-Only Building**: Build documents by appending content as directed to the output file
- **Tri-Modal Structure**: Separate step folders for Create (steps-c/), Validate (steps-v/), and Edit (steps-e/) modes
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🚫 **NEVER** skip steps or optimize the sequence
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
---
## INITIALIZATION SEQUENCE
### 1. Configuration Loading
Load and read full config from {project-root}/_bmad/bmb/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### 2. Mode Determination
**Check if mode was specified in the command invocation:**
- If user invoked with "create workflow" or "new workflow" or "build workflow" → Set mode to **create**
- If user invoked with "validate workflow" or "review workflow" or "-v" or "--validate" → Set mode to **validate**
- If user invoked with "validate workflow MAX-PARALLEL" or "review workflow MAX-PARALLEL" or "-vmax" or "--validate-max" → Set mode to **validate-max-parallel**
- If user invoked with "edit workflow" or "modify workflow" or "-e" or "--edit" → Set mode to **edit**
**If mode is still unclear, ask user:**
"Welcome to the BMAD Workflow Creator! What would you like to do?
**[C]reate** - Build a new workflow from scratch
**[V]alidate** - Review an existing workflow and generate validation report
**[VMP] Validate Max Parallel** - Review an existing workflow and generate validation report running max steps as possible in parallel
**[E]dit** - Modify an existing workflow
Please select: [C]reate / [V]alidate / [E]dit"
### 3. Route to First Step
**IF mode == create:**
"**Creating a new workflow. How would you like to start?**
**[F]rom scratch** - Start with a blank slate - I'll help you discover your idea
**[C]onvert existing** - Convert an existing workflow to BMAD compliant format
Please select: [F]rom scratch / [C]onvert existing"
#### Create Mode Routing:
- **IF F:** Load, read completely, then execute `steps-c/step-01-discovery.md`
- **IF C:** Ask for workflow path: "Please provide the path to the workflow you want to convert."
Then load, read completely, then execute `steps-c/step-00-conversion.md`
- **IF Any other:** help user respond, then redisplay create mode menu
**IF mode == validate:**
Prompt for workflow path: "Which workflow would you like to validate? Please provide the path to the workflow.md file."
Then load, read completely, and execute `steps-v/step-01-validate.md`
**IF mode == validate-max-parallel:**
Prompt for workflow path: "Which workflow would you like to validate? Please provide the path to the workflow.md file." validate a subprocess or task agent tool or similar is available
Then load, read completely, and execute `steps-v/step-01-validate-max-mode.md`
**IF mode == edit:**
Prompt for workflow path: "Which workflow would you like to edit? Please provide the path to the workflow.md file."
Then load, read completely, and execute `steps-e/step-e-01-assess-workflow.md`