Skip to content

Enforce the skill-authoring rules in CI - #17

Merged
ortizeg merged 1 commit into
developfrom
feat-skill-hygiene-guards
Jul 24, 2026
Merged

Enforce the skill-authoring rules in CI#17
ortizeg merged 1 commit into
developfrom
feat-skill-hygiene-guards

Conversation

@ortizeg

@ortizeg ortizeg commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Correcting an overclaim

I previously said body length was defended by CI. It was not. The only length assertion in the suite was a >500 character floor in test_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:

Guard The failure it prevents
Body ≤ 500 lines 19 of 30 skills once averaged 551 lines
Cited references/... exist The deep-dive-404 failure mode
No orphaned reference files Unreachable files that only cost tokens
References one level deep Nested refs cause partial reads
TOC on references >100 lines Partial read must still reveal scope
Descriptions trigger-first They were topic summaries ("Covers X, Y, Z") — these under-trigger
Descriptions third person First person hurts discovery
Descriptions within listing budget Overflow silently truncates matching keywords
Split skills link their deep dives An index that doesn't route is just a shorter skill

One 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, vscode failed 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:

loguru/SKILL.md cites reference files that do not exist: ['references/does-not-exist.md']
loguru description is not trigger-first ... Got: structured logging for cv/ml. covers sinks, json, levels...
pypi/SKILL.md is 539 lines (limit 500). Move detail into references/ ...

Verification

  • uv run pytest tests/536 passed
  • ruff / format / mypy --strict → clean
  • Wired into the archetypes CI job as "Enforce skill-authoring rules"

🤖 Generated with Claude Code

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>
@ortizeg
ortizeg merged commit 9ab5dd6 into develop Jul 24, 2026
3 checks passed
@ortizeg
ortizeg deleted the feat-skill-hygiene-guards branch July 24, 2026 13:12
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