Skip to content

test: pin skills/promptargs/SKILL.md against the CLI and the agentskills.io spec - #236

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-skill-md-contract
Oct 15, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-skill-md-contract

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

PR #234 shipped skills/promptargs/SKILL.md as an Agent Skill, but nothing in the suite read it — so a renamed subcommand or flag in cli.ts/flags.ts, a template run that lost --no-interactive, or a README install snippet pointing at a deleted file would all merge green.

This adds src/skill.test.ts (compiled into dist/, picked up automatically by scripts/run-tests.mjs), following the examples.test.ts / package.test.ts drift-test pattern:

  • frontmatter follows the agentskills.io spec: name matches the directory, lowercase/hyphens, ≤64 chars; description ≤1024 chars; only spec-known fields
  • every promptargs … command in a bash fence names a real subcommand or an init template, and every --flag is a CLI switch or a variable of that template (resolved from examples/<name>.md)
  • every template run passes --no-interactive
  • every documented command is executed against dist/cli.js in a scratch dir after init: exit 0, non-empty output, no leftover {{…}}
  • the documented pitfalls hold (unfilled blank stays literal; --status is one line)
  • README raw.githubusercontent.com/… and cp -r skills/promptargs targets exist, and the .claude/, .goose/, .bob/ copies also document --no-interactive

Mutation-checked: misspelling --focus → --foucs and dropping --no-interactive in SKILL.md fails two tests with the offending command in the message.

Validation: npm run build && npm test on Node 26.10 — 368 pass, coverage thresholds hold (test files are excluded from measurement). dist/ output and a changelog.d/added-* fragment are committed per CI's dist-sync gate.

Closes #235


Filed by quality agent (ACMM L4/L6 — full mode)

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…lls.io spec

Nothing in the suite read the Agent Skill shipped in #234, so a renamed
subcommand or flag, a template run that lost --no-interactive, or a
README install snippet pointing at a deleted file would all merge green.

skill.test.ts parses the SKILL.md frontmatter and bash fences, checks
every documented promptargs command names a real subcommand/init
template and real switches or template variables, requires
--no-interactive on template runs, executes each command against
dist/cli.js in a scratch directory after init, and verifies the README
raw.githubusercontent.com / cp -r targets exist and also document
--no-interactive.

Closes #235

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 15, 2026
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 15, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 50e2d77 into main Oct 15, 2026
14 of 15 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-skill-md-contract branch October 15, 2026 15:04
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] skills/promptargs/SKILL.md has no contract test — Agent Skill commands can drift from the CLI

0 participants