Repository navigation
feat: slim skill context, add route --brief/--hook, and cut routing noise - #212
Merged
Merged
Conversation
…oise - Enrich sw-skill-router/index.json routes with active rule IDs and titles from rules/catalog.json - Add zero-dependency --brief and worktree-safe --hook (repeat suppression) modes to route.mjs with unit tests and Claude Code hook + skillOverrides docs - Tighten frontmatter descriptions across all 20 skills (11,863 -> 7,039 chars, -40.7%; max 1,005 -> 458 chars) while preserving load-before-editing triggers and Do NOT boundaries - Split sw-testing/references/test-shape-and-flags.md into test-assertions-and-shape.md and flags-stubs-and-reflection.md with narrow anchors, plus split oversized sw-php-foundation and sw-plugin-development files - Add route hint support and cap rendered trigger token length in SKILL.md route tables (97.41% routing mutation score) and document context: fork strictly for self-contained review skills Co-authored-by: Cursor <cursoragent@cursor.com>
BrocksiNet
marked this pull request as ready for review
November 25, 2026 14:19
Co-authored-by: Cursor <cursoragent@cursor.com>
BrocksiNet
added a commit
that referenced
this pull request
Nov 25, 2026
…212 Co-authored-by: Cursor <cursoragent@cursor.com>
BrocksiNet
added a commit
that referenced
this pull request
Nov 25, 2026
… and gate (#213) * feat(evals): record diagnostic reference-read telemetry in A/B runner and gate Co-authored-by: Cursor <cursoragent@cursor.com> * chore(router): re-render index.json with sw-mcp-development rule titles Co-authored-by: Cursor <cursoragent@cursor.com> * test(ab): use sw-assistant-style for zero-reference skill check after #212 Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Handoff 02 (Phases 3, 2, and 4 of 2026-10-slim-skill-context.md) to fix silent non-activation, shrink always-on listing tokens, and cut router noise without losing recall.
Recommended Wave 1 merge order: #2 (after Handoff 01).
Changes
route.mjs --briefand--hook(skills/sw-skill-router/scripts/route.mjs,tools/src/router-index.ts):skills/sw-skill-router/index.jsonroutes with active rule IDs and short titles fromrules/catalog.json.--briefoutput and worktree-safe--hookrepeat suppression (state stored undergit rev-parse --git-dir) with unit tests intools/test/skill-router.test.ts.skillOverrides("name-only", explicitly paired with the hook) indocs/installation.mdanduse-cases/.Do NOT use for ...boundaries; moved non-trigger prose into skill bodies/references.skills/sw-testing/references/test-shape-and-flags.mdintotest-assertions-and-shape.mdandflags-stubs-and-reflection.mdwith narrow anchors.sw-php-foundation(references/data-shapes-and-types.md) andsw-plugin-development(references/upgrade-6-8-and-rector.md).rules/catalog.json,skills/sw-extension-review/routes.json,evals/routing/, andevals/routing-replay/.context: forknote (tools/src/routes.ts):hintsupport and capped rendered trigger token length in generatedSKILL.mdroute tables (keeping full regexes inroutes.jsonandindex.json). Note:sw-extension-review/SKILL.mdis roughly flat (12,293 → 12,287bytes) as regex savings offset 3 newly split borrowed rows.context: forkstrictly for self-contained review skills (sw-extension-review,sw-pr-review).Metrics & Verification
replay-routes.ts --corpus evals/routing-replay: 76.9% recall (70/91), 84.7% mean recall/PR, 2.18 noisy refs/PR (down from 2.26), 3/3 hand labels selectednpm run mutate --prefix tools -- routing: 97.41% (threshold 95%)bash scripts/validate-skills.sh— OKbash scripts/run-activation-evals.sh— OK (dry)tools:tsc -p .,oxlint --type-aware --deny-warnings,oxfmt --check .,npm test,api-indexnpm test— OKbash evals/test-graders.sh— OKBefore marking ready
scripts/run-activation-evals.shwith a real agent) and a spot A/B (EVAL_TASKS=prepare-plugin-for-6-8,... bash scripts/eval-local.sh) to verify slimmer descriptions do not regress activations.Made with Cursor