fix(gates): boundary-clause check fires on hand-invoked skills, which are contractually exempt #108
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A skill declaring
disable-model-invocation: trueis told by ADR-0020 and byskill-authorStep 2 to carry one plain human-facing sentence, no trigger list, no boundary clause. The deterministic boundary-clause check flags exactly that shape as a finding.Neither validator knows the field exists —
grep -rn 'disable-model-invocation'overscripts/skill-size-check.shand bothvalidate.shfiles returns nothing.Reproduction
plugins/bin/.apm/skills/zoom-out/SKILL.mdis the in-tree exemplar ADR-0020 names, and follows the contract exactly:pre-commit run skill-size-check --all-filesreports:The advice is actively wrong for this skill: there is no router to inform, because the flag removes it from the model-visible listing entirely.
Severity
Low. SUGGESTION tier, so nothing blocks. It is permanent noise on every hand-invoked skill, and the fix advice contradicts the contract, so an author who follows it makes their skill worse.
Currently one skill is affected. Issue #99 adds
caveman, and the population is capped small — see below.Fix
Skip the boundary-clause check (and the trigger-quality checks that presuppose model invocation) when frontmatter carries
disable-model-invocation: true. The size budgets should still apply: a hand-invoked description is not preloaded, but the body is still loaded on invocation.Worth adding a test case;
zoom-outis a stable fixture for it.Context worth recording while here
ADR-0020's "Invocation as a design axis" verified that the flag removes a skill from the model-visible listing and that
/zoom-outstill works. It did not verify the other direction, and that half turns out to matter more:The flag hard-blocks the Skill tool, so no other skill can route to a hand-invoked skill. A
Call `x`step in another skill's body stops working the momentxtakes the flag.This changed the #99 scope. Of the four hand-invoke candidates that issue names, three have inbound routes and would have broken their callers:
cavemanprototypediagnosegrill-mewrite-docs,skill-author/references/create.mdgrill-with-docsimprove-codebase-architecture,triage,write-docs,forgeforgeStep 1 readsCall `bin:grill-with-docs`and is mandatory, so flagging that skill would have broken the factory's entry point.Already recorded in
CONTEXT.md's Hand-invoked skill entry (commitef3e981), which previously covered listing visibility and preload cost but said nothing about invocability.Fixed on
refactor/adr0020-skill-retrofit(not yet pushed — the PR body will carry the close)A shared
hand_invoked(fm_text)now readsdisable-model-invocationas a boolean, not as key presence. PyYAML already resolves the unquoted YAML 1.1 booleans, so the extra branch catches only a quoted"true"(which a host reads as truthy);falseis not the carve-out. A frontmatter parse failure returnsFalserather than raising — the field's validity is already decided and reported bydescription_value()on the same text, and raising twice would diagnose one broken file two different ways.What it lifts — the routing rules only:
What it keeps — for the reason this issue gives:
/menu; the ceiling is an outlier stop, not a routing-quality target)Verified on the two live cases.
cavemanandzoom-outboth carrydisable-model-invocation: trueand both exit 0 clean underscripts/skill-size-check.sh.Tests (
tests/test-skill-size-check.sh) pin both halves, and each exemption case is paired with a control that removes only the flag:disable-model-invocation: falseis not the carve-out (still reports "has no boundary clause")Implemented in all three hosts:
scripts/skill-size-check.sh,skill-audit/scripts/validate.sh,agent-audit/scripts/validate.sh. The contract side is stated inskill-author/SKILL.mdandskill-audit/SKILL.md.Fixed by #129, squash-merged to
mainas598a7c3.The boundary-clause check (and the trigger-quality checks that presuppose model invocation) now skip when frontmatter carries
disable-model-invocation: true. Size budgets still apply, per the fix note in this issue.Verified against the merged tree on a fixture with the flag set and no boundary clause at all: zero output, rc 0. The permanent SUGGESTION noise on hand-invoked skills is gone, and with it the advice that contradicted the contract.
cavemantook the flag in this PR, so the affected population is nowzoom-out+caveman— both clean.Stayed open after the merge because Gitea's closing-keyword parser consumed only the first reference in
Closes #99, #107, …. Closing manually.