Skip to content

refactor(knowledge): drop the distill re-read-what-felt-rushed polish step - #13552

Merged
kyle-sexton merged 3 commits into
mainfrom
refactor/drop-self-check-lines-batch-3
Nov 5, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
refactor/drop-self-check-lines-batch-3

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: owner decision in the poteto session, 2026-11-05 (no new issues while issues are driven to zero)

Summary

Batch 3 of the self-check sweep covers plugins implementation through x. It removes one line, the /knowledge:distill Phase 5 "Thin section audit". That step had the model re-read its own files "that felt rushed", a re-check with no new evidence source. Every other candidate is kept, and the borderline ones are listed below with their class.

Owner decision (2026-11-05, poteto session), verbatim: "Go w/ recomendations", on the option "Remove the lines that ask the model to re-read or double-check its own answer, from every skill and agent. Keep the steps that run real tests, builds or type-checks. Put the verifier-subagent steps behind the new verification setting."

Basis: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5, "Claude Opus 5 verifies its own work without being told to. If your prompt contains explicit verification instructions ("include a final verification step for any non-trivial task," "use a subagent to verify"), remove them: instructions like these cause over-verification on Claude Opus 5, and removing them reduces wasted tokens with no loss in quality."

Fix

Removed (line numbers at origin/main b489e435c7cc15ea6db127b2d826b970c1039dd7):

file:line removed text
plugins/knowledge/skills/distill/SKILL.md:229 - **Thin section audit**. Re-read any file that felt rushed during distillation. Expand with specifics from the PDF

The rest of Phase 5 stays: the cross-reference check, the routing stress test and the fresh-session web corpus test. The removed bullet carried no other rule.

Added an outcome eval case, plugins/knowledge/evals/distill-polish-expands-thin-file, which exercises the removed behaviour. It also adds a generated two-page text PDF fixture, plugins/knowledge/evals/fixtures/distill-make-pdf.py. In the scaffold, one reference file holds one line while its chapter states four specifics. The grader passes when the reply names that file and at least one of the missing specifics.

Kept borderline lines (judged on their text; class in the second column):

