Refactor: one shared YAML/frontmatter helper instead of five hand-rolled line parsers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by reading the five named scripts and the existing test_canon_sync.py pattern to understand their parsers and how scripts are kept self-contained. Check the setup scripts' PyYAML dependency and compare current parsing behavior against the requested edge cases. Done means a shared helper is vendored consistently, duplicate keys and top-level keys are handled as specified, and the edge-case tests cover the listed YAML and encoding cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe your idea
Replace the line-by-line YAML parsing in validate-module.py, quick_validate.py, run_triggers.py, scaffold-standalone-module.py and scan-path-standards.py with one shared helper, e.g. bmad_yaml.py with load_frontmatter() / load_module_yaml().
Why is this needed?
Each script parses YAML differently, and each gets a different subset wrong: block scalars (>, >-, |+), quoted values, nested keys leaking to top level, duplicate keys, BOMs. Several open and newly filed bugs share this root cause (#117 plus the validate-module, run_triggers, scaffold-standalone-module and quick_validate reports). PyYAML is already a PEP 723 dependency of the setup scripts.
How should it work?
yaml.safe_loadwhen available, with the current line parser kept as a documented fallback.- Top-level keys only for validation,
utf-8-sigdecoding, and duplicate keys reported rather than last-wins. - One test file covering the edge-case table (folded, literal, chomping indicators, quoted, nested, BOM, CRLF).
- Vendored into each skill's
scripts/(skills must stay self-contained), with a sync test liketest_canon_sync.py.
PR
Happy to help implement this if the direction is agreed.
- Lingua principale
- Python
- Stelle
- 220
- Fork
- 54
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bmad-code-org/bmad-builder
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#153 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#151 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
bmad-code-org/bmad-builder#127 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bmad-code-org/bmad-builder#123 ·
Tutte le issue di bmad-code-org/bmad-builder
Issue simili
-
namespace
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
EclipseFdn/open-vsx.org#15604 ·
I maintainer di solito rispondono entro 1 giorno
-
app: scripts severity: low status: backlog type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
netbox-community/netbox-scripts#164 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 5 giorni
-
Public function to read participants.tsvForse già presa @bruAristimunha l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
huggingface/tau#799 ·
I maintainer di solito rispondono entro 2 giorni