Skip to content

feat(skills): enforce the three skill overrides — two of three had stopped naming their counterpart - #591

Merged
athvin merged 2 commits into
mainfrom
chore/skill-override-gate
Nov 5, 2026
Merged

athvin merged 2 commits into
mainfrom
chore/skill-override-gate

Conversation

@athvin

@athvin athvin commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Closes #586, with the decision made rather than deferred.

The call

No automated catalog eval. mono's own history is the argument against it: the
eval that originally caught the frontend-design shadowing cost $8.55 and
524s
per full run, and the response was to pin skills.yml at an old
actions/setup-python so ordinary PRs would not trip it. An expensive gate that
gets disabled is worth less than a cheap one that cannot rot.

So this builds the cheap half — and the cheap half found real bugs immediately.

What it found

CLAUDE.md claimed "in every case the house skill states the supersession in
its own body."
Two of the three did not:

House skill Reality
frontend-data-ui said "any generic data-visualization skill"; never wrote dataviz anywhere
frontend-design-system matched a naive search only via the unrelated filename docs/frontend-design.md
rust-conventions genuinely named rust-best-practice ✅

That second row is the interesting one. It is a false pass, and I watched the
gate emit it before tightening the assertion: searching the body for
frontend-design hit a document path, not the skill. Stripping the house
skill's own name — the obvious fix for the substring problem, since
frontend-design-system contains frontend-design — does nothing about it.
Requiring the name in backticks kills both: docs/frontend-design.md has no
backtick between design and .md, and frontend-design-system has none
between design and -system.

Why the naming matters at all

The override has two legs. Load order is structural — root skills load before
nested and plugin ones — and cannot regress from editing prose. But load order
alone does not tell a session which of two loaded skills to believe; the house
skill naming its counterpart is what does that, and that is a sentence someone
deletes during a refactor with nothing going red.

The gate

scripts/skills-check.sh overrides, four invariants per pair:

  1. O1 house skill exists at the root (where it wins the load-order race)
  2. O2 its body names the superseded skill, in backticks
  3. O3 no root skill collides with the overridden name — that is a collision, not an override, and load order stops deciding it
  4. O4 the script's registry and CLAUDE.md's table agree row-for-row, heading count word included

Verification

Every assertion mutation-tested, and each mutation confirmed applied before its
verdict was read
— a mutation that silently fails to apply is a false pass:

Mutation Result
remove backticked dataviz ✅ caught
body names it only via a doc path ✅ caught (this was the original false pass)
.claude/skills/dataviz/ added as a root skill ✅ caught
house skill moved out of the root ✅ caught
4th row added to the table ✅ caught (count mismatch)
table pairs dataviz with the wrong house skill, count unchanged ✅ caught
heading word left at "Three" when registry holds 4 ✅ caught

bash scripts/skills-check.sh all → exit 0, 19 skills, no drift. Both edited
skills are well under the 500-line body cap (181, 206).

Scope notes

  • No workflow change. The skills job already runs skills-check.sh all, and
    is ungated on detect, so it runs on skills-only PRs.
  • Job name deliberately unchanged (agent skills (lint + drift)) — a job name
    is its branch-protection context.
  • Not claimed: this does not prove a model picks the right skill at runtime.
    Only an eval can, and that is the thing being declined above.

🤖 Generated with Claude Code

…opped saying it

The three deliberate skill overrides rest on two things: root skills load
before nested and plugin ones, and the house skill SAYS which claim to
discard. The first is structural. The second is a sentence, and a sentence
is what rots — delete it while refactoring and the override degrades to a
coincidence of load order with nothing red anywhere.

`skills-check.sh overrides` asserts the half that can rot. Running it for
the first time found two of the three already broken:

  - `frontend-data-ui` said "any generic data-visualization skill" and never
    wrote `dataviz` at all.
  - `frontend-design-system` satisfied a naive substring search only through
    the unrelated filename `docs/frontend-design.md` — a document, not the
    skill. That false pass is why the assertion requires the name in
    backticks: backticks are what separate a skill name from a doc path and
    from a longer name that contains it (`frontend-design-system` contains
    `frontend-design`).

Four invariants per pair: the house skill is at the root, its body names the
superseded skill in backticks, no root skill collides with that name, and the
script's registry matches CLAUDE.md row for row including the heading's count
word. All six assertions were mutation-tested, each mutation confirmed applied
before its verdict was read.

