Skip to content

chore(skills): the two audit follow-ups — a cap warning, and the gate becomes required - #704

Merged
athvin merged 2 commits into
mainfrom
fix/skills-audit-followups
Nov 6, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/skills-audit-followups

Conversation

@athvin

@athvin athvin commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

The two follow-ups flagged at the end of #686, done. One commit each. A third item surfaced in the sweep and is deliberately skipped — reasoning below.

1. Warn before a description hits the cap (6e2b764)

I flagged this as "entity-framework has 31 chars of headroom." Measuring all 23 showed that was the wrong framing:

headroom skill
1 frontend-data-ui
3 rust-conventions
4 aws-account-operations
5 er-engine-ops
6 ci-and-supply-chain
8 ducklake-lakehouse
… 16 of 23 within 60 chars of the 1024 cap

Those numbers moved while this PR was open: rebasing onto the five PRs that landed in the last hour took rust-conventions from 969 to 1021, aws-account-operations to 1020 and er-engine-ops to 1019. Three more descriptions crossed into single-digit headroom in under an hour, which is the argument for the warning better than anything I could write.

entity-framework's 25 is mid-pack. The cause is structural: closing a routing overlap appends "For X see y" to both descriptions, so a dozen unrelated audits converge on the same lines and the field arrives at its cap with no single author having spent it.

Trimming one description defers the cliff by a few characters and costs trigger vocabulary, so instead the gate now warns in (964, 1024] and names the remaining budget. warn() reports without setting fail — most skills are already in the band, so erroring would fail a clean tree.

Verified: observed firing on all 16 at exit 0; mutation-tested the hard cap, which still fails at 1040 with the warning correctly silent there. Three structural assertions added to skills-check-test.sh (warn() must not set fail; the headroom check must call warn; the cap must still call err) — two were mutation-tested and do fail when broken. The gate cannot be pointed at a fixture tree, which is why these are structural.

Complementary to #700, not a duplicate: that PR adds the authoring rule and a manual headroom one-liner; this makes the gate say it unprompted. Different files.

2. agent skills (lint + drift) is now required (ba11a41)

#686 was the case for it: a .claude-only diff where every required context skipped behind a successful detect, so the only job exercising the change was non-required — and then the push-to-main rust run was cancelled before creating a single job, so evidence had to be borrowed from an unrelated later commit's full run.

Preconditions verified, not assumed:

  • Can never report skipped — no if:, no needs:, asserted by parsing the workflow rather than reading it. A required context that skips blocks every PR forever.
  • Observed failing, per docs/frontend-testing.md's rule: chore(ci): observe the agent-skills drift gate failing (throwaway, do not merge) #699 (a throwaway a parallel session opened for exactly this) edited a projected description without regenerating, and the drift half concluded failure at 05:42:03Z. The doc now records the reproduction, so the precondition is auditable.
  • Blocks no open work — all four open PRs checked. The only one it blocks is chore(ci): observe the agent-skills drift gate failing (throwaway, do not merge) #699 itself, which is designed red and will be closed unmerged; the other three are blocked on cargo/e2e contexts that predate this.
  • Nothing hardcodes the required set. required-checks.md refuses to derive it, and merge-bus.yml asks GitHub for mergeStateStatus rather than enumerating contexts — deliberately, to avoid the drift this would otherwise cause.

Branch protection was changed via the API, built programmatically from the live config so no context could be dropped by transcription. strict, review count, admin enforcement and force-push settings are unchanged. Revert is a PUT of the 12-context payload.

The cargo job keeps its copy of the drift check — not redundant, but the backstop if anyone adds an if:/needs: here or renames the job out of the required set. Both comments now say which is primary.

One honest correction, left in the doc: rust.yml already claimed both halves had been observed failing while docs/agent-skills.md said they had not. I acted on the comment, and the independent observation landed in parallel — luck, not diligence. The doc now says to get the run, not the comment.

Skipped: the one real routing gap

ducklake-lakehouse names entity-framework ("for declaring a lake table or statement"); entity-framework does not point back for layout. Closing it needs ~55 chars against 25 available, so it would mean stripping trigger vocabulary — and ducklake-lakehouse is at 1016, so it cannot absorb anything either.

I checked whether the overlap is actually live before paying for it. Partition/layout vocabulary per description: entity-framework 0, ducklake-lakehouse 6, ducklake-performance 5. entity-framework cannot win a partitioning prompt, so the one-way edge is benign. Skipped rather than degrading a description to close an edge that costs nothing.

Sweep

  • make skills-check clean on merged main — generated blocks current, regen leaves no diff, so the 12 parallel merges left no staleness.
  • Routing: no broken or duplicated references across all 23. Of 9 one-way edges, 8 are legitimate broad→specific or negative-routing handoffs; the 9th is above.
  • No leftovers from fix(skills): entity-framework cited the wrong CI job and a rule that cannot fail #686's corrections elsewhere: nothing else attributes er-entity verify to the lint job, 19-column is gone, E007 appears only in the generated diagnostics block and the design-doc table it set-differences against, and V17 reads "warning" in both places.

What was run

make skills-check (green, 16 warnings), skills-check-test.sh (8/8), actionlint.sh (427 pins), detect-paths-test.sh (27/27), YAML parse of the skills job. No Rust, Terraform or frontend source is touched, so cargo test/terraform validate/next build have nothing to exercise here. No SKILL.md is modified, so no trigger behaviour changes — and skill selection cannot be verified from inside a running session anyway, which is why evals.md is hand-run in a fresh one.

🤖 Generated with Claude Code

bmoore813 and others added 2 commits November 6, 2026 01:10
Follow-up 1 from the entity-framework audit (#686). I flagged it as
"entity-framework has 31 chars of headroom"; measuring every skill showed that
was the wrong framing. **16 of 23 descriptions sit within 60 chars of the
1024-char cap, and `frontend-data-ui` has one.** entity-framework's 25 is
mid-pack.

The cause is structural rather than anyone's carelessness: closing a routing
overlap appends "For X see y" to BOTH descriptions, so a dozen unrelated audits
converge on the same lines. The cap is a cliff, and the first author to walk off
it is whoever happens to add the next tail — on a change that has nothing to do
with the descriptions already at 1023.

So the fix is not to trim one description, which only defers the cliff by a few
characters and costs trigger vocabulary. It is to make the approach visible
while there is still room to trim deliberately.

- `warn()`: reports without setting `fail`. A warning is right here and an error
  is not — most skills are already inside the band, so erroring would fail a
  clean tree.
- The headroom check fires in (964, 1024] and names the remaining budget.
- The lint summary carries the warning count, so it is not lost in the scroll.

Observed firing on all 16, exit 0; and mutation-tested the cap itself, which
still fails at 1040 with the warning correctly silent at that point.

Three structural assertions added to the regression suite, in the style of its
existing "no unbounded writer piped into grep -q" check, because the gate cannot
be pointed at a fixture tree: `warn()` must not set `fail`, the headroom check
must call `warn`, and the hard cap must still call `err`. Both the first two
were mutation-tested and fail when broken. The suite's header scopes it to
race-shaped bugs; this is not a race, but it is the same silent-breakage shape —
promoting the warning to an error turns a clean tree red on an unrelated change.

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

Follow-up 2 from the entity-framework audit (#686). That PR was a `.claude`-only
diff: every required context reported `skipped` behind a successful `detect`, so
the only job that exercised the change — `agent skills (lint + drift)` — was
non-required and could not block anything. Then the push-to-main `rust` run was
cancelled before creating a single job, so the authoritative check never ran
either. Evidence that the generated references were current had to be borrowed
from an unrelated later commit's full run.

`agent skills (lint + drift)` is now the 13th required context on `main`.

Preconditions verified rather than assumed:

- **It can never report `skipped`.** No `if:`, no `needs:` — asserted by parsing
  the workflow, not by reading it. A required context that skips or never
  reports blocks every PR forever, which is the trap `frontend.yml`'s missing
  `paths:` filter already exists to avoid.
- **It has been observed failing**, per `docs/frontend-testing.md`'s rule. A
  throwaway PR (#699, opened by a parallel session for exactly this) edited a
  projected `description` without regenerating and the drift half concluded
  `failure` at 05:42:03Z. Documented with the reproduction, so the precondition
  is auditable instead of asserted.
- **It blocks no open work.** All four open PRs were checked: the only one the
  new context blocks is #699 itself, which is designed to be red and will be
  closed unmerged. The other three are blocked on cargo and e2e contexts that
  predate this change.
- **No generated reference encodes the required set**, so nothing goes stale:
  `required-checks.md` states outright that branch protection is repository
  configuration and cannot be derived in-tree.

Branch protection was changed through the API, built programmatically from the
live config so no context could be dropped by transcription; `strict`, review
count, admin enforcement and force-push settings are unchanged. Revert is a PUT
of the 12-context payload.

The cargo job keeps its copy of the drift check. The old comment called the pair
redundant once this is required; it is not quite — it is the backstop if anyone
adds an `if:` or `needs:` here, or renames the job out of the required set. Both
comments now say which is primary.

One correction worth leaving in the doc: `rust.yml` already claimed both halves
had been observed failing while `docs/agent-skills.md` said they had not. I
acted on the comment and the independent observation landed in parallel, which
is luck rather than diligence — so the doc now says to get the run, not the
comment.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin force-pushed the fix/skills-audit-followups branch from ba11a41 to 6294007 Compare November 6, 2026 06:11
@athvin
athvin merged commit 5f0c3e6 into main Nov 6, 2026
39 checks passed
@athvin
athvin deleted the fix/skills-audit-followups branch November 6, 2026 06:28
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