Skip to content

test(docs-hygiene): add the write-for-agents codify hand-off eval case - #17635

Merged
kyle-sexton merged 1 commit into
mainfrom
test/17200-docs-hygiene-codify-handoff-case
Nov 20, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
test/17200-docs-hygiene-codify-handoff-case

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #17200

Summary

Adds the docs-hygiene eval case that #17200 asks for under #17159: wfa-every-time-rule-hands-to-codify. It loads a corrections stand-in plugin, in the shape of the harness-config cases from PR 17459, and grades that /docs-hygiene:write-for-agents, as changed in PR 17417, writes an every-time rule in plain words and hands it to /corrections:codify, with no mechanism picked by the skill.

The scenario is a team rule drafted in all caps ("IMPORTANT: handlers MUST ALWAYS return errors through respondError() ...") that has to hold every time and that nothing checks today. The prompt is read-only: it loads the skill with the Skill tool and asks for three filled lines, LINE:, ENFORCE: and MECHANISM:. It 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:

  • line-plain-words (both arms): the LINE: line states the respondError rule with no all-caps marker word (IMPORTANT, MUST, NEVER, ALWAYS, CRITICAL) and no !!. This is the no-loss check: the plain-words rule is unchanged by PR 17417.
  • enforce-hands-to-codify (both arms): the ENFORCE: 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.
  • no-codify-run (with-only): no Skill call runs codify.
  • no-unavailable-claim (both arms): the ENFORCE: line does not call codify unavailable.

No llm grader.

Before-text check, judged by reading the text (no before arm was run). Before PR 17417, SKILL.md said "A rule that must hold every time belongs in a hook, deny rule or CI check", and reference/agent-doc-surfaces.md said such a rule "belongs in a hook or permission policy, not prose". Neither named codify. A faithful reply's ENFORCE: line names one of those mechanisms, so it fails enforce-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. line-plain-words passes on both texts.

Verification

  • validate-cases.py over plugins/docs-hygiene/evals: no FAIL, and no finding for the new case. Its deterministic graders were checked offline against the case's samples/.
  • scripts/check-affected.sh: 18 passed, 2 skipped (no changed shell or Python).
  • Smoke run on main's skill text, claude plugin eval on Claude Code 2.1.329, model sonnet, 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).
    • With the plugin, score 1.00: line-plain-words 3/3, enforce-hands-to-codify 3/3, mechanism-none 3/3, no-codify-run 3/3, no-unavailable-claim 3/3.
    • Without the plugin, score 0.75: line-plain-words 3/3, enforce-hands-to-codify 0/3, mechanism-none 3/3, no-unavailable-claim 3/3. The without-arm replies could not load the skill, recommended a lint rule or hook of their own on the ENFORCE: line, and wrote "none (skill unavailable, so it picked nothing)" on the MECHANISM: line. So against no plugin, only enforce-hands-to-codify separates the arms; mechanism-none separates main's text from the before text, which names a mechanism inside the skill.
    • One with-arm reply, read in full: it loads docs-hygiene:write-for-agents, rewrites the line without marker words, and ends ENFORCE: Run /corrections:codify "handlers in src/handlers/ return errors through respondError() and never call res.status() directly" ... and MECHANISM: none.
    • Cost reported by the tool: 0.23 USD (list-price estimate).
    • The run used a copy of the plugin outside any git repository, the route the evals plugin documents for the CLI's linked-worktree refusal.
  • Not run: a before arm on the pre-PR-17417 text, and the opus alias.

Related

Remaining

#17200 stays open. This PR delivers the eval-case item of the #17159 entry. 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

Adds wfa-every-time-rule-hands-to-codify for issue 17200's host step
under issue 17159. The case loads a corrections stand-in and checks that
/docs-hygiene:write-for-agents writes an every-time rule in plain words
and hands the choice of mechanism to /corrections:codify, picking no
hook, deny rule or CI check itself, 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 15:05
@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:07:15.361930Z f4285c5 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 44759827845

Failed GitHub API calls

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

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read all 10 changed files in full. The PR adds one eval case, wfa-every-time-rule-hands-to-codify, plus a corrections stand-in plugin, grader samples and a bump: none changelog fragment. It doesn't touch any skill text, workflow, check or manifest that ships.

What I checked

  • The case tests what the skill says today. plugins/docs-hygiene/skills/write-for-agents/SKILL.md lines 166–172 and reference/agent-doc-surfaces.md lines 52–57 say three things: name /corrections:codify "<the rule>" for a rule that must hold every time, hand codify the choice of mechanism when it is available, and say when it was not available. The graders check each of those: enforce-hands-to-codify, mechanism-none and no-unavailable-claim.
  • It follows the existing pattern. The stub plugin's layout, the plugins: ["../..", "corrections-stub"] line, and the no-codify-run and no-unavailable-claim graders match the sibling plugins/harness-config/evals/ai-must-always-rule-hands-to-codify case word for word.
  • The regexes behave as intended. line-plain-words has no i flag, so a lowercase "never" in a plain-words line still passes, while the all-caps markers and !! fail. Each grader's samples/ file has pass and fail shapes, including the reply the pre-PR-17417 text would give.
  • Verification is the author's. The validate-cases.py results, the check-affected.sh results and the smoke-run scores (1.00 with the plugin, 0.75 without) come from the PR description. I did not run any of them.