This does NOT prove a model picks the right skill at runtime; only a catalog
eval does. Deliberately not buying one (#586): the eval in athvin/mono that
originally caught the `frontend-design` shadowing cost $8.55 and 524s a run,
and ended up pinned at an old action version and ignored rather than fixed. A
cheap check that cannot rot beats an expensive one that gets disabled.

CI needs no change — the `skills` job already runs `skills-check.sh all`, and
it is ungated so it runs on skills-only PRs. Its name is unchanged on purpose:
a job name is its branch-protection context.

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

`diff | head -40` exits 1 under `set -euo pipefail`, aborting mid-loop. Only
the first stale file was named, `fail=1` was never reached (the status came
from `set -e`, coincidentally also 1), and in `all` mode neither `run_lint`
nor `run_override_check` ran at all — on precisely the PRs that edit a skill.

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

athvin commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Follow-up commit: the new gate was skippable

While mutation-testing I found the gate I had just added could be skipped entirely, and fixed it in 5a73337f.

run_drift_check's reporting loop ends with diff … | head -40. diff exits 1 when files differ — always, there — and under set -euo pipefail that aborted the script mid-loop. Three consequences, all hidden behind an exit code that happened to still be 1:

  • only the first stale file was ever named, so fixing it and re-running surfaced the next;
  • fail=1 after the loop was never reached (the status came from set -e instead, coincidentally the same value);
  • in all mode, neither run_lint nor the new run_override_check ran at all.

That last one is the point. Drift is stale on precisely the PRs that edit a skill — which are precisely the PRs where the authoring rules and the override assertions matter. The gate went quiet exactly when it should speak.

Measured, by committing stale generated blocks into HEAD (regen rewrites the working tree, so the staleness has to be in the commit or the test proves nothing):

before 5a73337f after
exit code 1 1
stale files named (2 stale) 1 2
lint phase reached no yes
overrides phase reached no yes

The fix is || true on that pipeline, which is what the comment now explains at length so it does not get "tidied" back off.

This was pre-existing, not introduced here — but it would have made the new assertions decorative, so it belongs in this PR rather than a follow-up.

@athvin
athvin merged commit 8e25ea6 into main Nov 5, 2026
39 checks passed
@athvin
athvin deleted the chore/skill-override-gate branch November 5, 2026 16:56
athvin pushed a commit that referenced this pull request Nov 6, 2026
… the route is readable

The skill said which Status value the merge automation writes was unconfirmed,
because `ProjectV2Workflow` exposes only `name` and `enabled`, and left it at
"watch one linked merge". That was the right scope for what the board API
offers, and the wrong place to look: the evidence is on the issue, not the
board.

**The value is `Done`.** Two merged pull requests that closed an issue — #603
closing #589, #591 closing #586 — each left that issue's card on `Done`, with
the close landing about two seconds behind the merge.

*Which* automation wrote it cannot be separated, and that is now stated rather
than left open: a merged closing pull request also closes the issue, so "Pull
request merged" and "Item closed" both fire on the same event. The effect is
identical either way, so the ambiguity costs nothing operationally.

What does pay off is that the route is attributable after the fact.
`ClosedEvent.closer.__typename` on the issue distinguishes all three ways a card
reaches `Done`:

- `PullRequest` — a merged pull request referenced it
- `ProjectV2` — the board closed it via "Auto-close issue", i.e. someone set Done
- absent on a CLOSED issue — closed directly; "Item closed" still set Done

The `ProjectV2` row is independent corroboration of the existing
`Status` → `Done` → issue-closed bullet, which until now rested on one
observation plus timing. The board is on record as the actor.

Verified: ran the embedded snippet verbatim against #589 (`PullRequest`) and
#566 (`ProjectV2`), and checked both cards read `Done`. Body is 360 lines,
inside the 500 cap.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin added a commit that referenced this pull request Nov 6, 2026
…queue flagged the backlog, and Done is confirmed (#702)

* fix(skills): the board triage queue reported the backlog as a defect

Running the recipe against the live board is what exposed this. "Find cards the
automations left half-filled" selected `.priority == null or .estimate == null`,
and most of what came back was correctly-triaged work: cards carrying an
estimate and no priority.

That is not a half-filled card. The skill body records that there is no P3 and
that the lowest-ranked epics carry no priority at all rather than a notional P2
— the absence of a priority *is* the backlog, and it is load-bearing. So the
`.priority == null` term reported the convention as a defect, which is the same
mistake the `.size == null` term made before the audit fixed it: keying a queue
on a field whose emptiness is meaningful.

Two more classes were coming back for the same reason. Cards with `Status`
`Done` dominated the estimate-less rows — a shipped card is not triage work —
and the `[aw] … failed` gh-aw issues, which the body already notes are not
work, were in every result.

The queue is now `.estimate == null` among open, non-`[aw]` cards, and each
filter is documented with the class it removes, so a later edit does not add the
terms back. Against the live board it returns nothing, which is the correct
answer and matches the reconcile recipe directly above it.

Verified: ran both predicates against the board. The old one returns dozens of
rows, none of them actually half-filled; the new one returns none.

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

* fix(skills): a pull request never gets a card on this board, and the skill said it did

The body claimed "a new issue **or pull request** lands on the board by itself"
and that "a merged pull request moves its own card". Both are false here, and
the skill had flagged the second as the one worth confirming by watching a
single merge, because its failure is silent. The audit PR was that merge, and it
confirmed the opposite of what was written.

Verified, not inferred: every item on the board reads back as an `Issue`, and
four pull requests merged in one sitting — #682, #683, #684, #697 — produced no
card at all. So "Auto-add to project" is filtered to issues. The filter itself
is unreadable, since `ProjectV2Workflow` exposes only `name` and `enabled`, so
the bullet now carries the probe that establishes the shape instead of asserting
it.

What this changes for a session following the skill:

- `item-add` on a pull request URL is no longer "safe, just redundant" — it adds
  a card the conventions do not want. The Writing table row no longer offers a
  pull request as a thing to add.
- "Pull request merged" acts on the **linked issue's** card. A pull request that
  closes nothing moves nothing, so a merge-bus batch of such pull requests
  leaves the board untouched — the opposite of the "duplicated work" warning
  that was there before.
- The Status value the automation writes is still unconfirmed. That claim is now
  scoped to what the API will actually confirm, and says to watch one *linked*
  merge.

Verified: probed `content.type` across every item on the live board, and checked
each of the four merged pull requests for a card by number.

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

* fix(skills): two board eval scenarios asked about a card that cannot exist

Both scenarios turned on a pull request having a card. It does not, as the
companion commit establishes, so neither was scoreable: a session doing the
right thing would report "#488 is not on the board" and fail a must that
expected it to read a Status.

Scenario 2 ("Move its card to Done") now requires rejecting the premise and
establishing which issue the pull request closed, with separate expectations for
the closes-an-issue and closes-nothing cases. Scenario 7 is the one this audit
added, and it had the same defect — it is now explicitly a false-premise test,
where correcting the premise is the behaviour being measured rather than
reporting the absence.

Both gained a must-not against `item-add`, which is the plausible wrong move:
adding the pull request to the board does make the question answerable as asked,
and leaves a card the conventions do not want.

Scenarios 1 and 8 were re-checked against the live board rather than assumed —
the `[aw] … failed` cards scenario 1 expects are present, and the `In progress`
column scenario 8 probes is populated, so both still test what they claim.

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

* fix(skills): two routing tails offered a pull request a card it cannot have

`land-pr` and `ci-and-supply-chain` both ended "for the board card see
project-board". In `land-pr` especially — a skill whose whole subject is driving
one pull request — "the board card" reads as *this pull request's* card, and
there is no such thing: every item on that board is an issue.

Both now name what actually exists. `ci-and-supply-chain` had six characters of
headroom under the gated 1,024-char description cap, so "board card" became
"issue card" — a same-length substitution needing no other trimming, which is
what made this safe to do without reflowing a neighbour's description while
other sessions are editing the same line. `land-pr` had room to be explicit:
"the card of the issue it closes".

The routing is unchanged in both directions; this only fixes what the tail
promises on arrival.

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

* feat(skills): the board's Done-writing automations are confirmed, and the route is readable

The skill said which Status value the merge automation writes was unconfirmed,
because `ProjectV2Workflow` exposes only `name` and `enabled`, and left it at
"watch one linked merge". That was the right scope for what the board API
offers, and the wrong place to look: the evidence is on the issue, not the
board.

**The value is `Done`.** Two merged pull requests that closed an issue — #603
closing #589, #591 closing #586 — each left that issue's card on `Done`, with
the close landing about two seconds behind the merge.

*Which* automation wrote it cannot be separated, and that is now stated rather
than left open: a merged closing pull request also closes the issue, so "Pull
request merged" and "Item closed" both fire on the same event. The effect is
identical either way, so the ambiguity costs nothing operationally.

What does pay off is that the route is attributable after the fact.
`ClosedEvent.closer.__typename` on the issue distinguishes all three ways a card
reaches `Done`:

- `PullRequest` — a merged pull request referenced it
- `ProjectV2` — the board closed it via "Auto-close issue", i.e. someone set Done
- absent on a CLOSED issue — closed directly; "Item closed" still set Done

The `ProjectV2` row is independent corroboration of the existing
`Status` → `Done` → issue-closed bullet, which until now rested on one
observation plus timing. The board is on record as the actor.

Verified: ran the embedded snippet verbatim against #589 (`PullRequest`) and
#566 (`ProjectV2`), and checked both cards read `Done`. Body is 360 lines,
inside the 500 cap.

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

* fix(skills): eval 3 required the model to hedge a consequence the body calls verified

Scenario 3 was written while `Status` → `Done` closing the issue was still a
suspicion, and never revisited after it was observed. It required the model to
"say the blast radius is unconfirmed" and not to "claim with confidence either
that it *will* or *will not* close the issues" — against a body that has said
"Verified, not inferred" for as long as the bullet has existed.

So the scenario graded the right answer as a failure, and it passed only because
nobody ran it against the body.

It now requires stating the close as established, and splits the two questions
that were conflated: the *effect* is verified, while the workflow
*configuration* is still unreadable, which makes "which automation fired" the
open part rather than "whether issues close". A third must-not rejects citing
the unreadable config as grounds for not answering — it reads as caution while
withholding the fact that decides the question.

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.

Skills eval: no automated harness here, and the documented skill overrides are untested (from mono#272)

2 participants