Skip to content

[case+refine] inline the contract rubrics instead of reading them (v2.17.0)#1

Merged
codxse merged 1 commit into
masterfrom
inline-contract-rubrics
Jul 17, 2026
Merged

[case+refine] inline the contract rubrics instead of reading them (v2.17.0)#1
codxse merged 1 commit into
masterfrom
inline-contract-rubrics

Conversation

@codxse

@codxse codxse commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Problem

/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 fallback ladder then sent the model to a Bash find across 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 Rubrics section 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.sh keeps them byte-identical (--write regenerates, 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 on master is 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

  • /case headless (Sonnet 5, empty repo): 0 rubric-file lookups; tools used were only Bash + Write. Previously: failed Read → find → prompt.
  • Rubrics still honored: As a… story line, fenced gherkin block, reasoned Verification mode, and /case correctly judged the test case too large and switched to epic mode.
  • Drift detection proven red when the source is edited without regenerating.

Removes tests/rubric-read.sh — it existed solely to assert the model achieved a non-error Read of 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.

….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>
@codxse
codxse merged commit b591a10 into master Jul 17, 2026
1 check passed
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.

1 participant