fix(gen-skill-docs): quote frontmatter descriptions containing colons#1786
fix(gen-skill-docs): quote frontmatter descriptions containing colons#1786genisis0x wants to merge 2 commits into
Conversation
applyCatalogTrim wrote the trimmed description as a plain YAML scalar. When the text contains a colon-space or trailing colon, a strict YAML parser reads it as a mapping separator and rejects the frontmatter, so Codex/OpenAI skill loading skipped those skills. Render the value through a toYamlPlainOrQuoted helper that double-quotes (with escaping) only when the plain scalar would be invalid. Closes garrytan#1778.
Regenerated by bun run gen:skill-docs after the frontmatter quoting fix. Eight skills whose descriptions contain colons now emit valid YAML.
|
Collision check: #1739 and #1752 already cover this same generated-SKILL frontmatter bug. #1739 changes Suggested path: port the |
|
Closing as superseded: main now handles colon-containing frontmatter descriptions via |
Description
Closes #1778.
applyCatalogTriminscripts/gen-skill-docs.tsrewrites the trimmed catalog description back into SKILL.md frontmatter as a plain YAML scalar:When the description contains
": "(or a trailing colon), a strict YAML parser reads the second colon as a mapping separator and rejects the document:Codex/OpenAI skill loading uses a strict parser, so every affected skill was silently skipped.
Change
toYamlPlainOrQuoted(value): returns the value unchanged when it is a valid plain scalar, otherwise emits a double-quoted scalar (escaping\and"). Quoting triggers only on:/ trailing colon / leading YAML indicator chars, so existing colon-free descriptions are byte-for-byte unchanged.Testing
bun test test/gen-skill-docs.test.ts— 389 pass (incl. per-host--dry-runfreshness across all hosts).bun test test/skill-validation.test.ts— 329 pass.gen:skill-docsfor claude/codex/factory and the remaining hosts produces no further diff).