[BUG] Reinstall turns list-valued (multi-select) config answers into JSON strings — parseCentralToml has no array branch

Author: thkennedyCreated Sep 27, 2026Updated Sep 27, 2026

Description

Reinstalling over an existing install re-serializes every list-valued (multi-select) module config answer as a JSON string. After the first reinstall:

  • _bmad/gds/config.yaml has primary_platform: '["unity", "unreal", "godot", "other"]' (a string) instead of a YAML list
  • _bmad/config.toml has primary_platform = "[\"unity\", \"unreal\", \"godot\", \"other\"]" instead of a TOML array

The same happens to WDS's product_languages. Anything that reads these values as lists gets a string. Projects that commit _bmad/ also see the change as git churn on every reinstall.

Root cause (read in the 6.12.0 source): parseCentralToml in tools/installer/modules/official-modules.js loads the existing answers from _bmad/config.toml / config.user.toml. It handles quoted strings, booleans and numbers, but has no branch for arrays. So primary_platform = ["unity", "unreal", "godot", "other"] falls through to value = raw, and the existing answer comes back as the string ["unity", "unreal", "godot", "other"]. That string is what gets written back to the module config.yaml and to config.toml. Once written, the string form is stable across later reinstalls, so it never self-heals.

Suggested fix: parse [...] values in parseCentralToml as TOML arrays, or use a real TOML parser there. The writer side already emits arrays correctly on a fresh install.

Steps to reproduce

bash
npx [email protected] install --directory ./demo --modules gds --tools claude-code --yes --pin gds=v0.6.0
#   _bmad/gds/config.yaml:  primary_platform: [unity, unreal, godot, other]   (YAML list)
#   _bmad/config.toml:      primary_platform = ["unity", "unreal", "godot", "other"]

npx [email protected] install --directory ./demo --modules gds --tools claude-code --yes --pin gds=v0.6.0
#   (--yes defaults to quick-update; --action update gives the same result)
#   _bmad/gds/config.yaml:  primary_platform: '["unity", "unreal", "godot", "other"]'
#   _bmad/config.toml:      primary_platform = "[\"unity\", \"unreal\", \"godot\", \"other\"]"

Expected behavior

Config values round-trip unchanged through a reinstall. A list answer stays a YAML list in config.yaml and a TOML array in config.toml.

Actual behavior

The first reinstall converts every list answer to a JSON-string scalar in both files, permanently.

Which module is this for?

BMad Method (BMM) - Core Framework. The bug is in the installer; it shows up in GDS (primary_platform) and WDS (product_languages) configs.

BMad Version

6.12.0 (latest). Also reproduced on 6.11.0; first seen on 6.10.0.

Which AI IDE are you using?

Claude Code

Operating System

Windows. The parser bug itself is platform-independent.

Related question: line endings of installed files

Installed files take the working-tree line endings of the installer's module cache clones (~/.bmad/cache/external-modules/*). Those clones follow the machine's core.autocrlf at the time they were cloned. So the same pinned version can install byte-different files on two machines: CRLF on a Windows box whose cache was cloned under Git for Windows' default autocrlf=true, LF elsewhere.

For projects that commit _bmad/, the files-manifest.csv hashes then describe CRLF bytes while the checkout holds LF. The next reinstall treats those files as user-modified and writes *.bak copies.

Is normalizing line endings at install time (or cloning with a fixed core.autocrlf) in scope?

Source: bmad-code-org/BMAD-METHOD