From 35ae4fd024e0fac525e0033b361b960a73014469 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Sat, 3 Jan 2026 00:32:56 +0800 Subject: [PATCH] quadrivariate module workflow --- .../bmb/agents/module-builder.agent.yaml | 12 +- .../workflows-legacy/edit-module/README.md | 171 ------- .../workflows-legacy/edit-module/checklist.md | 163 ------ .../edit-module/instructions.md | 340 ------------- .../edit-module/workflow.yaml | 34 -- .../workflows-legacy/module-brief/README.md | 264 ---------- .../module-brief/checklist.md | 116 ----- .../module-brief/instructions.md | 268 ---------- .../workflows-legacy/module-brief/template.md | 275 ----------- .../module-brief/workflow.yaml | 36 -- .../workflows/agent/data/critical-actions.md | 4 +- .../agent/data/expert-agent-architecture.md | 2 +- .../agent/steps-c/step-03-type-metadata.md | 6 +- .../agent/steps-c/step-04-persona.md | 2 +- .../agent/steps-c/step-05-commands-menu.md | 2 +- .../agent/steps-c/step-06-activation.md | 14 +- .../agent/steps-c/step-07a-build-simple.md | 8 +- .../agent/steps-c/step-07b-build-expert.md | 32 +- .../agent/steps-c/step-07c-build-module.md | 4 +- ...p-09-celebrate.md => step-08-celebrate.md} | 19 +- .../steps-c/step-08a-plan-traceability.md | 205 -------- .../steps-c/step-08b-metadata-validation.md | 130 ----- .../steps-c/step-08c-persona-validation.md | 161 ------ .../agent/steps-c/step-08d-menu-validation.md | 175 ------- .../steps-c/step-08e-structure-validation.md | 308 ------------ .../steps-c/step-08f-sidecar-validation.md | 464 ------------------ .../agent/steps-e/e-01-load-existing.md | 5 +- .../agent/steps-e/e-07-activation.md | 19 +- .../agent/steps-e/e-08a-edit-simple.md | 9 +- .../agent/steps-e/e-08b-edit-expert.md | 8 +- .../agent/steps-e/e-08c-edit-module.md | 7 +- .../{e-10-celebrate.md => e-09-celebrate.md} | 17 +- .../agent/steps-e/e-09a-validate-metadata.md | 128 ----- .../agent/steps-e/e-09b-validate-persona.md | 138 ------ .../agent/steps-e/e-09c-validate-menu.md | 163 ------ .../agent/steps-e/e-09d-validate-structure.md | 154 ------ .../agent/steps-e/e-09e-validate-sidecar.md | 160 ------ .../agent/steps-e/e-09f-validation-summary.md | 113 ----- .../agent/steps-v/v-01-load-review.md | 7 +- .../agent/steps-v/v-02e-validate-sidecar.md | 6 +- .../module/data/agent-architecture.md | 179 +++++++ .../module/data/agent-spec-template.md | 79 +++ .../module/data/module-installer-standards.md | 348 +++++++++++++ .../workflows/module/data/module-standards.md | 280 +++++++++++ .../module/data/module-yaml-conventions.md | 392 +++++++++++++++ .../module/steps-b/step-01-welcome.md | 147 ++++++ .../workflows/module/steps-b/step-02-spark.md | 140 ++++++ .../module/steps-b/step-03-module-type.md | 148 ++++++ .../module/steps-b/step-04-vision.md | 82 ++++ .../module/steps-b/step-05-identity.md | 96 ++++ .../workflows/module/steps-b/step-06-users.md | 85 ++++ .../workflows/module/steps-b/step-07-value.md | 75 +++ .../module/steps-b/step-08-agents.md | 96 ++++ .../module/steps-b/step-09-workflows.md | 82 ++++ .../workflows/module/steps-b/step-10-tools.md | 90 ++++ .../module/steps-b/step-11-scenarios.md | 83 ++++ .../module/steps-b/step-12-creative.md | 94 ++++ .../module/steps-b/step-13-review.md | 104 ++++ .../module/steps-b/step-14-finalize.md | 117 +++++ .../module/steps-c/step-01-load-brief.md | 178 +++++++ .../module/steps-c/step-01b-continue.md | 83 ++++ .../module/steps-c/step-02-structure.md | 109 ++++ .../module/steps-c/step-03-config.md | 118 +++++ .../module/steps-c/step-04-installer.md | 160 ++++++ .../module/steps-c/step-05-agents.md | 167 +++++++ .../module/steps-c/step-06-workflows.md | 183 +++++++ .../workflows/module/steps-c/step-07-docs.md | 402 +++++++++++++++ .../module/steps-c/step-08-complete.md | 123 +++++ .../module/steps-e/step-01-load-target.md | 81 +++ .../module/steps-e/step-02-select-edit.md | 77 +++ .../module/steps-e/step-03-apply-edit.md | 77 +++ .../module/steps-e/step-04-review.md | 80 +++ .../module/steps-e/step-05-confirm.md | 75 +++ .../module/steps-v/step-01-load-target.md | 96 ++++ .../module/steps-v/step-02-file-structure.md | 94 ++++ .../module/steps-v/step-03-module-yaml.md | 99 ++++ .../module/steps-v/step-04-agent-specs.md | 152 ++++++ .../module/steps-v/step-05-workflow-specs.md | 152 ++++++ .../module/steps-v/step-06-documentation.md | 143 ++++++ .../module/steps-v/step-07-installation.md | 113 +++++ .../module/steps-v/step-08-report.md | 197 ++++++++ .../module/templates/brief-template.md | 154 ++++++ .../templates/workflow-spec-template.md | 96 ++++ src/modules/bmb/workflows/module/workflow.md | 100 ++++ 84 files changed, 6121 insertions(+), 4054 deletions(-) delete mode 100644 src/modules/bmb/workflows-legacy/edit-module/README.md delete mode 100644 src/modules/bmb/workflows-legacy/edit-module/checklist.md delete mode 100644 src/modules/bmb/workflows-legacy/edit-module/instructions.md delete mode 100644 src/modules/bmb/workflows-legacy/edit-module/workflow.yaml delete mode 100644 src/modules/bmb/workflows-legacy/module-brief/README.md delete mode 100644 src/modules/bmb/workflows-legacy/module-brief/checklist.md delete mode 100644 src/modules/bmb/workflows-legacy/module-brief/instructions.md delete mode 100644 src/modules/bmb/workflows-legacy/module-brief/template.md delete mode 100644 src/modules/bmb/workflows-legacy/module-brief/workflow.yaml rename src/modules/bmb/workflows/agent/steps-c/{step-09-celebrate.md => step-08-celebrate.md} (89%) delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08a-plan-traceability.md delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08b-metadata-validation.md delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08c-persona-validation.md delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08d-menu-validation.md delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08e-structure-validation.md delete mode 100644 src/modules/bmb/workflows/agent/steps-c/step-08f-sidecar-validation.md rename src/modules/bmb/workflows/agent/steps-e/{e-10-celebrate.md => e-09-celebrate.md} (81%) delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09a-validate-metadata.md delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09b-validate-persona.md delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09c-validate-menu.md delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09d-validate-structure.md delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09e-validate-sidecar.md delete mode 100644 src/modules/bmb/workflows/agent/steps-e/e-09f-validation-summary.md create mode 100644 src/modules/bmb/workflows/module/data/agent-architecture.md create mode 100644 src/modules/bmb/workflows/module/data/agent-spec-template.md create mode 100644 src/modules/bmb/workflows/module/data/module-installer-standards.md create mode 100644 src/modules/bmb/workflows/module/data/module-standards.md create mode 100644 src/modules/bmb/workflows/module/data/module-yaml-conventions.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-01-welcome.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-02-spark.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-03-module-type.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-04-vision.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-05-identity.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-06-users.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-07-value.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-08-agents.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-09-workflows.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-10-tools.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-11-scenarios.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-12-creative.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-13-review.md create mode 100644 src/modules/bmb/workflows/module/steps-b/step-14-finalize.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-01-load-brief.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-01b-continue.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-02-structure.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-03-config.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-04-installer.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-05-agents.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-06-workflows.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-07-docs.md create mode 100644 src/modules/bmb/workflows/module/steps-c/step-08-complete.md create mode 100644 src/modules/bmb/workflows/module/steps-e/step-01-load-target.md create mode 100644 src/modules/bmb/workflows/module/steps-e/step-02-select-edit.md create mode 100644 src/modules/bmb/workflows/module/steps-e/step-03-apply-edit.md create mode 100644 src/modules/bmb/workflows/module/steps-e/step-04-review.md create mode 100644 src/modules/bmb/workflows/module/steps-e/step-05-confirm.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-01-load-target.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-02-file-structure.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-03-module-yaml.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-04-agent-specs.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-05-workflow-specs.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-06-documentation.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-07-installation.md create mode 100644 src/modules/bmb/workflows/module/steps-v/step-08-report.md create mode 100644 src/modules/bmb/workflows/module/templates/brief-template.md create mode 100644 src/modules/bmb/workflows/module/templates/workflow-spec-template.md create mode 100644 src/modules/bmb/workflows/module/workflow.md diff --git a/src/modules/bmb/agents/module-builder.agent.yaml b/src/modules/bmb/agents/module-builder.agent.yaml index 9ccad18f..5a6fc9b9 100644 --- a/src/modules/bmb/agents/module-builder.agent.yaml +++ b/src/modules/bmb/agents/module-builder.agent.yaml @@ -28,22 +28,18 @@ agent: - modules: "{project-root}/_bmad/bmb/docs/modules/kb.csv" menu: - - trigger: BM or fuzzy match on brainstorm-module - exec: "{project-root}/_bmad/bmb/workflows/brainstorm-module/workflow.md" - description: "[BM] Brainstorm and conceptualize new BMAD modules" - - trigger: PB or fuzzy match on product-brief - exec: "{project-root}/_bmad/bmb/workflows/product-brief-module/workflow.md" + exec: "{project-root}/_bmad/bmb/workflows/module/workflow.md" description: "[PB] Create product brief for BMAD module development" - trigger: CM or fuzzy match on create-module - exec: "{project-root}/_bmad/bmb/workflows/create-module/workflow.md" + exec: "{project-root}/_bmad/bmb/workflows/module/workflow.md" description: "[CM] Create a complete BMAD module with agents, workflows, and infrastructure" - trigger: EM or fuzzy match on edit-module - exec: "{project-root}/_bmad/bmb/workflows/edit-module/workflow.md" + exec: "{project-root}/_bmad/bmb/workflows/module/workflow.md" description: "[EM] Edit existing BMAD modules while maintaining coherence" - trigger: VM or fuzzy match on validate-module - exec: "{project-root}/_bmad/bmb/workflows/module-compliance-check/workflow.md" + exec: "{project-root}/_bmad/bmb/workflows/module/workflow.md" description: "[VM] Run compliance check on BMAD modules against best practices" diff --git a/src/modules/bmb/workflows-legacy/edit-module/README.md b/src/modules/bmb/workflows-legacy/edit-module/README.md deleted file mode 100644 index d14308cb..00000000 --- a/src/modules/bmb/workflows-legacy/edit-module/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# Edit Module Workflow - -Interactive workflow for editing existing BMAD modules, including structure, agents, workflows, configuration, and documentation. - -## Purpose - -This workflow helps you improve and maintain BMAD modules by: - -- Analyzing module structure against best practices -- Managing agents and workflows within the module -- Updating configuration and documentation -- Ensuring cross-module integration works correctly -- Maintaining installer configuration (for source modules) - -## When to Use - -Use this workflow when you need to: - -- Add new agents or workflows to a module -- Update module configuration -- Improve module documentation -- Reorganize module structure -- Set up cross-module workflow sharing -- Fix issues in module organization -- Update installer configuration - -## What You'll Need - -- Path to the module directory you want to edit -- Understanding of what changes you want to make -- Access to module documentation (loaded automatically) - -## Workflow Steps - -1. **Load and analyze target module** - Provide path to module directory -2. **Analyze against best practices** - Automatic audit of module structure -3. **Select editing focus** - Choose what aspect to edit -4. **Load relevant documentation and tools** - Auto-loads guides and workflows -5. **Perform edits** - Review and approve changes iteratively -6. **Validate all changes** - Comprehensive validation checklist -7. **Generate change summary** - Summary of improvements made - -## Editing Options - -The workflow provides 12 focused editing options: - -1. **Fix critical issues** - Address missing files, broken references -2. **Update module config** - Edit config.yaml fields -3. **Manage agents** - Add, edit, or remove agents -4. **Manage workflows** - Add, edit, or remove workflows -5. **Update documentation** - Improve README files and guides -6. **Reorganize structure** - Fix directory organization -7. **Add new agent** - Create and integrate new agent -8. **Add new workflow** - Create and integrate new workflow -9. **Update installer** - Modify installer configuration (source only) -10. **Cross-module integration** - Set up workflow sharing with other modules -11. **Remove deprecated items** - Delete unused agents, workflows, or files -12. **Full module review** - Comprehensive analysis and improvements - -## Integration with Other Workflows - -This workflow integrates with: - -- **edit-agent** - For editing individual agents -- **edit-workflow** - For editing individual workflows -- **create-agent** - For adding new agents -- **create-workflow** - For adding new workflows - -When you select options to manage agents or workflows, the appropriate specialized workflow is invoked automatically. - -## Module Structure - -A proper BMAD module has: - -``` -module-code/ -├── agents/ # Agent definitions -│ └── *.agent.yaml -├── workflows/ # Workflow definitions -│ └── workflow-name/ -│ ├── workflow.yaml -│ ├── instructions.md -│ ├── checklist.md -│ └── README.md -├── config.yaml # Module configuration -└── README.md # Module documentation -``` - -## Standard Module Config - -Every module config.yaml should have: - -```yaml -module_name: 'Full Module Name' -module_code: 'xyz' -user_name: 'User Name' -communication_language: 'english' -output_folder: 'path/to/output' -``` - -Optional fields may be added for module-specific needs. - -## Cross-Module Integration - -Modules can share workflows: - -```yaml -# In agent menu item: -workflow: '{project-root}/_bmad/other-module/workflows/shared-workflow/workflow.yaml' -``` - -Common patterns: - -- BMM uses CIS brainstorming workflows -- All modules can use core workflows -- Modules can invoke each other's workflows - -## Output - -The workflow modifies module files in place, including: - -- config.yaml -- Agent files -- Workflow files -- README and documentation files -- Directory structure (if reorganizing) - -Changes are reviewed and approved by you before being applied. - -## Best Practices - -- **Start with analysis** - Let the workflow audit your module first -- **Use specialized workflows** - Let edit-agent and edit-workflow handle detailed edits -- **Update documentation** - Keep README files current with changes -- **Validate thoroughly** - Use the validation step to catch structural issues -- **Test after editing** - Invoke agents and workflows to verify they work - -## Tips - -- For adding agents/workflows, use options 7-8 to create and integrate in one step -- For quick config changes, use option 2 (update module config) -- Cross-module integration (option 10) helps set up workflow sharing -- Full module review (option 12) is great for inherited or legacy modules -- The workflow handles path updates when you reorganize structure - -## Example Usage - -``` -User: I want to add a new workflow to BMM for API design -Workflow: Analyzes BMM → You choose option 8 (add new workflow) - → Invokes create-workflow → Creates workflow - → Integrates it into module → Updates README → Done -``` - -## Activation - -Invoke via BMad Builder agent: - -``` -/bmad:bmb:agents:bmad-builder -Then select: *edit-module -``` - -Or directly via workflow.xml with this workflow config. - -## Related Resources - -- **Module Structure Guide** - Comprehensive module architecture documentation -- **BMM Module** - Example of full-featured module -- **BMB Module** - Example of builder/tooling module -- **CIS Module** - Example of workflow library module diff --git a/src/modules/bmb/workflows-legacy/edit-module/checklist.md b/src/modules/bmb/workflows-legacy/edit-module/checklist.md deleted file mode 100644 index 779ec5c4..00000000 --- a/src/modules/bmb/workflows-legacy/edit-module/checklist.md +++ /dev/null @@ -1,163 +0,0 @@ -# Edit Module - Validation Checklist - -Use this checklist to validate module edits meet BMAD Core standards. - -## Module Structure Validation - -- [ ] Module has clear abbreviation code (bmm, bmb, cis, etc.) -- [ ] agents/ directory exists -- [ ] workflows/ directory exists -- [ ] config.yaml exists in module root -- [ ] README.md exists in module root -- [ ] Directory structure follows BMAD conventions - -## Configuration Validation - -### Required Fields - -- [ ] module_name is descriptive and clear -- [ ] module_code is 3-letter code matching directory name -- [ ] user_name field present -- [ ] communication_language field present -- [ ] output_folder field present - -### Optional Fields (if used) - -- [ ] bmb_creations_output_folder documented -- [ ] Module-specific fields documented in README - -### File Quality - -- [ ] config.yaml is valid YAML syntax -- [ ] No duplicate keys -- [ ] Values are appropriate types (strings, paths, etc.) -- [ ] Comments explain non-obvious fields - -## Agent Validation - -### Agent Files - -- [ ] All agents in agents/ directory -- [ ] Agent files follow naming: {agent-name}.agent.yaml or .md -- [ ] Agent filenames use kebab-case -- [ ] No orphaned or temporary agent files - -### Agent Content - -- [ ] Each agent has clear role and purpose -- [ ] Agents reference workflows correctly -- [ ] Agent workflow paths are valid -- [ ] Agents load module config correctly (if needed) -- [ ] Agent menu items reference existing workflows - -### Agent Integration - -- [ ] All agents listed in module README -- [ ] Agent relationships documented (if applicable) -- [ ] Cross-agent workflows properly linked - -## Workflow Validation - -### Workflow Structure - -- [ ] All workflows in workflows/ directory -- [ ] Each workflow directory has workflow.yaml -- [ ] Each workflow directory has instructions.md -- [ ] Workflow directories use kebab-case naming -- [ ] No orphaned or incomplete workflow directories - -### Workflow Content - -- [ ] workflow.yaml is valid YAML -- [ ] workflow.yaml has name field -- [ ] workflow.yaml has description field -- [ ] workflow.yaml has author field -- [ ] instructions.md has proper structure -- [ ] Workflow steps are numbered and logical - -### Workflow Integration - -- [ ] All workflows listed in module README -- [ ] Workflow paths in agents are correct -- [ ] Cross-module workflow references are valid -- [ ] Sub-workflow references exist - -## Documentation Validation - -### Module README - -- [ ] Module README describes purpose clearly -- [ ] README lists all agents with descriptions -- [ ] README lists all workflows with descriptions -- [ ] README includes installation instructions (if applicable) -- [ ] README explains module's role in BMAD ecosystem - -### Workflow READMEs - -- [ ] Each workflow has its own README.md -- [ ] Workflow READMEs explain purpose -- [ ] Workflow READMEs list inputs/outputs -- [ ] Workflow READMEs include usage examples - -### Other Documentation - -- [ ] Usage guides present (if needed) -- [ ] Architecture docs present (if complex module) -- [ ] Examples provided (if applicable) - -## Cross-References Validation - -- [ ] Agent workflow references point to existing workflows -- [ ] Workflow sub-workflow references are valid -- [ ] Cross-module references use correct paths -- [ ] Config file paths use {project-root} correctly -- [ ] No hardcoded absolute paths - -## Installer Validation (Source Modules Only) - -- [ ] Installer script exists in tools/cli/installers/ -- [ ] Installer script name: install-{module-code}.js -- [ ] Module metadata in installer is correct -- [ ] Web bundle configuration valid (if applicable) -- [ ] Installation paths are correct -- [ ] Dependencies documented in installer - -## Web Bundle Validation (If Applicable) - -- [ ] Web bundles configured in workflow.yaml files -- [ ] All referenced files included in web_bundle_files -- [ ] Paths are _bmad/-relative (not project-root) -- [ ] No config_source references in web bundles -- [ ] Invoked workflows included in dependencies - -## Quality Checks - -- [ ] No placeholder text remains ({MODULE_NAME}, {CODE}, etc.) -- [ ] No broken file references -- [ ] No duplicate content across files -- [ ] Consistent naming conventions throughout -- [ ] Module purpose is clear from README alone - -## Integration Checks - -- [ ] Module doesn't conflict with other modules -- [ ] Shared resources properly documented -- [ ] Dependencies on other modules explicit -- [ ] Module can be installed independently (if designed that way) - -## User Experience - -- [ ] Module purpose is immediately clear -- [ ] Agents have intuitive names -- [ ] Workflows have descriptive names -- [ ] Menu items are logically organized -- [ ] Error messages are helpful -- [ ] Success messages confirm actions - -## Final Checks - -- [ ] All files have been saved -- [ ] File permissions are correct -- [ ] Git status shows expected changes -- [ ] Module is ready for testing -- [ ] Documentation accurately reflects changes diff --git a/src/modules/bmb/workflows-legacy/edit-module/instructions.md b/src/modules/bmb/workflows-legacy/edit-module/instructions.md deleted file mode 100644 index 6f3e2b8b..00000000 --- a/src/modules/bmb/workflows-legacy/edit-module/instructions.md +++ /dev/null @@ -1,340 +0,0 @@ -# Edit Module - Module Editor Instructions - -The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml -You MUST have already loaded and processed: {project-root}/_bmad/bmb/workflows/edit-module/workflow.yaml -This workflow uses ADAPTIVE FACILITATION - adjust your communication based on context and user needs -The goal is COLLABORATIVE IMPROVEMENT - work WITH the user, not FOR them -Communicate all responses in {communication_language} - - - - -What is the path to the module source you want to edit? - -Load the module directory structure completely: - -- Scan all directories and files -- Load config.yaml -- Load README.md -- List all agents in agents/ directory -- List all workflows in workflows/ directory -- Identify any custom structure or patterns - - -Load ALL module documentation to inform understanding: - -- Module structure guide: {module_structure_guide} -- Study reference modules: BMM, BMB, CIS -- Understand BMAD module patterns and conventions - - -Analyze the module deeply: - -- Identify module purpose and role in BMAD ecosystem -- Understand agent organization and relationships -- Map workflow organization and dependencies -- Evaluate config structure and completeness -- Check documentation quality and currency -- Assess installer configuration (if source module) -- Identify cross-module integrations -- Evaluate against best practices from loaded guides - - -Reflect understanding back to {user_name}: - -Present a warm, conversational summary adapted to the module's complexity: - -- What this module provides (its purpose and value in BMAD) -- How it's organized (agents, workflows, structure) -- What you notice (strengths, potential improvements, issues) -- How it fits in the larger BMAD ecosystem -- Your initial assessment based on best practices - -Be conversational and insightful. Help {user_name} see their module through your eyes. - - -Does this match your understanding of what this module should provide? -module_understanding - - - -Understand WHAT the user wants to improve and WHY before diving into edits - -Engage in collaborative discovery: - -Ask open-ended questions to understand their goals: - -- What prompted you to want to edit this module? -- What feedback have you gotten from users of this module? -- Are there specific agents or workflows that need attention? -- Is the module fulfilling its intended purpose? -- Are there new capabilities you want to add? -- How well does it integrate with other modules? -- Is the documentation helping users understand and use the module? - -Listen for clues about: - -- Structural issues (poor organization, hard to navigate) -- Agent/workflow issues (outdated, broken, missing functionality) -- Configuration issues (missing fields, incorrect setup) -- Documentation issues (outdated, incomplete, unclear) -- Integration issues (doesn't work well with other modules) -- Installer issues (installation problems, missing files) -- User experience issues (confusing, hard to use) - - -Based on their responses and your analysis from step 1, identify improvement opportunities: - -Organize by priority and user goals: - -- CRITICAL issues blocking module functionality -- IMPORTANT improvements enhancing user experience -- NICE-TO-HAVE enhancements for polish - -Present these conversationally, explaining WHY each matters and HOW it would help. - - -Collaborate on priorities: - -Don't just list options - discuss them: - -- "I noticed {{issue}} - this could make it hard for users to {{problem}}. Want to address this?" -- "The module could be more {{improvement}} which would help when {{use_case}}. Worth exploring?" -- "Based on what you said about {{user_goal}}, we might want to {{suggestion}}. Thoughts?" - -Let the conversation flow naturally. Build a shared vision of what "better" looks like. - - -improvement_goals - - - -Work iteratively - improve, review, refine. Never dump all changes at once. -For agent and workflow edits, invoke specialized workflows rather than doing inline - -For each improvement area, facilitate collaboratively: - -1. **Explain the current state and why it matters** - - Show relevant sections of the module - - Explain how it works now and implications - - Connect to user's goals from step 2 - -2. **Propose improvements with rationale** - - Suggest specific changes that align with best practices - - Explain WHY each change helps - - Provide examples from reference modules: {bmm_module_dir}, {bmb_module_dir}, {cis_module_dir} - - Reference agents from: {existing_agents_dir} - - Reference workflows from: {existing_workflows_dir} - - Reference the structure guide's patterns naturally - -3. **Collaborate on the approach** - - Ask if the proposed change addresses their need - - Invite modifications or alternative approaches - - Explain tradeoffs when relevant - - Adapt based on their feedback - -4. **Apply changes appropriately** - - For agent edits: Invoke edit-agent workflow - - For workflow edits: Invoke edit-workflow workflow - - For module-level changes: Make directly and iteratively - - Show updates and confirm satisfaction - - -Common improvement patterns to facilitate: - -**If improving module organization:** - -- Discuss how the current structure serves (or doesn't serve) users -- Propose reorganization that aligns with mental models -- Consider feature-based vs type-based organization -- Plan the reorganization steps -- Update all references after moving files - -**If updating module configuration:** - -- Review current config.yaml fields -- Check for missing standard fields (user_name, communication_language, output_folder) -- Add module-specific fields as needed -- Remove unused or outdated fields -- Ensure config is properly documented - -**If managing agents:** - -- Ask which agent needs attention and why -- For editing existing agent: -- For adding new agent: Guide creation and integration -- For removing agent: Confirm, remove, update references -- Ensure all agent references in workflows remain valid - -**If managing workflows:** - -- Ask which workflow needs attention and why -- For editing existing workflow: -- For adding new workflow: Guide creation and integration -- For removing workflow: Confirm, remove, update agent references -- Ensure all workflow files are properly organized - -**If improving documentation:** - -- Review current README and identify gaps -- Discuss what users need to know -- Update module overview and purpose -- List agents and workflows with clear descriptions -- Add usage examples if helpful -- Ensure installation/setup instructions are clear - -**If setting up cross-module integration:** - -- Identify which workflows from other modules are needed -- Show how to reference workflows properly: {project-root}/_bmad/{{module}}/workflows/{{workflow}}/workflow.yaml -- Document the integration in README -- Ensure dependencies are clear -- Consider adding example usage - -**If updating installer (source modules only):** - -- Review installer script for correctness -- Check web bundle configurations -- Verify all files are included -- Test installation paths -- Update module metadata - - -When invoking specialized workflows: - -Explain why you're handing off: - -- "This agent needs detailed attention. Let me invoke the edit-agent workflow to give it proper focus." -- "The workflow editor can handle this more thoroughly. I'll pass control there." - -After the specialized workflow completes, return and continue: - -- "Great! That agent/workflow is updated. Want to work on anything else in the module?" - - -Throughout improvements, educate when helpful: - -Share insights from the guides naturally: - -- "The module structure guide recommends {{pattern}} for this scenario" -- "Looking at how BMM organized this, we could use {{approach}}" -- "The BMAD convention is to {{pattern}} which helps with {{benefit}}" - -Connect improvements to broader BMAD principles without being preachy. - - -After each significant change: - -- "Does this organization feel more intuitive?" -- "Want to refine this further, or move to the next improvement?" -- "How does this change affect users of the module?" - - -improvement_implementation - - - -Run comprehensive validation conversationally: - -Don't just check boxes - explain what you're validating and why it matters: - -- "Let me verify the module structure is solid..." -- "Checking that all agent workflow references are valid..." -- "Making sure config.yaml has all necessary fields..." -- "Validating documentation is complete and accurate..." -- "Ensuring cross-module references work correctly..." - - -Load validation checklist: {installed_path}/checklist.md -Check all items from checklist systematically - - - Present issues conversationally: - -Explain what's wrong and implications: - -- "I found {{issue}} which could cause {{problem}} for users" -- "The {{component}} needs {{fix}} because {{reason}}" - -Propose fixes immediately: - -- "I can fix this by {{solution}}. Should I?" -- "We have a couple options here: {{option1}} or {{option2}}. Thoughts?" - - -Fix approved issues and re-validate - - - - Confirm success warmly: - -"Excellent! Everything validates cleanly: - -- Module structure is well-organized -- All agent and workflow references are valid -- Configuration is complete -- Documentation is thorough and current -- Cross-module integrations work properly -- Installer is correct (if applicable) - -Your module is in great shape." - - - -validation_results - - - -Create a conversational summary of what improved: - -Tell the story of the transformation: - -- "We started with {{initial_state}}" -- "You wanted to {{user_goals}}" -- "We made these key improvements: {{changes_list}}" -- "Now your module {{improved_capabilities}}" - -Highlight the impact: - -- "This means users will experience {{benefit}}" -- "The module is now more {{quality}}" -- "It follows best practices for {{patterns}}" - - -Guide next steps based on changes made: - -If structure changed significantly: - -- "Since we reorganized the structure, you should update any external references to this module" - -If agents or workflows were updated: - -- "The updated agents/workflows should be tested with real user interactions" - -If cross-module integration was added: - -- "Test the integration with {{other_module}} to ensure it works smoothly" - -If installer was updated: - -- "Test the installation process to verify all files are included correctly" - -If this is part of larger BMAD work: - -- "Consider if patterns from this module could benefit other modules" - -Be a helpful guide to what comes next, not just a task completer. - - -Would you like to: - -- Test the edited module by invoking one of its agents -- Edit a specific agent or workflow in more detail -- Make additional refinements to the module -- Work on a different module - - -completion_summary - - - diff --git a/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml b/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml deleted file mode 100644 index d66ef667..00000000 --- a/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Edit Module - Module Editor Configuration -name: "edit-module" -description: "Edit existing BMAD modules (structure, agents, workflows, documentation) while following all best practices" -author: "BMad" - -# Critical variables load from config_source -config_source: "{project-root}/_bmad/bmb/config.yaml" -communication_language: "{config_source}:communication_language" -user_name: "{config_source}:user_name" - -# Required Data Files - Critical for understanding module conventions -module_structure_guide: "{project-root}/_bmad/bmb/workflows/create-module/module-structure.md" - -# Related workflow editors -agent_editor: "{project-root}/_bmad/bmb/workflows/edit-agent/workflow.yaml" -workflow_editor: "{project-root}/_bmad/bmb/workflows/edit-workflow/workflow.yaml" - -# Reference examples - for learning patterns -bmm_module_dir: "{project-root}/_bmad/bmm/" -bmb_module_dir: "{project-root}/_bmad/bmb/" -cis_module_dir: "{project-root}/_bmad/cis/" -existing_agents_dir: "{project-root}/_bmad/*/agents/" -existing_workflows_dir: "{project-root}/_bmad/*/workflows/" - -# Module path and component files -installed_path: "{project-root}/_bmad/bmb/workflows/edit-module" -template: false # This is an action workflow - no template needed -instructions: "{installed_path}/instructions.md" -validation: "{installed_path}/checklist.md" - -standalone: true - -# Web bundle configuration -web_bundle: false # BMB workflows run locally in BMAD-METHOD project diff --git a/src/modules/bmb/workflows-legacy/module-brief/README.md b/src/modules/bmb/workflows-legacy/module-brief/README.md deleted file mode 100644 index ccf6173c..00000000 --- a/src/modules/bmb/workflows-legacy/module-brief/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# Module Brief Workflow - -## Overview - -The Module Brief workflow creates comprehensive blueprints for building new BMAD modules using strategic analysis and creative vision. It serves as the essential planning phase that transforms initial ideas into detailed, actionable specifications ready for implementation with the create-module workflow. - -## Key Features - -- **Strategic Module Planning** - Comprehensive analysis from concept to implementation roadmap -- **Multi-Mode Operation** - Interactive, Express, and YOLO modes for different planning needs -- **Creative Vision Development** - Guided process for innovative module concepts and unique value propositions -- **Architecture Design** - Detailed agent and workflow ecosystem planning with interaction models -- **User Journey Mapping** - Scenario-based validation ensuring practical usability -- **Technical Planning** - Infrastructure requirements, dependencies, and complexity assessment -- **Risk Assessment** - Proactive identification of challenges with mitigation strategies -- **Implementation Roadmap** - Phased development plan with clear deliverables and timelines - -## Usage - -### Basic Invocation - -```bash -workflow module-brief -``` - -### With Brainstorming Input - -```bash -# If you have brainstorming results from previous sessions -workflow module-brief --input brainstorming-session-2024-09-26.md -``` - -### Express Mode - -```bash -# For quick essential planning only -workflow module-brief --mode express -``` - -### Configuration - -The workflow uses standard BMB configuration: - -- **output_folder**: Where the module brief will be saved -- **user_name**: Brief author information -- **communication_language**: Language for brief generation -- **date**: Automatic timestamp for versioning - -## Workflow Structure - -### Files Included - -``` -module-brief/ -├── workflow.yaml # Configuration and metadata -├── instructions.md # Step-by-step execution guide -├── template.md # Module brief document structure -├── checklist.md # Validation criteria -└── README.md # This file -``` - -## Workflow Process - -### Phase 1: Foundation and Context (Steps 1-3) - -**Mode Selection and Input Gathering** - -- Choose operational mode (Interactive, Express, YOLO) -- Check for and optionally load existing brainstorming results -- Gather background context and inspiration sources - -**Module Vision Development** - -- Define core problem the module solves -- Identify target user audience and use cases -- Establish unique value proposition and differentiators -- Explore creative themes and personality concepts - -**Module Identity Establishment** - -- Generate module code (kebab-case) with multiple options -- Create compelling, memorable module name -- Select appropriate category (Domain-Specific, Creative, Technical, Business, Personal) -- Define optional personality theme for consistent agent character - -### Phase 2: Architecture Planning (Steps 4-5) - -**Agent Architecture Design** - -- Plan agent team composition and roles -- Define agent archetypes (Orchestrator, Specialist, Helper, Creator, Analyzer) -- Specify personality traits and communication styles -- Map key capabilities and signature commands - -**Workflow Ecosystem Design** - -- Categorize workflows by purpose and complexity: - - **Core Workflows**: Essential value-delivery functions (2-3) - - **Feature Workflows**: Specialized capabilities (3-5) - - **Utility Workflows**: Supporting operations (1-3) -- Define input-process-output flows for each workflow -- Assess complexity levels and implementation priorities - -### Phase 3: Validation and User Experience (Steps 6-7) - -**User Journey Mapping** - -- Create detailed user scenarios and stories -- Map step-by-step usage flows through the module -- Validate end-to-end functionality and value delivery -- Identify potential friction points and optimization opportunities - -**Technical Planning and Requirements** - -- Assess data requirements and storage needs -- Map integration points with other modules and external systems -- Evaluate technical complexity and resource requirements -- Document dependencies and infrastructure needs - -### Phase 4: Success Planning (Steps 8-9) - -**Success Metrics Definition** - -- Establish module success criteria and performance indicators -- Define quality standards and reliability requirements -- Create user experience goals and feedback mechanisms -- Set measurable outcomes for module effectiveness - -**Development Roadmap Creation** - -- Design phased approach with MVP, Enhancement, and Polish phases -- Define deliverables and timelines for each phase -- Prioritize features and capabilities by value and complexity -- Create clear milestones and success checkpoints - -### Phase 5: Enhancement and Risk Management (Steps 10-12) - -**Creative Features and Special Touches** (Optional) - -- Design easter eggs and delightful user interactions -- Plan module lore and thematic consistency -- Add personality quirks and creative responses -- Develop backstories and universe building - -**Risk Assessment and Mitigation** - -- Identify technical, usability, and scope risks -- Develop mitigation strategies for each risk category -- Plan contingency approaches for potential challenges -- Document decision points and alternative paths - -**Final Review and Export Preparation** - -- Comprehensive review of all brief sections -- Validation against quality and completeness criteria -- Preparation for seamless handoff to create-module workflow -- Export readiness confirmation with actionable specifications - -## Output - -### Generated Files - -- **Module Brief Document**: Comprehensive planning document at `{output_folder}/module-brief-{module_code}-{date}.md` -- **Strategic Specifications**: Ready-to-implement blueprint for create-module workflow - -### Output Structure - -The module brief contains detailed specifications across multiple sections: - -1. **Executive Summary** - Vision, category, complexity, target users -2. **Module Identity** - Core concept, value proposition, personality theme -3. **Agent Architecture** - Agent roster, roles, interaction models -4. **Workflow Ecosystem** - Core, feature, and utility workflow specifications -5. **User Scenarios** - Primary use cases, secondary scenarios, user journey -6. **Technical Planning** - Data requirements, integrations, dependencies -7. **Success Metrics** - Success criteria, quality standards, performance targets -8. **Development Roadmap** - Phased implementation plan with deliverables -9. **Creative Features** - Special touches, easter eggs, module lore -10. **Risk Assessment** - Technical, usability, scope risks with mitigation -11. **Implementation Notes** - Priority order, design decisions, open questions -12. **Resources and References** - Inspiration sources, similar modules, technical references - -## Requirements - -- **Creative Vision** - Initial module concept or problem domain -- **Strategic Thinking** - Ability to plan architecture and user experience -- **Brainstorming Results** (optional) - Previous ideation sessions enhance planning quality - -## Best Practices - -### Before Starting - -1. **Gather Inspiration** - Research similar tools, modules, and solutions in your domain -2. **Run Brainstorming Session** - Use ideation techniques to generate initial concepts -3. **Define Success Criteria** - Know what "successful module" means for your context - -### During Execution - -1. **Think User-First** - Always consider the end user experience and value delivery -2. **Be Specific** - Provide concrete examples and detailed specifications rather than abstractions -3. **Validate Early** - Use user scenarios to test if the module concept actually works -4. **Plan Iteratively** - Start with MVP and build complexity through phases - -### After Completion - -1. **Use as Blueprint** - Feed the brief directly into create-module workflow for implementation -2. **Review with Stakeholders** - Validate assumptions and gather feedback before building -3. **Update as Needed** - Treat as living document that evolves with implementation learnings -4. **Reference During Development** - Use as north star for design decisions and scope management - -## Troubleshooting - -### Common Issues - -**Issue**: Stuck on module concept or vision - -- **Solution**: Use creative prompts provided in the workflow -- **Check**: Review existing modules for inspiration and patterns - -**Issue**: Agent or workflow architecture too complex - -- **Solution**: Focus on MVP first, plan enhancement phases for additional complexity -- **Check**: Validate each component against user scenarios - -**Issue**: Technical requirements unclear - -- **Solution**: Research similar modules and their implementation approaches -- **Check**: Consult with technical stakeholders early in planning - -**Issue**: Scope creep during planning - -- **Solution**: Use phased roadmap to defer non-essential features -- **Check**: Regularly validate against core user scenarios and success criteria - -## Customization - -To customize this workflow: - -1. **Modify Template Structure** - Update template.md to add new sections or reorganize content -2. **Extend Creative Prompts** - Add domain-specific ideation techniques in instructions.md -3. **Add Planning Tools** - Integrate additional analysis frameworks or planning methodologies -4. **Customize Validation** - Enhance checklist.md with specific quality criteria for your context - -## Version History - -- **v1.0.0** - Initial release - - Comprehensive strategic module planning - - Multi-mode operation (Interactive, Express, YOLO) - - Creative vision and architecture design tools - - User journey mapping and validation - - Risk assessment and mitigation planning - -## Support - -For issues or questions: - -- Review the workflow creation guide at `/_bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Study existing module examples in `/_bmad/` for patterns and inspiration -- Validate output using `checklist.md` -- Consult module structure guide at `create-module/module-structure.md` - ---- - -_Part of the BMad Method v6 - BMB (Builder) Module_ diff --git a/src/modules/bmb/workflows-legacy/module-brief/checklist.md b/src/modules/bmb/workflows-legacy/module-brief/checklist.md deleted file mode 100644 index 80c23962..00000000 --- a/src/modules/bmb/workflows-legacy/module-brief/checklist.md +++ /dev/null @@ -1,116 +0,0 @@ -# Module Brief Validation Checklist - -## Core Identity - -- [ ] Module code follows kebab-case convention -- [ ] Module name is clear and memorable -- [ ] Module category is identified -- [ ] Target users are clearly defined -- [ ] Unique value proposition is articulated - -## Vision and Concept - -- [ ] Problem being solved is clearly stated -- [ ] Solution approach is explained -- [ ] Module scope is well-defined -- [ ] Success criteria are measurable - -## Agent Architecture - -- [ ] At least one agent is defined -- [ ] Each agent has a clear role and purpose -- [ ] Agent personalities are defined (if using personality themes) -- [ ] Agent interactions are mapped (for multi-agent modules) -- [ ] Key commands for each agent are listed - -## Workflow Ecosystem - -- [ ] Core workflows (2-3) are identified -- [ ] Each workflow has clear purpose -- [ ] Workflow complexity is assessed -- [ ] Input/output for workflows is defined -- [ ] Workflow categories are logical - -## User Experience - -- [ ] Primary use case is documented -- [ ] User scenarios demonstrate value -- [ ] User journey is realistic -- [ ] Learning curve is considered -- [ ] User feedback mechanism planned - -## Technical Planning - -- [ ] Data requirements are identified -- [ ] Integration points are mapped -- [ ] Dependencies are listed -- [ ] Technical complexity is assessed -- [ ] Performance requirements stated - -## Development Roadmap - -- [ ] Phase 1 MVP is clearly scoped -- [ ] Phase 2 enhancements are outlined -- [ ] Phase 3 polish items listed -- [ ] Timeline estimates provided -- [ ] Deliverables are specific - -## Risk Management - -- [ ] Technical risks identified -- [ ] Usability risks considered -- [ ] Scope risks acknowledged -- [ ] Mitigation strategies provided -- [ ] Open questions documented - -## Creative Elements (Optional) - -- [ ] Personality theme is consistent (if used) -- [ ] Special features add value -- [ ] Module feels cohesive -- [ ] Fun elements don't compromise functionality - -## Documentation Quality - -- [ ] All sections have content (no empty placeholders) -- [ ] Writing is clear and concise -- [ ] Technical terms are explained -- [ ] Examples are provided where helpful -- [ ] Next steps are actionable - -## Implementation Readiness - -- [ ] Brief provides enough detail for create-module workflow -- [ ] Agent specifications sufficient for create-agent workflow -- [ ] Workflow descriptions ready for create-workflow -- [ ] Resource requirements are clear -- [ ] Success metrics are measurable - -## Final Validation - -- [ ] Module concept is viable -- [ ] Scope is achievable -- [ ] Value is clear -- [ ] Brief is complete -- [ ] Ready for development - -## Issues Found - -### Critical Issues - - - -### Recommendations - - - -### Nice-to-Haves - - - ---- - -**Validation Complete:** ⬜ Yes / ⬜ With Issues / ⬜ Needs Revision - -**Validated By:** {name} -**Date:** {date} diff --git a/src/modules/bmb/workflows-legacy/module-brief/instructions.md b/src/modules/bmb/workflows-legacy/module-brief/instructions.md deleted file mode 100644 index 1693c3c5..00000000 --- a/src/modules/bmb/workflows-legacy/module-brief/instructions.md +++ /dev/null @@ -1,268 +0,0 @@ -# Module Brief Instructions - -The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml -You MUST have already loaded and processed: {project-root}/_bmad/bmb/workflows/module-brief/workflow.yaml -Communicate in {communication_language} throughout the module brief creation process -⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever. - - - - -Ask the user which mode they prefer: -1. **Interactive Mode** - Work through each section collaboratively with detailed questions -2. **Express Mode** - Quick essential questions only -3. **YOLO Mode** (#yolo) - Generate complete draft based on minimal input - -Check for available inputs: - -- Brainstorming results from previous sessions -- Existing module ideas or notes -- Similar modules for inspiration - -If brainstorming results exist, offer to load and incorporate them - - - -Ask the user to describe their module idea. Probe for: -- What problem does this module solve? -- Who would use this module? -- What makes this module exciting or unique? -- Any inspiring examples or similar tools? - -If they're stuck, offer creative prompts: - -- "Imagine you're a [role], what tools would make your life easier?" -- "What repetitive tasks could be automated with agents?" -- "What domain expertise could be captured in workflows?" - -module_vision - - - -Based on the vision, work with user to define: - -**Module Code** (kebab-case): - -- Suggest 2-3 options based on their description -- Ensure it's memorable and descriptive - -**Module Name** (friendly): - -- Creative, engaging name that captures the essence - -**Module Category:** - -- Domain-Specific (legal, medical, finance) -- Creative (writing, gaming, music) -- Technical (devops, testing, architecture) -- Business (project management, marketing) -- Personal (productivity, learning) - -**Personality Theme** (optional but fun!): - -- Should the module have a consistent personality across agents? -- Star Trek crew? Fantasy party? Corporate team? Reality show cast? - -module_identity - - - -Help user envision their agent team - -For each agent, capture: - -- **Role**: What's their specialty? -- **Personality**: How do they communicate? (reference communication styles) -- **Key Capabilities**: What can they do? -- **Signature Commands**: 2-3 main commands - -Suggest agent archetypes based on module type: - -- The Orchestrator (manages other agents) -- The Specialist (deep expertise) -- The Helper (utility functions) -- The Creator (generates content) -- The Analyzer (processes and evaluates) - -agent_architecture - - - -Map out the workflow landscape - -Categorize workflows: - -**Core Workflows** (2-3 essential ones): - -- The primary value-delivery workflows -- What users will use most often - -**Feature Workflows** (3-5 specialized): - -- Specific capabilities -- Advanced features - -**Utility Workflows** (1-3 supporting): - -- Setup, configuration -- Maintenance, cleanup - -For each workflow, define: - -- Purpose (one sentence) -- Input → Process → Output -- Complexity (simple/standard/complex) - -workflow_ecosystem - - - -Create usage scenarios to validate the design - -Write 2-3 user stories: -"As a [user type], I want to [goal], so that [outcome]" - -Then walk through how they'd use the module: - -1. They load [agent] -2. They run [command/workflow] -3. They get [result] -4. This helps them [achievement] - -This validates the module makes sense end-to-end. - -user_scenarios - - - -Assess technical requirements: - -**Data Requirements:** - -- What data/files does the module need? -- Any external APIs or services? -- Storage or state management needs? - -**Integration Points:** - -- Other BMAD modules it might use -- External tools or platforms -- Import/export formats - -**Complexity Assessment:** - -- Simple (standalone, no dependencies) -- Standard (some integrations, moderate complexity) -- Complex (multiple systems, advanced features) - -technical_planning - - - -Define what success looks like: - -**Module Success Criteria:** - -- What indicates the module is working well? -- How will users measure value? -- What feedback mechanisms? - -**Quality Standards:** - -- Performance expectations -- Reliability requirements -- User experience goals - -success_metrics - - - -Create a phased approach: - -**Phase 1 - MVP (Minimum Viable Module):** - -- 1 primary agent -- 2-3 core workflows -- Basic functionality - -**Phase 2 - Enhancement:** - -- Additional agents -- More workflows -- Refined features - -**Phase 3 - Polish:** - -- Advanced features -- Optimizations -- Nice-to-haves - -development_roadmap - - - -If user wants to add special touches: - -**Easter Eggs:** - -- Hidden commands or responses -- Fun interactions between agents - -**Delighters:** - -- Unexpected helpful features -- Personality quirks -- Creative responses - -**Module Lore:** - -- Backstory for agents -- Thematic elements -- Consistent universe - -creative_features - - - -Identify potential challenges: - -**Technical Risks:** - -- Complex integrations -- Performance concerns -- Dependency issues - -**Usability Risks:** - -- Learning curve -- Complexity creep -- User confusion - -**Scope Risks:** - -- Feature bloat -- Timeline expansion -- Resource constraints - -For each risk, note mitigation strategy. - -risk_assessment - - - -Review all sections with {user_name} -Ensure module brief is ready for create-module workflow - -Would {user_name} like to: - -1. Proceed directly to create-module workflow -2. Save and refine later -3. Generate additional planning documents - - -Inform {user_name} in {communication_language} that this brief can be fed directly into create-module workflow - -final_brief - - - diff --git a/src/modules/bmb/workflows-legacy/module-brief/template.md b/src/modules/bmb/workflows-legacy/module-brief/template.md deleted file mode 100644 index 0738fe02..00000000 --- a/src/modules/bmb/workflows-legacy/module-brief/template.md +++ /dev/null @@ -1,275 +0,0 @@ -# Module Brief: {{module_name}} - -**Date:** {{date}} -**Author:** {{user_name}} -**Module Code:** {{module_code}} -**Status:** Ready for Development - ---- - -## Executive Summary - -{{module_vision}} - -**Module Category:** {{module_category}} -**Complexity Level:** {{complexity_level}} -**Target Users:** {{target_users}} - ---- - -## Module Identity - -### Core Concept - -{{module_identity}} - -### Unique Value Proposition - -What makes this module special: -{{unique_value}} - -### Personality Theme - -{{personality_theme}} - ---- - -## Agent Architecture - -{{agent_architecture}} - -### Agent Roster - -{{agent_roster}} - -### Agent Interaction Model - -How agents work together: -{{agent_interactions}} - ---- - -## Workflow Ecosystem - -{{workflow_ecosystem}} - -### Core Workflows - -Essential functionality that delivers primary value: -{{core_workflows}} - -### Feature Workflows - -Specialized capabilities that enhance the module: -{{feature_workflows}} - -### Utility Workflows - -Supporting operations and maintenance: -{{utility_workflows}} - ---- - -## User Scenarios - -### Primary Use Case - -{{primary_scenario}} - -### Secondary Use Cases - -{{secondary_scenarios}} - -### User Journey - -Step-by-step walkthrough of typical usage: -{{user_journey}} - ---- - -## Technical Planning - -### Data Requirements - -{{data_requirements}} - -### Integration Points - -{{integration_points}} - -### Dependencies - -{{dependencies}} - -### Technical Complexity Assessment - -{{technical_planning}} - ---- - -## Success Metrics - -### Module Success Criteria - -How we'll know the module is successful: -{{success_criteria}} - -### Quality Standards - -{{quality_standards}} - -### Performance Targets - -{{performance_targets}} - ---- - -## Development Roadmap - -### Phase 1: MVP (Minimum Viable Module) - -**Timeline:** {{phase1_timeline}} - -{{phase1_components}} - -**Deliverables:** -{{phase1_deliverables}} - -### Phase 2: Enhancement - -**Timeline:** {{phase2_timeline}} - -{{phase2_components}} - -**Deliverables:** -{{phase2_deliverables}} - -### Phase 3: Polish and Optimization - -**Timeline:** {{phase3_timeline}} - -{{phase3_components}} - -**Deliverables:** -{{phase3_deliverables}} - ---- - -## Creative Features - -### Special Touches - -{{creative_features}} - -### Easter Eggs and Delighters - -{{easter_eggs}} - -### Module Lore and Theming - -{{module_lore}} - ---- - -## Risk Assessment - -### Technical Risks - -{{technical_risks}} - -### Usability Risks - -{{usability_risks}} - -### Scope Risks - -{{scope_risks}} - -### Mitigation Strategies - -{{risk_mitigation}} - ---- - -## Implementation Notes - -### Priority Order - -1. {{priority_1}} -2. {{priority_2}} -3. {{priority_3}} - -### Key Design Decisions - -{{design_decisions}} - -### Open Questions - -{{open_questions}} - ---- - -## Resources and References - -### Inspiration Sources - -{{inspiration_sources}} - -### Similar Modules - -{{similar_modules}} - -### Technical References - -{{technical_references}} - ---- - -## Appendices - -### A. Detailed Agent Specifications - -{{detailed_agent_specs}} - -### B. Workflow Detailed Designs - -{{detailed_workflow_specs}} - -### C. Data Structures and Schemas - -{{data_schemas}} - -### D. Integration Specifications - -{{integration_specs}} - ---- - -## Next Steps - -1. **Review this brief** with stakeholders -2. **Run create-module workflow** using this brief as input -3. **Create first agent** using create-agent workflow -4. **Develop initial workflows** using create-workflow -5. **Test MVP** with target users - ---- - -_This Module Brief is ready to be fed directly into the create-module workflow for scaffolding and implementation._ - -**Module Viability Score:** {{viability_score}}/10 -**Estimated Development Effort:** {{effort_estimate}} -**Confidence Level:** {{confidence_level}} - ---- - -**Approval for Development:** - -- [ ] Concept Approved -- [ ] Scope Defined -- [ ] Resources Available -- [ ] Ready to Build - ---- - -_Generated on {{date}} by {{user_name}} using the BMAD Method Module Brief workflow_ diff --git a/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml b/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml deleted file mode 100644 index 772f6801..00000000 --- a/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Module Brief Workflow Configuration -name: module-brief -description: "Create a comprehensive Module Brief that serves as the blueprint for building new BMAD modules using strategic analysis and creative vision" -author: "BMad Builder" - -# Critical variables -config_source: "{project-root}/_bmad/bmb/config.yaml" -output_folder: "{config_source}:output_folder" -user_name: "{config_source}:user_name" -communication_language: "{config_source}:communication_language" -date: system-generated - -# Reference examples and documentation -existing_modules_dir: "{project-root}/_bmad/" -module_structure_guide: "{project-root}/_bmad/bmb/workflows/create-module/module-structure.md" - -# Optional user inputs - discovered if they exist -input_file_patterns: - brainstorming: - description: "Brainstorming session outputs (optional)" - whole: "{output_folder}/brainstorming-*.md" - load_strategy: "FULL_LOAD" - -# Module path and component files -installed_path: "{project-root}/_bmad/bmb/workflows/module-brief" -template: "{installed_path}/template.md" -instructions: "{installed_path}/instructions.md" -validation: "{installed_path}/checklist.md" - -# Output configuration -default_output_file: "{output_folder}/module-brief-{{module_code}}-{{date}}.md" - -standalone: true - -# Web bundle configuration -web_bundle: false # BMB workflows run locally in BMAD-METHOD project diff --git a/src/modules/bmb/workflows/agent/data/critical-actions.md b/src/modules/bmb/workflows/agent/data/critical-actions.md index ddb99eb1..5b8de8e6 100644 --- a/src/modules/bmb/workflows/agent/data/critical-actions.md +++ b/src/modules/bmb/workflows/agent/data/critical-actions.md @@ -31,8 +31,8 @@ critical_actions: **CRITICAL Path Format:** - `{project-root}` = literal text (not replaced) -- Sidecar copied to `_memory/` at build time -- Use `{project-root}/_bmad/_memory/{sidecar-folder}/` format +- Sidecar created next to agent.yaml during BUILD, then copied to `_memory/` during BMAD INSTALLATION +- Use `{project-root}/_bmad/_memory/{sidecar-folder}/` format for RUNTIME paths in agent YAML --- diff --git a/src/modules/bmb/workflows/agent/data/expert-agent-architecture.md b/src/modules/bmb/workflows/agent/data/expert-agent-architecture.md index b442a0e6..936b4022 100644 --- a/src/modules/bmb/workflows/agent/data/expert-agent-architecture.md +++ b/src/modules/bmb/workflows/agent/data/expert-agent-architecture.md @@ -39,7 +39,7 @@ Agents with a sidecar folder for persistent memory, custom workflows, and restri ## CRITICAL: Sidecar Path Format -At build/install, sidecar is copied to `{project-root}/_bmad/_memory/{sidecar-folder}/` +During BMAD INSTALLATION, sidecar folder is copied from the agent location to `{project-root}/_bmad/_memory/{sidecar-folder}/` **ALL agent YAML references MUST use:** diff --git a/src/modules/bmb/workflows/agent/steps-c/step-03-type-metadata.md b/src/modules/bmb/workflows/agent/steps-c/step-03-type-metadata.md index b9ddd416..c0da3974 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-03-type-metadata.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-03-type-metadata.md @@ -1,5 +1,5 @@ --- -name: 'step-02-type-metadata' +name: 'step-03-type-metadata' description: 'Determine agent type and define metadata' # File References @@ -27,7 +27,7 @@ Determine the agent's classification (Simple/Expert/Module) and define all manda # MANDATORY EXECUTION RULES ## Universal Rules -- ALWAYS use `{agent-language}` for all conversational text +- ALWAYS use `{communication_language}` for all conversational text - MAINTAIN step boundaries - complete THIS step only - DOCUMENT all decisions to agent plan file - HONOR user's creative control throughout @@ -136,7 +136,7 @@ Read and internalize: - Keep examples accessible for reference ## 2. Purpose Discovery Conversation -Engage user with questions in `{agent-language}`: +Engage user with questions in `{communication_language}`: - "What is the primary function this agent will perform?" - "How complex are the tasks this agent will handle?" - "Will this agent need to manage workflows or other agents?" diff --git a/src/modules/bmb/workflows/agent/steps-c/step-04-persona.md b/src/modules/bmb/workflows/agent/steps-c/step-04-persona.md index 0e45d060..4e88a030 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-04-persona.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-04-persona.md @@ -1,5 +1,5 @@ --- -name: 'step-03-persona' +name: 'step-04-persona' description: 'Shape the agent personality through four-field persona system' # File References diff --git a/src/modules/bmb/workflows/agent/steps-c/step-05-commands-menu.md b/src/modules/bmb/workflows/agent/steps-c/step-05-commands-menu.md index 7d4c8c81..78629503 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-05-commands-menu.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-05-commands-menu.md @@ -1,5 +1,5 @@ --- -name: 'step-04-commands-menu' +name: 'step-05-commands-menu' description: 'Build capabilities and command structure' # File References diff --git a/src/modules/bmb/workflows/agent/steps-c/step-06-activation.md b/src/modules/bmb/workflows/agent/steps-c/step-06-activation.md index 864b7d54..001d83ad 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-06-activation.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-06-activation.md @@ -1,5 +1,5 @@ --- -name: 'step-05-activation' +name: 'step-06-activation' description: 'Plan activation behavior and route to build' # File References @@ -30,7 +30,7 @@ Define activation behavior through critical_actions and route to the appropriate - These are non-negotiable prerequisites 2. **MUST Determine Route Before Activation Discussion** - - Check hasSidecar from plan metadata + - Check `module` and `hasSidecar` from plan metadata - Determine destination build step FIRST - Inform user of routing decision @@ -41,10 +41,12 @@ Define activation behavior through critical_actions and route to the appropriate 4. **MUST Follow Routing Logic Exactly** ```yaml - # Route determination based on hasSidecar and module - hasSidecar: false → step-06-build-simple.md - hasSidecar: true + module: "stand-alone" → step-06-build-expert.md - hasSidecar: true + module: ≠ "stand-alone" → step-06-build-module.md + # Route determination based on module and hasSidecar + # Module agents: any module value other than "stand-alone" + module ≠ "stand-alone" → step-07c-build-module.md + # Stand-alone agents: determined by hasSidecar + module = "stand-alone" + hasSidecar: true → step-07b-build-expert.md + module = "stand-alone" + hasSidecar: false → step-07a-build-simple.md ``` 5. **NEVER Skip Documentation** diff --git a/src/modules/bmb/workflows/agent/steps-c/step-07a-build-simple.md b/src/modules/bmb/workflows/agent/steps-c/step-07a-build-simple.md index 5957a67e..c76cef4f 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-07a-build-simple.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-07a-build-simple.md @@ -1,9 +1,9 @@ --- -name: 'step-06-build-simple' +name: 'step-07a-build-simple' description: 'Generate Simple agent YAML from plan' # File References -nextStepFile: './step-08a-plan-traceability.md' +nextStepFile: './step-08-celebrate.md' agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md' agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}.agent.yaml' @@ -143,7 +143,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont ### 6. Route Based on User Choice **If user chooses "one-at-a-time":** -- Proceed to `nextStepFile` (step-07a-plan-traceability.md) +- Proceed to `nextStepFile` (step-08-celebrate.md) - Continue through each validation step sequentially - Allow review between each validation @@ -155,7 +155,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont ## CRITICAL STEP COMPLETION NOTE -ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and begin validation. +ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and celebrate completion. ## SUCCESS METRICS diff --git a/src/modules/bmb/workflows/agent/steps-c/step-07b-build-expert.md b/src/modules/bmb/workflows/agent/steps-c/step-07b-build-expert.md index fe8df2e0..a0c16005 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-07b-build-expert.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-07b-build-expert.md @@ -3,7 +3,7 @@ name: 'step-06-build-expert' description: 'Generate Expert agent YAML with sidecar from plan' # File References -nextStepFile: './step-08a-plan-traceability.md' +nextStepFile: './step-08-celebrate.md' agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md' agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}/' agentYamlOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' @@ -21,12 +21,12 @@ partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' # STEP GOAL -Assemble the agent plan content into a complete Expert agent YAML file with sidecar folder structure. Expert agents require persistent memory storage for specialized operations, accessed via `{project-root}/_bmad/_memory/{sidecar-folder}/` paths in critical_actions. +Assemble the agent plan content into a complete Expert agent YAML file with sidecar folder structure. Expert agents require persistent memory storage, so the build creates a sidecar folder next to the agent.yaml (which gets installed to `_bmad/_memory/` during BMAD installation). ## MANDATORY EXECUTION RULES -1. **EXPERT AGENT = SIDECAR REQUIRED**: Every Expert agent MUST have a sidecar folder created under `_bmad/_memory/` -2. **CRITICAL_ACTIONS FORMAT**: All critical_actions MUST use `{project-root}/_bmad/_memory/{sidecar-folder}/` for file operations +1. **EXPERT AGENT = SIDECAR REQUIRED**: Every Expert agent MUST have a sidecar folder created next to agent.yaml (build location), which will be installed to `_bmad/_memory/` during BMAD installation +2. **CRITICAL_ACTIONS FORMAT**: All critical_actions MUST use `{project-root}/_bmad/_memory/{sidecar-folder}/` for file operations (runtime path) 3. **TEMPLATE COMPLIANCE**: Follow expert-agent-template.md structure exactly 4. **YAML VALIDATION**: Ensure valid YAML syntax with proper indentation (2-space) 5. **EXISTING CHECK**: If agentYamlOutput exists, ask user before overwriting @@ -55,8 +55,6 @@ Using expertTemplate as structure: ```yaml name: '{agent-name}' description: '{short-description}' -type: 'expert' -version: '1.0.0' author: name: '{author}' @@ -109,19 +107,20 @@ metadata: ### Phase 4: Create Sidecar Structure -1. **Create Sidecar Directory**: - - Path: `{project-root}/_bmad/_memory/{sidecar-folder}/` +1. **Create Sidecar Directory** (NEXT TO agent.yaml): + - Path: `{agentBuildOutput}/{agent-name}-sidecar/` - Use `mkdir -p` to create full path + - Note: This folder gets installed to `_bmad/_memory/` during BMAD installation 2. **Create Starter Files** (if specified in critical_actions): ```bash - touch _bmad/_memory/{sidecar-folder}/{file1}.md - touch _bmad/_memory/{sidecar-folder}/{file2}.md + touch {agentBuildOutput}/{agent-name}-sidecar/{file1}.md + touch {agentBuildOutput}/{agent-name}-sidecar/{file2}.md ``` 3. **Add README to Sidecar**: ```markdown - # {sidecar-folder} Memory + # {sidecar-folder} Sidecar This folder stores persistent memory for the **{agent-name}** Expert agent. @@ -132,8 +131,9 @@ metadata: - {file1}.md: {description} - {file2}.md: {description} - ## Access Pattern - Agent accesses these files via: `{project-root}/_bmad/_memory/{sidecar-folder}/{filename}.md` + ## Runtime Access + After BMAD installation, this folder will be accessible at: + `{project-root}/_bmad/_memory/{sidecar-folder}/{filename}.md` ``` ### Phase 5: Write Agent YAML @@ -171,11 +171,11 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont ## CRITICAL STEP COMPLETION NOTE -ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and begin validation. +ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and celebrate completion. This step produces TWO artifacts: 1. **Agent YAML**: Complete expert agent definition at `{agentYamlOutput}` -2. **Sidecar Structure**: Folder and files at `{project-root}/_bmad/_memory/{sidecar-folder}/` +2. **Sidecar Structure**: Folder and files at `{agentBuildOutput}/{agent-name}-sidecar/` (build location, installs to `_bmad/_memory/` during BMAD installation) Both must exist before proceeding to validation. @@ -184,7 +184,7 @@ Both must exist before proceeding to validation. ✅ Agent YAML file created at expected location ✅ Valid YAML syntax (no parse errors) ✅ All template fields populated -✅ Sidecar folder created under `_bmad/_memory/` +✅ Sidecar folder created at `{agentBuildOutput}/{agent-name}-sidecar/` (build location) ✅ Sidecar folder contains starter files from critical_actions ✅ critical_actions reference `{project-root}/_bmad/_memory/{sidecar-folder}/` paths ✅ metadata.sidecar-folder populated diff --git a/src/modules/bmb/workflows/agent/steps-c/step-07c-build-module.md b/src/modules/bmb/workflows/agent/steps-c/step-07c-build-module.md index baab0380..eb246b0e 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-07c-build-module.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-07c-build-module.md @@ -3,7 +3,7 @@ name: 'step-06-build-module' description: 'Generate Module agent YAML from plan' # File References -nextStepFile: './step-08a-plan-traceability.md' +nextStepFile: './step-08-celebrate.md' agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md' agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}/' agentYamlOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' @@ -205,7 +205,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont # CRITICAL STEP COMPLETION NOTE -ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and begin validation. +ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully `{nextStepFile}` to execute and celebrate completion. **THIS STEP IS COMPLETE WHEN:** 1. Module agent YAML file exists at agentYamlOutput path diff --git a/src/modules/bmb/workflows/agent/steps-c/step-09-celebrate.md b/src/modules/bmb/workflows/agent/steps-c/step-08-celebrate.md similarity index 89% rename from src/modules/bmb/workflows/agent/steps-c/step-09-celebrate.md rename to src/modules/bmb/workflows/agent/steps-c/step-08-celebrate.md index 25541e72..51b898cd 100644 --- a/src/modules/bmb/workflows/agent/steps-c/step-09-celebrate.md +++ b/src/modules/bmb/workflows/agent/steps-c/step-08-celebrate.md @@ -1,9 +1,9 @@ --- -name: 'step-09-celebrate' +name: 'step-08-celebrate' description: 'Celebrate completion and guide next steps for using the agent' # File References -thisStepFile: ./step-09-celebrate.md +thisStepFile: ./step-08-celebrate.md workflowFile: ../workflow.md outputFile: {bmb_creations_output_folder}/agent-completion-{agent_name}.md @@ -11,9 +11,10 @@ outputFile: {bmb_creations_output_folder}/agent-completion-{agent_name}.md advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' installationDocs: 'https://github.com/bmad-code-org/BMAD-METHOD/blob/main/docs/modules/bmb-bmad-builder/custom-content-installation.md#standalone-content-agents-workflows-tasks-tools-templates-prompts' +validationWorkflow: '{project-root}/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md' --- -# Step 9: Celebration and Installation Guidance +# Step 8: Celebration and Installation Guidance ## STEP GOAL: @@ -198,25 +199,27 @@ Save this content to `{outputFile}` for reference. ### 7. Present MENU OPTIONS -Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [X] Exit Workflow" +Display: "**✅ Agent Build Complete! Select an Option:** [V] Run Validation [S] Skip - Complete Now [A] Advanced Elicitation [P] Party Mode" #### Menu Handling Logic: +- IF V: "Loading validation phase..." → Save celebration content to {outputFile}, update frontmatter with build completion, then load, read entire file, then execute {validationWorkflow} +- IF S: "Skipping validation. Completing workflow..." → Save content to {outputFile}, update frontmatter with workflow completion, then end workflow gracefully - IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu - IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF X: Save content to {outputFile}, update frontmatter with workflow completion, then end workflow gracefully - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options) #### EXECUTION RULES: - ALWAYS halt and wait for user input after presenting menu -- ONLY complete workflow when user selects 'X' -- After other menu items execution, return to this menu +- User can choose validation (V), skip to complete (S), or use advanced elicitation (A) or party mode (P) +- After other menu items execution (A/P), return to this menu - User can chat or ask questions - always respond and then end with display again of the menu options ## CRITICAL STEP COMPLETION NOTE -ONLY WHEN [X exit option] is selected and [workflow completion marked in frontmatter], will the workflow end gracefully with agent ready for installation. +ONLY WHEN [S skip option] is selected and [workflow completion marked in frontmatter], will the workflow end gracefully with agent ready for installation. +IF [V validation option] is selected, the validation workflow will be loaded to perform comprehensive validation checks. --- diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08a-plan-traceability.md b/src/modules/bmb/workflows/agent/steps-c/step-08a-plan-traceability.md deleted file mode 100644 index 15c98272..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08a-plan-traceability.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -name: 'step-07a-plan-traceability' -description: 'Verify build matches original plan' - -# File References -nextStepFile: './step-08b-metadata-validation.md' -agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md' -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# STEP GOAL -Verify that the built agent YAML file contains all elements specified in the original agent plan. This step ensures plan traceability - confirming that what we planned is what we actually built. - -# MANDATORY EXECUTION RULES -- MUST load both agentPlan and builtYaml files before comparison -- MUST compare ALL planned elements against built implementation -- MUST report specific missing items, not just "something is missing" -- MUST offer fix option before proceeding to next validation -- MUST handle missing files gracefully (report clearly, don't crash) -- MUST respect YOLO mode behavior (part of combined validation report) - -# EXECUTION PROTOCOLS - -## File Loading Protocol -1. Load agentPlan from `{bmb_creations_output_folder}/agent-plan-{agent_name}.md` -2. Load builtYaml from `{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml` -3. If either file is missing, report the specific missing file and stop comparison -4. Use Read tool to access both files with absolute paths - -## Comparison Protocol -Compare the following categories systematically: - -### 1. Metadata Comparison -- Agent name -- Description -- Version -- Author/creator information -- Location/module path -- Language settings (if specified in plan) - -### 2. Persona Field Comparison -For each field in persona section: -- Check presence in built YAML -- Verify field content matches planned intent -- Note any significant deviations (minor wording differences ok) - -### 3. Commands Comparison -- Verify all planned commands are present -- Check command names match -- Verify command descriptions are present -- Confirm critical actions are referenced - -### 4. Critical Actions Comparison -- Verify all planned critical_actions are present -- Check action names match exactly -- Verify action descriptions are present -- Confirm each action has required fields - -### 5. Additional Elements -- Dependencies (if planned) -- Configuration (if planned) -- Installation instructions (if planned) - -## Reporting Protocol -Present findings in clear, structured format: - -``` -PLAN TRACEABILITY REPORT -======================== - -Agent: {agent_name} -Plan File: {path to agent plan} -Build File: {path to built YAML} - -COMPARISON RESULTS: -------------------- - -✅ Metadata: All present / Missing: {list} -✅ Persona Fields: All present / Missing: {list} -✅ Commands: All present / Missing: {list} -✅ Critical Actions: All present / Missing: {list} -✅ Other Elements: All present / Missing: {list} - -OVERALL STATUS: [PASS / FAIL] - -``` - -If ANY elements are missing: -- List each missing element with category -- Provide specific location reference (what was planned) -- Ask if user wants to fix items or continue anyway - -## Menu Protocol - -### 8. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -#### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} for identified missing elements, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to next validation step, 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) - -#### 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 - -If YOLO mode: -- Include this report in combined validation report -- Auto-select [C] Continue if all elements present -- Auto-select [F] Fix if missing critical elements (name, commands) -- Flag non-critical missing items in summary - -# CONTEXT BOUNDARIES -- ONLY compare plan vs build - do NOT evaluate quality or correctness -- Do NOT suggest improvements or changes beyond planned elements -- Do NOT re-open persona/commands discovery - this is verification only -- Fix option should return to step-06-build, not earlier steps -- If plan file is ambiguous, note ambiguity but use reasonable interpretation - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -## 1. Load Required Files -```yaml -action: read -target: - - agentPlan - - builtYaml -on_failure: report which file is missing and suggest resolution -``` - -## 2. Perform Structured Comparison -```yaml -action: compare -categories: - - metadata - - persona_fields - - commands - - critical_actions - - other_elements -method: systematic category-by-category check -``` - -## 3. Generate Comparison Report -```yaml -action: report -format: structured pass/fail with specific missing items -output: console display + optional save to validation log -``` - -## 4. Present Menu Options -```yaml -action: menu -options: - - F: Fix missing items - - C: Continue to metadata validation - - V: View detailed comparison (optional) -default: C if pass, F if fail -``` - -## 5. Handle User Choice -- **[F] Fix Findings**: Apply auto-fixes to {builtYaml} for identified missing elements, then re-present menu -- **[C] Continue**: Proceed to step-07b-metadata-validation -- **[A] Advanced Elicitation**: Execute advanced elicitation workflow, then re-present menu -- **[P] Party Mode**: Execute party mode workflow, then re-present menu - -## CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFile}` to execute and begin [metadata validation]. - -# SUCCESS/FAILURE METRICS - -## Success Criteria -- All planned elements present in built YAML: **COMPLETE PASS** -- Minor deviations (wording, formatting) but all core elements present: **PASS** -- Missing elements identified and user chooses to continue: **PASS WITH NOTED DEFICIENCIES** - -## Failure Criteria -- Unable to load plan or build file: **BLOCKING FAILURE** -- Critical elements missing (name, commands, or critical_actions): **FAIL** -- Comparison cannot be completed due to file corruption: **BLOCKING FAILURE** - -## Next Step Triggers -- **PASS → step-07b-metadata-validation** -- **PASS WITH DEFICIENCIES → step-07b-metadata-validation** (user choice) -- **FAIL → step-06-build** (with specific fix instructions) -- **BLOCKING FAILURE → STOP** (resolve file access issues first) - -## YOLO Mode Behavior -- Auto-fix missing critical elements by returning to build step -- Log non-critical missing items for review but continue validation -- Include traceability report in final YOLO summary -- Do NOT stop for user confirmation unless plan file is completely missing diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08b-metadata-validation.md b/src/modules/bmb/workflows/agent/steps-c/step-08b-metadata-validation.md deleted file mode 100644 index a52fc41b..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08b-metadata-validation.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -name: 'step-07b-metadata-validation' -description: 'Validate agent metadata properties' - -# File References -nextStepFile: './step-08c-persona-validation.md' -agentMetadata: ../data/agent-metadata.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# STEP GOAL - -Validate that the agent's metadata properties (name, description, version, tags, category, etc.) are properly formatted, complete, and follow BMAD standards. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All metadata fields must be verified -- **ALWAYS load both reference documents** - agentMetadata.md AND the builtYaml -- **NEVER modify files without user approval** - Report findings first, await menu selection -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** This is a validation step, not an editing step - -## EXECUTION PROTOCOLS - -### Protocol 1: Load and Compare -1. Read the metadata validation reference from `{agentMetadata}` -2. Read the built agent YAML from `{builtYaml}` -3. Extract the metadata section from the builtYaml -4. Compare actual metadata against validation rules - -### Protocol 2: Validation Checks -Perform these checks systematically: - -1. **Required Fields Existence** - - [ ] name: Present and non-empty - - [ ] description: Present and non-empty - - [ ] category: Present and matches valid category - - [ ] tags: Present as array, not empty - -2. **Format Validation** - - [ ] name: Uses kebab-case, no spaces - - [ ] description: 50-200 characters (unless intentionally brief) - - [ ] tags: Array of lowercase strings with hyphens - - [ ] category: Matches one of the allowed categories - -3. **Content Quality** - - [ ] description: Clear and concise, explains what the agent does - - [ ] tags: Relevant to agent's purpose (3-7 tags recommended) - - [ ] category: Most appropriate classification - -4. **Standards Compliance** - - [ ] No prohibited characters in fields - - [ ] No redundant or conflicting information - - [ ] Consistent formatting with other agents - -### Protocol 3: Report Findings -Organize your report into three sections: - -**PASSING CHECKS** (List what passed) -``` -✓ Required fields present -✓ Name follows kebab-case convention -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Description is brief (45 chars, recommended 50-200) -⚠ Only 2 tags provided, 3-7 recommended -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Category "custom-type" not in allowed list -``` - -### Protocol 4: Menu System - -#### 5. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -#### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} for identified issues, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to next validation step, 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) - -#### 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 - -## CONTEXT BOUNDARIES - -**IN SCOPE:** -- Metadata section of agent.yaml (name, description, version, tags, category, author, license, etc.) -- Referencing the agentMetadata.md validation rules -- Comparing against BMAD standards - -**OUT OF SCOPE:** -- Persona fields (handled in step-07c) -- Menu items (handled in step-07d) -- System architecture (handled in step-07e) -- Capability implementation (handled in step-07f) - -**DO NOT:** -- Validate persona properties in this step -- Suggest major feature additions -- Question the agent's core purpose -- Modify fields beyond metadata - -## CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFile}` to execute and begin [persona validation]. - -## SUCCESS METRICS - -✓ **Complete Success:** All checks pass, no failures, warnings are optional -✓ **Partial Success:** Failures fixed via [F] option, warnings acknowledged -✓ **Failure:** Blocking failures remain when user selects [C] - -**CRITICAL:** Never proceed to next step if blocking failures exist and user hasn't acknowledged them. diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08c-persona-validation.md b/src/modules/bmb/workflows/agent/steps-c/step-08c-persona-validation.md deleted file mode 100644 index 7b21c4f1..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08c-persona-validation.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -name: 'step-07c-persona-validation' -description: 'Validate persona fields and principles' - -# File References -nextStepFile: './step-08d-menu-validation.md' -personaProperties: ../data/persona-properties.md -principlesCrafting: ../data/principles-crafting.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# STEP GOAL - -Validate that the agent's persona (role, tone, expertise, principles, constraints) is well-defined, consistent, and aligned with its purpose. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All persona fields must be verified -- **ALWAYS load both reference documents** - personaProperties.md AND principlesCrafting.md -- **NEVER modify files without user approval** - Report findings first, await menu selection -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** This is a validation step, not an editing step - -## EXECUTION PROTOCOLS - -### Protocol 1: Load and Compare -1. Read the persona validation reference from `{personaProperties}` -2. Read the principles crafting guide from `{principlesCrafting}` -3. Read the built agent YAML from `{builtYaml}` -4. Extract the persona section from the builtYaml -5. Compare actual persona against validation rules - -### Protocol 2: Validation Checks -Perform these checks systematically: - -1. **Required Fields Existence** - - [ ] role: Present, clear, and specific - - [ ] tone: Present and appropriate to role - - [ ] expertise: Present and relevant to agent's purpose - - [ ] principles: Present as array, not empty (if applicable) - - [ ] constraints: Present as array, not empty (if applicable) - -2. **Content Quality - Role** - - [ ] Role is specific (not generic like "assistant") - - [ ] Role aligns with agent's purpose and menu items - - [ ] Role is achievable within LLM capabilities - - [ ] Role scope is appropriate (not too broad/narrow) - -3. **Content Quality - Tone** - - [ ] Tone is clearly defined (professional, friendly, authoritative, etc.) - - [ ] Tone matches the role and target users - - [ ] Tone is consistent throughout the definition - - [ ] Tone examples or guidance provided if nuanced - -4. **Content Quality - Expertise** - - [ ] Expertise areas are relevant to role - - [ ] Expertise claims are realistic for LLM - - [ ] Expertise domains are specific (not just "knowledgeable") - - [ ] Expertise supports the menu capabilities - -5. **Content Quality - Principles** - - [ ] Principles are actionable (not vague platitudes) - - [ ] Principles guide behavior and decisions - - [ ] Principles are consistent with role - - [ ] 3-7 principles recommended (not overwhelming) - - [ ] Each principle is clear and specific - -6. **Content Quality - Constraints** - - [ ] Constraints define boundaries clearly - - [ ] Constraints are enforceable (measurable/observable) - - [ ] Constraints prevent undesirable behaviors - - [ ] Constraints don't contradict principles - -7. **Consistency Checks** - - [ ] Role, tone, expertise, principles all align - - [ ] No contradictions between principles and constraints - - [ ] Persona supports the menu items defined - - [ ] Language and terminology consistent - -### Protocol 3: Report Findings -Organize your report into three sections: - -**PASSING CHECKS** (List what passed) -``` -✓ Role is specific and well-defined -✓ Tone clearly articulated and appropriate -✓ Expertise aligns with agent purpose -✓ Principles are actionable and clear -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Only 2 principles provided, 3-7 recommended for richer guidance -⚠ No constraints defined - consider adding boundaries -⚠ Expertise areas are broad, could be more specific -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Role is generic ("assistant") - needs specificity -✗ Tone undefined - creates inconsistent behavior -✗ Principles are vague ("be helpful" - not actionable) -✗ Contradiction: Principle says "be creative", constraint says "follow strict rules" -``` - -### Protocol 4: Menu System - -#### 5. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -#### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} for identified issues, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to next validation step, 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) - -#### 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 - -## CONTEXT BOUNDARIES - -**IN SCOPE:** -- Persona section of agent.yaml (role, tone, expertise, principles, constraints) -- Referencing personaProperties.md and principlesCrafting.md -- Evaluating persona clarity, specificity, and consistency -- Checking alignment between persona elements - -**OUT OF SCOPE:** -- Metadata fields (handled in step-07b) -- Menu items (handled in step-07d) -- System architecture (handled in step-07e) -- Technical implementation details - -**DO NOT:** -- Validate metadata properties in this step -- Question the agent's core purpose (that's for earlier steps) -- Suggest additional menu items -- Modify fields beyond persona - -## CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFile}` to execute and begin [menu validation]. - -## SUCCESS METRICS - -✓ **Complete Success:** All checks pass, persona is well-defined and consistent -✓ **Partial Success:** Failures fixed via [F] option, warnings acknowledged -✓ **Failure:** Blocking failures remain when user selects [C] - -**CRITICAL:** A weak or generic persona is a blocking issue that should be fixed before proceeding. diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08d-menu-validation.md b/src/modules/bmb/workflows/agent/steps-c/step-08d-menu-validation.md deleted file mode 100644 index 0284cea9..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08d-menu-validation.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: 'step-07d-menu-validation' -description: 'Validate menu items and patterns' - -# File References -nextStepFile: './step-08e-structure-validation.md' -agentMenuPatterns: ../data/agent-menu-patterns.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# STEP GOAL - -Validate that the agent's menu (commands/tools) follows BMAD patterns, is well-structured, properly documented, and aligns with the agent's persona and purpose. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All menu items must be verified -- **ALWAYS load the reference document** - agentMenuPatterns.md -- **NEVER modify files without user approval** - Report findings first, await menu selection -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** This is a validation step, not an editing step - -## EXECUTION PROTOCOLS - -### Protocol 1: Load and Compare -1. Read the menu patterns reference from `{agentMenuPatterns}` -2. Read the built agent YAML from `{builtYaml}` -3. Extract the menu/commands section from the builtYaml -4. Compare actual menu against validation rules - -### Protocol 2: Validation Checks -Perform these checks systematically: - -1. **Menu Structure** - - [ ] Menu section exists and is properly formatted - - [ ] At least one menu item defined (unless intentionally tool-less) - - [ ] Menu items follow proper YAML structure - - [ ] Each item has required fields (name, description, pattern) - -2. **Menu Item Requirements** - For each menu item: - - [ ] name: Present, unique, uses kebab-case - - [ ] description: Clear and concise - - [ ] pattern: Valid regex pattern or tool reference - - [ ] scope: Appropriate scope defined (if applicable) - -3. **Pattern Quality** - - [ ] Patterns are valid and testable - - [ ] Patterns are specific enough to match intended inputs - - [ ] Patterns are not overly restrictive - - [ ] Patterns use appropriate regex syntax - -4. **Description Quality** - - [ ] Each item has clear description - - [ ] Descriptions explain what the item does - - [ ] Descriptions are consistent in style - - [ ] Descriptions help users understand when to use - -5. **Alignment Checks** - - [ ] Menu items align with agent's role/purpose - - [ ] Menu items are supported by agent's expertise - - [ ] Menu items fit within agent's constraints - - [ ] Menu items are appropriate for target users - -6. **Completeness** - - [ ] Core capabilities for this role are covered - - [ ] No obvious missing functionality - - [ ] Menu scope is appropriate (not too sparse/overloaded) - - [ ] Related functionality is grouped logically - -7. **Standards Compliance** - - [ ] No prohibited patterns or commands - - [ ] No security vulnerabilities in patterns - - [ ] No ambiguous or conflicting items - - [ ] Consistent naming conventions - -8. **Menu Link Validation (Agent Type Specific)** - - [ ] Determine agent type: Simple (no sidecar), Expert (hasSidecar: true), or Module agent - - [ ] For Expert agents (hasSidecar: true): - - Menu handlers SHOULD reference external sidecar files (e.g., `./{agent-name}-sidecar/...`) - - OR have inline prompts defined directly in the handler - - [ ] For Module agents (module property is a code like 'bmm', 'bmb', etc.): - - Menu handlers SHOULD reference external module files under the module path - - Exec paths must start with `{project-root}/_bmad/{module}/...` - - Referenced files must exist under the module directory - - [ ] For Simple agents (stand-alone module, no sidecar): - - Menu handlers MUST NOT have external file links - - Menu handlers SHOULD only use relative links within the same file (e.g., `#section-name`) - - OR have inline prompts defined directly in the handler - -### Protocol 3: Report Findings -Organize your report into three sections: - -**PASSING CHECKS** (List what passed) -``` -✓ Menu structure properly formatted -✓ 5 menu items defined, all with required fields -✓ All patterns are valid regex -✓ Menu items align with agent role -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Item "analyze-data" description is vague -⚠ No menu item for [common capability X] -⚠ Pattern for "custom-command" very broad, may over-match -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Duplicate menu item name: "process" appears twice -✗ Invalid regex pattern: "[unclosed bracket" -✗ Menu item "system-admin" violates security guidelines -✗ No menu items defined for agent type that requires tools -✗ Simple agent has external link in menu handler (should be relative # or inline) -✗ Expert agent with sidecar has no external file links or inline prompts defined -✗ Module agent exec path doesn't start with {project-root}/_bmad/{module}/... -``` - -### Protocol 4: Menu System - -#### 5. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -#### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} for identified issues, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to next validation step, 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) - -#### 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 - -## CONTEXT BOUNDARIES - -**IN SCOPE:** -- Menu/commands section of agent.yaml -- Referencing agentMenuPatterns.md -- Menu structure, patterns, and alignment -- Individual menu item validation - -**OUT OF SCOPE:** -- Metadata fields (handled in step-07b) -- Persona fields (handled in step-07c) -- System architecture (handled in step-07e) -- Workflow/capability implementation (handled in step-07f) - -**DO NOT:** -- Validate metadata or persona in this step -- Suggest entirely new capabilities (that's for earlier steps) -- Question whether menu items are "good enough" qualitatively beyond standards -- Modify fields beyond menu - -## CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFile}` to execute and begin [structure validation]. - -## SUCCESS METRICS - -✓ **Complete Success:** All checks pass, menu is well-structured and aligned -✓ **Partial Success:** Failures fixed via [F] option, warnings acknowledged -✓ **Failure:** Blocking failures remain when user selects [C] - -**CRITICAL:** Invalid regex patterns or security vulnerabilities in menu items are blocking issues. diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08e-structure-validation.md b/src/modules/bmb/workflows/agent/steps-c/step-08e-structure-validation.md deleted file mode 100644 index 94ff4d45..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08e-structure-validation.md +++ /dev/null @@ -1,308 +0,0 @@ ---- -name: 'step-07e-structure-validation' -description: 'Validate YAML structure and completeness' - -# File References -# Routes to 8F if Expert, else to 9 -nextStepFileExpert: './step-08f-sidecar-validation.md' -nextStepFileSimple: './step-09-celebrate.md' -simpleValidation: ../data/simple-agent-validation.md -expertValidation: ../data/expert-agent-validation.md -agentCompilation: ../data/agent-compilation.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# STEP GOAL - -Validate the built agent YAML file for structural completeness and correctness against the appropriate validation checklist (simple or expert), then route to sidecar validation if needed or proceed to celebration. - -# MANDATORY EXECUTION RULES - -1. **NEVER skip validation** - All agents must pass structural validation before completion -2. **ALWAYS use the correct validation checklist** based on agent type (simple vs expert) -3. **NEVER auto-fix without user consent** - Report issues and ask for permission -4. **ALWAYS check hasSidecar flag** before determining next step routing -5. **MUST load and parse the actual built YAML** - Not just show it, but validate it -6. **ALWAYS provide clear, actionable feedback** for any validation failures - -# EXECUTION PROTOCOLS - -## Context Awareness - -- User is in the final validation phase -- Agent has been built and written to disk -- This is the "quality gate" before completion -- User expects thorough but fair validation -- Route depends on agent type (expert vs simple) - -## User Expectations - -- Clear validation results with specific issues identified -- Line-number references for YAML problems -- Option to fix issues or continue (if minor) -- Logical routing based on agent type -- Professional, constructive feedback tone - -## Tone and Style - -- Professional and thorough -- Constructive, not pedantic -- Clear prioritization of issues (critical vs optional) -- Encouraging when validation passes -- Actionable when issues are found - -# CONTEXT BOUNDARIES - -## What to Validate - -- YAML syntax and structure -- Required frontmatter fields presence -- Required sections completeness -- Field format correctness -- Path validity (for references) -- Agent type consistency (simple vs expert requirements) - -## What NOT to Validate - -- Artistic choices in descriptions -- Persona writing style -- Command naming creativity -- Feature scope decisions - -## When to Escalate - -- Critical structural errors that break agent loading -- Missing required fields -- YAML syntax errors preventing file parsing -- Path references that don't exist - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -## 1. Load Validation Context - -```bash -# Load the appropriate validation checklist based on agent type -if agentType == "expert": - validationFile = expertValidation -else: - validationFile = simpleValidation - -# Load the built agent YAML -builtAgent = read(builtYaml) - -# Load compilation rules for reference -compilationRules = read(agentCompilation) -``` - -**Action:** Present a brief status message: -``` -🔍 LOADING VALIDATION FRAMEWORK - Agent Type: {detected type} - Validation Standard: {simple|expert} - Built File: {builtYaml path} -``` - -## 2. Execute Structural Validation - -Run systematic checks against the validation checklist: - -### A. YAML Syntax Validation -- Parse YAML without errors -- Check indentation consistency -- Validate proper escaping of special characters -- Verify no duplicate keys - -### B. Frontmatter Validation -- All required fields present -- Field values correct type (string, boolean, array) -- No empty required fields -- Proper array formatting - -### C. Section Completeness -- All required sections present (based on agent type) -- Sections not empty unless explicitly optional -- Proper markdown heading hierarchy - -### D. Field-Level Validation -- Path references exist and are valid -- Boolean fields are actual booleans (not strings) -- Array fields properly formatted -- No malformed YAML structures - -### E. Agent Type Specific Checks - -**For Simple Agents:** -- No sidecar requirements -- Basic fields complete -- No advanced configuration - -**For Expert Agents:** -- Sidecar flag set correctly -- Sidecar folder path specified -- All expert fields present -- Advanced features properly configured - -## 3. Generate Validation Report - -Present findings in structured format: - -```markdown -# 🎯 STRUCTURAL VALIDATION REPORT - -## Agent: {agent-name} -Type: {simple|expert} -File: {builtYaml} - ---- - -## ✅ PASSED CHECKS ({count}) -{List of all validations that passed} - -## ⚠️ ISSUES FOUND ({count}) -{If any issues, list each with:} -### Issue #{number}: {type} -**Severity:** [CRITICAL|MODERATE|MINOR] -**Location:** Line {line} or Section {section} -**Problem:** {clear description} -**Impact:** {what this breaks} -**Suggested Fix:** {specific action} - ---- - -## 📊 VALIDATION SUMMARY -**Overall Status:** [PASSED|FAILED|CONDITIONAL] -**Critical Issues:** {count} -**Moderate Issues:** {count} -**Minor Issues:** {count} -**Can Load Safely:** [YES|NO] - ---- - -{If PASSED} -## 🎉 VALIDATION SUCCESSFUL -Your agent YAML is structurally sound and ready for use! -All required fields present and correctly formatted. - -{If ISSUES FOUND} -## 🔧 RECOMMENDED ACTIONS -1. Address critical issues first -2. Review moderate issues -3. Minor issues can be deferred -``` - -## 4. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} for identified issues, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to next validation step, update frontmatter, then only then load, read entire file, then execute {nextStepFileExpert} or {nextStepFileSimple} -- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#4-present-menu-options) - -### EXECUTION RULES: - -- ALWAYS halt and wait for user input after presenting menu -- ONLY proceed to next step when user selects 'C' -- After other menu items execution, return to this menu -- User can chat or ask questions - always respond and then end with display again of the menu options - -If [F] selected: Work through issues systematically -- Load specific section needing fix -- Present current state -- Apply auto-fixes or guide user through corrections -- Re-validate after each fix -- Confirm resolution and re-present menu - -If [C] selected: -- Warn about implications if issues exist -- Get explicit confirmation if critical issues -- Document acceptance of issues -- Proceed to routing - -## 5. Route to Next Step - -After validation passes or user chooses to continue: - -### Check Agent Type and Route - -```yaml -# Check for sidecar requirement -hasSidecar = checkBuiltYamlForSidecarFlag() - -if hasSidecar == true: - # Expert agent with sidecar - nextStep = nextStepFileExpert - routeMessage = """ - 📦 Expert agent detected with sidecar configuration. - → Proceeding to sidecar validation (Step 7F) - """ -else: - # Simple agent or expert without sidecar - nextStep = nextStepFileSimple - routeMessage = """ - ✅ Simple agent validation complete. - → Proceeding to celebration (Step 8) - """ -``` - -**Action:** Present routing decision and transition: -```markdown -# 🚀 VALIDATION COMPLETE - ROUTING DECISION - -{routeMessage} - -**Next Step:** {nextStep filename} -**Reason:** Agent type {simple|expert} with sidecar={hasSidecar} - -Press [Enter] to continue to {next step description}... -``` - -# CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFileExpert}` or `{nextStepFileSimple}` to execute and begin [sidecar validation or celebration]. - -**BEFORE proceeding to next step:** - -1. ✅ Validation checklist executed completely -2. ✅ All critical issues resolved or explicitly accepted -3. ✅ User informed of routing decision -4. ✅ Next step file path determined correctly -5. ⚠️ **CRITICAL:** For expert agents, verify hasSidecar is TRUE before routing to 7F -6. ⚠️ **CRITICAL:** For simple agents, verify hasSidecar is FALSE before routing to 8 - -**DO NOT PROCEED IF:** -- YAML has critical syntax errors preventing loading -- User has not acknowledged validation results -- Routing logic is unclear or conflicting - -# SUCCESS METRICS - -## Step Complete When: -- [ ] Validation report generated and presented -- [ ] User has reviewed findings -- [ ] Critical issues resolved or accepted -- [ ] Routing decision communicated and confirmed -- [ ] Next step path verified and ready - -## Quality Indicators: -- Validation thoroughness (all checklist items covered) -- Issue identification clarity and specificity -- User satisfaction with resolution process -- Correct routing logic applied -- Clear transition to next step - -## Failure Modes: -- Skipping validation checks -- Auto-fixing without permission -- Incorrect routing (simple→7F or expert→8 with sidecar) -- Unclear or missing validation report -- Proceeding with critical YAML errors diff --git a/src/modules/bmb/workflows/agent/steps-c/step-08f-sidecar-validation.md b/src/modules/bmb/workflows/agent/steps-c/step-08f-sidecar-validation.md deleted file mode 100644 index 30ab330c..00000000 --- a/src/modules/bmb/workflows/agent/steps-c/step-08f-sidecar-validation.md +++ /dev/null @@ -1,464 +0,0 @@ ---- -name: 'step-07f-sidecar-validation' -description: 'Validate sidecar structure and paths' - -# File References -nextStepFile: './step-09-celebrate.md' -criticalActions: ../data/critical-actions.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' -sidecarFolder: '{bmb_creations_output_folder}/{agent-name}/{agent-name}-sidecar/' - -# Task References -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- -# STEP GOAL - -Validate the sidecar folder structure and referenced paths for Expert agents to ensure all sidecar files exist, are properly structured, and paths in the main agent YAML correctly reference them. - -# MANDATORY EXECUTION RULES - -1. **ONLY runs for Expert agents** - Simple agents should never reach this step -2. **MUST verify sidecar folder exists** before proceeding -3. **ALWAYS cross-reference YAML paths** with actual files -4. **NEVER create missing sidecar files** - Report issues, don't auto-fix -5. **MUST validate sidecar file structure** for completeness -6. **ALWAYS check critical actions file** if referenced -7. **PROVIDE clear remediation steps** for any missing or malformed files - -# EXECUTION PROTOCOLS - -## Context Awareness - -- User has an Expert agent with sidecar configuration -- Structural validation (7E) already passed -- Sidecar folder should have been created during build -- This is the final validation before celebration -- Missing sidecar components may break agent functionality - -## User Expectations - -- Comprehensive sidecar structure validation -- Clear identification of missing files -- Path reference verification -- Actionable remediation guidance -- Professional but approachable tone - -## Tone and Style - -- Thorough and systematic -- Clear and specific about issues -- Solution-oriented (focus on how to fix) -- Encouraging when sidecar is complete -- Not pedantic about minor formatting issues - -# CONTEXT BOUNDARIES - -## What to Validate - -- Sidecar folder existence and location -- All referenced files exist in sidecar -- Sidecar file structure completeness -- Path references in main YAML accuracy -- Critical actions file if referenced -- File naming conventions -- File content completeness (not empty) - -## What NOT to Validate - -- Content quality of sidecar files -- Artistic choices in sidecar documentation -- Optional sidecar components -- File formatting preferences - -## When to Escalate - -- Sidecar folder completely missing -- Critical files missing (actions, core modules) -- Path references pointing to non-existent files -- Empty sidecar files that should have content - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -## 1. Load Sidecar Context - -```bash -# Verify main agent YAML exists -agentYaml = read(builtYaml) - -# Extract sidecar path from YAML or use template default -sidecarPath = extractSidecarPath(agentYaml) or sidecarFolder - -# Check if sidecar folder exists -sidecarExists = directoryExists(sidecarPath) - -# Load critical actions reference if needed -criticalActionsRef = read(criticalActions) -``` - -**Action:** Present discovery status: -```markdown -🔍 SIDECAR VALIDATION INITIALIZED - -Agent: {agent-name} -Type: Expert (requires sidecar) - -Main YAML: {builtYaml} -Sidecar Path: {sidecarPath} - -Status: {✅ Folder Found | ❌ Folder Missing} -``` - -## 2. Validate Sidecar Structure - -### A. Folder Existence Check - -```markdown -## 📁 FOLDER STRUCTURE VALIDATION - -**Sidecar Location:** {sidecarPath} -**Status:** [EXISTS | MISSING | WRONG LOCATION] -``` - -If missing: -```markdown -❌ **CRITICAL ISSUE:** Sidecar folder not found! - -**Expected Location:** {sidecarPath} - -**Possible Causes:** -1. Build process didn't create sidecar -2. Sidecar path misconfigured in agent YAML -3. Folder moved or deleted after build - -**Required Action:** -[ ] Re-run build process with sidecar enabled -[ ] Verify sidecar configuration in agent YAML -[ ] Check folder was created in correct location -``` - -### B. Sidecar File Inventory - -If folder exists, list all files: -```bash -sidecarFiles = listFiles(sidecarPath) -``` - -```markdown -## 📄 SIDECAR FILE INVENTORY - -Found {count} files in sidecar: - -{For each file:} -- {filename} ({size} bytes) -``` - -### C. Cross-Reference Validation - -Extract all sidecar path references from agent YAML: -```yaml -# Common sidecar reference patterns -sidecar: - critical-actions: './{agent-name}-sidecar/critical-actions.md' - modules: - - path: './{agent-name}-sidecar/modules/module-01.md' -``` - -Validate each reference: -```markdown -## 🔗 PATH REFERENCE VALIDATION - -**Checked {count} references from agent YAML:** - -{For each reference:} -**Source:** {field in agent YAML} -**Expected Path:** {referenced path} -**Status:** [✅ Found | ❌ Missing | ⚠️ Wrong Location] -``` - -## 3. Validate Sidecar File Contents - -For each sidecar file found, check: - -### A. File Completeness -```markdown -## 📋 FILE CONTENT VALIDATION - -{For each file:} -### {filename} -**Size:** {bytes} -**Status:** [✅ Complete | ⚠️ Empty | ❌ Too Small] -**Last Modified:** {timestamp} -``` - -### B. Critical Actions File (if present) - -Special validation for critical-actions.md: -```markdown -## 🎯 CRITICAL ACTIONS VALIDATION - -**File:** {sidecarPath}/critical-actions.md -**Status:** [PRESENT | MISSING | EMPTY] - -{If Present:} -**Sections Found:** -{List sections detected} - -**Completeness:** -[ ] Header/metadata present -[ ] Actions defined -[ ] No critical sections missing -``` - -### C. Module Files (if present) - -If sidecar contains modules: -```markdown -## 📚 MODULE VALIDATION - -**Modules Found:** {count} - -{For each module:} -### {module-filename} -**Status:** [✅ Valid | ⚠️ Issues Found] -**Checks:** -[ ] Frontmatter complete -[ ] Content present -[ ] References valid -``` - -## 4. Generate Validation Report - -```markdown -# 🎯 SIDECAR VALIDATION REPORT - -## Agent: {agent-name} -Sidecar Path: {sidecarPath} -Validation Date: {timestamp} - ---- - -## ✅ VALIDATION CHECKS PASSED - -**Folder Structure:** -- [x] Sidecar folder exists -- [x] Located at expected path -- [x] Accessible and readable - -**File Completeness:** -- [x] All referenced files present -- [x] No broken path references -- [x] Files have content (not empty) - -**Content Quality:** -- [x] Critical actions complete -- [x] Module files structured -- [x] No obvious corruption - ---- - -## ⚠️ ISSUES IDENTIFIED ({count}) - -{If issues:} -### Issue #{number}: {issue type} -**Severity:** [CRITICAL|MODERATE|MINOR] -**Component:** {file or folder} -**Problem:** {clear description} -**Impact:** {what this breaks} -**Remediation:** -1. {specific step 1} -2. {specific step 2} -3. {specific step 3} - -{If no issues:} -### 🎉 NO ISSUES FOUND -Your agent's sidecar is complete and properly structured! -All path references are valid and files are in place. - ---- - -## 📊 SUMMARY - -**Overall Status:** [PASSED|FAILED|CONDITIONAL] -**Files Validated:** {count} -**Issues Found:** {count} -**Critical Issues:** {count} -**Sidecar Ready:** [YES|NO] - ---- - -## 5. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [F] Fix Findings [P] Party Mode [C] Continue" - -### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF F: Apply auto-fixes to {builtYaml} or sidecar files for identified issues, then redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Proceed to celebration step, 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) - -### 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 - -## 6. Issue Resolution (if [F] selected) - -Work through each issue systematically: - -**For Missing Files:** -```markdown -### 🔧 FIXING: Missing {filename} - -**Required File:** {path} -**Purpose:** {why it's needed} - -**Option 1:** Re-run Build -- Sidecar may not have been created completely -- Return to build step and re-execute - -**Option 2:** Manual Creation -- Create file at: {full path} -- Use template from: {template reference} -- Minimum required content: {specification} - -**Option 3:** Update References -- Remove reference from agent YAML if not truly needed -- Update path if file exists in different location - -Which option? [1/2/3]: -``` - -**For Broken Path References:** -```markdown -### 🔧 FIXING: Invalid Path Reference - -**Reference Location:** {agent YAML field} -**Current Path:** {incorrect path} -**Expected File:** {filename} -**Actual Location:** {where file actually is} - -**Fix Options:** -1. Update path in agent YAML to: {correct path} -2. Move file to expected location: {expected path} -3. Remove reference if file not needed - -Which option? [1/2/3]: -``` - -**For Empty/Malformed Files:** -```markdown -### 🔧 FIXING: {filename} - {Issue} - -**Problem:** {empty/too small/malformed} -**Location:** {full path} - -**Remediation:** -- View current content -- Compare to template/standard -- Add missing sections -- Correct formatting - -Ready to view and fix? [Y/N]: -``` - -After each fix: -- Re-validate the specific component -- Confirm resolution -- Move to next issue -- Final re-validation when all complete - -## 6. Route to Celebration - -When validation passes or user chooses to continue: - -```markdown -# 🚀 SIDECAR VALIDATION COMPLETE - -## Expert Agent: {agent-name} - -✅ **Sidecar Structure:** Validated -✅ **Path References:** All correct -✅ **File Contents:** Complete - ---- - -## 🎯 READY FOR CELEBRATION - -Your Expert agent with sidecar is fully validated and ready! - -**Next Step:** Celebration (Step 8) -**Final Status:** All checks passed - -Press [Enter] to proceed to celebration... -``` - -# CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation complete with any findings addressed], will you then load and read fully `{nextStepFile}` to execute and begin [celebration]. - -**BEFORE proceeding to Step 8:** - -1. ✅ Sidecar folder exists and is accessible -2. ✅ All referenced files present -3. ✅ Path references validated -4. ✅ File contents checked for completeness -5. ✅ User informed of validation status -6. ✅ Issues resolved or explicitly accepted -7. ⚠️ **CRITICAL:** Only Expert agents should reach this step -8. ⚠️ **CRITICAL:** Sidecar must be complete for agent to function - -**DO NOT PROCEED IF:** -- Sidecar folder completely missing -- Critical files absent (actions, core modules) -- User unaware of sidecar issues -- Validation not completed - -# SUCCESS METRICS - -## Step Complete When: -- [ ] Sidecar folder validated -- [ ] All path references checked -- [ ] File contents verified -- [ ] Validation report presented -- [ ] Issues resolved or accepted -- [ ] User ready to proceed - -## Quality Indicators: -- Thoroughness of file inventory -- Accuracy of path reference validation -- Clarity of issue identification -- Actionability of remediation steps -- User confidence in sidecar completeness - -## Failure Modes: -- Missing sidecar folder completely -- Skipping file existence checks -- Not validating path references -- Proceeding with critical files missing -- Unclear validation report -- Not providing remediation guidance - ---- - -## 🎓 NOTE: Expert Agent Sidecars - -Sidecars are what make Expert agents powerful. They enable: -- Modular architecture -- Separation of concerns -- Easier updates and maintenance -- Shared components across agents - -A validated sidecar ensures your Expert agent will: -- Load correctly at runtime -- Find all referenced resources -- Execute critical actions as defined -- Provide the advanced capabilities designed - -Take the time to validate thoroughly - it pays off in agent reliability! diff --git a/src/modules/bmb/workflows/agent/steps-e/e-01-load-existing.md b/src/modules/bmb/workflows/agent/steps-e/e-01-load-existing.md index ae4b4227..15444a2c 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-01-load-existing.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-01-load-existing.md @@ -88,9 +88,8 @@ If a module agent also hasSidecar: true - this means it is a modules expert agen # Basic Metadata - name: {agent-name} - description: {agent-description} -- type: {simple|expert|module} +- module: {stand-alone|bmm|cis|bmgd|custom} - hasSidecar: {true|false} -- version: {version} # Persona - persona: {full persona text} @@ -113,7 +112,7 @@ If a module agent also hasSidecar: true - this means it is a modules expert agen ```markdown ## Agent Analysis: {agent-name} -**Type:** {simple|expert|module} +**Type:** {simple|expert|module} (derived from module + hasSidecar) **Status:** ready-for-edit ### Current Structure: diff --git a/src/modules/bmb/workflows/agent/steps-e/e-07-activation.md b/src/modules/bmb/workflows/agent/steps-e/e-07-activation.md index 71b0b1d9..c731d00c 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-07-activation.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-07-activation.md @@ -58,12 +58,13 @@ If user wants to add/modify critical_actions: ### 3. Determine Routing -Check `{editPlan}` metadataEdits.typeConversion.to or current agentType: +Check `{editPlan}` for agent metadata (module and hasSidecar): ```yaml -agentType: simple → route to e-08a-edit-simple.md -agentType: expert → route to e-08b-edit-expert.md -agentType: module → route to e-08c-edit-module.md +# Determine agent type from module + hasSidecar combination +module ≠ "stand-alone" → route to e-08c-edit-module.md +module = "stand-alone" + hasSidecar: true → route to e-08b-edit-expert.md +module = "stand-alone" + hasSidecar: false → route to e-08a-edit-simple.md ``` ### 4. Document to Edit Plan @@ -77,7 +78,7 @@ activationEdits: modifications: [] routing: destinationEdit: {e-08a|e-08b|e-08c} - targetType: {simple|expert|module} + sourceType: {simple|expert|module} # Derived from module + hasSidecar ``` ### 5. Present MENU OPTIONS @@ -88,7 +89,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont - IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu - IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF C: Save to {editPlan}, determine routing based on targetType, then only then load and execute the appropriate type-specific edit step +- IF C: Save to {editPlan}, determine routing based on module + hasSidecar, then only then load and execute the appropriate type-specific edit step - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options) #### EXECUTION RULES: @@ -101,9 +102,9 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont This is the **ROUTING HUB** for edit flow. ONLY WHEN [C continue option] is selected and [routing determined], load and execute the appropriate type-specific edit step: -- targetType: simple → e-08a-edit-simple.md -- targetType: expert → e-08b-edit-expert.md -- targetType: module → e-08c-edit-module.md +- module ≠ "stand-alone" → e-08c-edit-module.md (Module agent) +- module = "stand-alone" + hasSidecar: true → e-08b-edit-expert.md (Expert agent) +- module = "stand-alone" + hasSidecar: false → e-08a-edit-simple.md (Simple agent) --- diff --git a/src/modules/bmb/workflows/agent/steps-e/e-08a-edit-simple.md b/src/modules/bmb/workflows/agent/steps-e/e-08a-edit-simple.md index c7e66868..6b0ac608 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-08a-edit-simple.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-08a-edit-simple.md @@ -2,7 +2,7 @@ name: 'e-08a-edit-simple' description: 'Apply edits to Simple agent' -nextStepFile: './e-09a-validate-metadata.md' +nextStepFile: './e-09-celebrate.md' editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' agentFile: '{original-agent-path}' agentBackup: '{original-agent-path}.backup' @@ -76,9 +76,10 @@ Confirm: "Backup created at: `{agentBackup}`" For each planned edit: -**Type Conversion:** -- Update `type:` field if converting -- Add/remove type-specific fields +**Type Conversion (Simple ← Expert/Module):** +- Converting TO Simple: Remove `metadata.sidecar-folder`, remove all sidecar references +- Set `module: stand-alone` and `hasSidecar: false` +- Remove type-specific fields from source type **Metadata Edits:** - Apply each field change from metadataEdits diff --git a/src/modules/bmb/workflows/agent/steps-e/e-08b-edit-expert.md b/src/modules/bmb/workflows/agent/steps-e/e-08b-edit-expert.md index 662a1f2f..2888b16a 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-08b-edit-expert.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-08b-edit-expert.md @@ -2,7 +2,7 @@ name: 'e-08b-edit-expert' description: 'Apply edits to Expert agent' -nextStepFile: './e-09a-validate-metadata.md' +nextStepFile: './e-09-celebrate.md' editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' agentFile: '{original-agent-path}' agentBackup: '{original-agent-path}.backup' @@ -72,10 +72,10 @@ ALWAYS backup before editing: ### 4. Apply Edits in Sequence -**Type Conversion to Expert:** -- Update `type: expert` +**Type Conversion TO Expert:** +- Set `module: stand-alone` and `hasSidecar: true` - Add `metadata.sidecar-folder` if not present -- Create sidecar directory: `mkdir -p {project-root}/_bmad/_memory/{sidecar-folder}/` +- Create sidecar directory next to agent.yaml: `{agent-folder}/{agent-name}-sidecar/` **Sidecar Management:** - If changing sidecar-folder: update all critical_actions references diff --git a/src/modules/bmb/workflows/agent/steps-e/e-08c-edit-module.md b/src/modules/bmb/workflows/agent/steps-e/e-08c-edit-module.md index 25317322..87f1ef48 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-08c-edit-module.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-08c-edit-module.md @@ -2,7 +2,7 @@ name: 'e-08c-edit-module' description: 'Apply edits to Module agent' -nextStepFile: './e-09a-validate-metadata.md' +nextStepFile: './e-09-celebrate.md' editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' agentFile: '{original-agent-path}' agentBackup: '{original-agent-path}.backup' @@ -72,9 +72,10 @@ ALWAYS backup before editing: ### 4. Apply Edits in Sequence -**Type Conversion to Module:** -- Update `type: module` +**Type Conversion TO Module:** +- Set `module` to module code (e.g., `bmm`, `cis`, `bmgd`, or custom) - Add workflow integration paths +- Optionally set `hasSidecar: true` if complex multi-workflow module **Workflow Path Management:** - Add: `skills: - workflow: {path}` diff --git a/src/modules/bmb/workflows/agent/steps-e/e-10-celebrate.md b/src/modules/bmb/workflows/agent/steps-e/e-09-celebrate.md similarity index 81% rename from src/modules/bmb/workflows/agent/steps-e/e-10-celebrate.md rename to src/modules/bmb/workflows/agent/steps-e/e-09-celebrate.md index 0ef0b983..e7e935cd 100644 --- a/src/modules/bmb/workflows/agent/steps-e/e-10-celebrate.md +++ b/src/modules/bmb/workflows/agent/steps-e/e-09-celebrate.md @@ -1,14 +1,15 @@ --- -name: 'e-10-celebrate' +name: 'e-09-celebrate' description: 'Celebrate successful agent edit completion' editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' +validationWorkflow: '{project-root}/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md' --- -# Edit Step 10: Celebration +# Edit Step 9: Celebration ## STEP GOAL: @@ -112,24 +113,26 @@ Append to editPlan: ### 6. Present MENU OPTIONS -Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [X] Exit Workflow" +Display: "**✅ Agent Edit Complete! Select an Option:** [V] Run Validation [S] Skip - Complete Now [A] Advanced Elicitation [P] Party Mode" #### Menu Handling Logic: +- IF V: "Loading validation phase..." → Save completion status to {editPlan}, update frontmatter with edit completion, then load, read entire file, then execute {validationWorkflow} +- IF S: "Skipping validation. Completing workflow..." → Save completion status to {editPlan} and end workflow gracefully - IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu - IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF X: Save completion status to {editPlan} and end workflow gracefully - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options) #### EXECUTION RULES: - ALWAYS halt and wait for user input after presenting menu -- ONLY complete workflow when user selects 'X' -- After other menu items execution, return to this menu +- User can choose validation (V), skip to complete (S), or use advanced elicitation (A) or party mode (P) +- After other menu items execution (A/P), return to this menu ## CRITICAL STEP COMPLETION NOTE -ONLY WHEN [X exit option] is selected and [completion documented], will the workflow end gracefully with agent edit complete. +ONLY WHEN [S skip option] is selected and [completion documented], will the workflow end gracefully with agent edit complete. +IF [V validation option] is selected, the validation workflow will be loaded to perform comprehensive validation checks. --- diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09a-validate-metadata.md b/src/modules/bmb/workflows/agent/steps-e/e-09a-validate-metadata.md deleted file mode 100644 index bf7bd6eb..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09a-validate-metadata.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -name: 'e-09a-validate-metadata' -description: 'Validate metadata (after edit) - no menu, auto-advance' - -nextStepFile: './e-09b-validate-persona.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' -agentMetadata: ../data/agent-metadata.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9a: Validate Metadata (After Edit) - -## STEP GOAL - -Validate that the agent's metadata properties (id, name, title, icon, module, hasSidecar, etc.) are properly formatted, complete, and follow BMAD standards as defined in agentMetadata.md. Record findings to editPlan and auto-advance. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All metadata fields must be verified -- **ALWAYS load both reference documents** - agentMetadata.md AND the builtYaml -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** Load and validate EVERYTHING specified in the agentMetadata.md file -- **🚫 NO MENU in this step** - record findings and auto-advance -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. -1. Read the metadata validation reference from `{agentMetadata}` -2. Read the built agent YAML from `{builtYaml}` -3. Read the edit plan from `{editPlan}` -4. Extract the metadata section from the builtYaml -5. Compare actual metadata against ALL validation rules in agentMetadata.md - -### Protocol 2: Validation Checks - -Perform these checks systematically - validate EVERY rule specified in agentMetadata.md: - -1. **Required Fields Existence** - - [ ] id: Present and non-empty - - [ ] name: Present and non-empty (display name) - - [ ] title: Present and non-empty - - [ ] icon: Present (emoji or symbol) - - [ ] module: Present and valid format - - [ ] hasSidecar: Present (boolean, if applicable) - -2. **Format Validation** - - [ ] id: Uses kebab-case, no spaces, unique identifier - - [ ] name: Clear display name for UI - - [ ] title: Concise functional description - - [ ] icon: Appropriate emoji or unicode symbol - - [ ] module: Either a 3-4 letter module code (e.g., 'bmm', 'bmb') OR 'stand-alone' - - [ ] hasSidecar: Boolean value, matches actual agent structure - -3. **Content Quality** - - [ ] id: Unique and descriptive - - [ ] name: Clear and user-friendly - - [ ] title: Accurately describes agent's function - - [ ] icon: Visually representative of agent's purpose - - [ ] module: Correctly identifies module membership - - [ ] hasSidecar: Correctly indicates if agent uses sidecar files - -4. **Agent Type Consistency** - - [ ] If hasSidecar: true, sidecar folder path must be specified - - [ ] If module is a module code, agent is a module agent - - [ ] If module is 'stand-alone', agent is not part of a module - - [ ] No conflicting type indicators - -5. **Standards Compliance** - - [ ] No prohibited characters in fields - - [ ] No redundant or conflicting information - - [ ] Consistent formatting with other agents - - [ ] All required BMAD metadata fields present - -### Protocol 3: Record Findings - -Organize findings into three sections and append to editPlan frontmatter under `validationAfter.metadata`: - -```yaml -validationAfter: - metadata: - status: [pass|fail|warning] - passing: - - "{check description}" - - "{check description}" - warnings: - - "{non-blocking issue}" - failures: - - "{blocking issue that must be fixed}" -``` - -**PASSING CHECKS** (List what passed) -``` -✓ All required fields present -✓ id follows kebab-case convention -✓ module value is valid -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Description is brief -⚠ Only 2 tags provided, 3-7 recommended -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ id field is empty -✗ module value is invalid -✗ hasSidecar is true but no sidecar-folder specified -``` - -### Protocol 4: Auto-Advance - -**🚫 NO MENU PRESENTED** - After recording findings, immediately load and execute `{nextStepFile}` - ---- - -**Auto-advancing to persona validation...** - -## SUCCESS METRICS - -✅ All metadata checks from agentMetadata.md performed -✅ All checks validated against the actual builtYaml -✅ Findings saved to editPlan with detailed status -✅ Auto-advanced to next step diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09b-validate-persona.md b/src/modules/bmb/workflows/agent/steps-e/e-09b-validate-persona.md deleted file mode 100644 index 531f434a..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09b-validate-persona.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -name: 'e-09b-validate-persona' -description: 'Validate persona (after edit) - no menu, auto-advance' - -nextStepFile: './e-09c-validate-menu.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' -personaProperties: ../data/persona-properties.md -principlesCrafting: ../data/principles-crafting.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9b: Validate Persona (After Edit) - -## STEP GOAL - -Validate that the agent's persona (role, identity, communication_style, principles) is well-defined, consistent, and aligned with its purpose as defined in personaProperties.md and principlesCrafting.md. Record findings to editPlan and auto-advance. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All persona fields must be verified -- **ALWAYS load both reference documents** - personaProperties.md AND principlesCrafting.md -- **ALWAYS load the builtYaml** for actual persona content validation -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** Load and validate EVERYTHING specified in the personaProperties.md file -- **🚫 NO MENU in this step** - record findings and auto-advance -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. -1. Read the persona validation reference from `{personaProperties}` -2. Read the principles crafting guide from `{principlesCrafting}` -3. Read the built agent YAML from `{builtYaml}` -4. Read the edit plan from `{editPlan}` -5. Extract the persona section from the builtYaml -6. Compare actual persona against ALL validation rules - -### Protocol 2: Validation Checks - -Perform these checks systematically - validate EVERY rule specified in personaProperties.md: - -1. **Required Fields Existence** - - [ ] role: Present, clear, and specific - - [ ] identity: Present and defines who the agent is - - [ ] communication_style: Present and appropriate to role - - [ ] principles: Present as array, not empty (if applicable) - -2. **Content Quality - Role** - - [ ] Role is specific (not generic like "assistant") - - [ ] Role aligns with agent's purpose and menu items - - [ ] Role is achievable within LLM capabilities - - [ ] Role scope is appropriate (not too broad/narrow) - -3. **Content Quality - Identity** - - [ ] Identity clearly defines the agent's character - - [ ] Identity is consistent with the role - - [ ] Identity provides context for behavior - - [ ] Identity is not generic or cliché - -4. **Content Quality - Communication Style** - - [ ] Communication style is clearly defined - - [ ] Style matches the role and target users - - [ ] Style is consistent throughout the definition - - [ ] Style examples or guidance provided if nuanced - - [ ] Style focuses on speech patterns only (not behavior) - -5. **Content Quality - Principles** - - [ ] Principles are actionable (not vague platitudes) - - [ ] Principles guide behavior and decisions - - [ ] Principles are consistent with role - - [ ] 3-7 principles recommended (not overwhelming) - - [ ] Each principle is clear and specific - - [ ] First principle activates expert knowledge domain - -6. **Consistency Checks** - - [ ] Role, identity, communication_style, principles all align - - [ ] No contradictions between principles - - [ ] Persona supports the menu items defined - - [ ] Language and terminology consistent - -### Protocol 3: Record Findings - -Organize findings into three sections and append to editPlan frontmatter under `validationAfter.persona`: - -```yaml -validationAfter: - persona: - status: [pass|fail|warning] - passing: - - "{check description}" - - "{check description}" - warnings: - - "{non-blocking issue}" - failures: - - "{blocking issue that must be fixed}" -``` - -**PASSING CHECKS** (List what passed) -``` -✓ Role is specific and well-defined -✓ Identity clearly articulated and appropriate -✓ Communication style clearly defined -✓ Principles are actionable and clear -✓ First principle activates expert knowledge -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Only 2 principles provided, 3-7 recommended for richer guidance -⚠ Communication style could be more specific -⚠ Expertise areas are broad, could be more specific -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Role is generic ("assistant") - needs specificity -✗ Communication style undefined - creates inconsistent behavior -✗ Principles are vague ("be helpful" - not actionable) -✗ First principle doesn't activate expert knowledge -``` - -### Protocol 4: Auto-Advance - -**🚫 NO MENU PRESENTED** - After recording findings, immediately load and execute `{nextStepFile}` - ---- - -**Auto-advancing to menu validation...** - -## SUCCESS METRICS - -✅ All persona checks from personaProperties.md performed -✅ All checks validated against the actual builtYaml -✅ Findings saved to editPlan with detailed status -✅ Auto-advanced to next step diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09c-validate-menu.md b/src/modules/bmb/workflows/agent/steps-e/e-09c-validate-menu.md deleted file mode 100644 index f46863b1..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09c-validate-menu.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -name: 'e-09c-validate-menu' -description: 'Validate menu structure (after edit) - no menu, auto-advance' - -nextStepFile: './e-09d-validate-structure.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' -agentMenuPatterns: ../data/agent-menu-patterns.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9c: Validate Menu (After Edit) - -## STEP GOAL - -Validate that the agent's menu (commands/tools) follows BMAD patterns as defined in agentMenuPatterns.md, is well-structured, properly documented, and aligns with the agent's persona and purpose. Record findings to editPlan and auto-advance. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation checks** - All menu items must be verified -- **ALWAYS load the reference document** - agentMenuPatterns.md -- **ALWAYS load the builtYaml** for actual menu content validation -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** Load and validate EVERYTHING specified in the agentMenuPatterns.md file -- **🚫 NO MENU in this step** - record findings and auto-advance -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. -1. Read the menu patterns reference from `{agentMenuPatterns}` -2. Read the built agent YAML from `{builtYaml}` -3. Read the edit plan from `{editPlan}` -4. Extract the menu/commands section from the builtYaml -5. Determine agent type (Simple, Expert, or Module) from metadata -6. Compare actual menu against ALL validation rules - -### Protocol 2: Validation Checks - -Perform these checks systematically - validate EVERY rule specified in agentMenuPatterns.md: - -1. **Menu Structure** - - [ ] Menu section exists and is properly formatted - - [ ] At least one menu item defined (unless intentionally tool-less) - - [ ] Menu items follow proper YAML structure - - [ ] Each item has required fields (name, description, pattern) - -2. **Menu Item Requirements** - For each menu item: - - [ ] name: Present, unique, uses kebab-case - - [ ] description: Clear and concise - - [ ] pattern: Valid regex pattern or tool reference - - [ ] scope: Appropriate scope defined (if applicable) - -3. **Pattern Quality** - - [ ] Patterns are valid and testable - - [ ] Patterns are specific enough to match intended inputs - - [ ] Patterns are not overly restrictive - - [ ] Patterns use appropriate regex syntax - -4. **Description Quality** - - [ ] Each item has clear description - - [ ] Descriptions explain what the item does - - [ ] Descriptions are consistent in style - - [ ] Descriptions help users understand when to use - -5. **Alignment Checks** - - [ ] Menu items align with agent's role/purpose - - [ ] Menu items are supported by agent's expertise - - [ ] Menu items fit within agent's constraints - - [ ] Menu items are appropriate for target users - -6. **Completeness** - - [ ] Core capabilities for this role are covered - - [ ] No obvious missing functionality - - [ ] Menu scope is appropriate (not too sparse/overloaded) - - [ ] Related functionality is grouped logically - -7. **Standards Compliance** - - [ ] No prohibited patterns or commands - - [ ] No security vulnerabilities in patterns - - [ ] No ambiguous or conflicting items - - [ ] Consistent naming conventions - -8. **Menu Link Validation (Agent Type Specific)** - - [ ] Determine agent type from metadata: - - Simple: module property is 'stand-alone' AND hasSidecar is false/absent - - Expert: hasSidecar is true - - Module: module property is a module code (e.g., 'bmm', 'bmb', 'bmgd', 'bmad') - - [ ] For Expert agents (hasSidecar: true): - - Menu handlers SHOULD reference external sidecar files (e.g., `./{agent-name}-sidecar/...`) - - OR have inline prompts defined directly in the handler - - [ ] For Module agents (module property is a module code): - - Menu handlers SHOULD reference external module files under the module path - - Exec paths must start with `{project-root}/_bmad/{module}/...` - - Verify referenced files exist under the module directory - - [ ] For Simple agents (stand-alone, no sidecar): - - Menu handlers MUST NOT have external file links - - Menu handlers SHOULD only use relative links within the same file (e.g., `#section-name`) - - OR have inline prompts defined directly in the handler - -### Protocol 3: Record Findings - -Organize findings into three sections and append to editPlan frontmatter under `validationAfter.menu`: - -```yaml -validationAfter: - menu: - status: [pass|fail|warning] - passing: - - "{check description}" - - "{check description}" - warnings: - - "{non-blocking issue}" - failures: - - "{blocking issue that must be fixed}" -``` - -**PASSING CHECKS** (List what passed) -``` -✓ Menu structure properly formatted -✓ 5 menu items defined, all with required fields -✓ All patterns are valid regex -✓ Menu items align with agent role -✓ Agent type appropriate menu links verified -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Item "analyze-data" description is vague -⚠ No menu item for [common capability X] -⚠ Pattern for "custom-command" very broad, may over-match -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Duplicate menu item name: "process" appears twice -✗ Invalid regex pattern: "[unclosed bracket" -✗ Menu item "system-admin" violates security guidelines -✗ No menu items defined for agent type that requires tools -✗ Simple agent has external link in menu handler (should be relative # or inline) -✗ Expert agent with sidecar has no external file links or inline prompts defined -✗ Module agent exec path doesn't start with {project-root}/_bmad/{module}/... -✗ Module agent references file that doesn't exist in module directory -``` - -### Protocol 4: Auto-Advance - -**🚫 NO MENU PRESENTED** - After recording findings, immediately load and execute `{nextStepFile}` - ---- - -**Auto-advancing to structure validation...** - -## SUCCESS METRICS - -✅ All menu checks from agentMenuPatterns.md performed -✅ All checks validated against the actual builtYaml -✅ Agent type-specific link validation performed -✅ Findings saved to editPlan with detailed status -✅ Auto-advanced to next step diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09d-validate-structure.md b/src/modules/bmb/workflows/agent/steps-e/e-09d-validate-structure.md deleted file mode 100644 index bdb7757e..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09d-validate-structure.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -name: 'e-09d-validate-structure' -description: 'Validate YAML structure (after edit) - no menu, auto-advance' - -nextStepFile: './e-09e-validate-sidecar.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' -simpleValidation: ../data/simple-agent-validation.md -expertValidation: ../data/expert-agent-validation.md -agentCompilation: ../data/agent-compilation.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9d: Validate Structure (After Edit) - -## STEP GOAL - -Validate the built agent YAML file for structural completeness and correctness against the appropriate validation checklist (simple or expert) from agentCompilation.md. Record findings to editPlan and auto-advance. - -## MANDATORY EXECUTION RULES - -- **NEVER skip validation** - All agents must pass structural validation -- **ALWAYS use the correct validation checklist** based on agent type (simple vs expert) -- **ALWAYS load the builtYaml** for actual structure validation -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** Load and validate EVERYTHING specified in the agentCompilation.md file -- **MUST check hasSidecar flag** to determine correct validation standard -- **🚫 NO MENU in this step** - record findings and auto-advance -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. -1. Read the agent compilation reference from `{agentCompilation}` -2. Read the simple validation checklist from `{simpleValidation}` -3. Read the expert validation checklist from `{expertValidation}` -4. Read the built agent YAML from `{builtYaml}` -5. Read the edit plan from `{editPlan}` -6. Determine agent type (simple vs expert) to select correct checklist - -### Protocol 2: Validation Checks - -Perform these checks systematically - validate EVERY rule specified in agentCompilation.md: - -#### A. YAML Syntax Validation -- [ ] Parse YAML without errors -- [ ] Check indentation consistency (2-space standard) -- [ ] Validate proper escaping of special characters -- [ ] Verify no duplicate keys in any section - -#### B. Frontmatter Validation -- [ ] All required fields present (name, description, version, etc.) -- [ ] Field values are correct type (string, boolean, array) -- [ ] No empty required fields -- [ ] Proper array formatting with dashes -- [ ] Boolean fields are actual booleans (not strings) - -#### C. Section Completeness -- [ ] All required sections present based on agent type -- [ ] Sections not empty unless explicitly optional -- [ ] Proper markdown heading hierarchy (##, ###) -- [ ] No orphaned content without section headers - -#### D. Field-Level Validation -- [ ] Path references exist and are valid -- [ ] Array fields properly formatted -- [ ] No malformed YAML structures -- [ ] File references use correct path format - -#### E. Agent Type Specific Checks - -**For Simple Agents (hasSidecar is false/absent, module is 'stand-alone'):** -- [ ] No sidecar requirements -- [ ] No sidecar-folder path in metadata -- [ ] Basic fields complete -- [ ] No expert-only configuration present -- [ ] Menu handlers use only internal references (#) or inline prompts - -**For Expert Agents (hasSidecar is true):** -- [ ] Sidecar flag set correctly in metadata -- [ ] Sidecar folder path specified in metadata -- [ ] All expert fields present -- [ ] Advanced features properly configured -- [ ] Menu handlers reference sidecar files or have inline prompts - -**For Module Agents (module is a module code like 'bmm', 'bmb', etc.):** -- [ ] Module property is valid module code -- [ ] Exec paths for menu handlers start with `{project-root}/_bmad/{module}/...` -- [ ] Referenced files exist under the module directory -- [ ] If also hasSidecar: true, sidecar configuration is valid - -### Protocol 3: Record Findings - -Organize findings into three sections and append to editPlan frontmatter under `validationAfter.structure`: - -```yaml -validationAfter: - structure: - agentType: [simple|expert|module] - status: [pass|fail|warning] - passing: - - "{check description}" - - "{check description}" - warnings: - - "{non-blocking issue}" - failures: - - "{blocking issue that must be fixed}" -``` - -**PASSING CHECKS** (List what passed) -``` -✓ Valid YAML syntax, no parse errors -✓ All required frontmatter fields present -✓ Proper 2-space indentation throughout -✓ All required sections complete for agent type -✓ Path references are valid -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Some optional sections are empty -⚠ Minor formatting inconsistencies -⚠ Some descriptions are brief -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ YAML syntax error preventing parsing -✗ Duplicate key 'name' in metadata -✗ Required field 'description' is empty -✗ Invalid boolean value 'yes' (should be true/false) -✗ Path reference points to non-existent file -✗ Simple agent has sidecar-folder specified -✗ Expert agent missing sidecar-folder path -``` - -### Protocol 4: Auto-Advance - -**🚫 NO MENU PRESENTED** - After recording findings, immediately load and execute `{nextStepFile}` - ---- - -**Auto-advancing to sidecar validation...** - -## SUCCESS METRICS - -✅ All structure checks from agentCompilation.md performed -✅ Correct validation checklist used based on agent type -✅ All checks validated against the actual builtYaml -✅ Findings saved to editPlan with detailed status -✅ Agent type correctly identified and validated -✅ Auto-advanced to next step diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09e-validate-sidecar.md b/src/modules/bmb/workflows/agent/steps-e/e-09e-validate-sidecar.md deleted file mode 100644 index 37c015bf..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09e-validate-sidecar.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -name: 'e-09e-validate-sidecar' -description: 'Validate sidecar structure (after edit) - no menu, auto-advance' - -nextStepFile: './e-09f-validation-summary.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' -expertValidation: ../data/expert-agent-validation.md -criticalActions: ../data/critical-actions.md -builtYaml: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml' -sidecarFolder: '{bmb_creations_output_folder}/{agent-name}/{agent-name}-sidecar/' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9e: Validate Sidecar (After Edit) - -## STEP GOAL - -Validate the sidecar folder structure and referenced paths for Expert agents to ensure all sidecar files exist, are properly structured, and paths in the main agent YAML correctly reference them. Record findings to editPlan and auto-advance. For Simple agents without sidecar, mark as N/A. - -## MANDATORY EXECUTION RULES - -- **ONLY validates for Expert agents** - Simple agents should have no sidecar -- **MUST verify sidecar folder exists** before validating contents -- **ALWAYS cross-reference YAML paths** with actual files -- **ALWAYS load the builtYaml** to get sidecar configuration -- **ALWAYS use absolute paths** when referencing files -- **CRITICAL:** Load and validate EVERYTHING specified in the expertValidation.md file -- **PROVIDE clear remediation steps** for any missing or malformed files -- **🚫 NO MENU in this step** - record findings and auto-advance -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. -1. Read the expert validation reference from `{expertValidation}` -2. Read the critical actions reference from `{criticalActions}` -3. Read the built agent YAML from `{builtYaml}` -4. Read the edit plan from `{editPlan}` -5. Determine if agent has sidecar from metadata - -### Protocol 2: Conditional Validation - -**IF agent has hasSidecar: false OR agent is Simple:** -- [ ] Mark sidecar validation as N/A -- [ ] Confirm no sidecar-folder path in metadata -- [ ] Confirm no sidecar references in menu handlers - -**IF agent has hasSidecar: true OR agent is Expert/Module with sidecar:** -- [ ] Proceed with full sidecar validation - -### Protocol 3: Sidecar Validation Checks (For Expert Agents) - -Perform these checks systematically - validate EVERY rule specified in expertValidation.md: - -#### A. Sidecar Folder Validation -- [ ] Sidecar folder exists at specified path -- [ ] Sidecar folder is accessible and readable -- [ ] Sidecar folder path in metadata matches actual location -- [ ] Folder naming follows convention: `{agent-name}-sidecar` - -#### B. Sidecar File Inventory -- [ ] List all files in sidecar folder -- [ ] Verify expected files are present -- [ ] Check for unexpected files -- [ ] Validate file names follow conventions - -#### C. Path Reference Validation -For each sidecar path reference in agent YAML: -- [ ] Extract path from YAML reference -- [ ] Verify file exists at referenced path -- [ ] Check path format is correct (relative/absolute as expected) -- [ ] Validate no broken path references - -#### D. Critical Actions File Validation (if present) -- [ ] critical-actions.md file exists -- [ ] File has proper frontmatter -- [ ] Actions section is present and not empty -- [ ] No critical sections missing -- [ ] File content is complete (not just placeholder) - -#### E. Module Files Validation (if present) -- [ ] Module files exist at referenced paths -- [ ] Each module file has proper frontmatter -- [ ] Module file content is complete -- [ ] No empty or placeholder module files - -#### F. Sidecar Structure Completeness -- [ ] All referenced sidecar files present -- [ ] No orphaned references (files referenced but not present) -- [ ] No unreferenced files (files present but not referenced) -- [ ] File structure matches expert agent requirements - -### Protocol 4: Record Findings - -Organize findings into three sections and append to editPlan frontmatter under `validationAfter.sidecar`: - -```yaml -validationAfter: - sidecar: - hasSidecar: [true|false] - status: [pass|fail|warning|n/a] - passing: - - "{check description}" - - "{check description}" - warnings: - - "{non-blocking issue}" - failures: - - "{blocking issue that must be fixed}" -``` - -**PASSING CHECKS** (List what passed - for Expert agents)** -``` -✓ Sidecar folder exists at expected path -✓ All referenced files present -✓ No broken path references -✓ Critical actions file complete -✓ Module files properly structured -✓ File structure matches expert requirements -``` - -**WARNINGS** (Non-blocking issues) -``` -⚠ Additional files in sidecar not referenced -⚠ Some module files are minimal -⚠ Sidecar has no modules (may be intentional) -``` - -**FAILURES** (Blocking issues that must be fixed) -``` -✗ Sidecar folder completely missing -✗ Sidecar folder path in metadata doesn't match actual location -✗ Critical file missing: critical-actions.md -✗ Broken path reference: {path} not found -✗ Referenced file is empty or placeholder -✗ Module file missing frontmatter -✗ Simple agent has sidecar configuration (should not) -``` - -**N/A FOR SIMPLE AGENTS:** -``` -N/A - Agent is Simple type (hasSidecar: false, no sidecar required) -``` - -### Protocol 5: Auto-Advance - -**🚫 NO MENU PRESENTED** - After recording findings, immediately load and execute `{nextStepFile}` - ---- - -**Auto-advancing to validation summary...** - -## SUCCESS METRICS - -✅ All sidecar checks from expertValidation.md performed (or N/A for Simple) -✅ All checks validated against the actual builtYaml and file system -✅ Findings saved to editPlan with detailed status -✅ Agent type correctly identified (sidecar vs non-sidecar) -✅ Auto-advanced to next step diff --git a/src/modules/bmb/workflows/agent/steps-e/e-09f-validation-summary.md b/src/modules/bmb/workflows/agent/steps-e/e-09f-validation-summary.md deleted file mode 100644 index 223040b7..00000000 --- a/src/modules/bmb/workflows/agent/steps-e/e-09f-validation-summary.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -name: 'e-09f-validation-summary' -description: 'Display all validation findings after edit' - -nextStepFile: './e-10-celebrate.md' -editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md' - -advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' -partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md' ---- - -# Edit Step 9f: Validation Summary (After Edit) - -## STEP GOAL: - -Display all post-edit validation findings and compare with pre-edit state. Present findings and await confirmation to proceed to celebration. - -## MANDATORY EXECUTION RULES: - -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: Read editPlan to collect all validation findings -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Step-Specific Rules: - -- 🎯 Display all validation findings clearly organized -- 📊 Compare before/after states -- 💬 Present options for handling any remaining issues - -## EXECUTION PROTOCOLS: - -- 🎯 Read editPlan to get validation findings -- 📊 Display organized summary with before/after comparison -- 💾 Allow user to decide how to proceed - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Load Validation Findings - -Read `{editPlan}` frontmatter to collect validationBefore and validationAfter findings. - -### 2. Display Validation Summary - -```markdown -## Post-Edit Validation Report for {agent-name} - -### Before vs After Comparison - -| Component | Before | After | Status | -|-----------|--------|-------|--------| -| Metadata | {status} | {status} | {Δ} | -| Persona | {status} | {status} | {Δ} | -| Menu | {status} | {status} | {Δ} | -| Structure | {status} | {status} | {Δ} | -| Sidecar | {status} | {status} | {Δ} | - -### Detailed Findings (After Edit) - -**Metadata:** {summary} -**Persona:** {summary} -**Menu:** {summary} -**Structure:** {summary} -**Sidecar:** {summary} -``` - -### 3. Present Options - -"How do the edits look? - -**[R]eview** - Show detailed before/after for any component -**[F]ix** - Address any remaining issues -**[A]ccept** - Proceed to celebration" - -### 4. Present MENU OPTIONS - -Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Celebration" - -#### Menu Handling Logic: - -- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu -- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu -- IF R: Show detailed before/after comparison, then redisplay menu -- IF C: Save validation summary to {editPlan}, then only then load, read entire file, then execute {nextStepFile} -- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#4-present-menu-options) - -#### EXECUTION RULES: - -- ALWAYS halt and wait for user input after presenting menu -- ONLY proceed to next step when user selects 'C' -- After other menu items execution, return to this menu - -## CRITICAL STEP COMPLETION NOTE - -ONLY WHEN [C continue option] is selected and [validation summary displayed], will you then load and read fully `{nextStepFile}` to execute and celebrate completion. - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All validation findings displayed clearly -- Before/after comparison shown -- User given options for handling issues - -### ❌ SYSTEM FAILURE: - -- Findings not displayed to user -- Proceeding without user acknowledgment - -**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. diff --git a/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md b/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md index 2dc6e33a..3a4b259e 100644 --- a/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md +++ b/src/modules/bmb/workflows/agent/steps-v/v-01-load-review.md @@ -70,7 +70,7 @@ Initialize the validation report: ```markdown --- agentName: '{agent-name}' -agentType: '{simple|expert|module}' +agentType: '{simple|expert|module}' # Derived from module + hasSidecar agentFile: '{agent-file-path}' validationDate: '{YYYY-MM-DD}' stepsCompleted: @@ -82,8 +82,9 @@ stepsCompleted: ## Agent Overview **Name:** {agent-name} -**Type:** {simple|expert|module} -**Version:** {version} +**Type:** {simple|expert|module} # Derived from: module + hasSidecar +**module:** {module-value} +**hasSidecar:** {true|false} **File:** {agent-file-path} --- diff --git a/src/modules/bmb/workflows/agent/steps-v/v-02e-validate-sidecar.md b/src/modules/bmb/workflows/agent/steps-v/v-02e-validate-sidecar.md index 5f74ce2a..0b9054c6 100644 --- a/src/modules/bmb/workflows/agent/steps-v/v-02e-validate-sidecar.md +++ b/src/modules/bmb/workflows/agent/steps-v/v-02e-validate-sidecar.md @@ -48,7 +48,7 @@ Read `{expertValidation}`, `{criticalActions}`, `{validationReport}`, and `{agen ### 2. Conditional Validation -**IF agentType == expert OR (agentType == module AND hasSidecar == true):** +**IF (module = "stand-alone" AND hasSidecar = true) OR (module ≠ "stand-alone" AND hasSidecar = true):** Perform these checks systematically - validate EVERY rule specified in expertValidation.md: #### A. Sidecar Folder Validation @@ -89,7 +89,7 @@ For each sidecar path reference in agent YAML: - [ ] No unreferenced files (files present but not referenced) - [ ] File structure matches expert agent requirements -**IF agentType is Simple (no sidecar):** +**IF (module = "stand-alone" AND hasSidecar = false):** - [ ] Mark sidecar validation as N/A - [ ] Confirm no sidecar-folder path in metadata - [ ] Confirm no sidecar references in menu handlers @@ -124,7 +124,7 @@ Append to `{validationReport}`: {List of blocking issues that must be fixed} *N/A (for Simple agents):* -N/A - Agent is Simple type (hasSidecar: false, no sidecar required) +N/A - Agent is Simple type (module = "stand-alone" + hasSidecar: false, no sidecar required) ``` ### 4. Auto-Advance diff --git a/src/modules/bmb/workflows/module/data/agent-architecture.md b/src/modules/bmb/workflows/module/data/agent-architecture.md new file mode 100644 index 00000000..7cfac331 --- /dev/null +++ b/src/modules/bmb/workflows/module/data/agent-architecture.md @@ -0,0 +1,179 @@ +# Agent Architecture for Modules + +**Purpose:** High-level guidance for planning agents in your module — not implementation details (that's what the agent-builder workflow is for). + +--- + +## Single Agent vs. Multi-Agent Module + +### Single Agent Module + +**Use when:** One persona can handle the module's purpose. + +**Characteristics:** +- Simpler, focused +- Clear single point of contact +- Good for narrow domains + +**Question:** Could one expert agent with a sidecar handle this entire module? + +--- + +### Multi-Agent Module + +**Use when:** Different expertise areas justify specialized personas. + +**Characteristics:** +- Each agent has a distinct role and expertise +- Agents form a cohesive team around the module's theme +- Menus coordinate to guide users to the right agent + +**Why multi-agent?** +- Different workflows need different expert perspectives +- Users expect to talk to "the right expert" for each task +- The module covers a domain too broad for one persona + +--- + +## Flagship Example: BMM Agent Team + +BMM demonstrates a multi-agent module with **9 specialized agents** forming a complete software development team. + +### The BMM Theme + +**"Agile software delivery, AI-driven"** + +Every agent serves this theme — they're a complete team working together. + +### BMM Agent Overview + +| Agent | Name | Role | Responsible For | +|-------|------|------|-----------------| +| PM | John | Product Manager | PRDs, requirements, user stories | +| Architect | Winston | System Architect | Technical design, architecture | +| UX | | UX Designer | User research, UX design | +| Dev | | Developer | Implementation, coding | +| TEA | | Test Engineer Architect | Test architecture, QA | +| SM | | Scrum Master | Sprint planning, workflow status | +| Tech Writer | | Technical Writer | Documentation | +| Analyst | | Business Analyst | Analysis, metrics | +| Quick Flow | | Solo Developer | Quick standalone work | + +### Key Patterns + +1. **Shared commands** — All agents have `[WS]` Workflow Status +2. **Specialty commands** — Each agent has unique commands (PM→PRD, Architect→Architecture) +3. **No overlap** — Each command has one clear owner +4. **Collaboration** — Agents reference each other's work (PRD → Architecture → Implementation) + +--- + +## Planning Your Agents + +### For Each Agent, Document: + +1. **Role** — What is this agent responsible for? +2. **Workflows** — Which workflows will this agent trigger/own? +3. **Human Name** — What's their persona name? (e.g., "John", "Winston") +4. **Communication Style** — How do they talk? (e.g., "Direct and data-sharp", "Calm and pragmatic") +5. **Skills/Expertise** — What knowledge does this agent bring? +6. **Memory/Learning** — Does this agent need to remember things over time? (hasSidecar) + +That's it! The agent-builder workflow will handle the detailed implementation. + +--- + +## Agent Memory & Learning + +### Sidecar Agents (hasSidecar: true) + +**Use when:** The agent needs to remember context across sessions. + +**Characteristics:** +- Has a sidecar file that persists between conversations +- Learns from user interactions +- Remembers project details, preferences, past work + +**Examples:** +- An agent that tracks project decisions over time +- An agent that learns user preferences +- An agent that maintains ongoing project context + +### Stateless Agents (hasSidecar: false) + +**Use when:** The agent doesn't need persistent memory. + +**Characteristics:** +- Each conversation starts fresh +- Relies on shared context files (like project-context.md) +- Simpler, more predictable + +**Most module agents are stateless** — they reference shared project context rather than maintaining their own memory. + +--- + +## Agent-Workflow Coordination + +### Menu Triggers + +Each agent has menu items that trigger workflows: + +| Trigger Type | Pattern | Example | +|--------------|---------|---------| +| Shared | Same across all agents | `[WS]` Workflow Status | +| Specialty | Unique to this agent | `[PR]` Create PRD (PM only) | +| Cross-reference | Points to another agent's workflow | "See architecture" | + +### Simple Planning Format + +For each agent, just document: + +``` +Agent: PM (John) +Role: Product Manager, requirements, PRDs +Triggers: + - WS → Workflow Status (shared) + - PR → Create PRD (specialty) + - ES → Epics and Stories (specialty) +Memory: No (uses shared project-context) +``` + +The agent-builder workflow will convert this into the proper format. + +--- + +## When to Use Multiple Agents + +**Consider multiple agents when:** +- Different workflows require different expertise +- The domain has clear specialization areas +- Users would expect to talk to different "experts" +- The module covers a broad process (like software development) + +**Use a single agent when:** +- The domain is focused and narrow +- One expertise area covers all workflows +- Simplicity is preferred +- The agent could reasonably handle everything with a sidecar + +--- + +## Quick Agent Planning Checklist + +For each agent in your module: + +- [ ] Role defined (what they're responsible for) +- [ ] Workflows assigned (which workflows they trigger) +- [ ] Human name chosen (persona) +- [ ] Communication style described +- [ ] Skills/expertise identified +- [ ] Memory decision (hasSidecar: true/false) + +--- + +## Notes + +- **Don't worry about the exact YAML format** — agent-builder handles that +- **Focus on the planning** — who does what, how they work together +- **Keep it high-level** — this is about the module's agent architecture, not implementation details +- **BMM is the reference** — look at how their agents form a cohesive team diff --git a/src/modules/bmb/workflows/module/data/agent-spec-template.md b/src/modules/bmb/workflows/module/data/agent-spec-template.md new file mode 100644 index 00000000..5452abb6 --- /dev/null +++ b/src/modules/bmb/workflows/module/data/agent-spec-template.md @@ -0,0 +1,79 @@ +# Agent Specification: {agent_name} + +**Module:** {module_code} +**Status:** Placeholder — To be created via create-agent workflow +**Created:** {date} + +--- + +## Agent Metadata + +```yaml +agent: + metadata: + id: "_bmad/{module_code}/agents/{agent_file_name}.md" + name: {agent_human_name} + title: {agent_title} + icon: {agent_icon} + module: {module_code} + hasSidecar: false +``` + +--- + +## Agent Persona + +### Role + +{agent_role} + +### Identity + +{agent_identity} + +### Communication Style + +{agent_communication_style} + +### Principles + +{agent_principles} + +--- + +## Agent Menu + +### Planned Commands + +| Trigger | Command | Description | Workflow | +|---------|---------|-------------|----------| +{agent_menu_table} + +--- + +## Agent Integration + +### Shared Context + +- References: `{shared_context_files}` +- Collaboration with: {collaborating_agents} + +### Workflow References + +{workflow_references} + +--- + +## Implementation Notes + +**Use the create-agent workflow to build this agent.** + +Inputs needed: +- Agent name and human name +- Role and expertise area +- Communication style preferences +- Menu commands and workflow mappings + +--- + +_Spec created on {date} via BMAD Module workflow_ diff --git a/src/modules/bmb/workflows/module/data/module-installer-standards.md b/src/modules/bmb/workflows/module/data/module-installer-standards.md new file mode 100644 index 00000000..c95746a6 --- /dev/null +++ b/src/modules/bmb/workflows/module/data/module-installer-standards.md @@ -0,0 +1,348 @@ +# Module Installer Standards + +**Purpose:** How the `_module-installer` folder works, including installer.js patterns and platform-specific configuration. + +--- + +## Overview + +The `_module-installer` folder contains optional installation logic for your module. It runs AFTER the IDE installations and can: +- Create directories specified in module.yaml +- Copy assets or templates +- Configure IDE-specific settings +- Set up platform-specific integrations + +--- + +## When Do You Need an Installer? + +### Use an Installer When: + +- Creating directories based on user configuration +- Copying template files to the user's project +- IDE-specific setup (Claude Code, Windsurf, Cursor, etc.) +- Platform-specific integrations + +### Skip the Installer When: + +- Module only provides agents and workflows +- No file operations needed +- No IDE-specific configuration + +--- + +## Folder Structure + +``` +_module-installer/ +├── installer.js # Main installer (REQUIRED if folder exists) +└── platform-specifics/ # IDE-specific handlers (optional) + ├── claude-code.js + ├── windsurf.js + ├── cursor.js + └── ... +``` + +--- + +## installer.js Pattern + +### Function Signature + +```javascript +/** + * Module Installer + * + * @param {Object} options - Installation options + * @param {string} options.projectRoot - The root directory of the target project + * @param {Object} options.config - Module configuration from module.yaml (resolved variables) + * @param {Array} options.installedIDEs - Array of IDE codes that were installed + * @param {Object} options.logger - Logger instance for output + * @returns {Promise} - Success status (true = success, false = failure) + */ +async function install(options) { + const { projectRoot, config, installedIDEs, logger } = options; + + try { + // Installation logic here + logger.log(chalk.blue('Installing {Module Name}...')); + + // ... your logic ... + + logger.log(chalk.green('✓ {Module Name} installation complete')); + return true; + } catch (error) { + logger.error(chalk.red(`Error installing module: ${error.message}`)); + return false; + } +} + +module.exports = { install }; +``` + +--- + +### What You Receive + +| Parameter | Type | Description | +|-----------|------|-------------| +| `projectRoot` | string | Absolute path to the user's project root | +| `config` | object | Resolved module.yaml variables | +| `installedIDEs` | array | List of IDE codes installed (e.g., `['claude-code', 'windsurf']`) | +| `logger` | object | Logger with `.log()`, `.warn()`, `.error()` methods | + +The `config` object contains your module.yaml variables **after** user input: + +```javascript +// If module.yaml defined: +// project_name: +// prompt: "What is your project name?" +// result: "{value}" + +config.project_name // = user's input +config.planning_artifacts // = resolved path +``` + +--- + +## Common Installation Tasks + +### 1. Create Directories + +```javascript +const fs = require('fs-extra'); +const path = require('node:path'); + +// Create directory from config +if (config['planning_artifacts']) { + const dirConfig = config['planning_artifacts'].replace('{project-root}/', ''); + const dirPath = path.join(projectRoot, dirConfig); + + if (!(await fs.pathExists(dirPath))) { + logger.log(chalk.yellow(`Creating directory: ${dirConfig}`)); + await fs.ensureDir(dirPath); + } +} +``` + +### 2. Copy Assets + +```javascript +const assetsSource = path.join(__dirname, 'assets'); +const assetsDest = path.join(projectRoot, 'docs'); + +if (await fs.pathExists(assetsSource)) { + await fs.copy(assetsSource, assetsDest); + logger.log(chalk.green('✓ Copied assets to docs/')); +} +``` + +### 3. IDE-Specific Configuration + +```javascript +// Handle IDE-specific configurations +if (installedIDEs && installedIDEs.length > 0) { + logger.log(chalk.cyan(`Configuring for IDEs: ${installedIDEs.join(', ')}`)); + + for (const ide of installedIDEs) { + await configureForIDE(ide, projectRoot, config, logger); + } +} +``` + +--- + +## Platform-Specific Handlers + +### Pattern + +Create files in `platform-specifics/{ide-code}.js`: + +```javascript +// platform-specifics/claude-code.js + +/** + * Configure module for Claude Code + */ +async function install(options) { + const { projectRoot, config, logger, platformInfo } = options; + + try { + // Claude Code specific configuration + logger.log(chalk.dim(' Configuring Claude Code integration...')); + + // Your logic here + + return true; + } catch (error) { + logger.warn(chalk.yellow(` Warning: ${error.message}`)); + return false; + } +} + +module.exports = { install }; +``` + +### Load from Main Installer + +```javascript +// installer.js +const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes')); + +async function configureForIDE(ide, projectRoot, config, logger) { + // Validate platform code + if (!platformCodes.isValidPlatform(ide)) { + logger.warn(chalk.yellow(` Unknown platform: '${ide}'. Skipping.`)); + return; + } + + const platformName = platformCodes.getDisplayName(ide); + const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`); + + try { + if (await fs.pathExists(platformSpecificPath)) { + const platformHandler = require(platformSpecificPath); + + if (typeof platformHandler.install === 'function') { + await platformHandler.install({ projectRoot, config, logger }); + logger.log(chalk.green(` ✓ Configured for ${platformName}`)); + } + } + } catch (error) { + logger.warn(chalk.yellow(` Warning: Could not configure ${platformName}: ${error.message}`)); + } +} +``` + +--- + +## Complete Example: BMM Installer + +```javascript +const fs = require('fs-extra'); +const path = require('node:path'); +const chalk = require('chalk'); +const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes')); + +/** + * BMM Module Installer + */ +async function install(options) { + const { projectRoot, config, installedIDEs, logger } = options; + + try { + logger.log(chalk.blue('🚀 Installing BMM Module...')); + + // Create output directory + if (config['output_folder']) { + const outputConfig = config['output_folder'].replace('{project-root}/', ''); + const outputPath = path.join(projectRoot, outputConfig); + if (!(await fs.pathExists(outputPath))) { + logger.log(chalk.yellow(`Creating output directory: ${outputConfig}`)); + await fs.ensureDir(outputPath); + } + } + + // Create implementation artifacts directory + if (config['implementation_artifacts']) { + const storyConfig = config['implementation_artifacts'].replace('{project-root}/', ''); + const storyPath = path.join(projectRoot, storyConfig); + if (!(await fs.pathExists(storyPath))) { + logger.log(chalk.yellow(`Creating story directory: ${storyConfig}`)); + await fs.ensureDir(storyPath); + } + } + + // IDE-specific configuration + if (installedIDEs && installedIDEs.length > 0) { + logger.log(chalk.cyan(`Configuring BMM for IDEs: ${installedIDEs.join(', ')}`)); + + for (const ide of installedIDEs) { + await configureForIDE(ide, projectRoot, config, logger); + } + } + + logger.log(chalk.green('✓ BMM Module installation complete')); + return true; + } catch (error) { + logger.error(chalk.red(`Error installing BMM: ${error.message}`)); + return false; + } +} + +async function configureForIDE(ide, projectRoot, config, logger) { + if (!platformCodes.isValidPlatform(ide)) { + logger.warn(chalk.yellow(` Warning: Unknown platform '${ide}'. Skipping.`)); + return; + } + + const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`); + + try { + if (await fs.pathExists(platformSpecificPath)) { + const platformHandler = require(platformSpecificPath); + + if (typeof platformHandler.install === 'function') { + await platformHandler.install({ projectRoot, config, logger }); + } + } + } catch (error) { + logger.warn(chalk.yellow(` Warning: Could not load handler for ${ide}: ${error.message}`)); + } +} + +module.exports = { install }; +``` + +--- + +## Best Practices + +### DO: +- Return `true` for success, `false` for failure +- Use chalk for colored output +- Log what you're doing (create, copy, configure) +- Handle errors gracefully with try/catch +- Validate paths before creating directories + +### DON'T: +- Assume paths exist — check with `fs.pathExists()` +- Overwrite user files without asking +- Fail silently — log errors +- Use absolute paths — build from `projectRoot` + +--- + +## Available Platform Codes + +Common IDE codes: +- `claude-code` — Anthropic's Claude Code +- `windsurf` — Windsurf IDE +- `cursor` — Cursor AI IDE +- `vscode` — Visual Studio Code + +Use `platformCodes.isValidPlatform(ide)` to validate. + +--- + +## Testing Your Installer + +1. Create a test project +2. Run `bmad install {your-module}` +3. Verify directories are created +4. Check that config variables are resolved correctly +5. Test platform-specific handlers + +--- + +## Quick Reference + +| Task | Code Pattern | +|------|--------------| +| Create directory | `await fs.ensureDir(path)` | +| Check if exists | `await fs.pathExists(path)` | +| Copy files | `await fs.copy(src, dest)` | +| Log info | `logger.log(chalk.blue('message'))` | +| Log success | `logger.log(chalk.green('✓ message'))` | +| Log warning | `logger.warn(chalk.yellow('warning'))` | +| Log error | `logger.error(chalk.red('error'))` | diff --git a/src/modules/bmb/workflows/module/data/module-standards.md b/src/modules/bmb/workflows/module/data/module-standards.md new file mode 100644 index 00000000..b56ca060 --- /dev/null +++ b/src/modules/bmb/workflows/module/data/module-standards.md @@ -0,0 +1,280 @@ +# Module Standards + +**Purpose:** Defines what a BMAD module is, its structure, and the three types of modules. + +--- + +## What is a BMAD Module? + +A **BMAD module** is a self-contained package of functionality that extends the BMAD framework. Modules provide: +- **Agents** — AI personas with specialized expertise and menu-driven commands +- **Workflows** — Structured processes for accomplishing complex tasks +- **Configuration** — module.yaml for user customization +- **Installation** — Optional installer.js for setup logic + +--- + +## Module Types + +### 1. Standalone Module + +A new, independent module focused on a specific domain. + +**Characteristics:** +- Own module code (e.g., `healthcare-ai`, `legal-assist`) +- Independent of other modules +- Can be installed alongside any other modules +- Has its own agents, workflows, configuration + +**Location:** `src/modules/{module-code}/` + +**Example:** CIS (Creative Innovation Suite) — a standalone module for innovation workflows + +--- + +### 2. Extension Module + +Extends an existing BMAD module with additional functionality. + +**Characteristics:** +- Builds upon an existing module's agents and workflows +- May add new agents or workflows that complement the base module +- Shares configuration context with the extended module +- Typically installed alongside the module it extends + +**Location:** `src/modules/{base-module}/extensions/{extension-code}/` + +**Example:** An extension to BMM that adds specialized security review workflows + +--- + +### Extension Module: Override & Merge Pattern + +When an extension module is installed, its files merge with the base module following these rules: + +#### Code Matching + +The extension's `module.yaml` `code:` field matches the base module's code: + +```yaml +# Base module: src/modules/bmm/module.yaml +code: bmm + +# Extension: src/modules/bmm/extensions/security/module.yaml +code: bmm # SAME CODE — extends BMM +``` + +The **folder name** is unique (e.g., `bmm-security`) but the `code:` matches the base module. + +#### File Merge Rules + +| File Type | Same Name | Different Name | +|-----------|-----------|----------------| +| Agent file | **OVERRIDE** — replaces the base agent | **ADD** — new agent added | +| Workflow folder | **OVERRIDE** — replaces the base workflow | **ADD** — new workflow added | +| Other files | **OVERRIDE** — replaces base file | **ADD** — new file added | + +#### Examples + +**Override scenario:** +``` +Base module (BMM): +├── agents/ +│ └── pm.agent.yaml # Original PM agent + +Extension (bmm-security): +├── agents/ +│ └── pm.agent.yaml # Security-focused PM — REPLACES original + +Result after installation: +├── agents/ +│ └── pm.agent.yaml # Now the security version +``` + +**Add scenario:** +``` +Base module (BMM): +├── agents/ +│ ├── pm.agent.yaml +│ └── architect.agent.yaml + +Extension (bmm-security): +├── agents/ +│ └── security-auditor.agent.yaml # NEW agent + +Result after installation: +├── agents/ +│ ├── pm.agent.yaml +│ ├── architect.agent.yaml +│ └── security-auditor.agent.yaml # ADDED +``` + +**Mixed scenario:** +``` +Extension contains both overrides and new files — applies rules per file +``` + +--- + +### 3. Global Module + +Affects the entire BMAD framework and all modules. + +**Characteristics:** +- Core functionality that impacts all modules +- Often provides foundational services or utilities +- Installed at the framework level +- Use sparingly — only for truly global concerns + +**Location:** `src/modules/{module-code}/` with `global: true` in module.yaml + +**Example:** A module that provides universal logging or telemetry across BMAD + +--- + +## Required Module Structure + +``` +{module-code}/ +├── module.yaml # Module configuration (REQUIRED) +├── README.md # Module documentation (REQUIRED) +├── agents/ # Agent definitions (if any) +│ └── {agent-name}.agent.yaml +├── workflows/ # Workflow definitions (if any) +│ └── {workflow-name}/ +│ └── workflow.md +├── _module-installer/ # Installation logic (optional) +│ ├── installer.js +│ └── platform-specifics/ +│ ├── claude-code.js +│ ├── windsurf.js +│ └── ... +└── {other folders} # Tasks, templates, data as needed +``` + +--- + +## Required Files + +### module.yaml (REQUIRED) + +Every module MUST have a `module.yaml` file with at minimum: + +```yaml +code: {module-code} +name: "Module Display Name" +header: "Brief module description" +subheader: "Additional context" +default_selected: false +``` + +See: `module-yaml-conventions.md` for full specification. + +--- + +### README.md (REQUIRED) + +Every module MUST have a README.md with: +- Module name and purpose +- Installation instructions +- Components section (agents, workflows) +- Quick start guide +- Module structure diagram +- Configuration section +- Usage examples +- Author information + +--- + +## Optional Components + +### Agents + +Agents are AI personas with: +- Metadata (id, name, title, icon, module) +- Persona (role, identity, communication_style, principles) +- Menu (trigger → workflow/exec mappings) + +See: `agent-architecture.md` for design guidance. + +--- + +### Workflows + +Workflows are structured processes with: +- workflow.md (entry point) +- steps/ folder with step files +- data/ folder with shared reference +- templates/ folder if needed + +--- + +### _module-installer/ + +Optional installation logic for: +- Creating directories +- Copying assets +- IDE-specific configuration +- Platform-specific setup + +See: `module-installer-standards.md` for patterns. + +--- + +## Module Type Decision Tree + +``` +START: Creating a module +│ +├─ Is this a brand new independent domain? +│ └─ YES → Standalone Module +│ +├─ Does this extend an existing module? +│ └─ YES → Extension Module +│ +└─ Does this affect all modules globally? + └─ YES → Global Module (use sparingly) +``` + +--- + +## Naming Conventions + +### Module Code + +- **kebab-case** (e.g., `bmm`, `cis`, `bmgd`, `healthcare-ai`) +- Short, memorable, descriptive +- 2-20 characters +- Lowercase letters, numbers, hyphens only + +### Agent Files + +- Format: `{role-name}.agent.yaml` +- Example: `pm.agent.yaml`, `architect.agent.yaml` + +### Workflow Folders + +- Format: `{workflow-name}/` +- Example: `prd/`, `create-architecture/` + +--- + +## Module Dependencies + +Modules can depend on: +- **Core BMAD** — Always available +- **Other modules** — Specify in module.yaml as `dependencies:` +- **External tools** — Document in README, handle in installer + +--- + +## Quick Reference + +| Question | Answer | +|----------|--------| +| What's a module? | Self-contained package of agents, workflows, config | +| What are the types? | Standalone, Extension, Global | +| What's required? | module.yaml, README.md | +| Where do modules live? | `src/modules/{code}/` | +| How do agents work? | Menu triggers → workflow/exec | +| How does installation work? | module.yaml prompts + optional installer.js | diff --git a/src/modules/bmb/workflows/module/data/module-yaml-conventions.md b/src/modules/bmb/workflows/module/data/module-yaml-conventions.md new file mode 100644 index 00000000..ee3b31a7 --- /dev/null +++ b/src/modules/bmb/workflows/module/data/module-yaml-conventions.md @@ -0,0 +1,392 @@ +# module.yaml Conventions + +**Purpose:** Defines how module.yaml works, including variables, templates, and how they provide context to agents and workflows. + +--- + +## Overview + +`module.yaml` is the configuration file for a BMAD module. It: +- Defines module metadata (code, name, description) +- Collects user input via prompts during installation +- Makes those inputs available to agents and workflows as variables +- Specifies which module should be selected by default + +--- + +## Frontmatter Fields + +### Required Fields + +```yaml +code: {module-code} # kebab-case identifier +name: "Display Name" # Human-readable name +header: "Brief description" # One-line summary +subheader: "Additional context" # More detail +default_selected: false # Auto-select on install? +``` + +### `default_selected` Guidelines + +| Module Type | default_selected | Example | +|-------------|------------------|---------| +| Core/Primary | `true` | BMM (agile software delivery) | +| Specialized | `false` | CIS (creative innovation), BMGD (game dev) | +| Experimental | `false` | New modules in development | + +--- + +## Variables System + +### Core Config Variables (Always Available) + +These variables are automatically available to ALL modules: + +```yaml +# Variables from Core Config inserted: +## user_name # User's name +## communication_language # Preferred language +## document_output_language # Output document language +## output_folder # Default output location +``` + +No need to define these — they're injected automatically. + +--- + +### Custom Variables + +Define custom variables for user input: + +```yaml +variable_name: + prompt: "Question to ask the user?" + default: "{default_value}" + result: "{template_for_final_value}" +``` + +**Example:** + +```yaml +project_name: + prompt: "What is the title of your project?" + default: "{directory_name}" + result: "{value}" +``` + +### Variable Templates + +In `prompt` and `result`, you can use templates: + +| Template | Expands To | +|----------|------------| +| `{value}` | The user's input | +| `{directory_name}` | Current directory name | +| `{output_folder}` | Output folder from core config | +| `{project-root}` | Project root path | +| `{variable_name}` | Another variable's value | + +--- + +## Variable Types + +### 1. Simple Text Input + +```yaml +project_name: + prompt: "What is the title of your project?" + default: "{directory_name}" + result: "{value}" +``` + +--- + +### 2. Boolean/Flag + +```yaml +enable_feature: + prompt: "Enable this feature?" + default: false + result: "{value}" +``` + +--- + +### 3. Single Select + +```yaml +skill_level: + prompt: "What is your experience level?" + default: "intermediate" + result: "{value}" + single-select: + - value: "beginner" + label: "Beginner - Explains concepts clearly" + - value: "intermediate" + label: "Intermediate - Balanced approach" + - value: "expert" + label: "Expert - Direct and technical" +``` + +--- + +### 4. Multi Select + +```yaml +platforms: + prompt: "Which platforms do you need?" + default: ["unity", "unreal"] + result: "{value}" + multi-select: + - value: "unity" + label: "Unity" + - value: "unreal" + label: "Unreal Engine" + - value: "godot" + label: "Godot" +``` + +--- + +### 5. Multi-Line Prompt + +```yaml +complex_variable: + prompt: + - "First question?" + - "Second context?" + - "Third detail?" + default: "default_value" + result: "{value}" +``` + +--- + +### 6. Required Variable + +```yaml +critical_variable: + prompt: "Required information:" + required: true + result: "{value}" +``` + +--- + +### 7. Path Variable + +```yaml +artifacts_folder: + prompt: "Where should artifacts be stored?" + default: "{output_folder}/artifacts" + result: "{project-root}/{value}" +``` + +--- + +## Variable Inheritance / Aliasing + +Create an alias for another variable: + +```yaml +primary_artifacts: + prompt: "Where should primary artifacts be stored?" + default: "{output_folder}/artifacts" + result: "{project-root}/{value}" + +# Alias for workflow compatibility +sprint_artifacts: + inherit: "primary_artifacts" +``` + +Now `sprint_artifacts` and `primary_artifacts` reference the same value. + +--- + +## How Variables Become Available + +### To Agents + +After installation, variables are available in agent frontmatter/context: + +```yaml +# In agent.agent.yaml or workflow execution +{variable_name} # Expands to the user's configured value +``` + +**Example:** If the user configured `project_name: "MyApp"`, agents can reference `{project_name}` and it will expand to `"MyApp"`. + +### To Workflows + +Workflows can reference module variables in their step files: + +```yaml +--- +outputFile: '{implementation_artifacts}/my-output.md' +--- +``` + +This expands the `implementation_artifacts` variable from module.yaml. + +--- + +## Real-World Examples + +### BMM (BMad Method) — Complex Configuration + +```yaml +code: bmm +name: "BMM: BMad Method Agile-AI Driven-Development" +header: "BMad Method™: Breakthrough Method of Agile-Ai Driven-Dev" +subheader: "Agent and Workflow Configuration for this module" +default_selected: true + +# Variables from Core Config inserted: +## user_name +## communication_language +## document_output_language +## output_folder + +project_name: + prompt: "What is the title of your project?" + default: "{directory_name}" + result: "{value}" + +user_skill_level: + prompt: + - "What is your development experience level?" + - "This affects how agents explain concepts." + default: "intermediate" + result: "{value}" + single-select: + - value: "beginner" + label: "Beginner - Explain concepts clearly" + - value: "intermediate" + label: "Intermediate - Balanced approach" + - value: "expert" + label: "Expert - Direct and technical" + +planning_artifacts: + prompt: "Where should planning artifacts be stored?" + default: "{output_folder}/planning-artifacts" + result: "{project-root}/{value}" + +implementation_artifacts: + prompt: "Where should implementation artifacts be stored?" + default: "{output_folder}/implementation-artifacts" + result: "{project-root}/{value}" + +project_knowledge: + prompt: "Where should project knowledge be stored?" + default: "docs" + result: "{project-root}/{value}" + +tea_use_mcp_enhancements: + prompt: "Enable MCP enhancements in Test Architect?" + default: false + result: "{value}" +``` + +--- + +### CIS (Creative Innovation Suite) — Minimal Configuration + +```yaml +code: cis +name: "CIS: Creative Innovation Suite" +header: "Creative Innovation Suite (CIS) Module" +subheader: "No custom configuration - uses Core settings only" +default_selected: false + +# Variables from Core Config inserted: +## user_name +## communication_language +## document_output_language +## output_folder +``` + +Some modules don't need custom variables — core config is enough! + +--- + +### BMGD (Game Development) — Multi-Select Example + +```yaml +code: bmgd +name: "BMGD: BMad Game Development" +header: "BMad Game Development Module" +subheader: "Configure game development settings" +default_selected: false + +project_name: + prompt: "What is the name of your game project?" + default: "{directory_name}" + result: "{value}" + +primary_platform: + prompt: "Which game engine do you use?" + default: ["unity", "unreal"] + required: true + result: "{value}" + multi-select: + - value: "unity" + label: "Unity" + - value: "unreal" + label: "Unreal Engine" + - value: "godot" + label: "Godot" + - value: "other" + label: "Custom / Other" +``` + +--- + +## Best Practices + +### DO: +- Keep prompts clear and concise +- Provide sensible defaults +- Use `result: "{project-root}/{value}"` for paths +- Use single/multi-select for structured choices +- Group related variables logically + +### DON'T: +- Overwhelm users with too many questions +- Ask for information that could be inferred +- Use technical jargon in prompts +- Create variables that are never used + +--- + +## Variable Naming + +- **kebab-case** (e.g., `planning_artifacts`, `user_skill_level`) +- Descriptive but concise +- Avoid conflicts with core variables + +--- + +## Testing Your module.yaml + +After creating module.yaml, test it: + +1. Run `bmad install` in a test project +2. Verify prompts appear correctly +3. Check that variables expand in agents/workflows +4. Test default values +5. Validate path templates resolve correctly + +--- + +## Quick Reference + +| Pattern | Use Case | +|---------|----------| +| Simple text input | Names, titles, descriptions | +| Boolean/Flag | Enable/disable features | +| Single select | Experience levels, categories | +| Multi select | Platforms, frameworks, options | +| Multi-line prompt | Complex questions needing context | +| Required | Must-have information | +| Path variable | Directory locations | +| Inherit/Alias | Compatibility, references | diff --git a/src/modules/bmb/workflows/module/steps-b/step-01-welcome.md b/src/modules/bmb/workflows/module/steps-b/step-01-welcome.md new file mode 100644 index 00000000..b415eca4 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-01-welcome.md @@ -0,0 +1,147 @@ +--- +name: 'step-01-welcome' +description: 'Welcome user, select mode (Interactive/Express/YOLO), gather initial idea' + +nextStepFile: './step-02-spark.md' +briefTemplateFile: '../templates/brief-template.md' +moduleStandardsFile: '../data/module-standards.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 1: Welcome & Mode Selection + +## STEP GOAL: + +Welcome the user to the Module Brief workflow, select the collaboration mode (Interactive/Express/YOLO), and gather their initial module idea. + +## 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 with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Architect** — creative, inspiring, helping users discover amazing module ideas +- ✅ This is explorative and collaborative — not a template-filling exercise +- ✅ Help users clarify and expand their vision + +### Step-Specific Rules: + +- 🎯 Set the creative tone — this is about discovering possibilities +- 🚫 FORBIDDEN to jump straight to technical details +- 💬 Ask questions that spark imagination + +## EXECUTION PROTOCOLS: + +- 🎯 Follow the MANDATORY SEQUENCE exactly +- 💾 No output file yet — gathering initial context +- 📖 Load next step when user selects 'C' + +## CONTEXT BOUNDARIES: + +- Available: module standards, brief template +- Focus: Initial idea gathering and mode selection +- No existing brief — this is a fresh start + +--- + +## MANDATORY SEQUENCE + +**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise. + +### 1. Welcome with Enthusiasm + +"**Welcome to the Module Brief workflow!** 🚀 + +I'm here to help you create an amazing BMAD module. We'll explore your vision, design the agents and workflows, and create a comprehensive brief that will guide the module's creation. + +Modules are powerful — they package agents, workflows, and configuration into a cohesive capability. Let's make something great!" + +### 2. Select Collaboration Mode + +"**How would you like to work?**" + +- **[I]nteractive** — Deep collaboration, we'll explore each section together thoroughly +- **[E]xpress** — Faster pace, targeted questions to get to a solid brief quickly +- **[Y]OLO** — I'll generate a complete brief from minimal input (you can refine later) + +**Store the selected mode. This affects how we proceed through subsequent steps.** + +### 3. Gather the Initial Idea + +"**Tell me about your module idea.**" + +Encourage them to share: +- What problem does it solve? +- Who would use it? +- What excites you about it? + +**If they're stuck**, offer creative prompts: +- "What domain do you work in? What tasks feel repetitive or could be AI-powered?" +- "Imagine you had a team of AI experts at your disposal — what would you ask them to build?" +- "Is there a module you wish existed?" + +**Capture their initial idea.** We'll explore and expand it in the next steps. + +### 4. Preview the Journey Ahead + +"**Here's where we're going together:**" + +1. Spark — Explore and clarify your idea +2. Module Type — Standalone, Extension, or Global? +3. Vision — What would make this extraordinary? +4. Identity — Name, code, personality +5. Users — Who is this for? +6. Value — What makes it special? +7. Agents — Who's on your team? +8. Workflows — What can we do? +9. Tools — MCP tools, integrations? +10. Scenarios — How will people use it? +11. Creative — Easter eggs, lore, magic ✨ +12. Review — Read through together +13. Finalize — Your complete brief + +"**This is about discovery and creativity. We're not filling out forms — we're designing something amazing together.**" + +### 5. Present MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input +- ONLY proceed to next step when user selects 'C' +- User can chat or ask questions — always respond and redisplay menu + +#### Menu Handling Logic: + +- IF A: Execute `{advancedElicitationTask}` for deeper idea exploration, then redisplay menu +- IF P: Execute `{partyModeWorkflow}` for creative brainstorming, then redisplay menu +- IF C: Store the mode and initial idea, then load `{nextStepFile}` +- IF Any other: Help user, then redisplay menu + +--- + +## 🚨 SYSTEM SUCCESS/FAILURE METRICS + +### ✅ SUCCESS: + +- User feels welcomed and inspired +- Collaboration mode selected +- Initial idea captured +- User understands the journey ahead + +### ❌ SYSTEM FAILURE: + +- Skipping to technical details prematurely +- Not capturing the initial idea +- Not setting the creative tone +- Rushing through mode selection + +**Master Rule:** This step sets the tone for the entire brief — make it inspiring and collaborative. diff --git a/src/modules/bmb/workflows/module/steps-b/step-02-spark.md b/src/modules/bmb/workflows/module/steps-b/step-02-spark.md new file mode 100644 index 00000000..1a1b17f9 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-02-spark.md @@ -0,0 +1,140 @@ +--- +name: 'step-02-spark' +description: 'Ignite the idea, explore problem space, what excites them' + +nextStepFile: './step-03-module-type.md' +moduleStandardsFile: '../data/module-standards.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 2: Spark + +## STEP GOAL: + +Ignite and explore the user's idea — dig into the problem space, understand what excites them, and help clarify the vision. + +## 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 with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Architect** — curious, explorative, helping ideas grow +- ✅ Ask open-ended questions that reveal depth +- ✅ Listen more than you speak + +### Step-Specific Rules: + +- 🎯 This is about understanding the problem space, not solving it yet +- 🚫 FORBIDDEN to jump to implementation +- 💬 Ask "why" and "what if" questions + +## EXECUTION PROTOCOLS: + +- 🎯 Follow the MANDATORY SEQUENCE exactly +- 📖 Reference module standards to understand types +- 📖 Load next step when user selects 'C' + +--- + +## MANDATORY SEQUENCE + +**CRITICAL:** Follow this sequence exactly. + +### 1. Connect to Their Idea + +"**Let's explore your idea together.**" + +Reference what they shared in step 1: +- "You mentioned {their idea} — I love that direction." +- "Tell me more about the problem you're solving." + +### 2. Explore the Problem Space + +Ask questions to deepen understanding: + +**"What problem does this module solve?"** + +- Who feels this problem right now? +- What do they currently do without this module? +- What would change if this existed? + +**"What excites you about this idea?"** + +- Why THIS module? Why now? +- What's the vision — the dream outcome? +- If this module succeeds wildly, what does that look like? + +### 3. Identify the Users + +**"Who is this module for?"** + +Help them think about: +- Primary users — who will use this most? +- Secondary users — who else benefits? +- What do these users care about? + +### 4. Adjust for Mode + +**IF mode == Interactive:** +- Deep exploration, multiple rounds of questions +- Use Advanced Elicitation if they want to dig deeper + +**IF mode == Express:** +- Targeted questions, get the key insights quickly +- 2-3 rounds max + +**IF mode == YOLO:** +- Brief clarification, acknowledge what you have +- Move quickly to next step + +### 5. Capture Insights + +Summarize what you've learned: +- "So the core problem is {summary}" +- "The primary users are {users}" +- "What excites you most is {excitement}" + +"**Does this capture your vision? Anything to add or refine?**" + +### 6. Present MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input +- ONLY proceed to next step when user selects 'C' + +#### Menu Handling Logic: + +- IF A: Execute `{advancedElicitationTask}` for deeper exploration +- IF P: Execute `{partyModeWorkflow}` for creative ideation +- IF C: Load `{nextStepFile}` +- IF Any other: Help user, then redisplay menu + +--- + +## 🚨 SYSTEM SUCCESS/FAILURE METRICS + +### ✅ SUCCESS: + +- Problem space clearly understood +- User excitement identified +- Target users clarified +- Vision feels solid + +### ❌ SYSTEM FAILURE: + +- Skipping to solutions too quickly +- Not understanding the problem +- Not capturing what excites them + +**Master Rule:** Understand before you build. This step is about clarity, not solutions. diff --git a/src/modules/bmb/workflows/module/steps-b/step-03-module-type.md b/src/modules/bmb/workflows/module/steps-b/step-03-module-type.md new file mode 100644 index 00000000..0e5290cc --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-03-module-type.md @@ -0,0 +1,148 @@ +--- +name: 'step-03-module-type' +description: 'EARLY decision: Standalone, Extension, or Global module?' + +nextStepFile: './step-04-vision.md' +moduleStandardsFile: '../data/module-standards.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 3: Module Type + +## STEP GOAL: + +Make the EARLY key decision: Is this a Standalone, Extension, or Global module? This decision affects everything that follows. + +## 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 with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Architect** — you understand module types and their implications +- ✅ Help the user make an informed decision +- ✅ This is a commitment — get it right + +### Step-Specific Rules: + +- 🎯 This decision MUST happen early +- 🚫 FORBIDDEN to proceed without clarity on module type +- 💬 Explain the trade-offs clearly + +## EXECUTION PROTOCOLS: + +- 🎯 Load `{moduleStandardsFile}` to reference module types +- 🎯 Follow the MANDATORY SEQUENCE exactly +- 📖 Load next step when user selects 'C' + +--- + +## MANDATORY SEQUENCE + +**CRITICAL:** Follow this sequence exactly. + +### 1. Explain Module Types + +Load `{moduleStandardsFile}` and present the three types: + +"**Before we go further, we need to decide: What type of module is this?** This decision affects where files go, how installation works, and how the module integrates with BMAD." + +**Standalone Module:** +- A new, independent module +- Own module code and identity +- Installed alongside other modules +- Example: CIS — a creative innovation suite + +**Extension Module:** +- Extends an existing BMAD module +- Shares the base module's code (e.g., `code: bmm`) +- Adds or overrides agents/workflows +- Example: A security extension for BMM + +**Global Module:** +- Affects the entire BMAD framework +- Core functionality impacting all modules +- Rare — use sparingly +- Example: Universal logging/telemetry + +### 2. Determine Type Together + +**"Based on your idea, what type makes sense?"** + +Help them think through: +- **"Is this a brand new domain?"** → Likely Standalone +- **"Does this build on an existing module?"** → Likely Extension +- **"Does this affect all modules?"** → Possibly Global (be cautious) + +**If considering Extension:** +- "Which existing module does it extend?" +- "Are you adding new agents/workflows, or modifying existing ones?" +- "This means your `code:` will match the base module" + +**If considering Global:** +- "Are you sure? Global modules are rare." +- "Could this be a standalone module instead?" + +### 3. Confirm and Store + +Once decided: + +"**Module Type: {Standalone/Extension/Global}**" + +**IF Extension:** +"Base module to extend: {base-module-code}" +"Folder name will be unique: {e.g., bmm-security}" + +**Store this decision.** It affects: +- Where files are created +- What `code:` goes in module.yaml +- Installation behavior + +### 4. Preview Implications + +Briefly explain what this means: +- "As a {type}, your module will {implications}" +- "When we build, files will go to {location}" + +### 5. Present MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input +- User can change their mind before proceeding +- ONLY proceed to next step when user selects 'C' and confirms the type + +#### Menu Handling Logic: + +- IF A: Execute `{advancedElicitationTask}` for deeper exploration of the decision +- IF P: Execute `{partyModeWorkflow}` for brainstorming the approach +- IF C: Confirm the decision, then load `{nextStepFile}` +- IF Any other: Help user, then redisplay menu + +--- + +## 🚨 SYSTEM SUCCESS/FAILURE METRICS + +### ✅ SUCCESS: + +- Module type clearly decided +- User understands the implications +- Extension modules know their base module +- Decision is stored for later steps + +### ❌ SYSTEM FAILURE: + +- Proceeding without clear module type +- User doesn't understand the implications +- Extension module without clear base + +**Master Rule:** This is a gateway decision. Get clarity before moving forward. diff --git a/src/modules/bmb/workflows/module/steps-b/step-04-vision.md b/src/modules/bmb/workflows/module/steps-b/step-04-vision.md new file mode 100644 index 00000000..ada702aa --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-04-vision.md @@ -0,0 +1,82 @@ +--- +name: 'step-04-vision' +description: 'Deep dive into the vision — what would make this module extraordinary?' + +nextStepFile: './step-05-identity.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 4: Vision + +## STEP GOAL: + +Deep dive into the vision — explore what would make this module extraordinary, not just functional. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — visioning, dreaming big +- ✅ Push beyond "good enough" to "extraordinary" +- 💬 Ask "what would make this amazing?" + +### Step-Specific Rules: +- 🎯 This is about the vision, not the details +- 🚫 FORBIDDEN to jump to implementation + +--- + +## MANDATORY SEQUENCE + +### 1. Set the Visioning Tone + +"**Let's dream big. What would make this module extraordinary?**" + +"Good modules solve problems. Great modules inspire people. Let's make yours great." + +### 2. Explore the Vision + +Ask visioning questions: + +**"If this module succeeds wildly, what does that look like?"** +- How are people using it? +- What are they able to do that they couldn't before? +- What's the feeling when they use it? + +**"What would make someone say 'I love this module'?"** +- Delightful features? +- Surprising capabilities? +- The way it makes them feel? + +**"What's the 'secret sauce' — the thing that makes this special?"** + +### 3. Capture the Vision + +Summarize: +- "Your vision: {summary}" +- "What makes it special: {unique aspect}" +- "The dream outcome: {dream}" + +### 4. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Vision feels inspiring and clear +✅ "Extraordinary" elements identified +✅ User excited about the possibility diff --git a/src/modules/bmb/workflows/module/steps-b/step-05-identity.md b/src/modules/bmb/workflows/module/steps-b/step-05-identity.md new file mode 100644 index 00000000..ddb94a00 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-05-identity.md @@ -0,0 +1,96 @@ +--- +name: 'step-05-identity' +description: 'Module code, name, and personality/theme' + +nextStepFile: './step-06-users.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 5: Identity + +## STEP GOAL: + +Define the module's identity — code, name, and personality/theme. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — naming, branding, theming +- ✅ This is where personality comes in +- 💬 Have fun with this! + +### Step-Specific Rules: +- 🎯 Module code follows conventions (kebab-case, 2-20 chars) +- 🚫 FORBIDDEN to use reserved codes or existing module codes (for standalone) + +--- + +## MANDATORY SEQUENCE + +### 1. Module Code + +"**Let's give your module a code.**" + +Explain: +- kebab-case (e.g., `bmm`, `cis`, `healthcare-ai`) +- Short, memorable, descriptive +- 2-20 characters + +**IF Extension:** Code matches base module (already decided) + +**IF Standalone:** Propose options based on the module name/domain + +### 2. Module Name + +"**What's the display name?**" + +This is the human-facing name in module.yaml: +- "BMM: BMad Method Agile-AI Driven-Development" +- "CIS: Creative Innovation Suite" +- "Your Module: Your Description" + +### 3. Personality Theme + +"**Does your module have a personality or theme?**" + +Some modules have fun themes: +- BMM — Agile team (personas like John, Winston) +- CIS — Creative innovators +- BMGD — Game dev team + +**Questions:** +- Should the agents have a consistent theme? +- Any personality vibes? (Corporate team, fantasy party, reality show cast?) +- Or keep it professional/focused? + +### 4. Store Identity + +Capture: +- Module code: `{code}` +- Module name: `{name}` +- Personality theme: `{theme or "none/professional"}` + +### 5. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Module code decided and validated +✅ Module name defined +✅ Personality theme decided (even if "none") diff --git a/src/modules/bmb/workflows/module/steps-b/step-06-users.md b/src/modules/bmb/workflows/module/steps-b/step-06-users.md new file mode 100644 index 00000000..d42639f1 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-06-users.md @@ -0,0 +1,85 @@ +--- +name: 'step-06-users' +description: 'Who + How — personas AND user journey combined' + +nextStepFile: './step-07-value.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 6: Users + +## STEP GOAL: + +Define who the module is for AND how they'll use it — personas and user journey combined. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — user-centric, empathetic +- ✅ Help the user walk in their users' shoes +- 💬 Tell the story of how this will be used + +--- + +## MANDATORY SEQUENCE + +### 1. Define the Users + +"**Let's get specific about who this is for.**" + +**Primary Users:** +- Who will use this module most often? +- What's their role? (developer, designer, analyst, etc.) +- What's their skill level? (beginner, intermediate, expert) + +**Secondary Users:** +- Who else might use it? +- How is their experience different? + +### 2. Build User Personas + +Create 1-2 brief personas: + +**Persona 1:** +- Name/role: {e.g., "Sarah, Software Engineer"} +- Goals: {what they want to accomplish} +- Pain points: {what frustrates them now} +- What success looks like + +### 3. Tell the User Journey Story + +"**Let's walk through how someone would use this module.**" + +Tell a story: +1. User has a problem → {their situation} +2. They load the module → {what they expect} +3. They run an agent/workflow → {what happens} +4. They get a result → {the outcome} +5. This helps them → {the achievement} + +"**Can you see this flow? Does it match what you envision?**" + +### 4. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ User personas defined +✅ User journey story told +✅ User can visualize how their module will be used diff --git a/src/modules/bmb/workflows/module/steps-b/step-07-value.md b/src/modules/bmb/workflows/module/steps-b/step-07-value.md new file mode 100644 index 00000000..05de208a --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-07-value.md @@ -0,0 +1,75 @@ +--- +name: 'step-07-value' +description: 'Unique Value Proposition — what makes this module special?' + +nextStepFile: './step-08-agents.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 7: Value + +## STEP GOAL: + +Define the Unique Value Proposition — what makes this module special and why users would choose it. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — focused on differentiation +- ✅ Help identify what makes this unique +- 💬 Ask "why this and not something else?" + +--- + +## MANDATORY SEQUENCE + +### 1. Explore Differentiation + +"**What makes your module special? Why would someone choose it?**" + +Ask: +- **What can users do with your module that they can't do otherwise?** +- **What's the 'aha!' moment — when they realize this is exactly what they need?** +- **What problem does this solve better than anything else?** + +### 2. Identify the Unique Value Proposition + +Help craft a clear statement: + +**"For {target users}, {module name} provides {key benefit} unlike {alternatives} because {unique differentiator}."** + +Example: +"For software teams, BMM provides AI-driven agile delivery unlike manual processes because it orchestrates specialized agents for every phase of development." + +### 3. Competitive Context + +**"What else exists in this space? How is yours different?"** + +- Similar modules? +- Manual approaches? +- Why is yours better? + +### 4. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Unique value proposition articulated +✅ Differentiation from alternatives clear +✅ User can explain why someone would choose this module diff --git a/src/modules/bmb/workflows/module/steps-b/step-08-agents.md b/src/modules/bmb/workflows/module/steps-b/step-08-agents.md new file mode 100644 index 00000000..8769ebe9 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-08-agents.md @@ -0,0 +1,96 @@ +--- +name: 'step-08-agents' +description: 'Agent architecture — party mode simulation of interactions' + +nextStepFile: './step-09-workflows.md' +agentArchitectureFile: '../data/agent-architecture.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 8: Agents + +## STEP GOAL: + +Design the agent architecture — who's on your team? Simulate how agents might interact. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — team designer +- ✅ Focus on high-level planning (role, workflows, name, style) +- ✅ Don't worry about YAML format — agent-builder handles that + +### Step-Specific Rules: +- 🎯 Load `{agentArchitectureFile}` for guidance +- 🎯 Party mode is great here — simulate agent interactions +- 🚫 FORBIDDEN to design full agent specs (that's agent-builder's job) + +--- + +## MANDATORY SEQUENCE + +### 1. Single vs Multi-Agent + +Load `{agentArchitectureFile}` and ask: + +**"Could one expert agent handle this entire module, or do you need a team?"** + +Reference: +- **Single agent** — simpler, focused domain +- **Multi-agent** — different expertise areas, broader domain +- **BMM example** — 9 agents for complete software development team + +### 2. Design the Agent Team + +For each agent, capture: + +**Role:** What are they responsible for? +**Workflows:** Which workflows will they trigger? +**Name:** Human name (optional, for personality) +**Communication Style:** How do they talk? +**Memory:** Do they need to remember things over time? (hasSidecar) + +Keep it high-level — don't design full agent specs! + +### 3. Party Mode Simulation + +**"Want to simulate how your agents might interact?"** + +- IF yes: Execute `{partyModeWorkflow}` with different agent personas +- Let them "talk" to each other about a scenario +- This reveals how the team works together + +### 4. Agent Menu Coordination + +Explain the pattern: +- **Shared commands** — all agents have `[WS]` Workflow Status +- **Specialty commands** — each agent has unique commands +- **No overlap** — each command has one owner + +"**What commands might each agent have?**" + +### 5. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` — great for agent interaction simulation +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Single vs multi-agent decided +✅ Agent roles defined +✅ Agent-workflow mappings clear +✅ Agent interactions explored (via party mode if used) diff --git a/src/modules/bmb/workflows/module/steps-b/step-09-workflows.md b/src/modules/bmb/workflows/module/steps-b/step-09-workflows.md new file mode 100644 index 00000000..1feeb9e1 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-09-workflows.md @@ -0,0 +1,82 @@ +--- +name: 'step-09-workflows' +description: 'Workflow ecosystem — brainstorm what workflows could exist' + +nextStepFile: './step-10-tools.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 9: Workflows + +## STEP GOAL: + +Design the workflow ecosystem — brainstorm what workflows this module needs. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — workflow designer +- ✅ Focus on what workflows exist, not their details +- 💬 Brainstorm mode — generate lots of ideas + +### Step-Specific Rules: +- 🎯 Categorize workflows: Core, Feature, Utility +- 🚫 FORBIDDEN to design full workflow specs (that's create-workflow's job) + +--- + +## MANDATORY SEQUENCE + +### 1. Brainstorm Workflows + +"**What workflows should your module have?**" + +Explain categories: +- **Core Workflows** — essential functionality (2-3) +- **Feature Workflows** — specialized capabilities (3-5) +- **Utility Workflows** — supporting operations (1-3) + +Brainstorm together — generate a list! + +### 2. For Each Workflow + +Capture briefly: + +**Workflow name:** {e.g., "Create PRD", "Generate Test Plan"} +**Purpose:** One sentence describing what it does +**Input → Process → Output:** Brief flow +**Agent:** Which agent triggers this? + +### 3. Workflow Connections + +"**How do workflows connect?**" + +- Does workflow A feed into workflow B? +- Are there dependencies? +- What's the typical sequence? + +### 4. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` — great for workflow brainstorming +- IF P: Execute `{partyModeWorkflow}` — different perspectives on workflows +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Workflow list generated (core, feature, utility) +✅ Each workflow has a clear purpose +✅ Agent-workflow mappings defined +✅ Workflow connections understood diff --git a/src/modules/bmb/workflows/module/steps-b/step-10-tools.md b/src/modules/bmb/workflows/module/steps-b/step-10-tools.md new file mode 100644 index 00000000..0ead6322 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-10-tools.md @@ -0,0 +1,90 @@ +--- +name: 'step-10-tools' +description: 'MCP tools, integrations, external services the module might need' + +nextStepFile: './step-11-scenarios.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 10: Tools + +## STEP GOAL: + +Identify MCP tools, integrations, and external services the module might need. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — integrations thinker +- ✅ Keep it practical — only what's needed +- 💬 Ask "what external capabilities would help?" + +--- + +## MANDATORY SEQUENCE + +### 1. MCP Tools + +"**Does your module need any MCP (Model Context Protocol) tools?**" + +Explain: MCP tools connect agents to external capabilities. + +Common MCP tools: +- Database connectors +- Git integration +- Web automation (Playwright) +- API tools +- Knowledge bases + +**"What would help your module work better?"** + +### 2. External Services + +"**Any external services or APIs?**" + +- Web APIs? +- Cloud services? +- Data sources? +- Third-party tools? + +### 3. Module Integrations + +"**Does this integrate with other BMAD modules?**** + +- Uses workflows from other modules? +- Shares agents or extends them? +- Depends on another module's capabilities? + +### 4. Capture the List + +Document: +- **MCP Tools:** {list or "none"} +- **External Services:** {list or "none"} +- **Module Integrations:** {list or "none"} + +Note: These are placeholders for later — the create workflow can implement them. + +### 5. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ MCP tools identified (or "none" decided) +✅ External services documented (or "none") +✅ Module integrations noted (or "none") diff --git a/src/modules/bmb/workflows/module/steps-b/step-11-scenarios.md b/src/modules/bmb/workflows/module/steps-b/step-11-scenarios.md new file mode 100644 index 00000000..026e811c --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-11-scenarios.md @@ -0,0 +1,83 @@ +--- +name: 'step-11-scenarios' +description: 'User journey — tell stories of how people will use this module' + +nextStepFile: './step-12-creative.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 11: Scenarios + +## STEP GOAL: + +Tell stories of how users will actually use this module — bring the vision to life. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — storyteller +- ✅ Paint a picture of actual usage +- 💬 Narrative mode — "imagine this..." + +--- + +## MANDATORY SEQUENCE + +### 1. Set the Scene + +"**Let me tell you a story about how someone will use your module.**" + +"Close your eyes and imagine..." + +### 2. Tell Usage Stories + +Walk through 2-3 scenarios: + +**Scenario 1: First Use** +- User's situation: {context} +- They load the module: {what happens} +- They run an agent: {which agent, what workflow} +- They get a result: {outcome} +- They feel: {emotion} + +**Scenario 2: Advanced Use** +- Power user context +- Complex workflow +- Multiple agents collaborating +- Impressive result + +**Scenario 3: "Aha!" Moment** +- When the module really shines +- Surprising capability +- Delightful experience + +### 3. Validate the Stories + +"**Do these stories feel right? Can you see your module being used this way?**" + +Adjust based on feedback. + +### 4. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ 2-3 usage scenarios told +✅ User can visualize their module in action +✅ Stories feel authentic and exciting diff --git a/src/modules/bmb/workflows/module/steps-b/step-12-creative.md b/src/modules/bmb/workflows/module/steps-b/step-12-creative.md new file mode 100644 index 00000000..dc2486c7 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-12-creative.md @@ -0,0 +1,94 @@ +--- +name: 'step-12-creative' +description: 'Creative features — easter eggs, lore, delightful touches' + +nextStepFile: './step-13-review.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 12: Creative Features + +## STEP GOAL: + +Add the magic — easter eggs, lore, delightful touches that make the module memorable. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — creative magician +- ✅ This is where personality comes alive +- 💬 "What would make someone smile?" + +### Step-Specific Rules: +- 🎯 This is optional creativity — not all modules need this +- 🎯 Party mode is perfect here +- ✨ Have fun with it! + +--- + +## MANDATORY SEQUENCE + +### 1. Set the Creative Tone + +"**Now for the fun part — what makes your module delightful?** ✨ + +"Great modules work. Amazing modules have personality. What's yours?" + +### 2. Explore Creative Elements + +**Personality & Theming:** +- Do the agents have running jokes or catchphrases? +- Is there a consistent tone or vibe? +- Any thematic elements? (space, medieval, corporate, etc.) + +**Easter Eggs:** +- Hidden commands or responses? +- Fun interactions when users try certain things? +- Surprises that delight? + +**Module Lore:** +- Backstory for the agents? +- A consistent "universe" the module lives in? +- Narrative elements? + +### 3. Party Mode Ideation + +"**Want to brainstorm creative ideas together?**" + +- IF yes: Execute `{partyModeWorkflow}` with creative focus +- Generate wild ideas +- Keep the gems, discard the rest + +### 4. Capture the Creative Elements + +Document: +- **Personality theme:** {theme or "none"} +- **Easter eggs:** {ideas or "none"} +- **Module lore:** {concepts or "none"} + +Note: These are optional — a module can be great without them. + +### 5. MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +- IF A: Execute `{advancedElicitationTask}` +- IF P: Execute `{partyModeWorkflow}` — perfect for creative brainstorming! +- IF C: Load `{nextStepFile}` +- IF Any other: Help, then redisplay + +--- + +## Success Metrics + +✅ Creative elements explored (even if "none") +✅ Personality themes considered +✅ User excited about the possibilities diff --git a/src/modules/bmb/workflows/module/steps-b/step-13-review.md b/src/modules/bmb/workflows/module/steps-b/step-13-review.md new file mode 100644 index 00000000..e28ceb06 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-13-review.md @@ -0,0 +1,104 @@ +--- +name: 'step-13-review' +description: 'Read through the brief together, "Does this excite you?"' + +nextStepFile: './step-14-finalize.md' +briefTemplateFile: '../../templates/brief-template.md' +--- + +# Step 13: Review + +## STEP GOAL: + +Read through the brief together and confirm the vision is complete and exciting. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — review facilitator +- ✅ Read back what we've discovered +- ✅ Ensure nothing important is missing + +--- + +## MANDATORY SEQUENCE + +### 1. Gather All Decisions + +Collect everything from steps 1-12: + +- Module type: {Standalone/Extension/Global} +- Module code: {code} +- Module name: {name} +- Vision: {vision summary} +- Users: {who it's for} +- Value proposition: {what makes it special} +- Agents: {agent team} +- Workflows: {workflow list} +- Tools: {MCP, integrations} +- Creative features: {personality, easter eggs} + +### 2. Read It Back + +"**Let me read back what we've designed together.**" + +Present the brief in an inspiring way: + +"**Your Module: {name} ({code})**" + +"**Vision:** {vision}" + +"**For:** {users}" + +"**What makes it special:** {value proposition}" + +"**Agent Team:** {agents}" + +"**Key Workflows:** {workflows}" + +"**Creative Touch:** {creative elements}" + +### 3. The Excitement Check + +"**Does this excite you?**** + +- Is this the module you envisioned? +- Anything missing? +- Anything you want to change?" + +**Make updates if needed.** + +### 4. Final Confirmation + +"**Are you happy with this brief? Ready to finalize?**" + +### 5. MENU OPTIONS + +**Select an Option:** [B] Back to refine [C] Continue to Finalize + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input +- ONLY proceed to next step when user selects 'C' and confirms + +#### Menu Handling Logic: + +- IF B: Go back to specific step to refine (ask which one) +- IF C: Load `{nextStepFile}` +- IF Any other: Ask for clarification, then redisplay menu + +--- + +## Success Metrics + +✅ Brief reviewed completely +✅ User confirms excitement +✅ No major gaps identified +✅ Ready to finalize diff --git a/src/modules/bmb/workflows/module/steps-b/step-14-finalize.md b/src/modules/bmb/workflows/module/steps-b/step-14-finalize.md new file mode 100644 index 00000000..1e7fc4cf --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-b/step-14-finalize.md @@ -0,0 +1,117 @@ +--- +name: 'step-14-finalize' +description: 'Final polish, output the brief document' + +briefTemplateFile: '../../templates/brief-template.md' +bmbCreationsOutputFolder: '{bmb_creations_output_folder}' +--- + +# Step 14: Finalize + +## STEP GOAL: + +Create the final module brief document and save it to the bmb-creations output folder. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Architect** — completing the brief +- ✅ Assemble everything into a beautiful document +- ✅ Celebrate the completion! + +--- + +## MANDATORY SEQUENCE + +### 1. Load Template + +Load `{briefTemplateFile}` to use as the base. + +### 2. Assemble the Brief + +Fill in all sections with what we've gathered: + +**Frontmatter:** +- date: {today's date} +- user_name: {from config} +- module_code: {from step 5} +- module_type: {from step 3} +- status: "Ready for Development" + +**Executive Summary:** +- module_vision: {from step 4} +- module_category: {derived from vision} +- target_users: {from step 6} +- complexity_level: {assess from agent/workflow count} + +**Module Identity:** +- module_code, module_name: {from step 5} +- module_identity: {vision summary} +- personality_theme: {from step 5 or step 12} + +**Module Type:** +- module_type: {from step 3} +- module_type_explanation: {explain the choice} + +**Unique Value Proposition:** +- unique_value_proposition: {from step 7} +- value_proposition_details: {elaborate} + +**User Scenarios:** +- target_users: {from step 6} +- primary_use_case: {from step 11} +- user_journey: {from step 11} + +**Agent Architecture:** +- agent_count_strategy: {single or multi, why} +- agent_roster_table: {from step 8} +- agent_interaction_model: {how they work together} +- agent_communication_style: {from step 8} + +**Workflow Ecosystem:** +- core_workflows: {from step 9} +- feature_workflows: {from step 9} +- utility_workflows: {from step 9} + +**Tools & Integrations:** +- mcp_tools: {from step 10} +- external_services: {from step 10} +- module_integrations: {from step 10} + +**Creative Features:** +- creative_personality: {from step 12} +- easter_eggs: {from step 12} +- module_lore: {from step 12} + +### 3. Write the Brief File + +Save to: `{bmbCreationsOutputFolder}/modules/module-brief-{module_code}.md` + +### 4. Celebrate and Next Steps + +"**🎉 Your module brief is complete!**" + +"**Saved to:** {file path}" + +"**Next steps:**" +1. **Review the brief** — Make sure it captures your vision +2. **Run the module workflow (Create mode)** — This will build the module structure +3. **Create agents** — Use the agent-builder workflow for each agent +4. **Create workflows** — Use the workflow-builder workflow for each workflow +5. **Test and iterate** — Install and refine + +"**You've created something amazing. Let's build it!**" + +--- + +## Success Metrics + +✅ Brief document created and saved +✅ All sections filled with gathered information +✅ File path provided to user +✅ Next steps clearly explained diff --git a/src/modules/bmb/workflows/module/steps-c/step-01-load-brief.md b/src/modules/bmb/workflows/module/steps-c/step-01-load-brief.md new file mode 100644 index 00000000..f89a763c --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-01-load-brief.md @@ -0,0 +1,178 @@ +--- +name: 'step-01-load-brief' +description: 'Load brief or user write-up, validate completeness' + +nextStepFile: './step-02-structure.md' +continueFile: './step-01b-continue.md' +agentSpecTemplate: '../../templates/agent-spec-template.md' +workflowSpecTemplate: '../../templates/workflow-spec-template.md' +moduleStandardsFile: '../../data/module-standards.md' +moduleYamlConventionsFile: '../../data/module-yaml-conventions.md' +advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml' +partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md' +--- + +# Step 1: Load Brief (Create Mode) + +## STEP GOAL: + +Load the module brief (or get a detailed user write-up) and validate it has the information needed to build the module. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — structured, competent, ready to build +- ✅ Validate input before proceeding +- ✅ Ensure we have what we need to succeed + +### Step-Specific Rules: + +- 🎯 This is a continuable workflow — check for existing work +- 🚫 FORBIDDEN to proceed without complete brief or write-up +- 💾 Track progress for continuation + +## EXECUTION PROTOCOLS: + +- 🎯 Follow the MANDATORY SEQUENCE exactly +- 📖 Create/update output file to track progress +- 🚫 FORBIDDEN to load next step until brief is validated + +## CONTEXT BOUNDARIES: + +- Input: Module brief from Brief mode OR user-provided write-up +- Output: Module structure ready for implementation +- This mode requires complete information to proceed + +--- + +## MANDATORY SEQUENCE + +**CRITICAL:** Follow this sequence exactly. + +### 1. Check for Existing Work + +Look for existing module build state: +- Check for `module-build-{module_code}.md` in output folder +- If exists AND has `stepsCompleted` → load `{continueFile}` +- If not exists → continue to step 1.2 + +### 2. Get the Brief or Write-Up + +"**Welcome to Create mode! I'll build your module structure from your brief.**" + +**"Where is your module brief?"** + +Options: +- **A)** Brief from Brief mode → `{bmb_creations_output_folder}/modules/module-brief-{code}.md` +- **B)** User-provided write-up → Ask for path +- **C)** Detailed description → User describes the module now + +**IF A or B:** Load and read the brief/write-up + +**IF C:** Gather the needed information through conversation: +- Module name and code +- Module type (Standalone/Extension/Global) +- Agent roster (roles, names) +- Workflow list +- Key features and tools + +### 3. Validate Brief Completeness + +Load `{moduleStandardsFile}` and check that the brief contains: + +**Required Information:** +- [ ] Module code and name +- [ ] Module type (Standalone/Extension/Global) +- [ ] Module vision/purpose +- [ ] Agent roster (at least minimum) +- [ ] Workflow list (at least core workflows) +- [ ] Any special tools or integrations + +**IF Extension Module:** +- [ ] Base module code (for matching) + +**IF anything missing:** + +"**Your brief is missing some key information. Let me help you complete it.**" + +Use `{advancedElicitationTask}` if needed to gather missing details. + +### 4. Confirm and Create Tracking + +Once validated: + +"**I have everything I need to build your module!**" + +"**Module:** {name} ({code})" +"**Type:** {Standalone/Extension/Global}" + +Create or update the build tracking file: + +```yaml +--- +moduleCode: {code} +moduleName: {name} +moduleType: {type} +briefFile: {brief path or "user-provided"} +stepsCompleted: ['step-01-load-brief'] +created: {date} +status: IN_PROGRESS +--- +``` + +### 5. Preview the Build Process + +"**Here's what I'll build for you:**" + +1. Directory structure (based on module type) +2. module.yaml with install configuration +3. _module-installer/ folder (if needed) +4. Agent placeholder/spec files +5. Workflow placeholder/spec files +6. README.md and TODO.md + +"**Ready to start building?**" + +### 6. Present MENU OPTIONS + +**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input +- ONLY proceed to next step when user selects 'C' + +#### Menu Handling Logic: + +- IF A: Execute `{advancedElicitationTask}` for any refinements +- IF P: Execute `{partyModeWorkflow}` for creative pre-build discussion +- IF C: Update tracking file, then load `{nextStepFile}` +- IF Any other: Help user, then redisplay menu + +--- + +## 🚨 SYSTEM SUCCESS/FAILURE METRICS + +### ✅ SUCCESS: + +- Brief or write-up loaded +- All required information validated +- Tracking file created +- User confirms ready to build + +### ❌ SYSTEM FAILURE: + +- Proceeding with incomplete brief +- Missing key information (code, type, agents, workflows) +- Not validating extension base module + +**Master Rule:** Garbage in, garbage out. Ensure we have complete information before building. diff --git a/src/modules/bmb/workflows/module/steps-c/step-01b-continue.md b/src/modules/bmb/workflows/module/steps-c/step-01b-continue.md new file mode 100644 index 00000000..1f10ff64 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-01b-continue.md @@ -0,0 +1,83 @@ +--- +name: 'step-01b-continue' +description: 'Handle workflow continuation for Create mode' + +workflowFile: '../workflow.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +--- + +# Step 1b: Continue (Create Mode) + +## STEP GOAL: + +Resume a paused Create mode session by loading the build tracking state and routing to the correct step. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — picking up where we left off +- ✅ Warm welcome back +- ✅ Seamless resume + +--- + +## MANDATORY SEQUENCE + +### 1. Welcome Back + +"**Welcome back to the Module Builder!** 👋" + +### 2. Load Build Tracking + +Load `{buildTrackingFile}` and read: +- `stepsCompleted` array +- `moduleCode` +- `moduleName` +- `moduleType` +- `status` + +### 3. Report Progress + +"**Here's where we are:**" + +**Module:** {moduleName} ({moduleCode}) +**Type:** {moduleType} +**Status:** {status} + +**Completed steps:** +- {list completed steps} + +### 4. Determine Next Step + +Find the last completed step and route to the next one: + +| Last Completed | Next Step | +|---------------|-----------| +| step-01-load-brief | step-02-structure | +| step-02-structure | step-03-config | +| step-03-config | step-04-installer | +| step-04-installer | step-05-agents | +| step-05-agents | step-06-workflows | +| step-06-workflows | step-07-docs | +| step-07-docs | step-08-complete | + +### 5. Route to Next Step + +"**Continuing to: {next step name}**" + +Load the appropriate step file and execute. + +--- + +## Success Metrics + +✅ User welcomed back +✅ Build state loaded +✅ Correct next step identified +✅ Seamless resume diff --git a/src/modules/bmb/workflows/module/steps-c/step-02-structure.md b/src/modules/bmb/workflows/module/steps-c/step-02-structure.md new file mode 100644 index 00000000..0bb90e6c --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-02-structure.md @@ -0,0 +1,109 @@ +--- +name: 'step-02-structure' +description: 'Create directory structure based on module type' + +nextStepFile: './step-03-config.md' +moduleStandardsFile: '../../data/module-standards.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +--- + +# Step 2: Directory Structure + +## STEP GOAL: + +Create the module directory structure based on the module type (Standalone/Extension/Global). + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — creating the foundation +- ✅ Structure follows standards +- ✅ Confirm before creating + +--- + +## MANDATORY SEQUENCE + +### 1. Determine Target Location + +Load `{moduleStandardsFile}` and determine location: + +**IF Standalone:** +- Target: `src/modules/{module_code}/` + +**IF Extension:** +- Target: `src/modules/{base_module_code}/extensions/{extension_folder_name}/` +- Get base_module_code from brief +- extension_folder_name: unique name (e.g., `{base_module}-{feature}`) + +**IF Global:** +- Target: `src/modules/{module_code}/` +- Will add `global: true` to module.yaml + +### 2. Present Structure Plan + +"**I'll create this directory structure:**" + +``` +{target_location}/ +├── module.yaml +├── README.md +├── agents/ +│ └── {agent files} +├── workflows/ +│ └── {workflow folders} +└── _module-installer/ + ├── installer.js + └── platform-specifics/ +``` + +"**Location:** {target_location}" +"**Module type:** {Standalone/Extension/Global}" + +### 3. Confirm and Create + +"**Shall I create the directory structure?**" + +**IF confirmed:** + +Create folders: +- `{target_location}/agents/` +- `{target_location}/workflows/` +- `{target_location}/_module-installer/` +- `{target_location}/_module-installer/platform-specifics/` + +### 4. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-02-structure' to stepsCompleted +- Set targetLocation +- Update status + +### 5. Report Success + +"**✓ Directory structure created at:** {target_location}" + +### 6. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ Directory structure created +✅ Location based on module type +✅ Folders: agents/, workflows/, _module-installer/ +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-03-config.md b/src/modules/bmb/workflows/module/steps-c/step-03-config.md new file mode 100644 index 00000000..c4c02559 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-03-config.md @@ -0,0 +1,118 @@ +--- +name: 'step-03-config' +description: 'Generate module.yaml with install questions' + +nextStepFile: './step-04-installer.md' +moduleYamlConventionsFile: '../../data/module-yaml-conventions.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +--- + +# Step 3: Module Configuration + +## STEP GOAL: + +Generate module.yaml with install configuration and custom variables. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — configuration expert +- ✅ Follow module.yaml conventions +- ✅ Ask about custom variables + +--- + +## MANDATORY SEQUENCE + +### 1. Load Conventions + +Load `{moduleYamlConventionsFile}` for reference. + +### 2. Generate Base module.yaml + +Create `{targetLocation}/module.yaml` with: + +**Required fields:** +```yaml +code: {module_code} +name: "{module_display_name}" +header: "{brief_header}" +subheader: "{additional_context}" +default_selected: false +``` + +**Note for Extension modules:** `code:` matches base module + +### 3. Add Custom Variables + +"**Does your module need any custom configuration variables?**" + +Reference the brief for: +- User input needed during installation +- Paths or settings users should configure +- Feature flags or options + +**For each variable, create:** +```yaml +variable_name: + prompt: "{question to ask}" + default: "{default_value}" + result: "{template}" +``` + +**Common patterns:** +- Text input (names, titles) +- Boolean (enable features) +- Single-select (experience levels) +- Multi-select (platforms) +- Paths (artifact folders) + +**IF no custom variables needed:** + +Keep it simple — just use core config variables. + +### 4. Write module.yaml + +Write the complete module.yaml to `{targetLocation}/module.yaml` + +### 5. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-03-config' to stepsCompleted +- Note: module.yaml created + +### 6. Report and Confirm + +"**✓ module.yaml created with:**" + +- Code: {code} +- {count} custom variables + +"**Review the file and confirm it looks correct.**" + +### 7. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ module.yaml created +✅ Required fields populated +✅ Custom variables added (if any) +✅ Extension modules use correct code +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-04-installer.md b/src/modules/bmb/workflows/module/steps-c/step-04-installer.md new file mode 100644 index 00000000..229519c3 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-04-installer.md @@ -0,0 +1,160 @@ +--- +name: 'step-04-installer' +description: 'Setup _module-installer folder and installer.js' + +nextStepFile: './step-05-agents.md' +moduleInstallerStandardsFile: '../../data/module-installer-standards.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +--- + +# Step 4: Module Installer + +## STEP GOAL: + +Setup the _module-installer folder and create installer.js if needed. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — installer expert +- ✅ Not all modules need installers +- ✅ Follow installer patterns + +--- + +## MANDATORY SEQUENCE + +### 1. Assess Need for Installer + +Load `{moduleInstallerStandardsFile}` and ask: + +"**Does your module need an installer?**" + +Installers are needed when: +- Creating directories from config variables +- Copying template/assets +- IDE-specific configuration +- Platform-specific setup + +**If NO installer needed:** + +Skip to step 5. Folder structure already exists. + +**If YES:** Continue to step 4.2 + +### 2. Determine Installer Requirements + +"**What should the installer do?**" + +- Create directories? (which variables) +- Copy assets? (from where) +- IDE configuration? (which IDEs) +- Platform-specific setup? + +### 3. Create installer.js + +Create `{targetLocation}/_module-installer/installer.js`: + +```javascript +const fs = require('fs-extra'); +const path = require('node:path'); +const chalk = require('chalk'); +const platformCodes = require(path.join(__dirname, '../../../../tools/cli/lib/platform-codes')); + +/** + * {module_name} Module Installer + */ +async function install(options) { + const { projectRoot, config, installedIDEs, logger } = options; + + try { + logger.log(chalk.blue('Installing {module_name}...')); + + // Create directories + if (config['{variable_name}']) { + const dirConfig = config['{variable_name}'].replace('{project-root}/', ''); + const dirPath = path.join(projectRoot, dirConfig); + if (!(await fs.pathExists(dirPath))) { + logger.log(chalk.yellow(`Creating directory: ${dirConfig}`)); + await fs.ensureDir(dirPath); + } + } + + // IDE-specific configuration + if (installedIDEs && installedIDEs.length > 0) { + for (const ide of installedIDEs) { + await configureForIDE(ide, projectRoot, config, logger); + } + } + + logger.log(chalk.green('✓ {module_name} installation complete')); + return true; + } catch (error) { + logger.error(chalk.red(`Error installing module: ${error.message}`)); + return false; + } +} + +async function configureForIDE(ide, projectRoot, config, logger) { + if (!platformCodes.isValidPlatform(ide)) { + logger.warn(chalk.yellow(`Unknown platform: '${ide}'. Skipping.`)); + return; + } + + const platformSpecificPath = path.join(__dirname, 'platform-specifics', `${ide}.js`); + + try { + if (await fs.pathExists(platformSpecificPath)) { + const platformHandler = require(platformSpecificPath); + if (typeof platformHandler.install === 'function') { + await platformHandler.install({ projectRoot, config, logger }); + } + } + } catch (error) { + logger.warn(chalk.yellow(`Warning: Could not configure ${ide}: ${error.message}`)); + } +} + +module.exports = { install }; +``` + +Customize based on module requirements. + +### 4. Platform-Specific Handlers (Optional) + +If IDE-specific setup needed, ask which IDEs and create: +- `{targetLocation}/_module-installer/platform-specifics/claude-code.js` +- `{targetLocation}/_module-installer/platform-specifics/windsurf.js` +- etc. + +### 5. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-04-installer' to stepsCompleted +- Note: installer created or skipped + +### 6. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ Assessed installer need +✅ installer.js created (if needed) +✅ Platform handlers created (if needed) +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-05-agents.md b/src/modules/bmb/workflows/module/steps-c/step-05-agents.md new file mode 100644 index 00000000..5c89aad2 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-05-agents.md @@ -0,0 +1,167 @@ +--- +name: 'step-05-agents' +description: 'Create agent placeholder/spec files' + +nextStepFile: './step-06-workflows.md' +agentSpecTemplate: '../../templates/agent-spec-template.md' +agentArchitectureFile: '../../data/agent-architecture.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +--- + +# Step 5: Agent Specs + +## STEP GOAL: + +Create agent placeholder/spec files based on the brief. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — creating agent specs +- ✅ These are specs, not full agents (agent-builder does that) +- ✅ Keep it high-level + +--- + +## MANDATORY SEQUENCE + +### 1. Load Agent Architecture + +Load `{agentArchitectureFile}` for guidance. + +### 2. Get Agent Roster from Brief + +Extract from the brief: +- Agent names +- Roles +- Workflows they're responsible for +- Communication style +- Memory needs (hasSidecar) + +### 3. For Each Agent, Create Spec + +Load `{agentSpecTemplate}` and create: + +`{targetLocation}/agents/{agent_name}.spec.md` + +With content: +```markdown +# Agent Specification: {agent_name} + +**Module:** {module_code} +**Status:** Placeholder — To be created via create-agent workflow +**Created:** {date} + +--- + +## Agent Metadata + +```yaml +agent: + metadata: + id: "_bmad/{module_code}/agents/{agent_file_name}.md" + name: {agent_human_name} + title: {agent_title} + icon: {agent_icon} + module: {module_code} + hasSidecar: {false/true} +``` + +--- + +## Agent Persona + +### Role + +{agent_role} + +### Identity + +{agent_identity} + +### Communication Style + +{agent_communication_style} + +### Principles + +{agent_principles} + +--- + +## Agent Menu + +### Planned Commands + +| Trigger | Command | Description | Workflow | +|---------|---------|-------------|----------| +{agent_menu_table} + +--- + +## Agent Integration + +### Shared Context + +- References: `{shared_context_files}` +- Collaboration with: {collaborating_agents} + +### Workflow References + +{workflow_references} + +--- + +## Implementation Notes + +**Use the create-agent workflow to build this agent.** + +--- + +_Spec created on {date} via BMAD Module workflow_ +``` + +### 4. Create All Agent Specs + +Iterate through each agent from the brief and create their spec file. + +### 5. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-05-agents' to stepsCompleted +- List all agent specs created + +### 6. Report Success + +"**✓ Agent specs created:**" + +- {count} agent spec files +- {list agent names} + +"**These are specs/blueprints. Use the create-agent workflow to build each agent.**" + +### 7. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ Agent spec files created for all agents +✅ Each spec has role, workflows, menu triggers +✅ hasSidecar documented (memory decision) +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-06-workflows.md b/src/modules/bmb/workflows/module/steps-c/step-06-workflows.md new file mode 100644 index 00000000..7544c0af --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-06-workflows.md @@ -0,0 +1,183 @@ +--- +name: 'step-06-workflows' +description: 'Create workflow placeholder/spec files' + +nextStepFile: './step-07-docs.md' +workflowSpecTemplate: '../../templates/workflow-spec-template.md' +buildTrackingFile: '{bmad_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +--- + +# Step 6: Workflow Specs + +## STEP GOAL: + +Create workflow placeholder/spec files based on the brief. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — creating workflow specs +- ✅ These are specs, not full workflows (workflow-builder does that) +- ✅ Keep it high-level + +--- + +## MANDATORY SEQUENCE + +### 1. Get Workflow List from Brief + +Extract from the brief: +- Core workflows +- Feature workflows +- Utility workflows + +For each workflow: +- Name +- Purpose/goal +- Primary agent +- Input/output requirements + +### 2. For Each Workflow, Create Spec + +Load `{workflowSpecTemplate}` and create: + +`{targetLocation}/workflows/{workflow_name}/{workflow_name}.spec.md` + +With content: +```markdown +# Workflow Specification: {workflow_name} + +**Module:** {module_code} +**Status:** Placeholder — To be created via create-workflow workflow +**Created:** {date} + +--- + +## Workflow Overview + +**Goal:** {workflow_goal} + +**Description:** {workflow_description} + +**Workflow Type:** {workflow_type} + +--- + +## Workflow Structure + +### Entry Point + +```yaml +--- +name: {workflow_name} +description: {workflow_description} +web_bundle: true +installed_path: '{project-root}/_bmad/{module_code}/workflows/{workflow_folder_name}' +--- +``` + +### Mode + +- [ ] Create-only (steps-c/) +- [ ] Tri-modal (steps-c/, steps-e/, steps-v/) + +--- + +## Planned Steps + +| Step | Name | Goal | +|------|------|------| +{workflow_steps_table} + +--- + +## Workflow Inputs + +### Required Inputs + +{required_inputs} + +### Optional Inputs + +{optional_inputs} + +--- + +## Workflow Outputs + +### Output Format + +- [ ] Document-producing +- [ ] Non-document + +### Output Files + +{output_files} + +--- + +## Agent Integration + +### Primary Agent + +{primary_agent} + +### Other Agents + +{other_agents} + +--- + +## Implementation Notes + +**Use the create-workflow workflow to build this workflow.** + +--- + +_Spec created on {date} via BMAD Module workflow_ +``` + +### 3. Create All Workflow Specs + +Iterate through each workflow from the brief and create their spec file. + +### 4. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-06-workflows' to stepsCompleted +- List all workflow specs created + +### 5. Report Success + +"**✓ Workflow specs created:**" + +- {count} workflow spec files +- {list workflow names} + +"**These are specs/blueprints. Use the create-workflow workflow to build each workflow.**" + +### 6. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ Workflow spec files created for all workflows +✅ Each spec has goal, steps, inputs/outputs +✅ Agent associations documented +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-07-docs.md b/src/modules/bmb/workflows/module/steps-c/step-07-docs.md new file mode 100644 index 00000000..320cd004 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-07-docs.md @@ -0,0 +1,402 @@ +--- +name: 'step-07-docs' +description: 'Generate README.md, TODO.md, and docs/ folder' + +nextStepFile: './step-08-complete.md' +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +--- + +# Step 7: Documentation + +## STEP GOAL: + +Generate README.md, TODO.md, and user documentation in docs/ folder for the module. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: Read the complete step file before taking any action +- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read +- 📋 YOU ARE A FACILITATOR, not a content generator +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — documentation creator +- ✅ README is the user's first impression +- ✅ TODO tracks remaining work +- ✅ docs/ provides user-facing documentation + +--- + +## MANDATORY SEQUENCE + +### 1. Generate README.md + +Create `{targetLocation}/README.md`: + +```markdown +# {module_display_name} + +{brief_header} + +{subheader} + +--- + +## Overview + +{module_overview_from_brief} + +--- + +## Installation + +```bash +bmad install {module_code} +``` + +--- + +## Quick Start + +{quick_start_from_brief} + +**For detailed documentation, see [docs/](docs/).** + +--- + +## Components + +### Agents + +{agent_list_from_brief} + +### Workflows + +{workflow_list_from_brief} + +--- + +## Configuration + +The module supports these configuration options (set during installation): + +{config_variables_from_module_yaml} + +--- + +## Module Structure + +``` +{module_code}/ +├── module.yaml +├── README.md +├── TODO.md +├── docs/ +│ ├── getting-started.md +│ ├── agents.md +│ ├── workflows.md +│ └── examples.md +├── agents/ +├── workflows/ +└── _module-installer/ +``` + +--- + +## Documentation + +For detailed user guides and documentation, see the **[docs/](docs/)** folder: +- [Getting Started](docs/getting-started.md) +- [Agents Reference](docs/agents.md) +- [Workflows Reference](docs/workflows.md) +- [Examples](docs/examples.md) + +--- + +## Development Status + +This module is currently in development. The following components are planned: + +- [ ] Agents: {agent_count} agents +- [ ] Workflows: {workflow_count} workflows + +See TODO.md for detailed status. + +--- + +## Author + +Created via BMAD Module workflow + +--- + +## License + +Part of the BMAD framework. +``` + +### 2. Generate TODO.md + +Create `{targetLocation}/TODO.md`: + +```markdown +# TODO: {module_display_name} + +Development roadmap for {module_code} module. + +--- + +## Agents to Build + +{for each agent} +- [ ] {agent_name} ({agent_title}) + - Use: `bmad:bmb:agents:agent-builder` + - Spec: `agents/{agent_name}.spec.md` + +--- + +## Workflows to Build + +{for each workflow} +- [ ] {workflow_name} + - Use: `bmad:bmb:workflows:workflow` or `/workflow` + - Spec: `workflows/{workflow_name}/{workflow_name}.spec.md` + +--- + +## Installation Testing + +- [ ] Test installation with `bmad install` +- [ ] Verify module.yaml prompts work correctly +- [ ] Test installer.js (if present) +- [ ] Test IDE-specific handlers (if present) + +--- + +## Documentation + +- [ ] Complete README.md with usage examples +- [ ] Enhance docs/ folder with more guides +- [ ] Add troubleshooting section +- [ ] Document configuration options + +--- + +## Next Steps + +1. Build agents using create-agent workflow +2. Build workflows using create-workflow workflow +3. Test installation and functionality +4. Iterate based on testing + +--- + +_Last updated: {date}_ +``` + +### 3. Create docs/ Folder + +Create `{targetLocation}/docs/` folder with user documentation: + +### 3.1. getting-started.md + +```markdown +# Getting Started with {module_display_name} + +Welcome to {module_code}! This guide will help you get up and running. + +--- + +## What This Module Does + +{module_purpose_from_brief} + +--- + +## Installation + +If you haven't installed the module yet: + +```bash +bmad install {module_code} +``` + +Follow the prompts to configure the module for your needs. + +--- + +## First Steps + +{first_steps_from_brief} + +--- + +## Common Use Cases + +{common_use_cases_from_brief} + +--- + +## What's Next? + +- Check out the [Agents Reference](agents.md) to meet your team +- Browse the [Workflows Reference](workflows.md) to see what you can do +- See [Examples](examples.md) for real-world usage + +--- + +## Need Help? + +If you run into issues: +1. Check the troubleshooting section in examples.md +2. Review your module configuration +3. Consult the broader BMAD documentation +``` + +### 3.2. agents.md + +```markdown +# Agents Reference + +{module_code} includes {agent_count} specialized agents: + +--- + +{for each agent} +## {agent_title} + +**ID:** `{agent_id}` +**Icon:** {agent_icon} + +**Role:** +{agent_role_from_spec} + +**When to Use:** +{when_to_use_from_spec} + +**Key Capabilities:** +{agent_capabilities_from_spec} + +**Menu Trigger(s):** +{menu_triggers_from_spec} + +--- +``` + +### 3.3. workflows.md + +```markdown +# Workflows Reference + +{module_code} includes {workflow_count} workflows: + +--- + +{for each workflow} +## {workflow_title} + +**ID:** `{workflow_id}` +**Workflow:** `{workflow_name}` + +**Purpose:** +{workflow_purpose_from_spec} + +**When to Use:** +{when_to_use_from_spec} + +**Key Steps:** +{workflow_steps_outline_from_spec} + +**Agent(s):** +{associated_agents_from_spec} + +--- +``` + +### 3.4. examples.md + +```markdown +# Examples & Use Cases + +This section provides practical examples for using {module_display_name}. + +--- + +## Example Workflows + +{example_workflows_from_brief} + +--- + +## Common Scenarios + +{common_scenarios_from_brief} + +--- + +## Tips & Tricks + +{tips_from_brief} + +--- + +## Troubleshooting + +### Common Issues + +{troubleshooting_from_brief} + +--- + +## Getting More Help + +- Review the main BMAD documentation +- Check module configuration in module.yaml +- Verify all agents and workflows are properly installed +``` + +### 4. Update Build Tracking + +Update `{buildTrackingFile}`: +- Add 'step-07-docs' to stepsCompleted +- Note: README.md, TODO.md, and docs/ folder created + +### 5. Report Success + +"**✓ Documentation created:**" + +- README.md — module overview and navigation +- TODO.md — development roadmap +- docs/ — user documentation folder + - getting-started.md — quick start guide + - agents.md — agent reference + - workflows.md — workflow reference + - examples.md — practical examples + +"**User documentation is valuable even with placeholder agent/workflow specs — users will understand what each component does and how to use them.**" + +"**TODO.md tracks the remaining work:**" +- Build {agent_count} agents +- Build {workflow_count} workflows +- Test installation + +### 6. MENU OPTIONS + +**Select an Option:** [C] Continue + +- IF C: Update tracking, load `{nextStepFile}` +- IF Any other: Help, then redisplay menu + +--- + +## Success Metrics + +✅ README.md created with all sections +✅ TODO.md created with agent/workflow checklist +✅ docs/ folder created with user documentation +✅ Build tracking updated diff --git a/src/modules/bmb/workflows/module/steps-c/step-08-complete.md b/src/modules/bmb/workflows/module/steps-c/step-08-complete.md new file mode 100644 index 00000000..a5d0657e --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-c/step-08-complete.md @@ -0,0 +1,123 @@ +--- +name: 'step-08-complete' +description: 'Finalize, offer to run validation' + +buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md' +targetLocation: '{build_tracking_targetLocation}' +validationWorkflow: '../steps-v/step-01-validate.md' +--- + +# Step 8: Complete + +## STEP GOAL: + +Finalize the module build, update tracking, and offer to run validation. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: + +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Module Builder** — completing the build +- ✅ Celebrate what was created +- ✅ Guide next steps + +--- + +## MANDATORY SEQUENCE + +### 1. Final Build Summary + +"**🎉 Module structure build complete!**" + +**Module:** {moduleName} ({moduleCode}) +**Type:** {moduleType} +**Location:** {targetLocation} + +**What was created:** + +| Component | Count | Location | +|-----------|-------|----------| +| Agent specs | {count} | agents/ | +| Workflow specs | {count} | workflows/ | +| Configuration | 1 | module.yaml | +| Documentation | 2 | README.md, TODO.md | +| Installer | {yes/no} | _module-installer/ | + +### 2. Update Build Tracking + +Update `{buildTrackingFile}`: +```yaml +--- +moduleCode: {module_code} +moduleName: {name} +moduleType: {type} +targetLocation: {location} +stepsCompleted: ['step-01-load-brief', 'step-02-structure', 'step-03-config', 'step-04-installer', 'step-05-agents', 'step-06-workflows', 'step-07-docs', 'step-08-complete'] +created: {created_date} +completed: {date} +status: COMPLETE +--- +``` + +### 3. Next Steps + +"**Your module structure is ready! Here's what to do next:**" + +1. **Review the build** — Check {targetLocation} +2. **Build agents** — Use `bmad:bmb:agents:agent-builder` for each agent spec +3. **Build workflows** — Use `bmad:bmb:workflows:workflow` for each workflow spec +4. **Test installation** — Run `bmad install {module_code}` +5. **Iterate** — Refine based on testing + +### 4. Offer Validation + +"**Would you like to run validation on the module structure?**" + +Validation checks: +- File structure compliance +- module.yaml correctness +- Spec completeness +- Installation readiness + +### 5. MENU OPTIONS + +**Select an Option:** [V] Validate Module [D] Done + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input + +#### Menu Handling Logic: + +- IF V: Load `{validationWorkflow}` to run validation +- IF D: Celebration message, workflow complete +- IF Any other: Help user, then redisplay menu + +### 6. Completion Message (if Done selected) + +"**🚀 You've built a module structure for BMAD!**" + +"**Module:** {moduleName} ({moduleCode})" +"**Location:** {targetLocation}" +"**Status:** Ready for agent and workflow implementation" + +"**The journey from idea to installable module continues:** +- Agent specs → create-agent workflow +- Workflow specs → create-workflow workflow +- Full module → `bmad install` + +"**Great work! Let's build something amazing.** ✨" + +--- + +## Success Metrics + +✅ Build tracking marked COMPLETE +✅ Summary presented to user +✅ Next steps clearly explained +✅ Validation offered (optional) diff --git a/src/modules/bmb/workflows/module/steps-e/step-01-load-target.md b/src/modules/bmb/workflows/module/steps-e/step-01-load-target.md new file mode 100644 index 00000000..40ee3a50 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-e/step-01-load-target.md @@ -0,0 +1,81 @@ +--- +name: 'step-01-load-target' +description: 'Load target for editing' + +nextStepFile: './step-02-select-edit.md' +moduleStandardsFile: '../../data/module-standards.md' +--- + +# Step 1: Load Target (Edit Mode) + +## STEP GOAL: + +Load the target (brief, module.yaml, agent specs, or workflow specs) for editing. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Editor** — helpful, ready to assist +- ✅ Understand what we're editing + +--- + +## MANDATORY SEQUENCE + +### 1. Determine Edit Target + +"**What would you like to edit?**" + +Options: +- **[B]rief** — Module brief from Brief mode +- **[Y]aml** — module.yaml configuration +- **[A]gents** — Agent specifications +- **[W]orkflows** — Workflow specifications +- **[D]ocs** — README.md or TODO.md + +### 2. Load Target + +Based on selection, load the target file(s). + +**IF Brief:** +- Path: `{bmb_creations_output_folder}/modules/module-brief-{code}.md` + +**IF Yaml:** +- Path: `src/modules/{code}/module.yaml` + +**IF Agents:** +- Path: `src/modules/{code}/agents/` +- List available agent specs + +**IF Workflows:** +- Path: `src/modules/{code}/workflows/` +- List available workflow specs + +**IF Docs:** +- Path: `src/modules/{code}/README.md` or `TODO.md` + +### 3. Display Current Content + +Show the current content of the target file. + +"**Here's the current content:**" + +{display relevant sections or summary} + +### 4. Proceed to Selection + +"**What would you like to change?**" + +Load `{nextStepFile}` to select the edit type. + +--- + +## Success Metrics + +✅ Target loaded +✅ Current content displayed +✅ Ready to select edit type diff --git a/src/modules/bmb/workflows/module/steps-e/step-02-select-edit.md b/src/modules/bmb/workflows/module/steps-e/step-02-select-edit.md new file mode 100644 index 00000000..be1baf74 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-e/step-02-select-edit.md @@ -0,0 +1,77 @@ +--- +name: 'step-02-select-edit' +description: 'Select edit type and gather changes' + +nextStepFile: './step-03-apply-edit.md' +--- + +# Step 2: Select Edit Type + +## STEP GOAL: + +Select the type of edit and gather the changes to make. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Editor** — precise, collaborative +- ✅ Understand the change before making it + +--- + +## MANDATORY SEQUENCE + +### 1. Select Edit Type + +"**What type of edit would you like to make?**" + +- **[M]odify** — Change existing content +- **[A]dd** — Add new content +- **[D]elete** — Remove content +- **[R]eplace** — Replace section entirely + +### 2. Gather Edit Details + +**IF Modify:** +"**Which section do you want to modify?**" +"What should it change to?" + +**IF Add:** +"**What do you want to add?**" +"**Where should it go?**" + +**IF Delete:** +"**What do you want to remove?**" + +**IF Replace:** +"**What section should be replaced?**" +"**What's the new content?**" + +### 3. Confirm Change + +"**Please confirm the edit:**" + +**Type:** {edit_type} +**Target:** {section or content} +**Change:** {description of change} + +"**Is this correct?**" + +### 4. Store Edit Plan + +Store the edit plan for the next step. + +Load `{nextStepFile}` to apply the edit. + +--- + +## Success Metrics + +✅ Edit type selected +✅ Change details gathered +✅ User confirmed +✅ Edit plan stored diff --git a/src/modules/bmb/workflows/module/steps-e/step-03-apply-edit.md b/src/modules/bmb/workflows/module/steps-e/step-03-apply-edit.md new file mode 100644 index 00000000..a6dd6afa --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-e/step-03-apply-edit.md @@ -0,0 +1,77 @@ +--- +name: 'step-03-apply-edit' +description: 'Apply the edit and save' + +nextStepFile: './step-04-review.md' +--- + +# Step 3: Apply Edit + +## STEP GOAL: + +Apply the confirmed edit to the target file and save. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Editor** — making changes +- ✅ Apply edits precisely + +--- + +## MANDATORY SEQUENCE + +### 1. Load Target File + +Read the complete target file. + +### 2. Apply Edit + +Based on the edit plan from step 2: + +**IF Modify:** +- Locate the section +- Apply the modification +- Preserve surrounding context + +**IF Add:** +- Find the insertion point +- Insert new content +- Maintain formatting + +**IF Delete:** +- Locate the content +- Remove it +- Clean up any gaps + +**IF Replace:** +- Locate the section +- Replace with new content +- Ensure proper formatting + +### 3. Save Changes + +Write the modified content back to the target file. + +### 4. Report Success + +"**✓ Edit applied!**" + +**File:** {file_path} +**Change:** {summary_of_change} + +### 5. Proceed to Review + +Load `{nextStepFile}` to review the changes. + +--- + +## Success Metrics + +✅ Edit applied correctly +✅ File saved +✅ Change summary provided diff --git a/src/modules/bmb/workflows/module/steps-e/step-04-review.md b/src/modules/bmb/workflows/module/steps-e/step-04-review.md new file mode 100644 index 00000000..6c0e79c9 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-e/step-04-review.md @@ -0,0 +1,80 @@ +--- +name: 'step-04-review' +description: 'Review changes and offer validation' + +nextStepFile: './step-05-confirm.md' +validationWorkflow: '../steps-v/step-01-load-target.md' +--- + +# Step 4: Review Changes + +## STEP GOAL: + +Review the applied changes and offer to run validation. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Editor** — confirming changes +- ✅ Ensure user is satisfied + +--- + +## MANDATORY SEQUENCE + +### 1. Show Diff + +Display what changed: + +"**Here's what changed:**" + +**Before:** +{before_content} + +**After:** +{after_content} + +### 2. Confirm Satisfaction + +"**Are you happy with this change?**" + +- **[Y]es** — Keep the change +- **[N]o** — Revert and redo +- **[M]odify** — Make further adjustments + +### 3. Handle Response + +**IF Yes:** +- Mark edit as complete +- Proceed to step 5 + +**IF No:** +- Revert the change +- Return to step 2 to gather new edit + +**IF Modify:** +- Make additional adjustments +- Show updated diff +- Ask again + +### 4. Offer Validation + +"**Would you like to run validation after this edit?**" + +- Validation can check for any issues introduced + +### 5. Proceed to Confirm + +Load `{nextStepFile}` to confirm completion. + +--- + +## Success Metrics + +✅ Changes reviewed +✅ User satisfaction confirmed +✅ Validation offered diff --git a/src/modules/bmb/workflows/module/steps-e/step-05-confirm.md b/src/modules/bmb/workflows/module/steps-e/step-05-confirm.md new file mode 100644 index 00000000..486fb9d4 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-e/step-05-confirm.md @@ -0,0 +1,75 @@ +--- +name: 'step-05-confirm' +description: 'Confirm completion and offer next steps' + +validationWorkflow: '../steps-v/step-01-load-target.md' +--- + +# Step 5: Confirm Completion + +## STEP GOAL: + +Confirm edit completion and offer next steps including validation. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Module Editor** — completing the job +- ✅ Guide next steps + +--- + +## MANDATORY SEQUENCE + +### 1. Summary of Changes + +"**✓ Edit complete!**" + +**File edited:** {file_path} +**Edit type:** {edit_type} +**Summary:** {summary_of_change} + +### 2. Offer Next Actions + +"**What would you like to do next?**" + +- **[V]alidate** — Run validation to check for issues +- **[E]dit more** — Make additional changes +- **[D]one** — Complete edit session + +### 3. Handle Response + +**IF Validate:** +"**Loading validation workflow...**" +Load `{validationWorkflow}` + +**IF Edit more:** +"**Loading edit selection...**" +Return to step 1 + +**IF Done:** +"**Edit session complete!**" +Summary of what was accomplished. + +### 4. Complete Session + +If Done selected: + +"**Thanks for using the Module Edit workflow!**" + +"**Summary:**" +- Files edited: {count} +- Changes made: {summary} + +--- + +## Success Metrics + +✅ Edit confirmed complete +✅ Next actions offered +✅ Validation accessible +✅ Session properly closed diff --git a/src/modules/bmb/workflows/module/steps-v/step-01-load-target.md b/src/modules/bmb/workflows/module/steps-v/step-01-load-target.md new file mode 100644 index 00000000..08237f3e --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-01-load-target.md @@ -0,0 +1,96 @@ +--- +name: 'step-01-load-target' +description: 'Load target for validation' + +nextStepFile: './step-02-file-structure.md' +validationReportOutput: '{bmb_creations_output_folder}/modules/validation-report-{target_code}-{timestamp}.md' +--- + +# Step 1: Load Target (Validate Mode) + +## STEP GOAL: + +Load the target (brief, module, agent specs, or workflow specs) for validation. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Quality Assurance** — thorough, systematic +- ✅ Understand what we're validating + +--- + +## MANDATORY SEQUENCE + +### 1. Determine Validation Target + +"**What would you like to validate?**" + +Options: +- **[B]rief** — Module brief from Brief mode +- **[M]odule** — Built module structure +- **[A]gents** — Agent specifications +- **[W]orkflows** — Workflow specifications +- **[F]ull** — Everything (brief + module + specs) + +### 2. Load Target + +Based on selection, load the target: + +**IF Brief:** +- Path: `{bmb_creations_output_folder}/modules/module-brief-{code}.md` +- Ask for module code if not specified + +**IF Module:** +- Path: `src/modules/{code}/` +- Ask for module code if not specified + +**IF Agents:** +- Path: `src/modules/{code}/agents/` +- Load all `.spec.md` or `.agent.yaml` files + +**IF Workflows:** +- Path: `src/modules/{code}/workflows/` +- Load all `.spec.md` files + +**IF Full:** +- Load everything above for a module + +### 3. Confirm Target + +"**Validating:** {target_type} for {module_code}" +"**Location:** {path}" + +"**Shall I proceed?**" + +### 4. Initialize Validation Report + +Create the validation report structure: + +```yaml +--- +validationDate: {timestamp} +targetType: {target_type} +moduleCode: {module_code} +targetPath: {path} +status: IN_PROGRESS +--- +``` + +### 5. Proceed to Validation + +"**Starting validation checks...**" + +Load `{nextStepFile}` to begin file structure validation. + +--- + +## Success Metrics + +✅ Target loaded +✅ Validation report initialized +✅ User confirmed diff --git a/src/modules/bmb/workflows/module/steps-v/step-02-file-structure.md b/src/modules/bmb/workflows/module/steps-v/step-02-file-structure.md new file mode 100644 index 00000000..3253964c --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-02-file-structure.md @@ -0,0 +1,94 @@ +--- +name: 'step-02-file-structure' +description: 'Validate file structure compliance' + +nextStepFile: './step-03-module-yaml.md' +moduleStandardsFile: '../../data/module-standards.md' +validationReportOutput: '{validation_report_output}' +--- + +# Step 2: File Structure Validation + +## STEP GOAL: + +Validate file structure against module standards. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Quality Assurance** — checking structure +- ✅ Reference standards, ensure compliance + +--- + +## MANDATORY SEQUENCE + +### 1. Load Standards + +Load `{moduleStandardsFile}` for reference. + +### 2. Perform Structure Checks + +Check based on target type: + +**For Modules:** +- [ ] module.yaml exists +- [ ] README.md exists +- [ ] agents/ folder exists (if agents specified) +- [ ] workflows/ folder exists (if workflows specified) +- [ ] _module-installer/ folder (if installer specified) + +**For Briefs:** +- [ ] Brief file exists +- [ ] Required sections present + +**For Agent Specs:** +- [ ] All expected spec files exist + +**For Workflow Specs:** +- [ ] All expected spec files exist + +### 3. Check Module Type Compliance + +**IF Extension Module:** +- [ ] Code matches base module +- [ ] Folder name is unique (not conflicting) + +**IF Global Module:** +- [ ] Global flag documented + +### 4. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## File Structure Validation + +**Status:** {PASS/FAIL/WARNINGS} + +**Checks:** +{list each check with result} + +**Issues Found:** +{any structural problems} +``` + +### 5. Auto-Proceed + +"**✓ File structure check complete.**" + +Proceeding to next validation... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ All structure checks performed +✅ Results recorded +✅ Auto-proceeds to next validation diff --git a/src/modules/bmb/workflows/module/steps-v/step-03-module-yaml.md b/src/modules/bmb/workflows/module/steps-v/step-03-module-yaml.md new file mode 100644 index 00000000..ba6a13c0 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-03-module-yaml.md @@ -0,0 +1,99 @@ +--- +name: 'step-03-module-yaml' +description: 'Validate module.yaml against conventions' + +nextStepFile: './step-04-agent-specs.md' +moduleYamlConventionsFile: '../../data/module-yaml-conventions.md' +validationReportOutput: '{validation_report_output}' +targetPath: '{validation_target_path}' +--- + +# Step 3: module.yaml Validation + +## STEP GOAL: + +Validate module.yaml formatting and conventions. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Quality Assurance** — checking configuration +- ✅ Ensure proper YAML syntax + +--- + +## MANDATORY SEQUENCE + +### 1. Load module.yaml + +Read `{targetPath}/module.yaml` + +**IF not present:** +- Record as FAIL (required file) +- Skip to next validation + +### 2. Validate Required Fields + +Check for required frontmatter: +- [ ] `code:` present and valid (kebab-case, 2-20 chars) +- [ ] `name:` present +- [ ] `header:` present +- [ ] `subheader:` present +- [ ] `default_selected:` present (boolean) + +### 3. Validate Custom Variables + +For each custom variable: +- [ ] `prompt:` present +- [ ] `default:` present (or explicitly omitted) +- [ ] `result:` template valid +- [ ] Variable naming correct (kebab-case) + +**For single-select:** +- [ ] `single-select:` array present +- [ ] All options have `value:` and `label:` + +**For multi-select:** +- [ ] `multi-select:` array present +- [ ] All options have `value:` and `label:` + +### 4. Validate Extension Module Code + +**IF Extension:** +- [ ] `code:` matches base module code +- [ ] This is intentional (not an error) + +### 5. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## module.yaml Validation + +**Status:** {PASS/FAIL/WARNINGS} + +**Required Fields:** {status} +**Custom Variables:** {count} variables +**Issues Found:** +{list any issues} +``` + +### 6. Auto-Proceed + +"**✓ module.yaml check complete.**" + +Proceeding to next validation... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ All module.yaml checks performed +✅ Results recorded +✅ Auto-proceeds to next validation diff --git a/src/modules/bmb/workflows/module/steps-v/step-04-agent-specs.md b/src/modules/bmb/workflows/module/steps-v/step-04-agent-specs.md new file mode 100644 index 00000000..3a2d931e --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-04-agent-specs.md @@ -0,0 +1,152 @@ +--- +name: 'step-04-agent-specs' +description: 'Validate agent specifications and built agents' + +nextStepFile: './step-05-workflow-specs.md' +agentSpecTemplate: '../../templates/agent-spec-template.md' +agentArchitectureFile: '../../data/agent-architecture.md' +agentValidationWorkflow: '{project-root}/_bmad/bmb/workflows/agent/steps-v/step-01-validate.md' +validationReportOutput: '{validation_report_output}' +targetPath: '{validation_target_path}' +--- + +# Step 4: Agent Specs Validation + +## STEP GOAL: + +Validate agent specifications and/or built agents, distinguishing between placeholder specs and fully implemented agents. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: +- ✅ You are the **Quality Assurance** — dual-mode checking +- ✅ Specs are expected, built agents are great +- ✅ Track status of each agent + +--- + +## MANDATORY SEQUENCE + +### 1. Load Agent Files + +Find all agent files in `{targetPath}/agents/`: +- `.spec.md` files (placeholder specs) +- `.agent.yaml` files (built agents) + +### 2. Categorize Agents + +For each agent found, determine status: + +**Built Agents (.agent.yaml):** +- Full implementation with complete persona, menu YAML +- Can be validated in-depth via agent validation workflow + +**Spec Agents (.spec.md):** +- High-level placeholder/blueprint +- Awaiting creation via agent-builder workflow + +Track counts: +- Total agents: {count} +- Built agents: {count} +- Spec agents: {count} + +### 3. Validate Spec Agents (.spec.md) + +For each spec agent, check: + +**Required Sections:** +- [ ] Agent metadata (id, name, title, icon, module) +- [ ] Role defined +- [ ] Identity or communication style +- [ ] Menu triggers documented +- [ ] hasSidecar decision documented + +**Menu Triggers:** +- [ ] At least one trigger per agent +- [ ] Trigger → workflow mapping clear +- [ ] No duplicate triggers (warn if found) + +**hasSidecar Documentation:** +- [ ] Decision documented (true or false) +- [ ] Rationale if true (why memory needed) + +**Placeholder Note:** These are specs awaiting agent-builder. + +### 4. Validate Built Agents (.agent.yaml) + +For each built agent, check: + +**Frontmatter Completeness:** +- [ ] agent.metadata exists +- [ ] agent.persona exists +- [ ] agent.menu exists + +**YAML Structure:** +- [ ] Valid YAML syntax +- [ ] Required fields present + +**Status:** These are complete implementations and can be validated in detail via sub-process. + +### 5. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## Agent Specs Validation + +**Status:** {PASS/FAIL/WARNINGS} + +**Agent Summary:** +- Total Agents: {count} +- Built Agents: {count} {list} +- Spec Agents: {count} {list} + +**Built Agents:** +{for each built agent} +- **{name}**: {status} - Ready for detailed validation via agent workflow + +**Spec Agents:** +{for each spec agent} +- **{name}**: {status} - Placeholder awaiting agent-builder + +**Issues Found:** +{list any issues} + +**Recommendations:** +{if specs exist} +- Use `bmad:bmb:agents:agent-builder` to create {spec agent names} +- After building agents, re-run validation to verify compliance +{endif} +``` + +### 6. Note Sub-Process Opportunity + +**IF built agents exist:** + +"**The following built agents can be validated in detail:**" + +{list built agents} + +"**After this validation completes, I can spawn sub-processes to run the agent validation workflow on each built agent for deeper compliance checking.**" + +### 7. Auto-Proceed + +"**✓ Agent specs check complete.**" + +Proceeding to next validation... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ All agent files checked +✅ Status tracked (spec vs built) +✅ hasSidecar decisions validated +✅ Recommendations for specs documented +✅ Sub-process opportunity noted diff --git a/src/modules/bmb/workflows/module/steps-v/step-05-workflow-specs.md b/src/modules/bmb/workflows/module/steps-v/step-05-workflow-specs.md new file mode 100644 index 00000000..24490bdf --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-05-workflow-specs.md @@ -0,0 +1,152 @@ +--- +name: 'step-05-workflow-specs' +description: 'Validate workflow specifications and built workflows' + +nextStepFile: './step-06-documentation.md' +workflowSpecTemplate: '../../templates/workflow-spec-template.md' +workflowValidationWorkflow: '{project-root}/_bmad/bmb/workflows/workflow/steps-v/step-01-validate.md' +validationReportOutput: '{validation_report_output}' +targetPath: '{validation_target_path}' +--- + +# Step 5: Workflow Specs Validation + +## STEP GOAL: + +Validate workflow specifications and/or built workflows, distinguishing between placeholder specs and fully implemented workflows. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Quality Assurance** — dual-mode checking +- ✅ Specs are expected, built workflows are great +- ✅ Track status of each workflow + +--- + +## MANDATORY SEQUENCE + +### 1. Load Workflow Files + +Find all workflow files in `{targetPath}/workflows/`: +- `.spec.md` files (placeholder specs) +- `workflow.md` files (built workflows) + +### 2. Categorize Workflows + +For each workflow found, determine status: + +**Built Workflows (workflow.md with steps/ folder):** +- Full implementation with step files, data, templates +- Can be validated in-depth via workflow validation workflow + +**Spec Workflows (.spec.md):** +- High-level placeholder/blueprint +- Awaiting creation via workflow-builder workflow + +Track counts: +- Total workflows: {count} +- Built workflows: {count} +- Spec workflows: {count} + +### 3. Validate Spec Workflows (.spec.md) + +For each spec workflow, check: + +**Required Sections:** +- [ ] Workflow goal defined +- [ ] Description present +- [ ] Workflow type indicated +- [ ] Step list or outline present +- [ ] Agent association clear + +**Inputs/Outputs:** +- [ ] Input requirements documented +- [ ] Output format specified + +**Agent Integration:** +- [ ] Primary agent identified +- [ ] Multi-agent collaboration noted (if applicable) + +**Placeholder Note:** These are specs awaiting workflow-builder. + +### 4. Validate Built Workflows (workflow.md) + +For each built workflow, check: + +**Workflow Structure:** +- [ ] workflow.md exists with proper frontmatter +- [ ] steps/ folder exists (steps-c/, steps-e/, steps-v/ as appropriate) +- [ ] Step files follow naming conventions + +**Step File Compliance:** +- [ ] Each step has proper frontmatter +- [ ] Step files within size limits +- [ ] Menu handling follows standards + +**Status:** These are complete implementations and can be validated in detail via sub-process. + +### 5. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## Workflow Specs Validation + +**Status:** {PASS/FAIL/WARNINGS} + +**Workflow Summary:** +- Total Workflows: {count} +- Built Workflows: {count} {list} +- Spec Workflows: {count} {list} + +**Built Workflows:** +{for each built workflow} +- **{name}**: {status} - Ready for detailed validation via workflow workflow + +**Spec Workflows:** +{for each spec workflow} +- **{name}**: {status} - Placeholder awaiting workflow-builder + +**Issues Found:** +{list any issues} + +**Recommendations:** +{if specs exist} +- Use `bmad:bmb:workflows:workflow` or `/workflow` to create {spec workflow names} +- After building workflows, re-run validation to verify compliance +{endif} +``` + +### 6. Note Sub-Process Opportunity + +**IF built workflows exist:** + +"**The following built workflows can be validated in detail:**" + +{list built workflows} + +"**After this validation completes, I can spawn sub-processes to run the workflow validation workflow on each built workflow for deeper compliance checking.**" + +### 7. Auto-Proceed + +"**✓ Workflow specs check complete.**" + +Proceeding to next validation... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ All workflow files checked +✅ Status tracked (spec vs built) +✅ Agent associations validated +✅ Recommendations for specs documented +✅ Sub-process opportunity noted diff --git a/src/modules/bmb/workflows/module/steps-v/step-06-documentation.md b/src/modules/bmb/workflows/module/steps-v/step-06-documentation.md new file mode 100644 index 00000000..d71a99eb --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-06-documentation.md @@ -0,0 +1,143 @@ +--- +name: 'step-06-documentation' +description: 'Validate documentation (README.md, TODO.md, docs/)' + +nextStepFile: './step-07-installation.md' +validationReportOutput: '{validation_report_output}' +targetPath: '{validation_target_path}' +moduleBriefPath: '{module_brief_path}' +--- + +# Step 6: Documentation Validation + +## STEP GOAL: + +Validate module documentation completeness, including user-facing docs in docs/ folder. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Quality Assurance** — checking docs +- ✅ Documentation matters for usability +- ✅ User docs can be generated from placeholder plans + +--- + +## MANDATORY SEQUENCE + +### 1. Load Documentation Files + +Check for: +- `{targetPath}/README.md` (module overview) +- `{targetPath}/TODO.md` (development roadmap) +- `{targetPath}/docs/` (user documentation folder) + +### 2. Validate README.md + +**Required Sections:** +- [ ] Module name and description +- [ ] Installation instructions +- [ ] Components section (agents, workflows) +- [ ] Usage examples or quick start +- [ ] Module structure +- [ ] Link to docs/ folder + +**Quality Checks:** +- [ ] Clear description of what module does +- [ ] Installation command shown +- [ ] Agent/workflow lists complete +- [ ] References user documentation + +### 3. Validate TODO.md + +**Required Content:** +- [ ] Agent build checklist +- [ ] Workflow build checklist +- [ ] Testing section +- [ ] Next steps + +### 4. Validate docs/ Folder + +**For Custom Modules:** +- [ ] docs/ folder exists +- [ ] Contains user-facing documentation +- [ ] Documentation is clear and helpful + +**Valid docs/ Contents (may include):** +- `getting-started.md` — Quick start guide +- `agents.md` — Agent documentation +- `workflows.md` — Workflow documentation +- `examples.md` — Usage examples +- `configuration.md` — Setup/configuration guide +- `troubleshooting.md` — Common issues and solutions + +**Quality Check:** +- [ ] Even with placeholder agent/workflow specs, user docs should provide useful information +- [ ] Documentation references agents/workflows by name +- [ ] Clear what functionality exists vs what is planned + +### 5. Generate User Docs Recommendation + +**IF docs/ missing or incomplete:** + +"**User documentation can be generated from module brief and agent/workflow specs.**" + +"**Even with placeholder plans, you can create helpful user documentation that describes:** +- What each agent does and when to use it +- What workflows are available and their purpose +- How to get started with the module +- Configuration options (from module.yaml)" + +### 6. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## Documentation Validation + +**Status:** {PASS/FAIL/WARNINGS} + +**Root Documentation:** +- **README.md:** {present/missing} - {status} +- **TODO.md:** {present/missing} - {status} + +**User Documentation (docs/):** +- **docs/ folder:** {present/missing} - {status} +- **Documentation files:** {count} files found + +**Docs Contents:** +{list files in docs/ folder} + +**Issues Found:** +{list any issues} + +**Recommendations:** +{if docs/ missing or incomplete} +- Generate user documentation from module brief and specs +- Create getting-started.md, agents.md, workflows.md +- User docs are valuable even with placeholder plans +{endif} +``` + +### 7. Auto-Proceed + +"**✓ Documentation check complete.**" + +Proceeding to installation validation... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ All documentation checked +✅ Required sections validated +✅ docs/ folder presence verified +✅ User documentation quality assessed +✅ Recommendations documented diff --git a/src/modules/bmb/workflows/module/steps-v/step-07-installation.md b/src/modules/bmb/workflows/module/steps-v/step-07-installation.md new file mode 100644 index 00000000..ee11e163 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-07-installation.md @@ -0,0 +1,113 @@ +--- +name: 'step-07-installation' +description: 'Installation readiness check' + +nextStepFile: './step-08-report.md' +moduleInstallerStandardsFile: '../../data/module-installer-standards.md' +validationReportOutput: '{validation_report_output}' +targetPath: '{validation_target_path}' +--- + +# Step 7: Installation Readiness + +## STEP GOAL: + +Check if the module is ready for installation. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Quality Assurance** — checking readiness +- ✅ Installation should work + +--- + +## MANDATORY SEQUENCE + +### 1. Check Installer + +**IF `_module-installer/` exists:** +- [ ] `installer.js` present +- [ ] Has valid `install()` function +- [ ] Platform-specific handlers (if any IDEs supported) + +**IF `_module-installer/` doesn't exist:** +- Note: Module may not need installer +- Check if this is intentional + +### 2. Validate installer.js (if present) + +Load `{moduleInstallerStandardsFile}` and check: + +**Function Signature:** +- [ ] `async function install(options)` +- [ ] Accepts: projectRoot, config, installedIDEs, logger +- [ ] Returns: Promise + +**Error Handling:** +- [ ] Try/catch block present +- [ ] Error logging present + +**Platform Validation:** +- [ ] Uses platformCodes for IDE validation +- [ ] Graceful handling of unknown platforms + +### 3. Check module.yaml Install Variables + +**IF custom variables exist:** +- [ ] All variables have prompts +- [ ] Defaults are reasonable +- [ ] Result templates are valid + +**Path Variables:** +- [ ] Paths use `{project-root}/` prefix +- [ ] Output paths are user-configurable + +### 4. Module Type Installation + +**IF Extension:** +- [ ] `code:` matches base (for proper merge) +- [ ] Folder name is unique + +**IF Global:** +- [ ] `global: true` or documented +- [ ] Global impact is minimal/intentional + +### 5. Record Results + +Append to `{validationReportOutput}`: + +```markdown +## Installation Readiness + +**Status:** {PASS/FAIL/WARNINGS} + +**Installer:** {present/missing} - {status} +**Install Variables:** {count} variables +**Ready to Install:** {yes/no} + +**Issues Found:** +{list any issues} +``` + +### 6. Auto-Proceed + +"**✓ Installation readiness check complete.**" + +Proceeding to final report... + +Load `{nextStepFile}` + +--- + +## Success Metrics + +✅ Installation readiness assessed +✅ Installer validated (if present) +✅ Module type compatibility checked +✅ Results recorded diff --git a/src/modules/bmb/workflows/module/steps-v/step-08-report.md b/src/modules/bmb/workflows/module/steps-v/step-08-report.md new file mode 100644 index 00000000..f5211592 --- /dev/null +++ b/src/modules/bmb/workflows/module/steps-v/step-08-report.md @@ -0,0 +1,197 @@ +--- +name: 'step-08-report' +description: 'Generate final validation report' + +validationReportOutput: '{validation_report_output}' +agentValidationWorkflow: '{project-root}/_bmad/bmb/workflows/agent/steps-v/step-01-validate.md' +workflowValidationWorkflow: '{project-root}/_bmad/bmb/workflows/workflow/steps-v/step-01-validate.md' +--- + +# Step 8: Validation Report + +## STEP GOAL: + +Compile all validation results into a final report with actionable recommendations, including sub-process validation opportunities for built agents and workflows. + +## MANDATORY EXECUTION RULES: + +### Universal Rules: +- 📖 CRITICAL: Read the complete step file before taking any action +- ✅ Speak in `{communication_language}` + +### Role Reinforcement: + +- ✅ You are the **Quality Assurance** — reporting results +- ✅ Clear, actionable feedback +- ✅ Sub-process validation for built components + +--- + +## MANDATORY SEQUENCE + +### 1. Compile Overall Status + +Review all validation sections and determine overall status: + +**PASS:** All checks passed, ready to proceed +**WARNINGS:** Minor issues found, can proceed with fixes +**FAIL:** Critical issues found, must fix before proceeding + +### 2. Generate Summary + +Add to `{validationReportOutput}`: + +```markdown +--- + +## Overall Summary + +**Status:** {PASS/WARNINGS/FAIL} + +**Breakdown:** +- File Structure: {status} +- module.yaml: {status} +- Agent Specs: {status} ({built_count} built, {spec_count} specs) +- Workflow Specs: {status} ({built_count} built, {spec_count} specs) +- Documentation: {status} +- Installation Readiness: {status} + +--- + +## Component Status + +### Agents +- **Built Agents:** {count} — {list} +- **Spec Agents:** {count} — {list} + +### Workflows +- **Built Workflows:** {count} — {list} +- **Spec Workflows:** {count} — {list} + +--- + +## Recommendations + +{priority-listed-recommendations} + +### Priority 1 - Critical (must fix) + +{critical_issues} + +### Priority 2 - High (should fix) + +{high_priority_issues} + +### Priority 3 - Medium (nice to have) + +{medium_priority_issues} + +--- + +## Sub-Process Validation + +{if built_agents_exist} +### Built Agent Deep Validation + +The following built agents can be validated in detail using the agent validation workflow: + +{for each built_agent} +- **{agent_name}** — Use `{agentValidationWorkflow}` + +**Recommendation:** Run agent validation workflow on each built agent to verify: +- Frontmatter completeness +- Persona quality +- Menu structure compliance +- Sidecar validation + +**After fixing any module-level issues, I can spawn sub-processes to validate each built agent in parallel.** +{endif} + +{if built_workflows_exist} +### Built Workflow Deep Validation + +The following built workflows can be validated in detail using the workflow validation workflow: + +{for each built_workflow} +- **{workflow_name}** — Use `{workflowValidationWorkflow}` + +**Recommendation:** Run workflow validation workflow on each built workflow to verify: +- Step file compliance +- Tri-modal structure (steps-c/steps-e/steps-v/) +- Frontmatter completeness +- Size limits compliance + +**After fixing any module-level issues, I can spawn sub-processes to validate each built workflow in parallel.** +{endif} + +--- + +## Next Steps + +{based_on_status} + +{if specs_exist} +### Build Spec Components + +**Spec Agents:** {spec_count} +- Use `bmad:bmb:agents:agent-builder` to create: {spec_agent_names} + +**Spec Workflows:** {spec_count} +- Use `bmad:bmb:workflows:workflow` to create: {spec_workflow_names} + +**After building specs, re-run validation to verify compliance.** +{endif} + +--- + +**Validation Completed:** {timestamp} +``` + +### 3. Present Report + +"**✓ Validation complete!**" + +**Overall Status:** {overall_status} + +**Report saved to:** `{validationReportOutput}` + +{if built_components_exist} +"**Built components found:**" +- Built Agents: {count} +- Built Workflows: {count} + +"**These can be validated in depth via sub-process.**" +{endif} + +### 4. Offer Next Actions + +"**What would you like to do?**" + +- **[R]ead report** — Show the full validation report +- **[S]ub-process validation** — Run deep validation on built agents/workflows +- **[F]ix issues** — Edit mode to fix identified problems +- **[D]one** — Complete validation + +### 5. Menu Handling + +- IF R: Display the full report +- IF S: + - {if built_components_exist} + - Offer to run agent validation on built agents + - Offer to run workflow validation on built workflows + - Can run in parallel for efficiency + - {else} + - "No built components found for sub-process validation." + - {endif} +- IF F: Offer to load Edit mode +- IF D: Complete validation session + +--- + +## Success Metrics + +✅ Overall status determined +✅ Complete report generated +✅ Actionable recommendations provided +✅ Sub-process validation opportunities identified +✅ Next steps offered diff --git a/src/modules/bmb/workflows/module/templates/brief-template.md b/src/modules/bmb/workflows/module/templates/brief-template.md new file mode 100644 index 00000000..01ad3f3d --- /dev/null +++ b/src/modules/bmb/workflows/module/templates/brief-template.md @@ -0,0 +1,154 @@ +# Module Brief: {module_code} + +**Date:** {date} +**Author:** {user_name} +**Module Code:** {module_code} +**Module Type:** {module_type} +**Status:** Ready for Development + +--- + +## Executive Summary + +{module_vision} + +**Module Category:** {module_category} +**Target Users:** {target_users} +**Complexity Level:** {complexity_level} + +--- + +## Module Identity + +### Module Code & Name + +- **Code:** `{module_code}` +- **Name:** `{module_name}` + +### Core Concept + +{module_identity} + +### Personality Theme + +{personality_theme} + +--- + +## Module Type + +**Type:** {module_type} + +{module_type_explanation} + +--- + +## Unique Value Proposition + +**What makes this module special:** + +{unique_value_proposition} + +**Why users would choose this module:** + +{value_proposition_details} + +--- + +## User Scenarios + +### Target Users + +{target_users} + +### Primary Use Case + +{primary_use_case} + +### User Journey + +{user_journey} + +--- + +## Agent Architecture + +### Agent Count Strategy + +{agent_count_strategy} + +### Agent Roster + +| Agent | Name | Role | Expertise | +|-------|------|------|-----------| +{agent_roster_table} + +### Agent Interaction Model + +{agent_interaction_model} + +### Agent Communication Style + +{agent_communication_style} + +--- + +## Workflow Ecosystem + +### Core Workflows (Essential) + +{core_workflows} + +### Feature Workflows (Specialized) + +{feature_workflows} + +### Utility Workflows (Support) + +{utility_workflows} + +--- + +## Tools & Integrations + +### MCP Tools + +{mcp_tools} + +### External Services + +{external_services} + +### Integrations with Other Modules + +{module_integrations} + +--- + +## Creative Features + +### Personality & Theming + +{creative_personality} + +### Easter Eggs & Delighters + +{easter_eggs} + +### Module Lore + +{module_lore} + +--- + +## Next Steps + +1. **Review this brief** — Ensure the vision is clear +2. **Run create-module workflow** — Build the module structure +3. **Create agents** — Use create-agent workflow for each agent +4. **Create workflows** — Use create-workflow workflow for each workflow +5. **Test module** — Install and verify functionality + +--- + +_brief created on {date} by {user_name} using the BMAD Module workflow_ diff --git a/src/modules/bmb/workflows/module/templates/workflow-spec-template.md b/src/modules/bmb/workflows/module/templates/workflow-spec-template.md new file mode 100644 index 00000000..40133a8b --- /dev/null +++ b/src/modules/bmb/workflows/module/templates/workflow-spec-template.md @@ -0,0 +1,96 @@ +# Workflow Specification: {workflow_name} + +**Module:** {module_code} +**Status:** Placeholder — To be created via create-workflow workflow +**Created:** {date} + +--- + +## Workflow Overview + +**Goal:** {workflow_goal} + +**Description:** {workflow_description} + +**Workflow Type:** {workflow_type} + +--- + +## Workflow Structure + +### Entry Point + +```yaml +--- +name: {workflow_name} +description: {workflow_description} +web_bundle: true +installed_path: '{project-root}/_bmad/{module_code}/workflows/{workflow_folder_name}' +--- +``` + +### Mode + +- [ ] Create-only (steps-c/) +- [ ] Tri-modal (steps-c/, steps-e/, steps-v/) + +--- + +## Planned Steps + +| Step | Name | Goal | +|------|------|------| +{workflow_steps_table} + +--- + +## Workflow Inputs + +### Required Inputs + +{required_inputs} + +### Optional Inputs + +{optional_inputs} + +--- + +## Workflow Outputs + +### Output Format + +- [ ] Document-producing +- [ ] Non-document + +### Output Files + +{output_files} + +--- + +## Agent Integration + +### Primary Agent + +{primary_agent} + +### Other Agents + +{other_agents} + +--- + +## Implementation Notes + +**Use the create-workflow workflow to build this workflow.** + +Inputs needed: +- Workflow name and description +- Step structure and sequence +- Input/output specifications +- Agent associations + +--- + +_Spec created on {date} via BMAD Module workflow_ diff --git a/src/modules/bmb/workflows/module/workflow.md b/src/modules/bmb/workflows/module/workflow.md new file mode 100644 index 00000000..98a93694 --- /dev/null +++ b/src/modules/bmb/workflows/module/workflow.md @@ -0,0 +1,100 @@ +--- +name: module +description: Quad-modal workflow for creating BMAD modules (Brief + Create + Edit + Validate) +web_bundle: true +installed_path: '{project-root}/_bmad/bmb/workflows/module' +--- + +# Module Workflow + +The module workflow guides users through creating complete, installable BMAD modules through a quad-modal process: **Brief → Create → Edit → Validate**. + +## What This Workflow Does + +- **Brief mode** — Collaboratively explore and design your module vision +- **Create mode** — Build the module structure from a brief +- **Edit mode** — Modify existing briefs or modules +- **Validate mode** — Check compliance and completeness + +## Role + +You are the **Module Architect** — a specialist in BMAD module design. You understand that modules are complex entities requiring careful planning before implementation. + +--- + +## INITIALIZATION SEQUENCE + +### 1. Mode Determination + +**Check invocation context:** +- Look for existing module brief or plan +- Check if user is starting fresh or continuing work +- Determine what mode they need + +**Ask the user:** + +**"Welcome to the Module workflow! What would you like to do?"** + +- **[B] Brief** — Create a module brief (exploratory, creative discovery) +- **[C] Create** — Build a module from a brief +- **[E] Edit** — Modify an existing brief or module +- **[V] Validate** — Validate a brief or module + +### 2. Route to First Step + +**IF mode == brief (B):** +Load `{installed_path}/steps-b/step-01-welcome.md` + +**IF mode == create (C):** +Ask: "Where is the module brief?" → Load `{installed_path}/steps-c/step-01-load-brief.md` + +**IF mode == edit (E):** +Ask: "What would you like to edit?" → Load `{installed_path}/steps-e/step-01-assess.md` + +**IF mode == validate (V):** +Ask: "What would you like to validate?" → Load `{installed_path}/steps-v/step-01-validate.md` + +--- + +## Configuration + +This workflow references: +- `{installed_path}/data/` — Module standards and templates +- `{installed_path}/templates/` — Output templates + +--- + +## Workflow Structure + +``` +module/ +├── workflow.md # This file - mode routing +├── data/ # Shared standards +│ ├── module-standards.md +│ ├── module-yaml-conventions.md +│ ├── agent-architecture.md +│ └── module-installer-standards.md +├── templates/ # Output templates +│ ├── brief-template.md +│ ├── agent-spec-template.md +│ └── workflow-spec-template.md +├── steps-b/ # Brief mode (13 steps) +├── steps-c/ # Create mode (8 steps) +├── steps-e/ # Edit mode +└── steps-v/ # Validate mode +``` + +--- + +## Output + +**Brief mode produces:** +- `module-brief-{code}.md` — Complete module vision document + +**Create mode produces:** +- Module directory structure +- `module.yaml` with install configuration +- `_module-installer/` folder (if needed) +- Agent placeholder/spec files +- Workflow placeholder/spec files +- `README.md` and `TODO.md`