validate-module.py: line-based YAML parser gives false fails and false passes; any '*-setup' folder hijacks detection

オープン
#129 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, yaml
領域
testing, tooling

調査の方向性

Start with skills/bmad-module-builder/scripts/validate-module.py and trace parse_yaml_minimal() and find_setup_skill(); inspect the validator's tests if present. Reproduce the listed YAML, BOM, and setup-folder cases against a copy of skills/. Done means those cases match the expected behavior, including deterministic handling when multiple setup-skill candidates match.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

skills/bmad-module-builder/scripts/validate-module.py:

  1. parse_yaml_minimal() flattens every key: value at any indent, and drops values starting with >. Each change below was applied separately to a copy of bmb's own skills/, which passes with an eval-runner row added:
Change Validator Should be
description: > + indented text (valid YAML) fail: missing or empty required field: description pass
top-level code: removed, a variable block has nested code: nested-value pass, module_code: nested-value fail
module-help.csv saved with a UTF-8 BOM (Excel default) fail: CSV header mismatch: missing: module; extra: \ufeffmodule pass
  1. find_setup_skill() returns the first *-setup directory in raw iterdir() order. It doesn't require a SKILL.md. Adding an empty aaa-old-setup/ next to bmad-bmb-setup/ made the validator report 3 critical "Missing required file" findings against the wrong folder.

Steps to reproduce

cp -r skills /tmp/vm && cd /tmp/vm
mkdir aaa-old-setup
python3 <bmb>/skills/bmad-module-builder/scripts/validate-module.py .
# setup_skill: aaa-old-setup -> 3 critical findings

Expected behavior

  • Load module.yaml with a real YAML parser (yaml.safe_load), checking top-level keys only.
  • Read the CSV as utf-8-sig.
  • Treat only directories with SKILL.md and assets/module.yaml as setup-skill candidates. Error clearly when more than one matches, and sort candidates for deterministic output.

Environment

  • Model(s) used: n/a (deterministic script)
  • Agentic IDE used: n/a (scripts run directly)
  • BMad version: bmad-builder main @ d4a921c (v2.2.2 + #118)
  • Project language: Python 3.13, Linux
主要言語
Python
スター
220
フォーク
54
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bmad-code-org/bmad-builder のほかの issue

bmad-code-org/bmad-builder の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。