Repository navigation
fix(skills): add database-migration and dependency-audit vocabulary to two skill descriptions - #537
Conversation
…o two skill descriptions Two skills carry core body content whose vocabulary never reached their descriptions, so Tier-2 trigger routing cannot see it: - deprecation-and-migration: Expand/Contract database schema migrations (added in #345) - description now mentions database schema migration, renaming/dropping a column, expand/contract. - security-and-hardening: dependency-audit triage and supply-chain hygiene (hardened in #392, delegated to by code-review-and-quality) - description now mentions dependency audits, audit-finding triage, supply-chain risk. Adds four positive trigger cases so the suite can see these gaps. Measured: baseline 86% (72/84); cases-only 82% (4 hard misses, 'shares no vocabulary'); cases+fix 86% (76/88), 140 checks, 0 errors, no existing case loses rank 1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
nucliweb
left a comment
There was a problem hiding this comment.
Verified at runtime on 1483fc1, not just by reading the diff. Both description changes advertise capability the skills already have, which is exactly the Tier 2 false-negative case the evals README describes, so this looks correct to me.
Runtime check
| positive prompts | rank-1 | warnings | |
|---|---|---|---|
upstream/main |
84 | 86% (72/84) | 0 |
| this PR | 88 | 86% (76/88) | 0 |
All four new prompts rank their skill first, and the near-collision check (cosine > 0.5 between descriptions) stays clean, so the added vocabulary does not encroach on a neighbouring skill. Top-3 with scores:
Rename a database column without downtime
1. deprecation-and-migration 0.3291
2. code-simplification 0.0516
How do I drop a column safely in production?
1. deprecation-and-migration 0.1655
2. observability-and-instrum. 0.0965
Run a dependency audit and triage the findings
1. security-and-hardening 0.2950
2. observability-and-instrum. 0.0609
Is this new package safe to install? Check for typosquatting and supply chain risk
1. security-and-hardening 0.2125
2. constraint-driven-devel. 0.0679
Why this is a description fix and not scope creep
I checked whether the descriptions are claiming territory the skills do not actually cover. They are not:
deprecation-and-migration/SKILL.mdalready carries a full "Database Schema Migrations (Expand/Contract)" section (lines 164 to 191), including the phased add/backfill/dual-write/contract sequence, two rationalizations about renaming a column in place, and verification items on schema/code deploy ordering.security-and-hardening/SKILL.mdalready carries "Triaging Dependency Audit Results" (line 272) and "Supply-Chain Hygiene" (line 299), and line 306 already discusses typosquatted packages specifically.
So in both cases the guidance existed and the description simply did not carry the words a user would say to reach it.
One forward-looking note, not a change request for this PR
#492 (draft) proposes a database-and-schema-design skill whose summary lists expand/contract migrations among its contents while declaring "clear boundaries with deprecation-and-migration (system/API sunset)". That boundary does not match the current state of the tree: expand/contract is already taught in depth in deprecation-and-migration, and this PR only makes that discoverable.
I do not think that is this PR's problem to solve, and I would not hold this on it. Flagging it so whoever picks up #492 resolves the overlap deliberately rather than ending up with two descriptions competing for "rename a column without downtime". Worth a rank-1 re-measurement at that point.
The security-and-hardening half has no equivalent tension. #523 is about auditing untrusted SKILL.md files the agent is about to execute, which is orthogonal to auditing project dependencies.
Nice, tightly scoped change.
addyosmani
left a comment
There was a problem hiding this comment.
Good, and the right shape: extending deprecation-and-migration with database-migration vocabulary and security-and-hardening with dependency vocabulary, rather than adding new skills for either. Verified clean, evals hold. Approving.
Summary
Two skills carry substantial body content whose vocabulary never made it into their frontmatter
description, so realistic prompts for exactly that content cannot reach them in the Tier-2 trigger evals (same failure class as #351, and the same shape of fix as #508):deprecation-and-migration: the Database Schema Migrations (Expand/Contract) section (added in docs(deprecation): add database schema migration patterns (expand/contract) #345) is a core part of the skill — "never rename in place" is one of its own rationalization rebuttals — but the description says nothing about databases, schemas, or columns.security-and-hardening: the skill owns Triaging Dependency Audit Results and Supply-Chain Hygiene (hardened in docs(security): harden package-manager supply-chain guidance #392), andcode-review-and-qualityexplicitly delegates to it ("For triagingnpm auditfindings and supply-chain risk … follow thesecurity-and-hardeningskill — this section covers the upgrade workflow, that one covers the security verdict"), but the description mentions neither dependencies, audits, nor supply chain.Per the eval README ("a Tier-2 failure usually means fix the description"), this PR adds the missing vocabulary to both descriptions — keeping the what-then-"Use when…" format — and adds four positive trigger cases so the suite can see these gaps from now on.
Evidence
With the four trigger cases added and the descriptions unchanged,
node scripts/run-evals.jsreports all four as hard misses, not merely low-ranked:Without a case to catch it, "Rename a database column without downtime" currently ranks
code-simplification#1 and does not rankdeprecation-and-migrationat all.After the fix all four new prompts rank their skill #1. The +4 rank-1 gain is exactly the four new prompts — no pre-existing prompt lost rank 1 — and there are no new collision warnings.
scripts/validate-skills.jsalso passes (25 skills, 0 errors).One wording choice was deliberate: the deprecation clause says "migrating a database schema" (reusing the already-present migrat token) rather than "changing a database schema", because the latter shifted the IDF of chang and pushed an existing
incremental-implementationprompt ("Ship this change behind a feature flag in thin slices") from top-3 to #4 — the edit-coupling effect #434 describes. The final wording leaves every pre-existing check green.What changed
skills/deprecation-and-migration/SKILL.md— one added clause: "Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract)."skills/security-and-hardening/SKILL.md— one added clause: "Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package."evals/cases/deprecation-and-migration.json,evals/cases/security-and-hardening.json— the four positive trigger cases quoted above,top_k: 3.Relationship to open work
database-and-schema-designskill. If that lands, the schema clause and its two trigger cases should travel with the content; at current HEAD,deprecation-and-migrationowns this material and is unreachable by its vocabulary.code-review-and-quality; audit triage and the supply-chain verdict belong tosecurity-and-hardening.This contribution was researched and drafted with Claude Code (an AI coding agent); a human reviewed the findings and approved the submission.