Skip to content

test(planning): add the design codify hand-off eval case - #17629

Merged
kyle-sexton merged 3 commits into
mainfrom
test/17200-planning-codify-handoff-case
Nov 20, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
test/17200-planning-codify-handoff-case

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Refs: #17200

Summary

Adds the planning eval case that #17200 asks for under #17174: design-principle-hands-to-codify. It loads a corrections stand-in plugin, in the shape of the harness-config cases from PR 17459, and grades that /planning:design, as changed in PR 17544, hands a project-wide principle surfaced in design discussion to /corrections:codify and does not write it as a rules-file line.

The prompt is read-only: it loads the skill with the Skill tool, gives one principle a design round agreed on (domain code never imports the infrastructure package), and asks for one filled ROUTE: line. The prompt does not name codify or corrections. The skill text is unchanged; this PR adds the case, its stand-in plugin and a bump: none changelog fragment.

Fix

Graders, all deterministic:

  • route-hands-to-codify (both arms): the ROUTE: line names corrections:codify.
  • route-writes-no-rules-file (both arms): the ROUTE: line routes the principle into no rules file, CLAUDE.md, AGENTS.md or .claude/rules. A rules-file term the line rejects does not count: one whose preceding word, or the word before a short write phrase leading to it (add, write, put ... it, a, the ... to, into, in), is a negation (not, never, without, no, nor, cannot, a n't form, rather than, instead of).
  • no-codify-run (with-only): no Skill call runs codify.
  • no-unavailable-claim (both arms): the ROUTE: line does not call codify unavailable.

No llm grader: the one in PR 17459 was uncalibrated and read 4 of 9 on correct replies.

route-writes-no-rules-file changed after review (6f05918, 5dc6901). Review showed it failed a reply the case wants, one that names a rules file only to reject it ("hand it to /corrections:codify rather than adding it to CLAUDE.md"). The change corrects that false fail; it is not a loosening to get a pass. A line that routes the principle into a rules file still fails, including the before-change route and a line whose only negation is the principle's own "never" ("write that domain/ never imports infrastructure/ into AGENTS.md"). Samples: 6 new must-pass negated mentions (8 must-pass in all) and 10 new must-fail lines (13 in all): the bold before-change route, negations in an earlier clause or sentence, the quoted-principle and hyphenated "no-" shapes, and colon and dash breaks after a negation. Every earlier sample keeps its verdict. The commit message of 6f05918 says +8 must-fail; the count is 10.

The case description drops its leading "Medium." so it agrees with its hard tag and its "Hard because" reason, the difficulty record the evals design skill asks for (a hard or routine tag, and why a hard case is hard).

Before-text check, judged from the text and the samples (no before arm was run): before PR 17544, both sites said to suggest codifying the principle "in the project's own rules files", so a faithful reply's ROUTE: line fails route-writes-no-rules-file; that exact line, plain and bold, is in its must-fail samples. route-hands-to-codify should fail there too, but with the stand-in's codify in the skill listing an old-text reply could still name it, so route-writes-no-rules-file is the discriminator to read.

Verification

  • validate-cases.py over plugins/planning/evals: no FAIL and no WARN for the case. Its deterministic graders were checked offline against the case's samples/ under both V8 and JavaScriptCore.
  • scripts/check-affected.sh: 18 passed, 2 skipped (no changed shell or Python).
  • Smoke run on the graders now on the head (5dc6901), claude plugin eval on Claude Code 2.1.329, model sonnet (served as claude-sonnet-5-5), 3 runs a side, this case only. The validity gate read VALID: no denied tool call, and every with-arm run loaded the plugin and the stand-in. Its two warnings: no grader checks that the skill fired, and no judge was recorded (the case has no judge grader). The noise report reads "n too small to call" (one case).
    • With the plugin, score 1.00: route-hands-to-codify 3/3, route-writes-no-rules-file 3/3, no-codify-run 3/3, no-unavailable-claim 3/3.
    • Without the plugin, score 0.67: route-hands-to-codify 0/3, route-writes-no-rules-file 3/3, no-unavailable-claim 3/3. Each without-arm reply reports that planning:design could not be loaded and ends ROUTE: Unknown.
    • All three with-arm ROUTE: lines, read: each hands the principle to /corrections:codify "<principle>" to pick and prove the strongest enforcement mechanism, with the skill's own ladder proposal as the fallback if codify stops; one adds "such as an import-boundary check". None names a rules file.
    • Cost reported by the tool: 0.31 USD (list-price estimate).
    • The run used a copy of the plugin outside any git repository; the CLI refuses this repository's git worktree with "a git directory of the plugin registers more linked worktrees than can be screened".
  • route-writes-no-rules-file passes 3/3 in both arms here: no reply on main's text names a rules file, so this run does not exercise it. Its discrimination rests on the before-text reading and the samples above.
  • Asymmetry with PR 17628: its guardrail-hands-to-codify also fails a line that picks its own mechanism before naming codify. route-hands-to-codify here does not: the same lookahead would fail "instead of a CLAUDE.md line, hand it to /corrections:codify", the negated shape this PR's fix accepts. A mechanism other than a rules file named before codify (for example an architecture test) still passes it.
  • Not run: a before arm on the pre-PR-17544 text, and the opus alias.

Related

Remaining

#17200 stays open. This PR delivers the eval-case item of the #17174 entry. Not part of this PR: that entry's PR-body quote item (PR 17544's body paraphrases the old sentence), and the entry's run budget beyond this smoke run (before and after, both aliases). The other entries' host steps remain as the issue lists them.

🤖 Generated with Claude Code

Adds design-principle-hands-to-codify for issue 17200's host step under
issue 17174. The case loads a corrections stand-in and checks that
/planning:design hands a project-wide principle surfaced in discussion
to /corrections:codify, naming the call, and writes no rules-file line
for it, without running codify or calling it unavailable. The skill text
is unchanged.

Refs: #17200

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgf4hSWe3ViMaDA9Fp9
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 20, 2026 09:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T09:15:49.980143Z aabd27e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aabd27e340

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44709023885

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 2 inline finding(s) on aabd27e3400bfc4b22529185d3b69f5d178f74bf; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5dc690199267099404d243adb20dfdcd78dc695c: read 3 of 3 changed file(s); 2 finding(s), 0 as inline comments.

Security review: PR #17629, incremental since aabd27e (now 5dc6901)

This was an incremental, blocking-only review: this lane already reviewed an earlier head, so it reports only CRITICAL and IMPORTANT findings. I read every hunk of the 3 files in scope. None matches a trusted-path glob.

No new security issues. The push changes only eval test data under plugins/planning/evals/design-principle-hands-to-codify/:

  • case.yaml: the route-writes-no-rules-file grader's regex is rewritten so that a rules file named only to reject it is not counted as a write. This is a deterministic regex check that runs only in the offline eval harness. It does not touch credentials, a workflow, a lane or a merge gate.
  • prompt.md: the word "Medium." is dropped from the description front matter. That text is prose and grants nothing; the case's tools and plugins are unchanged.
  • samples/route-writes-no-rules-file.json: adds must-pass and must-fail sample answers for the grader. This is test data only.
  • Instruction surface: no standing instruction is deleted, narrowed or softened.
  • Trust controls: none touched (trusted-actor list, token broker, kill switch, merge holds).
  • PR context: no directives aimed at this lane.

Carried findings. The two manifest flags from the last review are restated below as already posted. Their file is outside this push's scope and its lines are unchanged. The replies on those threads give evidence and end "Left open for the owner; not resolved by this session". That states no decision on either flag, so neither thread is settled.

Spend: nothing new. The case still runs only when someone runs claude plugin eval, which uses prepaid API credit. This is not a hold.

critical-findings: 0

Manifest lines (2)

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 5dc690199267099404d243adb20dfdcd78dc695c: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #17629, incremental since aabd27e3

No blocking findings. This lane already reviewed an earlier head, so this review covers blocking findings only. I read every hunk of the 3 files changed since aabd27e3. Those files are case.yaml, prompt.md and samples/route-writes-no-rules-file.json under plugins/planning/evals/design-principle-hands-to-codify/.

What changed and what I checked:

  • route-writes-no-rules-file pattern (case.yaml). The grader still fails a reply when its ROUTE: line names a rules file, CLAUDE.md, AGENTS.md, .claude/rules or "own rules". It now lets that term through in two cases:

    • The first word before it, after skipping filler words (the write verbs, a, an, the, it, to, into, in, line, entry, rule), is a negation: not, never, without, no, nor, cannot or a word ending in n't.
    • The term follows rather than or instead of.

    I traced every new pass and fail sample through the pattern by hand, after undoing YAML's single-quote escaping ('' becomes '). Each sample lands on the side the file says:

    • rather than adding it to CLAUDE.md and instead of a .claude/rules entry pass because of their two-word phrase.
    • doesn't add a, without adding it to, writes no rules-file and does not write it into a rules file pass because of their negation.
    • The not a hook — add, don't wait, write, It is not optional. Add and not optional: add samples fail. So do the - and en-dash samples. In each, the word next to the filler words is not a negation (in the ASCII-dash sample that word is the - itself, since - counts as a word character).
    • A never inside the quoted principle, and the no inside no-infrastructure-imports, do not count as negations, so those fail samples fail as intended.
    • The bold **ROUTE:** fail sample matches through the leading [\s>*_-]*` prefix.

    I did not run the grader. The PR reports V8 and JavaScriptCore checks of the samples, which are the author's claim and unverified.

  • Samples JSON. Every added entry is valid JSON. On line 32, "why": ... }, puts the closing brace on the same line as its why field, which is valid.

  • prompt.md. It only drops the leading Medium. from the description, so the text no longer conflicts with the hard tag. No behavior changes.

Not re-raised: the two settled manifest name / manifest version threads on the corrections stub's plugin.json. Those lines are unchanged since resolution, and this push does not touch that file.

The PR says "Refs: #17200" and closes no issue, so there were no closing-issue criteria to check. The PR context, settled-threads and prior-findings files contained no embedded instructions to this lane.

Loosened checks: this run has no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail with no consumer entries. There is no decision-record line, so the citation requirement was not checked. This push loosens no check: the grader change narrows what it flags, and the new must-fail samples guard that. I did not read the criterion file, so I can't report its Loosened checks would be marked: line.

Spend: unchanged from the earlier head. The eval's runs draw on prepaid API credit. That is not a hold.

Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 2 commits November 20, 2026 04:53
…file mention

The grader failed any ROUTE line naming a rules file, including one that
names it only to reject it ("rather than adding it to CLAUDE.md"), a reply
the case wants. A rules-file term now counts only when the word before it,
or before the short write phrase leading to it (add/write/put ... it/a/the
... to/into/in), is not a negation (not, never, without, no, nor, cannot,
a n't form, rather than, instead of). Routing the principle into a rules
file still fails, including the before-change route and replies whose only
negation is the principle's own "never".

Samples: +6 must-pass negated mentions, +8 must-fail (bold before-change
route, quoted-principle and hyphenated "no" shapes, colon and dash breaks).
The description drops the leading "Medium." so it agrees with the hard tag
and its "Hard because" reason.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgf4hSWe3ViMaDA9Fp9
typos reads the stem updat as a misspelling; list update, updates and
updating instead. The pattern matches the same words.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgf4hSWe3ViMaDA9Fp9
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 20, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session hold (GitHub Work): this pull request waits on the owner. Its two open security-lane threads flag the corrections stand-in's manifest inside the eval case; each has an evidence reply, and resolving a security-lane thread is the owner's call. Nothing else is outstanding: CI Status was green and both review lanes read the head.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Hold lifted. The owner decided this on 2026-11-20 (question Q107, option A): the two security-lane manifest-flag threads on the eval-only corrections stand-in are resolved with no code change, and this pull request merges. The earlier session-hold comment no longer applies.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 20, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 002ccb7 Nov 20, 2026
98 of 99 checks passed
@kyle-sexton
kyle-sexton deleted the test/17200-planning-codify-handoff-case branch November 20, 2026 15:03
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Eval of case design-principle-hands-to-codify (#17174, skill change PR 17544), sonnet (served as claude-sonnet-5-5), 3 runs a side, Claude Code 2.1.329. Verdict: no loss, with a detection signal.

Grader BEFORE AFTER
route-hands-to-codify 0/3 3/3
route-writes-no-rules-file 0/3 3/3
no-codify-run 3/3 3/3
no-unavailable-claim 3/3 3/3
Case mean 0.50 1.00
  • Loss rule (mean drop of 0.15 or more, or a grader passing 2 or more fewer runs AFTER): no loss. Detection signal on both graders that separate the texts: route-hands-to-codify and route-writes-no-rules-file, each 3/3 AFTER against 0/3 BEFORE. Every BEFORE ROUTE: line says the skill "suggests codifying the principle immediately in the project's own rules files", the pre-change text. PR 17629 expected that an old-text reply might still name the stand-in codify. Two BEFORE replies did name /corrections:codify in the body, but each called it the replier's own pointer ("not something the design skill says", "I'm pointing to it from its description") or "one option", and none put it on the ROUTE: line. This run exercises route-writes-no-rules-file, which PR 17629's smoke run did not.
  • Cost (list-price estimate from the result JSON): BEFORE 0.292 USD. The recorded PR 17629 run reported 0.31 USD for both of its arms (with and without plugin).
  • Limits: the arms were not interleaved; AFTER is the with-arm of an earlier default-ablation launch on the same Claude Code version. This BEFORE launch granted Bash, which the case does not ask for; no run called it.
  • Not run: the opus alias (the budget runs opus only to confirm a sonnet loss).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant