Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ Write a temp JSON file with the collected answers structured as `{"core": {...},
In the commands below, replace `{project-root}` in every path argument with the actual project root (e.g. `/home/me/myapp`) before running — these are filesystem paths, not config values.

```bash
python3 ./scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} --legacy-dir "{project-root}/_bmad"
uv run ./scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} --legacy-dir "{project-root}/_bmad"
python3 ./scripts/merge-help-csv.py --target "{project-root}/_bmad/module-help.csv" --source ./assets/module-help.csv --legacy-dir "{project-root}/_bmad" --module-code bmad-loop
```

Both scripts output JSON to stdout with results. If either exits non-zero, surface the error and stop. The scripts automatically read legacy config values as fallback defaults. Legacy config files are **preserved, never deleted** — on BMAD v6 the per-module and core `config.yaml` / `module-help.csv` are live, manifest-tracked files (so `legacy_configs_deleted` / `legacy_csvs_deleted` are always empty).

Run `./scripts/merge-config.py --help` or `./scripts/merge-help-csv.py --help` for full usage.
Run `uv run ./scripts/merge-config.py --help` or
`python3 ./scripts/merge-help-csv.py --help` for full usage.

## Create Output Directories

Expand Down
9 changes: 9 additions & 0 deletions tests/test_setup_cleanup_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
REPO = Path(__file__).resolve().parent.parent
SCRIPTS = REPO / "src" / "bmad_loop" / "data" / "skills" / "bmad-loop-setup" / "scripts"
ASSETS = REPO / "src" / "bmad_loop" / "data" / "skills" / "bmad-loop-setup" / "assets"
SETUP_SKILL = SCRIPTS.parent / "SKILL.md"


def _run(script: str, *args: str) -> subprocess.CompletedProcess:
Expand Down Expand Up @@ -288,6 +289,14 @@ def test_cleanup_removes_payload_whose_skill_ships_marker_named_assets(tmp_path)
# ---------------------------------------------------------------- merge-config


def test_setup_skill_uses_uv_for_dependency_bearing_merge_config():
skill = SETUP_SKILL.read_text()

assert skill.count("uv run ./scripts/merge-config.py") == 2
assert "python3 ./scripts/merge-config.py" not in skill
Comment thread
coderabbitai[bot] marked this conversation as resolved.
assert skill.count("python3 ./scripts/merge-help-csv.py") == 2


def test_merge_config_preserves_legacy_configs(tmp_path):
bmad = _v6_bmad(tmp_path)
answers = tmp_path / "answers.json"
Expand Down