Skip to content

fix: quote workflow-common-core description so its frontmatter parses as YAML - #26

Open
divya0795 wants to merge 1 commit into
9thLevelSoftware:mainfrom
divya0795:fix/quote-workflow-common-core-description
Open

divya0795 wants to merge 1 commit into
9thLevelSoftware:mainfrom
divya0795:fix/quote-workflow-common-core-description

Conversation

@divya0795

Copy link
Copy Markdown

Summary

skills/workflow-common-core/SKILL.md is the only skill whose frontmatter isn't valid YAML. The description value is unquoted and contains /legion: commands. The : inside a plain scalar starts a nested mapping, so a YAML parser rejects the whole frontmatter block and never reads name or description.

description: Lean core conventions and path contracts used by all /legion: commands

Repro (on main @ 30662e3)

With the repo's own yaml dependency:

$ node -e 'const Y=require("yaml");const t=require("fs").readFileSync("skills/workflow-common-core/SKILL.md","utf8");Y.parse(t.match(/^---\n([\s\S]*?)\n---/)[1])'
YAMLParseError: Nested mappings are not allowed in compact mappings at line 2, column 14

gray-matter (dev dependency) fails the same way: incomplete explicit mapping pair; a key node is missed ... at line 3, column 74. None of the other 32 skills/*/SKILL.md files fail.

Impact

The installer copies this skill to every runtime target. A loader that parses frontmatter strictly will reject or skip it, the same kind of failure as #22. The sibling summary: field in the same block is already double-quoted, so this one looks like it was missed.

Fix

  • Quote the value. The parsed string is unchanged.
  • Regenerate checksums.sha256 (npm run checksums:generate), since the file is in the published set.
  • Add tests/skill-frontmatter.test.js, which parses every skills/*/SKILL.md frontmatter with yaml and checks that name/description are strings. validate.sh only checks agent frontmatter with an awk extractor, so nothing in CI was parsing skill frontmatter.

Verification (Node 20.20.2, same as CI)

  • The new test fails on main (workflow-common-core/SKILL.md frontmatter is not valid YAML) and passes with the fix.
  • npm run validate: PASS 316 / FAIL 0
  • npm run release:check: passed
  • npm run checksums:generate && git diff --exit-code -- checksums.sha256: clean
  • npm test: 1391 / 1391 pass

(On macOS, 12 installer-smoke cases fail on main too, because os.tmpdir() resolves /var vs /private/var differently. They pass with TMPDIR set to a realpath. That's unrelated to this change and doesn't happen on Linux CI.)

🤖 Generated with Claude Code

… as YAML

The unquoted description contained '/legion: commands'; the ': ' makes the
frontmatter invalid YAML, so strict loaders (yaml, js-yaml/gray-matter,
PyYAML) reject the whole block. Quote the value, refresh checksums, and add
a test that parses every skills/*/SKILL.md frontmatter.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant