fix(kyberforge): correct the routing-tier contract and make agent-audit rubrics conditional
Five documents told authors that a prose-form dangling routing target blocks. The
gate reports it as a SUGGESTION and exits 0. Verified on fixtures: `-> name` and
`/name` are blocking ERRORs, the prose form is SUGGESTION-tier unless a second
resolving target in the same sentence corroborates it. ADR-0020 and gates.md were
right; contract.md, retrofit.md, description-quality.md, finding-criteria.md and
agent-author's contract.md were wrong — and they are what an author and an auditor
actually read. The whole 39-skill corpus was retrofitted against them.
skill-audit was also self-contradictory: it imports validate.sh's SUGGESTIONs into
the Structure dimension verbatim while its own rubric grades the same target a FAIL,
so one target got reported twice at two tiers. The script owns the grade; the rubric
now says so.
The YAML-fold trap that broke gitea-labels-milestones (#100) was warned about only
in retrofit.md, reachable only from the improve flow when a budget is exceeded. It
is now in both contract.md files, which SKILL.md mandates on the create flow too.
agent-audit loaded both rubrics unconditionally on every run — 3,323 words for a
clean audit against skill-audit's 1,636. dac9cad fixed exactly this in skill-audit
and edited agent-audit in the same commit without applying it. Same treatment: the
criteria move to a new finding-criteria.md and load per dimension. Clean run now
2,083 words, a 37% cut.
Routing: apm-workflow's description shed dependency installation while still owning
the flow, and apm-install's boundary did not exclude it, so "install my apm
dependencies" matched the CLI-binary skill with no route back. Fixed on both sides.
forge regains two of the three phrasings the retrofit deleted.
forge Step 1 called grill-with-docs unconditionally — a skill in plugins/bin, which
kyberforge does not declare as a dependency. It resolves here only because the
walk-up sweeps sibling plugins; a standalone install dead-ends. Step 1 now names
the cross-plugin dependency and gives an inline fallback. Declaring it properly in
apm.yml remains the better fix.
Also: both audit SKILL.md files now grade exit 2 as "did not run, dimension
unverified" rather than as findings; skill-audit's README row described content that
moved, which its own finding-criteria.md grades a FAIL; and body-discipline.md's
`git show <sha>:plugins/...` command is fenced, since an installed plugin cache has
no repo and file-structure.md makes a bare repo path a FAIL.
Refs: #100, #101, #125
ADR: 0020
This commit is contained in:
@@ -47,15 +47,22 @@ explicitly" only where the user's natural phrasing genuinely omits the domain wo
|
||||
for `git-commits`, where the user says "commit". Adding one everywhere is what inflated this
|
||||
corpus, and it was deleted as a blanket rule.
|
||||
|
||||
**Boundary targets must resolve.** Both forms are checked — the arrow and the prose form ("do not
|
||||
use for X, use `y` instead") — so a typo dangles either way. Targets resolve against a universe
|
||||
built by walking up **from the SKILL.md itself**: the nearest ancestor holding
|
||||
**Boundary targets must resolve, and the notation decides how hard the gate bites.** Route
|
||||
notation — `/name`, or any arrow form (`-> name`, `` -> `name` ``) — is checked
|
||||
unconditionally: an unresolved target there is a blocking ERROR. The prose form ("do not use
|
||||
for X, use `y` instead") is only a SUGGESTION by default, because a bare hyphenated word in a
|
||||
boundary clause is as likely to be a tool, a file format or an English compound as a route. It
|
||||
is promoted to a blocking ERROR only when a second target in the same sentence *does* resolve,
|
||||
which corroborates that the name was meant as a route. So a typo does **not** dangle equally
|
||||
either way — write the arrow when you want the target checked. Targets resolve against a universe built by walking up **from the SKILL.md
|
||||
itself**: the nearest ancestor holding
|
||||
`plugins/*/.apm/{skills,agents}` (or, failing that, the nearest ancestor holding `.git`) contributes
|
||||
every skill and agent under `<root>/plugins/*/`, plus the skill's own apm package and the packages
|
||||
that package declares in `apm.yml` under `dependencies.apm`. A sibling plugin in the same monorepo
|
||||
therefore resolves; a skill in an unrelated repo does not. A boundary clause naming a target
|
||||
outside that universe sends the router nowhere and fails the audit. Check the target exists before
|
||||
writing it — do not invent a plausible sibling name.
|
||||
outside that universe sends the router nowhere — a blocking failure in arrow or `/name` form, and
|
||||
in prose form a SUGGESTION nobody is forced to act on, which is the worse outcome because it ships.
|
||||
Check the target exists before writing it — do not invent a plausible sibling name.
|
||||
|
||||
That universe is the apm marketplace and stops there. A **host built-in is not a routing target**:
|
||||
`/compact`, `/clear` and `/init` are Claude Code slash commands with no counterpart in Copilot CLI
|
||||
@@ -68,6 +75,13 @@ checked by nothing and the gate emits a SUGGESTION naming both. Split instead of
|
||||
`Not <thing> -> first-skill. Not <other thing> -> second-skill.`, never
|
||||
`Not <thing> -> first-skill or second-skill`.
|
||||
|
||||
**Never let a hyphenated routing target wrap across lines in a folded `>` scalar.** YAML folding
|
||||
replaces the newline with a space, so `gitea-labels-` at the end of one line and `milestones` at
|
||||
the start of the next fold into `gitea-labels- milestones`. The gate then reads the target as
|
||||
`gitea-labels`, finds no such skill, and reports it dangling — this is what broke
|
||||
`gitea-labels-milestones`, and nothing in the source lines looks wrong. Reflow so the whole name
|
||||
sits on one line. The same applies to any backticked skill or agent name anywhere in a description.
|
||||
|
||||
**Length.** 250 characters SUGGESTION, 400 characters FAIL, counting the frontmatter value only
|
||||
with YAML folding resolved. The agentskills.io 1,024-character spec limit is unchanged and sits
|
||||
above both. The SUGGESTION tier is the one that moves the average; treat 250 as the target and 400
|
||||
|
||||
@@ -122,14 +122,19 @@ milestone), that's gitea-labels-milestones directly. Do not use for pull request
|
||||
or for local git branch/commit work (use gitea-branches or git-branches).
|
||||
```
|
||||
|
||||
After, 240 characters:
|
||||
After, the 290 characters that shipped:
|
||||
|
||||
```text
|
||||
Use when reading or writing Gitea issues — list, read, create, comment on, label, close, or
|
||||
search — even when the user does not say "Gitea". Not pull requests -> `gitea-prs`. Not label or
|
||||
milestone definitions -> `gitea-labels-milestones`.
|
||||
Use when reading or writing Gitea issues — "create an issue", "what issues are open", "close
|
||||
issue #N", "comment on issue #N", "search issues for X" — even when the user does not say
|
||||
"Gitea". Not pull requests -> `gitea-prs`. Not label or milestone definitions ->
|
||||
`gitea-labels-milestones`.
|
||||
```
|
||||
|
||||
The retrofit kept the quoted-phrasing register and dropped the verb list, not the other way round.
|
||||
Either register is admissible — what is banned is carrying both. Choose whichever routes better
|
||||
for the skill in hand; here the quoted user phrasings do, because they are how people actually ask.
|
||||
|
||||
What came out, and why:
|
||||
|
||||
| Removed | Why |
|
||||
@@ -139,7 +144,7 @@ What came out, and why:
|
||||
| `Composes gitea-labels-milestones for all label inference/resolution and milestone lookup` | A composition note. It changes no routing decision and belongs in `README.md`. |
|
||||
| The parenthetical `(create/edit/delete a label, create/close a milestone)` | Capability enumeration inside a boundary clause. The boundary needs the target, not its feature list. |
|
||||
| The `gitea-branches` / `git-branches` boundary | Dropped entirely. Neither was ever going to win an issue request, so the clause defended against nothing — an invented boundary costs characters and buys no routing accuracy. |
|
||||
| `Do not use for pull requests (use gitea-prs)` prose form | Kept, but rewritten as `Not pull requests -> \`gitea-prs\`.` The rewrite buys characters and one uniform shape for the router — not safety. Both forms are parsed **and** target-checked, so a typo in the prose form dangles exactly as an arrow typo does. |
|
||||
| `Do not use for pull requests (use gitea-prs)` prose form | Kept, but rewritten as `Not pull requests -> \`gitea-prs\`.` The rewrite buys characters, one uniform shape for the router, **and** a stricter check: an unresolved arrow target is a blocking ERROR, while an unresolved prose target is only a SUGGESTION unless another target in the same sentence resolves. The prose form does not dangle as loudly. |
|
||||
|
||||
What stayed: one trigger clause, one capability clause, the indirect trigger (genuinely warranted
|
||||
here — people say "create an issue", not "create a Gitea issue"), and the boundary clauses.
|
||||
@@ -153,7 +158,9 @@ a skill that was never going to compete, not a second real one.
|
||||
|
||||
**Never let a hyphenated routing target wrap across lines in a folded `>` scalar.** YAML folding
|
||||
replaces the newline with a space, so `gitea-labels-` at the end of one line and `milestones` at
|
||||
the start of the next fold into `gitea-labels- milestones`. `validate.sh` then reads the target as
|
||||
`gitea-labels`, finds no such skill, and reports a dangling boundary target — the live finding on
|
||||
`gitea-issues` today. Reflow the line so the whole name sits on one of them. The same applies to
|
||||
any backticked skill or agent name in a description.
|
||||
the start of the next fold into `gitea-labels- milestones`. The gate then reads the target as
|
||||
`gitea-labels`, finds no such skill, and reports a dangling boundary target. This is not
|
||||
hypothetical — it is how `gitea-labels-milestones` broke (issue #100). It is fixed: the corpus
|
||||
carries no dangling target today, and the repo's test suite pins that set as empty, so a
|
||||
reintroduction fails the suite rather than joining a backlog. Reflow the line so the whole name
|
||||
sits on one of them. The same applies to any backticked skill or agent name in a description.
|
||||
|
||||
Reference in New Issue
Block a user