Skip to content

test(instruction-placement): add the audit and realign codify hand-off eval cases - #17640

Merged
kyle-sexton merged 2 commits into
mainfrom
test/17200-instruction-placement-codify-handoff-case
Nov 20, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
test/17200-instruction-placement-codify-handoff-case

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Refs: #17200

Summary

Adds the two instruction-placement eval cases that #17200 asks for under #17163, one per changed skill: au-checkable-rule-hands-to-codify (audit) and ra-mechanism-finding-hands-to-codify (realign). Each loads a corrections stand-in plugin, in the shape of the harness-config cases from PR 17459, and grades that rung 2 of the routing rubric, as changed in PR 17212, hands the checkable rule to /corrections:codify, picks no mechanism itself, and keeps the prose.

Both scenarios use one CLAUDE.md section a machine could check: import ordering, with nothing checking it today and no safety rail involved.

  • Audit case. The prompt loads instruction-placement:audit, has it read the routing rubric, and asks for the finding.
  • Realign case. The prompt gives a findings artifact whose finding IP-002 is that section at rung 2. The operator accepts it ("Apply it"), and the prompt asks what realign does and reports.

Each case ends with four filled lines: RUNG: (audit) or STATUS: (realign), then ROUTE:, MECHANISM: and PROSE:. Neither prompt names codify or corrections.

Both skills have a pre-computed context line, so the cases grant Bash, as the suite's other audit and realign cases do. The evals plugin's validity gate fails a run whose skill did not load because its case granted no Bash. No run called Bash itself. The skill text is unchanged; this PR adds the cases, their stand-in plugins and a bump: none changelog fragment.

Fix

Graders, all deterministic, the same in both cases except the first:

  • rung-2 (audit) or status-blocked (realign), both arms: the section lands on rung 2, or realign records the accepted finding blocked. This is the no-loss check: both hold on the text before and after PR 17212.
  • route-hands-to-codify (both arms): the ROUTE: line names corrections:codify. This is the discriminator.
  • mechanism-none (both arms): the MECHANISM: line says none. This checks that the skill picks no mechanism itself.
  • prose-kept (both arms): the PROSE: line says kept.
  • 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.

Before-text check, judged by reading the text (no before arm was run). Before PR 17212:

  • Rubric rung 2 said "A compiler, linter, formatter, analyzer, or hook could enforce it deterministically → route to that mechanism".
  • apply-recipes.md said "The remedy is a linter, formatter, analyzer, or hook. Report the routing and leave the prose in place."
  • Neither named codify.

A faithful reply's ROUTE: line names a linter or formatter, so it fails route-hands-to-codify, and its MECHANISM: line names it, so it fails mechanism-none. Samples of both shapes are among the graders' must-fail samples. rung-2, status-blocked and prose-kept pass on both texts. The old realign gotcha already said a report-only rung is blocked, not applied.

