Skip to content

chore: re-source plugin from npx bmad-method install (v6.5.0.1)#2

Merged
tgorka merged 5 commits into
mainfrom
chore/sync-via-installer
Apr 28, 2026
Merged

chore: re-source plugin from npx bmad-method install (v6.5.0.1)#2
tgorka merged 5 commits into
mainfrom
chore/sync-via-installer

Conversation

@tgorka
Copy link
Copy Markdown
Owner

@tgorka tgorka commented Apr 28, 2026

Summary

Architectural refactor — no upstream version change. The plugin is
now a thin wrapper around the official
npx bmad-method install --tools claude-code output, replacing the
multi-source git-clone-based sync pipeline that drifted in several
specific ways from the canonical upstream install (audited in detail
in docs/plan-npx-resync.md).

Drift fixed

Symptom Before After
customize.toml files 79 90
Total skills 93 102
Research skills layout nested skills/research/<name>/ flat skills/<name>/
TEA + GDS agent skills flat .md in agents/ full skill dirs in skills/
gds-document-project missing present
skills/workflows/*.md stray files shipped gone
Zombie agents (Bob/Quinn-as-QA/Barry/BMad Master) shipped gone

What's deleted

  • 16 scripts (sync-upstream-content.ts, sync-all.ts,
    generate-{agents,skills,agent-manifest}.ts,
    clean-orphaned-skills.ts, find-orphan-files.ts,
    bump-{core,module}.ts, lib/path-rewriter.ts,
    lib/workflow-iterator.ts, 7 lib/checks/*.ts files) — −3455 net
    lines.
  • plugins/bmad/agents/ (22 files) — agents are skills now.
  • plugins/bmad/_shared/ and plugins/bmad/templates/ — replaced by
    per-skill resources/templates.

What's new

  • scripts/sync-from-installer.ts — single new script, ~220 lines.
    Runs the installer, wipes the plugin tree, copies .claude/skills/*
    into plugins/bmad/skills/, bumps all version anchors.
  • docs/plan-npx-resync.md — migration plan (kept for historical
    reference).
  • bun run sync is now the single sync command. No separate generate
    steps. No multi-source sync. No bumps to chase.

Verification

  • bun run typecheck passes
  • bun run lint passes
  • bun run validate passes (now: version consistency + skills/
    sanity check)
  • bun test — 6 pass, 0 fail, all tests refreshed for
    v6.5.0+ skill names
  • Sandbox install via claude plugin marketplace add produces
    a byte-identical 1392-file tree (verified by sha256sum diff)
  • Smoke test: /bmad:bmad-help, /bmad:bmad-customize,
    /bmad:bmad-create-prd, /bmad:bmad-tea,
    /bmad:gds-create-gdd all load correctly

Commit structure

5 atomic commits, each its own concern:

  1. feat(scripts): add installer-based sync (replaces multi-source sync)
  2. chore: regenerate plugin tree from npx bmad-method@6.5.0 install
  3. refactor(scripts): retire multi-source sync (-3455 lines)
  4. docs: refresh README/AGENTS/sync docs for installer-based pipeline
  5. docs: changelog for v6.5.0.1 (installer-based sync refactor)

Migration notes for downstream consumers

Anyone with the plugin already installed should refresh:

claude plugin uninstall bmad@bmad-method
claude plugin install bmad@bmad-method

Agent-picker affordance change: agents are skills now, invoke as
/bmad:bmad-agent-pm, /bmad:bmad-tea, etc. instead of "Use the pm
agent…".

🤖 Generated with Claude Code


Summary by cubic

Refactors the plugin to source content directly from the official npx bmad-method install --tools claude-code output, replacing the multi-source sync. Ships 102 skills (agents-as-skills), simplifies sync to one script, and bumps the plugin to v6.5.0.1 with no upstream BMAD version change.

  • Refactors

    • Make the installer the single source of truth; the plugin is now a thin wrapper.
    • Add scripts/sync-from-installer.ts; wire bun run sync to it; remove 16 obsolete scripts (~−3455 LOC).
    • Regenerate plugins/bmad/skills/ from installer; remove plugins/bmad/agents/, _shared/, and templates/.
    • Fix prior drift: skills 93 → 102, customize.toml 79 → 90, flat skill layout, add gds-document-project, remove stray/zombie files.
    • Update config loaders to {project-root}/_bmad/*/config.yaml (replaces .claude/bmad.local.md across skills).
    • Add TEA knowledge resources and new manifests; refresh docs; bump versions to 6.5.0.1; ignore .upstream-install/.
  • Migration

    • Reinstall to refresh content: claude plugin uninstall bmad@bmad-method && claude plugin install bmad@bmad-method.
    • Agents are skills now; invoke via /bmad:bmad-agent-pm, /bmad:bmad-tea, etc.
    • If you customized .claude/bmad.local.md, move settings to {project-root}/_bmad/{module}/config.yaml.

Written for commit daabf83. Summary will update on new commits. Review in cubic

tgorka and others added 5 commits April 27, 2026 18:09
Introduces scripts/sync-from-installer.ts which delegates 100% of the
content-shaping work to the official `npx bmad-method install --tools
claude-code` CLI. The installer already produces a Claude Code-native
tree (correct flat layout, customize.toml per skill, agents-as-skills),
so the plugin becomes a thin wrapper:

  1. Run `npx bmad-method@<version> install --yes --directory
     .upstream-install --modules bmm,bmb,cis,gds,tea --tools claude-code`
  2. Wipe plugins/bmad/{skills,_shared,agents,templates}
  3. Copy .upstream-install/.claude/skills/* 1:1 to plugins/bmad/skills/
  4. Bump version anchors (.plugin-version, package.json, plugin.json,
     marketplace.json, .upstream-versions/*.json) via bump-utils.ts

Also:

- package.json: rewire `bun run sync` to the new script. Drop generate:*,
  sync:source, sync-all, clean:orphaned, find-orphans (these become
  redundant once the installer does the merging — they will be deleted in
  Phase 3 of the migration plan).
- .gitignore: add .upstream-install/.
- docs/plan-npx-resync.md: track the multi-phase migration plan that this
  commit kicks off.

This commit only adds the new script; the actual wipe-and-regenerate of
plugins/bmad/ happens in the next commit (Phase 2).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wipes plugins/bmad/skills/, plugins/bmad/_shared/, plugins/bmad/agents/,
and plugins/bmad/templates/, then runs the new installer-based sync to
rebuild plugins/bmad/skills/ from the official `npx bmad-method@6.5.0
install --tools claude-code` output. This is the first sync since the
migration to the installer-based pipeline.

Net result:

- 102 skill directories (was 93) — picks up the 9 missing/misplaced
  skills (gds-document-project, bmad-tea, 5 GDS agent skills, plus the
  3 research skills that were nested under skills/research/ instead of
  flat).
- 1392 files (was 1296). The increase is mostly customize.toml files
  the old sync was missing for agent skills, plus correctly-placed
  resources/.
- 90 customize.toml files (was 79) — full upstream coverage.
- No plugins/bmad/agents/ directory (Q1 = A: drop entirely). All 22
  agent .md files are gone; agent personas now live as skills under
  plugins/bmad/skills/bmad-agent-* / bmad-tea / gds-agent-*. Invoke
  via `/bmad:bmad-agent-pm` instead of `Use the pm agent…`.
- No plugins/bmad/_shared/ (was 1 file: agent-manifest.csv, made
  redundant by the installer's per-skill resources/).
- No plugins/bmad/templates/ (made redundant — templates ship inside
  individual skill dirs now).
- Zero zombie agents (Bob, Quinn-as-QA, Barry, BMad Master) — they
  were already gone upstream since v6.3.0; deleting agents/ removes
  the last trace.
- Byte-identical between source (plugins/bmad/) and installed cache
  (~/.claude/plugins/cache/bmad-method/bmad/6.5.0.0/) — 1392 files,
  zero hash diffs.

The next commit (Phase 3) deletes the now-redundant scripts that the
old multi-source sync needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The installer-based sync introduced in 'feat(scripts): add installer-
based sync' makes the entire multi-source sync pipeline redundant. The
installer (npx bmad-method install --tools claude-code) does all the
merging, path-rewriting, and per-skill structuring that this code used
to do — and does it correctly because it's the upstream's own canonical
output.

Deleted scripts (16 files, ~3455 lines net):

  scripts/sync-upstream-content.ts          # replaced by sync-from-installer
  scripts/sync-all.ts                        # was sync + generate:* chain
  scripts/generate-agents.ts                 # installer ships agents-as-skills
  scripts/generate-skills.ts                 # installer ships SKILL.md
  scripts/generate-agent-manifest.ts         # installer ships help-catalog
  scripts/clean-orphaned-skills.ts           # not needed (wipe-and-replace)
  scripts/find-orphan-files.ts               # not needed
  scripts/bump-core.ts                       # bumping is in sync now
  scripts/bump-module.ts                     # ditto
  scripts/lib/path-rewriter.ts               # installer outputs final paths
  scripts/lib/workflow-iterator.ts           # no per-source iteration
  scripts/lib/checks/agents.ts               # nothing to cross-check
  scripts/lib/checks/agent-skills.ts         # ditto
  scripts/lib/checks/content.ts              # ditto
  scripts/lib/checks/naming.ts               # ditto
  scripts/lib/checks/paths.ts                # ditto
  scripts/lib/checks/sync.ts                 # ditto
  scripts/lib/checks/workflows.ts            # ditto

Shrunken (kept, simplified):

  scripts/lib/upstream-sources.ts            # 277 → 95 lines: keep only
                                              # the module list + version
                                              # helpers; drop all the
                                              # sync-config fields
  scripts/lib/checks/index.ts                # only checkVersion survives
  scripts/lib/checks/version.ts              # no longer needs upstream
                                              # git clones — checks the
                                              # version files directly
  scripts/validate-upstream-coverage.ts      # was three-way coverage
                                              # check; now: version
                                              # consistency + sanity
                                              # check that
                                              # plugins/bmad/skills/ has
                                              # contents
  scripts/update-readme-version.ts           # drop "Released" column
                                              # (would have needed git
                                              # clones); keep Version +
                                              # Last-Checked

package.json:
- Drop bump-core, bump-module from scripts (no callers)
- Keep sync, sync:dry, validate, update-readme, typecheck, lint, test

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- README.md
  • Replace "Deprecation Notice" + "Features" sections with a "How
    it's built" preamble (thin wrapper around npx bmad-method) plus a
    feature list framed around the 102-skill output.
  • Replace the multi-section Agents listing with a single Agent
    Personas table — agents are skills now, no separate directory.
  • Update Workflow Phase examples to reference the actual flat skill
    names (bmad-market-research etc.).
  • Update the comparison table: 102 skills (41 BMM + 11 TEA + 4 BMB +
    10 CIS + 36 GDS), 21 agent personas (shipped as skills), source-of-
    truth = official npx installer, validation strategy simplified.
  • Drop "Released" column from upstream version table (would require
    git clones).

- AGENTS.md
  • Available Scripts: drop generate:*, sync:source, sync-all,
    bump-core, bump-module (deleted in Phase 3).
  • Upstream Sync section: rewrite for the npx-installer flow.
  • Replace 26-row "Current Agents" table (which mixed BMM zombie
    personas + CIS skills) with a smaller reference table pointing
    readers at the canonical SKILL.md frontmatter for the full list.
  • Automation First: restate around `bun run sync` as the single
    sync command.

- docs/upstream-sync-design.md, docs/script-pipeline.md
  Mark both as historical (pre-v6.5.0+) since the pipeline they
  describe no longer exists. Body of each doc kept as archaeological
  reference.

- tests/e2e/skill-load.test.ts
  • Update skill names to current v6.5.0 prefixed form (bmad-help,
    bmad-brainstorming, bmad-customize, bmad-create-prd, …).
  • Replace removed init/status tests with bmad-customize coverage.
  • Replace "Use the quinn agent" delegation with /bmad:bmad-tea and
    /bmad:bmad-agent-pm slash invocations (agents-as-skills).
  • Refresh smoke pool to use real v6.5.0 skill slugs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Detailed CHANGELOG entry covering:

- The architectural shift to npx bmad-method install as the source of
  truth (vs the previous multi-source git-clone pipeline).
- The 102-skill output (was 93), with the 9 net-new entries called out
  by category (research skills flattened, 6 agent-skills relocated,
  gds-document-project added).
- Removal of plugins/bmad/{agents,_shared,templates}/ — agents are
  skills now, _shared content moved into per-skill resources/.
- Removal of 16 scripts (~3455 lines net) and the package.json
  entries that backed them.
- Migration steps for existing users.

Bump versions: 6.5.0.0 → 6.5.0.1 across .plugin-version,
package.json, plugins/bmad/.claude-plugin/plugin.json,
.claude-plugin/marketplace.json. README badge regenerated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tgorka tgorka merged commit ea7c264 into main Apr 28, 2026
1 check passed
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