6.0 KiB
Edit Workflow - Workflow Editor Instructions
The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.md You MUST have already loaded and processed: {project-root}/bmad/bmb/workflows/edit-workflow/workflow.yaml Study the workflow creation guide thoroughly at: {workflow_creation_guide}
What is the path to the workflow you want to edit? (provide path to workflow.yaml or workflow folder)Load the workflow.yaml file from the provided path Identify the workflow type (document, action, interactive, autonomous, meta) List all associated files (template.md, instructions.md, checklist.md, data files) Load any existing instructions.md and template.md files if present
Display a summary:
- Workflow name and description
- Type of workflow
- Files present
- Current structure overview
Analyze for:
- Critical headers: Are workflow engine references present?
- File structure: Are all expected files present for this workflow type?
- Variable consistency: Do variable names match between files?
- Step structure: Are steps properly numbered and focused?
- XML tags: Are tags used correctly and consistently?
- Instructions clarity: Are instructions specific with examples and limits?
- Template variables: Use snake_case and descriptive names?
- Validation criteria: Are checklist items measurable and specific?
Create a list of identified issues or improvement opportunities Prioritize issues by importance (critical, important, nice-to-have)
Present the editing menu to the user:What aspect would you like to edit?
- Fix critical issues - Address missing headers, broken references
- Update workflow.yaml - Modify configuration, paths, metadata
- Refine instructions - Improve steps, add detail, fix flow
- Update template - Fix variables, improve structure (if applicable)
- Enhance validation - Make checklist more specific and measurable
- Add new features - Add steps, optional sections, or capabilities
- Optimize for clarity - Improve descriptions, add examples
- Full review and update - Comprehensive improvements across all files
Select an option (1-8) or describe a custom edit:
Based on the selected edit type, load appropriate reference materials:If editing instructions or adding features: Review the "Writing Instructions" section of the creation guide Load example workflows from {project-root}/bmad/bmm/workflows/ for patterns
If editing templates: Review the "Templates and Variables" section of the creation guide Ensure variable naming conventions are followed
If editing validation: Review the "Validation" section and measurable criteria examples
If fixing critical issues: Load the workflow execution engine documentation Verify all required elements are present
Based on the selected focus area:Show the current content that will be edited Explain the proposed changes and why they improve the workflow Generate the updated content following all conventions from the guide
Review the proposed changes. Options:
- [a] Accept and apply
- [e] Edit/modify the changes
- [s] Skip this change
- [n] Move to next file/section
- [d] Done with edits
If user selects 'a': Apply the changes to the file Log the change for the summary
If user selects 'e': What modifications would you like to make? Regenerate with modifications
If user selects 'd': Proceed to validation
Run a comprehensive validation check:Validation checks:
- All file paths resolve correctly
- Variable names are consistent across files
- Step numbering is sequential and logical
- Required XML tags are properly formatted
- No placeholders remain (like {TITLE} or {WORKFLOW_CODE})
- Instructions match the workflow type
- Template variables match instruction outputs (if applicable)
- Checklist criteria are measurable (if present)
- Critical headers are present in instructions
- YAML syntax is valid
If any validation fails: Issues found. Would you like to fix them? (y/n) If yes: Return to editing
Create a summary of all changes made:Workflow Edit Summary
Workflow: {{workflow_name}} Date: {{date}} Editor: {{user_name}}
Changes Made:
List each file that was modified with a brief description of changes
Improvements:
Summarize how the workflow is now better aligned with best practices
Files Modified:
List all modified files with their paths
Next Steps:
Suggest any additional improvements or testing that could be done
Would you like to:
- Save this summary to: {change_log_output}
- Test the edited workflow
- Make additional edits
- Exit
If save summary: Write the summary to the change log file
If test workflow: {{workflow_name}}