Files
BMAD-METHOD/src/modules/bmb/workflows/create-module/instructions.md

577 lines
16 KiB
Markdown
Raw Normal View History

# Build Module - Interactive Module Builder Instructions
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/{bmad_folder}/bmb/workflows/create-module/workflow.yaml</critical>
<critical>Study existing modules in: {project-root}/{bmad_folder}/ for patterns</critical>
2025-10-16 09:50:29 -05:00
<critical>Communicate in {communication_language} throughout the module creation process</critical>
<workflow>
<step n="-1" goal="Optional brainstorming for module ideas" optional="true">
<ask>Do you want to brainstorm module ideas first? [y/n]</ask>
2025-10-22 12:36:39 -05:00
<check if="yes">
<action>Invoke brainstorming workflow: {brainstorming_workflow}</action>
<action>Pass context data: {brainstorming_context}</action>
<action>Wait for brainstorming session completion</action>
<action>Use brainstorming output to inform module concept, agent lineup, and workflow portfolio in following steps</action>
</check>
2025-10-22 12:36:39 -05:00
<check if="no">
<action>Proceed directly to Step 0</action>
</check>
<template-output>brainstorming_results</template-output>
</step>
<step n="0" goal="Check for module brief" optional="true">
<ask>Do you have a module brief or should we create one? [have/create/skip]</ask>
2025-10-22 12:36:39 -05:00
<check if="create">
<action>Invoke module-brief workflow: {project-root}/{bmad_folder}/bmb/workflows/module-brief/workflow.yaml</action>
2025-10-22 12:36:39 -05:00
<action>Wait for module brief completion</action>
<action>Load the module brief to use as blueprint</action>
</check>
2025-10-22 12:36:39 -05:00
<check if="have">
<ask>Provide path to module brief document</ask>
<action>Load the module brief and use it to pre-populate all planning sections</action>
</check>
2025-10-22 12:36:39 -05:00
<check if="skip">
<action>Proceed directly to Step 1</action>
</check>
<template-output>module_brief</template-output>
</step>
<step n="1" goal="Define module concept and scope">
<critical>Load and study the complete module structure guide</critical>
<action>Load module structure guide: {module_structure_guide}</action>
<action>Understand module types (Simple/Standard/Complex)</action>
<action>Review directory structures and component guidelines</action>
<action>Study the installation infrastructure patterns</action>
2025-10-16 09:50:29 -05:00
<action>If brainstorming or module brief was completed, reference those results to guide the conversation</action>
2025-10-16 09:50:29 -05:00
<action>Guide user to articulate their module's vision, exploring its purpose, what it will help with, and who will use it</action>
2025-10-04 00:22:59 -05:00
<action>Based on their description, intelligently propose module details:</action>
2025-10-16 09:50:29 -05:00
**Module Identity Development:**
2025-10-04 00:22:59 -05:00
2025-10-16 09:50:29 -05:00
1. **Module name** - Extract from their description with proper title case
2. **Module code** - Generate kebab-case from name following patterns:
- Multi-word descriptive names → shortened kebab-case
- Domain-specific terms → recognizable abbreviations
- Present suggested code and confirm it works for paths like {bmad_folder}/{{code}}/agents/
2025-10-04 00:22:59 -05:00
3. **Module purpose** - Refine their description into 1-2 clear sentences
4. **Target audience** - Infer from context or ask if unclear
2025-10-16 09:50:29 -05:00
**Module Theme Reference Categories:**
2025-10-16 09:50:29 -05:00
- Domain-Specific (Legal, Medical, Finance, Education)
- Creative (RPG/Gaming, Story Writing, Music Production)
- Technical (DevOps, Testing, Architecture, Security)
- Business (Project Management, Marketing, Sales)
- Personal (Journaling, Learning, Productivity)
2025-10-04 17:35:37 -05:00
<critical>Determine output location:</critical>
2025-10-04 18:43:24 -05:00
- Module will be created at {installer_output_folder}
2025-10-16 09:50:29 -05:00
<action>Store module identity for scaffolding</action>
<template-output>module_identity</template-output>
</step>
<step n="2" goal="Plan module components">
2025-10-16 09:50:29 -05:00
<action>Based on the module purpose, intelligently propose an initial component architecture</action>
2025-10-16 09:50:29 -05:00
**Agents Planning:**
2025-10-16 09:50:29 -05:00
<action>Suggest agents based on module purpose, considering agent types (Simple/Expert/Module) appropriate to each role</action>
2025-10-16 09:50:29 -05:00
**Example Agent Patterns by Domain:**
2025-10-16 09:50:29 -05:00
- Data/Analytics: Analyst, Designer, Builder roles
- Gaming/Creative: Game Master, Generator, Storytelling roles
- Team/Business: Manager, Facilitator, Documentation roles
2025-10-16 09:50:29 -05:00
<action>Present suggested agent list with types, explaining we can start with core ones and add others later</action>
<action>Confirm which agents resonate with their vision</action>
2025-10-04 00:22:59 -05:00
2025-10-16 09:50:29 -05:00
**Workflows Planning:**
2025-10-04 00:22:59 -05:00
2025-10-16 09:50:29 -05:00
<action>Intelligently suggest workflows that complement the proposed agents</action>
2025-10-16 09:50:29 -05:00
**Example Workflow Patterns by Domain:**
2025-10-16 09:50:29 -05:00
- Data/Analytics: analyze-dataset, create-dashboard, generate-report
- Gaming/Creative: session-prep, generate-encounter, world-building
- Team/Business: planning, facilitation, documentation workflows
2025-10-16 09:50:29 -05:00
<action>For each workflow, note whether it should be Document, Action, or Interactive type</action>
<action>Confirm which workflows are most important to start with</action>
<action>Determine which to create now vs placeholder</action>
**Tasks Planning (optional):**
2025-10-16 09:50:29 -05:00
<ask>Any special tasks that don't warrant full workflows?</ask>
2025-10-22 12:36:39 -05:00
<action if="tasks needed">For each task, capture name, purpose, and whether standalone or supporting</action>
<template-output>module_components</template-output>
</step>
2025-10-04 00:22:59 -05:00
<step n="2b" goal="Determine module complexity">
2025-10-16 09:50:29 -05:00
<action>Based on components, intelligently determine module type using criteria:</action>
2025-10-04 00:22:59 -05:00
2025-10-16 09:50:29 -05:00
**Simple Module Criteria:**
2025-10-04 00:22:59 -05:00
- 1-2 agents, all Simple type
- 1-3 workflows
- No complex integrations
2025-10-16 09:50:29 -05:00
**Standard Module Criteria:**
2025-10-04 00:22:59 -05:00
- 2-4 agents with mixed types
- 3-8 workflows
- Some shared resources
2025-10-16 09:50:29 -05:00
**Complex Module Criteria:**
2025-10-04 00:22:59 -05:00
- 4+ agents or multiple Module-type agents
- 8+ workflows
- Complex interdependencies
- External integrations
2025-10-16 09:50:29 -05:00
<action>Present determined module type with explanation of what structure will be set up</action>
2025-10-04 00:22:59 -05:00
<template-output>module_type</template-output>
</step>
<step n="3" goal="Create module directory structure">
2025-10-04 17:35:37 -05:00
<critical>Use module path determined in Step 1:</critical>
- The module base path is {{module_path}}
<action>Create base module directories at the determined path:</action>
```
{{module_code}}/
├── agents/ # Agent definitions
├── workflows/ # Workflow folders
├── tasks/ # Task files (if any)
├── templates/ # Shared templates
├── data/ # Module data files
├── _module-installer/ # Installation configuration
│ └── install-config.yaml # Configuration questions (config.yaml generated at install time)
└── README.md # Module documentation
```
<action>Create installer directory:</action>
**INSTALLED MODULE STRUCTURE** (generated in target project after installation):
```
{{module_code}}/
├── agents/ # Compiled agents
├── workflows/ # Workflow instances
├── config.yaml # Generated from install-config.yaml during installation
└── data/ # User data directory
```
feat: Add documentation guides, simplify folder structure, and major workflow refactoring Created two comprehensive guides for v6 features: **docs/agent-customization-guide.md** - Complete guide for customizing agent names, personas, memories, and behaviors - Update-safe customization via bmad/_cfg/agents/ configuration files - Real-world examples (TDD setup, multilingual agents, custom workflows) - Troubleshooting and best practices **docs/web-bundles-gemini-gpt-guide.md** - Comprehensive guide for using BMad agents in Gemini Gems and Custom GPTs - Critical setup rules with exact configuration text required - Cost-saving strategy: web planning → local implementation (60-80% savings) - Platform comparison (Gemini Gems strongly recommended over Custom GPTs) - Complete workflow examples showing full planning-to-implementation cycle - Team bundle guidance (Gemini 2.5 Pro+ only) **README.md updates** - Added prominent links in v6 Core Enhancements section - Created new "Customization & Sharing" documentation category - Web Bundles feature highlighted with direct guide link **Unified output folder structure across all modules:** **Before (confusing):** - output_folder: Main docs - game_design_docs: Separate design folder - tech_docs: Separate technical folder - dev_ephemeral_location: Separate ephemeral folder outside docs **After (simplified):** - output_folder: Single location for ALL AI-generated artifacts (default: "docs") - Clearer prompt: "Where should AI Generated Artifacts be saved?" - sprint_artifacts: Phase 4 ephemeral content now WITHIN output_folder - BMM: {output_folder}/stories (stories, context, reports) - BMGD: {output_folder}/sprint-artifacts - No longer in separate {bmad_folder}-ephemeral location **Benefits:** - One clear location for all planning artifacts (PRD, Architecture, UX, etc.) - Phase 4 ephemeral items logically grouped within output folder - Eliminated confusing separate folder proliferation - sprint_artifacts now configurable per module **Files changed:** - src/core/_module-installer/install-config.yaml - src/modules/bmm/_module-installer/install-config.yaml - src/modules/bmgd/_module-installer/install-config.yaml **Also cleaned up BMGD config:** - Renamed: specified_framework → primary_platform (clearer naming) - Removed: unused data_path variable Replaced old "project_level" (0-4) system with new "selected_track" terminology: - **quick-flow**: Bug fixes and small features (replaces Level 0-1) - **bmad-method**: Full planning track (replaces Level 2-3) - **enterprise-bmad-method**: Extended planning (replaces Level 4) **Core workflow updates:** - solutioning-gate-check: Complete rewrite of validation logic for track-based artifacts - architecture: Updated context detection, error handling, and messaging for tracks - workflow-init: Updated artifact detection patterns for track-based paths - All workflow status paths updated (method-greenfield, method-brownfield, enterprise-*) Unified variable naming conventions across all workflows: - {output_folder} → {output-folder} (hyphenated format) - {dev_ephemeral_location} → {sprint_artifacts} (clearer purpose) - Hardcoded status file paths → {workflow_status_file} variable Fixed corrupted variable patterns throughout workflow files: - {output*folder} → {output-folder} - {ephemeral*location} → {sprint_artifacts} - \_prd* → *prd* (escaped underscore artifacts) - **\*\***\_\_\_**\*\*** → proper field placeholders Affected patterns included malformed glob patterns, template variables, and markdown formatting artifacts from previous edits. **Architecture workflow (create-architecture):** - Fixed: "Decision Architecture" → "Create Architecture" (consistent naming) - Improved PRD not found handling with exit/continue options - Better user guidance when running standalone vs. within workflow path - Removed hardcoded Level checks, now track-aware - Enhanced validation checklist formatting (□ → - []) - Typo fixes: "mulitple" → "multiple" **Solutioning gate check:** - Complete validation logic rewrite for track-based system - Removed Level-specific artifact expectations - Simplified document discovery (track determines what exists) - Better analysis prompts and user feedback **Workflow-init:** - Updated artifact detection patterns for new folder structure - Fixed corrupt glob patterns throughout - Better sprint_artifacts location detection - Improved workflow path assignment logic **Various workflows:** - Consistent variable naming across 40+ workflow files - Improved error messages and user guidance - Better markdown formatting (checkboxes, lists) - Removed redundant validation criteria files (now inline) Removed duplicate BMGD 4-production workflows (12 workflows): - code-review, correct-course, create-story, dev-story - epic-tech-context, retrospective, sprint-planning - story-context, story-done, story-ready **Why:** BMGD now uses shared BMM Phase 4 implementation workflows **Benefit:** Single source of truth, no duplication to maintain Also removed: - validation-criteria.yaml (validation now inline in instructions) - architecture-patterns.yaml references (patterns now managed differently) - AUDIT-REPORT.md files (stale audit artifacts) **BMB workflows:** - Updated checklists for workflow and module creation - Improved agent architecture documentation - Minor instruction clarifications **Core brainstorming workflow:** - Updated README with usage examples - Enhanced instructions and template clarity - Better integration with other modules **BMM installer:** - Updated for track-based system - sprint_artifacts configuration **Tech Writer agent:** - Minor configuration update for documentation workflows Removed 200+ files that should not be in repository: - Installed agent markdown files (analyst, architect, dev, pm, sm, tea, etc.) - Complete workflow instruction copies - Documentation duplicates (quick-start, agents-guide, workflows-*) - Test architecture knowledge base (22 files, 14,000+ lines) - Configuration files (config.yaml, team definitions) These are generated during installation and should not be version controlled. Removed 21 pre-generated XML bundles: - BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - BMGD agents (game-architect, game-designer, game-dev, game-scrum-master) - CIS agents (brainstorming-coach, creative-problem-solver, etc.) - Team bundles (team-fullstack, team-gamedev, creative-squad) **Why:** Users should generate fresh bundles via `npm run bundle` to get latest changes and customizations. - **2 new documentation files** (comprehensive guides) - **98 source files modified** (299 insertions, 6,567 deletions) - **3 installer config files simplified** (major folder structure improvement) - **200+ .bmad/ artifacts removed** (should not be in repo) - **21 web-bundle files removed** (users regenerate as needed) - **12 duplicate workflows removed** (BMGD consolidation) - **40+ workflows updated** (track system, variable standardization, corruption fixes)
2025-11-11 12:22:31 -06:00
**SOURCE MODULE** (module-installer is for installation only, not copied to target):
```
{{module_code}}/
├── _module-installer/
│ ├── install-config.yaml # Configuration questions
│ ├── installer.js # Optional custom installation logic
│ └── assets/ # Files to copy during install
```
<template-output>directory_structure</template-output>
</step>
<step n="4" goal="Plan module configuration fields">
<action>Based on the module purpose and components, determine what configuration settings the module needs</action>
**Configuration Field Planning:**
<ask>Does your module need any user-configurable settings during installation?</ask>
**Common configuration patterns:**
- Output/data paths (where module saves files)
- Feature toggles (enable/disable functionality)
- Integration settings (API keys, external services)
- Behavior preferences (automation level, detail level)
- User skill level or experience settings
<action>For each configuration field needed, determine:</action>
1. Field name (snake_case)
2. Whether it's INTERACTIVE (asks user) or STATIC (hardcoded)
3. Prompt text (if interactive)
4. Default value
5. Type: text input, single-select, or multi-select
6. Result template (how the value gets stored)
<action>Store planned configuration fields for installer generation in step 7</action>
<template-output>module_config_fields</template-output>
</step>
<step n="5" goal="Create first agent" optional="true">
2025-10-16 09:50:29 -05:00
<ask>Create your first agent now? [yes/no]</ask>
2025-10-22 12:36:39 -05:00
<check if="yes">
<action>Invoke agent builder workflow: {agent_builder}</action>
<action>Pass module_components as context input</action>
<action>Guide them to create the primary agent for the module</action>
2025-10-04 17:35:37 -05:00
<critical>Save to module's agents folder:</critical>
2025-10-04 17:35:37 -05:00
- Save to {{module_path}}/agents/
2025-10-22 12:36:39 -05:00
</check>
2025-10-22 12:36:39 -05:00
<check if="no">
<action>Create placeholder file in agents folder with TODO notes including agent name, purpose, and type</action>
</check>
<template-output>first_agent</template-output>
</step>
<step n="6" goal="Create first workflow" optional="true">
2025-10-16 09:50:29 -05:00
<ask>Create your first workflow now? [yes/no]</ask>
2025-10-22 12:36:39 -05:00
<check if="yes">
<action>Invoke workflow builder: {workflow_builder}</action>
<action>Pass module_components as context input</action>
<action>Guide them to create the primary workflow</action>
2025-10-04 17:35:37 -05:00
<critical>Save to module's workflows folder:</critical>
2025-10-04 17:35:37 -05:00
- Save to {{module_path}}/workflows/
2025-10-22 12:36:39 -05:00
</check>
2025-10-22 12:36:39 -05:00
<check if="no">
<action>Create placeholder workflow folder structure with TODO notes for workflow.yaml, instructions.md, and template.md if document workflow</action>
</check>
<template-output>first_workflow</template-output>
</step>
<step n="7" goal="Setup module installer">
<action>Load installer template from: {installer_templates}/install-config.yaml</action>
<critical>IMPORTANT: Create install-config.yaml NOT install-config.yaml</critical>
<critical>This is the STANDARD format that BMAD installer uses</critical>
feat: Add documentation guides, simplify folder structure, and major workflow refactoring Created two comprehensive guides for v6 features: **docs/agent-customization-guide.md** - Complete guide for customizing agent names, personas, memories, and behaviors - Update-safe customization via bmad/_cfg/agents/ configuration files - Real-world examples (TDD setup, multilingual agents, custom workflows) - Troubleshooting and best practices **docs/web-bundles-gemini-gpt-guide.md** - Comprehensive guide for using BMad agents in Gemini Gems and Custom GPTs - Critical setup rules with exact configuration text required - Cost-saving strategy: web planning → local implementation (60-80% savings) - Platform comparison (Gemini Gems strongly recommended over Custom GPTs) - Complete workflow examples showing full planning-to-implementation cycle - Team bundle guidance (Gemini 2.5 Pro+ only) **README.md updates** - Added prominent links in v6 Core Enhancements section - Created new "Customization & Sharing" documentation category - Web Bundles feature highlighted with direct guide link **Unified output folder structure across all modules:** **Before (confusing):** - output_folder: Main docs - game_design_docs: Separate design folder - tech_docs: Separate technical folder - dev_ephemeral_location: Separate ephemeral folder outside docs **After (simplified):** - output_folder: Single location for ALL AI-generated artifacts (default: "docs") - Clearer prompt: "Where should AI Generated Artifacts be saved?" - sprint_artifacts: Phase 4 ephemeral content now WITHIN output_folder - BMM: {output_folder}/stories (stories, context, reports) - BMGD: {output_folder}/sprint-artifacts - No longer in separate {bmad_folder}-ephemeral location **Benefits:** - One clear location for all planning artifacts (PRD, Architecture, UX, etc.) - Phase 4 ephemeral items logically grouped within output folder - Eliminated confusing separate folder proliferation - sprint_artifacts now configurable per module **Files changed:** - src/core/_module-installer/install-config.yaml - src/modules/bmm/_module-installer/install-config.yaml - src/modules/bmgd/_module-installer/install-config.yaml **Also cleaned up BMGD config:** - Renamed: specified_framework → primary_platform (clearer naming) - Removed: unused data_path variable Replaced old "project_level" (0-4) system with new "selected_track" terminology: - **quick-flow**: Bug fixes and small features (replaces Level 0-1) - **bmad-method**: Full planning track (replaces Level 2-3) - **enterprise-bmad-method**: Extended planning (replaces Level 4) **Core workflow updates:** - solutioning-gate-check: Complete rewrite of validation logic for track-based artifacts - architecture: Updated context detection, error handling, and messaging for tracks - workflow-init: Updated artifact detection patterns for track-based paths - All workflow status paths updated (method-greenfield, method-brownfield, enterprise-*) Unified variable naming conventions across all workflows: - {output_folder} → {output-folder} (hyphenated format) - {dev_ephemeral_location} → {sprint_artifacts} (clearer purpose) - Hardcoded status file paths → {workflow_status_file} variable Fixed corrupted variable patterns throughout workflow files: - {output*folder} → {output-folder} - {ephemeral*location} → {sprint_artifacts} - \_prd* → *prd* (escaped underscore artifacts) - **\*\***\_\_\_**\*\*** → proper field placeholders Affected patterns included malformed glob patterns, template variables, and markdown formatting artifacts from previous edits. **Architecture workflow (create-architecture):** - Fixed: "Decision Architecture" → "Create Architecture" (consistent naming) - Improved PRD not found handling with exit/continue options - Better user guidance when running standalone vs. within workflow path - Removed hardcoded Level checks, now track-aware - Enhanced validation checklist formatting (□ → - []) - Typo fixes: "mulitple" → "multiple" **Solutioning gate check:** - Complete validation logic rewrite for track-based system - Removed Level-specific artifact expectations - Simplified document discovery (track determines what exists) - Better analysis prompts and user feedback **Workflow-init:** - Updated artifact detection patterns for new folder structure - Fixed corrupt glob patterns throughout - Better sprint_artifacts location detection - Improved workflow path assignment logic **Various workflows:** - Consistent variable naming across 40+ workflow files - Improved error messages and user guidance - Better markdown formatting (checkboxes, lists) - Removed redundant validation criteria files (now inline) Removed duplicate BMGD 4-production workflows (12 workflows): - code-review, correct-course, create-story, dev-story - epic-tech-context, retrospective, sprint-planning - story-context, story-done, story-ready **Why:** BMGD now uses shared BMM Phase 4 implementation workflows **Benefit:** Single source of truth, no duplication to maintain Also removed: - validation-criteria.yaml (validation now inline in instructions) - architecture-patterns.yaml references (patterns now managed differently) - AUDIT-REPORT.md files (stale audit artifacts) **BMB workflows:** - Updated checklists for workflow and module creation - Improved agent architecture documentation - Minor instruction clarifications **Core brainstorming workflow:** - Updated README with usage examples - Enhanced instructions and template clarity - Better integration with other modules **BMM installer:** - Updated for track-based system - sprint_artifacts configuration **Tech Writer agent:** - Minor configuration update for documentation workflows Removed 200+ files that should not be in repository: - Installed agent markdown files (analyst, architect, dev, pm, sm, tea, etc.) - Complete workflow instruction copies - Documentation duplicates (quick-start, agents-guide, workflows-*) - Test architecture knowledge base (22 files, 14,000+ lines) - Configuration files (config.yaml, team definitions) These are generated during installation and should not be version controlled. Removed 21 pre-generated XML bundles: - BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - BMGD agents (game-architect, game-designer, game-dev, game-scrum-master) - CIS agents (brainstorming-coach, creative-problem-solver, etc.) - Team bundles (team-fullstack, team-gamedev, creative-squad) **Why:** Users should generate fresh bundles via `npm run bundle` to get latest changes and customizations. - **2 new documentation files** (comprehensive guides) - **98 source files modified** (299 insertions, 6,567 deletions) - **3 installer config files simplified** (major folder structure improvement) - **200+ .bmad/ artifacts removed** (should not be in repo) - **21 web-bundle files removed** (users regenerate as needed) - **12 duplicate workflows removed** (BMGD consolidation) - **40+ workflows updated** (track system, variable standardization, corruption fixes)
2025-11-11 12:22:31 -06:00
Create module-installer/install-config.yaml:
```yaml
# {{module_name}} Module Configuration
# This file defines installation questions and module configuration values
code: {{module_code}}
name: "{{module_name}}"
default_selected: false # Set to true if this should be selected by default
# Welcome message shown during installation
prompt:
- "Thank you for choosing {{module_name}}!"
- "{{brief_module_description}}"
# Core config values are automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
# ============================================================================
# CONFIGURATION FIELDS (from step 4 planning)
# ============================================================================
# Each field can be:
# 1. INTERACTIVE (has 'prompt' - asks user during installation)
# 2. STATIC (no 'prompt' - just uses 'result' value)
# ============================================================================
# EXAMPLE Interactive text input:
# output_path:
# prompt: "Where should {{module_code}} save outputs?"
# default: "output/{{module_code}}"
# result: "{project-root}/{value}"
# EXAMPLE Interactive single-select:
# detail_level:
# prompt: "How detailed should outputs be?"
# default: "standard"
# result: "{value}"
# single-select:
# - value: "minimal"
# label: "Minimal - Brief summaries only"
# - value: "standard"
# label: "Standard - Balanced detail"
# - value: "detailed"
# label: "Detailed - Comprehensive information"
# EXAMPLE Static value:
# module_version:
# result: "1.0.0"
# EXAMPLE Static path:
# data_path:
# result: "{project-root}/{bmad_folder}/{{module_code}}/data"
{{generated_config_fields_from_step_4}}
```
<critical>Save location:</critical>
feat: Add documentation guides, simplify folder structure, and major workflow refactoring Created two comprehensive guides for v6 features: **docs/agent-customization-guide.md** - Complete guide for customizing agent names, personas, memories, and behaviors - Update-safe customization via bmad/_cfg/agents/ configuration files - Real-world examples (TDD setup, multilingual agents, custom workflows) - Troubleshooting and best practices **docs/web-bundles-gemini-gpt-guide.md** - Comprehensive guide for using BMad agents in Gemini Gems and Custom GPTs - Critical setup rules with exact configuration text required - Cost-saving strategy: web planning → local implementation (60-80% savings) - Platform comparison (Gemini Gems strongly recommended over Custom GPTs) - Complete workflow examples showing full planning-to-implementation cycle - Team bundle guidance (Gemini 2.5 Pro+ only) **README.md updates** - Added prominent links in v6 Core Enhancements section - Created new "Customization & Sharing" documentation category - Web Bundles feature highlighted with direct guide link **Unified output folder structure across all modules:** **Before (confusing):** - output_folder: Main docs - game_design_docs: Separate design folder - tech_docs: Separate technical folder - dev_ephemeral_location: Separate ephemeral folder outside docs **After (simplified):** - output_folder: Single location for ALL AI-generated artifacts (default: "docs") - Clearer prompt: "Where should AI Generated Artifacts be saved?" - sprint_artifacts: Phase 4 ephemeral content now WITHIN output_folder - BMM: {output_folder}/stories (stories, context, reports) - BMGD: {output_folder}/sprint-artifacts - No longer in separate {bmad_folder}-ephemeral location **Benefits:** - One clear location for all planning artifacts (PRD, Architecture, UX, etc.) - Phase 4 ephemeral items logically grouped within output folder - Eliminated confusing separate folder proliferation - sprint_artifacts now configurable per module **Files changed:** - src/core/_module-installer/install-config.yaml - src/modules/bmm/_module-installer/install-config.yaml - src/modules/bmgd/_module-installer/install-config.yaml **Also cleaned up BMGD config:** - Renamed: specified_framework → primary_platform (clearer naming) - Removed: unused data_path variable Replaced old "project_level" (0-4) system with new "selected_track" terminology: - **quick-flow**: Bug fixes and small features (replaces Level 0-1) - **bmad-method**: Full planning track (replaces Level 2-3) - **enterprise-bmad-method**: Extended planning (replaces Level 4) **Core workflow updates:** - solutioning-gate-check: Complete rewrite of validation logic for track-based artifacts - architecture: Updated context detection, error handling, and messaging for tracks - workflow-init: Updated artifact detection patterns for track-based paths - All workflow status paths updated (method-greenfield, method-brownfield, enterprise-*) Unified variable naming conventions across all workflows: - {output_folder} → {output-folder} (hyphenated format) - {dev_ephemeral_location} → {sprint_artifacts} (clearer purpose) - Hardcoded status file paths → {workflow_status_file} variable Fixed corrupted variable patterns throughout workflow files: - {output*folder} → {output-folder} - {ephemeral*location} → {sprint_artifacts} - \_prd* → *prd* (escaped underscore artifacts) - **\*\***\_\_\_**\*\*** → proper field placeholders Affected patterns included malformed glob patterns, template variables, and markdown formatting artifacts from previous edits. **Architecture workflow (create-architecture):** - Fixed: "Decision Architecture" → "Create Architecture" (consistent naming) - Improved PRD not found handling with exit/continue options - Better user guidance when running standalone vs. within workflow path - Removed hardcoded Level checks, now track-aware - Enhanced validation checklist formatting (□ → - []) - Typo fixes: "mulitple" → "multiple" **Solutioning gate check:** - Complete validation logic rewrite for track-based system - Removed Level-specific artifact expectations - Simplified document discovery (track determines what exists) - Better analysis prompts and user feedback **Workflow-init:** - Updated artifact detection patterns for new folder structure - Fixed corrupt glob patterns throughout - Better sprint_artifacts location detection - Improved workflow path assignment logic **Various workflows:** - Consistent variable naming across 40+ workflow files - Improved error messages and user guidance - Better markdown formatting (checkboxes, lists) - Removed redundant validation criteria files (now inline) Removed duplicate BMGD 4-production workflows (12 workflows): - code-review, correct-course, create-story, dev-story - epic-tech-context, retrospective, sprint-planning - story-context, story-done, story-ready **Why:** BMGD now uses shared BMM Phase 4 implementation workflows **Benefit:** Single source of truth, no duplication to maintain Also removed: - validation-criteria.yaml (validation now inline in instructions) - architecture-patterns.yaml references (patterns now managed differently) - AUDIT-REPORT.md files (stale audit artifacts) **BMB workflows:** - Updated checklists for workflow and module creation - Improved agent architecture documentation - Minor instruction clarifications **Core brainstorming workflow:** - Updated README with usage examples - Enhanced instructions and template clarity - Better integration with other modules **BMM installer:** - Updated for track-based system - sprint_artifacts configuration **Tech Writer agent:** - Minor configuration update for documentation workflows Removed 200+ files that should not be in repository: - Installed agent markdown files (analyst, architect, dev, pm, sm, tea, etc.) - Complete workflow instruction copies - Documentation duplicates (quick-start, agents-guide, workflows-*) - Test architecture knowledge base (22 files, 14,000+ lines) - Configuration files (config.yaml, team definitions) These are generated during installation and should not be version controlled. Removed 21 pre-generated XML bundles: - BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - BMGD agents (game-architect, game-designer, game-dev, game-scrum-master) - CIS agents (brainstorming-coach, creative-problem-solver, etc.) - Team bundles (team-fullstack, team-gamedev, creative-squad) **Why:** Users should generate fresh bundles via `npm run bundle` to get latest changes and customizations. - **2 new documentation files** (comprehensive guides) - **98 source files modified** (299 insertions, 6,567 deletions) - **3 installer config files simplified** (major folder structure improvement) - **200+ .bmad/ artifacts removed** (should not be in repo) - **21 web-bundle files removed** (users regenerate as needed) - **12 duplicate workflows removed** (BMGD consolidation) - **40+ workflows updated** (track system, variable standardization, corruption fixes)
2025-11-11 12:22:31 -06:00
- Save to {{module_path}}/module-installer/install-config.yaml
<ask>Does your module need custom installation logic (database setup, API registration, etc.)?</ask>
2025-10-22 12:36:39 -05:00
<check if="yes, create installer.js">
```javascript
// {{module_name}} Module Installer
// Custom installation logic
- @param {Object} options - Installation options
- @param {string} options.projectRoot - Project root directory
- @param {Object} options.config - Module configuration from install-config.yaml
- @param {Array} options.installedIDEs - List of IDE codes being configured
- @param {Object} options.logger - Logger instance (log, warn, error methods)
- @returns {boolean} - true if successful, false to abort installation
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
2025-10-22 12:36:39 -05:00
async function install(options) {
const { projectRoot, config, installedIDEs, logger } = options;
logger.log('Running {{module_name}} custom installer...');
// TODO: Add custom installation logic here
// Examples:
// - Create database tables
// - Download external assets
// - Configure API connections
// - Initialize data files
// - Set up webhooks or integrations
logger.log('{{module_name}} custom installation complete!');
return true;
2025-10-22 12:36:39 -05:00
}
module.exports = { install };
2025-10-22 12:36:39 -05:00
`````
<critical>Save location:</critical>
feat: Add documentation guides, simplify folder structure, and major workflow refactoring Created two comprehensive guides for v6 features: **docs/agent-customization-guide.md** - Complete guide for customizing agent names, personas, memories, and behaviors - Update-safe customization via bmad/_cfg/agents/ configuration files - Real-world examples (TDD setup, multilingual agents, custom workflows) - Troubleshooting and best practices **docs/web-bundles-gemini-gpt-guide.md** - Comprehensive guide for using BMad agents in Gemini Gems and Custom GPTs - Critical setup rules with exact configuration text required - Cost-saving strategy: web planning → local implementation (60-80% savings) - Platform comparison (Gemini Gems strongly recommended over Custom GPTs) - Complete workflow examples showing full planning-to-implementation cycle - Team bundle guidance (Gemini 2.5 Pro+ only) **README.md updates** - Added prominent links in v6 Core Enhancements section - Created new "Customization & Sharing" documentation category - Web Bundles feature highlighted with direct guide link **Unified output folder structure across all modules:** **Before (confusing):** - output_folder: Main docs - game_design_docs: Separate design folder - tech_docs: Separate technical folder - dev_ephemeral_location: Separate ephemeral folder outside docs **After (simplified):** - output_folder: Single location for ALL AI-generated artifacts (default: "docs") - Clearer prompt: "Where should AI Generated Artifacts be saved?" - sprint_artifacts: Phase 4 ephemeral content now WITHIN output_folder - BMM: {output_folder}/stories (stories, context, reports) - BMGD: {output_folder}/sprint-artifacts - No longer in separate {bmad_folder}-ephemeral location **Benefits:** - One clear location for all planning artifacts (PRD, Architecture, UX, etc.) - Phase 4 ephemeral items logically grouped within output folder - Eliminated confusing separate folder proliferation - sprint_artifacts now configurable per module **Files changed:** - src/core/_module-installer/install-config.yaml - src/modules/bmm/_module-installer/install-config.yaml - src/modules/bmgd/_module-installer/install-config.yaml **Also cleaned up BMGD config:** - Renamed: specified_framework → primary_platform (clearer naming) - Removed: unused data_path variable Replaced old "project_level" (0-4) system with new "selected_track" terminology: - **quick-flow**: Bug fixes and small features (replaces Level 0-1) - **bmad-method**: Full planning track (replaces Level 2-3) - **enterprise-bmad-method**: Extended planning (replaces Level 4) **Core workflow updates:** - solutioning-gate-check: Complete rewrite of validation logic for track-based artifacts - architecture: Updated context detection, error handling, and messaging for tracks - workflow-init: Updated artifact detection patterns for track-based paths - All workflow status paths updated (method-greenfield, method-brownfield, enterprise-*) Unified variable naming conventions across all workflows: - {output_folder} → {output-folder} (hyphenated format) - {dev_ephemeral_location} → {sprint_artifacts} (clearer purpose) - Hardcoded status file paths → {workflow_status_file} variable Fixed corrupted variable patterns throughout workflow files: - {output*folder} → {output-folder} - {ephemeral*location} → {sprint_artifacts} - \_prd* → *prd* (escaped underscore artifacts) - **\*\***\_\_\_**\*\*** → proper field placeholders Affected patterns included malformed glob patterns, template variables, and markdown formatting artifacts from previous edits. **Architecture workflow (create-architecture):** - Fixed: "Decision Architecture" → "Create Architecture" (consistent naming) - Improved PRD not found handling with exit/continue options - Better user guidance when running standalone vs. within workflow path - Removed hardcoded Level checks, now track-aware - Enhanced validation checklist formatting (□ → - []) - Typo fixes: "mulitple" → "multiple" **Solutioning gate check:** - Complete validation logic rewrite for track-based system - Removed Level-specific artifact expectations - Simplified document discovery (track determines what exists) - Better analysis prompts and user feedback **Workflow-init:** - Updated artifact detection patterns for new folder structure - Fixed corrupt glob patterns throughout - Better sprint_artifacts location detection - Improved workflow path assignment logic **Various workflows:** - Consistent variable naming across 40+ workflow files - Improved error messages and user guidance - Better markdown formatting (checkboxes, lists) - Removed redundant validation criteria files (now inline) Removed duplicate BMGD 4-production workflows (12 workflows): - code-review, correct-course, create-story, dev-story - epic-tech-context, retrospective, sprint-planning - story-context, story-done, story-ready **Why:** BMGD now uses shared BMM Phase 4 implementation workflows **Benefit:** Single source of truth, no duplication to maintain Also removed: - validation-criteria.yaml (validation now inline in instructions) - architecture-patterns.yaml references (patterns now managed differently) - AUDIT-REPORT.md files (stale audit artifacts) **BMB workflows:** - Updated checklists for workflow and module creation - Improved agent architecture documentation - Minor instruction clarifications **Core brainstorming workflow:** - Updated README with usage examples - Enhanced instructions and template clarity - Better integration with other modules **BMM installer:** - Updated for track-based system - sprint_artifacts configuration **Tech Writer agent:** - Minor configuration update for documentation workflows Removed 200+ files that should not be in repository: - Installed agent markdown files (analyst, architect, dev, pm, sm, tea, etc.) - Complete workflow instruction copies - Documentation duplicates (quick-start, agents-guide, workflows-*) - Test architecture knowledge base (22 files, 14,000+ lines) - Configuration files (config.yaml, team definitions) These are generated during installation and should not be version controlled. Removed 21 pre-generated XML bundles: - BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - BMGD agents (game-architect, game-designer, game-dev, game-scrum-master) - CIS agents (brainstorming-coach, creative-problem-solver, etc.) - Team bundles (team-fullstack, team-gamedev, creative-squad) **Why:** Users should generate fresh bundles via `npm run bundle` to get latest changes and customizations. - **2 new documentation files** (comprehensive guides) - **98 source files modified** (299 insertions, 6,567 deletions) - **3 installer config files simplified** (major folder structure improvement) - **200+ .bmad/ artifacts removed** (should not be in repo) - **21 web-bundle files removed** (users regenerate as needed) - **12 duplicate workflows removed** (BMGD consolidation) - **40+ workflows updated** (track system, variable standardization, corruption fixes)
2025-11-11 12:22:31 -06:00
- Save to {{module_path}}/module-installer/installer.js
2025-10-22 12:36:39 -05:00
</check>
2025-10-22 12:36:39 -05:00
<check if="no">
<action>Skip installer.js creation - the standard installer will handle everything</action>
2025-10-22 12:36:39 -05:00
</check>
<template-output>installer_config</template-output>
</step>
<step n="8" goal="Create module documentation">
Generate comprehensive README.md:
````markdown
# {{module_name}}
{{module_purpose}}
## Overview
This module provides:
{{component_summary}}
## Installation
```bash
bmad install {{module_code}}
2025-10-22 12:36:39 -05:00
`````
````
## Components
### Agents ({{agent_count}})
{{agent_documentation}}
### Workflows ({{workflow_count}})
{{workflow_documentation}}
### Tasks ({{task_count}})
{{task_documentation}}
## Quick Start
1. **Load the main agent:**
```
agent {{primary_agent}}
```
2. **View available commands:**
```
*help
```
3. **Run the main workflow:**
```
workflow {{primary_workflow}}
```
## Module Structure
```
{{directory_tree}}
```
## Configuration
The module can be configured in `{bmad_folder}/{{module_code}}/config.yaml`
Key settings:
{{configuration_options}}
## Examples
### Example 1: {{example_use_case}}
{{example_walkthrough}}
## Development Roadmap
- [ ] {{roadmap_item_1}}
- [ ] {{roadmap_item_2}}
- [ ] {{roadmap_item_3}}
## Contributing
To extend this module:
1. Add new agents using `create-agent` workflow
2. Add new workflows using `create-workflow` workflow
3. Submit improvements via pull request
## Author
Created by {{user_name}} on {{date}}
````
<template-output>module_readme</template-output>
</step>
<step n="9" goal="Generate component roadmap">
Create a development roadmap for remaining components:
**TODO.md file:**
2025-10-22 12:36:39 -05:00
```markdown
# {{module_name}} Development Roadmap
## Phase 1: Core Components
2025-10-22 12:36:39 -05:00
{{phase1_tasks}}
## Phase 2: Enhanced Features
2025-10-22 12:36:39 -05:00
{{phase2_tasks}}
## Phase 3: Polish and Integration
2025-10-22 12:36:39 -05:00
{{phase3_tasks}}
## Quick Commands
Create new agent:
2025-10-22 12:36:39 -05:00
```
workflow create-agent
```
Create new workflow:
```
workflow create-workflow
```
## Notes
{{development_notes}}
```
Ask if user wants to:
1. Continue building more components now
2. Save roadmap for later development
3. Test what's been built so far
<template-output>development_roadmap</template-output>
</step>
<step n="10" goal="Validate and finalize module">
2025-10-16 09:50:29 -05:00
<action>Run validation checks:</action>
2025-10-16 09:50:29 -05:00
**Structure validation:**
2025-10-16 09:50:29 -05:00
- All required directories created
- Config files properly formatted
- Installer configuration valid
2025-10-16 09:50:29 -05:00
**Component validation:**
2025-10-16 09:50:29 -05:00
- At least one agent or workflow exists (or planned)
- All references use correct paths
- Module code consistent throughout
2025-10-16 09:50:29 -05:00
**Documentation validation:**
- README.md complete
- Installation instructions clear
- Examples provided
<action>Present summary to {user_name}:</action>
- Module name and code
- Location path
- Agent count (created vs planned)
- Workflow count (created vs planned)
- Task count
- Installer status
2025-10-16 09:50:29 -05:00
<action>Provide next steps guidance:</action>
1. Complete remaining components using roadmap
2025-10-04 17:35:37 -05:00
2. Run the BMAD Method installer to this project location
2025-10-16 09:50:29 -05:00
3. Select 'Compile Agents' option after confirming folder
4. Module will be compiled and available for use
5. Test with bmad install command
6. Share or integrate with existing system
2025-10-16 09:50:29 -05:00
<ask>Would you like to:
- Create another component now?
- Test the module installation?
- Exit and continue later?
2025-10-16 09:50:29 -05:00
</ask>
<template-output>module_summary</template-output>
</step>
</workflow>