BMad Builder (BMB) is a meta-module for the BMad Code Platform that helps users create custom AI agents, workflows, and domain-specific modules. It's a documentation-driven project with YAML-based agent/workflow definitions and some minimal Node.js tooling.
npm run docs:dev # Start Astro dev server (http://localhost:4321)
npm run docs:build # Build documentation site
npm run docs:preview # Preview built sitenpm test # Run full test suite (schemas, refs, lint, format, md)
npm run test:schemas # Validate agent YAML schemas
npm run test:refs # Validate internal file references
npm run validate:schemas # Validate actual agent files against schema
npm run validate:refs # Check file references (alias for above)npm run lint # ESLint check
npm run lint:fix # ESLint auto-fix
npm run lint:md # Markdown lint
npm run format:check # Prettier check
npm run format:fix # Prettier formatnpm run release # Bump patch version and push tag
npm run release:minor # Bump minor version
npm run release:major # Bump major versionagents/— Agent definitions (*.agent.yaml) with persona, menu, and metadataworkflows/— Multi-step guided processes organized by type (agent, workflow, module)- Each workflow has
steps-c/(create),steps-e/(edit),steps-v/(validate) - Step-file architecture: JIT loading, sequential execution, state tracking
data/contains CSV knowledge bases for agents
- Each workflow has
your-module/
├── src/
│ ├── module.yaml # Module metadata, install config, variables
│ ├── agents/ # *.agent.yaml files
│ ├── workflows/ # Workflow files with step subdirectories
│ └── tools/ # Optional reusable tools
└── package.json
build-docs.mjs— Consolidates docs, generates LLM-friendly files (llms.txt), builds Astro sitevalidate-file-refs.mjs— Validates cross-file references in agents/workflows
- Diataxis structure: tutorials, how-to, explanation, reference
- Starlight-based site in
website/ _STYLE_GUIDE.md— Project-specific writing conventions (Google style + Diataxis)
- BMad OS (Open Source) skills for maintainer workflows
bmad-os-add-doc— Diataxis documentation authoringbmad-os-release-module— Module release processbmad-os-gh-triage— GitHub issue triage
agent.metadata— id, name, title, icon, moduleagent.persona— role, identity, communication_style, principlesagent.menu— trigger commands that execute workflowsconversational_knowledge— CSV files loaded at runtime
- Micro-file design: each step is self-contained
- Just-in-time loading: only current step in memory
- Sequential enforcement with state tracking
- Menus halt execution waiting for user input
- Frontmatter defines: name, description, web_bundle, createWorkflow
{project-root}/_bmad/bmb/— Installation path (in repo, maps tosrc/){bmad_builder_output_folder}— User's custom content output- Runtime variables:
{output_folder},{project-root}from Core config
- Node.js 22+ required (see
.nvmrc) - Module is
default_selected: false— not auto-installed - File references in src/ become
_bmad/bmb/after installation - All YAML uses double quotes with
avoidEscape: true - Website builds to
build/site/for deployment - LLM docs have 600k char limit (~150k tokens)
BMad modules are published as npm packages. The module code (src/) is what gets installed into user projects via npx bmad-method install. The astro website is deployed separately (GitHub Pages via CNAME).