Skip to content

feat(agents): a 15-skill library, generated references, and a gate that catches drift - #243

Merged
athvin merged 4 commits into
mainfrom
worktree-agent-skills-library
Oct 22, 2026
Merged

athvin merged 4 commits into
mainfrom
worktree-agent-skills-library

Conversation

@athvin

@athvin athvin commented Oct 22, 2026

Copy link
Copy Markdown
Owner

The repo had three skills (entity-framework, security, pentest) covering
schema governance and security. Everything else an engineer does here was
uncovered — and those gaps are exactly where no vendor skill exists:
Fellegi–Sunter matching, DuckLake from Rust, the er CLI, the
utoipa→TypeScript contract, the BFF boundary, EKS/Terraform, and the CI gate
set.

15 skills now, all flat in .claude/skills/. docs/agent-skills.md is the
standard; every skill ships an evals.md of 3+ hand-run scenarios.

Two defects fixed

.agents/skills/ducklake-performance/ was tracked but unreachable — Claude
Code only reads .claude/skills/, and symposium never mirrored it. It had been
invisible in every session since it was written. It was also stale: it
instructed running benchmarks/workload_report.py, which no longer exists.
Digging further, docs/profiling.md and docs/performance.md are both
banner-marked historical records of the retired Python pipeline — the whole
campaign harness is gone, not one script. The rewrite says so rather than
implying a campaign can be run, and keeps what is still true (span arithmetic,
the four-arm layout matrix, the storage rules).

README.md and docs/profiling.md both linked that skill by its .agents/
path; both now point at the new location.

Why everything is flat at the root

Nested rust/.claude/skills/ is impossible here: the directory is gitignored
in full and make symposium regenerates it, so a skill authored there is
untracked and eventually wiped. Nested skills also load lazily — only once
Claude touches a file in that subtree — and /add-dir needs Claude Code
v2.1.257+ (we are on 2.1.220). No paths: frontmatter either: it gates
automatic activation, so paths: frontend/** would stop "how does the BFF
boundary work?" from triggering with no file open. Negative routing in the
description does that job instead, and 15 of 15 now carry it.

No skill states a count

entity-framework claimed 25 entities against a tree holding 30. Three
dependency versions moved during the session that wrote these skills. So
counts, versions, job names and rule codes live in five GENERATED marker blocks
rebuilt from source:

Generated file Derived from
entity-framework/references/entities-index.md entities/*/entity.yaml
rust-conventions/references/crate-map.md the crate tree + rust/Cargo.toml
sql-analysis/references/diagnostics.md er-sql-check/src/analyze.rs vs the design doc
ci-and-supply-chain/references/required-checks.md the workflows + rust/deny.toml
frontend-testing/references/tiers-and-thresholds.md vitest.config.ts, package.json, frontend.yml

diagnostics.md derives the documented-but-unimplemented E0xx set
(E007/E008/E013) by set-differencing the design doc against the source,
so nobody maintains that list.

