If yes:
If no, proceed to check for module brief.
<template-output>brainstorming_results</template-output>
If create:
If have:
If skip, proceed directly to module definition.
<template-output>module_brief</template-output>
Ask the user about their module vision:
“What kind of module do you want to create? Tell me about its purpose and what it will help with.”
Listen to their description and then:
Module Identity (AI Proposed):
Module code - Generate kebab-case from name:
Present as: “Based on what you described, I suggest the module code: {{proposed-code}}. This will be used in paths like bmad/{{proposed-code}}/agents/. Does this work or would you prefer something different?”
Module purpose - Refine their description into 1-2 clear sentences
Module Theme Examples:
Store module identity for scaffolding.
<template-output>module_identity</template-output>
“Based on your {{module_name}}, here’s what I think would make a great module structure:”
Agents Planning (AI Proposed):
For a Data Visualization module, suggest:
For an RPG Toolkit, suggest:
For a Team Collaboration module, suggest:
Present as: “I’m thinking your module could have these agents: [list]. We can start with the core ones and add others later. Which of these resonate with your vision?”
Workflows Planning (AI Proposed):
For a Data Visualization module, suggest workflows like:
For an RPG Toolkit, suggest workflows like:
Present as: “For workflows, these would complement your agents well: [list]. Each can be created as we need them. Which are most important to start with?”
Example workflows:
Tasks Planning (optional): Ask: Any special tasks that don’t warrant full workflows?
For each task:
<template-output>module_components</template-output>
Simple Module (auto-select if):
Standard Module (auto-select if):
Complex Module (auto-select if):
Present as: “Based on your planned components, this looks like a {{determined_type}} module. This means we’ll set up {{structure_description}}.”
<template-output>module_type</template-output>
{{module_code}}/
├── agents/ # Agent definitions
├── workflows/ # Workflow folders
├── tasks/ # Task files (if any)
├── templates/ # Shared templates
├── data/ # Module data files
├── config.yaml # Module configuration
└── README.md # Module documentation
{{module_code}}/
├── _module-installer/
│ ├── install-module-config.yaml
│ ├── installer.js (optional)
│ └── assets/ # Files to copy during install
├── config.yaml # Runtime configuration
├── agents/ # Agent configs (optional)
├── workflows/ # Workflow instances
└── data/ # User data directory
<template-output>directory_structure</template-output>
# {{module_name}} Module Configuration
module_name: {{module_name}}
module_code: {{module_code}}
author: {{user_name}}
description: {{module_purpose}}
# Module paths
module_root: "{project-root}/bmad/{{module_code}}"
installer_path: "{project-root}/bmad/{{module_code}}"
# Component counts
agents:
count: {{agent_count}}
list: {{agent_list}}
workflows:
count: {{workflow_count}}
list: {{workflow_list}}
tasks:
count: {{task_count}}
list: {{task_list}}
# Module-specific settings
{{custom_settings}}
# Output configuration
output_folder: "{project-root}/docs/{{module_code}}"
data_folder: "{{determined_module_path}}/data"
<template-output>module_config</template-output>
If yes: <invoke-workflow input=“{{module_components}}”> {agent_builder} </invoke-workflow>
Guide them to create the primary agent for the module.
If no, create placeholder:
```md
<template-output>first_agent</template-output>
</step>
<step n="6" goal="Create first workflow" optional="true">
Ask: **Create your first workflow now? [Yes/no]**
If yes:
<invoke-workflow input="{{module_components}}">
{workflow_builder}
</invoke-workflow>
Guide them to create the primary workflow.
<critical>Save to module's workflows folder:</critical>
- Save to {{module_path}}/workflows/
If no, create placeholder structure:
workflows/{{workflow_name}}/ ├── workflow.yaml # TODO: Configure ├── instructions.md # TODO: Add steps └── template.md # TODO: If document workflow ```
<template-output>first_workflow</template-output>
Create install-module-config.yaml:
# {{module_name}} Installation Configuration
module_name: { { module_name } }
module_code: { { module_code } }
installation_date: { { date } }
# Installation steps
install_steps:
- name: 'Create directories'
action: 'mkdir'
paths:
- '{project-root}/bmad/{{module_code}}'
- '{project-root}/bmad/{{module_code}}/data'
- '{project-root}/bmad/{{module_code}}/agents'
- name: 'Copy configuration'
action: 'copy'
source: '{installer_path}/config.yaml'
dest: '{project-root}/bmad/{{module_code}}/config.yaml'
- name: 'Register module'
action: 'register'
manifest: '{project-root}/bmad/_cfg/manifest.yaml'
# External assets (if any)
external_assets:
- description: '{{asset_description}}'
source: 'assets/{{filename}}'
dest: '{{destination_path}}'
# Post-install message
post_install_message: |
{{module_name}} has been installed successfully!
To get started:
1. Load any {{module_code}} agent
2. Use *help to see available commands
3. Check README.md for full documentation
Create installer.js stub (optional):
// {{module_name}} Module Installer
// This is a placeholder for complex installation logic
function installModule(config) {
console.log('Installing {{module_name}} module...');
// TODO: Add any complex installation logic here
// Examples:
// - Database setup
// - API key configuration
// - External service registration
// - File system preparation
console.log('{{module_name}} module installed successfully!');
return true;
}
module.exports = { installModule };
<template-output>installer_config</template-output>
# {{module_name}}
{{module_purpose}}
## Overview
This module provides:
{{component_summary}}
## Installation
```bash
bmad install {{module_code}}
```
{{agent_documentation}}
{{workflow_documentation}}
{{task_documentation}}
Load the main agent:
agent {{primary_agent}}
View available commands:
*help
Run the main workflow:
workflow {{primary_workflow}}
{{directory_tree}}
The module can be configured in bmad/{{module_code}}/config.yaml
Key settings: {{configuration_options}}
{{example_walkthrough}}
To extend this module:
create-agent workflowcreate-workflow workflowCreated 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:**
```markdown
# {{module_name}} Development Roadmap
## Phase 1: Core Components
{{phase1_tasks}}
## Phase 2: Enhanced Features
{{phase2_tasks}}
## Phase 3: Polish and Integration
{{phase3_tasks}}
## Quick Commands
Create new agent:
workflow create-agent
Create new workflow:
workflow create-workflow
## Notes
{{development_notes}}
Ask if user wants to:
<template-output>development_roadmap</template-output>
Structure validation:
Component validation:
Documentation validation:
Show summary:
✅ Module: {{module_name}} ({{module_code}})
📁 Location: {{module_path}}
👥 Agents: {{agent_count}} ({{agents_created}} created, {{agents_planned}} planned)
📋 Workflows: {{workflow_count}} ({{workflows_created}} created, {{workflows_planned}} planned)
📝 Tasks: {{task_count}}
📦 Installer: Ready at same location
Next steps:
bmad install {{module_code}}Ask: Would you like to:
<template-output>module_summary</template-output>