BMAD Module Structure Guide

What is a Module?

A BMAD module is a self-contained package of agents, workflows, tasks, and resources that work together to provide specialized functionality. Think of it as an expansion pack for the BMAD Method.

Module Architecture

Core Structure

project-root/
├── bmad/{module-code}/     # Source code
│   ├── agents/                    # Agent definitions
│   ├── workflows/                 # Workflow folders
│   ├── tasks/                     # Task files
│   ├── templates/                 # Shared templates
│   ├── data/                      # Static data
│   ├── config.yaml                # Module config
│   └── README.md                  # Documentation
│
└── bmad/{module-code}/            # Runtime instance
    ├── _module-installer/         # Installation files
    │   ├── install-module-config.yaml
    │   ├── installer.js          # Optional
    │   └── assets/               # Install assets
    ├── config.yaml               # User config
    ├── agents/                   # Agent overrides
    ├── workflows/                # Workflow instances
    └── data/                     # User data

Module Types by Complexity

Simple Module (1-2 agents, 2-3 workflows)

Perfect for focused, single-purpose tools.

Example: Code Review Module

Standard Module (3-5 agents, 5-10 workflows)

Comprehensive solution for a domain.

Example: Project Management Module

Complex Module (5+ agents, 10+ workflows)

Full platform or framework.

Example: RPG Toolkit Module

Module Naming Conventions

Module Code (kebab-case)

Module Name (Title Case)

Component Guidelines

Agents per Module

Recommended Distribution:

Anti-patterns to Avoid:

Workflows per Module

Categories:

Workflow Complexity Guide:

Tasks per Module

Tasks should be used for:

Module Dependencies

Internal Dependencies

External Dependencies

Installation Infrastructure

Required: install-module-config.yaml

module_name: 'Module Name'
module_code: 'module-code'

install_steps:
  - name: 'Create directories'
    action: 'mkdir'
    paths: [...]

  - name: 'Copy files'
    action: 'copy'
    mappings: [...]

  - name: 'Register module'
    action: 'register'

Optional: installer.js

For complex installations requiring:

Optional: External Assets

Files that get copied outside the module:

Module Lifecycle

Development Phases

  1. Planning Phase

  2. Scaffolding Phase

  3. Building Phase

  4. Testing Phase

  5. Deployment Phase

Best Practices

Module Cohesion

Progressive Enhancement

Documentation Standards

Naming Consistency

Example Modules

Example 1: Personal Productivity

productivity/
├── agents/
│   ├── task-manager.md      # GTD methodology
│   └── focus-coach.md        # Pomodoro timer
├── workflows/
│   ├── daily-planning/       # Morning routine
│   ├── weekly-review/        # Week retrospective
│   └── project-setup/        # New project init
└── config.yaml

Example 2: Content Creation

content/
├── agents/
│   ├── writer.md            # Blog/article writer
│   ├── editor.md            # Copy editor
│   └── seo-optimizer.md     # SEO specialist
├── workflows/
│   ├── blog-post/           # Full blog creation
│   ├── social-media/        # Social content
│   ├── email-campaign/      # Email sequence
│   └── content-calendar/    # Planning
└── templates/
    ├── blog-template.md
    └── email-template.md

Example 3: DevOps Automation

devops/
├── agents/
│   ├── deploy-master.md     # Deployment orchestrator
│   ├── monitor.md           # System monitoring
│   ├── incident-responder.md # Incident management
│   └── infra-architect.md   # Infrastructure design
├── workflows/
│   ├── ci-cd-setup/         # Pipeline creation
│   ├── deploy-app/          # Application deployment
│   ├── rollback/            # Emergency rollback
│   ├── health-check/        # System verification
│   └── incident-response/   # Incident handling
├── tasks/
│   ├── check-status.md      # Quick status check
│   └── notify-team.md       # Team notifications
└── data/
    └── runbooks/            # Operational guides

Module Evolution Pattern

Simple Module → Standard Module → Complex Module → Module Suite
     (MVP)          (Enhanced)        (Complete)      (Ecosystem)

Common Pitfalls

  1. Over-engineering: Starting too complex
  2. Under-planning: No clear architecture
  3. Poor boundaries: Module does too much
  4. Weak integration: Components don’t work together
  5. Missing docs: No clear usage guide

Success Metrics

A well-designed module has: