Skip to content

feat: standalone self-registering modules + v1.4.0#50

Merged
bmadcode merged 5 commits intomainfrom
self-registering-skills
Mar 30, 2026
Merged

feat: standalone self-registering modules + v1.4.0#50
bmadcode merged 5 commits intomainfrom
self-registering-skills

Conversation

@bmadcode
Copy link
Copy Markdown
Contributor

@bmadcode bmadcode commented Mar 30, 2026

Summary

  • Standalone self-registering modules: Single-skill modules no longer need a separate -setup skill. The Module Builder detects single vs multi-skill input and embeds registration directly into the skill via assets/module-setup.md
  • Removed bmad-builder-setup: Regenerated as bmad-bmb-setup by the Module Builder itself, proving the tooling works end-to-end
  • Comprehensive docs overhaul: Quick start guide, module configuration with full 13-column CSV guide, distribution/marketplace docs, standalone vs multi-skill patterns throughout
  • Version 1.4.0: Synced across package.json and marketplace.json, removed npm release scripts

New Files

  • standalone-module-template/ — template with module-setup.md and merge scripts
  • scaffold-standalone-module.py — scaffold script for standalone modules (9 tests)
  • validate-module.py updated — auto-detects standalone modules (5 new tests, 14 total)

Test Plan

  • scaffold-standalone-module tests: 9/9 pass
  • validate-module tests: 14/14 pass (9 existing + 5 standalone)
  • Existing scaffold-setup-skill tests: unaffected
  • Module Builder tested end-to-end — regenerated bmb's own setup skill
  • Manual: verify docs render correctly on site build

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Modules now support two registration approaches: standalone self-registration and multi-skill setup configuration.
    • Quick start guide with four-step process for building and installing modules.
    • Module Builder can now package single skills or multiple skills appropriately.
  • Documentation

    • Comprehensive guides on module registration, setup, and configuration workflows.
    • Updated tutorials explaining both standalone and multi-skill module approaches.
  • Refactor

    • Builder module renamed with updated identifier references.
  • Chores

    • Version updated to 1.4.0.

Remove bmad-builder-setup — modules with a single skill no longer need
a dedicated setup skill. The module builder now detects single-skill vs
multi-skill input and offers the appropriate approach:

- Single skill: embeds self-registration via assets/module-setup.md
- Multiple skills: generates a -setup skill (existing behavior)

New files:
- standalone-module-template/ with module-setup.md and merge scripts
- scaffold-standalone-module.py for standalone scaffolding
- test-scaffold-standalone-module.py (9 tests)

Updated:
- validate-module.py auto-detects standalone modules
- create-module.md with standalone flow (step 1.5 confirm, step 7/8 branches)
- validate-module.md and SKILL.md for standalone awareness
- marketplace.json: removed setup skill, bumped to 1.3.0
Adds standalone self-registering module infrastructure to the dream-weaver
sample — module.yaml, module-help.csv, module-setup.md, and merge scripts.
Fixes SKILL.md menu codes to match reference file frontmatter (DC→DL, PA→PD)
and adds missing dream-query capability. Restructures both sample skills to
use references/ subdirectories. Adds bmad-bmb-setup skill and updates
module-help.csv.
Agents with sidecar memory already detect first run (sidecar missing).
The module registration now hooks into that existing flow instead of
being a separate activation check, giving users a unified first-run
experience that handles both module setup and skill initialization.
Overhaul documentation to reflect the new standalone self-registering
module pattern alongside the existing multi-skill setup skill approach.

Quick Start (index.md):
- Replace placeholder with real 3-step guide: register, build, use
- Add bmad-bmb-setup registration instruction for first use
- Add guidance on using skills without module packaging — just copy
  the folder to your tool's skills directory for personal use
- Note that single-skill modules self-register on first run

Module Configuration (module-configuration.md):
- Reframe from setup-skill-only to two registration paths
- Add "Why Register with the Help System?" explaining bmad-help
  integration: dependency graphs, completion detection, routing