file:line class why kept
plugins/review/skills/fanout/context/fix-pass-mode.md:150 "After each fix, re-read the touched region to confirm the edit landed as intended." SELF, kept (unsure) It is a removal candidate, because it names no reason the disk could differ from what the Edit tool reported. It stays because no outcome eval could measure the cut on this host. The fanout skill's pre-computed context runs Bash, and a Bash-granting eval pass is refused here because ~/.docker holds links.
plugins/implementation/skills/implement/SKILL.md:176 replan "answers yes to each check" task spec Defines what a good replan is (smaller, lists drops first)
plugins/implementation/skills/implement/SKILL.md:233 "Self-review is the floor" GATE Phase-boundary acceptance gate; the verdict goes to a fresh-context verifier
plugins/implementation/skills/implement/SKILL.md:271 Step 5 self-review task spec / RUN A defect checklist (debug artifacts, commented-out code, scope creep) read off git diff
plugins/knowledge/skills/distill/SKILL.md:230 routing table stress test task spec Tests routing with questions, not a re-read of the draft
plugins/knowledge/skills/distill/SKILL.md:242 "Re-read the core list to see if anything shifted" EVIDENCE Compared against a newly published piece
plugins/knowledge/skills/distill/context/templates.md:253 "reread every quote ... against Source text safety" GATE Untrusted-content safety check
plugins/planning/skills/design/SKILL.md:278 "Re-read all design artifacts." EVIDENCE Multi-turn shared artifacts another turn may have changed
plugins/planning/skills/design/SKILL.md:301-304 naming checks task spec Kept as the brief directs
plugins/planning/skills/plan/SKILL.md:89,93 phase-to-criterion walk, "This self-check" task spec / GATE Scope check backed by an incident; Step 5 human gate
plugins/planning/skills/prd/SKILL.md:256-258 task spec Kept as the brief directs
plugins/planning/skills/wayfind/SKILL.md:244 "Reread the open items ... against what was just decided" EVIDENCE New evidence: the resolution just made
plugins/planning/skills/interview/context/assumption-sweep.md:154 pre-round contradiction pass INDEP Fresh-context subagent
plugins/playbooks/skills/fable-5/SKILL.md:55,100, context/verification.md:19-21,91-104 RUN / EVIDENCE Adversarial inputs, forced error paths, disk state after formatters; the Basis quote is about Opus 5, not this Fable 5 playbook
plugins/songwriting/skills/co-write/SKILL.md:160 "check each emitted line against it" task spec Craft rule for chorus versus verse mode
plugins/source-control/skills/commit/SKILL.md:87 subject pre-check RUN Regex check against the resolved pattern
plugins/review/skills/quality-gate/context/code.md:69 "Re-run self mode" user-invoked review The review is the task
plugins/user-interface/skills/audit/reference/launch-scope.md:346-348 cross-lane self-check user-invoked audit The audit is the task
plugins/work-items/skills/decompose/SKILL.md:63 four slice checks task spec Defines a good vertical slice
plugins/machine-health/skills/setup/SKILL.md:176,227,346 re-read after write RUN The write goes through a PowerShell script; "never report success on the write alone"
plugins/plugin-quality/agents/auditor.md:81 re-read after writing EVIDENCE Detects an observed rewrite
plugins/session-flow/skills/workflow/context/pre-pr.md:14, context/steps.md:183 self-review the diff GATE Pre-PR review stage, with a fresh-context reviewer as the alternative
plugins/playbooks/skills/boris/vendor/**, plugins/playbooks/skills/skill-authoring/vendor/**, plugins/playwright/skills/playwright/vendor/** vendored upstream Upstream mirrors are not edited

Hits judged: 552 unique file:line entries, judged by text:

  • 439 residual hits from the brief's phrasing grep (re-read, reread, double-check, re-check, recheck, re-verify, self-check, sanity-check, proofread, "make sure", before finishing/returning) over every SKILL.md, reference/, context/, actions/ and agents/*.md file in the 46 plugins (767 files).
  • 62 hits from a second grep for check/review your work, "before presenting" and "final pass".
  • 42 self-review hits.
  • The 19 inventory SELF rows.
  • 0 hits for "ensure" within 40 characters of your/draft/output/answer/response.

The raw grep returned 965 hits. Of those, 526 were dated Recheck when / Recheck on / Recheck: source markers, which are not directives, and were excluded mechanically.

Verification

  • plugins/skill-quality/scripts/check-skill.sh plugins/knowledge/skills: 7 passed, 0 failed.
  • plugins/knowledge/tests/docpage-digest-batch.test.sh and verify-batch-page.test.sh: pass (43 Python tests OK).
  • /evals:validate (validate-cases.py plugins/knowledge/evals): exit 0, no FAIL. The new case gets only the standard Write/Edit grant warnings.
  • No eval or test asserted the removed line (searched the repository for "Thin section" and "felt rushed").
  • Pre-push check-affected: pass.
  • Outcome eval, distill-polish-expands-thin-file, claude plugin eval --scaffold --keep-temp --judge-model opus --allow-tools Write Edit --threshold 0.8. Each run used a copy of the plugin outside the repository, holding the same case. The only difference between the copies is the removed line. Runs: 3 per arm, Claude Code 2.1.318, model claude-opus-5-5.
version validity with-arm without-arm cost
origin/main (with the line) VALID (warnings: denials only under the run's plugin-data directory, skill-fired not graded, ceiling) 1.00 (3/3) 1.00 (3/3) 1.43 USD
this branch (line removed) VALID (same warnings) 1.00 (3/3) 1.00 (3/3) 1.44 USD
  • Delta between versions, with-arm: 0.00, so no loss.
  • The noise report's compare verdict is n too small to call: one case, where 3 or more are needed.
  • The without-arm is at the ceiling, so this case cannot show a gain over no plugin. It measures only whether the cut loses the outcome.
  • Spot read of branch with-arm run 1: it read the PDF and named reference/idempotency.md as missing almost all of Chapter 2, listing the Idempotency-Key header, the 24-hour retention, 409 and 422. With no shell, the visibility check could not run, so it held the write.
  • An earlier origin/main pass was INVALID: its writes under .claude/ were denied. That led to moving the case's skill to skills/testing and grading the reply. Its result is not counted.

Related

  • Batch 1: #13532
  • Rule for cuts: docs/review/skills-and-agents.md (eval evidence of no loss)

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 5, 2026 11:00
… step

Phase 5 of /knowledge:distill asked the model to re-read any file that
felt rushed, a self-check with no new evidence source. Opus 5 guidance
says such verification instructions cause over-verification. The link
check, routing stress test and fresh-session corpus test stay.

Adds an outcome eval case, distill-polish-expands-thin-file, with a
generated two-page PDF fixture, so the cut is measured on both versions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
….claude

With no shell the skill's visibility check cannot run, so the with-arm
may hold its writes; the grader now reads the reply for the thin file and
a Chapter 2 specific. The skill moves to skills/testing because writes
under .claude/ are denied in a run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 5, 2026 16:40
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T16:42:08.202856Z feef711 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

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #13552, drop the distill "Thin section audit" polish step

I read every hunk of all 7 changed files. I found no blocking or advisory findings.

What changed

  • plugins/knowledge/skills/distill/SKILL.md deletes one Phase 5 bullet ("Thin section audit"). The other Phase 5 steps are unchanged: the cross-reference check, the routing stress test, the decision-guide check and the web corpus test. Nothing else in the skill refers to the removed bullet.
  • New outcome eval distill-polish-expands-thin-file, with a scaffold, a prompt, a regex grader and grader samples.
  • New shared fixture plugins/knowledge/evals/fixtures/distill-make-pdf.py.
  • New changelog fragment with bump: patch. A patch bump fits the removal of a prompt step, and the fragment text describes the change accurately.

Checks I made by reading the code (nothing was run)

  • PDF generator. The object numbering holds together:

    • catalog = 1, pages = 2;
    • each page i is object 3+2i and its content stream is 4+2i;
    • the font is 3+2n = 7, which matches the order objects are appended.

    The /Length value matches the stream bytes. The xref entries are 20 bytes each. %%%%EOF becomes %%EOF under bytes %-formatting. All text is in latin-1, and esc() handles the parentheses and backslashes that PDF strings need escaped.

  • Scaffold. python3 -I "$(dirname "${BASH_SOURCE[0]}")/../fixtures/..." follows the existing sibling-fixtures/ pattern, e.g. plugins/codebase-health/evals/*/scaffold.sh.

  • Grader. I traced the regex in case.yaml by hand against every sample. Both pass samples match: the first through the file-then-specific branch, the second through the specific-then-file branch. All three fail samples miss, including the one that names idempotency.md with no Chapter 2 specific.

  • Case layout matches the sibling distill-book-planted-directive case: schema_version 1.1, a scaffold_script, and a samples file per grader.

