Skip to content

chore(ci): observe the agent-skills drift gate failing (throwaway, do not merge) - #699

Closed
athvin wants to merge 1 commit into
mainfrom
chore/observe-skills-drift-gate
Closed

athvin wants to merge 1 commit into
mainfrom
chore/observe-skills-drift-gate

Conversation

@athvin

@athvin athvin commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Throwaway. Opened solely to observe agent skills (lint + drift) fail in CI before promoting it to a required status check, per docs/frontend-testing.md's rule that a gate must be seen failing before it is trusted.

The single commit edits a projected description clause without regenerating — the hole docs/agent-skills.md describes, on a .claude-only PR where the cargo lint job does not run. Will be closed unmerged.

A one-line edit to a projected description clause, committed without running
regen, which is exactly the hole docs/agent-skills.md describes: the inventory
tables derive from SKILL.md descriptions, so a .claude-only PR makes them stale
on the PR where the cargo lint job does not run.

Opened only to observe 'agent skills (lint + drift)' fail in CI before it is
promoted to a required check. To be closed unmerged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin

athvin commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Observation complete and recorded in docs/agent-skills.md via #706: this PR's agent skills (lint + drift) job failed while all twelve other required contexts reported skipped. Closing unmerged; the run record is the evidence.

@athvin athvin closed this Nov 6, 2026
@athvin
athvin deleted the chore/observe-skills-drift-gate branch November 6, 2026 06:06
athvin pushed a commit that referenced this pull request Nov 6, 2026
…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 pushed a commit that referenced this pull request Nov 6, 2026
`agent skills (lint + drift)` became a required status check on `main` while
this was being written, which made three passages in the standard false in the
direction that matters — they tell a reader to distrust a green that is now
trustworthy:

- the drift check's duplication in the cargo `lint` job was justified by
  "`skills` is not a required status check, so on its own it cannot block a
  merge". The duplication is now belt-and-braces, and the sentence said the
  opposite of the current configuration. Kept the duplication, replaced the
  reason — it costs seconds and removing it buys nothing.
- "**Do not read a `.claude`-only PR's green as proof the generated references
  are current** until it is promoted" — it is promoted, so that green now IS the
  proof. Being ungated it reports on every PR; being required it can refuse one.
- "not yet a required status check. Per docs/frontend-testing.md's rule, promote
  it only after it has been observed failing."

That last rule was honoured, and the observation is now recorded rather than
dropped, because it demonstrates the stake: on throwaway PR #699 — a
`.claude`-only diff with a one-line description edit and no regen — the skills
job FAILED while every other required context reported `skipped`, since `detect`
correctly skipped every compile job and protection accepts `skipped` as
satisfied. The only job that noticed was the only job that could not block.

Also adds the `post-merge-surface` row to the generator table, which a peer's
generator had been left out of. Not a count — the table is the hand-written
index of which generator owns which target, and the script had fourteen
generators to its thirteen rows.

Deliberately NOT changed: `ci-and-supply-chain/SKILL.md` says the
`workflow pins (S9)` job is "not yet a required check". Probed the protection
API — it is still not required, so that one is accurate.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin pushed a commit that referenced this pull request Nov 6, 2026
…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]>
athvin added a commit that referenced this pull request Nov 6, 2026
… becomes required (#704)

* feat(skills): warn before a description hits the cap, not after

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]>

* chore(ci): make the agent-skills gate a required check, and record the 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]>

---------

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
athvin pushed a commit that referenced this pull request Nov 6, 2026
`agent skills (lint + drift)` became a required status check on `main` while
this was being written, which made three passages in the standard false in the
direction that matters — they tell a reader to distrust a green that is now
trustworthy:

- the drift check's duplication in the cargo `lint` job was justified by
  "`skills` is not a required status check, so on its own it cannot block a
  merge". The duplication is now belt-and-braces, and the sentence said the
  opposite of the current configuration. Kept the duplication, replaced the
  reason — it costs seconds and removing it buys nothing.
- "**Do not read a `.claude`-only PR's green as proof the generated references
  are current** until it is promoted" — it is promoted, so that green now IS the
  proof. Being ungated it reports on every PR; being required it can refuse one.
- "not yet a required status check. Per docs/frontend-testing.md's rule, promote
  it only after it has been observed failing."

That last rule was honoured, and the observation is now recorded rather than
dropped, because it demonstrates the stake: on throwaway PR #699 — a
`.claude`-only diff with a one-line description edit and no regen — the skills
job FAILED while every other required context reported `skipped`, since `detect`
correctly skipped every compile job and protection accepts `skipped` as
satisfied. The only job that noticed was the only job that could not block.

Also adds the `post-merge-surface` row to the generator table, which a peer's
generator had been left out of. Not a count — the table is the hand-written
index of which generator owns which target, and the script had fourteen
generators to its thirteen rows.

Deliberately NOT changed: `ci-and-supply-chain/SKILL.md` says the
`workflow pins (S9)` job is "not yet a required check". Probed the protection
API — it is still not required, so that one is accurate.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin added a commit that referenced this pull request Nov 6, 2026
…s calling the gate advisory (#706)

* feat(skills): skill-audit gains the drift lens, where ten of twelve findings were

The first campaign over this collection audited twelve skills and landed a fix
on each. Ten of those fixes corrected a claim the tree had outgrown — a deleted
client, a renamed CI job, a signature that gained an argument, a section number,
an absence that had filled in. Reproducible from
`git log --oneline d72cda5~1..0862251`.

None of the six lenses asked for that. Auditors filed the findings under
`counts`, because the remedy matched — derive it — which left the lens doing
someone else's job and the dominant failure class unnamed. Worse, the protocol
framed opening a source file as a bounded *exception*, and listed "inventing a
finding from a filename" as an anti-pattern, so the skill mildly discouraged the
one pass that produced most of its value.

So `drift` is now a lens of its own:

- It is the only lens that opens the source, and the only one whose findings no
  gate can catch — nothing in `scripts/skills-check.sh` reads a skill's prose
  against the code it describes.
- It carries a table of the six shapes that rot, each with the probe it wants.
- An **absence** is called out as the dangerous shape: "the only X", "there is no
  Y". It reads as a convention rather than as inventory, so nobody re-checks it,
  and a skill stating one is telling a session not to look.
- The subclass worth the most is a "not yet"/"cannot" claim whose blocker has
  since been removed, because it makes a session decline work that is routine.
- A probe is mandatory. "Never reports a drift claim it did not probe" is now in
  the never-does list, the verification checklist asks whether the probe actually
  ran this session, and the challenger is told to re-run it rather than trust the
  draft's source citation. A confident false drift finding sends the author to
  correct a sentence that was right, which is worse than silence.

The `counts` boundary is stated explicitly, because the two overlap on every
number: `counts` asks where the fact lives (remedy: derive it) and fires even
when the number is correct; `drift` asks whether it is true today (remedy:
correct it, then consider deriving). Both wrong and un-derived is ONE card, filed
under `drift`, generator named in the Fix.

Two eval scenarios, one each way: 7 must probe a planted "there is no `<table>`"
claim and report it HIGH with a real source citation, and 8 must WITHHOLD on a
deliberate superseded-pattern warning, where the grep that appears to falsify the
claim is the evidence the warning is needed.

The description trades a wordier routing clause for "whether a claim about the
tree has gone stale", so the trigger vocabulary carries it. Both clauses the
inventory generators project were left byte-identical, so the generated tables
do not move.

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

* docs(skills): the standard described a gate that is now required

`agent skills (lint + drift)` became a required status check on `main` while
this was being written, which made three passages in the standard false in the
direction that matters — they tell a reader to distrust a green that is now
trustworthy:

- the drift check's duplication in the cargo `lint` job was justified by
  "`skills` is not a required status check, so on its own it cannot block a
  merge". The duplication is now belt-and-braces, and the sentence said the
  opposite of the current configuration. Kept the duplication, replaced the
  reason — it costs seconds and removing it buys nothing.
- "**Do not read a `.claude`-only PR's green as proof the generated references
  are current** until it is promoted" — it is promoted, so that green now IS the
  proof. Being ungated it reports on every PR; being required it can refuse one.
- "not yet a required status check. Per docs/frontend-testing.md's rule, promote
  it only after it has been observed failing."

That last rule was honoured, and the observation is now recorded rather than
dropped, because it demonstrates the stake: on throwaway PR #699 — a
`.claude`-only diff with a one-line description edit and no regen — the skills
job FAILED while every other required context reported `skipped`, since `detect`
correctly skipped every compile job and protection accepts `skipped` as
satisfied. The only job that noticed was the only job that could not block.

Also adds the `post-merge-surface` row to the generator table, which a peer's
generator had been left out of. Not a count — the table is the hand-written
index of which generator owns which target, and the script had fourteen
generators to its thirteen rows.

Deliberately NOT changed: `ci-and-supply-chain/SKILL.md` says the
`workflow pins (S9)` job is "not yet a required check". Probed the protection
API — it is still not required, so that one is accurate.

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

---------

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
athvin pushed a commit that referenced this pull request Nov 6, 2026
…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]>
athvin added a commit that referenced this pull request Nov 6, 2026
…dropped for want of 31 characters (#713)

* fix(skills): the description budget, and the routing clause an audit 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]>

* fix(skills): the derived threshold was measuring whole descriptions, 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]>

* chore(skills): regenerate the description-budget block against current 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]>

---------

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[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