BMAD-METHOD/tools/installer/core
Brian Madison 579c78d2aa fix(installer): address code-review findings on config refactor
Nine fixes covering bugs caught by my code-review, Augment, and CodeRabbit:

quickUpdate identity overwrite (official-modules.js): collectModuleConfigQuick
now lazy-loads globalConfig and falls back through ~/.bmad/config.user.toml
before getDefaultUsername(), so `bmad update` no longer silently overwrites
the user's global identity with the OS username.

computeProcessedDefault placeholder asymmetry (manifest-generator.js): build
a shipped-defaults crossKeyDefaults map and feed BOTH writeCentralConfig and
writeModuleTomls through it. Previously stripDefaults resolved {output_folder}
against user answers while module.toml resolved it against shipped defaults —
overriding output_folder silently reverted every derived path on read.

parseTomlScalar escape order (global-config.js): single-pass regex replacer
so `\\n` round-trips as backslash+n instead of collapsing to a newline.
Windows paths and any TOML string with literal `\n`/`\t`/`\r` survive.

writeGlobalUserCore nested-table corruption (manifest-generator.js): emit
nested objects as proper dotted sub-tables (`[modules.bmm]`) instead of
serializing them as `"[object Object]"` strings inside the parent section.

extractAgentBlocks dead code (manifest-generator.js): deleted. The agent
preservation invariant was intentionally retired by Task F (agents live in
module.toml floor); the function had no callers.

applySetOverrides 3-tier routing (set-overrides.js): consults
~/.bmad/config.user.toml first, then project config.user.toml, then routes
known core scope:user keys (user_name, communication_language per core
schema) to global when neither file owns them. Prevents
`bmad install --set core.user_name=Alice` from polluting project team config.

BMAD_HOME tilde expansion (global-config.js): JS resolver now matches
Python's Path.expanduser() so installer and resolver agree on the global
location when BMAD_HOME is set in non-shell contexts (.env, Docker, Windows).

resolve_config.py fail-fast (resolve_config.py): when --project-root is
explicitly passed but _bmad/ doesn't exist, exit 1 with a clear error
instead of silently returning {}. Global-only mode (no --project-root)
remains permissive.

_MODULE_SKILLS_RE hyphen support (resolve_customization.py): allow hyphens
in module slugs (e.g. `foo-bar-skills/`) so qualified-name skill matching
works for hyphenated modules.

Tests: 383 JS tests + 21 Python tests pass; lint, markdownlint, prettier all
green. Suite 44 now isolates BMAD_HOME and asserts the new 3-tier routing
contract for `--set` overrides.
2026-05-25 23:52:24 -05:00
..
config.js feat(installer): add --set and --list-options for non-interactive config (#2354) 2026-04-28 20:15:57 -05:00
existing-install.js fix(installer): replace fs-extra with native node:fs to prevent file loss 2026-04-13 00:44:28 -05:00
install-paths.js refactor(skills): remove bmad-skill-manifest yaml; introduce central config.toml (#2285) 2026-04-19 23:11:44 -05:00
installer.js fix(installer): preserve stale installed modules during update (#2391) 2026-05-18 08:39:11 -05:00
legacy-warnings.js feat(installer): expand to 42 platforms with shared target_dir coordination (#2313) 2026-04-25 21:14:00 -05:00
manifest-generator.js fix(installer): address code-review findings on config refactor 2026-05-25 23:52:24 -05:00
manifest.js v6.7.0: bundle module registry, retire marketplace, refresh display names (#2388) 2026-05-17 17:47:25 -05:00