BMAD-METHOD/tools
Brian Madison 9799d10123 fix(installer): address second-round code-review criticals
writeGlobalUserCore now line-surgery upserts only the [core] keys it owns
into the existing file content — no read-parse-merge-emit round-trip. Hand
edits in shapes the minimal parseSimpleToml dropped (arrays, single-quoted
strings, dotted/quoted keys, \uXXXX escapes, custom sections) survive
byte-for-byte. Dead emitTomlSections helper removed.

writeModuleTomls emits core's shipped defaults under top-level [core], not
nested [modules.core] — matches where writeCentralConfig writes core deltas
and where resolve_config.py consumers read core.* from.

tomlString auto-infers TOML type from --set values: true/false → bool,
integer pattern → int, decimal pattern → float, otherwise quoted string.
Explicit-string escape hatch: --set k='"true"' writes "true" as a string.
Previously every --set value was wrapped in quotes, so --set bmm.workers=4
wrote "4" and downstream numeric comparisons broke.

upsertTomlKey's inline-comment detector now tracks double-quoted string
state via findInlineCommentStart, so a # inside a basic-string value
(legal per the TOML spec, contrary to the previous defending comment)
is no longer truncated. tomlHasKey and upsertTomlKey both use a new
isSectionHeader matcher that tolerates trailing inline comments on the
header line and walks every section occurrence — fixes mis-routing on
hand-edited files with [core]  # comment headers or duplicate sections.

Python test harnesses (test_resolve_config.py, test_resolve_customization_cascade.py)
now force BMAD_HOME to the synthetic isolation path unconditionally
instead of env.get(BMAD_HOME, default), which was a no-op when the
developer had BMAD_HOME set in their shell.

Adds 21 JS assertions covering the new behaviors directly: tomlString
type inference, # inside string values, inline-comment headers, and
writeGlobalUserCore round-trip preservation of hand-edited shapes.

Tests: 405 JS + 21 Python pass. Lint, markdownlint, prettier green.
2026-05-26 00:52:16 -05:00
..
docs feat(installer): expand to 42 platforms with shared target_dir coordination (#2313) 2026-04-25 21:14:00 -05:00
installer fix(installer): address second-round code-review criticals 2026-05-26 00:52:16 -05:00
build-docs.mjs fix(docs): community feedback — typo, locale 404s, llms-full (#2091) 2026-03-21 16:42:57 -06:00
bundle-web-bundles.js feat(web-bundles): release packager + manifest for bmadcode.com/web-bundles/ (#2424) 2026-05-25 11:43:55 -05:00
fix-doc-links.js fix(docs): comprehensive documentation site review fixes (#1578) 2026-02-08 11:58:22 -06:00
format-workflow-md.js check alignment 2025-10-22 12:36:39 -05:00
javascript-conventions.md refactor(installer): restructure installer with clean separation of concerns (#2129) 2026-03-27 06:50:07 -06:00
migrate-custom-module-paths.js fix(installer): replace fs-extra with native node:fs to prevent file loss 2026-04-13 00:44:28 -05:00
skill-validator.md refactor(bmad-ux): spine-based UX skill (DESIGN.md + EXPERIENCE.md) (#2413) 2026-05-22 23:16:06 -05:00
validate-doc-links.js feat(docs): add public roadmap and improve site navigation 2026-02-22 19:41:57 -06:00
validate-file-refs.js feat(skills): TOML-based agent and workflow customization (#2284) 2026-04-19 19:30:29 -05:00
validate-sidebar-order.js feat(docs): Add sidebar order validator for doc frontmatter (#2409) 2026-05-25 10:15:37 -05:00
validate-skills.js refactor(bmad-ux): spine-based UX skill (DESIGN.md + EXPERIENCE.md) (#2413) 2026-05-22 23:16:06 -05:00
validate-svg-changes.sh Project Cleanup of Agents Menus, BMB module removal to other repo 2026-01-19 02:04:14 -06:00