Enforce the skill-authoring rules in CI - #17
Merged
Conversation
Correcting an overclaim. I said body length was defended by CI; it was not.
The only length assertion was a >500 *character* floor in
test_skills_completeness.py — the 500-*line* ceiling, progressive-disclosure
structure, and description quality had no guard at all. They held because they
had just been fixed by hand, which is exactly the state that rots.
Adds tests/test_skill_hygiene.py, one check per scorecard rule, each tied to a
failure the library actually had:
- body under the 500-line ceiling (19 of 30 skills once averaged 551)
- every `references/...` a SKILL.md cites exists (the deep-dive-404 failure mode)
- no orphaned reference files nothing links to
- references stay one level deep
- references over 100 lines carry a table of contents
- descriptions are trigger-first, not topic summaries ("Covers X, Y, Z")
- descriptions are third person
- descriptions stay inside the listing budget
- a split skill routes to its own deep dives
Quoted user utterances are stripped before the third-person check: a
description listing what a user might say ("set up my editor") is doing keyword
coverage, not speaking in first person. Without that, vscode failed on a
phrasing the guidance actively encourages.
Each guard was verified to bite by planting a regression and observing the
failure, then reverting: a dangling reference link, a topic-summary
description, and a 539-line body.
Wired into the archetypes CI job. 536 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correcting an overclaim
I previously said body length was defended by CI. It was not. The only length assertion in the suite was a
>500character floor intest_skills_completeness.py. The 500-line ceiling, the progressive-disclosure structure, and description quality had no guard at all.They were passing because they'd just been fixed by hand — which is precisely the state that rots. A scorecard that holds only because someone recently tidied up isn't a scorecard, it's a snapshot.
What this adds
tests/test_skill_hygiene.py— one check per scorecard rule, each tied to a failure this library actually had:references/...existOne subtlety worth reviewing
The third-person check strips quoted user utterances first. A description listing what a user might say —
"set up my editor"— is doing keyword coverage, not speaking in first person, and that phrasing is actively encouraged. Without the strip,vscodefailed on good practice.Every guard was proven to bite
Rather than trusting green, I planted a regression for each and observed the failure, then reverted:
Verification
uv run pytest tests/→ 536 passedmypy --strict→ cleanarchetypesCI job as "Enforce skill-authoring rules"🤖 Generated with Claude Code