[case+refine] inline the contract rubrics instead of reading them (v2.17.0)#1
Merged
Conversation
….17.0)
/case and /refine pointed at shared/contract-rubrics.md by relative path
(../../shared/...). That path can never resolve: Read resolves a relative
path against the user's working directory, not the SKILL.md's own, so in
any real project it landed outside the plugin and errored. The skills'
fallback ladder then sent the model to a Bash `find` across the plugin
cache — the permission prompt on every /case — or, worse, to authoring
from memory of the rubrics.
Everything below BEGIN SHARED in shared/contract-rubrics.md is now inlined
verbatim into a Contract Rubrics section at the end of both SKILL.md files.
All path-resolution prose and the find fallback are gone; there is no file
to locate, so nothing can mis-resolve and nothing prompts.
The rubrics are a hard gate — every invocation loads them — so a separate
file never saved context, it only bought a fragile path. ${CLAUDE_PLUGIN_ROOT}
would have fixed this on Claude Code alone, but Codex does not substitute it
and the skill body is shared verbatim across both hosts. Inlined text needs
no host contract at all.
That trade buys certainty at the price of two copies, so tests/rubrics-sync.sh
keeps them byte-identical (--write regenerates, no flag verifies) and CI runs
it on push and PR — the repo's first workflow. Both hosts install by copying
the repo, with no build step between a commit and a user, so drift on master
is drift that ships. Inlining also moved the failure mode from loud to silent:
stale rubrics look completely normal while the skills author against old bars.
Removes tests/rubric-read.sh, which existed solely to assert the model
achieved a non-error Read of the rubric file — a slow, probabilistic test of
the mechanism this deletes.
Also: story line in the Output Format template moves into a fenced block, the
same device the gherkin block uses; README documents install, verification,
and updating on both hosts with verified syntax.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Problem
/caseand/refinepointed atshared/contract-rubrics.mdby relative path (../../shared/...). That path can never resolve:Readresolves a relative path against the user's working directory, not the SKILL.md's own — so in any real project it landed outside the plugin and errored. The fallback ladder then sent the model to a Bashfindacross the plugin cache: that's the permission prompt on every/case, and on a bad run, authoring from memory of the rubrics.Change
The rubrics are now inlined verbatim into a
Contract Rubricssection at the end of both SKILL.md files. There is no file to locate, so nothing can mis-resolve and nothing prompts.${CLAUDE_PLUGIN_ROOT}would fix this on Claude Code alone — Codex does not substitute it, and the skill body is shared verbatim across both hosts. Inlined text needs no host contract at all.The trade is two copies.
tests/rubrics-sync.shkeeps them byte-identical (--writeregenerates, no flag verifies), and CI (the repo's first workflow) runs it on push + PR. Both hosts install by copying the repo — no build step between a commit and a user — so drift onmasteris drift that ships. Inlining also moved the failure mode from loud to silent: stale rubrics look normal while the skills author against old bars.Verification
/caseheadless (Sonnet 5, empty repo): 0 rubric-file lookups; tools used were only Bash + Write. Previously: failed Read →find→ prompt.As a…story line, fenced gherkin block, reasoned Verification mode, and/casecorrectly judged the test case too large and switched to epic mode.Removes
tests/rubric-read.sh— it existed solely to assert the model achieved a non-errorReadof that file, the mechanism this PR deletes.Also: the story line in the Output Format template moves into a fenced block (same device the gherkin block uses); README documents install, verification, and updating on both hosts with verified syntax.