Skip to content

Commit 50eb6ac

Browse files
authored
Add module tools: setup skill, config system, and builder updates (#34)
* Remove all manifest concepts from skills and docs Delete bmad-manifest.json, bmad-skill-manifest.yaml, manifest.py, bmad-manifest-schema.json, and metadata-reference.md files across both builders and samples. Remove all references from docs, build processes, quality scans, prepass scripts, templates, and references. * Add bmad-builder-config skill and remove all bmad-init references New skill: bmad-builder-config - Simple workflow that installs/configures the bmb module into a project - Creates/updates shared {project-root}/_bmad/config.yaml with module settings - Merges module-help.csv entries with anti-zombie pattern (removes stale entries before writing fresh ones) - Two deterministic Python scripts: merge-config.py and merge-help-csv.py - 22 unit tests covering fresh install, update, anti-zombie, round-trip - Outcome-based SKILL.md (~39 lines) — scripts are self-documenting via --help - Both lint gates pass clean (path-standards, script-standards) Remove bmad-init from entire codebase (13 files): - bmad-init skill no longer exists; config is read directly from {project-root}/_bmad/config.yaml - Templates: removed {if-bmad-init}/{/if-bmad-init} conditional blocks, replaced with unconditional config loading from config.yaml - Template substitution rules: removed bmad-init conditional section - Classification reference: removed bmad-init mentions from type descriptions - Complex workflow patterns: replaced bmad-init invocation pattern with direct config file reading - Build process (both builders): removed bmad-init as default external skill, updated standalone field description - Quality scanners: replaced "bmad-init variables" with "config variables" in prompt-craft, workflow-integrity, and enhancement-opportunities scanners - Script opportunities reference: updated variable tracking to reference config.yaml directly - Standard fields: updated standalone field from "Opts out of bmad-init?" to "Fully standalone, no config needed?" Update module-help.csv: - New CSV column format (module,agent-name,skill-name,display-name,...) - Added bmad-builder-config entry (Configure Builder, CB) * Rename bmad-builder-config to bmad-builder-setup with user config split and legacy migration Renames the skill directory and updates all references (display name, menu code, descriptions). Splits configuration into shared config.yaml and personal config.user.yaml for gitignored user settings. Adds legacy config migration that carries forward matching values then removes old files. Expands SKILL.md with argument-based headless mode, default priority chain, and an outcome section requiring consistent use of user name and communication language. Updates both merge scripts and their tests for the new flags and features. * Add module configuration explanation doc Explains when modules need configuration vs. sensible defaults or agent memory, how the setup skill writes config files and registers with the help system, and when standalone skills can skip the overhead entirely. Includes sample prompt for upcoming module scaffolding tooling. * Update builder skill activation to load config with sensible fallbacks Rewrites On Activation for agent-builder and workflow-builder to load config from _bmad/config.yaml and config.user.yaml with fallback defaults when config is missing. Also adds .ruff* to gitignore. * Rename agent memory location from _bmad/_memory/ to _bmad/.memory/ * Rename memory path from _bmad/.memory/ to _bmad/memory/ * Fix CI checks: remove eslint/validate, add doc link validator, fix formatting * Simplify builder templates to outcome-based config pattern Rewrite both agent and workflow SKILL-templates to be minimal skeletons rather than prescriptive blueprints. Templates now cover frontmatter, overview, and activation with config loading — the builder crafts everything else based on discovery phases. Key changes: - Config loading uses module/standalone pattern with sensible defaults and setup skill awareness (matching the builder's own activation) - Standardize on "headless" terminology, remove "autonomous" mixing - Headless reduced to one sentence instead of 25-line specification - Remove rigid workflow steps/stages/menus from templates - Update substitution rules, classification reference, and complex workflow patterns to match * Enforce skill structure conventions and restore config resolution Frontmatter: - Only name and description allowed in YAML frontmatter - Removed argument-hint and all non-frontmatter fields (displayName, skillName, etc.) - Split standard-fields.md into Frontmatter Fields vs Content Fields sections - Lint script now validates frontmatter keys and flags invalid ones Skill-internal paths: - All skill-internal references now require ./ prefix (./references/, ./scripts/, ./assets/) - Distinguishes skill-internal files from {project-root} paths to prevent LLM confusion - Lint script updated: ./ is now required (was previously flagged as violation) - Added bare-internal-path check for references/, scripts/, assets/ without ./ Progressive disclosure structure: - All prompt files must live in ./references/, not at skill root - SKILL.md is the only .md file at root — it serves as identity and router - Capability sections replaced with succinct routing tables - Removed CLI Usage section — user-facing help belongs in Overview - Lint script now flags .md files at skill root (except SKILL.md) Config resolution restored: - Both builder SKILL.md files now list config keys with actual defaults - user_name, communication_language, document_output_language, output paths - Fixed anti-pattern in skill-best-practices: distinguishes mechanic (bad) from outcome-intent with defaults (good) Activation flow: - Single activation flow regardless of interactive/headless mode - Sidecar index.md is the single entry point to memory system - Interactive activation offers capability menu or continues from memory context - SKILL template updated with config resolution, routing table, and memory patterns Lint gate auto-fix: - Build process now delegates lint to subagent if available - Fix-and-rerun loop with max 3 attempts per script - Lint scripts bumped to v2.0.0 with frontmatter, structure, and path checks Also includes quality scanner and asset template refinements across both builders.
1 parent dfc064b commit 50eb6ac

97 files changed

Lines changed: 2853 additions & 3879 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish to NPM
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
permissions:
99
contents: read
@@ -18,8 +18,8 @@ jobs:
1818
- name: Setup Node.js
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '20'
22-
registry-url: 'https://registry.npmjs.org'
21+
node-version: "20"
22+
registry-url: "https://registry.npmjs.org"
2323

2424
- name: Install dependencies
2525
run: npm install

.github/workflows/quality.yaml

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Quality & Validation
22

3-
# Runs comprehensive quality checks on all PRs:
3+
# Runs quality checks on all PRs:
44
# - Prettier (formatting)
5-
# - ESLint (linting)
65
# - markdownlint (markdown quality)
7-
# - Schema validation (YAML structure)
8-
# - Agent schema tests (fixture-based validation)
9-
# - Installation component tests (compilation)
10-
# - Bundle validation (web bundle integrity)
6+
# - Documentation build
117

128
"on":
139
pull_request:
@@ -33,24 +29,6 @@ jobs:
3329
- name: Prettier format check
3430
run: npm run format:check
3531

36-
eslint:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v4
41-
42-
- name: Setup Node
43-
uses: actions/setup-node@v4
44-
with:
45-
node-version-file: ".nvmrc"
46-
cache: "npm"
47-
48-
- name: Install dependencies
49-
run: npm ci
50-
51-
- name: ESLint
52-
run: npm run lint
53-
5432
markdownlint:
5533
runs-on: ubuntu-latest
5634
steps:
@@ -89,30 +67,3 @@ jobs:
8967

9068
- name: Build documentation
9169
run: npm run docs:build
92-
93-
validate:
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Checkout
97-
uses: actions/checkout@v4
98-
99-
- name: Setup Node
100-
uses: actions/setup-node@v4
101-
with:
102-
node-version-file: ".nvmrc"
103-
cache: "npm"
104-
105-
- name: Install dependencies
106-
run: npm ci
107-
108-
- name: Validate YAML schemas
109-
run: npm run validate:schemas
110-
111-
- name: Run agent schema validation tests
112-
run: npm run test:schemas
113-
114-
- name: Test agent compilation components
115-
run: npm run test:install
116-
117-
- name: Validate file references
118-
run: npm run validate:refs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ build/*.txt
1818

1919
# Environment variables
2020
.env
21+
.ruff*
2122

2223
# Python
2324
__pycache__/

.markdownlint-cli2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ignores:
77
- CODE_OF_CONDUCT.md
88
- _bmad/**
99
- _bmad*/**
10+
- src/skills/**
1011
- .*/**
1112
- z*/**
1213

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
### Removed
1616

17-
- Obsolete sample and manifest files from old skill structure
17+
- Obsolete sample files from old skill structure
1818
- Unneeded images from project root
1919

2020
## [1.0.0] - 2026-03-15

docs/explanation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Create world-class AI agents and workflows with the BMad Builder.
1212
| **[What Are Skills](/explanation/what-are-skills.md)** | The universal building block for everything BMad produces |
1313
| **[What Are Agents](/explanation/what-are-bmad-agents.md)** | AI personas with specialized capabilities and memory |
1414
| **[What Are Workflows](/explanation/what-are-workflows.md)** | Structured step-by-step processes and utilities |
15+
| **[Module Configuration](/explanation/module-configuration.md)** | How modules handle user configuration and help registration through a setup skill |
1516

1617
## Design Patterns
1718

@@ -26,5 +27,4 @@ Create world-class AI agents and workflows with the BMad Builder.
2627
| Resource | Description |
2728
|----------|-------------|
2829
| **[Builder Commands](/reference/builder-commands.md)** | All capabilities, modes, and phases for both builders |
29-
| **[Skill Manifest](/reference/bmad-skill-manifest.md)** | Field reference for bmad-manifest.json |
3030
| **[Workflow Patterns](/reference/workflow-patterns.md)** | Skill types, structure patterns, and execution models |
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: "Module Configuration and the Setup Skill"
3+
description: How BMad modules handle user configuration through a setup skill, when to use configuration vs. alternatives, and how to register with the help system
4+
---
5+
6+
Every BMad module can include a **setup skill** that collects user preferences and registers the module's capabilities with the help system. The BMad Builder module's own setup skill (`bmad-builder-setup`) is the reference implementation.
7+
8+
## When You Need Configuration
9+
10+
Most modules should not need configuration at all. Before adding configurable values, consider whether a simpler alternative exists.
11+
12+
| Approach | When to Use |
13+
| -------- | ----------- |
14+
| **Sensible defaults** | The variable has one clearly correct answer for most users that could be overridden or updated by the specific skill that needs it the first time it runs |
15+
| **Agent memory** | Your module follows the agent pattern and the agent can learn preferences through conversation |
16+
| **Configuration** | The value genuinely varies across projects and cannot be inferred at runtime |
17+
18+
:::tip[Standalone Skills and Agents]
19+
If you are building a standalone agent or skill — not a multi-capability module — the setup skill overhead is not worth it. A concise overview section at the top of your SKILL.md body, clear comments in script headers, and `--help` flags on any CLI tools give users everything they need to discover and use the skill.
20+
:::
21+
22+
## What the Setup Skill Does
23+
24+
A setup skill serves two purposes:
25+
26+
| Purpose | What Happens |
27+
| ------- | ------------ |
28+
| **Configuration** | Collects user preferences and writes them to shared config files |
29+
| **Help registration** | Adds the module's capabilities to the project-wide help system so users can discover them |
30+
31+
## Configuration Files
32+
33+
Setup skills write to three files in `{project-root}/_bmad/`:
34+
35+
| File | Scope | Contains |
36+
| ---- | ----- | -------- |
37+
| `config.yaml` | Shared, committed to git | Core settings at root level, plus a section per module with metadata and module-specific values |
38+
| `config.user.yaml` | Personal, gitignored | User-only settings like `user_name` and `communication_language` |
39+
| `module-help.csv` | Shared, committed to git | One row per capability the module exposes |
40+
41+
Core settings (like `output_folder` and `document_output_language`) live at the root of `config.yaml` and are shared across all modules. Each module also gets its own section keyed by its module code.
42+
43+
## The module.yaml File
44+
45+
Each module declares its identity and configurable variables in an `assets/module.yaml` inside the setup skill. This file drives both the prompts shown to the user and the values written to config.
46+
47+
```yaml
48+
code: mymod
49+
name: "My Module"
50+
description: "What this module does"
51+
module_version: 1.0.0
52+
default_selected: false
53+
module_greeting: >
54+
Welcome message shown after setup completes.
55+
56+
my_output_folder:
57+
prompt: "Where should output be saved?"
58+
default: "{project-root}/_bmad-output/my-module"
59+
result: "{project-root}/{value}"
60+
```
61+
62+
Variables with a `prompt` field are presented to the user during setup. The `default` value is used when the user accepts defaults. Adding `user_setting: true` to a variable routes it to `config.user.yaml` instead of the shared config.
63+
64+
:::caution[Literal Token]
65+
`{project-root}` is a literal token in config values. Never substitute it with an actual path. It signals to the consuming tool that the value is relative to the project root.
66+
:::
67+
68+
## Help Registration Without Configuration
69+
70+
You may not need any configurable values but still want to register your module with the help system. This is worth doing when:
71+
72+
- The skill description in SKILL.md frontmatter cannot fully convey what the module offers while staying concise
73+
- You want to express capability sequencing, phase constraints, or other metadata the CSV supports
74+
- An agent has many internal capabilities that users should be able to discover
75+
- Your module has more than about three distinct things it can do
76+
77+
For simpler cases, these alternatives are often sufficient:
78+
79+
| Alternative | What It Provides |
80+
| ----------- | ---------------- |
81+
| **SKILL.md overview section** | A concise summary at the top of the skill body — the `--help` system scans this section to present user-facing help, so keep it succinct |
82+
| **Script header comments** | Describe purpose, usage, and flags at the top of each script |
83+
84+
If these cover your discoverability needs, you can skip the setup skill entirely.
85+
86+
## The module-help.csv File
87+
88+
The CSV asset registers the module's capabilities with the help system. Each row describes one capability that users can discover and invoke.
89+
90+
```csv
91+
module,agent-name,skill-name,display-name,menu-code,capability,args,description,...
92+
mymod,,my-skill,My Skill,MS,build-process,,"Does something useful.",...
93+
```
94+
95+
When the setup skill runs, it merges these rows into the project-wide `_bmad/module-help.csv`, replacing any existing rows for this module. This is how users find your module's commands through the help system.
96+
97+
## Anti-Zombie Pattern
98+
99+
Both merge scripts use an anti-zombie pattern: before writing new values for a module, they remove all existing entries for that module's code. This prevents stale configuration or help entries from persisting across module updates. Running setup a second time is always safe.
100+
101+
## Design Guidance
102+
103+
Configuration is for **basic, project-level settings** — output folders, language preferences, feature toggles. Keep the number of configurable values small.
104+
105+
| Pattern | Configuration Role |
106+
| ------- | ------------------ |
107+
| **Agent pattern** | Prefer agent memory for per-user preferences. Use config only for values that must be shared across the project |
108+
| **Workflow pattern** | Use config for output locations and behavior switches that vary across projects |
109+
| **Skill-only pattern** | Use config sparingly. If the skill works with sensible defaults, skip config entirely |
110+
111+
Extensive workflow customization — step overrides, conditional branching, template selection — is a separate concern and will be covered in a dedicated document.
112+
113+
## Upcoming Tooling
114+
115+
A module scaffolding tool is planned that will generate the setup skill as part of module creation, along with the marketplace manifest format. Until then, use the BMad Builder module's setup skill as a reference implementation.
116+
117+
Once available, you will be able to generate a setup skill from your existing collection of agents, workflows, and skills with a prompt like:
118+
119+
:::note[Example]
120+
"Create a setup skill for my module in `./my-module-skills/` that mirrors `bmad-builder-setup` — with its own module name and code (my cool module, mcm), config variables for output folder locations, and help entries inferred from the existing skills in the folder."
121+
:::
122+
123+
A decent LLM will clone the entire `bmad-builder-setup` skill components amd structure — SKILL.md, scripts, tests — updating only the skill name, description, and the two asset files (`module.yaml` and `module-help.csv`) to reflect your module.
124+
Take the time to ensure the description that triggers it is correct, along with the module.yaml and module-help.csv

docs/explanation/what-are-bmad-agents.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Together these create something that feels less like running a command and more
1919

2020
## How Memory Works
2121

22-
When an agent launches for the first time in a project, it creates a sidecar memory directory at `_bmad/bmad-memory/<agent-name>/`. On every subsequent launch the agent loads this memory, which is how it remembers your preferences, prior decisions, and anything you told it to retain.
22+
When an agent launches for the first time in a project, it can create a sidecar memory directory at `_bmad/memory/<agent-name>/`. On every subsequent launch the agent loads this memory, which is how it remembers your preferences, prior decisions, and anything you told it to retain.
2323

2424
Agents can also include a **first-run onboarding** step — a set of questions the agent asks on initial launch so it can configure itself for your needs before you start working together.
2525

@@ -42,14 +42,6 @@ You choose the mix when you design the agent. Internal commands keep everything
4242

4343
Agents support a headless (autonomous) wake mode. When activated — for example through a cron job or an orchestrator like Open Claw — the agent skips waiting for user input and attempts to complete its tasks independently. This makes agents suitable for background automation while still being conversational when a human is present.
4444

45-
## Registering With BMad Help
46-
47-
Every agent carries a **manifest** that can declare where it fits in a larger workflow sequence. You specify what the agent should run *before*, what it should run *after*, whether it is required or optional, and what output artifact it produces. The BMad Help system reads these manifests so it can recommend the right agent at the right time.
48-
49-
:::note[Example]
50-
You build a compliance-review agent and mark it as required before `create-architecture`. When a user asks BMad Help to start architecture, it notices the compliance artifact is missing and says: "Talk to the Compliance Review agent first — I don't see its output yet."
51-
:::
52-
5345
## When to Build an Agent vs. a Workflow
5446

5547
| Choose an Agent When | Choose a Workflow When |

docs/explanation/what-are-skills.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ The BMad Builder produces skills that conform to the open standard and adds a fe
1212
| Component | Purpose |
1313
| --------- | ------- |
1414
| **SKILL.md** | The skill's instructions — persona, capabilities, and behavior rules |
15-
| **bmad-manifest.json** | Metadata for installation, discovery, sequencing, and BMad Help integration |
16-
| **prompts/** | Process prompts the skill loads at runtime |
1715
| **resources/** | Reference data, templates, and guidance documents |
1816
| **scripts/** | Deterministic validation and analysis scripts |
19-
| **agents/** | LLM subagent definitions for parallel processing |
2017
| **templates/** | Building blocks for generated output |
2118

22-
Not every skill needs all of these. A simple utility might be a single `SKILL.md` with a manifest. A complex workflow or agent may use the full structure.
19+
Not every skill needs all of these. A simple utility might be a single `SKILL.md`. A complex workflow or agent may use the full structure.
2320

2421
## Ready to Use on Build
2522

26-
Unlike earlier BMad versions that produced YAML and XML files requiring compilation, the builders now output a complete skill folder. Place it in your tool's skills directory — `.claude/skills`, `.codex/skills`, `.agent/skills`, or wherever your tool looks — and it is immediately usable.
27-
28-
## Manifests and Sequencing
29-
30-
Every skill's `bmad-manifest.json` can declare where it fits in a larger process. You specify what it runs **before**, what it runs **after**, whether it is **required** or **optional**, and what **output artifact** it produces. The BMad Help system reads these manifests to recommend the right skill at the right time and flag missing prerequisites.
23+
The builders output a complete skill folder. Place it in your tool's skills directory — `.claude/skills`, `.codex/skills`, `.agent/skills`, or wherever your tool looks — and it is immediately usable.
3124

3225
See [What Are Agents](/explanation/what-are-bmad-agents.md) and [What Are Workflows](/explanation/what-are-workflows.md) for how agents and workflows each use this foundation differently.

docs/explanation/what-are-workflows.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The BMad Builder classifies workflows into three tiers based on complexity.
2222

2323
| Type | Description | Example |
2424
| ---- | ----------- | ------- |
25-
| **Simple Utility** | A single-purpose tool that does one thing well | Validate a manifest, convert a file format |
25+
| **Simple Utility** | A single-purpose tool that does one thing well | Validate a schema, convert a file format |
2626
| **Simple Workflow** | A short guided process with a few sequential steps | Create a quick tech spec |
2727
| **Complex Workflow** | A multi-stage process with branching paths, progressive disclosure, and potentially multiple outputs | Create and manage PRDs — covering create, edit, validate, convert, and polish |
2828

@@ -51,14 +51,6 @@ Guided mode is no longer the slow multi-step process of earlier BMad versions. I
5151

5252
Like agents, workflows can support a **Headless Mode**. When invoked headless — through a scheduler, orchestrator, or another skill — the workflow skips interactive prompts and completes its process end-to-end without waiting for user input.
5353

54-
## Registering With BMad Help
55-
56-
Workflows carry a **manifest** with sequencing metadata, just like agents. You declare what the workflow runs before, what it runs after, whether it is required or optional, and what output artifact it produces.
57-
58-
:::note[Example]
59-
You build a `security-review` workflow and mark it as required after `create-prd` and before `create-architecture`. BMad Help will recommend it at the right point in the planning sequence and flag when its output artifact is missing.
60-
:::
61-
6254
## When to Build a Workflow vs. an Agent
6355

6456
| Choose a Workflow When | Choose an Agent When |

0 commit comments

Comments
 (0)