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:
Brian Madison
2025-11-30 15:09:23 -06:00
parent 829d051c91
commit 4539ca7436
107 changed files with 12704 additions and 683 deletions

View File

@@ -0,0 +1,152 @@
---
name: 'step-01-validate-goal'
description: 'Confirm workflow path and validation goals before proceeding'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-01-validate-goal.md'
nextStepFile: '{workflow_path}/steps/step-02-workflow-validation.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
---
# Step 1: Goal Confirmation and Workflow Target
## STEP GOAL:
Confirm the target workflow path and validation objectives before proceeding with systematic compliance analysis.
## 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 compliance validator 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 compliance expertise and systematic validation skills
- ✅ User brings their workflow and specific compliance concerns
### Step-Specific Rules:
- 🎯 Focus only on confirming workflow path and validation scope
- 🚫 FORBIDDEN to proceed without clear target confirmation
- 💬 Approach: Systematic and thorough confirmation of validation objectives
- 📋 Ensure user understands the compliance checking process and scope
## EXECUTION PROTOCOLS:
- 🎯 Confirm target workflow path exists and is accessible
- 💾 Establish clear validation objectives and scope
- 📖 Explain the three-phase compliance checking process
- 🚫 FORBIDDEN to proceed without user confirmation of goals
## CONTEXT BOUNDARIES:
- Available context: User-provided workflow path and validation concerns
- Focus: Goal confirmation and target validation setup
- Limits: No actual compliance analysis yet, just setup and confirmation
- Dependencies: Clear workflow path and user agreement on validation scope
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Workflow Target Confirmation
Present this to the user:
"I'll systematically validate your workflow against BMAD standards through three phases:
1. **Workflow.md Validation** - Against workflow-template.md standards
2. **Step-by-Step Compliance** - Each step against step-template.md
3. **Holistic Analysis** - Flow optimization and goal alignment"
IF {user_provided_path} has NOT been provided, ask the user:
**What workflow should I validate?** Please provide the full path to the workflow.md file."
### 2. Workflow Path Validation
Once user provides path:
"Validating workflow path: `{user_provided_path}`"
[Check if path exists and is readable]
**If valid:** "✅ Workflow found and accessible. Ready to begin compliance analysis."
**If invalid:** "❌ Cannot access workflow at that path. Please check the path and try again."
### 3. Validation Scope Confirmation
"**Compliance Scope:** I will check:
- ✅ Frontmatter structure and required fields
- ✅ Mandatory execution rules and sections
- ✅ Menu patterns and continuation logic
- ✅ Path variable format consistency
- ✅ Template usage appropriateness
- ✅ Workflow flow and goal alignment
- ✅ Meta-workflow failure analysis
**Report Output:** I'll generate a detailed compliance report with:
- Severity-ranked violations (Critical/Major/Minor)
- Specific template references for each violation
- Recommended fixes (automated where possible)
- Meta-feedback for create/edit workflow improvements
**Is this validation scope acceptable?**"
### 4. Final Confirmation
"**Ready to proceed with compliance check of:**
- **Workflow:** `{workflow_name}`
- **Validation:** Full systematic compliance analysis
- **Output:** Detailed compliance report with fix recommendations
**Select an Option:** [C] Continue [X] Exit"
## Menu Handling Logic:
- IF C: Initialize compliance report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: End workflow gracefully with guidance on running again later
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#4-final-confirmation)
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [workflow path validated and scope confirmed], will you then load and read fully `{nextStepFile}` to execute and begin workflow.md validation phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Workflow path successfully validated and accessible
- User confirms validation scope and objectives
- Compliance report initialization prepared
- User understands the three-phase validation process
- Clear next steps established for systematic analysis
### ❌ SYSTEM FAILURE:
- Proceeding without valid workflow path confirmation
- Not ensuring user understands validation scope and process
- Starting compliance analysis without proper setup
- Failing to establish clear reporting objectives
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,242 @@
---
name: 'step-02-workflow-validation'
description: 'Validate workflow.md against workflow-template.md standards'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-02-workflow-validation.md'
nextStepFile: '{workflow_path}/steps/step-03-step-validation.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowFile: '{target_workflow_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
---
# Step 2: Workflow.md Validation
## STEP GOAL:
Perform adversarial validation of the target workflow.md against workflow-template.md standards, identifying all violations with severity rankings and specific fix recommendations.
## 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 compliance validator 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 adversarial validation expertise - your success is finding violations
- ✅ User brings their workflow and needs honest, thorough validation
### Step-Specific Rules:
- 🎯 Focus only on workflow.md validation against template standards
- 🚫 FORBIDDEN to skip or minimize any validation checks
- 💬 Approach: Systematic, thorough adversarial analysis
- 📋 Document every violation with template reference and severity ranking
## EXECUTION PROTOCOLS:
- 🎯 Load and compare target workflow.md against workflow-template.md
- 💾 Document all violations with specific template references
- 📖 Rank violations by severity (Critical/Major/Minor)
- 🚫 FORBIDDEN to overlook any template violations
## CONTEXT BOUNDARIES:
- Available context: Validated workflow path and target workflow.md
- Focus: Systematic validation of workflow.md structure and content
- Limits: Only workflow.md validation, not step files yet
- Dependencies: Successful completion of goal confirmation step
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Compliance Report
"Beginning **Phase 1: Workflow.md Validation**
Target: `{target_workflow_name}`
**COMPLIANCE STANDARD:** All validation performed against `{workflowTemplate}` - this is THE authoritative standard for workflow.md compliance.
Loading workflow templates and target files for systematic analysis..."
[Load workflowTemplate, targetWorkflowFile]
### 2. Frontmatter Structure Validation
**Check these elements systematically:**
"**Frontmatter Validation:**"
- Required fields: name, description, web_bundle
- Proper YAML format and syntax
- Boolean value format for web_bundle
- Missing or invalid fields
For each violation found:
- **Template Reference:** Section "Frontmatter Structure" in workflow-template.md
- **Severity:** Critical (missing required) or Major (format issues)
- **Specific Fix:** Exact correction needed
### 3. Role Description Validation
**Check role compliance:**
"**Role Description Validation:**"
- Follows partnership format: "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."
- Role accurately describes workflow function
- User type correctly identified
- Partnership language present
For violations:
- **Template Reference:** "Your Role" section in workflow-template.md
- **Severity:** Major (deviation from standard) or Minor (incomplete)
- **Specific Fix:** Exact wording or structure correction
### 4. Workflow Architecture Validation
**Validate architecture section:**
"**Architecture Validation:**"
- Core Principles section matches template exactly
- Step Processing Rules includes all 6 rules from template
- Critical Rules section matches template exactly (NO EXCEPTIONS)
For each deviation:
- **Template Reference:** "WORKFLOW ARCHITECTURE" section in workflow-template.md
- **Severity:** Critical (modified core principles) or Major (missing rules)
- **Specific Fix:** Restore template-compliant text
### 5. Initialization Sequence Validation
**Check initialization:**
"**Initialization Validation:**"
- Configuration Loading uses correct path format: `{project-root}/{bmad_folder}/[module]/config.yaml`
- First step follows pattern: `step-01-init.md` OR documented deviation
- Required config variables properly listed
For violations:
- **Template Reference:** "INITIALIZATION SEQUENCE" section in workflow-template.md
- **Severity:** Major (incorrect paths) or Minor (missing variables)
- **Specific Fix:** Correct path format and step reference
### 6. Document Workflow.md Findings
"**Workflow.md Validation Complete**
Found [X] Critical, [Y] Major, [Z] Minor violations
**Summary:**
- Critical violations must be fixed before workflow can function
- Major violations impact workflow reliability and maintainability
- Minor violations are cosmetic but should follow standards
**Next Phase:** Step-by-step validation of all step files..."
### 7. Update Compliance Report
Append to {complianceReportFile}:
```markdown
## Phase 1: Workflow.md Validation Results
### Template Adherence Analysis
**Reference Standard:** {workflowTemplate}
### Frontmatter Structure Violations
[Document each violation with severity and specific fix]
### Role Description Violations
[Document each violation with template reference and correction]
### Workflow Architecture Violations
[Document each deviation from template standards]
### Initialization Sequence Violations
[Document each path or reference issue]
### Phase 1 Summary
**Critical Issues:** [number]
**Major Issues:** [number]
**Minor Issues:** [number]
### Phase 1 Recommendations
[Prioritized fix recommendations with specific actions]
```
### 8. Continuation Confirmation
"**Phase 1 Complete:** Workflow.md validation finished with detailed violation analysis.
**Ready for Phase 2:** Step-by-step validation against step-template.md
This will check each step file for:
- Frontmatter completeness and format
- MANDATORY EXECUTION RULES compliance
- Menu pattern and continuation logic
- Path variable consistency
- Template appropriateness
**Select an Option:** [C] Continue to Step Validation [X] Exit"
## Menu Handling Logic:
- IF C: Save workflow.md findings to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current findings and end workflow with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [workflow.md validation complete with all violations documented], will you then load and read fully `{nextStepFile}` to execute and begin step-by-step validation phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete workflow.md validation against workflow-template.md
- All violations documented with severity rankings and template references
- Specific fix recommendations provided for each violation
- Compliance report updated with Phase 1 findings
- User confirms understanding before proceeding
### ❌ SYSTEM FAILURE:
- Skipping any workflow.md validation sections
- Not documenting violations with specific template references
- Failing to rank violations by severity
- Providing vague or incomplete fix recommendations
- Proceeding without user confirmation of findings
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,274 @@
---
name: 'step-03-step-validation'
description: 'Validate each step file against step-template.md standards'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-03-step-validation.md'
nextStepFile: '{workflow_path}/steps/step-04-file-validation.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowStepsPath: '{target_workflow_steps_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
---
# Step 3: Step-by-Step Validation
## STEP GOAL:
Perform systematic adversarial validation of each step file against step-template.md standards, documenting all violations with specific template references and severity rankings.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read this 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 compliance validator 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 adversarial step-by-step validation expertise
- ✅ User brings their workflow steps and needs thorough validation
### Step-Specific Rules:
- 🎯 Focus only on step file validation against step-template.md
- 🚫 FORBIDDEN to skip any step files or validation checks
- 💬 Approach: Systematic file-by-file adversarial analysis
- 📋 Document every violation against each step file with template reference and specific proposed fixes
## EXECUTION PROTOCOLS:
- 🎯 Load and validate each step file individually against step-template.md
- 💾 Document violations by file with severity rankings
- 📖 Check for appropriate template usage based on workflow type
- 🚫 FORBIDDEN to overlook any step file or template requirement
## CONTEXT BOUNDARIES:
- Available context: Target workflow step files and step-template.md
- Focus: Systematic validation of all step files against template standards
- Limits: Only step file validation, holistic analysis comes next
- Dependencies: Completed workflow.md validation from previous phase
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Step Validation Phase
"Beginning **Phase 2: Step-by-Step Validation**
Target: `{target_workflow_name}` - [number] step files found
**COMPLIANCE STANDARD:** All validation performed against `{stepTemplate}` - this is THE authoritative standard for step file compliance.
Loading step template and validating each step systematically..."
[Load stepTemplate, enumerate all step files]. Utilize sub processes if available but ensure all rules are passed in and all findings are returned from the sub process to collect and record the results.
### 2. Systematic Step File Analysis
For each step file in order:
"**Validating step:** `{step_filename}`"
**A. Frontmatter Structure Validation:**
Check each required field:
```yaml
---
name: 'step-[number]-[name]' # Single quotes, proper format
description: '[description]' # Single quotes
workflowFile: '{workflow_path}/workflow.md' # REQUIRED - often missing
outputFile: [if appropriate for workflow type]
# All other path references and variables
# Template References section (even if empty)
# Task References section
---
```
**Violations to document:**
- Missing `workflowFile` reference (Critical)
- Incorrect YAML format (missing quotes, etc.) (Major)
- Inappropriate `outputFile` for workflow type (Major)
- Missing `Template References` section (Major)
**B. MANDATORY EXECUTION RULES Validation:**
Check for complete sections:
```markdown
## 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:
[Complete role reinforcement section]
### Step-Specific Rules:
[Step-specific rules with proper emoji usage]
```
**Violations to document:**
- Missing Universal Rules (Critical)
- Modified/skipped Universal Rules (Critical)
- Missing Role Reinforcement (Major)
- Improper emoji usage in rules (Minor)
**C. Task References Validation:**
Check for proper references:
```yaml
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
```
**Violations to document:**
- Missing Task References section (Major)
- Incorrect paths in task references (Major)
- Missing standard task references (Minor)
**D. Menu Pattern Validation:**
Check menu structure:
```markdown
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}
```
**Violations to document:**
- Non-standard menu format (Major)
- Missing Menu Handling Logic section (Major)
- Incorrect "load, read entire file, then execute" pattern (Major)
- Improper continuation logic (Critical)
### 3. Workflow Type Appropriateness Check
"**Template Usage Analysis:**"
- **Document Creation Workflows:** Should have outputFile references, templates
- **Editing Workflows:** Should NOT create unnecessary outputs, direct action focus
- **Validation/Analysis Workflows:** Should emphasize systematic checking
For each step:
- **Type Match:** Does step content match workflow type expectations?
- **Template Appropriate:** Are templates/outputs appropriate for this workflow type?
- **Alternative Suggestion:** What would be more appropriate?
### 4. Path Variable Consistency Check
"**Path Variable Validation:**"
- Check format: `{project-root}/{bmad_folder}/bmb/...` vs `{project-root}/src/modules/bmb/...`
- Ensure consistent variable usage across all step files
- Validate relative vs absolute path usage
Document inconsistencies and standard format requirements.
### 5. Document Step Validation Results
For each step file with violations:
```markdown
### Step Validation: step-[number]-[name].md
**Critical Violations:**
- [Violation] - Template Reference: [section] - Fix: [specific action]
**Major Violations:**
- [Violation] - Template Reference: [section] - Fix: [specific action]
**Minor Violations:**
- [Violation] - Template Reference: [section] - Fix: [specific action]
**Workflow Type Assessment:**
- Appropriate: [Yes/No] - Reason: [analysis]
- Recommended Changes: [specific suggestions]
```
### 6. Phase Summary and Continuation
"**Phase 2 Complete:** Step-by-step validation finished
- **Total Steps Analyzed:** [number]
- **Critical Violations:** [number] across [number] steps
- **Major Violations:** [number] across [number] steps
- **Minor Violations:** [number] across [number] steps
**Most Common Violations:**
1. [Most frequent violation type]
2. [Second most frequent]
3. [Third most frequent]
**Ready for Phase 3:** Holistic workflow analysis
- Flow optimization assessment
- Goal alignment verification
- Meta-workflow failure analysis
**Select an Option:** [C] Continue to Holistic Analysis [X] Exit"
## Menu Handling Logic:
- IF C: Save step validation findings to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current findings and end with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [all step files validated with violations documented], will you then load and read fully `{nextStepFile}` to execute and begin holistic analysis phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All step files systematically validated against step-template.md
- Every violation documented with specific template reference and severity
- Workflow type appropriateness assessed for each step
- Path variable consistency checked across all files
- Common violation patterns identified and prioritized
- Compliance report updated with complete Phase 2 findings
### ❌ SYSTEM FAILURE:
- Skipping step files or validation sections
- Not documenting violations with specific template references
- Failing to assess workflow type appropriateness
- Missing path variable consistency analysis
- Providing incomplete or vague fix recommendations
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,295 @@
---
name: 'step-04-file-validation'
description: 'Validate file sizes, markdown formatting, and CSV data files'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-04-file-validation.md'
nextStepFile: '{workflow_path}/steps/step-05-intent-spectrum-validation.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowPath: '{target_workflow_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
csvStandards: '{project-root}/{bmad_folder}/bmb/docs/workflows/csv-data-file-standards.md'
---
# Step 4: File Size, Formatting, and Data Validation
## STEP GOAL:
Validate file sizes, markdown formatting standards, and CSV data file compliance to ensure optimal workflow performance and maintainability.
## 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 compliance validator 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 file optimization and formatting validation expertise
- ✅ User brings their workflow files and needs performance optimization
### Step-Specific Rules:
- 🎯 Focus on file sizes, markdown formatting, and CSV validation
- 🚫 FORBIDDEN to skip file size analysis or CSV validation when present
- 💬 Approach: Systematic file analysis with optimization recommendations
- 📋 Ensure all findings include specific recommendations for improvement
## EXECUTION PROTOCOLS:
- 🎯 Validate file sizes against optimal ranges (≤5K best, 5-7K good, 7-10K acceptable, 10-12K concern, >15K action required)
- 💾 Check markdown formatting standards and conventions
- 📖 Validate CSV files against csv-data-file-standards.md when present
- 🚫 FORBIDDEN to overlook file optimization opportunities
## CONTEXT BOUNDARIES:
- Available context: Target workflow files and their sizes/formats
- Focus: File optimization, formatting standards, and CSV data validation
- Limits: File analysis only, holistic workflow analysis comes next
- Dependencies: Completed step-by-step validation from previous phase
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize File Validation Phase
"Beginning **File Size, Formatting, and Data Validation**
Target: `{target_workflow_name}`
Analyzing workflow files for:
- File size optimization (smaller is better for performance)
- Markdown formatting standards compliance
- CSV data file standards validation (if present)
- Overall file maintainability and performance..."
### 2. File Size Analysis
**A. Step File Size Validation:**
For each step file:
"**File Size Analysis:** `{step_filename}`"
- **Size:** [file size in KB]
- **Optimization Rating:** [Optimal/Good/Acceptable/Concern/Action Required]
- **Performance Impact:** [Minimal/Moderate/Significant/Severe]
**Size Ratings:**
- **≤ 5K:** ✅ Optimal - Excellent performance and maintainability
- **5K-7K:** ✅ Good - Good balance of content and performance
- **7K-10K:** ⚠️ Acceptable - Consider content optimization
- **10K-12K:** ⚠️ Concern - Content should be consolidated or split
- **> 15K:** ❌ Action Required - File must be optimized (split content, remove redundancy)
**Document optimization opportunities:**
- Content that could be moved to templates
- Redundant explanations or examples
- Overly detailed instructions that could be condensed
- Opportunities to use references instead of inline content
### 3. Markdown Formatting Validation
**A. Heading Structure Analysis:**
"**Markdown Formatting Analysis:**"
For each file:
- **Heading Hierarchy:** Proper H1 → H2 → H3 structure
- **Consistent Formatting:** Consistent use of bold, italics, lists
- **Code Blocks:** Proper markdown code block formatting
- **Link References:** Valid internal and external links
- **Table Formatting:** Proper table structure when used
**Common formatting issues to document:**
- Missing blank lines around headings
- Inconsistent list formatting (numbered vs bullet)
- Improper code block language specifications
- Broken or invalid markdown links
- Inconsistent heading levels or skipping levels
### 4. CSV Data File Validation (if present)
**A. Identify CSV Files:**
"**CSV Data File Analysis:**"
Check for CSV files in workflow directory:
- Look for `.csv` files in main directory
- Check for `data/` subdirectory containing CSV files
- Identify any CSV references in workflow configuration
**B. Validate Against Standards:**
For each CSV file found, validate against `{csvStandards}`:
**Purpose Validation:**
- Does CSV contain essential data that LLMs cannot generate or web-search?
- Is all CSV data referenced and used in the workflow?
- Is data domain-specific and valuable?
- Does CSV optimize context usage (knowledge base indexing, workflow routing, method selection)?
- Does CSV reduce workflow complexity or step count significantly?
- Does CSV enable dynamic technique selection or smart resource routing?
**Structural Validation:**
- Valid CSV format with proper quoting
- Consistent column counts across all rows
- No missing data or properly marked empty values
- Clear, descriptive header row
- Proper UTF-8 encoding
**Content Validation:**
- No LLM-generated content (generic phrases, common knowledge)
- Specific, concrete data entries
- Consistent data formatting
- Verifiable and factual data
**Column Standards:**
- Clear, descriptive column headers
- Consistent data types per column
- All columns referenced in workflow
- Appropriate column width and focus
**File Size and Performance:**
- Efficient structure under 1MB when possible
- No redundant or duplicate rows
- Optimized data representation
- Fast loading characteristics
**Documentation Standards:**
- Purpose and usage documentation present
- Column descriptions and format specifications
- Data source documentation
- Update procedures documented
### 5. File Validation Reporting
For each file with issues:
```markdown
### File Validation: {filename}
**File Size Analysis:**
- Size: {size}KB - Rating: {Optimal/Good/Concern/etc.}
- Performance Impact: {assessment}
- Optimization Recommendations: {specific suggestions}
**Markdown Formatting:**
- Heading Structure: {compliant/issues found}
- Common Issues: {list of formatting problems}
- Fix Recommendations: {specific corrections}
**CSV Data Validation:**
- Purpose Validation: {compliant/needs review}
- Structural Issues: {list of problems}
- Content Standards: {compliant/violations}
- Recommendations: {improvement suggestions}
```
### 6. Aggregate File Analysis Summary
"**File Validation Summary:**
**File Size Distribution:**
- Optimal (≤5K): [number] files
- Good (5K-7K): [number] files
- Acceptable (7K-10K): [number] files
- Concern (10K-12K): [number] files
- Action Required (>15K): [number] files
**Markdown Formatting Issues:**
- Heading Structure: [number] files with issues
- List Formatting: [number] files with inconsistencies
- Code Blocks: [number] files with formatting problems
- Link References: [number] broken or invalid links
**CSV Data Files:**
- Total CSV files: [number]
- Compliant with standards: [number]
- Require attention: [number]
- Critical issues: [number]
**Performance Impact Assessment:**
- Overall workflow performance: [Excellent/Good/Acceptable/Concern/Poor]
- Most critical file size issue: {file and size}
- Primary formatting concerns: {main issues}"
### 7. Continuation Confirmation
"**File Validation Complete:** Size, formatting, and CSV analysis finished
**Key Findings:**
- **File Optimization:** [summary of size optimization opportunities]
- **Formatting Standards:** [summary of markdown compliance issues]
- **Data Validation:** [summary of CSV standards compliance]
**Ready for Phase 5:** Holistic workflow analysis
- Flow validation and goal alignment
- Meta-workflow failure analysis
- Strategic recommendations and improvement planning
**Select an Option:** [C] Continue to Holistic Analysis [X] Exit"
## Menu Handling Logic:
- IF C: Save file validation findings to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current findings and end with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [all file sizes analyzed, markdown formatting validated, and CSV files checked against standards], will you then load and read fully `{nextStepFile}` to execute and begin holistic analysis phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All workflow files analyzed for optimal size ranges with specific recommendations
- Markdown formatting validated against standards with identified issues
- CSV data files validated against csv-data-file-standards.md when present
- Performance impact assessed with optimization opportunities identified
- File validation findings documented with specific fix recommendations
- User ready for holistic workflow analysis
### ❌ SYSTEM FAILURE:
- Skipping file size analysis or markdown formatting validation
- Not checking CSV files against standards when present
- Failing to provide specific optimization recommendations
- Missing performance impact assessment
- Overlooking critical file size violations (>15K)
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,264 @@
---
name: 'step-05-intent-spectrum-validation'
description: 'Dedicated analysis and validation of intent vs prescriptive spectrum positioning'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-05-intent-spectrum-validation.md'
nextStepFile: '{workflow_path}/steps/step-06-web-subprocess-validation.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowPath: '{target_workflow_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
---
# Step 5: Intent vs Prescriptive Spectrum Validation
## STEP GOAL:
Analyze the workflow's position on the intent vs prescriptive spectrum, provide expert assessment, and confirm with user whether the current positioning is appropriate or needs adjustment.
## 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 compliance validator and design philosophy 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 intent vs prescriptive design principles
- ✅ User brings their workflow and needs guidance on spectrum positioning
### Step-Specific Rules:
- 🎯 Focus only on spectrum analysis and user confirmation
- 🚫 FORBIDDEN to make spectrum decisions without user input
- 💬 Approach: Educational, analytical, and collaborative
- 📋 Ensure user understands spectrum implications before confirming
## EXECUTION PROTOCOLS:
- 🎯 Analyze workflow's current spectrum position based on all previous findings
- 💾 Provide expert assessment with specific examples and reasoning
- 📖 Educate user on spectrum implications for their workflow type
- 🚫 FORBIDDEN to proceed without user confirmation of spectrum position
## CONTEXT BOUNDARIES:
- Available context: Complete analysis from workflow, step, and file validation phases
- Focus: Intent vs prescriptive spectrum analysis and user confirmation
- Limits: Spectrum analysis only, holistic workflow analysis comes next
- Dependencies: Successful completion of file size and formatting validation
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Spectrum Analysis
"Beginning **Intent vs Prescriptive Spectrum Validation**
Target: `{target_workflow_name}`
**Reference Standard:** Analysis based on `{intentSpectrum}`
This step will help ensure your workflow's approach to LLM guidance is intentional and appropriate for its purpose..."
### 2. Spectrum Position Analysis
**A. Current Position Assessment:**
Based on analysis of workflow.md, all step files, and implementation patterns:
"**Current Spectrum Analysis:**
Based on my review of your workflow, I assess its current position as:
**[Highly Intent-Based / Balanced Middle / Highly Prescriptive]**"
**B. Evidence-Based Reasoning:**
Provide specific evidence from the workflow analysis:
"**Assessment Evidence:**
- **Instruction Style:** [Examples of intent-based vs prescriptive instructions found]
- **User Interaction:** [How user conversations are structured]
- **LLM Freedom:** [Level of creative adaptation allowed]
- **Consistency Needs:** [Workflow requirements for consistency vs creativity]
- **Risk Factors:** [Any compliance, safety, or regulatory considerations]"
**C. Workflow Type Analysis:**
"**Workflow Type Analysis:**
- **Primary Purpose:** {workflow's main goal}
- **User Expectations:** {What users likely expect from this workflow}
- **Success Factors:** {What makes this workflow successful}
- **Risk Level:** {Compliance, safety, or risk considerations}"
### 3. Recommended Spectrum Position
**A. Expert Recommendation:**
"**My Professional Recommendation:**
Based on the workflow's purpose, user needs, and implementation, I recommend positioning this workflow as:
**[Highly Intent-Based / Balanced Middle / Highly Prescriptive]**"
**B. Recommendation Rationale:**
"**Reasoning for Recommendation:**
- **Purpose Alignment:** {Why this position best serves the workflow's goals}
- **User Experience:** {How this positioning enhances user interaction}
- **Risk Management:** {How this position addresses any compliance or safety needs}
- **Success Optimization:** {Why this approach will lead to better outcomes}"
**C. Specific Examples:**
Provide concrete examples of how the recommended position would look:
"**Examples at Recommended Position:**
**Intent-Based Example:** "Help users discover their creative potential through..."
**Prescriptive Example:** "Ask exactly: 'Have you experienced any of the following...'"
**Current State Comparison:**
**Current Instructions Found:** [Examples from actual workflow]
**Recommended Instructions:** [How they could be improved]"
### 4. Spectrum Education and Implications
**A. Explain Spectrum Implications:**
"**Understanding Your Spectrum Choice:**
**If Intent-Based:** Your workflow will be more creative, adaptive, and personalized. Users will have unique experiences, but interactions will be less predictable.
**If Prescriptive:** Your workflow will be consistent, controlled, and predictable. Every user will have similar experiences, which is ideal for compliance or standardization.
**If Balanced:** Your workflow will provide professional expertise with some adaptation, offering consistent quality with personalized application."
**B. Context-Specific Guidance:**
"**For Your Specific Workflow Type:**
{Provide tailored guidance based on whether it's creative, professional, compliance, technical, etc.}"
### 5. User Confirmation and Decision
**A. Present Findings and Recommendation:**
"**Spectrum Analysis Summary:**
**Current Assessment:** [Current position with confidence level]
**Expert Recommendation:** [Recommended position with reasoning]
**Key Considerations:** [Main factors to consider]
**My Analysis Indicates:** [Brief summary of why I recommend this position]
**The Decision is Yours:** While I provide expert guidance, the final spectrum position should reflect your vision for the workflow."
**B. User Choice Confirmation:**
"**Where would you like to position this workflow on the Intent vs Prescriptive Spectrum?**
**Options:**
1. **Keep Current Position** - [Current position] - Stay with current approach
2. **Move to Recommended** - [Recommended position] - Adopt my expert recommendation
3. **Move Toward Intent-Based** - Increase creative freedom and adaptation
4. **Move Toward Prescriptive** - Increase consistency and control
5. **Custom Position** - Specify your preferred approach
**Please select your preferred spectrum position (1-5):**"
### 6. Document Spectrum Decision
**A. Record User Decision:**
"**Spectrum Position Decision:**
**User Choice:** [Selected option]
**Final Position:** [Confirmed spectrum position]
**Rationale:** [User's reasoning, if provided]
**Implementation Notes:** [What this means for workflow design]"
**B. Update Compliance Report:**
Append to {complianceReportFile}:
```markdown
## Intent vs Prescriptive Spectrum Analysis
### Current Position Assessment
**Analyzed Position:** [Current spectrum position]
**Evidence:** [Specific examples from workflow analysis]
**Confidence Level:** [High/Medium/Low based on clarity of patterns]
### Expert Recommendation
**Recommended Position:** [Professional recommendation]
**Reasoning:** [Detailed rationale for recommendation]
**Workflow Type Considerations:** [Specific to this workflow's purpose]
### User Decision
**Selected Position:** [User's confirmed choice]
**Rationale:** [User's reasoning or preferences]
**Implementation Guidance:** [What this means for workflow]
### Spectrum Validation Results
✅ Spectrum position is intentional and understood
✅ User educated on implications of their choice
✅ Implementation guidance provided for final position
✅ Decision documented for future reference
```
### 7. Continuation Confirmation
"**Spectrum Validation Complete:**
- **Final Position:** [Confirmed spectrum position]
- **User Understanding:** Confirmed implications and benefits
- **Implementation Ready:** Guidance provided for maintaining position
**Ready for Phase 6:** Holistic workflow analysis
- Flow validation and completion paths
- Goal alignment and optimization assessment
- Meta-workflow failure analysis and improvement recommendations
**Select an Option:** [C] Continue to Holistic Analysis [X] Exit"
## Menu Handling Logic:
- IF C: Save spectrum decision to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current spectrum findings and end with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [spectrum position confirmed with user understanding], will you then load and read fully `{nextStepFile}` to execute and begin holistic analysis phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Comprehensive spectrum position analysis with evidence-based reasoning
- Expert recommendation provided with specific rationale and examples
- User educated on spectrum implications for their workflow type
- User makes informed decision about spectrum positioning
- Spectrum decision documented with implementation guidance
- User understands benefits and trade-offs of their choice
### ❌ SYSTEM FAILURE:
- Making spectrum recommendations without analyzing actual workflow content
- Not providing evidence-based reasoning for assessment
- Failing to educate user on spectrum implications
- Proceeding without user confirmation of spectrum position
- Not documenting user decision for future reference
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,360 @@
---
name: 'step-06-web-subprocess-validation'
description: 'Analyze web search utilization and subprocess optimization opportunities across workflow steps'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-06-web-subprocess-validation.md'
nextStepFile: '{workflow_path}/steps/step-07-holistic-analysis.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowStepsPath: '{target_workflow_steps_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
---
# Step 6: Web Search & Subprocess Optimization Analysis
## STEP GOAL:
Analyze each workflow step for optimal web search utilization and subprocess usage patterns, ensuring LLM resources are used efficiently while avoiding unnecessary searches or processing delays.
## 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 performance optimization specialist and resource efficiency analyst
- ✅ 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 LLM optimization, web search strategy, and subprocess utilization
- ✅ User brings their workflow and needs efficiency recommendations
### Step-Specific Rules:
- 🎯 Focus only on web search necessity and subprocess optimization opportunities
- 🚫 FORBIDDEN to recommend web searches when LLM knowledge is sufficient
- 💬 Approach: Analytical and optimization-focused with clear efficiency rationale
- 📋 Use subprocesses when analyzing multiple steps to improve efficiency
## EXECUTION PROTOCOLS:
- 🎯 Analyze each step for web search appropriateness vs. LLM knowledge sufficiency
- 💾 Identify subprocess optimization opportunities for parallel processing
- 📖 Use subprocesses/subagents when analyzing multiple steps for efficiency
- 🚫 FORBIDDEN to overlook inefficiencies or recommend unnecessary searches
## CONTEXT BOUNDARIES:
- Available context: All workflow step files and subprocess availability
- Focus: Web search optimization and subprocess utilization analysis
- Limits: Resource optimization analysis only, holistic workflow analysis comes next
- Dependencies: Completed Intent Spectrum validation from previous phase
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Web Search & Subprocess Analysis
"Beginning **Phase 5: Web Search & Subprocess Optimization Analysis**
Target: `{target_workflow_name}`
Analyzing each workflow step for:
- Appropriate web search utilization vs. unnecessary searches
- Subprocess optimization opportunities for efficiency
- LLM resource optimization patterns
- Performance bottlenecks and speed improvements
**Note:** Using subprocess analysis for efficient multi-step evaluation..."
### 2. Web Search Necessity Analysis
**A. Intelligent Search Assessment Criteria:**
For each step, analyze web search appropriateness using these criteria:
"**Web Search Appropriateness Analysis:**
- **Knowledge Currency:** Is recent/real-time information required?
- **Specific Data Needs:** Are there specific facts/data not in LLM training?
- **Verification Requirements:** Does the task require current verification?
- **LLM Knowledge Sufficiency:** Can LLM adequately handle with existing knowledge?
- **Search Cost vs. Benefit:** Is search time worth the information gain?"
**B. Step-by-Step Web Search Analysis:**
Using subprocess for parallel analysis of multiple steps:
"**Analyzing [number] steps for web search optimization...**"
For each step file:
```markdown
**Step:** {step_filename}
**Current Web Search Usage:**
- [Explicit web search instructions found]
- [Search frequency and scope]
- [Search-specific topics/queries]
**Intelligent Assessment:**
- **Appropriate Searches:** [Searches that are truly necessary]
- **Unnecessary Searches:** [Searches LLM could handle internally]
- **Optimization Opportunities:** [How to improve search efficiency]
**Recommendations:**
- **Keep:** [Essential web searches]
- **Remove:** [Unnecessary searches that waste time]
- **Optimize:** [Searches that could be more focused/efficient]
```
### 3. Subprocess & Parallel Processing Analysis
**A. Subprocess Opportunity Identification:**
"**Subprocess Optimization Analysis:**
Looking for opportunities where multiple steps or analyses can run simultaneously..."
**Analysis Categories:**
- **Parallel Step Execution:** Can any steps run simultaneously?
- **Multi-faceted Analysis:** Can single step analyses be broken into parallel sub-tasks?
- **Batch Processing:** Can similar operations be grouped for efficiency?
- **Background Processing:** Can any analyses run while user interacts?
**B. Implementation Patterns:**
```markdown
**Subprocess Implementation Opportunities:**
**Multi-Step Validation:**
"Use subprocesses when checking 6+ validation items - just need results back"
- Current: Sequential processing of all validation checks
- Optimized: Parallel subprocess analysis for faster completion
**Parallel User Assistance:**
- Can user interaction continue while background processing occurs?
- Can multiple analyses run simultaneously during user wait times?
**Batch Operations:**
- Can similar file operations be grouped?
- Can multiple data sources be processed in parallel?
```
### 4. LLM Resource Optimization Analysis
**A. Context Window Optimization:**
"**LLM Resource Efficiency Analysis:**
Analyzing how each step uses LLM resources efficiently..."
**Optimization Areas:**
- **JIT Loading:** Are references loaded only when needed?
- **Context Management:** Is context used efficiently vs. wasted?
- **Memory Efficiency:** Can large analyses be broken into smaller, focused tasks?
- **Parallel Processing:** Can LLM instances work simultaneously on different aspects?
**B. Speed vs. Quality Trade-offs:**
"**Performance Optimization Assessment:**
- **Speed-Critical Steps:** Which steps benefit most from subprocess acceleration?
- **Quality-Critical Steps:** Which steps need focused LLM attention?
- **Parallel Candidates:** Which analyses can run without affecting user experience?
- **Background Processing:** What can happen while user is reading/responding?"
### 5. Step-by-Step Optimization Recommendations
**A. Using Subprocess for Efficient Analysis:**
"**Processing all steps for optimization opportunities using subprocess analysis...**"
**For each workflow step, analyze:**
**1. Web Search Optimization:**
```markdown
**Step:** {step_name}
**Current Search Usage:** {current_search_instructions}
**Intelligent Assessment:** {is_search_necessary}
**Recommendation:**
- **Keep essential searches:** {specific_searches_to_keep}
- **Remove unnecessary searches:** {searches_to_remove}
- **Optimize search queries:** {improved_search_approach}
```
**2. Subprocess Opportunities:**
```markdown
**Parallel Processing Potential:**
- **Can run with user interaction:** {yes/no_specifics}
- **Can batch with other steps:** {opportunities}
- **Can break into sub-tasks:** {subtask_breakdown}
- **Background processing:** {what_can_run_in_background}
```
**3. LLM Efficiency:**
```markdown
**Resource Optimization:**
- **Context efficiency:** {current_vs_optimal}
- **Processing time:** {estimated_improvements}
- **User experience impact:** {better/same/worse}
```
### 6. Aggregate Optimization Analysis
**A. Web Search Optimization Summary:**
"**Web Search Optimization Results:**
- **Total Steps Analyzed:** [number]
- **Steps with Web Searches:** [number]
- **Unnecessary Searches Found:** [number]
- **Optimization Opportunities:** [number]
- **Estimated Time Savings:** [time_estimate]"
**B. Subprocess Implementation Summary:**
"**Subprocess Optimization Results:**
- **Parallel Processing Opportunities:** [number]
- **Batch Processing Groups:** [number]
- **Background Processing Tasks:** [number]
- **Estimated Performance Improvement:** [percentage_improvement]"
### 7. User-Facing Optimization Report
**A. Key Efficiency Findings:**
"**Optimization Analysis Summary:**
**Web Search Efficiency:**
- **Current Issues:** [unnecessary searches wasting time]
- **Recommendations:** [specific improvements]
- **Expected Benefits:** [faster response, better user experience]
**Processing Speed Improvements:**
- **Parallel Processing Gains:** [specific opportunities]
- **Background Processing Benefits:** [user experience improvements]
- **Resource Optimization:** [LLM efficiency gains]
**Implementation Priority:**
1. **High Impact, Low Effort:** [Quick wins]
2. **High Impact, High Effort:** [Major improvements]
3. **Low Impact, Low Effort:** [Fine-tuning]
4. **Future Considerations:** [Advanced optimizations]"
### 8. Document Optimization Findings
Append to {complianceReportFile}:
```markdown
## Web Search & Subprocess Optimization Analysis
### Web Search Optimization
**Unnecessary Searches Identified:** [number]
**Essential Searches to Keep:** [specific_list]
**Optimization Recommendations:** [detailed_suggestions]
**Estimated Time Savings:** [time_improvement]
### Subprocess Optimization Opportunities
**Parallel Processing:** [number] opportunities identified
**Batch Processing:** [number] grouping opportunities
**Background Processing:** [number] background task opportunities
**Performance Improvement:** [estimated_improvement_percentage]%
### Resource Efficiency Analysis
**Context Optimization:** [specific_improvements]
**LLM Resource Usage:** [efficiency_gains]
**User Experience Impact:** [positive_changes]
### Implementation Recommendations
**Immediate Actions:** [quick_improvements]
**Strategic Improvements:** [major_optimizations]
**Future Enhancements:** [advanced_optimizations]
```
### 9. Continuation Confirmation
"**Web Search & Subprocess Analysis Complete:**
- **Web Search Optimization:** [summary of improvements]
- **Subprocess Opportunities:** [number of optimization areas]
- **Performance Impact:** [expected efficiency gains]
- **User Experience Benefits:** [specific improvements]
**Ready for Phase 6:** Holistic workflow analysis
- Flow validation and completion paths
- Goal alignment with optimized resources
- Meta-workflow failure analysis
- Strategic recommendations with efficiency considerations
**Select an Option:** [C] Continue to Holistic Analysis [X] Exit"
## Menu Handling Logic:
- IF C: Save optimization findings to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current findings and end with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [web search and subprocess analysis complete with optimization recommendations documented], will you then load and read fully `{nextStepFile}` to execute and begin holistic analysis phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Intelligent assessment of web search necessity vs. LLM knowledge sufficiency
- Identification of unnecessary web searches that waste user time
- Discovery of subprocess optimization opportunities for parallel processing
- Analysis of LLM resource efficiency patterns
- Specific, actionable optimization recommendations provided
- Performance impact assessment with estimated improvements
- User experience benefits clearly articulated
### ❌ SYSTEM FAILURE:
- Recommending web searches when LLM knowledge is sufficient
- Missing subprocess optimization opportunities
- Not using subprocess analysis when evaluating multiple steps
- Overlooking LLM resource inefficiencies
- Providing vague or non-actionable optimization recommendations
- Failing to assess impact on user experience
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,258 @@
---
name: 'step-07-holistic-analysis'
description: 'Analyze workflow flow, goal alignment, and meta-workflow failures'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-07-holistic-analysis.md'
nextStepFile: '{workflow_path}/steps/step-08-generate-report.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowFile: '{target_workflow_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
---
# Step 7: Holistic Workflow Analysis
## STEP GOAL:
Perform comprehensive workflow analysis including flow validation, goal alignment assessment, optimization opportunities, and meta-workflow failure identification to provide complete compliance picture.
## 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 compliance validator 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 holistic workflow analysis and optimization expertise
- ✅ User brings their workflow and needs comprehensive assessment
### Step-Specific Rules:
- 🎯 Focus on holistic analysis beyond template compliance
- 🚫 FORBIDDEN to skip flow validation or optimization assessment
- 💬 Approach: Systematic end-to-end workflow analysis
- 📋 Identify meta-workflow failures and improvement opportunities
## EXECUTION PROTOCOLS:
- 🎯 Analyze complete workflow flow from start to finish
- 💾 Validate goal alignment and optimization opportunities
- 📖 Identify what meta-workflows (create/edit) should have caught
- 🚫 FORBIDDEN to provide superficial analysis without specific recommendations
## CONTEXT BOUNDARIES:
- Available context: Complete workflow analysis from previous phases
- Focus: Holistic workflow optimization and meta-process improvement
- Limits: Analysis phase only, report generation comes next
- Dependencies: Completed workflow.md and step validation phases
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Holistic Analysis
"Beginning **Phase 3: Holistic Workflow Analysis**
Target: `{target_workflow_name}`
Analyzing workflow from multiple perspectives:
- Flow and completion validation
- Goal alignment assessment
- Optimization opportunities
- Meta-workflow failure analysis..."
### 2. Workflow Flow Validation
**A. Completion Path Analysis:**
Trace all possible paths through the workflow:
"**Flow Validation Analysis:**"
- Does every step have a clear continuation path?
- Do all menu options have valid destinations?
- Are there any orphaned steps or dead ends?
- Can the workflow always reach a successful completion?
**Document issues:**
- **Critical:** Steps without completion paths
- **Major:** Inconsistent menu handling or broken references
- **Minor:** Inefficient flow patterns
**B. Sequential Logic Validation:**
Check step sequence logic:
- Does step order make logical sense?
- Are dependencies properly structured?
- Is information flow between steps optimal?
- Are there unnecessary steps or missing functionality?
### 3. Goal Alignment Assessment
**A. Stated Goal Analysis:**
Compare workflow.md goal with actual implementation:
"**Goal Alignment Analysis:**"
- **Stated Goal:** [quote from workflow.md]
- **Actual Implementation:** [what the workflow actually does]
- **Alignment Score:** [percentage match]
- **Gap Analysis:** [specific misalignments]
**B. User Experience Assessment:**
Evaluate workflow from user perspective:
- Is the workflow intuitive and easy to follow?
- Are user inputs appropriately requested?
- Is feedback clear and timely?
- Is the workflow efficient for the stated purpose?
### 4. Optimization Opportunities
**A. Efficiency Analysis:**
"**Optimization Assessment:**"
- **Step Consolidation:** Could any steps be combined?
- **Parallel Processing:** Could any operations run simultaneously?
- **JIT Loading:** Are references loaded optimally?
- **User Experience:** Where could user experience be improved?
**B. Architecture Improvements:**
- **Template Usage:** Are templates used optimally?
- **Output Management:** Are outputs appropriate and necessary?
- **Error Handling:** Is error handling comprehensive?
- **Extensibility:** Can the workflow be easily extended?
### 5. Meta-Workflow Failure Analysis
**CRITICAL SECTION:** Identify what create/edit workflows should have caught
"**Meta-Workflow Failure Analysis:**
**Issues that should have been prevented by create-workflow/edit-workflow:**"
**A. Create-Workflow Failures:**
- Missing frontmatter fields that should be validated during creation
- Incorrect path variable formats that should be standardized
- Template usage violations that should be caught during design
- Menu pattern deviations that should be enforced during build
- Workflow type mismatches that should be detected during planning
**B. Edit-Workflow Failures (if applicable):**
- Introduced compliance violations during editing
- Breaking template structure during modifications
- Inconsistent changes that weren't validated
- Missing updates to dependent files/references
**C. Systemic Process Improvements:**
"**Recommended Improvements for Meta-Workflows:**"
**For create-workflow:**
- Add validation step for frontmatter completeness
- Implement path variable format checking
- Add workflow type template usage validation
- Include menu pattern enforcement
- Add flow validation before finalization
- **Add Intent vs Prescriptive spectrum selection early in design process**
- **Include spectrum education for users during workflow creation**
- **Validate spectrum consistency throughout workflow design**
**For edit-workflow:**
- Add compliance validation before applying changes
- Include template structure checking during edits
- Implement cross-file consistency validation
- Add regression testing for compliance
- **Validate that edits maintain intended spectrum position**
- **Check for unintended spectrum shifts during modifications**
### 6. Severity-Based Recommendations
"**Strategic Recommendations by Priority:**"
**IMMEDIATE (Critical) - Must Fix for Workflow to Function:**
1. [Most critical issue with specific fix]
2. [Second critical issue with specific fix]
**HIGH PRIORITY (Major) - Significantly Impacts Quality:**
1. [Major issue affecting maintainability]
2. [Major issue affecting user experience]
**MEDIUM PRIORITY (Minor) - Standards Compliance:**
1. [Minor template compliance issue]
2. [Cosmetic or consistency improvements]
### 7. Continuation Confirmation
"**Phase 5 Complete:** Holistic analysis finished
- **Flow Validation:** [summary findings]
- **Goal Alignment:** [alignment percentage and key gaps]
- **Optimization Opportunities:** [number key improvements identified]
- **Meta-Workflow Failures:** [number issues that should have been prevented]
**Ready for Phase 6:** Comprehensive compliance report generation
- All findings compiled into structured report
- Severity-ranked violation list
- Specific fix recommendations
- Meta-workflow improvement suggestions
**Select an Option:** [C] Continue to Report Generation [X] Exit"
## Menu Handling Logic:
- IF C: Save holistic analysis findings to report, update frontmatter, then load, read entire file, then execute {nextStepFile}
- IF X: Save current findings and end with guidance for resuming
- IF Any other comments or queries: respond and redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [holistic analysis complete with meta-workflow failures identified], will you then load and read fully `{nextStepFile}` to execute and begin comprehensive report generation.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Complete workflow flow validation with all paths traced
- Goal alignment assessment with specific gap analysis
- Optimization opportunities identified with prioritized recommendations
- Meta-workflow failures documented with improvement suggestions
- Strategic recommendations provided by severity priority
- User ready for comprehensive report generation
### ❌ SYSTEM FAILURE:
- Skipping flow validation or goal alignment analysis
- Not identifying meta-workflow failure opportunities
- Failing to provide specific, actionable recommendations
- Missing strategic prioritization of improvements
- Providing superficial analysis without depth
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,301 @@
---
name: 'step-08-generate-report'
description: 'Generate comprehensive compliance report with fix recommendations'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/workflow-compliance-check'
# File References
thisStepFile: '{workflow_path}/steps/step-08-generate-report.md'
workflowFile: '{workflow_path}/workflow.md'
complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name}.md'
targetWorkflowFile: '{target_workflow_path}'
# Template References
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md'
---
# Step 8: Comprehensive Compliance Report Generation
## STEP GOAL:
Generate comprehensive compliance report compiling all validation findings, provide severity-ranked fix recommendations, and offer concrete next steps for achieving full compliance.
## 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 compliance validator 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 report generation and strategic recommendation expertise
- ✅ User brings their validated workflow and needs actionable improvement plan
### Step-Specific Rules:
- 🎯 Focus only on compiling comprehensive compliance report
- 🚫 FORBIDDEN to generate report without including all findings from previous phases
- 💬 Approach: Systematic compilation with clear, actionable recommendations
- 📋 Ensure report is complete, accurate, and immediately useful
## EXECUTION PROTOCOLS:
- 🎯 Compile all findings from previous validation phases
- 💾 Generate structured compliance report with clear sections
- 📖 Provide severity-ranked recommendations with specific fixes
- 🚫 FORBIDDEN to overlook any validation findings or recommendations
## CONTEXT BOUNDARIES:
- Available context: Complete validation findings from all previous phases
- Focus: Comprehensive report generation and strategic recommendations
- Limits: Report generation only, no additional validation
- Dependencies: Successful completion of all previous validation phases
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Initialize Report Generation
"**Phase 5: Comprehensive Compliance Report Generation**
Target: `{target_workflow_name}`
Compiling all validation findings into structured compliance report with actionable recommendations..."
### 2. Generate Compliance Report Structure
Create comprehensive report at {complianceReportFile}:
```markdown
# Workflow Compliance Report
**Workflow:** {target_workflow_name}
**Date:** {current_date}
**Standards:** BMAD workflow-template.md and step-template.md
---
## Executive Summary
**Overall Compliance Status:** [PASS/FAIL/PARTIAL]
**Critical Issues:** [number] - Must be fixed immediately
**Major Issues:** [number] - Significantly impacts quality/maintainability
**Minor Issues:** [number] - Standards compliance improvements
**Compliance Score:** [percentage]% based on template adherence
---
## Phase 1: Workflow.md Validation Results
### Critical Violations
[Critical issues with template references and specific fixes]
### Major Violations
[Major issues with template references and specific fixes]
### Minor Violations
[Minor issues with template references and specific fixes]
---
## Phase 2: Step-by-Step Validation Results
### Summary by Step
[Each step file with its violation summary]
### Most Common Violations
1. [Most frequent violation type with count]
2. [Second most frequent with count]
3. [Third most frequent with count]
### Workflow Type Assessment
**Workflow Type:** [editing/creation/validation/etc.]
**Template Appropriateness:** [appropriate/needs improvement]
**Recommendations:** [specific suggestions]
---
## Phase 3: Holistic Analysis Results
### Flow Validation
[Flow analysis findings with specific issues]
### Goal Alignment
**Alignment Score:** [percentage]%
**Stated vs. Actual:** [comparison with gaps]
### Optimization Opportunities
[Priority improvements with expected benefits]
---
## Meta-Workflow Failure Analysis
### Issues That Should Have Been Prevented
**By create-workflow:**
- [Specific issues that should have been caught during creation]
- [Suggested improvements to create-workflow]
**By edit-workflow (if applicable):**
- [Specific issues introduced during editing]
- [Suggested improvements to edit-workflow]
### Recommended Meta-Workflow Improvements
[Specific actionable improvements for meta-workflows]
---
## Severity-Ranked Fix Recommendations
### IMMEDIATE - Critical (Must Fix for Functionality)
1. **[Issue Title]** - [File: filename.md]
- **Problem:** [Clear description]
- **Template Reference:** [Specific section]
- **Fix:** [Exact action needed]
- **Impact:** [Why this is critical]
### HIGH PRIORITY - Major (Significantly Impacts Quality)
1. **[Issue Title]** - [File: filename.md]
- **Problem:** [Clear description]
- **Template Reference:** [Specific section]
- **Fix:** [Exact action needed]
- **Impact:** [Quality/maintainability impact]
### MEDIUM PRIORITY - Minor (Standards Compliance)
1. **[Issue Title]** - [File: filename.md]
- **Problem:** [Clear description]
- **Template Reference:** [Specific section]
- **Fix:** [Exact action needed]
- **Impact:** [Standards compliance]
---
## Automated Fix Options
### Fixes That Can Be Applied Automatically
[List of violations that can be automatically corrected]
### Fixes Requiring Manual Review
[List of violations requiring human judgment]
---
## Next Steps Recommendation
**Recommended Approach:**
1. Fix all Critical issues immediately (workflow may not function)
2. Address Major issues for reliability and maintainability
3. Implement Minor issues for full standards compliance
4. Update meta-workflows to prevent future violations
**Estimated Effort:**
- Critical fixes: [time estimate]
- Major fixes: [time estimate]
- Minor fixes: [time estimate]
```
### 3. Final Report Summary
"**Compliance Report Generated:** `{complianceReportFile}`
**Report Contents:**
- ✅ Complete violation analysis from all validation phases
- ✅ Severity-ranked recommendations with specific fixes
- ✅ Meta-workflow failure analysis with improvement suggestions
- ✅ Automated vs manual fix categorization
- ✅ Strategic next steps and effort estimates
**Key Findings:**
- **Overall Compliance Score:** [percentage]%
- **Critical Issues:** [number] requiring immediate attention
- **Major Issues:** [number] impacting quality
- **Minor Issues:** [number] for standards compliance
**Meta-Workflow Improvements Identified:** [number] specific suggestions
### 4. Offer Next Steps
"**Phase 6 Complete:** Comprehensive compliance analysis finished
All 8 validation phases completed with full report generation
**Compliance Analysis Complete. What would you like to do next?**"
**Available Options:**
- **[A] Apply Automated Fixes** - I can automatically correct applicable violations
- **[B] Launch edit-agent** - Edit the workflow with this compliance report as guidance
- **[C] Manual Review** - Use the report for manual fixes at your pace
- **[D] Update Meta-Workflows** - Strengthen create/edit workflows with identified improvements
**Recommendation:** Start with Critical issues, then proceed through High and Medium priority items systematically."
### 5. Report Completion Options
Display: "**Select an Option:** [A] Apply Automated Fixes [B] Launch Edit-Agent [C] Manual Review [D] Update Meta-Workflows [X] Exit"
## Menu Handling Logic:
- IF A: Begin applying automated fixes from the report
- IF B: Launch edit-agent workflow with this compliance report as context
- IF C: End workflow with guidance for manual review using the report
- IF D: Provide specific recommendations for meta-workflow improvements
- IF X: Save report and end workflow gracefully
## CRITICAL STEP COMPLETION NOTE
The workflow is complete when the comprehensive compliance report has been generated and the user has selected their preferred next step. The report contains all findings, recommendations, and strategic guidance needed to achieve full BMAD compliance.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Comprehensive compliance report generated with all validation findings
- Severity-ranked fix recommendations provided with specific actions
- Meta-workflow failure analysis completed with improvement suggestions
- Clear next steps offered based on user preferences
- Report saved and accessible for future reference
- User has actionable plan for achieving full compliance
### ❌ SYSTEM FAILURE:
- Generating incomplete report without all validation findings
- Missing severity rankings or specific fix recommendations
- Not providing clear next steps or options
- Failing to include meta-workflow improvement suggestions
- Creating report that is not immediately actionable
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@@ -0,0 +1,140 @@
# Workflow Compliance Report Template
**Workflow:** {workflow_name}
**Date:** {validation_date}
**Standards:** BMAD workflow-template.md and step-template.md
**Report Type:** Comprehensive Compliance Validation
---
## Executive Summary
**Overall Compliance Status:** {compliance_status}
**Critical Issues:** {critical_count} - Must be fixed immediately
**Major Issues:** {major_count} - Significantly impacts quality/maintainability
**Minor Issues:** {minor_count} - Standards compliance improvements
**Compliance Score:** {compliance_score}% based on template adherence
**Workflow Type Assessment:** {workflow_type} - {type_appropriateness}
---
## Phase 1: Workflow.md Validation Results
### Template Adherence Analysis
**Reference Standard:** {workflow_template_path}
### Critical Violations
{critical_violations}
### Major Violations
{major_violations}
### Minor Violations
{minor_violations}
---
## Phase 2: Step-by-Step Validation Results
### Summary by Step
{step_validation_summary}
### Most Common Violations
1. {most_common_violation_1}
2. {most_common_violation_2}
3. {most_common_violation_3}
### Workflow Type Appropriateness
**Analysis:** {workflow_type_analysis}
**Recommendations:** {type_recommendations}
---
## Phase 3: Holistic Analysis Results
### Flow Validation
{flow_validation_results}
### Goal Alignment
**Stated Goal:** {stated_goal}
**Actual Implementation:** {actual_implementation}
**Alignment Score:** {alignment_score}%
**Gap Analysis:** {gap_analysis}
### Optimization Opportunities
{optimization_opportunities}
---
## Meta-Workflow Failure Analysis
### Issues That Should Have Been Prevented
**By create-workflow:**
{create_workflow_failures}
**By edit-workflow:**
{edit_workflow_failures}
### Recommended Meta-Workflow Improvements
{meta_workflow_improvements}
---
## Severity-Ranked Fix Recommendations
### IMMEDIATE - Critical (Must Fix for Functionality)
{critical_recommendations}
### HIGH PRIORITY - Major (Significantly Impacts Quality)
{major_recommendations}
### MEDIUM PRIORITY - Minor (Standards Compliance)
{minor_recommendations}
---
## Automated Fix Options
### Fixes That Can Be Applied Automatically
{automated_fixes}
### Fixes Requiring Manual Review
{manual_fixes}
---
## Next Steps Recommendation
**Recommended Approach:**
{recommended_approach}
**Estimated Effort:**
- Critical fixes: {critical_effort}
- Major fixes: {major_effort}
- Minor fixes: {minor_effort}
---
**Report Generated:** {timestamp}
**Validation Engine:** BMAD Workflow Compliance Checker
**Next Review Date:** {next_review_date}

View File

@@ -0,0 +1,58 @@
---
name: Workflow Compliance Check
description: Systematic validation of workflows against BMAD standards with adversarial analysis and detailed reporting
web_bundle: false
---
# Workflow Compliance Check
**Goal:** Systematically validate workflows against BMAD standards through adversarial analysis, generating detailed compliance reports with severity-ranked violations and improvement recommendations.
**Your Role:** In addition to your name, communication_style, and persona, you are also a compliance validator and quality assurance specialist collaborating with a workflow owner. This is a partnership, not a client-vendor relationship. You bring expertise in BMAD standards, workflow architecture, and systematic validation, while the user brings their workflow and specific compliance concerns. 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 context for compliance checking (no output file frontmatter needed)
- **Append-Only Building**: Build compliance reports 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-validate-goal.md` to begin the workflow. If the path to a workflow was provided, set `user_provided_path` to that path.