Skip to content

fix: quote the four remaining argument-hint values (follow-up to #69) - #74

Open
Caho1 wants to merge 1 commit into
XBuilderLAB:mainfrom
Caho1:fix/quote-remaining-argument-hint
Open

Caho1 wants to merge 1 commit into
XBuilderLAB:mainfrom
Caho1:fix/quote-remaining-argument-hint

Conversation

@Caho1

@Caho1 Caho1 commented Sep 13, 2026

Copy link
Copy Markdown

Follow-up to #69, closes the remaining part of #68.

Summary

Four skills still carry an unquoted argument-hint: value whose text starts with <…> and contains [… : …]:

  • skills/cheat-learn-from/SKILL.md
  • skills/cheat-predict/SKILL.md
  • skills/cheat-publish/SKILL.md
  • skills/cheat-retro/SKILL.md

Same mechanical fix as #69: wrap the value in double quotes so every YAML parser reads it as a plain string.

- argument-hint: <script-path> [— mode: v1|v2] [— prediction-file: <path>] [— skip-blind]
+ argument-hint: "<script-path> [— mode: v1|v2] [— prediction-file: <path>] [— skip-blind]"

Why #69 missed these four

#69 was about values that start with [, which YAML parses as a flow sequence. These four start with <…>, so they look like plain scalars — but the : inside the bracketed part (way: a, mode: v1, platform: …, window: 3) reads as a nested mapping, which is a hard parse error rather than a shape mismatch. Lenient parsers (PyYAML safe_load) accept it, so a lint pass can miss it; strict parsers reject the whole frontmatter.

Impact

Strict loaders drop the skill entirely. With pi 0.85.1's skill loader, which uses the yaml package:

before -> skills: []                  diagnostics: ['Nested mappings are not allowed in compact mappings at line 3, column 16']
after  -> skills: ['cheat-predict']   diagnostics: 0

Verification

  • Frontmatter of all 14 skills/*/SKILL.md plus the root SKILL.md parses with the yaml package; each changed file returns argument-hint as a str
  • loadSkillsFromDir from pi 0.85.1 loads the changed skills with zero diagnostics (before: skill dropped + warning)
  • No changed value contains " or \, so plain double-quote wrapping is safe and the parsed string is unchanged

The other unquoted hints (cheat-bump, cheat-score, cheat-score-blind, cheat-shoot) contain no : and parse as plain scalars, so they are left untouched.

Relation to #73

Same scope and same one-line change as #73, filed from a fork rebased on current main (d2d818f). Either one can be merged; happy to close this one if #73 lands first.

Follow-up to XBuilderLAB#69 (closes the remaining part of XBuilderLAB#68).

Four skills still carry an unquoted `argument-hint:` value whose text
starts with `<…>` and contains `[… : …]`. The `: ` inside that part
reads as a nested mapping, so strict YAML parsers (js-yaml / the `yaml`
package used by pi) fail on the frontmatter and drop the skill, while
lenient parsers (PyYAML) accept it — which is why XBuilderLAB#69 missed these.

- skills/cheat-learn-from/SKILL.md
- skills/cheat-predict/SKILL.md
- skills/cheat-publish/SKILL.md
- skills/cheat-retro/SKILL.md

Same mechanical fix as XBuilderLAB#69: wrap the value in double quotes so it parses
as a plain string. No value contains `"` or `\`, so wrapping is safe, and
the parsed string is unchanged.

Verification: pi 0.85.1's skill loader (bundled `yaml` parser) over the
skill directory returns no skill and a "Nested mappings are not allowed
in compact mappings" warning before the change, and loads the skill with
zero diagnostics after it:

  before -> skills: []                  diagnostics: ['Nested mappings …']
  after  -> skills: ['cheat-predict']   diagnostics: 0
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