bmad-revendor
Maintainer-only. Use when re-vendoring vendor-skills/BMAD/ against a newer BMAD-METHOD commit — "update BMAD", "re-vendor BMAD", "bump the BMAD pin". Not part of the Hedgehog discipline a consuming project copies; this only applies to the Hedgehog repo itself.
skyf0xx · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add skyf0xx/hedgehog --skill bmad-revendor技能说明
name: bmad-revendor description: Maintainer-only. Use when re-vendoring vendor-skills/BMAD/ against a newer BMAD-METHOD commit — "update BMAD", "re-vendor BMAD", "bump the BMAD pin". Not part of the Hedgehog discipline a consuming project copies; this only applies to the Hedgehog repo itself.
Re-vendoring BMAD-METHOD
vendor-skills/BMAD/ is a pinned, manually-updated vendor copy of eight skills
from bmad-code-org/BMAD-METHOD's bmm module (see
vendor-skills/BMAD/ATTRIBUTION.md for the current pin). It is never
auto-updated — re-vendoring is a deliberate act, run only when this
skill is invoked by name or the user explicitly asks to update BMAD.
What's vendored, and why these specific paths
Eight skill directories plus two shared scripts they all depend on:
src/core-skills/bmad-forge-idea— pressure-tests an idea before any artifact gets written; runs first in the shelf, ahead ofbmad-brainstorming. Carries its own script,resolve_personas.py(not shared with the other skills — vendored inside this skill's ownscripts/, not in the sharedvendor-skills/BMAD/scripts/).src/core-skills/bmad-brainstormingsrc/core-skills/bmad-advanced-elicitationsrc/core-skills/bmad-deep-reconsrc/bmm-skills/plan/bmad-product-briefsrc/bmm-skills/plan/bmad-prfaqsrc/bmm-skills/plan/bmad-prdsrc/bmm-skills/plan/bmad-uxsrc/scripts/memlog.py,src/scripts/resolve_customization.py— shared utilities every one of the eight skills calls. Not inside any single skill directory upstream; vendored separately intovendor-skills/BMAD/scripts/.
Upstream keeps the four bmm-skills above under a single flat
bmm-skills/plan/ directory as of the v6.11.0 vendor pass — it used to
be split across numbered 1-analysis/ and 2-plan-workflows/
directories. If upstream has moved them again since, update these paths
to match rather than leaving a stale layout here.
bmad-deep-recon was, before the v6.11.0 pass, the one skill in this
set that existed only on BMAD-METHOD's main branch — not in any tagged
release; it is now in v6.11.0. If a newer addition to this set is
ever unreleased, pin to main at a specific commit SHA rather than a
release tag (see "Pinning," below) instead of silently dropping it; ask
the user how to resolve the conflict if it's not obvious (this came up
during the original vendor pass — see git history on
vendor-skills/BMAD/).
Not vendored, deliberately: bmad-party-mode (BMAD-METHOD's multi-agent
roster skill) and the bmm-skills/agents/bmad-agent-* persona skills it
needs for a real roster. bmad-forge-idea can optionally draw on
party-mode's roster but degrades gracefully without it — its
resolve_personas.py returns an empty roster and the skill falls back to
generating personas on the fly, which is its documented normal path.
Vendoring party-mode for real would mean also vendoring the five
bmad-agent-* skills, a parallel persona system to Hedgehog's own
src/agents/ that's out of scope for the planning shelf. Don't add it
without raising this tradeoff to the user again.
Procedure
-
Find the ref to vendor against. Check
gh repo view bmad-code-org/BMAD-METHOD --json defaultBranchRefandgh api repos/bmad-code-org/BMAD-METHOD/tagsfor available release tags. If every one of the eight skills above exists in the newest tag, pin to that tag. If any of them is unreleased, pin tomainat its current commit SHA instead — get it viagh api repos/bmad-code-org/BMAD-METHOD/commits/main --jq '.sha'. Don't silently drop a skill just because it's unreleased; ask the user how to resolve the conflict if it's not obvious (this came up during the original vendor pass — see git history onvendor-skills/BMAD/). -
List the file tree at that ref, scoped to the eight skill directories plus
src/scripts/(adjust the path segments below if upstream has moved any of them again since the last pass):gh api "repos/bmad-code-org/BMAD-METHOD/git/trees/<ref>?recursive=true" \ --jq '.tree[] | select(.type=="blob") | .path' \ | grep -E "^src/(core-skills/(bmad-forge-idea|bmad-brainstorming|bmad-advanced-elicitation|bmad-deep-recon)|bmm-skills/plan/(bmad-product-brief|bmad-prfaq|bmad-prd|bmad-ux)|scripts)/"Diff this against the current file list in
vendor-skills/BMAD/(excludingLICENSE,ATTRIBUTION.md, and any files this skill's step 4 strips) to see what's new, removed, or moved upstream before blindly overwriting — a file that moved to a new path upstream needs its path updated here too, not a stale copy left behind. -
Fetch every file at that ref via
gh api repos/bmad-code-org/BMAD-METHOD/contents/<path>?ref=<sha>(the.contentfield is base64), decoding withbase64 --decode(BSDbase64on macOS needs-i/-oflags, not-d <file>) intovendor-skills/BMAD/<path-with-src/-stripped>. Also re-fetchLICENSEfrom the repo root the same way. -
Re-apply the strip pass. Every vendored
SKILL.mdand itsreferences/*.mdfiles have BMAD's own orchestration layer removed — this doesn't survive a raw re-fetch and must be redone by hand each time:- Central config resolution (
_bmad/scripts/resolve_config.py,_bmad/config.toml,_bmad/bmm/config.yaml) — not vendored; replace with trivial inline defaults for{user_name},{communication_language}(English),{date}(today),{project_name}. _bmad/scripts/resolve_customization.pyand_bmad/scripts/memlog.pycalls — these ARE vendored (invendor-skills/BMAD/scripts/); rewrite their paths to{bmad-root}/scripts/<name>.py, where{bmad-root}is defined once per file (in a "Conventions" section) as the vendoredvendor-skills/BMAD/root.bmad-party-modementions/invocations — remove (not vendored).- Chain-forward "common next skill" suggestions, `bma
- Central config resolution (