- Add full 13-column CSV guide with column-by-column purpose table
- Add "How bmad-help Uses These Entries" with real example row
- Document both multi-skill and standalone Create Module workflows
- Incorporate user edits on standalone pattern flexibility and
  richer help entry benefits

What Are Modules (what-are-modules.md):
- Add "Distribution: Plugins and Marketplaces" section explaining
  .claude-plugin/ convention, single plugin vs marketplace structure,
  cross-platform reach (43+ skills platforms, Vercel NPX, Anthropic),
  and remote URL skill composition
- Update component table to compare multi-skill vs standalone
- Note that registration enables bmad-help discovery
- Update Module Builder description for both packaging approaches

Tutorial (build-your-first-module.md):
- Update prerequisites to reference bmad-bmb-setup
- Replace single-pattern Understanding Modules with comparison table
- Split Step 3 into multi-skill and standalone subsections with
  separate folder structures and marketplace.json mention
- Update FAQ on single-skill modules to describe auto-detection
- Update Key Takeaways for both patterns

Builder Commands Reference (builder-commands.md):
- Update Create Module (CM): auto-detection, both output paths
- Update Validate Module (VM): handles both module types
- Update capabilities overview table

Marketplace (marketplace.json):
- Bump version to 1.4.0
- Add bmad-bmb-setup to skills list (4 skills total)
Sync package.json version with marketplace.json (1.4.0) for the
installer's version detection. Remove release:* scripts and
publishConfig — npm releases are no longer used.
@bmadcode bmadcode merged commit fbcc328 into main Mar 30, 2026
4 of 6 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2e75f9b-ab9a-4c2e-b2f9-9d0fbd1fe3e4

📥 Commits

Reviewing files that changed from the base of the PR and between 315f307 and cc78e4c.