Verification claims. The validator runs, the test runs and the per-arm eval results (1.00 with the line and 1.00 without) are the author's claims, and I have not verified them. As the PR itself says, the without-plugin arm is at the ceiling and n=1 is "too small to call". So this case can only show that removing the line loses nothing on this one scenario. It cannot show that the line ever helped.

Closing issue: none. The PR names an owner decision instead of an issue, so there were no acceptance criteria to check. No embedded directives were found in the PR context.

Trusted paths: none of the changed files match a trusted-path glob.

Spend (not a finding): the new eval case uses prepaid model credit each time it runs (3 runs per arm, up to 30 turns and 900 s each). The author reports about 1.4 USD per two-arm pass.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #13552 (head feef7115)

I found no security issues.

I read every hunk of all 7 changed files in .claude-lane/pr.diff. None of them matches a TRUSTED PATHS glob.

  • Instruction-surface deletion (plugins/knowledge/skills/distill/SKILL.md): the PR removes one Phase 5 bullet, "Thin section audit. Re-read any file that felt rushed during distillation." I checked it against the six protected classes the instruction exception register names (docs/contracts/instruction-exception-register/README.md, which takes them from Gate 0): irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance and agent-authority. It matches none of them. It was a content-quality step, and removing it opens no path for any request to reach a guarded action. The Phase 5 checks that remain are unchanged.
  • New eval case (case.yaml, prompt.md, samples/thin-file-named.json, scaffold.sh): this is static fixture content. scaffold.sh creates a local git repo with no remote, writes fixed heredocs (quoted 'EOF', so nothing is expanded) and makes a local commit with a placeholder identity. It runs the in-repo PDF generator with python3 -I. No untrusted input reaches it, and no credentials or network are involved. The case's tool allowlist is Skill, Read, Glob, Grep, Write, Edit, with no Bash.
  • plugins/knowledge/evals/fixtures/distill-make-pdf.py: builds a PDF from hardcoded strings and writes it to argv[1], a path the scaffold supplies. It reads no outside input.
  • Changeset file: prose only.

The diff touches no trust controls, no merge holds, no plugin manifests, no workflows and no tokens.

Spend: the new eval case runs 3 times (runs: 3, max 30 turns, 900 s timeout) when someone invokes it, using prepaid API credit only. It is not a hold.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit fff06d3 Nov 5, 2026
56 of 68 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/drop-self-check-lines-batch-3 branch November 5, 2026 17:07
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