Commit Graph

5 Commits

Author SHA1 Message Date
pbean bca9388750 docs(bmad-module): drop stale temp-repo references and install paths
This work was developed in a separate bmad-marketplace repo and is now
landing directly in BMAD-METHOD, so the migration framing is obsolete:

- remove links to docs/spec.md (only existed in the temp repo) and the
  bmad-marketplace / 'upstream patch' / 'sibling checkout' references in
  README, the integration test, and the acme-md-lint fixture
- drop dead 'spec §N' pointers in install.mjs, install-plan.mjs, and
  plugin-json.mjs (including a user-facing reserved-code error message)
- reword the manifest-generator 'patch' note as in-repo behavior
- correct the documented install path from _bmad/ to the IDE skills
  directories the installer now distributes skills to (.claude/skills/, etc.)

No behavior change. Integration suite: 73 pass / 0 fail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 18:00:32 -07:00
pbean 546826b451 feat(bmad-module): complete custom-module install to match the installer CLI
The bmad-module skill copied a module's files and distributed skills to IDEs,
but skipped four post-copy steps the full `bmad install --custom-source` path
performs, leaving modules incompletely installed:

- Merge each module's module-help.csv into _bmad/_config/bmad-help.csv (the
  catalog bmad-help reads) — new lib/help-catalog.mjs
- Generate [modules.<code>] / [agents.<code>] blocks in config.toml /
  config.user.toml from module.yaml (defaults + --set overrides), via a
  targeted merge that preserves [core] and sibling modules — new lib/config-gen.mjs
- Create the working directories a module declares under `directories:`
  (with move-on-path-change and wds_folders) — new lib/module-dirs.mjs
- Run `npm install --omit=dev` in place when a module ships package.json
  (opt out via bmad.install.skipNpm) — new lib/npm-deps.mjs

All four run as a shared finishModuleInstall step wired into install, update,
and remove; every step is non-fatal so a module already committed to _bmad/
isn't lost to a post-copy hiccup. Adds a repeatable --set <code>.<key>=<value>
flag mirroring the installer.

Also fixes two latent issues in the manifest-driven copy that the new steps
depend on:
- moduleDefinition / moduleHelpCsv are now flattened to the module root even
  when they live inside a declared skill dir (the setup-skill assets pattern);
  previously claimedSrc dedup skipped them and the rewritten plugin.json
  pointed at a non-existent ./module.yaml.
- package.json / package-lock.json are now copied so npm deps can install.

Tests: extends the integration suite with config/agent-roster, --set,
directory-creation, help-catalog, removal-cleanup, and npm assertions
(73/73 pass); adds a minimal-npm fixture and rewrites the comprehensive
fixture's module-help.csv to the canonical schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 09:52:52 -07:00
pbean dfae0291ca fix(bmad-module): copy file-typed agents/commands entries on install
The copy planner treated every skills/agents/commands entry as a
directory and ran it through addDirRecursive, which lists files *under*
the path. For a subagent declared as a file (e.g.
`"agents": ["./agents/foo.md"]` — a standard Claude-Code shape) that
listed nothing, so the agent was silently dropped from the install even
though rewriteManifestPaths already remapped it to `./agents/foo.md`.

Stat each entry and branch: directories recurse as before, files are
queued directly (honoring the ignore matcher). Verified by the
comprehensive fixture's changelog-archivist.md agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:29:40 -07:00
pbean 6d49cc505b feat(bmad-module): manifest-driven copy plan with canonical path rewriting
Replace the flat copy-list staging with a manifest-driven copy plan:

- buildCopyPlan maps declared skills/agents/commands and string-typed
  Claude-Code surfaces into canonical install slots, copies conventional
  top-level metadata, and drops anything not covered (no more leaking of
  tools/, website/, .github/, etc.).
- rewriteManifestPaths emits a plugin.json whose paths point at the
  canonical post-install locations, keeping the on-disk manifest
  self-consistent inside _bmad/<code>/.
- stageCopyPlan stages the plan plus synthesized files (rewritten
  plugin.json) into the tmp dir for the atomic swap.

install.mjs and update.mjs switch to the new plan/skillDestDirs flow and
drop the now-unused copy-list helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:20:35 -07:00
pbean e96f16bf31 feat/bmad-module: community module manager skill created 2026-05-22 13:19:05 -07:00