Skip to content

fix(skills): the ducklake-lakehouse audit follow-ups — and the stale boundary they were hiding - #705

Merged
athvin merged 4 commits into
mainfrom
fix/ducklake-audit-followups
Nov 6, 2026
Merged

athvin merged 4 commits into
mainfrom
fix/ducklake-audit-followups

Conversation

@athvin

@athvin athvin commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Works the follow-ups left open at the end of the ducklake-lakehouse audit (#687). One of the three turned out to be based on a wrong premise and is skipped with reasons rather than actioned; the other two are done, and both grew once verified.

Item 1 — the security ↔ ducklake-lakehouse route (done, differently)

Flagged as "add the reciprocal routing tail". Done in the body, not the description: that field is at 1004 of its 1024 characters, and selection was never what was broken — security already triggers on "tenant-isolation". What was missing was onward navigation.

Chasing it uncovered a worse problem. Five sites described the isolation boundary as ER_LAKE_CATALOG/ER_LAKE_DATA_PATH, keyed on the org. Both halves are wrong:

  • open_org_lake resolves a three-part (catalog, catalog schema, data path) triple — src/schema.rs:73-75 reads ER_LAKE_CATALOG_SCHEMA too.
  • The isolated unit is a dataset. The location lives on dataset.env, and datasets of one org deliberately share a catalog, separated by DuckLake's METADATA_SCHEMA.

So the stated invariant ("no two rows in orgs.env may share the same ER_LAKE_CATALOG") was wrong table and would forbid the datasets design. For its actual purpose it is worse than wrong: a reviewer applying it checks two of three dimensions and passes a pair that is not separated.

Fixed in SKILL.md (bullet, index table, file-map row), evals.md, tenant-isolation.md, harness-map.md, attack-surface.md.

Item 2 — the merge bus (skipped; premise was wrong)

I flagged it as "failing, worth fixing". It is not failing. The log says:

main moved from 8a74db3b to f034785d while the batch validated; abandoning

That is the guard at merge-bus.yml:739-750, commented "THE INVARIANT THE WHOLE DESIGN REST ON" — it merged nothing and commented on the bus PR. Correct behaviour. And the lesson I thought needed capturing is already written, with a measured count: references/merge-bus.md:158-161 records "Seven separate candidates were hand-merged out from under an in-flight batch in one day". Nothing to change. The bus was starved by a dozen sessions hand-merging, which is rule 6 of land-pr, already documented.

Item 3 — land-pr's post-merge gap (done, and it was two bugs)

The pre-merge assertion asked the wrong question. Step 3 selected .status=="queued" or .status=="in_progress". A run held by a concurrency group reads pending, so the predicate reports nothing outstanding over an unstarted run. Now conclusion == null. Added as a false green in its own right — I hit exactly this during #687, printing "ALL CONCLUDED" over a pending run.

The main loop had no account of a cancelled rust/frontend run, only images. The mechanism is the opposite of the obvious reading: cancel-in-progress is ${{ github.event_name == 'pull_request' }}, so a push to main does not cancel the run in flight — but the group admits one waiting run, so each merge supersedes the previously pending one.

main rust runs in the burst jobs created
5 × cancelled 0
3 × success 19–22

So: don't debug it, don't re-run it, and establish green from a later head SHA or by running the gate against origin/main.

Also de-numbered "the six false greens" and "four things about that chain", which these additions falsified — matching how merge-bus.md already handles a growing list.

Consistency pass

One real find: frontend-bff/evals.md required routing to "the design-system skill", which does not exist (it is frontend-design-system), while the adjacent bullet named frontend-data-ui in full.

Three candidates checked and left alone as correct: observability/release are inside a fenced template for a fictional incident-response skill in skill-writer; motion.md resolves to a real sibling named in prose; and the three "DuckLake e2e job" mentions are a different, accurate claim about Postgres-gated tests (ducklake-e2e does set ER_TEST_PG_DSN).

Verification

  • make skills-check green (lint + overrides + drift). It caught a sibling-reference link in my first attempt at item 3; the cross-reference is now prose, per the standard.
  • Diff is markdown under .claude/ only (git diff --name-only | grep -v '^\.claude/.*\.md$' → empty), so cargo / terraform / next do not apply. rust.yml's detect skips every compile job for this shape.
  • The corrected predicate was unit-tested against the shape that broke, not just eyeballed: given 2 concluded runs + 1 in status pending, the old predicate reports 0 outstanding and the new one 1. A no-regression check confirms it catches queued/in_progress/waiting/pending and treats cancelled as done — which matters, since a status-based "not completed" test would hang forever on a cancelled run.
  • Loading security end to end surfaced three further stale sites, including one in my own new sentence (commit 4). Caveat worth knowing: the Skill tool loads from the primary checkout, not the worktree holding the edit, so invoking a skill mid-change verifies main's copy.

Still looks off, deliberately not touched

  • security's description cannot take another routing tail (1004/1024). Closing that properly means deciding what in two other sessions' recently-added tails gives way — an editorial call on their work, not mine to make unilaterally.
  • The tenant-isolation invariant still has no test. pg_dataset_isolation.rs pins control-plane row isolation; pg_lake_catalog_schema.rs pins DuckLake's re-attach refusal. Neither asserts cross-dataset uniqueness of the triple. The skill now says which tests do not close it, so the gap reads as a gap.
  • agent skills (lint + drift) is still not a required check, so this PR's green does not prove the generated references current; the push-to-main run does.

🤖 Generated with Claude Code

bmoore813 and others added 4 commits November 6, 2026 00:56
…riple, and the unit is a dataset

Closes the half of an earlier audit finding that was left open, and fixes the
staleness that finding was hiding.

**The route.** `ducklake-lakehouse` names `security` for tenant isolation as an
attack surface, but nothing pointed back — `ducklake-lakehouse` appeared zero
times anywhere in this skill. The reciprocal pointer goes in the **body**, not
the description: that field is at 1004 of its 1024 characters, and selection is
not what was broken (this skill already triggers on "tenant-isolation"). What
was missing is onward navigation from the bullet where a reviewer is standing.

**The staleness.** Three files described the boundary as
`ER_LAKE_CATALOG`/`ER_LAKE_DATA_PATH` — two keys, keyed on the org:

- `open_org_lake` resolves a **three**-part triple; `src/schema.rs:73-75` reads
  `ER_LAKE_CATALOG_SCHEMA` as well.
- The isolated unit is a **dataset**, not an org. The location lives on
  `dataset.env` (see the `dataset` entity's `env` column), and datasets of one
  org **deliberately share a catalog**, separated by DuckLake's
  `METADATA_SCHEMA`.

So the stated invariant — "no two rows in `orgs.env` may share the same
`ER_LAKE_CATALOG`" — was wrong twice over: wrong table, and it would forbid the
datasets design outright. Worse for its actual purpose, a reviewer applying it
checks two of the three dimensions and passes a pair that is not separated.

Restated against the triple and the dataset in `SKILL.md`, `tenant-isolation.md`,
`harness-map.md` and `attack-surface.md`.

**What was deliberately not changed:** the "invariant that still has no test
today" section stays. `pg_dataset_isolation.rs` pins control-plane *row*
isolation between datasets, and `pg_lake_catalog_schema.rs` pins DuckLake's
refusal to re-attach a schema under a different `DATA_PATH` — neither asserts
cross-dataset uniqueness of the triple, so the gap is real and now says which
tests do not close it.

Gate: `make skills-check`. No Rust changed.

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

Two defects found by following this skill through a real landing, both of which
make a poll report green over a run that has not started.

**The pre-merge assertion asked the wrong question.** Step 3 of the canonical
assertion selected `.status=="queued" or .status=="in_progress"`. GitHub has
more status values than those two — a run held by a concurrency group reads
**`pending`** — so the predicate reports nothing outstanding while a run sits
unstarted. Now selects `conclusion == null`, which is the only form that does
not depend on the status vocabulary being enumerated correctly. Added as a
false green in its own right, because the same mistake is easy to re-make in an
ad-hoc poll: measured here, a post-merge watch printed "ALL CONCLUDED" over a
`rust` run that was `pending` and was later cancelled without running a job.

**The main loop had no account of a cancelled `rust`/`frontend` run.** It
covered cancelled `images` runs only, so a cancelled backend run on your own
merge SHA looked like something to debug. The mechanism is worth stating
precisely because the obvious reading is wrong: `cancel-in-progress` is
`${{ github.event_name == 'pull_request' }}` in both workflows, so a push to
`main` does *not* cancel the run in flight — but the group admits one waiting
run, so each merge supersedes the previously **pending** one. Of 8 consecutive
`main` `rust` runs during a burst of skill PRs, 5 were cancelled with `jobs=0`
and the 3 survivors had 19–22.

So the skill now says: do not debug it, do not re-run it (tried twice;
`run_attempt` reached 2 and it was superseded again), and establish green from a
later head SHA that has the commit as an ancestor, or by running the gate
against `origin/main` in a throwaway worktree.

Also de-numbered two prose counts that these additions falsified — "the six
false greens" and "four things about that chain" — matching how
`ci-and-supply-chain/references/merge-bus.md` already handles a growing list.

Gate: `make skills-check`, which caught a sibling-reference link in the first
attempt at this change; the cross-reference is now prose, per the standard.
No Rust changed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`frontend-bff`'s eval 4 required the answer to "hand the question of what
replaces it to the design-system skill". There is no `design-system` skill; it
is `frontend-design-system` — and the very next bullet in the same list names
`frontend-data-ui` in full, so the truncation is an inconsistency rather than a
convention.

A must-list has to be checkable in a fresh session, and "routed to a skill that
is not in the tree" is not checkable.

Found by diffing every `see <name>` / `the <name> skill` reference across
`.claude/skills/`, `CLAUDE.md` and `docs/agent-skills.md` against the actual
skill directories. Three other candidates were checked and are all correct:
`observability` and `release` are inside a fenced template for a *fictional*
`incident-response` skill in `skill-writer/references/patterns.md`, so they are
illustrative; and `motion.md` in the vendored web-interface-guidelines resolves
to a real sibling named in prose, which is the form the standard prescribes.

Gate: `make skills-check`.

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

Completes the previous commit. Loading the skill end to end — rather than
grepping the files I had already decided to edit — surfaced three more sites
carrying the same wrong boundary, one of them in my own new sentence:

- `evals.md` **required** the model to state the stale invariant: a must-list
  item asking it to say `open_org_lake` resolves "a distinct catalog and data
  path per org". A hand-run would therefore have failed a correct answer and
  pushed the next author back toward the two-key framing — the same defect
  class as the eval fixed in the `ducklake-lakehouse` audit. It now asks for
  the triple, and adds a must that gets the arity right, since "they share a
  catalog" is not by itself a breach.
- The condensed "Finding → how to prove it" table still said "two orgs made to
  share a catalog".
- The bullet rewritten in the previous commit still said "two **orgs** ever
  resolve to the same triple".

Also relabels the file-map row from "lake-catalog invariant" to "the
lake-location triple", matching what that reference now says.

Worth recording how this was found, because it generalises: the Skill tool loads
from the **primary checkout**, not from the worktree holding the edit, so
invoking a skill you are mid-change on verifies `main`'s copy. That is a weak
verification for the diff but a useful one for the surrounding file — it is what
showed these sites.

Gate: `make skills-check`. Substitutions applied via a script that asserts a
match count of exactly 1 each, rather than a bare regex over the file.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit 9718f54 into main Nov 6, 2026
33 checks passed
athvin added a commit that referenced this pull request Nov 6, 2026
…s "", not null (#709)

#705 replaced land-pr's status-list poll with `select(.conclusion == null)`.
That predicate never matches: `gh run list` and `gh run view` both serialise an
unfinished run's conclusion as the **empty string**, so the new form reported
the same "nothing outstanding" over a `pending` run as the old one. It shipped
the defect it was written to remove.

Caught on the merge commit of #705 itself: `rust` sat `pending` while the
predicate counted 0 outstanding.

Measured against that live run:

    select(.conclusion == null)                 -> 0   (merged, broken)
    select(.status=="queued" or "in_progress")  -> 0   (what #705 replaced)
    select((.conclusion // "") == "")           -> 1   (correct)

**Why the test in #705 did not catch it.** Its unit test was a hand-written
fixture containing `"conclusion": null` — it asserted the assumption under test
instead of `gh`'s actual output, so it could only ever pass. A fixture built
from the real command would have failed immediately. The repo already has a
memory for this shape ("mutation-test the scenario too"): a check whose
precondition is authored to match the belief is decoration.

The verification here is the inverse: the predicate is extracted verbatim out
of the skill text and executed against a real SHA carrying a pending run.

`// ""` normalises null, empty and absent, so one form is right for both
subcommands.

Gate: `make skills-check`.

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
…nothing

#705 landed the right finding — a run held by a concurrency group reads
`pending`, so a watch enumerating `queued`/`in_progress` reports nothing
outstanding — and then prescribed the wrong fix: "poll `conclusion == null`".

`gh run list --json conclusion` reports an unresolved run as the **empty
string**, never `null`. Verified against four live unresolved runs, one of them
a `pending` rust run on `main`: `is_null: false, is_empty: true` for every one.
So `conclusion == null` matches nothing and reproduces the very bug #705 was
closing. jq's `//` does not rescue it either — it falls through on `null` and
`false` only, so `.conclusion // "pending"` leaves `""` intact.

Corrects that sentence and adds the section it points at, with the predicate
pair that does work, plus the disambiguation that cost the time: a `pending` run
has **zero jobs**, which looks like the two other zero-job states — a starved
run (`failure`, jobs present, `steps: []`) and a held bot run
(`action_required`). Three different causes, one symptom.

The intro's "six ways" also goes, having been wrong since #705 added a seventh.
The duplicate bullet this branch originally carried in `SKILL.md` is dropped
entirely: #705 got there first and its wording is better, naming both that a
re-run cannot fix it and the `origin/main` fallback.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin deleted the fix/ducklake-audit-followups branch November 6, 2026 06:19
athvin pushed a commit that referenced this pull request Nov 6, 2026
…there are seven

#705 added a seventh case and #709 added the warning not to reason from the
list's length, but the intro paragraph above both still said "the six ways the
obvious reading is wrong". Drops the number, which is the fix the standard
prescribes and the one that cannot go stale again.

This is all that survives of a larger change this branch originally carried.
#709 landed the same `conclusion` correction first and better — it normalises
with `(.conclusion // "") == ""` rather than testing two branches, and it also
fixed the main assertion block and `post-merge.md`, neither of which this branch
had touched. The zero-job disambiguation is dropped too: `action_required` and
the starved `steps: []` case are each already documented in their own sections,
and a third paragraph tying them together would be the duplication an audit
should flag rather than add.

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
… unseen (#711)

* docs: two design-doc claims the frontend never actually implemented

Found doing a consistency sweep after #688, which asserted the opposite of what
these two documents say. Both describe intent in the present tense, so a reader
hitting the skill and the design doc could not tell which was current.

**`entity-framework-design.md` has the control lane typed through
`openapi-fetch` and `schema.d.ts`.** It is not: nothing under `frontend/src`
imports `schema.d.ts`, `openapi-fetch` has no call sites, and the document
carries no `paths` — `schema.d.ts` opens with
`export type paths = Record<string, never>`, so there is nothing for a typed
client to type a route against. The types that reach components come from
`bindings/<Entity>.ts`. Marked as design-not-state at the load-bearing
paragraph rather than rewritten, because the design is still the intent; the
narrative passages later in the document are left alone deliberately.

**`batch-orchestration-design.md` cited a schema count twice**, as "12 → 13",
against a document that carried 14 before this branch — the stale-count failure
the entity-framework skill was itself fixed for. Both now name the condition
(`TaskInstance` declares `wire: [json]`, so a schema is required) instead of a
number that moves whenever anyone registers one.

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

* fix(api): the schema-coverage gate was a count, so the gap grew to 15 unseen

`every_generated_entity_schema_is_registered` asserted `schemas.len() == 14`
against `ApiDoc`'s own hand-written registration list. That cannot see an entity
arriving unregistered, because the count does not change — so the test's name
promised a gate that did not exist. #688 documented the defect; this fixes it.

The invariant was already declared and already derivable. `Wire::Json`'s own doc
comment said "the OpenAPI component schema is emitted", and `generate.wire` in
each `entity.yaml` says which entities cross the JSON wire. Deriving that set
from the catalog and subtracting the registered schemas shows **15 entities
declare `wire: [json]` with no component schema**: candidate_key,
column_profile, entity_link, ingest_batch, matching_model, metric_snapshot,
metric_snapshot_source, pair_label, profile_finding, profile_run,
record_quality, s3_ingest_cursor, tag, tagging, webhook_delivery. The drift the
count could not see had already happened 15 times.

So the replacement is a set difference pinned to that list:

- `every_json_wire_entity_has_a_schema_or_a_declared_gap` — a new `wire: [json]`
  entity fails until it is registered or named in `JSON_WIRE_WITHOUT_SCHEMA`,
  and a **stale** entry fails too, so the list cannot accumulate names and hide
  the next real gap.
- `no_schema_is_registered_for_an_entity_that_is_not_on_the_json_wire` — the
  other direction, which holds today and would otherwise rot silently.

Registering the 15 is deliberately **not** done here. Each becomes a documented
schema that `er-openapi-check` then tracks for breaking changes, which is a
public-API decision rather than a formality; the gate's job is to force the
decision at the point an entity is added, not to make it.

Two supporting changes, each the smallest version of itself. `er-entity-gen`'s
`casing` module becomes public so the test maps an entity name to its struct
name with the generator's own function rather than a second copy that could
disagree — the mapping is the one thing a hand-rolled duplicate would get wrong.
And `Wire::Json`'s doc comment now says it declares rather than emits, because
asserting the invariant was how the gap stayed invisible.

Both new tests guard their own derivation (a catalog that came back empty, or a
json-wire set that came back small, fails loudly) — a vacuous gate is the exact
failure being replaced.

The `api-contract` skill is updated in the same commit: it documented the old
test by name, and in two places promised that nothing would catch a forgotten
registration. Leaving that would recreate the drift #688 existed to remove.

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

* docs(skills): polling.md's intro still counted six false greens, and there are seven

#705 added a seventh case and #709 added the warning not to reason from the
list's length, but the intro paragraph above both still said "the six ways the
obvious reading is wrong". Drops the number, which is the fix the standard
prescribes and the one that cannot go stale again.

This is all that survives of a larger change this branch originally carried.
#709 landed the same `conclusion` correction first and better — it normalises
with `(.conclusion // "") == ""` rather than testing two branches, and it also
fixed the main assertion block and `post-merge.md`, neither of which this branch
had touched. The zero-job disambiguation is dropped too: `action_required` and
the starved `steps: []` case are each already documented in their own sections,
and a third paragraph tying them together would be the duplication an audit
should flag rather than add.

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