Verification

  • validate-cases.py over plugins/instruction-placement/evals: no FAIL. The new cases' one WARN, that Bash needs an --allow-tools grant, is the one every Bash-granting case in the suite carries. The deterministic graders were checked offline against each case's samples/.
  • scripts/check-affected.sh: 18 passed, 2 skipped (no changed shell or Python).
  • Smoke runs on main's skill text, claude plugin eval on Claude Code 2.1.329, model sonnet, 3 runs a side, both cases in one launch, with --allow-tools Bash.
    • First launch: the validity gate read INVALID. One without-arm realign run (no plugin loaded) was denied a Glob on its own sandbox root while searching for the skill it lacked. Nothing from that launch is counted.
    • Second launch, the same command: the validity gate read VALID, with no denied tool call and no skill load failure, 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 cases have no judge grader).
    • au-checkable-rule-hands-to-codify with the plugin, score 1.00: every grader 3/3. Without the plugin, score 0.20: rung-2, route-hands-to-codify, mechanism-none and prose-kept 0/3, no-unavailable-claim 3/3.
    • ra-mechanism-finding-hands-to-codify with the plugin, score 1.00: every grader 3/3. Without the plugin, score 0.53: status-blocked 2/3, route-hands-to-codify 0/3, mechanism-none 1/3, prose-kept 2/3, no-unavailable-claim 3/3.
    • One with-arm reply per case, read in full. The audit reply walks gate 0, rung 1 and rung 2, stops at rung 2, and ends RUNG: 2, ROUTE: Hand to /corrections:codify "<the imports rule>" to choose and prove a mechanism ..., MECHANISM: none, PROSE: kept. The realign reply records IP-002 blocked, makes no edit, and ends ROUTE: Rung 2 (mechanically checkable): hand off to /corrections:codify "Imports: ...", MECHANISM: none, PROSE: kept.
    • Cost reported by the tool for the counted launch: 0.94 USD (list-price estimate). The discarded first launch reported 1.01 USD.
    • The runs used a copy of the plugin outside any git repository, the route the evals plugin documents for the CLI's linked-worktree refusal.
  • After the smoke run, the description: line of both prompt.md files changed: the leading "Medium." label was dropped, because check-vocabulary read "rung" beside "Medium" as the retired view-medium sense, and the label also contradicted the cases' hard tag. The prompt bodies, graders and samples are unchanged. No eval was re-run on this text. Afterwards, check-vocabulary.py passes, validate-cases.py reports no FAIL, and check-affected.sh reports 18 passed, 2 skipped.
  • Not run: a before arm on the pre-PR-17212 text, and the opus alias.

Related

Remaining

#17200 stays open. This PR delivers the eval-case item of the #17163 entry (one case per changed skill). Not part of this PR: 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

…f eval cases

Adds au-checkable-rule-hands-to-codify and
ra-mechanism-finding-hands-to-codify for issue 17200's host step under
issue 17163. Each loads a corrections stand-in and checks that a rung-2
rule (import ordering) is routed to a /corrections:codify call, with no
mechanism picked by the skill and the prose kept, without running codify
or calling it unavailable; realign also records the accepted finding
blocked. 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 15:12
@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-20T15:14:09.952424Z c8f10e8 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.

@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 44760981016

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: 4 inline finding(s) on c8f10e8c052c4cd804184662b31a674e7c25985c; 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 48d0ef38ef3421ae6396ed8b37aefcb03e2647f0: read 2 of 2 changed file(s); 4 finding(s), 0 as inline comments.

Security review: PR #17640 (incremental, c8f10e8 → 48d0ef3)

This review covers only what changed since c8f10e8. It posts blocking findings only, because this lane already reviewed an earlier head.

The push changes two files. Each change edits the front-matter description string of an eval case's prompt.md: it drops the leading "Medium." label and, in the realign case, capitalizes the first word.

  • plugins/instruction-placement/evals/au-checkable-rule-hands-to-codify/prompt.md
  • plugins/instruction-placement/evals/ra-mechanism-finding-hands-to-codify/prompt.md

The tags, plugins, runs and allowed_tools lines are unchanged, and no grader, skill, hook, manifest or trust control is touched. Neither file matches a trusted-path glob. I read both hunks in full.

This push adds no new security issues.

The four earlier manifest flags are on the stand-in corrections-stub/.claude-plugin/plugin.json files. Those files are unchanged since they were posted and those posts are still open, so they are carried below as already posted, at IMPORTANT. None is CRITICAL: they are eval-only fixtures with no marketplace entry, and they declare no hooks, servers, monitors or dependencies.

Manifest lines (4)

critical-findings: 0

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 48d0ef38ef3421ae6396ed8b37aefcb03e2647f0: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): no findings

This lane already reviewed an earlier head, so this review reports blocking findings only. It covers what changed since c8f10e8c. I read every hunk of both files in scope (2 of 2):

  • plugins/instruction-placement/evals/au-checkable-rule-hands-to-codify/prompt.md: the Medium. prefix is gone from the description front matter. The rest of the line is unchanged.
  • plugins/instruction-placement/evals/ra-mechanism-finding-hands-to-codify/prompt.md: the same change, and the description now starts with a capital ("Realign's") so it reads as a sentence.

Only the description text changed. The tags (which still include hard), plugins, runs and the prompt body are unchanged, so the graders and samples I reviewed at the earlier head still apply. I found no script under scripts/ that checks for a difficulty prefix in descriptions.

