230 lines
4.9 KiB
Markdown
Raw Normal View History

# Create Module Workflow
2025-10-16 21:50:50 -05:00
Interactive scaffolding system creating complete BMad modules with agents, workflows, tasks, and installation infrastructure.
2025-10-16 21:50:50 -05:00
## Table of Contents
2025-10-16 21:50:50 -05:00
- [Quick Start](#quick-start)
- [Workflow Phases](#workflow-phases)
- [Output Structure](#output-structure)
- [Module Components](#module-components)
- [Best Practices](#best-practices)
2025-10-16 21:50:50 -05:00
## Quick Start
2025-10-16 21:50:50 -05:00
```bash
# Basic invocation
2025-10-16 21:50:50 -05:00
workflow create-module
# With module brief input
workflow create-module --input module-brief-{name}-{date}.md
2025-10-16 21:50:50 -05:00
# Via BMad Builder
*create-module
2025-10-16 21:50:50 -05:00
```
## Workflow Phases
2025-10-16 21:50:50 -05:00
### Phase 1: Concept Definition
2025-10-16 21:50:50 -05:00
- Define module purpose and audience
- Establish module code (kebab-case) and name
- Choose category (Domain, Creative, Technical, Business, Personal)
- Plan component architecture
2025-10-16 21:50:50 -05:00
**Module Brief Integration:**
2025-10-16 21:50:50 -05:00
- Auto-detects existing briefs
- Uses as pre-populated blueprint
- Accelerates planning phase
2025-10-16 21:50:50 -05:00
### Phase 2: Architecture Planning
2025-10-16 21:50:50 -05:00
- Create directory hierarchy
- Setup configuration system
- Define installer structure
- Establish component folders
2025-10-16 21:50:50 -05:00
### Phase 3: Component Creation
2025-10-16 21:50:50 -05:00
- Optional first agent creation
- Optional first workflow creation
- Component placeholder generation
- Integration validation
2025-10-16 21:50:50 -05:00
### Phase 4: Installation Setup
2025-10-16 21:50:50 -05:00
- Create install-config.yaml
- Configure deployment questions
- Setup installer logic
- Post-install messaging
2025-10-16 21:50:50 -05:00
### Phase 5: Documentation
2025-10-16 21:50:50 -05:00
- Generate comprehensive README
- Create development roadmap
- Provide quick commands
- Document next steps
2025-10-16 21:50:50 -05:00
## Output Structure
2025-10-16 21:50:50 -05:00
### Generated Directory
2025-10-16 21:50:50 -05:00
```
bmad/{module-code}/
├── agents/ # Agent definitions
├── workflows/ # Workflow processes
├── tasks/ # Reusable tasks
├── templates/ # Document templates
├── data/ # Module data files
├── _module-installer/ # Installation logic
│ ├── install-config.yaml
│ └── installer.js
├── README.md # Module documentation
├── TODO.md # Development roadmap
└── config.yaml # Runtime configuration
```
2025-10-16 21:50:50 -05:00
### Configuration Files
2025-10-16 21:50:50 -05:00
**install-config.yaml** - Installation questions
2025-10-16 21:50:50 -05:00
```yaml
questions:
- id: user_name
prompt: 'Your name?'
default: 'User'
- id: output_folder
prompt: 'Output location?'
default: './output'
```
2025-10-16 21:50:50 -05:00
**config.yaml** - Generated from user answers during install
2025-10-16 21:50:50 -05:00
```yaml
user_name: 'John Doe'
output_folder: './my-output'
```
2025-10-16 21:50:50 -05:00
## Module Components
2025-10-16 21:50:50 -05:00
### Agents
2025-10-16 21:50:50 -05:00
- Full module agents with workflows
- Expert agents with sidecars
- Simple utility agents
2025-10-16 21:50:50 -05:00
### Workflows
2025-10-16 21:50:50 -05:00
- Multi-step guided processes
- Configuration-driven
- Web bundle support
2025-10-16 21:50:50 -05:00
### Tasks
2025-10-16 21:50:50 -05:00
- Reusable operations
- Agent-agnostic
- Modular components
2025-10-16 21:50:50 -05:00
### Templates
2025-10-16 21:50:50 -05:00
- Document structures
- Output formats
- Report templates
2025-10-16 21:50:50 -05:00
## Best Practices
### Planning
2025-10-16 21:50:50 -05:00
1. **Use module-brief workflow first** - Creates comprehensive blueprint
2. **Define clear scope** - Avoid feature creep
3. **Plan component interactions** - Map agent/workflow relationships
2025-10-16 21:50:50 -05:00
### Structure
2025-10-16 21:50:50 -05:00
1. **Follow conventions** - Use established patterns
2. **Keep components focused** - Single responsibility
3. **Document thoroughly** - Clear README and inline docs
2025-10-16 21:50:50 -05:00
### Development
2025-10-16 21:50:50 -05:00
1. **Start with core agent** - Build primary functionality first
2. **Create key workflows** - Essential processes before edge cases
3. **Test incrementally** - Validate as you build
2025-10-16 21:50:50 -05:00
### Installation
2025-10-16 21:50:50 -05:00
1. **Minimal config questions** - Only essential settings
2. **Smart defaults** - Sensible out-of-box experience
3. **Clear post-install** - Guide users to first steps
2025-10-16 21:50:50 -05:00
## Integration Points
2025-10-16 21:50:50 -05:00
### With Other Workflows
2025-10-16 21:50:50 -05:00
- **module-brief** - Strategic planning input
- **create-agent** - Agent component creation
- **create-workflow** - Workflow building
- **redoc** - Documentation maintenance
2025-10-16 21:50:50 -05:00
### With BMad Core
2025-10-16 21:50:50 -05:00
- Uses core framework capabilities
- Integrates with module system
- Follows BMad conventions
2025-10-16 21:50:50 -05:00
## Examples
2025-10-16 21:50:50 -05:00
### Domain-Specific Module
2025-10-16 21:50:50 -05:00
```
Category: Domain-Specific
Code: legal-advisor
Components:
- Contract Review Agent
- Compliance Workflow
- Legal Templates
```
2025-10-16 21:50:50 -05:00
### Creative Module
2025-10-16 21:50:50 -05:00
```
Category: Creative
Code: story-builder
Components:
- Narrative Agent
- Plot Workflow
- Character Templates
```
2025-10-16 21:50:50 -05:00
### Technical Module
2025-10-16 21:50:50 -05:00
```
Category: Technical
Code: api-tester
Components:
- Test Runner Agent
- API Validation Workflow
- Test Report Templates
```
2025-10-16 21:50:50 -05:00
## Workflow Files
2025-10-16 21:50:50 -05:00
```
create-module/
├── workflow.yaml # Configuration
├── instructions.md # Step guide
├── checklist.md # Validation
├── module-structure.md # Architecture
├── installer-templates/ # Install files
└── README.md # This file
```
2025-10-16 21:50:50 -05:00
## Related Documentation
2025-10-16 21:50:50 -05:00
- [Module Structure](./module-structure.md)
- [Module Brief Workflow](../module-brief/README.md)
- [Create Agent](../create-agent/README.md)
- [Create Workflow](../create-workflow/README.md)
- [BMB Module](../../README.md)