summaryrefslogtreecommitdiff
path: root/docs/commandcode-setup.md
diff options
context:
space:
mode:
authorAbhishek Sharma <abhicse24@gmail.com>2026-09-21 12:19:04 -0700
committerAbhishek Sharma <abhicse24@gmail.com>2026-09-21 12:19:04 -0700
commit4af909b7c5a0b7104a8fe29f35fe5e255ad6478d (patch)
treed21274b0fb024d1601a5b143ed7f6f2a0add7d9a /docs/commandcode-setup.md
parent6fa76fa090baab4f3c877c84cb00dc923336c1e7 (diff)
feat(validator): hold commands to the same frontmatter rules as skills
`descriptionFromMd` in validate-commands.js splits each frontmatter line on its first colon — the same forgiving read the skill linter used before the strict rules landed. So a command whose frontmatter is not valid YAML passes every check here, and Claude Code parses that frontmatter when the command is loaded. Same class of gap as the SKILL.md one, on the other set of files: the #494 thread verified all 25 SKILL.md files *and* the command files by hand. This makes the second half a check too, sharing the rules rather than restating them. All nine current commands already pass — confirmed independently against ruby's psych before writing this — so it is a guard, not a repair. That is the same shape the skills half had, and the same reason: the manual verification was real, it just could not stay true on its own. Scoped to `.claude/commands/*.md`. The `.gemini/` and `commands/` directories are TOML and already go through a real TOML parser, so a malformed one surfaces as a missing description in the existing check. A test pins that the YAML rules are NOT applied to them, since a TOML description legitimately carries a colon and running these rules over it would fail nearly every command. The test sandbox copies the validator into a temp tree, so it now copies scripts/lib/skill-lint.js beside it. Without that every existing test fails with a module-not-found, which is how I found it. Five new tests. Mutation-tested 2/2: skipping the check, and reporting its errors without counting them, each fail two. Every validator exits 0 and all six script suites pass. Refs #494
Diffstat (limited to 'docs/commandcode-setup.md')
0 files changed, 0 insertions, 0 deletions