summaryrefslogtreecommitdiff
path: root/docs/commandcode-setup.md
diff options
context:
space:
mode:
authorAbhishek Sharma <abhicse24@gmail.com>2026-09-23 15:33:44 -0700
committerAbhishek Sharma <abhicse24@gmail.com>2026-09-23 15:33:44 -0700
commitcdb801652d8d3399f4d7044dba61121668287e0c (patch)
tree8a0c1f98056258aa12ddc4a1343246bc9e6eb168 /docs/commandcode-setup.md
parentbcab6a1b8503100e8618c3b4e32cc78de43de769 (diff)
fix(validator): reject frontmatter values starting with a YAML indicator
The frontmatter YAML checks catch an unquoted `: `, a tab indent and an unterminated quote, but not a plain scalar that *begins* with a character YAML reserves. A real parser rejects the whole file on those, which is the failure the check exists to prevent. The backtick is the one that bites this repo. Descriptions routinely name other skills, and description: `other-skill` designs things. Use when … is a natural way to start one. It passes the validator today and throws `YAMLException: bad indentation of a mapping entry` in any consumer that parses the frontmatter. The rejected set was measured against a real parser rather than read off the spec, every candidate indicator tried both with and without a following space, and only the ones invalid in *both* forms with no legitimate single-line use are rejected: always invalid: ` @ % invalid before a space: - ? & (`:` was already covered) Deliberately still accepted, because each parses cleanly and flagging it would be a false positive on valid frontmatter: `:` or `-` when *not* followed by a space (`:platform`, `-hyphenated`), a leading `,`, `]`, `}` or `#`, and `[`/`{`, which open valid flow collections. `|` and `>` are left alone because they legitimately open a multi-line block scalar. Those exclusions are pinned by a test of their own, so the rule cannot be widened into false positives later — both widening mutations are caught by exactly that test. Cross-checked the finished rule against the parser over 38 values spanning every indicator in both forms: **0 false positives, 11 remaining misses**, all of them the deliberate exclusions above. Seven mutations caught: removing either rule, dropping the backtick or the at sign from the set, widening either rule (to anywhere in the value, or to ignore the required space), and letting quoted values fall through to the new checks. The repo's own 25 skills still pass with 0 errors and 0 warnings.
Diffstat (limited to 'docs/commandcode-setup.md')
0 files changed, 0 insertions, 0 deletions