262 lines
7.8 KiB
Markdown
Raw Permalink Normal View History

# BMB - BMad Builder Module
2025-10-30 11:26:15 -05:00
Specialized tools and workflows for creating, customizing, and extending BMad components including agents, workflows, and complete modules.
## Table of Contents
- [Module Structure](#module-structure)
- [Documentation](#documentation)
- [Reference Materials](#reference-materials)
2025-10-30 11:26:15 -05:00
- [Core Workflows](#core-workflows)
- [Agent Types](#agent-types)
- [Quick Start](#quick-start)
- [Best Practices](#best-practices)
## Module Structure
2025-10-30 11:26:15 -05:00
### 🤖 Agents
2025-10-30 11:26:15 -05:00
**BMad Builder** - Master builder agent orchestrating all creation workflows with deep knowledge of BMad architecture and conventions.
- Location: `.bmad/bmb/agents/bmad-builder.md`
2025-10-30 11:26:15 -05:00
### 📋 Workflows
**Active Workflows** (Step-File Architecture)
- Location: `src/modules/bmb/workflows/`
- 5 core workflows with 41 step files total
- Template-based execution with JIT loading
**Legacy Workflows** (Being Migrated)
- Location: `src/modules/bmb/workflows-legacy/`
- Module-specific workflows pending conversion to step-file architecture
### 📚 Documentation
- Location: `src/modules/bmb/docs/`
- Comprehensive guides for agents and workflows
- Architecture patterns and best practices
### 🔍 Reference Materials
- Location: `src/modules/bmb/reference/`
- Working examples of agents and workflows
- Template patterns and implementation guides
## Documentation
### 📖 Agent Documentation
2025-10-30 11:26:15 -05:00
- **[Agent Index](./docs/agents/index.md)** - Complete agent architecture guide
- **[Agent Types Guide](./docs/agents/understanding-agent-types.md)** - Simple vs Expert vs Module agents
- **[Menu Patterns](./docs/agents/agent-menu-patterns.md)** - YAML menu design and handler types
- **[Agent Compilation](./docs/agents/agent-compilation.md)** - Auto-injection rules and compilation process
2025-10-30 11:26:15 -05:00
### 📋 Workflow Documentation
2025-10-30 11:26:15 -05:00
- **[Workflow Index](./docs/workflows/index.md)** - Core workflow system overview
- **[Architecture Guide](./docs/workflows/architecture.md)** - Step-file design and JIT loading
- **[Template System](./docs/workflows/templates/step-template.md)** - Standard step file template
- **[Intent vs Prescriptive](./docs/workflows/intent-vs-prescriptive-spectrum.md)** - Design philosophy
2025-10-30 11:26:15 -05:00
## Reference Materials
2025-10-30 11:26:15 -05:00
### 🤖 Agent Examples
2025-10-30 11:26:15 -05:00
- **[Simple Agent Example](./reference/agents/simple-examples/commit-poet.agent.yaml)** - Self-contained agent
- **[Expert Agent Example](./reference/agents/expert-examples/journal-keeper/)** - Agent with persistent memory
- **[Module Agent Examples](./reference/agents/module-examples/)** - Integration patterns (BMM, CIS)
### 📋 Workflow Examples
- **[Meal Prep & Nutrition](./reference/workflows/meal-prep-nutrition/)** - Complete step-file workflow demonstration
- **Template patterns** for document generation and state management
## Core Workflows
2025-10-30 11:26:15 -05:00
### Creation Workflows (Step-File Architecture)
2025-10-30 11:26:15 -05:00
**[create-agent](./workflows/create-agent/)** - Build BMad agents
2025-10-30 11:26:15 -05:00
- 11 guided steps from brainstorming to celebration
- 18 reference data files with validation checklists
- Template-based agent generation
**[create-workflow](./workflows/create-workflow/)** - Design workflows
- 12 structured steps from init to review
- 9 template files for workflow creation
- Step-file architecture implementation
### Editing Workflows
**[edit-agent](./workflows/edit-agent/)** - Modify existing agents
- 5 steps: discovery → validation
- Intent-driven analysis and updates
- Best practice compliance
2025-10-30 11:26:15 -05:00
**[edit-workflow](./workflows/edit-workflow/)** - Update workflows
- 5 steps: analyze → compliance check
- Structure maintenance and validation
- Template updates for consistency
### Quality Assurance
**[workflow-compliance-check](./workflows/workflow-compliance-check/)** - Validation
- 8 systematic validation steps
- Adversarial analysis approach
- Detailed compliance reporting
### Legacy Migration (Pending)
Workflows in `workflows-legacy/` are being migrated to step-file architecture:
- Module-specific workflows
- Historical implementations
- Conversion planning in progress
2025-10-30 11:26:15 -05:00
## Agent Types
BMB creates three agent architectures:
### Simple Agent
2025-10-30 11:26:15 -05:00
- **Self-contained**: All logic in single YAML file
- **Stateless**: No persistent memory across sessions
- **Purpose**: Single utilities and specialized tools
- **Example**: Commit poet, code formatter
2025-10-30 11:26:15 -05:00
### Expert Agent
2025-10-30 11:26:15 -05:00
- **Persistent Memory**: Maintains knowledge across sessions
- **Sidecar Resources**: External files and data storage
- **Domain-specific**: Focuses on particular knowledge areas
- **Example**: Journal keeper, domain consultant
2025-10-30 11:26:15 -05:00
### Module Agent
2025-10-30 11:26:15 -05:00
- **Team Integration**: Orchestrates within specific modules
- **Workflow Coordination**: Manages complex processes
- **Professional Infrastructure**: Enterprise-grade capabilities
- **Examples**: BMM project manager, CIS innovation strategist
## Quick Start
### Using BMad Builder Agent
1. **Load BMad Builder agent** in your IDE:
2025-10-30 11:26:15 -05:00
```
/bmad:bmb:agents:bmad-builder
2025-10-30 11:26:15 -05:00
```
2. **Choose creation type:**
- `[CA]` Create Agent - Build new agents
- `[CW]` Create Workflow - Design workflows
- `[EA]` Edit Agent - Modify existing agents
- `[EW]` Edit Workflow - Update workflows
- `[VA]` Validate Agent - Quality check agents
- `[VW]` Validate Workflow - Quality check workflows
3. **Follow interactive prompts** for step-by-step guidance
2025-10-30 11:26:15 -05:00
### Example: Creating an Agent
2025-10-30 11:26:15 -05:00
```
User: I need a code review agent
Builder: [CA] Create Agent
[11-step guided process]
Step 1: Brainstorm agent concept
Step 2: Define persona and role
Step 3: Design command structure
...
Step 11: Celebrate and deploy
```
### Direct Workflow Execution
Workflows can also be run directly without the agent interface:
```yaml
# Execute specific workflow steps
workflow: ./workflows/create-agent/workflow.yaml
```
## Use Cases
2025-10-30 11:26:15 -05:00
### Custom Development Teams
Build specialized agents for:
2025-10-30 11:26:15 -05:00
- Domain expertise (legal, medical, finance)
- Company processes
- Tool integrations
- Automation tasks
2025-10-30 11:26:15 -05:00
### Workflow Extensions
Create workflows for:
- Compliance requirements
- Quality gates
- Deployment pipelines
2025-10-30 11:26:15 -05:00
- Custom methodologies
2025-10-30 11:26:15 -05:00
### Complete Solutions
2025-10-30 11:26:15 -05:00
Package modules for:
2025-10-30 11:26:15 -05:00
- Industry verticals
- Technology stacks
- Business processes
- Educational frameworks
## Architecture Principles
### Step-File Workflow Design
- **Micro-file Approach**: Each step is self-contained
- **Just-In-Time Loading**: Only current step in memory
- **Sequential Enforcement**: No skipping steps allowed
- **State Tracking**: Progress documented in frontmatter
- **Append-Only Building**: Documents grow through execution
### Intent vs Prescriptive Spectrum
- **Creative Workflows**: High user agency, AI as facilitator
- **Structured Workflows**: Clear process, AI as guide
- **Prescriptive Workflows**: Strict compliance, AI as validator
2025-10-30 11:26:15 -05:00
## Best Practices
1. **Study Reference Materials** - Review docs/ and reference/ examples
2. **Choose Right Agent Type** - Simple vs Expert vs Module based on needs
3. **Follow Step-File Patterns** - Use established templates and structures
4. **Document Thoroughly** - Clear instructions and frontmatter metadata
5. **Validate Continuously** - Use compliance workflows for quality
6. **Maintain Consistency** - Follow YAML patterns and naming conventions
2025-10-30 11:26:15 -05:00
## Integration
2025-10-30 11:26:15 -05:00
BMB components integrate with:
- **BMad Core** - Framework foundation and agent compilation
- **BMM** - Development workflows and project management
- **CIS** - Creative innovation and strategic workflows
- **Custom Modules** - Domain-specific solutions
## Getting Help
- **Documentation**: Check `docs/` for comprehensive guides
- **Reference Materials**: See `reference/` for working examples
- **Validation**: Use `workflow-compliance-check` for quality assurance
- **Templates**: Leverage workflow templates for consistent patterns
---
BMB provides a complete toolkit for extending BMad Method with disciplined, systematic approaches to agent and workflow development while maintaining framework consistency and power.