From 3007ad25248d492b0725ce98e64041adecded094 Mon Sep 17 00:00:00 2001 From: ColumbusLabs <287001685+ColumbusLabs@users.noreply.github.com> Date: Fri, 24 Jul 2026 17:58:54 -0400 Subject: [PATCH 1/2] fix(setup): run merge-config with uv --- src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md | 5 +++-- tests/test_setup_cleanup_scripts.py | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md b/src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md index 1bc29476..8778a374 100644 --- a/src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md +++ b/src/bmad_loop/data/skills/bmad-loop-setup/SKILL.md @@ -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 diff --git a/tests/test_setup_cleanup_scripts.py b/tests/test_setup_cleanup_scripts.py index 2fa2bae4..26f42054 100644 --- a/tests/test_setup_cleanup_scripts.py +++ b/tests/test_setup_cleanup_scripts.py @@ -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: @@ -288,6 +289,13 @@ 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 + + def test_merge_config_preserves_legacy_configs(tmp_path): bmad = _v6_bmad(tmp_path) answers = tmp_path / "answers.json" From bac941e5a1cf940aba13be9f7707eb28c64bcde4 Mon Sep 17 00:00:00 2001 From: ColumbusLabs <287001685+ColumbusLabs@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:20:42 -0400 Subject: [PATCH 2/2] test(setup): preserve the csv helper runner --- tests/test_setup_cleanup_scripts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_setup_cleanup_scripts.py b/tests/test_setup_cleanup_scripts.py index 26f42054..73653f96 100644 --- a/tests/test_setup_cleanup_scripts.py +++ b/tests/test_setup_cleanup_scripts.py @@ -294,6 +294,7 @@ def test_setup_skill_uses_uv_for_dependency_bearing_merge_config(): assert skill.count("uv run ./scripts/merge-config.py") == 2 assert "python3 ./scripts/merge-config.py" not in skill + assert skill.count("python3 ./scripts/merge-help-csv.py") == 2 def test_merge_config_preserves_legacy_configs(tmp_path):