This paid off during review of this very branch: rebasing onto main picked
up two new entities (metric_snapshot from #236, record_quality from #237),
and the gate caught 30→32 / 131→137 with no prompting. The same rebase made
three prose claims about dependabot wrong (#240 landed the arrow/datafusion
major exclusions), which is why those are now described rather than negated.

The gate, and why its CI placement is not arbitrary

scripts/skills-check.sh has two modes, split by what their output derives
from — and the CI wiring follows that split:

  • regen derives from code, so it can only go stale when code changes,
    and a code change always reaches the full backend gate. It rides the existing
    lint job.
  • lint derives from the skills themselves, so it must run on a PR that
    touches nothing but .claude/** — which is precisely what rust.yml's
    detect job skips every compile job for. It therefore runs in a new
    skills job deliberately not gated on detect. It needs no toolchain,
    so running it unconditionally costs seconds.

Getting that backwards would produce a gate that is green exactly when it
matters.

The drift check diffs only the generated files, HEAD-relative: diffing the
whole tree would report in-progress prose as staleness, and being HEAD-relative
means a git add cannot launder a stale file past it.

make skills-check is a prerequisite of make check. The new skills job is
not proposed as a required check yet — per docs/frontend-testing.md,
promote only after it has been observed failing.

Verification

Full make check green: fmt, clippy (--all-targets -D warnings, zero
errors), er-entity verify, skills-check (15 skills), and
cargo test --workspace (157 binaries, 442 tests, 26 doc-test sections, 0
failures).

Each of the gate's ten rule classes was observed failing with a specific
message before being trusted: name/directory mismatch, over-long description,
two-level reference, broken link, missing evals.md, body >500 lines, missing
table of contents, entity-driven drift, zero-skills rename detection, and an
empty generator refusing to erase its target.

Two bugs found in the gate while doing that, both fixed: pipefail plus a
find over a non-existent directory killed the script silently (exit 1, no
output — hence the ERR trap), and backticks nested inside $( ) were
executed, actually invoking make frontend-e2e.

Correctness notes for review

Facts that are easy to get wrong and are now written down:

  • The analyser parses via DataFusion 52's bundled sqlparser 0.59
    (ff_analysis::sqlparser), not the workspace's 0.63 — whose only consumer is
    dedupe-core. Adding a DuckDB function stub is a two-repository change.
  • main has no object-store credential path — no httpfs, no
    CREATE SECRET, no ER_S3_*. An s3:// lake cannot be reached from Rust
    today, so the DuckLake skill documents filesystem lakes and flags the gap.
  • ER_LAKE_METADATA_SCHEMA sets the user-table schema, not DuckLake's
    METADATA_SCHEMA attach option. The naming actively misleads.
  • er-entity check and er-entity verify are the same code path.
  • Clusters run EKS Auto Mode with Pod Identity, never IRSA or Karpenter.

Per-tenant DuckLake tenancy is described as it ships on main, with a short
"in flight" note for the auto-provisioning branch — nothing here documents
unmerged code.

🤖 Generated with Claude Code

bmoore813 and others added 4 commits October 21, 2026 21:34
…at catches drift

The repo had three skills (entity-framework, security, pentest) covering schema
governance and security. Everything else an engineer does here was uncovered —
and those gaps are exactly where no vendor skill exists: Fellegi-Sunter
matching, DuckLake from Rust, the er CLI, the utoipa->TypeScript contract, the
BFF boundary, EKS/Terraform, and the CI gate set.

Eleven new skills, four refreshed, all flat in .claude/skills/ (rust/.claude is
gitignored and symposium regenerates it; nested skills also load only lazily).

Two defects fixed:
  - .agents/skills/ducklake-performance was tracked but unreachable — Claude
    Code only reads .claude/skills/, and symposium never mirrored it. It has
    been invisible in every session since it was written.
  - It was also stale: it instructed running benchmarks/workload_report.py,
    which no longer exists, and proposed Python-pushdown experiments in an
    all-Rust codebase. docs/profiling.md and docs/performance.md are themselves
    banner-marked historical records of the retired Python pipeline, so the
    rewrite says so rather than implying a campaign can be run.

The drift that motivated the gate: entity-framework claimed 25 entities against
a tree holding 30, security cited a statement count that had moved, and both
described er-entity check as narrower than verify when they are one code path.
So no skill states a count — counts live in five GENERATED blocks rebuilt from
entities/, the crate tree, analyze.rs, the workflows and the frontend config.
diagnostics.md derives the documented-but-unimplemented E0xx set by
set-differencing the design doc against the source, so nobody maintains it.

scripts/skills-check.sh splits by what its output derives from, and the CI
placement follows: regen derives from code (so it rides the existing lint job,
which any code change reaches), while lint derives from the skills themselves
and runs in a new job NOT gated on detect — because a .claude-only PR is
exactly what detect skips, and that is the PR that changes a skill.

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

Two findings from verifying the gate against all 15 skills.

entity-framework was the only description with no negative routing, and it now
overlaps the new sql-analysis skill on E0xx triggers — so a diagnostic question
could land on either. It now points at sql-analysis for the analyser's own
internals and at er-matching for golden-governed model SQL.

The link checker treated a `file.md#heading` target as a missing file, which
would have rejected a legitimate deep link into docs/entity-lint-rules.md. The
fragment is now stripped before the existence test while the error still reports
what the author wrote. Verified both directions: an anchor into a real file
passes, an anchor into a missing one still fails.

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

Rebasing onto main picked up #240, which excludes arrow and
datafusion-common/-expr from dependabot's major updates. Three places in
rust-conventions and ci-and-supply-chain said the opposite — verified true when
written, wrong one rebase later. They now describe the exclusions and carry the
compiler errors that justified them (arrow 60's two RecordBatch types,
DataFusion 55's duplicate arrow_schema in the graph).

The generated entity index moved on its own: #236 added metric_snapshot and
#237 added record_quality, so 30 -> 32 entities and 131 -> 137 statements. The
gate caught it during a routine rebase with no prompting, which is the whole
argument for not writing counts in prose — that number would otherwise have
been silently wrong from the moment this branch rebased.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The new `agent skills (lint)` job failed on its first push with exit 127 —
`bash: scripts/skills-check.sh: No such file or directory`. This workflow
defaults every `run` to `rust/` for the cargo jobs, and the script lives at
the repo root, so the step never reached a single assertion.

The step I added to the `lint` job already overrode it; this one did not. Both
now do, with a comment naming the failure so the next person adding a
root-relative step here does not repeat it.

Worth noting this class of bug is invisible locally: the script is
CWD-independent once it starts (it cds to its own repo root), so every local
run passed. Only CI's working-directory default could expose it — which is the
argument for observing a gate fail in CI before trusting it, and for not having
proposed it as a required check yet.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit 60fbec1 into main Oct 22, 2026
6 checks passed
@athvin
athvin deleted the worktree-agent-skills-library branch October 22, 2026 01:38
athvin added a commit that referenced this pull request Oct 22, 2026
main is red on the `skills-check` gate #243 introduced, and neither PR is at
fault on its own:

  #243  adds the gate, which regenerates the skill references and fails if a
        committed one is stale
  #242  bumps utoipa 5 -> 6 in rust/Cargo.toml

#242's CI ran against a base that had no such gate, and GitHub does not
require a branch to be up to date before merging, so it landed green and left
`crate-map.md` advertising `utoipa = "5"`. The two are only red in
combination.

This is precisely what the gate exists to catch — a dependency bump that
leaves the generated agent references describing a workspace that no longer
exists — so the fix is to regenerate and commit, not to loosen the check.

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