Closing issue: the PR only says "Refs: #17200" and closes no issue, so there were no acceptance criteria to check.

Paved paths: docs/standards/README.md has no paved-path row, so nothing to report.

Loosened checks: none. The change only adds a new eval case and loosens no existing check. The prompt had no loosened_check_verdict: or loosened_check_patterns: line, so I used fail and no consumer entries. It had no loosened_check_decision_record: line either, so I did not check the citation requirement.
Loosened checks would be marked: fail (plugin default); patterns: 0

Spend: running this case uses prepaid model credits (3 runs a side, up to 10 turns each; the author reports about 0.23 USD list price per smoke run). That is not a hold.

Verifier dropped 0 of 0 candidates.

@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 f4285c59bde82f91ce83711160160a415223281c; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed f4285c59bde82f91ce83711160160a415223281c: read 10 of 10 changed file(s); 2 finding(s), 2 as inline comments.

Security review: PR #17635

This PR adds one eval case and nothing else: wfa-every-time-rule-hands-to-codify. It brings regex and tool_used graders, a prompt, grader samples, a bump: none changelog fragment, and a stand-in corrections plugin that only the eval loads. No skill text, workflow, script, trust control, merge hold or hook changes. I read all 10 changed files in full.

What I checked

  • Prompt (prompt.md). The eval session is limited to allowed_tools: [Skill, Read, Glob, Grep], so it is read-only: no Bash, no writes, no web access. It reads no untrusted pull request, issue or comment text, and no credentials reach it.
  • Stand-in skill (corrections-stub/skills/codify/SKILL.md). It is prose only. It has no scripts, no allowed-tools grant and no hooks.
  • Graders (case.yaml). They are regexes that run on the model's last message, plus one tool_used check. None of them runs a command.
  • Changelog fragment. It is prose with bump: none.
  • PR context. No embedded instructions aimed at the review lane.
  • Instruction surfaces. The diff deletes, narrows or softens no standing instruction, so the instruction-surface lens found nothing.

Findings
I found no exploitable security issue. The only findings are the two default-deny manifest flags below, both IMPORTANT. The stand-in's plugin.json is a new manifest, and its added name and version fields are not in the inert set. Both are inline comments. What runs: nothing.

  • The manifest declares no hooks, mcpServers, lspServers, monitors, channels or dependencies.
  • The only component is the prose codify skill.
  • It is loaded only when the eval harness lists corrections-stub under plugins: in prompt.md.
  • marketplace.json is unchanged, so installed users get no new plugin entry. On update the file arrives as inert data inside the docs-hygiene plugin's evals/ tree.

Spend: the case uses prepaid API or subscription credit only: 3 runs per arm, up to 10 turns each, with a 600 s timeout. This is not a hold and is not counted as a finding.

Manifest lines (3)
  • manifest name: flag, added "name": "corrections" in the eval-only stand-in at plugins/docs-hygiene/evals/wfa-every-time-rule-hands-to-codify/corrections-stub/.claude-plugin/plugin.json:2; runs nothing, the manifest has no hooks, servers or dependencies, and only the eval harness loads it via prompt.md plugins:
  • manifest version: flag, added "version": "0.0.0" in the same eval-only stand-in manifest at line 3; it installs and runs nothing
  • manifest description: pass

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit c2fe50c Nov 20, 2026
84 checks passed
@kyle-sexton
kyle-sexton deleted the test/17200-docs-hygiene-codify-handoff-case branch November 20, 2026 15:46
@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 wfa-every-time-rule-hands-to-codify (#17159, skill change PR 17417), 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
line-plain-words 3/3 3/3
enforce-hands-to-codify 0/3 3/3
mechanism-none 3/3 3/3
no-codify-run 3/3 3/3
no-unavailable-claim 3/3 3/3
Case mean 0.80 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: enforce-hands-to-codify 3/3 AFTER against 0/3 BEFORE. Every BEFORE reply's ENFORCE: line names "a hook, deny rule or CI check", quoting the pre-change sentence; none names codify there. mechanism-none does not separate the texts: all three BEFORE replies also wrote MECHANISM: none, because the old text names a category and no specific mechanism.
  • Cost (list-price estimate from the result JSON): BEFORE 0.167 USD. The recorded PR 17635 run reported 0.23 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.
  • 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