BMAD-METHOD/tools/installer/modules
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
..
channel-plan.js v6.7.0: bundle module registry, retire marketplace, refresh display names (#2388) 2026-05-17 17:47:25 -05:00
channel-resolver.js feat(installer): channel-based version resolution + interactive channel management (#2305) 2026-04-24 08:20:30 -05:00
custom-module-manager.js fix: support nested group paths in SSH Git URLs (#2379) 2026-05-25 14:15:04 -05:00
external-manager.js v6.7.0: bundle module registry, retire marketplace, refresh display names (#2388) 2026-05-17 17:47:25 -05:00
module-help-schema.js refactor(catalog): rename after/before to preceded-by/followed-by (#2360) 2026-05-01 12:28:50 -07:00
official-modules.js fix(installer): address code-review findings on config refactor 2026-05-25 23:52:24 -05:00
plugin-resolver.js refactor(catalog): rename after/before to preceded-by/followed-by (#2360) 2026-05-01 12:28:50 -07:00
version-resolver.js fix: bmad tea instal version (#2298) 2026-04-22 11:03:20 -05:00