From e705370b1a72bb70d633c8c8da0a27ebadcfb276 Mon Sep 17 00:00:00 2001 From: Gianluca Carucci Date: Sun, 12 Jul 2026 20:18:05 +0200 Subject: [PATCH 1/4] [#313] feat: T7 trigger-eval harness + skills conformance gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - eval prompt sets (79 prompts, 12 families, all 35 skills) + runner README - baseline run committed: 76 PASS / 3 AMBIGUOUS (all assess-* overlap — motivates T3) - scripts/skills-conformance-check.js: frontmatter portability, name+description <=1024, pointer resolution, catalog counts (warning-only until #313/T1) - wired as skills:conformance in quality-gate + CI; 18 unit tests Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 2 + package.json | 3 +- packages/knowledge-hub/eval/README.md | 72 +++ .../eval/results/2026-07-12-baseline.md | 206 ++++++ .../knowledge-hub/eval/trigger-prompts.json | 594 ++++++++++++++++++ .../src/skills-conformance-check.test.ts | 199 ++++++ scripts/skills-conformance-check.js | 237 +++++++ 7 files changed, 1312 insertions(+), 1 deletion(-) create mode 100644 packages/knowledge-hub/eval/README.md create mode 100644 packages/knowledge-hub/eval/results/2026-07-12-baseline.md create mode 100644 packages/knowledge-hub/eval/trigger-prompts.json create mode 100644 packages/knowledge-hub/src/skills-conformance-check.test.ts create mode 100644 scripts/skills-conformance-check.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 812c3eeb..d8caca8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,8 @@ jobs: run: pnpm hygiene:check - name: Run docs-staleness check run: pnpm docs:staleness + - name: Run skills-conformance check + run: pnpm skills:conformance - name: Run duplication check run: pnpm dup:check - name: Install Playwright browsers diff --git a/package.json b/package.json index b215bc1d..4906245c 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,9 @@ "a11y:report:html": "turbo a11y:report:html", "hygiene:check": "node scripts/code-hygiene-check.js", "docs:staleness": "node scripts/docs-staleness-check.js", + "skills:conformance": "node scripts/skills-conformance-check.js", "dup:check": "jscpd apps packages", - "quality-gate": "turbo ts:check test lint && turbo prettier:fix mdlint:fix && ./tools/markdownlint-config/bin/markdownlint-fix.sh '*.md' && pnpm hygiene:check && pnpm docs:staleness && pnpm dup:check", + "quality-gate": "turbo ts:check test lint && turbo prettier:fix mdlint:fix && ./tools/markdownlint-config/bin/markdownlint-fix.sh '*.md' && pnpm hygiene:check && pnpm docs:staleness && pnpm skills:conformance && pnpm dup:check", "e2e": "pnpm --filter @pair/website e2e", "smoke-tests": "./scripts/smoke-tests/run-all.sh --cleanup" }, diff --git a/packages/knowledge-hub/eval/README.md b/packages/knowledge-hub/eval/README.md new file mode 100644 index 00000000..ce1ba2a7 --- /dev/null +++ b/packages/knowledge-hub/eval/README.md @@ -0,0 +1,72 @@ +# Skill Trigger Eval + +Trigger/effectiveness eval harness for the skill corpus (story #313, T7). It measures whether the +frontmatter `description` of each skill in `packages/knowledge-hub/dataset/.skills/**` routes an +LLM executor to the right skill — the experiment behind principle 9 ("Evaluation") of the +authoring standard (`apps/website/content/docs/contributing/writing-skills.mdx`): a description +rewrite is a hypothesis; this eval is the experiment. + +## Contents + +- `trigger-prompts.json` — should-trigger / should-not-trigger prompt sets, one entry per skill + family. Every skill has at least one should-trigger prompt; near-miss prompts name the sibling + skill they are a decoy for (`near_miss_for`) and the correct destination (`expected`, `none` + when no skill applies). +- `results/` — committed evidence, one file per run, named `YYYY-MM-DD-