Scaffolded setup skill deletes live v6 config (cleanup-legacy + merge cleanup); still present in v2.0.0

Đang mở
#96 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu với bmad-module-builder/assets/setup-skill-template/cleanup-legacy.py, sau đó so sánh các phần bị xóa của nó với cleanup_legacy_configs trong merge-config.py và cleanup_legacy_csvs trong merge-help-csv.py. Chạy lệnh cài đặt và dọn dẹp v6 đã được báo cáo; hoàn tất có nghĩa là các tệp config, help và manifest đang được sử dụng vẫn nguyên vẹn, trong khi các payload legacy thực sự dư thừa vẫn có thể được xóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

The bmad-module-builder scaffolder emits a setup skill whose cleanup steps delete config that is live on BMAD v6. Confirmed still present in v2.0.0 — the v2 rebuild did not touch bmad-module-builder/assets/setup-skill-template (last change 2026-06-02).

Details

cleanup-legacy.py builds dirs_to_remove = [module_code, "core"] + also_remove and shutil.rmtrees each. On v6 these are live:

  • _bmad/core/config.yaml — live core config (user_name, project_name, language settings) read by core/bmm skills
  • _bmad/<module>/config.yaml, _bmad/<module>/module-help.csv — live module config/help
  • _bmad/_config/ — installer manifests + bmad-help.csv

The --skills-dir safety check only guards directories that contain a SKILL.md. On v6 these config directories have none, so find_skill_dirs returns empty, verification is skipped, and removal proceeds — while the JSON reports skills_verified: true.

merge-config.py (cleanup_legacy_configs) and merge-help-csv.py (cleanup_legacy_csvs) have the same file-level deletions for core/config.yaml, <module>/config.yaml, and the per-module module-help.csv.

Reproduction

npx bmad-method@latest install --modules bmm --tools claude-code --yes
# then run the scaffolded setup skill's cleanup invocation:
python3 cleanup-legacy.py --bmad-dir _bmad --module-code <m> --also-remove _config --skills-dir .claude/skills

Result: core/config.yaml, <module>/ config + help, and _config/ manifests are deleted; project_name is lost (it isn't migrated up by merge-config.py); /bmad-help's catalog (_config/bmad-help.csv) is gone.

Why it's wrong on v6

The consolidate-and-delete model assumes the installer staged redundant skill payloads + per-module config into _bmad/<module>/ and core/. Fresh-install probes of 6.0.1, 6.6.0, and 6.8.0 all show the opposite: per-module config.yaml is live, skills live at .claude/skills/, and nothing is staged redundantly under _bmad/. The model matches a pre-v6 (v4/v5) layout, not any v6 release.

Impact

Affects every module scaffolded by bmad-module-builder that coexists with bmm-core v6, including bmad-bmb-setup itself.

Suggested fix

Gate removal on "verified-redundant skill payload": remove a directory only if it contains ≥1 SKILL.md whose skills are verified installed at the skills dir, and never remove a directory containing config files. This no-ops safely on v6 while still cleaning genuine pre-v6 payload dirs — no version check needed. Apply the same guard to the cleanup_legacy_* file deletions in merge-config.py / merge-help-csv.py.

Ngôn ngữ chính
Python
Star
220
Fork
54
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bmad-code-org/bmad-builder

Tất cả issue của bmad-code-org/bmad-builder

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.