The PR context has no closing-issue section (it says Refs: #17200), so I checked no acceptance criteria. It has no embedded text aimed at this lane.

Spend. This change adds no new spend. The eval runs reported at the earlier head draw on prepaid API credit, which is not a hold.

Loosened checks would be marked: fail. That is the default, because the prompt had no loosened_check_verdict: or loosened_check_patterns: line; patterns: 0. The prompt also had no loosened_check_decision_record: line, so I did not check the citation requirement. This change loosens no check.

Verifier dropped 0 of 0 candidates.

…se descriptions

check-vocabulary read "rung" beside "Medium" as the retired view-medium
sense. The label also contradicted the cases' hard tag and their "Hard
because" sentence. Description text only; no grader or prompt body
changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 0928afa Nov 20, 2026
75 checks passed
@kyle-sexton
kyle-sexton deleted the test/17200-instruction-placement-codify-handoff-case branch November 20, 2026 16:35
@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 au-checkable-rule-hands-to-codify (#17200, skill change PR 17212), sonnet (served as claude-sonnet-5-5), 3 runs a side, Claude Code 2.1.329, --allow-tools Bash. Verdict: no loss, with a detection signal.

Grader BEFORE AFTER
rung-2 3/3 3/3
route-hands-to-codify 0/3 3/3
mechanism-none 2/3 3/3
prose-kept 3/3 3/3
no-codify-run 3/3 3/3
no-unavailable-claim 3/3 3/3
Case mean 0.78 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: route-hands-to-codify 3/3 AFTER against 0/3 BEFORE. Every BEFORE ROUTE: line routes the rule to "a linter/formatter import-ordering check in CI or pre-commit", the pre-change answer, and none names codify. Every AFTER ROUTE: line hands it to /corrections:codify "<the rule>", named and not run. mechanism-none separates the texts only weakly: one BEFORE reply wrote MECHANISM: A linter/formatter import-ordering rule ..., and the other two wrote none.
  • Cost (list-price estimate from the result JSON): BEFORE 0.300 USD, AFTER 0.304 USD.
  • Limits: the arms were not interleaved. Bash was granted but no run called it.
  • Not run: the opus alias (the budget runs opus only to confirm a sonnet loss).

@kyle-sexton

Copy link
Copy Markdown
Member Author

Eval of case ra-mechanism-finding-hands-to-codify (#17163, skill change PR 17212), sonnet (served as claude-sonnet-5-5), 3 runs a side, Claude Code 2.1.329, --allow-tools Bash. Verdict: no loss, with a detection signal.

Grader BEFORE AFTER
status-blocked 3/3 3/3
route-hands-to-codify 0/3 3/3
mechanism-none 3/3 3/3
prose-kept 3/3 3/3
no-codify-run 3/3 3/3
no-unavailable-claim 3/3 2/3
Case mean 0.83 0.94
  • Loss rule (mean drop of 0.15 or more, or a grader passing 2 or more fewer runs AFTER): no loss. The mean rose. no-unavailable-claim passed one fewer run, which is under the threshold of 2.
  • Detection signal: route-hands-to-codify 3/3 AFTER against 0/3 BEFORE. Every BEFORE ROUTE: line routes the finding to "an import-order linter/formatter" as report-only work outside realign. One BEFORE reply named corrections:codify in its body, but not on the ROUTE: line. Every AFTER ROUTE: line hands the rule to /corrections:codify "<the Imports rule>", named and not invoked. mechanism-none does not separate the texts: all three BEFORE replies also wrote MECHANISM: none.
  • The no-unavailable-claim miss is a grader false fail, judged by reading the reply. The failing AFTER line restates the rubric's fallback as a condition: "hand the rule to /corrections:codify ... (named, not invoked); if it isn't available, propose the strongest mechanism, marked unproven". The same reply says codify "is available" in the session. The grader matches "isn't available" within 80 characters after the codify name and does not exclude an "if" condition. The grader was not changed.
  • Cost (list-price estimate from the result JSON): BEFORE 0.367 USD, AFTER 0.380 USD.
  • Limits: the arms were not interleaved. Bash was granted but 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