Skip to content

fix(skills): the description budget, and the routing clause an audit dropped for want of 31 characters - #713

Merged
athvin merged 3 commits into
mainfrom
fix/description-budget
Nov 6, 2026
Merged

athvin merged 3 commits into
mainfrom
fix/description-budget

Conversation

@athvin

@athvin athvin commented Nov 6, 2026

Copy link
Copy Markdown
Owner

The problem this fixes was mine

The sql-analysis audit (#697) found that entity-framework and sql-analysis
both carry the E0xx and oracle triggers while neither routing tail hands them
over, decided the clause was needed — and then dropped it, because
entity-framework had 31 characters of headroom and the clause needed 83. I
reported that as a judgement call for a human.

It was not one. docs/agent-skills.md:113 had already decided it:

When a description has no room for the clause, the fix is to shorten that
description rather than to drop the routing — an unclosed overlap costs a
mis-selected skill at runtime, which is the failure the whole field exists to
prevent.

So the clause is now in, and entity-framework has more headroom than it
started with.

Why the budget was spent in the first place

description is capped at 1,024 characters and is a shared append target:
closing an overlap means appending a clause to a neighbour's description, so
unrelated audits all spend the same line. Fifteen of twenty-three descriptions
had arrived within 34 characters of the cap, and six within nine, with no single
author having spent it. The cost is paid by whoever next needs to close an
overlap — and the observed outcome was that they drop the finding instead.

What changed

Thirteen descriptions trimmed, on the standard's own rule: cut the what
clause, never the trigger vocabulary. Every noun, command, filename and error
string a person would type is preserved. What went is explanation the body
already carries — "and why each is pinned", "rather than by account", "and why it
sits there", "the measurements a speed claim needs", "that needs no
HTML-injection sink". Lowest headroom among them went from 3 characters to 66.

Four skills deliberately untouched because they are in open pull requests
(#699, #702, #705). Retrofitting a trim onto a live branch would conflict with
work in flight, and a new gate threshold would have failed those PRs for
something their authors did not do. The generated table names all four rather
than leaving it to be rediscovered.

A generated budget table, which is the durable half. The standard's remedy
had been "read the headroom before adding a tail" plus a shell one-liner to run
— a step an author can skip, and skipping it is precisely how #697 ended up
choosing between a stated count and a correct routing graph.

The threshold is derived, not chosen: the median routing clause in the
collection (currently 59 characters). "Cannot take another clause" is therefore
measured against what a clause actually costs here, rather than a number someone
picked that would drift as the collection changes. Same shape as the
diagnostics and screens-coverage generators — a gap nobody maintains, so
nobody can forget it.

Verification

  • skills-check.sh all green on a clean tree.
  • Gate observed failing before being trusted, per docs/frontend-testing.md:
    appending six characters to one description makes check exit 1, because
    the budget block goes stale. That is the property that matters — an author who
    appends a routing clause cannot avoid regenerating, so the new headroom lands
    in their diff where review sees it.
  • make check run locally.

What this does not do

It does not add a hard reserve gate failing a description above, say, 944
characters. That would be the stronger instrument, and it is the obvious next
step once #699, #702 and #705 land — but today it would retroactively fail three
in-flight PRs for a rule their authors never saw, and the lint half of
skills-check runs only in the non-required skills job, so the enforcement
story would be weaker than it looks. The derived table makes the debt visible and
drift-checked now; the reserve can ratchet in afterwards against a collection
that already passes it.

🤖 Generated with Claude Code

@athvin
athvin force-pushed the fix/description-budget branch from 88dc7d5 to 31d2d03 Compare November 6, 2026 06:21
bmoore813 and others added 3 commits November 6, 2026 01:44
…dropped for want of 31 characters

`description` is capped at 1,024 characters and is a shared append target:
closing an overlap means appending a clause to a NEIGHBOUR's description, so
unrelated audits all spend the same line. Fifteen of twenty-three descriptions
had arrived within 34 characters of the cap with no single author having spent
it, and six within nine.

The cost was not hypothetical. The `sql-analysis` audit (#697) found that
`entity-framework` and `sql-analysis` both carry the E0xx and oracle triggers
while neither tail hands them over, decided the clause was needed, and then
DROPPED it because `entity-framework` had 31 characters free. That is the one
outcome the standard already forbids — docs/agent-skills.md:113 says to shorten
that description rather than drop the routing, because an unclosed overlap costs
a mis-selected skill at runtime, which is the failure the field exists to
prevent. The clause is now in, and `entity-framework` has more headroom than it
started with.

Thirteen descriptions trimmed on the standard's own rule: cut the **what**
clause, never the trigger vocabulary. Every noun, command, filename and error
string a person would type is preserved; what went is explanation the body
already carries — "and why each is pinned", "rather than by account", "and why
it sits there", "the measurements a speed claim needs". Four skills are left
alone because they are in open pull requests (#699, #702, #705); the generated
table names them rather than leaving it to be rediscovered.

The durable half is that generated table. The standard's remedy had been "read
the headroom before adding a tail" plus a shell one-liner, which is a step an
author can skip — and skipping it is exactly how #697 ended up choosing between
a count and a correct routing graph. The threshold is DERIVED rather than
chosen: the median routing clause in the collection, so "cannot take another
clause" is measured against what a clause actually costs here instead of a
number someone picked.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…not clauses

The clause-length regex was unanchored, so `[^;]*\bfor .*see [a-z0-9-]+`
matched from the start of each `;`-delimited segment and swallowed the what
clause with it. Of 77 "routing clauses" it found, fifteen were 698-868
characters — entire description prefixes.

The reported median was right anyway (59 vs 56 now), because a median ignores
outliers. That is luck, not a design, and the whole claim of this block is that
the threshold is DERIVED rather than picked — so an extraction that measures
the wrong thing undermines the one property worth having, even while printing a
plausible number.

Anchored on `for`, split on sentence as well as clause boundaries: 76 clauses,
28 to 162 characters, median 56. The splitting moved to awk because BSD and GNU
sed disagree about `\n` in a replacement, and this generator runs on both.

Found by checking what the extraction actually returned instead of trusting a
believable aggregate.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…t main

The block this branch introduces is derived from every skill's `description`,
so it goes stale whenever any of them changes — and three landed while the
branch was open. #706 lengthened `skill-audit` to 1017 characters, which drops
its headroom from 17 to 7 and moves it to the top of the table, and `land-pr`
shortened, which moves it past `skill-writer`.

Regenerated output only; no prose or threshold changed. Worth noting what the
refreshed numbers say, since the block exists to be read: `skill-audit` now has
7 characters free against a 56-character median routing clause, so it is the
next description that cannot take a tail without being trimmed first.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin force-pushed the fix/description-budget branch from 19e9f7a to 300f3c1 Compare November 6, 2026 06:46
@athvin
athvin merged commit a58143e into main Nov 6, 2026
36 checks passed
athvin added a commit that referenced this pull request Nov 6, 2026
…ve known about (#717)

`agent skills (lint + drift)` fails on `main`:

    FAIL generators: `description-budget` is wired into run_regen but absent
    from the generator table in docs/agent-skills.md

Neither pull request was wrong on its own, and neither could have caught this.
#713 wired a sixteenth generator, `description-budget`, and added its block to
this document. #703 added the gate asserting that every generator `run_regen`
splices has a row in the generator table — against a copy of the table that
predated #713. They were merged fifteen seconds apart, each green against a
base that did not contain the other, and the squash was textually clean because
the two edits land in different sections of the same file.

This is the `strict: false` hazard with the smallest possible diff: a gate whose
whole purpose is catching a hand-maintained table that disagrees with the code,
red because the table disagrees with code that arrived while the gate was in
flight. The merge bus exists to prove a combination green and was not used here.

Adds the missing row. Verified by running `make skills-check` against
`origin/main` directly rather than reading a merge conclusion — the required
check reports under the `rust` workflow, whose run for each intermediate merge
SHA in the burst was cancelled by the next merge.

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
athvin added a commit that referenced this pull request Nov 6, 2026
…ds (#725)

#713 wired the description-budget generator; #703 added the gate that
set-differences wired generators against the standard's table. Each was
green against a base without the other (main is strict:false), so the
combination fails `skills-check generators` on every PR — the skills job
runs unconditionally. One row closes it.

Co-authored-by: bmoore813 <[email protected]>
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.

2 participants