- fs-safe: keep the backup dir on a failed swap+rollback (it's the only
surviving copy of the previous install) and report its path instead of
deleting it.
- update: handle legacy marketplace.json modules the same way install does
(hasBmadPluginJson branch + resolveLegacyModule + synthesized staging) so
legacy-installed community modules are no longer un-updatable.
- cli: explicit --help/-h exits 0; bare no-args invocation keeps exit 2.
- config-gen: unescape TOML scalars in a single left-to-right pass so a
literal backslash before n/r/t (e.g. a Windows path \new) round-trips
intact; export parseTomlScalar and add round-trip regression tests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- atomicSwapDir: back the existing target up to a sibling before swapping the
staged dir in, and roll back on a failed rename so an interrupted update can
no longer leave neither the old nor the new install.
- ide-sync cleanup: only remove _bmad/ skill source dirs when EVERY IDE synced
successfully (so failed targets remain retryable), and containment-check each
CSV-derived path before fs.remove so a malformed row can't escape _bmad/.
- module-dirs: validate untrusted wds_folders entries for traversal/absolute
escape before mkdir.
- Regenerate the vendored ide-sync bundle (vendor:check clean).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>