⛔ Files ignored due to path filters (4)
  • samples/bmad-agent-dream-weaver/assets/module-help.csv is excluded by !**/*.csv
  • skills/bmad-bmb-setup/assets/module-help.csv is excluded by !**/*.csv
  • skills/bmad-builder-setup/assets/module-help.csv is excluded by !**/*.csv
  • skills/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (43)
  • .claude-plugin/marketplace.json
  • docs/explanation/module-configuration.md
  • docs/explanation/what-are-modules.md
  • docs/index.md
  • docs/reference/builder-commands.md
  • docs/tutorials/build-your-first-module.md
  • package.json
  • samples/bmad-agent-dream-weaver/SKILL.md
  • samples/bmad-agent-dream-weaver/assets/module-setup.md
  • samples/bmad-agent-dream-weaver/assets/module.yaml
  • samples/bmad-agent-dream-weaver/references/dream-interpret.md
  • samples/bmad-agent-dream-weaver/references/dream-log.md
  • samples/bmad-agent-dream-weaver/references/dream-query.md
  • samples/bmad-agent-dream-weaver/references/dream-seed.md
  • samples/bmad-agent-dream-weaver/references/headless-wake.md
  • samples/bmad-agent-dream-weaver/references/init.md
  • samples/bmad-agent-dream-weaver/references/lucid-coach.md
  • samples/bmad-agent-dream-weaver/references/pattern-discovery.md
  • samples/bmad-agent-dream-weaver/references/recall-training.md
  • samples/bmad-agent-dream-weaver/references/save-memory.md
  • samples/bmad-agent-dream-weaver/scripts/merge-config.py
  • samples/bmad-agent-dream-weaver/scripts/merge-help-csv.py
  • samples/bmad-excalidraw/SKILL.md
  • samples/bmad-excalidraw/references/diagram-generation.md
  • samples/bmad-excalidraw/references/guided-design.md
  • skills/bmad-bmb-setup/SKILL.md
  • skills/bmad-bmb-setup/assets/module.yaml
  • skills/bmad-bmb-setup/scripts/cleanup-legacy.py
  • skills/bmad-bmb-setup/scripts/merge-config.py
  • skills/bmad-bmb-setup/scripts/merge-help-csv.py
  • skills/bmad-builder-setup/scripts/tests/test-cleanup-legacy.py
  • skills/bmad-builder-setup/scripts/tests/test-merge-config.py
  • skills/bmad-builder-setup/scripts/tests/test-merge-help-csv.py
  • skills/bmad-module-builder/SKILL.md
  • skills/bmad-module-builder/assets/standalone-module-template/merge-config.py
  • skills/bmad-module-builder/assets/standalone-module-template/merge-help-csv.py
  • skills/bmad-module-builder/assets/standalone-module-template/module-setup.md
  • skills/bmad-module-builder/references/create-module.md
  • skills/bmad-module-builder/references/validate-module.md
  • skills/bmad-module-builder/scripts/scaffold-standalone-module.py
  • skills/bmad-module-builder/scripts/tests/test-scaffold-standalone-module.py
  • skills/bmad-module-builder/scripts/tests/test-validate-module.py
  • skills/bmad-module-builder/scripts/validate-module.py

Walkthrough

The pull request restructures the BMad module architecture to support two registration models: multi-skill modules with dedicated setup skills and single-skill standalone modules with self-registration. The bmad-builder-setup skill is renamed to bmad-bmb-setup (version 1.4.0), and new merge configuration/help-system scripts enable modular registration. Documentation is comprehensively updated to explain the dual approaches, and the Dream Weaver sample module demonstrates the standalone pattern.

Changes

Cohort / File(s) Summary
Plugin Metadata & Package Configuration
.claude-plugin/marketplace.json, package.json
Plugin version bumped 1.2.0 → 1.4.0; skill reference renamed bmad-builder-setupbmad-bmb-setup. Release npm scripts and publishConfig removed from package.json.
Core Registration Scripts (Multi-Skill)
skills/bmad-bmb-setup/scripts/merge-config.py, skills/bmad-bmb-setup/scripts/merge-help-csv.py
New 408-line and 218-line Python CLI scripts that merge module configuration/help into shared YAML and CSV files, with legacy migration, anti-zombie module cleanup, and per-variable result templating.
Standalone Module Template Scripts
skills/bmad-module-builder/assets/standalone-module-template/merge-config.py, merge-help-csv.py, module-setup.md
Template copies of merge scripts (identical logic to multi-skill versions) and 81-line markdown defining standalone module self-registration flow triggered by setup/configure commands, with config/help/CSV write paths and post-install confirmations.
Module Builder & Scaffolding
skills/bmad-module-builder/scripts/scaffold-standalone-module.py, validate-module.py
New scaffold script (190 lines) generates standalone module infrastructure; validate-module.py extended with detect_standalone_module() and branching validation logic for multi-skill vs standalone structure checks (setup-skill vs module-setup.md/merge scripts).
Module Builder Tests
skills/bmad-module-builder/scripts/tests/test-scaffold-standalone-module.py, test-validate-module.py
Added 266-line test harness validating scaffold success, file placement, marketplace metadata, and error handling; expanded validate-module tests with 112 lines covering standalone-module detection, missing setup files, and CSV validation.
Module Builder Documentation
skills/bmad-module-builder/SKILL.md, references/create-module.md, references/validate-module.md
Updated Create/Validate capabilities to accept skills folder or single SKILL.md and auto-detect multi-skill vs standalone approaches; expanded module registration guidance with configuration question types, dependency checks, and approach-specific scaffolding workflows.
BMB Setup Skill
skills/bmad-bmb-setup/SKILL.md
Renamed identifier to bmad-bmb-setup; updated control flow to check per-module config under _bmad/bmb/config.yaml and pass fixed --module-code bmb to merge/cleanup scripts.
Concept Documentation
docs/explanation/what-are-modules.md, docs/explanation/module-configuration.md
Reframed modules as plugins with dual registration paths: multi-skill (dedicated setup skill) vs standalone (self-registration); added distribution/marketplace context and clarified where module.yaml/module-help.csv reside per module type.
Quick Start & Reference Docs
docs/index.md, docs/reference/builder-commands.md, docs/tutorials/build-your-first-module.md
Expanded quick-start with four explicit steps including bmad-bmb-setup registration; updated builder-commands to describe dual module types and their scaffolding outputs; revised tutorial to contrast multi-skill setup-skill vs standalone self-registration flows and outcomes.
Sample Dream Weaver Module
samples/bmad-agent-dream-weaver/SKILL.md, assets/module.yaml, assets/module-setup.md
Demonstrates standalone registration pattern with 8-line module.yaml metadata, 78-line module-setup.md workflow, and renamed/updated capabilities and relative path references (./references/... and ../scripts/...).
Dream Weaver Reference Updates
samples/bmad-agent-dream-weaver/references/*
Adjusted documented script paths from scripts/... to ../scripts/... in 6 markdown files (dream-seed.md, headless-wake.md, pattern-discovery.md, recall-training.md, save-memory.md).
Excalidraw Sample Updates
samples/bmad-excalidraw/SKILL.md, references/diagram-generation.md, references/guided-design.md
Updated documentation path references to use ./references/... for internal links and ../scripts/... for script invocations (generate_excalidraw.py, validate_excalidraw.py).
Test Cleanup
skills/bmad-builder-setup/scripts/tests/test-cleanup-legacy.py, test-merge-config.py, test-merge-help-csv.py
Removed three legacy test files (429, 644, 237 lines) that validated old merge and cleanup tooling; migration to new test suite in bmad-module-builder.

Sequence Diagram

sequenceDiagram
    participant User
    participant Skill as Skill (Single/Multi)
    participant Setup as Setup Registration
    participant ConfigMerge as merge-config.py
    participant HelpMerge as merge-help-csv.py
    participant BmadHelp as bmad-help System
    participant Config as _bmad/config.yaml

    User->>Skill: Trigger setup/configure/install
    Skill->>Setup: Load module-setup.md
    Setup->>User: Prompt for configuration (if needed)
    User-->>Setup: Provide answers
    Setup->>ConfigMerge: Pass module.yaml + answers
    ConfigMerge->>Config: Merge/update config (anti-zombie)
    ConfigMerge->>ConfigMerge: Apply result templates
    Setup->>HelpMerge: Pass module-help.csv
    HelpMerge->>BmadHelp: Update capability registry
    HelpMerge->>BmadHelp: Remove stale entries (anti-zombie)
    Setup->>User: Display post-install summary
    Setup->>Skill: Resume main activation flow
    User->>BmadHelp: Request help
    BmadHelp-->>User: Show registered capabilities
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

  • PR #48: Introduces the standalone module scaffolding infrastructure and template scripts (merge-config.py, merge-help-csv.py, module-setup.md) that are extended and relocated in this PR.
  • PR #32: Updates builder skill configuration loading to use _bmad/bmb/config.yaml, directly related to the bmad-bmb-setup renaming and per-module config paths in this PR.
  • PR #42: Modifies .claude-plugin/marketplace.json plugin metadata for the bmad-builder entry, overlapping with the version and skill-reference updates here.

Poem

🐰 A Rabbit's Module Song

Setup skills dance with standalone kin,
Both paths register, let modules begin!
Merge configs merge, and help systems grow—
Two registration roads now steal the show! 🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch self-registering-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 30, 2026

🤖 Augment PR Summary

Summary: This PR introduces standalone self-registering modules and bumps BMad Builder to v1.4.0.

Changes:

  • Bumped version to 1.4.0 in package.json and .claude-plugin/marketplace.json and updated the published setup skill path.
  • Renamed the Builder setup skill from bmad-builder-setup to bmad-bmb-setup and regenerated its merge scripts.
  • Added a standalone module template (module-setup.md, merge-config.py, merge-help-csv.py) to embed registration directly into a single skill.
  • Introduced scaffold-standalone-module.py to copy standalone infra into a skill and generate a distribution .claude-plugin/marketplace.json (with new tests).
  • Enhanced validate-module.py to detect and validate standalone modules (module-setup + merge scripts) alongside setup-skill modules (with new tests).
  • Updated sample skills (Dream Weaver, Excalidraw) to use ./references paths and added standalone registration assets to Dream Weaver.
  • Overhauled module documentation to explain setup-skill vs self-registration flows and the expanded CM/VM behavior.

Technical Notes: Standalone packaging relies on a first-run/arg-triggered assets/module-setup.md flow that merges into shared _bmad/config*.yaml and _bmad/module-help.csv using the anti-zombie pattern.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

module_answers = apply_result_templates(
module_yaml, answers.get("module", {}), verbose
)
module_section.update(module_answers)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/bmad-bmb-setup/scripts/merge-config.py:285 — module_section.update(module_answers) will also write variables marked user_setting: true into shared _bmad/config.yaml, even though the setup docs say those values should live exclusively in config.user.yaml.
This can unintentionally leak user-specific preferences into the project-shared config.

Severity: medium

Other Locations
  • skills/bmad-module-builder/assets/standalone-module-template/merge-config.py:285
  • samples/bmad-agent-dream-weaver/scripts/merge-config.py:285

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

for var_name, var_def in module_yaml.items():
if isinstance(var_def, dict) and var_def.get("user_setting") is True:
if var_name in module_answers:
user_settings[var_name] = module_answers[var_name]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/bmad-bmb-setup/scripts/merge-config.py:319 — extract_user_settings() copies user_setting values from raw answers without applying the variable’s result template, which can make config.user.yaml disagree with the templated values written into config.yaml.
If any user-setting variable uses result for normalization (paths, tokens), this would store inconsistent values.

Severity: medium

Other Locations
  • skills/bmad-module-builder/assets/standalone-module-template/merge-config.py:319
  • samples/bmad-agent-dream-weaver/scripts/merge-config.py:319

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

)
return 2

if not (skill_dir / "assets" / "module.yaml").is_file():
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/bmad-module-builder/scripts/scaffold-standalone-module.py:81 — the script validates assets/module.yaml exists but doesn’t check for assets/module-help.csv, even though assets/module-setup.md/merge-help-csv.py assume it’s present.
This can produce a “successful” scaffold that later fails during registration.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@@ -1,644 +0,0 @@
#!/usr/bin/env python3
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/bmad-builder-setup/scripts/tests/test-merge-config.py:1 — the merge/cleanup unit tests were removed, but equivalent coverage doesn’t appear to exist for the new skills/bmad-bmb-setup/scripts/* copies.
Given these scripts mutate (and delete) legacy config, losing test coverage increases regression risk.

Severity: low

Other Locations
  • skills/bmad-builder-setup/scripts/tests/test-cleanup-legacy.py:1
  • skills/bmad-builder-setup/scripts/tests/test-merge-help-csv.py:1

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

- **Validate Module (VM)** — Checks that a module's structure is complete and correct — every skill has its capabilities registered, entries are accurate and well-crafted, and structural integrity is sound. Handles both multi-skill and standalone modules. Supports `--headless` / `-H`.

**Args:** Accepts `--headless` / `-H` for CM and VM paths, an initial description for IM, or a path to a skills folder for CM/VM.
**Args:** Accepts `--headless` / `-H` for CM and VM paths, an initial description for IM, or a path to a skills folder or single SKILL.md file for CM/VM.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/bmad-module-builder/SKILL.md:16 — after renaming the setup skill to bmad-bmb-setup, this skill still tells users to run bmad-builder-setup when config is missing (see skills/bmad-module-builder/SKILL.md:20).
That reference will point to a non-existent skill in v1.4.0 installs.

Severity: medium

Other Locations
  • skills/bmad-agent-builder/SKILL.md:22
  • skills/bmad-workflow-builder/SKILL.md:22

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant