mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
feat: implement granular step-file workflow architecture with multi-menu support
## Major Features Added - **Step-file workflow architecture**: Transform monolithic workflows into granular step files for improved LLM adherence and consistency - **Multi-menu handler system**: New `handler-multi.xml` enables grouped menu items with fuzzy matching - **Workflow compliance checker**: Added automated compliance validation for all workflows - **Create/edit agent workflows**: New structured workflows for agent creation and editing ## Workflow Enhancements - **Create-workflow**: Expanded from 6 to 14 detailed steps covering tools, design, compliance - **Granular step execution**: Each workflow step now has dedicated files for focused execution - **New documentation**: Added CSV data standards, intent vs prescriptive spectrum, and common tools reference ## Complete Migration Status - **4 workflows fully migrated**: `create-agent`, `edit-agent`, `create-workflow`, and `edit-workflow` now use the new granular step-file architecture - **Legacy transformation**: `edit-workflow` includes built-in capability to transform legacy single-file workflows into the new improved granular format - **Future cleanup**: Legacy versions will be removed in a future commit after validation ## Schema Updates - **Multi-menu support**: Updated agent schema to support `triggers` array for grouped menu items - **Legacy compatibility**: Maintains backward compatibility with single `trigger` field - **Discussion enhancements**: Added conversational_knowledge recommendation for discussion agents ## File Structure Changes - Added: `create-agent/`, `edit-agent/`, `edit-workflow/`, `workflow-compliance-check/` workflows - Added: Documentation standards and CSV reference files - Refactored: `create-workflow/steps/` with detailed granular step files ## Handler Improvements - Enhanced `handler-exec.xml` with clearer execution instructions - Improved data passing context for executed files - Better error handling and user guidance This architectural change significantly improves workflow execution consistency across all LLM models by breaking complex processes into manageable, focused steps. The edit-workflow transformation tool ensures smooth migration of existing workflows to the new format.
This commit is contained in:
221
src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md
Normal file
221
src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md
Normal file
@@ -0,0 +1,221 @@
|
||||
---
|
||||
name: 'step-01-analyze'
|
||||
description: 'Load and deeply understand the target workflow'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/edit-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-01-analyze.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-02-discover.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
analysisTemplate: '{workflow_path}/templates/workflow-analysis.md'
|
||||
---
|
||||
|
||||
# Step 1: Workflow Analysis
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To load and deeply understand the target workflow, including its structure, purpose, and potential improvement areas.
|
||||
|
||||
## 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 workflow editor and improvement 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 analysis expertise and best practices knowledge
|
||||
- ✅ User brings their workflow context and improvement needs
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on analysis and understanding, not editing yet
|
||||
- 🚫 FORBIDDEN to suggest specific changes in this step
|
||||
- 💬 Ask questions to understand the workflow path
|
||||
- 🚪 DETECT if this is a new format (standalone) or old format workflow
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Analyze workflow thoroughly and systematically
|
||||
- 💾 Document analysis findings in {outputFile}
|
||||
- 📖 Update frontmatter `stepsCompleted: [1]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and analysis is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- User provides the workflow path to analyze
|
||||
- Load all workflow documentation for reference
|
||||
- Focus on understanding current state, not improvements yet
|
||||
- This is about discovery and analysis
|
||||
|
||||
## WORKFLOW ANALYSIS PROCESS:
|
||||
|
||||
### 1. Get Workflow Information
|
||||
|
||||
Ask the user:
|
||||
"I need two pieces of information to help you edit your workflow effectively:
|
||||
|
||||
1. **What is the path to the workflow you want to edit?**
|
||||
- Path to workflow.md file (new format)
|
||||
- Path to workflow.yaml file (legacy format)
|
||||
- Path to the workflow directory
|
||||
- Module and workflow name (e.g., 'bmb/workflows/create-workflow')
|
||||
|
||||
2. **What do you want to edit or improve in this workflow?**
|
||||
- Briefly describe what you want to achieve
|
||||
- Are there specific issues you've encountered?
|
||||
- Any user feedback you've received?
|
||||
- New features you want to add?
|
||||
|
||||
This will help me focus my analysis on what matters most to you."
|
||||
|
||||
### 2. Load Workflow Files
|
||||
|
||||
Load the target workflow completely:
|
||||
|
||||
- workflow.md (or workflow.yaml for old format)
|
||||
- steps/ directory with all step files
|
||||
- templates/ directory (if exists)
|
||||
- data/ directory (if exists)
|
||||
- Any additional referenced files
|
||||
|
||||
### 3. Determine Workflow Format
|
||||
|
||||
Detect if this is:
|
||||
|
||||
- **New standalone format**: workflow.md with steps/ subdirectory
|
||||
- **Legacy XML format**: workflow.yaml with instructions.md
|
||||
- **Mixed format**: Partial migration
|
||||
|
||||
### 4. Focused Analysis
|
||||
|
||||
Analyze the workflow with attention to the user's stated goals:
|
||||
|
||||
#### Initial Goal-Focused Analysis
|
||||
|
||||
Based on what the user wants to edit:
|
||||
|
||||
- If **user experience issues**: Focus on step clarity, menu patterns, instruction style
|
||||
- If **functional problems**: Focus on broken references, missing files, logic errors
|
||||
- If **new features**: Focus on integration points, extensibility, structure
|
||||
- If **compliance issues**: Focus on best practices, standards, validation
|
||||
|
||||
#### Structure Analysis
|
||||
|
||||
- Identify workflow type (document, action, interactive, autonomous, meta)
|
||||
- Count and examine all steps
|
||||
- Map out step flow and dependencies
|
||||
- Check for proper frontmatter in all files
|
||||
|
||||
#### Content Analysis
|
||||
|
||||
- Understand purpose and user journey
|
||||
- Evaluate instruction style (intent-based vs prescriptive)
|
||||
- Review menu patterns and user interaction points
|
||||
- Check variable consistency across files
|
||||
|
||||
#### Compliance Analysis
|
||||
|
||||
Load reference documentation as needed:
|
||||
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md`
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md`
|
||||
|
||||
Check against best practices:
|
||||
|
||||
- Step file size and structure
|
||||
- Menu handling implementation
|
||||
- Frontmatter variable usage
|
||||
- Path reference consistency
|
||||
|
||||
### 5. Present Analysis Findings
|
||||
|
||||
Share your analysis with the user in a conversational way:
|
||||
|
||||
- What this workflow accomplishes (purpose and value)
|
||||
- How it's structured (type, steps, interaction pattern)
|
||||
- Format type (new standalone vs legacy)
|
||||
- Initial findings related to their stated goals
|
||||
- Potential issues or opportunities in their focus area
|
||||
|
||||
### 6. Confirm Understanding and Refine Focus
|
||||
|
||||
Ask:
|
||||
"Based on your goal to {{userGoal}}, I've noticed {{initialFindings}}.
|
||||
Does this align with what you were expecting? Are there other areas you'd like me to focus on in my analysis?"
|
||||
|
||||
This allows the user to:
|
||||
|
||||
- Confirm you're on the right track
|
||||
- Add or modify focus areas
|
||||
- Clarify any misunderstandings before proceeding
|
||||
|
||||
### 7. Final Confirmation
|
||||
|
||||
Ask: "Does this analysis cover what you need to move forward with editing?"
|
||||
|
||||
## CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After analysis, append to {outputFile}:
|
||||
|
||||
Load and append the content from {analysisTemplate}
|
||||
|
||||
### 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 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 analysis 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](#7-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and analysis is saved to document and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin improvement discovery step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Target workflow loaded completely
|
||||
- Analysis performed systematically
|
||||
- Findings documented clearly
|
||||
- User confirms understanding
|
||||
- Analysis saved to {outputFile}
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping analysis steps
|
||||
- Not loading all workflow files
|
||||
- Making suggestions without understanding
|
||||
- Not saving analysis findings
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,253 @@
|
||||
---
|
||||
name: 'step-02-discover'
|
||||
description: 'Discover improvement goals collaboratively'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/edit-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-02-discover.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-03-improve.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
goalsTemplate: '{workflow_path}/templates/improvement-goals.md'
|
||||
---
|
||||
|
||||
# Step 2: Discover Improvement Goals
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To collaboratively discover what the user wants to improve and why, before diving into any edits.
|
||||
|
||||
## 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 workflow editor and improvement 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 guide discovery with thoughtful questions
|
||||
- ✅ User brings their context, feedback, and goals
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on understanding improvement goals
|
||||
- 🚫 FORBIDDEN to suggest specific solutions yet
|
||||
- 💬 Ask open-ended questions to understand needs
|
||||
- 🚪 ORGANIZE improvements by priority and impact
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Guide collaborative discovery conversation
|
||||
- 💾 Document goals in {outputFile}
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and goals are documented
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Analysis from step 1 is available and informs discovery
|
||||
- Focus areas identified in step 1 guide deeper exploration
|
||||
- Focus on WHAT to improve and WHY
|
||||
- Don't discuss HOW to improve yet
|
||||
- This is about detailed needs assessment, not solution design
|
||||
|
||||
## DISCOVERY PROCESS:
|
||||
|
||||
### 1. Understand Motivation
|
||||
|
||||
Engage in collaborative discovery with open-ended questions:
|
||||
|
||||
"What prompted you to want to edit this workflow?"
|
||||
|
||||
Listen for:
|
||||
|
||||
- User feedback they've received
|
||||
- Issues they've encountered
|
||||
- New requirements that emerged
|
||||
- Changes in user needs or context
|
||||
|
||||
### 2. Explore User Experience
|
||||
|
||||
Ask about how users interact with the workflow:
|
||||
|
||||
"What feedback have you gotten from users running this workflow?"
|
||||
|
||||
Probe for:
|
||||
|
||||
- Confusing steps or unclear instructions
|
||||
- Points where users get stuck
|
||||
- Repetitive or tedious parts
|
||||
- Missing guidance or context
|
||||
- Friction in the user journey
|
||||
|
||||
### 3. Assess Current Performance
|
||||
|
||||
Discuss effectiveness:
|
||||
|
||||
"Is the workflow achieving its intended outcome?"
|
||||
|
||||
Explore:
|
||||
|
||||
- Are users successful with this workflow?
|
||||
- What are the success/failure rates?
|
||||
- Where do most users drop off?
|
||||
- Are there quality issues with outputs?
|
||||
|
||||
### 4. Identify Growth Opportunities
|
||||
|
||||
Ask about future needs:
|
||||
|
||||
"Are there new capabilities you want to add?"
|
||||
|
||||
Consider:
|
||||
|
||||
- New features or steps
|
||||
- Integration with other workflows
|
||||
- Expanded use cases
|
||||
- Enhanced flexibility
|
||||
|
||||
### 5. Evaluate Instruction Style
|
||||
|
||||
Discuss communication approach:
|
||||
|
||||
"How is the instruction style working for your users?"
|
||||
|
||||
Explore:
|
||||
|
||||
- Is it too rigid or too loose?
|
||||
- Should certain steps be more adaptive?
|
||||
- Do some steps need more specificity?
|
||||
- Does the style match the workflow's purpose?
|
||||
|
||||
### 6. Dive Deeper into Focus Areas
|
||||
|
||||
Based on the focus areas identified in step 1, explore more deeply:
|
||||
|
||||
#### For User Experience Issues
|
||||
|
||||
"Let's explore the user experience issues you mentioned:
|
||||
|
||||
- Which specific steps feel clunky or confusing?
|
||||
- At what points do users get stuck?
|
||||
- What kind of guidance would help them most?"
|
||||
|
||||
#### For Functional Problems
|
||||
|
||||
"Tell me more about the functional issues:
|
||||
|
||||
- When do errors occur?
|
||||
- What specific functionality isn't working?
|
||||
- Are these consistent issues or intermittent?"
|
||||
|
||||
#### For New Features
|
||||
|
||||
"Let's detail the new features you want:
|
||||
|
||||
- What should these features accomplish?
|
||||
- How should users interact with them?
|
||||
- Are there examples of similar workflows to reference?"
|
||||
|
||||
#### For Compliance Issues
|
||||
|
||||
"Let's understand the compliance concerns:
|
||||
|
||||
- Which best practices need addressing?
|
||||
- Are there specific standards to meet?
|
||||
- What validation would be most valuable?"
|
||||
|
||||
### 7. Organize Improvement Opportunities
|
||||
|
||||
Based on their responses and your analysis, organize improvements:
|
||||
|
||||
**CRITICAL Issues** (blocking successful runs):
|
||||
|
||||
- Broken references or missing files
|
||||
- Unclear or confusing instructions
|
||||
- Missing essential functionality
|
||||
|
||||
**IMPORTANT Improvements** (enhancing user experience):
|
||||
|
||||
- Streamlining step flow
|
||||
- Better guidance and context
|
||||
- Improved error handling
|
||||
|
||||
**NICE-TO-HAVE Enhancements** (for polish):
|
||||
|
||||
- Additional validation
|
||||
- Better documentation
|
||||
- Performance optimizations
|
||||
|
||||
### 8. Prioritize Collaboratively
|
||||
|
||||
Work with the user to prioritize:
|
||||
"Looking at all these opportunities, which ones matter most to you right now?"
|
||||
|
||||
Help them consider:
|
||||
|
||||
- Impact on users
|
||||
- Effort to implement
|
||||
- Dependencies between improvements
|
||||
- Timeline constraints
|
||||
|
||||
## CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After discovery, append to {outputFile}:
|
||||
|
||||
Load and append the content from {goalsTemplate}
|
||||
|
||||
### 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 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 goals 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](#8-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and goals are saved to document and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin collaborative improvement step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- User improvement goals clearly understood
|
||||
- Issues and opportunities identified
|
||||
- Priorities established collaboratively
|
||||
- Goals documented in {outputFile}
|
||||
- User ready to proceed with improvements
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping discovery dialogue
|
||||
- Making assumptions about user needs
|
||||
- Not documenting discovered goals
|
||||
- Rushing to solutions without understanding
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
217
src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md
Normal file
217
src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md
Normal file
@@ -0,0 +1,217 @@
|
||||
---
|
||||
name: 'step-03-improve'
|
||||
description: 'Facilitate collaborative improvements to the workflow'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/edit-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-03-improve.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-04-validate.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
improvementLogTemplate: '{workflow_path}/templates/improvement-log.md'
|
||||
---
|
||||
|
||||
# Step 3: Collaborative Improvement
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To facilitate collaborative improvements to the workflow, working iteratively on each identified issue.
|
||||
|
||||
## 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 workflow editor and improvement 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 guide improvements with explanations and options
|
||||
- ✅ User makes decisions and approves changes
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Work on ONE improvement at a time
|
||||
- 🚫 FORBIDDEN to make changes without user approval
|
||||
- 💬 Explain the rationale for each proposed change
|
||||
- 🚪 ITERATE: improve, review, refine
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Facilitate improvements collaboratively and iteratively
|
||||
- 💾 Document all changes in improvement log
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and improvements are complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Analysis and goals from previous steps guide improvements
|
||||
- Load workflow creation documentation as needed
|
||||
- Focus on improvements prioritized in step 2
|
||||
- This is about collaborative implementation, not solo editing
|
||||
|
||||
## IMPROVEMENT PROCESS:
|
||||
|
||||
### 1. Load Reference Materials
|
||||
|
||||
Load documentation as needed for specific improvements:
|
||||
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md`
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md`
|
||||
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
|
||||
|
||||
### 2. Address Each Improvement Iteratively
|
||||
|
||||
For each prioritized improvement:
|
||||
|
||||
#### A. Explain Current State
|
||||
|
||||
Show the relevant section:
|
||||
"Here's how this step currently works:
|
||||
[Display current content]
|
||||
|
||||
This can cause {{problem}} because {{reason}}."
|
||||
|
||||
#### B. Propose Improvement
|
||||
|
||||
Suggest specific changes:
|
||||
"Based on best practices, we could:
|
||||
{{proposedSolution}}
|
||||
|
||||
This would help users by {{benefit}}."
|
||||
|
||||
#### C. Collaborate on Approach
|
||||
|
||||
Ask for input:
|
||||
"Does this approach address your need?"
|
||||
"Would you like to modify this suggestion?"
|
||||
"What concerns do you have about this change?"
|
||||
|
||||
#### D. Get Explicit Approval
|
||||
|
||||
"Should I apply this change?"
|
||||
|
||||
#### E. Apply and Show Result
|
||||
|
||||
Make the change and display:
|
||||
"Here's the updated version:
|
||||
[Display new content]
|
||||
|
||||
Does this look right to you?"
|
||||
|
||||
### 3. Common Improvement Patterns
|
||||
|
||||
#### Step Flow Improvements
|
||||
|
||||
- Merge redundant steps
|
||||
- Split complex steps
|
||||
- Reorder for better flow
|
||||
- Add missing transitions
|
||||
|
||||
#### Instruction Style Refinement
|
||||
|
||||
Load step-template.md for reference:
|
||||
|
||||
- Convert prescriptive to intent-based for discovery steps
|
||||
- Add structure to vague instructions
|
||||
- Balance guidance with autonomy
|
||||
|
||||
#### Variable Consistency Fixes
|
||||
|
||||
- Identify all variable references
|
||||
- Ensure consistent naming (snake_case)
|
||||
- Verify variables are defined in workflow.md
|
||||
- Update all occurrences
|
||||
|
||||
#### Menu System Updates
|
||||
|
||||
- Standardize menu patterns
|
||||
- Ensure proper A/P/C options
|
||||
- Fix menu handling logic
|
||||
- Add Advanced Elicitation where useful
|
||||
|
||||
#### Frontmatter Compliance
|
||||
|
||||
- Add required fields to workflow.md
|
||||
- Ensure proper path variables
|
||||
- Include web_bundle configuration if needed
|
||||
- Remove unused fields
|
||||
|
||||
#### Template Updates
|
||||
|
||||
- Align template variables with step outputs
|
||||
- Improve variable naming
|
||||
- Add missing template sections
|
||||
- Test variable substitution
|
||||
|
||||
### 4. Track All Changes
|
||||
|
||||
For each improvement made, document:
|
||||
|
||||
- What was changed
|
||||
- Why it was changed
|
||||
- Files modified
|
||||
- User approval
|
||||
|
||||
## CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After each improvement iteration, append to {outputFile}:
|
||||
|
||||
Load and append content from {improvementLogTemplate}
|
||||
|
||||
### 5. 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 improvement log 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](#5-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and all prioritized improvements are complete and documented, will you then load, read entire file, then execute {nextStepFile} to execute and begin validation step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All prioritized improvements addressed
|
||||
- User approved each change
|
||||
- Changes documented clearly
|
||||
- Workflow follows best practices
|
||||
- Improvement log updated
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Making changes without user approval
|
||||
- Not documenting changes
|
||||
- Skipping prioritized improvements
|
||||
- Breaking workflow functionality
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,193 @@
|
||||
---
|
||||
name: 'step-04-validate'
|
||||
description: 'Validate improvements and prepare for completion'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/edit-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-04-validate.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-05-compliance-check.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
||||
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
validationTemplate: '{workflow_path}/templates/validation-results.md'
|
||||
completionTemplate: '{workflow_path}/templates/completion-summary.md'
|
||||
---
|
||||
|
||||
# Step 4: Validation and Completion
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To validate all improvements and prepare a completion summary of the workflow editing 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: Always read the complete step file before taking any action
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow editor and improvement 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 ensure quality and completeness
|
||||
- ✅ User confirms final state
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on validation and completion
|
||||
- 🚫 FORBIDDEN to make additional edits at this stage
|
||||
- 💬 Explain validation results clearly
|
||||
- 🚪 PREPARE final summary and next steps
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Validate all changes systematically
|
||||
- 💾 Document validation results
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and validation is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- All improvements from step 3 should be implemented
|
||||
- Focus on validation, not additional changes
|
||||
- Reference best practices for validation criteria
|
||||
- This completes the editing process
|
||||
|
||||
## VALIDATION PROCESS:
|
||||
|
||||
### 1. Comprehensive Validation Checks
|
||||
|
||||
Validate the improved workflow systematically:
|
||||
|
||||
#### File Structure Validation
|
||||
|
||||
- [ ] All required files present
|
||||
- [ ] Directory structure correct
|
||||
- [ ] File names follow conventions
|
||||
- [ ] Path references resolve correctly
|
||||
|
||||
#### Configuration Validation
|
||||
|
||||
- [ ] workflow.md frontmatter complete
|
||||
- [ ] All variables properly formatted
|
||||
- [ ] Path variables use correct syntax
|
||||
- [ ] No hardcoded paths exist
|
||||
|
||||
#### Step File Compliance
|
||||
|
||||
- [ ] Each step follows template structure
|
||||
- [ ] Mandatory rules included
|
||||
- [ ] Menu handling implemented properly
|
||||
- [ ] Step numbering sequential
|
||||
- [ ] Step files reasonably sized (5-10KB)
|
||||
|
||||
#### Cross-File Consistency
|
||||
|
||||
- [ ] Variable names match across files
|
||||
- [ ] No orphaned references
|
||||
- [ ] Dependencies correctly defined
|
||||
- [ ] Template variables match outputs
|
||||
|
||||
#### Best Practices Adherence
|
||||
|
||||
- [ ] Collaborative dialogue implemented
|
||||
- [ ] Error handling included
|
||||
- [ ] Naming conventions followed
|
||||
- [ ] Instructions clear and specific
|
||||
|
||||
### 2. Present Validation Results
|
||||
|
||||
Load validationTemplate and document findings:
|
||||
|
||||
- If issues found: Explain clearly and propose fixes
|
||||
- If all passes: Confirm success warmly
|
||||
|
||||
### 3. Create Completion Summary
|
||||
|
||||
Load completionTemplate and prepare:
|
||||
|
||||
- Story of transformation
|
||||
- Key improvements made
|
||||
- Impact on users
|
||||
- Next steps for testing
|
||||
|
||||
### 4. Guide Next Steps
|
||||
|
||||
Based on changes made, suggest:
|
||||
|
||||
- Testing the edited workflow
|
||||
- Running it with sample data
|
||||
- Getting user feedback
|
||||
- Additional refinements if needed
|
||||
|
||||
### 5. Document Final State
|
||||
|
||||
Update {outputFile} with:
|
||||
|
||||
- Validation results
|
||||
- Completion summary
|
||||
- Change log summary
|
||||
- Recommendations
|
||||
|
||||
## CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After validation, append to {outputFile}:
|
||||
|
||||
Load and append content from {validationTemplate}
|
||||
|
||||
Then load and append content from {completionTemplate}
|
||||
|
||||
## FINAL 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 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](#final-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to {outputFile} with frontmatter updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin compliance validation step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All improvements validated successfully
|
||||
- No critical issues remain
|
||||
- Completion summary provided
|
||||
- Next steps clearly outlined
|
||||
- User satisfied with results
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping validation steps
|
||||
- Not documenting final state
|
||||
- Ending without user confirmation
|
||||
- Leaving issues unresolved
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,245 @@
|
||||
---
|
||||
name: 'step-05-compliance-check'
|
||||
description: 'Run comprehensive compliance validation on the edited workflow'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/edit-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-05-compliance-check.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
editedWorkflowPath: '{target_workflow_path}'
|
||||
complianceCheckWorkflow: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check/workflow.md'
|
||||
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
complianceCheckTask: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check/workflow.md'
|
||||
---
|
||||
|
||||
# Step 5: Compliance Validation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Run comprehensive compliance validation on the edited workflow using the workflow-compliance-check workflow to ensure it meets all BMAD standards before completion.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow editor and quality assurance specialist
|
||||
- ✅ If you already have been given a name, communication_style, and persona, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring expertise in BMAD standards and workflow validation
|
||||
- ✅ User brings their edited workflow and needs quality assurance
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus only on running compliance validation on the edited workflow
|
||||
- 🚫 FORBIDDEN to skip compliance validation or declare workflow complete without it
|
||||
- 💬 Approach: Quality-focused, thorough, and collaborative
|
||||
- 📋 Ensure user understands compliance results and next steps
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Launch workflow-compliance-check on the edited workflow
|
||||
- 💾 Review compliance report and present findings to user
|
||||
- 📖 Explain any issues found and provide fix recommendations
|
||||
- 🚫 FORBIDDEN to proceed without compliance validation completion
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Edited workflow files from previous improve step
|
||||
- Focus: Compliance validation using workflow-compliance-check workflow
|
||||
- Limits: Validation and reporting only, no further workflow modifications
|
||||
- Dependencies: Successful workflow improvements in previous step
|
||||
|
||||
## Sequence of Instructions (Do not deviate, skip, or optimize)
|
||||
|
||||
### 1. Initialize Compliance Validation
|
||||
|
||||
"**Final Quality Check: Workflow Compliance Validation**
|
||||
|
||||
Your workflow has been edited! Now let's run a comprehensive compliance check to ensure it meets all BMAD standards and follows best practices.
|
||||
|
||||
This validation will check:
|
||||
|
||||
- Template compliance (workflow-template.md and step-template.md)
|
||||
- File size optimization and markdown formatting
|
||||
- CSV data file standards (if applicable)
|
||||
- Intent vs Prescriptive spectrum alignment
|
||||
- Web search and subprocess optimization
|
||||
- Overall workflow flow and goal alignment"
|
||||
|
||||
### 2. Launch Compliance Check Workflow
|
||||
|
||||
**A. Execute Compliance Validation:**
|
||||
|
||||
"Running comprehensive compliance validation on your edited workflow...
|
||||
Target: `{editedWorkflowPath}`
|
||||
|
||||
**Executing:** {complianceCheckTask}
|
||||
**Validation Scope:** Full 8-phase compliance analysis
|
||||
**Expected Duration:** Thorough validation may take several minutes"
|
||||
|
||||
**B. Monitor Validation Progress:**
|
||||
|
||||
Provide updates as the validation progresses:
|
||||
|
||||
- "✅ Workflow.md validation in progress..."
|
||||
- "✅ Step-by-step compliance checking..."
|
||||
- "✅ File size and formatting analysis..."
|
||||
- "✅ Intent spectrum assessment..."
|
||||
- "✅ Web search optimization analysis..."
|
||||
- "✅ Generating comprehensive compliance report..."
|
||||
|
||||
### 3. Compliance Report Analysis
|
||||
|
||||
**A. Review Validation Results:**
|
||||
|
||||
"**Compliance Validation Complete!**
|
||||
|
||||
**Overall Assessment:** [PASS/PARTIAL/FAIL - based on compliance report]
|
||||
|
||||
- **Critical Issues:** [number found]
|
||||
- **Major Issues:** [number found]
|
||||
- **Minor Issues:** [number found]
|
||||
- **Compliance Score:** [percentage]%"
|
||||
|
||||
**B. Present Key Findings:**
|
||||
|
||||
"**Key Compliance Results:**
|
||||
|
||||
- **Template Adherence:** [summary of template compliance]
|
||||
- **File Optimization:** [file size and formatting issues]
|
||||
- **Intent Spectrum:** [spectrum positioning validation]
|
||||
- **Performance Optimization:** [web search and subprocess findings]
|
||||
- **Overall Flow:** [workflow structure and completion validation]"
|
||||
|
||||
### 4. Issue Resolution Options
|
||||
|
||||
**A. Review Compliance Issues:**
|
||||
|
||||
If issues are found:
|
||||
"**Issues Requiring Attention:**
|
||||
|
||||
**Critical Issues (Must Fix):**
|
||||
[List any critical violations that prevent workflow functionality]
|
||||
|
||||
**Major Issues (Should Fix):**
|
||||
[List major issues that impact quality or maintainability]
|
||||
|
||||
**Minor Issues (Nice to Fix):**
|
||||
[List minor standards compliance issues]"
|
||||
|
||||
**B. Resolution Options:**
|
||||
|
||||
"**Resolution Options:**
|
||||
|
||||
1. **Automatic Fixes** - I can apply automated fixes where possible
|
||||
2. **Manual Guidance** - I'll guide you through manual fixes step by step
|
||||
3. **Return to Edit** - Go back to step 3 for additional improvements
|
||||
4. **Accept as Is** - Proceed with current state (if no critical issues)
|
||||
5. **Detailed Review** - Review full compliance report in detail"
|
||||
|
||||
### 5. Final Validation Confirmation
|
||||
|
||||
**A. User Choice Handling:**
|
||||
|
||||
Based on user selection:
|
||||
|
||||
- **If Automatic Fixes**: Apply fixes and re-run validation
|
||||
- **If Manual Guidance**: Provide step-by-step fix instructions
|
||||
- **If Return to Edit**: Load step-03-discover.md with compliance report context
|
||||
- **If Accept as Is**: Confirm understanding of any remaining issues
|
||||
- **If Detailed Review**: Present full compliance report
|
||||
|
||||
**B. Final Status Confirmation:**
|
||||
|
||||
"**Workflow Compliance Status:** [FINAL/PROVISIONAL]
|
||||
|
||||
**Completion Criteria:**
|
||||
|
||||
- ✅ All critical issues resolved
|
||||
- ✅ Major issues addressed or accepted
|
||||
- ✅ Compliance documentation complete
|
||||
- ✅ User understands any remaining minor issues
|
||||
|
||||
**Your edited workflow is ready!**"
|
||||
|
||||
### 6. Completion Documentation
|
||||
|
||||
**A. Update Compliance Status:**
|
||||
|
||||
Document final compliance status in {outputFile}:
|
||||
|
||||
- **Validation Date:** [current date]
|
||||
- **Compliance Score:** [final percentage]
|
||||
- **Issues Resolved:** [summary of fixes applied]
|
||||
- **Remaining Issues:** [any accepted minor issues]
|
||||
|
||||
**B. Final User Guidance:**
|
||||
|
||||
"**Next Steps for Your Edited Workflow:**
|
||||
|
||||
1. **Test the workflow** with real users to validate functionality
|
||||
2. **Monitor performance** and consider optimization opportunities
|
||||
3. **Gather feedback** for potential future improvements
|
||||
4. **Consider compliance check** periodically for maintenance
|
||||
|
||||
**Support Resources:**
|
||||
|
||||
- Use workflow-compliance-check for future validations
|
||||
- Refer to BMAD documentation for best practices
|
||||
- Use edit-workflow again for future modifications"
|
||||
|
||||
### 7. Final Menu Options
|
||||
|
||||
"**Workflow Edit and Compliance Complete!**
|
||||
|
||||
**Select an Option:**
|
||||
|
||||
- [C] Complete - Finish workflow editing with compliance validation
|
||||
- [R] Review Compliance - View detailed compliance report
|
||||
- [M] More Modifications - Return to editing for additional changes
|
||||
- [T] Test Workflow - Try a test run (if workflow supports testing)"
|
||||
|
||||
## Menu Handling Logic:
|
||||
|
||||
- IF C: End workflow editing successfully with compliance validation summary
|
||||
- IF R: Present detailed compliance report findings
|
||||
- IF M: Return to step-03-discover.md for additional improvements
|
||||
- IF T: If workflow supports testing, suggest test execution method
|
||||
- IF Any other comments or queries: respond and redisplay completion options
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN compliance validation is complete and user confirms final workflow status, will the workflow editing process be considered successfully finished.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Comprehensive compliance validation executed on edited workflow
|
||||
- All compliance issues identified and documented with severity rankings
|
||||
- User provided with clear understanding of validation results
|
||||
- Appropriate resolution options offered and implemented
|
||||
- Final edited workflow meets BMAD standards and is ready for production
|
||||
- User satisfaction with workflow quality and compliance
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping compliance validation before workflow completion
|
||||
- Not addressing critical compliance issues found during validation
|
||||
- Failing to provide clear guidance on issue resolution
|
||||
- Declaring workflow complete without ensuring standards compliance
|
||||
- Not documenting final compliance status for future reference
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,75 @@
|
||||
## Workflow Edit Complete!
|
||||
|
||||
### Transformation Summary
|
||||
|
||||
#### Starting Point
|
||||
|
||||
- **Workflow**: {{workflowName}}
|
||||
- **Initial State**: {{initialState}}
|
||||
- **Primary Issues**: {{primaryIssues}}
|
||||
|
||||
#### Improvements Made
|
||||
|
||||
{{#improvements}}
|
||||
|
||||
- **{{area}}**: {{description}}
|
||||
- **Impact**: {{impact}}
|
||||
{{/improvements}}
|
||||
|
||||
#### Key Changes
|
||||
|
||||
1. {{change1}}
|
||||
2. {{change2}}
|
||||
3. {{change3}}
|
||||
|
||||
### Impact Assessment
|
||||
|
||||
#### User Experience Improvements
|
||||
|
||||
- **Before**: {{beforeUX}}
|
||||
- **After**: {{afterUX}}
|
||||
- **Benefit**: {{uxBenefit}}
|
||||
|
||||
#### Technical Improvements
|
||||
|
||||
- **Compliance**: {{complianceImprovement}}
|
||||
- **Maintainability**: {{maintainabilityImprovement}}
|
||||
- **Performance**: {{performanceImpact}}
|
||||
|
||||
### Files Modified
|
||||
|
||||
{{#modifiedFiles}}
|
||||
|
||||
- **{{type}}**: {{path}}
|
||||
{{/modifiedFiles}}
|
||||
|
||||
### Next Steps
|
||||
|
||||
#### Immediate Actions
|
||||
|
||||
1. {{immediateAction1}}
|
||||
2. {{immediateAction2}}
|
||||
|
||||
#### Testing Recommendations
|
||||
|
||||
- {{testingRecommendation1}}
|
||||
- {{testingRecommendation2}}
|
||||
|
||||
#### Future Considerations
|
||||
|
||||
- {{futureConsideration1}}
|
||||
- {{futureConsideration2}}
|
||||
|
||||
### Support Information
|
||||
|
||||
- **Edited by**: {{userName}}
|
||||
- **Date**: {{completionDate}}
|
||||
- **Documentation**: {{outputFile}}
|
||||
|
||||
### Thank You!
|
||||
|
||||
Thank you for collaboratively improving this workflow. Your workflow now follows best practices and should provide a better experience for your users.
|
||||
|
||||
---
|
||||
|
||||
_Edit workflow completed successfully on {{completionDate}}_
|
||||
@@ -0,0 +1,68 @@
|
||||
## Improvement Goals
|
||||
|
||||
### Motivation
|
||||
|
||||
- **Trigger**: {{editTrigger}}
|
||||
- **User Feedback**: {{userFeedback}}
|
||||
- **Success Issues**: {{successIssues}}
|
||||
|
||||
### User Experience Issues
|
||||
|
||||
{{#uxIssues}}
|
||||
|
||||
- {{.}}
|
||||
{{/uxIssues}}
|
||||
|
||||
### Performance Gaps
|
||||
|
||||
{{#performanceGaps}}
|
||||
|
||||
- {{.}}
|
||||
{{/performanceGaps}}
|
||||
|
||||
### Growth Opportunities
|
||||
|
||||
{{#growthOpportunities}}
|
||||
|
||||
- {{.}}
|
||||
{{/growthOpportunities}}
|
||||
|
||||
### Instruction Style Considerations
|
||||
|
||||
- **Current Style**: {{currentStyle}}
|
||||
- **Desired Changes**: {{styleChanges}}
|
||||
- **Style Fit Assessment**: {{styleFit}}
|
||||
|
||||
### Prioritized Improvements
|
||||
|
||||
#### Critical (Must Fix)
|
||||
|
||||
{{#criticalItems}}
|
||||
|
||||
1. {{.}}
|
||||
{{/criticalItems}}
|
||||
|
||||
#### Important (Should Fix)
|
||||
|
||||
{{#importantItems}}
|
||||
|
||||
1. {{.}}
|
||||
{{/importantItems}}
|
||||
|
||||
#### Nice-to-Have (Could Fix)
|
||||
|
||||
{{#niceItems}}
|
||||
|
||||
1. {{.}}
|
||||
{{/niceItems}}
|
||||
|
||||
### Focus Areas for Next Step
|
||||
|
||||
{{#focusAreas}}
|
||||
|
||||
- {{.}}
|
||||
{{/focusAreas}}
|
||||
|
||||
---
|
||||
|
||||
_Goals identified on {{date}}_
|
||||
@@ -0,0 +1,40 @@
|
||||
## Improvement Log
|
||||
|
||||
### Change Summary
|
||||
|
||||
- **Date**: {{date}}
|
||||
- **Improvement Area**: {{improvementArea}}
|
||||
- **User Goal**: {{userGoal}}
|
||||
|
||||
### Changes Made
|
||||
|
||||
#### Change #{{changeNumber}}
|
||||
|
||||
**Issue**: {{issueDescription}}
|
||||
**Solution**: {{solutionDescription}}
|
||||
**Rationale**: {{changeRationale}}
|
||||
|
||||
**Files Modified**:
|
||||
{{#modifiedFiles}}
|
||||
|
||||
- {{.}}
|
||||
{{/modifiedFiles}}
|
||||
|
||||
**Before**:
|
||||
|
||||
```markdown
|
||||
{{beforeContent}}
|
||||
```
|
||||
|
||||
**After**:
|
||||
|
||||
```markdown
|
||||
{{afterContent}}
|
||||
```
|
||||
|
||||
**User Approval**: {{userApproval}}
|
||||
**Impact**: {{expectedImpact}}
|
||||
|
||||
---
|
||||
|
||||
{{/improvementLog}}
|
||||
@@ -0,0 +1,51 @@
|
||||
## Validation Results
|
||||
|
||||
### Overall Status
|
||||
|
||||
**Result**: {{validationResult}}
|
||||
**Date**: {{date}}
|
||||
**Validator**: {{validator}}
|
||||
|
||||
### Validation Categories
|
||||
|
||||
#### File Structure
|
||||
|
||||
- **Status**: {{fileStructureStatus}}
|
||||
- **Details**: {{fileStructureDetails}}
|
||||
|
||||
#### Configuration
|
||||
|
||||
- **Status**: {{configurationStatus}}
|
||||
- **Details**: {{configurationDetails}}
|
||||
|
||||
#### Step Compliance
|
||||
|
||||
- **Status**: {{stepComplianceStatus}}
|
||||
- **Details**: {{stepComplianceDetails}}
|
||||
|
||||
#### Cross-File Consistency
|
||||
|
||||
- **Status**: {{consistencyStatus}}
|
||||
- **Details**: {{consistencyDetails}}
|
||||
|
||||
#### Best Practices
|
||||
|
||||
- **Status**: {{bestPracticesStatus}}
|
||||
- **Details**: {{bestPracticesDetails}}
|
||||
|
||||
### Issues Found
|
||||
|
||||
{{#validationIssues}}
|
||||
|
||||
- **{{severity}}**: {{description}}
|
||||
- **Impact**: {{impact}}
|
||||
- **Recommendation**: {{recommendation}}
|
||||
{{/validationIssues}}
|
||||
|
||||
### Validation Summary
|
||||
|
||||
{{validationSummary}}
|
||||
|
||||
---
|
||||
|
||||
_Validation completed on {{date}}_
|
||||
@@ -0,0 +1,56 @@
|
||||
## Workflow Analysis
|
||||
|
||||
### Target Workflow
|
||||
|
||||
- **Path**: {{workflowPath}}
|
||||
- **Name**: {{workflowName}}
|
||||
- **Module**: {{workflowModule}}
|
||||
- **Format**: {{workflowFormat}} (Standalone/Legacy)
|
||||
|
||||
### Structure Analysis
|
||||
|
||||
- **Type**: {{workflowType}}
|
||||
- **Total Steps**: {{stepCount}}
|
||||
- **Step Flow**: {{stepFlowPattern}}
|
||||
- **Files**: {{fileStructure}}
|
||||
|
||||
### Content Characteristics
|
||||
|
||||
- **Purpose**: {{workflowPurpose}}
|
||||
- **Instruction Style**: {{instructionStyle}}
|
||||
- **User Interaction**: {{interactionPattern}}
|
||||
- **Complexity**: {{complexityLevel}}
|
||||
|
||||
### Initial Assessment
|
||||
|
||||
#### Strengths
|
||||
|
||||
{{#strengths}}
|
||||
|
||||
- {{.}}
|
||||
{{/strengths}}
|
||||
|
||||
#### Potential Issues
|
||||
|
||||
{{#issues}}
|
||||
|
||||
- {{.}}
|
||||
{{/issues}}
|
||||
|
||||
#### Format-Specific Notes
|
||||
|
||||
{{#formatNotes}}
|
||||
|
||||
- {{.}}
|
||||
{{/formatNotes}}
|
||||
|
||||
### Best Practices Compliance
|
||||
|
||||
- **Step File Structure**: {{stepCompliance}}
|
||||
- **Frontmatter Usage**: {{frontmatterCompliance}}
|
||||
- **Menu Implementation**: {{menuCompliance}}
|
||||
- **Variable Consistency**: {{variableCompliance}}
|
||||
|
||||
---
|
||||
|
||||
_Analysis completed on {{date}}_
|
||||
58
src/modules/bmb/workflows/edit-workflow/workflow.md
Normal file
58
src/modules/bmb/workflows/edit-workflow/workflow.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: Edit Workflow
|
||||
description: Intelligent workflow editor that helps modify existing workflows while following best practices
|
||||
web_bundle: true
|
||||
---
|
||||
|
||||
# Edit Workflow
|
||||
|
||||
**Goal:** Collaboratively edit and improve existing workflows, ensuring they follow best practices and meet user needs effectively.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a workflow editor and improvement specialist collaborating with a workflow owner. This is a partnership, not a client-vendor relationship. You bring expertise in workflow design patterns, best practices, and collaborative facilitation, while the user brings their workflow context, user feedback, and improvement goals. Work together as equals.
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
|
||||
### 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. Configuration Loading
|
||||
|
||||
Load and read full config from {project-root}/{bmad_folder}/bmb/config.yaml and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
||||
|
||||
### 2. First Step EXECUTION
|
||||
|
||||
Load, read the full file and then execute `{workflow_path}/steps/step-01-analyze.md` to begin the workflow.
|
||||
Reference in New Issue
Block a user