merge-help-csv.py: fallback HEADER uses after/before, all module-help.csv files use preceded-by/followed-by
まだ誰も着手していません。
評価
調査の方向性
issue に記載されている merge-help-csv.py の5つのコピーを調べ、それらの fallback HEADER を対応する module-help.csv のヘッダーと比較します。提供されている blank-first-line の再現を実行し、その後、生成されたヘッダーがすべてのコピーで位置 9–10 に preceded-by と followed-by を使用していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
merge-help-csv.py declares its fallback HEADER with after / before in positions 9–10, but every module-help.csv in this repo uses preceded-by / followed-by. When the fallback is used, the written CSV has two misnamed columns, and any consumer reading preceded-by / followed-by finds nothing.
It's a clean internal inconsistency — verified against main @ e6935f2, all five copies of the script disagree with all five CSV assets:
merge-help-csv.py (all say after / before) |
module-help.csv (all say preceded-by / followed-by) |
|---|---|
skills/bmad-module-builder/assets/standalone-module-template/ |
skills/module-help.csv |
skills/bmad-module-builder/assets/setup-skill-template/scripts/ |
skills/bmad-module-builder/assets/setup-skill-template/assets/ |
skills/bmad-bmb-setup/scripts/ |
skills/bmad-bmb-setup/assets/ |
samples/sample-module-setup/scripts/ |
samples/sample-module-setup/assets/ |
samples/bmad-agent-dream-weaver/scripts/ |
samples/bmad-agent-dream-weaver/assets/ |
Because the two template copies are what scaffolded modules vendor, downstream modules inherit it — that's how it was found.
Steps to reproduce
The fallback is:
header = target_header if target_header else (source_header if source_header else HEADER)
Reaching it is harder than it looks, which is why this is latent rather than user-visible. read_csv_rows returns rows[0] unconditionally, so a falsy source_header normally implies an empty or missing source — which trips the sys.exit(1) just above. The one path through is a source whose first line is blank (csv.reader yields [], falsy) plus a non-existent target:
printf '\nabm,skill-a,A,1,desc,x,y,z,,,,,\n' > /tmp/src.csv
python3 merge-help-csv.py --target /tmp/fresh.csv --source /tmp/src.csv
head -1 /tmp/fresh.csv
# module,skill,display-name,menu-code,description,action,args,phase,after,before,required,output-location,outputs
# ^^^^^ ^^^^^^
A normal merge never hits it, since either file supplies a header. So the practical cost isn't a broken install today — it's a wrong schema constant sitting in five files, which the next person to reach for HEADER (to add column validation, say) inherits.
Expected behavior
HEADER matches the schema the rest of the toolchain emits — preceded-by / followed-by in positions 9–10.
Environment
- bmad-builder
main@e6935f2776c34ffd9b18f4ef1e334584ef10a50f(npm[email protected])
PR
Happy to open a one-line-per-file PR if that's welcome.
Additional context
Credit to @hugheba, who found this while vendoring a scaffolded module downstream and reported it at stefanoginella/auto-bmad#8 — verified by reading installed files, not static analysis. A copy of the same script in bmad-code-org/bmad-loop carries it too.
- 主要言語
- Python
- スター
- 220
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bmad-code-org/bmad-builder のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bmad-code-org/bmad-builder#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bmad-code-org/bmad-builder#153 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bmad-code-org/bmad-builder#151 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bmad-code-org/bmad-builder#127 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bmad-code-org/bmad-builder#123 ·
bmad-code-org/bmad-builder の issue をすべて見る
似ている issue
-
namespace
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
EclipseFdn/open-vsx.org#15604 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: low status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
netbox-community/netbox-scripts#164 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 5 日以内に返信
-
Public function to read participants.tsv対応中かも @bruAristimunha が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
huggingface/tau#799 ·
メンテナーはふだん 2 日以内に返信