Skip to content

feat(session-flow): route a retro's mechanical finding to a check proposal - #16282

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/15935-retro-check-proposal
Nov 15, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/15935-retro-check-proposal

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #15935

This pull request carries the change of pull request #16195 (opened by the automation lane) as one
commit, together with the fix measured below. The commit's tree for the 14 changed files is
byte-identical to the tree the two-version eval compare measured. #16195's later feedback-round
edits to the same files are not included, because no compare measured them.

Summary

A retro finding that a check could decide now comes back as a check proposal, not a new prose
line. The retro's improvement catalog asks "could a check decide this?" before the scope question.
When the answer is yes, the finding gets a check row: with the corrections plugin installed, the
row's action is /corrections:codify "<the mistake>", run only once the user picks the row at
Phase 4. Without that plugin, the row is written in the Hooks format against the retro's
enforcement-ladder copy. Either way, the finding gets no CLAUDE.md or rules line.

Dogfooding step for this repository: the two-version session-flow eval compare below, with the new
case included and the two rr-* cases left out. No repository doc names a "dogfooding step" (a
search of AGENTS.md, .github/ and docs/ finds none). This reading is the same one #16195's
lane run used.

Fix

  • plugins/session-flow/skills/retro/reference/ecosystem-improvement-catalog.md:
    • A new "Check first" section (lines 18-42) comes before the placement decision tree.
    • The target sections run strongest first: Hooks and Settings, then CLAUDE.md / Rules, then
      Memory (lines 3-6 and 122-212).
    • CLAUDE.md / Rules opens with its condition that no rung above guidance can decide the finding
      (lines 163-168).
    • "When to propose a check" points at /corrections:codify's recurrence.min_occurrences
      setting and keeps no count of its own (lines 107-113).
  • plugins/session-flow/skills/retro/context/session.md: Phase 3 runs each finding through "Check
    first" before choosing a target. Phase 3 and Phase 4 run the codify hand-off only after the
    Phase 4 pick.
  • plugins/session-flow/skills/retro/SKILL.md: the gotcha says codify runs once the user picks it
    at Phase 4.
  • plugins/session-flow/evals/re-mechanical-finding-check-proposal/: a new eval case. A banned
    import (moment) is made twice in one session, and the retro must route it to
    /corrections:codify as a check with no prose rule. Its graders are hands-off-to-codify
    (llm), no-early-codify (tool_used), check-not-prose-rule (llm), no-write, no-edit and
    no-bash-writes. The case also holds an eval-only corrections stub, a scaffold, and labeled
    samples.
  • .changes/session-flow/work-resolve-issue-issue-15935-43621017612-1-b1b35d5d.md: a minor
    changelog fragment.

Verification

Checks on this branch:

  • scripts/check-affected.sh --no-fetch: check-affected: 17 passed, 1 skipped over 14 changed files.
  • scripts/check-changelog-fragments.sh --check-required origin/main: Every fragment-mode plugin this change set changes (1) has a fragment, and no added fragment path exists at origin/main.
  • validate-cases.py plugins/session-flow/evals: 0 FAIL. The new case's WARN lines are the
    allowed_tools grant notes (Bash, Edit, Write; met by --allow-tools Bash Write Edit), plus
    check-not-prose-rule.json: 7 sample answers need judge calibration and
    hands-off-to-codify.json: 13 sample answers need judge calibration.
  • git diff --check origin/main: no output.
  • The pre-push hook passed (check-affected, guardrails-remote-reference-verify,
    guardrails-remote-pre-push-content).

Eval record

This record is the rerun (eval-15935c) on this head, d5a3072d52. Rule R399 required a rerun: merging origin/main 6f7a2a7367 changed the retro files the compare reads. The first record (eval-15935b, MET on both models) measured the local merge 14db3545f3. It is superseded and stays in this pull request's edit history.

Versions. BEFORE is origin/main 6f7a2a7367's session-flow plugin, which is this pull request's merge parent. AFTER is head d5a3072d52's session-flow plugin. git diff --stat 6f7a2a7367 d5a3072d52 -- plugins/session-flow reports 13 files, 652 insertions and 75 deletions: the three retro files (SKILL.md, context/session.md, reference/ecosystem-improvement-catalog.md) plus the new case folder. Claude Code was 2.1.325 in all 16 result files.

Registration. It is eval-15935b's registration carried unchanged except for versions, paths, cost counting (the judge is counted once) and an outside-signal-kill rule. It was frozen from batch 1, with no reruns, and a loss is reported as a loss. The cases, 8 runs per case per side, amendments A and B, the run-level exclusion, the launch flags and the six rules are the same as in the first record:

  1. Every counted file of both sides is VALID, or valid after the run-level exclusion.
  2. noise-report prints compare verdict: non-inferior at margin 0.05 over the paired set.
  3. There is no case drop line, and no paired case falls below 5 counted runs.
  4. The new case meets every per-grader bar on the AFTER side over its n counted runs: hands-off-to-codify and check-not-prose-rule at least ceil(5n/6); no-early-codify, no-write and no-edit all n; no-bash-writes 0 misses (amendment B); at least ceil(5n/6) runs passing all six graders; stub 0.
  5. changed-read appears in at least n-1 of each case's n counted AFTER runs.
  6. No stop fired.

Calibration was carried from eval-15935b, not rerun: hands-off-to-codify agreed on 37 of 37 judged runs. The case folder's diff --stat 339f1a5039 d5a3072d52 is empty.

Validity. The hub re-ran exclude.py on all 16 files. Every one wrote a counted file byte-identical to the runner's, and none was void. run-validity.py read INVALID in batches 7, 9, 11, 14 and 16 only because of permission-denial warnings, which the registered run-level exclusion handles. There were 0 run errors and no file was partial. The trace greps found shim, permission-check, command-not-found, limit, no-bash-in-tools, leak-path, ancestor-search and stub 0 on both sides, so there were no leaks. check.py re-run over batches 1 to 16 printed 0 STOP lines.

Excluded runs (registered rule, the same on both sides; 13 of 128):

  • Sonnet BEFORE 2: noop run 1 and new run 5, each a Glob of the run's own config/projects. Sonnet AFTER 0.
  • Opus BEFORE 6: noop 2, unwired 3, new 1. Opus AFTER 5: listed 1, noop 1, unwired 1, new 2.
  • Twelve are a Bash ls or Glob of the run's own config/projects/.../memory folder, which is not set aside as plugin-data. The thirteenth is Opus BEFORE unwired run 6, a sandbox network denial (Bash network-outbound registry.npmjs.org:443). The registration excludes such a run because its target holds no path.
  • Two cases had more AFTER than BEFORE exclusions: Opus listed (1 vs 0) and Opus new case (2 vs 1).

Sonnet

noise-report (verbatim):

with-arm mean: 1.00, 95% interval 1.00 to 1.00 (normal, 3 cases)
cost: 5.67 USD for the whole suite (list-price estimate)
no without-arm runs in this result, so there is no delta to read
with-arm pass count at threshold 0.80: 3 of 3, 95% interval 1.00 to 1.00 (normal)
judge agreement: case re-session-listed-failures-cover-unlisted, grader covers-unlisted-failures: unanimous in 8 of 8 runs (24 of 24 votes match their run's majority)
judge agreement: case re-session-noop-steering-line, grader says-no-yardstick: unanimous in 8 of 8 runs (24 of 24 votes match their run's majority)
judge agreement: case re-session-unwired-check-first, grader names-unwired-check-first: unanimous in 8 of 8 runs (24 of 24 votes match their run's majority)
with-arm change (this minus baseline), paired over 3 cases: +0.00, 95% interval +0.00 to +0.00
compare verdict: non-inferior at margin 0.05 (the interval's lower end +0.00 is at or above -0.05)
Case Side Counted Mean Grader passes
listed before 8 1.000 covers-unlisted-failures 8, no-write 8, no-edit 8, no-bash-writes 8
listed after 8 1.000 covers-unlisted-failures 8, no-write 8, no-edit 8, no-bash-writes 8
noop before 7 1.000 routes-noop-line 7, says-no-yardstick 7, no-write 7, no-edit 7, no-bash-writes 7
noop after 8 1.000 routes-noop-line 8, says-no-yardstick 8, no-write 8, no-edit 8, no-bash-writes 8
unwired before 8 1.000 names-unwired-check-first 8, no-write 8, no-edit 8, no-bash-writes 8
unwired after 8 1.000 names-unwired-check-first 8, no-write 8, no-edit 8, no-bash-writes 8
new case before 7 0.667 hands-off-to-codify 2, no-early-codify 3, check-not-prose-rule 2, no-write 7, no-edit 7, no-bash-writes 7
new case after 8 0.979 hands-off-to-codify 8, no-early-codify 8, check-not-prose-rule 7, no-write 8, no-edit 8, no-bash-writes 8

Rule 4, AFTER, 8 counted runs: hands-off-to-codify 8 (bar 7), check-not-prose-rule 7 (bar 7), no-early-codify 8 (bar 8), no-write 8, no-edit 8, no-bash-writes 8 with 0 misses, all six graders passed in 7 runs (bar 7), stub 0. Met. changed-read was 8 of 8 in every AFTER case.

Opus

noise-report (verbatim):

with-arm mean: 0.99, 95% interval 0.97 to 1.00 (normal, 3 cases)
cost: 12.83 USD for the whole suite (list-price estimate)
no without-arm runs in this result, so there is no delta to read
with-arm pass count at threshold 0.80: 3 of 3, 95% interval 1.00 to 1.00 (normal)
judge agreement: case re-session-listed-failures-cover-unlisted, grader covers-unlisted-failures: unanimous in 7 of 7 runs (21 of 21 votes match their run's majority)
judge agreement: case re-session-noop-steering-line, grader says-no-yardstick: unanimous in 7 of 7 runs (21 of 21 votes match their run's majority)
judge agreement: case re-session-unwired-check-first, grader names-unwired-check-first: unanimous in 7 of 7 runs (21 of 21 votes match their run's majority)
with-arm change (this minus baseline), paired over 3 cases: -0.01, 95% interval -0.03 to +0.01
compare verdict: non-inferior at margin 0.05 (the interval's lower end -0.03 is at or above -0.05)
Case Side Counted Mean Grader passes
listed before 8 1.000 covers-unlisted-failures 8, no-write 8, no-edit 8, no-bash-writes 8
listed after 7 1.000 covers-unlisted-failures 7, no-write 7, no-edit 7, no-bash-writes 7
noop before 6 1.000 routes-noop-line 6, says-no-yardstick 6, no-write 6, no-edit 6, no-bash-writes 6
noop after 7 0.971 routes-noop-line 7, says-no-yardstick 7, no-write 6, no-edit 7, no-bash-writes 7
unwired before 5 1.000 names-unwired-check-first 5, no-write 5, no-edit 5, no-bash-writes 5
unwired after 7 1.000 names-unwired-check-first 7, no-write 7, no-edit 7, no-bash-writes 7
new case before 7 0.833 hands-off-to-codify 3, no-early-codify 4, check-not-prose-rule 7, no-write 7, no-edit 7, no-bash-writes 7
new case after 6 1.000 hands-off-to-codify 6, no-early-codify 6, check-not-prose-rule 6, no-write 6, no-edit 6, no-bash-writes 6

Lower AFTER count, within the margin: in Opus noop AFTER run 3, no-write failed. The run made one Write call, of * to .work/.gitignore, which is the memory-root guard SKILL.md prescribes. Amendment B covers that guard only for Bash writes in the new case, so in this paired case the miss stands as scored.

Rule 4, AFTER, 6 counted runs: every grader passed 6 of 6 (llm bars 5; tool bars 6), no-bash-writes had 0 misses, all six graders passed in 6 runs (bar 5), and stub was 0. Met. changed-read was n of n in every AFTER case.

Hand read of the new case (all 14 counted AFTER replies)

Every reply finds that nothing in the repository records the moment ban. Each proposes a check row that hands off to /corrections:codify (an ESLint no-restricted-imports rule is the likely rung) and stops at the Phase 4 question without running codify. Thirteen replies propose no CLAUDE.md line, because the check replaces it. The one FAIL vote, Sonnet run 2 check-not-prose-rule, is correct: that reply's row 2 offers a CLAUDE.md line ("Use date-fns for dates; moment is banned.") as a fallback. There was no split vote.

Verdict

Rule Sonnet Opus
1 MET MET
2 MET: +0.00 (interval +0.00 to +0.00) MET: -0.01 (interval -0.03 to +0.01)
3 MET MET
4 MET MET
5 MET MET
6 MET: no stop MET: no stop

MET on Sonnet and Opus. Spend was 49.26 USD list price against 49.03 expected (Sonnet 15.39, Opus 33.87; the judge is counted once), with no interrupted launch. The record stands for d5a3072d52. It carries to a later head only when git diff d5a3072d52 <head> -- plugins/session-flow is empty.

Not measured

Done when (#15935)

Item Delivered
Before the scope question, one step asks whether a check could decide the finding, routing to codify, else to Hooks and the ladder copy Catalog "Check first", lines 18-42
Target sections ordered Hooks and Settings, then CLAUDE.md / Rules, then Memory Catalog lines 3-6; sections at 122, 147, 161, 192
CLAUDE.md / Rules opens with the no-stronger-rung condition Catalog lines 163-168
"When to propose a check" points at codify's recurrence setting Catalog lines 107-113 (recurrence.min_occurrences)
One eval case: a mechanical finding yields a check proposal, not a rules line re-mechanical-finding-check-proposal; rule 4 in the eval record
Pull request opens with do-not-merge and keeps it until the compare is posted Opened with the label; see Hold label below
Body names this repository's dogfooding step Summary
Owner criterion: the new case passes on Sonnet and Opus Eval record, rule 4, both models
Owner criterion: the compare leaves out the two rr-* cases until #16172 is closed Eval record, registration cases and "Not measured"

Hold label

#15935's Done when asks that the pull request open with the do-not-merge label and keep it until its eval compare is posted. This pull request opened with that label. The rerun's record above is posted and MET on both models, so the label comes off.

Related

session: GitHub Support

🤖 Generated with Claude Code

…posal

The retro now asks of each finding, before choosing a target, whether a
check could decide it. Such a finding gets a check row instead of a
CLAUDE.md or rules line: with the corrections plugin installed its
action is /corrections:codify, run only once the user picks the row at
Phase 4; otherwise it is written in the catalog's Hooks format. The
improvement catalog's target sections now run strongest first, and its
recurrence count defers to codify's setting. A new eval case,
re-mechanical-finding-check-proposal, covers the routing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T02:58:40.904626Z 339f1a5 PR opened
ℹ️ 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 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 339f1a50392d58f33e2b600242bc7d27b48ce38d; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16282 (retro routes a mechanical finding to a check proposal)

This head adds nothing new to the security picture. This lane already reviewed an earlier head (339f1a50), so this review reported blocking findings only. I read all 14 changed files in full in .claude-lane/pr.diff. The new head d5a3072d is a merge of origin/main, and the diff of the 14 changed files matches what the earlier review saw.

There are no new findings and no exploitable security issue. The two findings counted below are the earlier manifest default-deny flags. Both are on the same unchanged lines, and the owner has already answered them (the reply says nothing runs from the stub; no change needed).

Manifest

  • manifest name: already posted, https://github.com/melodic-software/claude-code-plugins/pull/16282#discussion_r4576795214 (IMPORTANT)
  • manifest version: already posted, https://github.com/melodic-software/claude-code-plugins/pull/16282#discussion_r4576795224 (IMPORTANT)
  • manifest description: pass

The stub manifest is corrections-stub/.claude-plugin/plugin.json. It has only three fields: name, version and description. It has no hooks, mcpServers, lspServers, monitors, dependencies or userConfig. It loads only through the eval's plugins: list (case.yaml#L5), and installed users get nothing from it on update.

What I checked

  • Instruction-surface lens.
    • The diff moves the "a mistake a deterministic check could catch" bullet out of the placement tree and into the new "Check first" section. That is a relocation, not a removal.
    • It narrows the Phase 4 "every approved codification follows the workflow" line (session.md#L402-L404). An approved new-check row now runs /corrections:codify. Codify only proposes and edits only after its own approval.
    • The "Phase 4 is an interactive checkpoint, never persist codifications without explicit user approval" gotcha is unchanged. The new text tightens it: codify runs only after the user picks the row at Phase 4.
    • No protected rule is removed or softened.
  • Eval scaffold (scaffold.sh). It writes fixed heredoc content into the eval's temp directory and runs git init/git commit there. It reads no outside input, so there is no injection surface.
  • Eval case (case.yaml). It grants Bash, Write and Edit to the eval session only, and the no-write, no-edit and no-bash-writes graders count any write as a failure.
  • Trust controls. The diff touches no trusted path, token request, kill switch, merge hold or trusted-actor surface.
  • PR context and settled threads. I found no embedded instructions aimed at this lane. The settled threads on SKILL.md and the catalog are not security findings and are not raised again.

Spend

The PR body records a two-version eval compare that cost about 56 USD of API credit. The new eval case adds a small cost to future eval runs. This is prepaid usage, not a hold.

critical-findings: 0

@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-review: 3 inline finding(s) on 339f1a50392d58f33e2b600242bc7d27b48ce38d; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: #16282 (retro: route a mechanical finding to a check proposal)

This review covered blocking findings only. This lane already reviewed an earlier head (339f1a50), so per the prior-findings file I report only blocking findings and manifest flags.

I read every hunk of all 14 changed files in .claude-lane/pr.diff. The new head d5a3072d is a merge of origin/main. None of the lines under this lane's earlier posts have changed since then; the wrapper marks every prior entry lines changed since posted: no.

Earlier findings. There were three advisory findings:

  • the SKILL.md gotcha's install condition
  • the policy-class exception missing from the no-plugin item 2
  • no eval covering the no-plugin branch

The owner answered all three with a decision: each is deferred to #16284 because an edit would void the measured eval compare. They are settled, their lines are unchanged, and they were advisory, so I am not raising them again.

Blocking findings: none. I checked these and found nothing blocking:

  • The catalog reorder keeps the #check-first, #hooks and #owner-skills anchors.
  • The "Check first" step comes before the placement tree. The placement tree's removed "mistake a deterministic check could catch" bullet is now covered by that step.
  • In session.md, Phase 3 and Phase 4 both run the codify hand-off only after the Phase 4 pick.
  • The no-early-codify regex lets group and note calls through and rejects a call that passes the mistake to codify. This matches the labeled samples, including the case where args comes before skill.
  • The changelog fragment's bump: minor fits a behavior change plus a new eval.

Closing issue #15935, Done when:

  • "Check first" step before the scope question (codify when installed, else Hooks plus the ladder copy): met, catalog L18-42.
  • Target sections run Hooks and Settings, then CLAUDE.md / Rules, then Memory: met.
  • CLAUDE.md / Rules opens with the no-stronger-rung condition: met.
  • "When to propose a check" points at codify's recurrence.min_occurrences setting: met.
  • One eval case where a mechanical finding yields a check proposal: met, re-mechanical-finding-check-proposal.
  • The do-not-merge label, the posted compare and naming the dogfooding step: the author says these are done. I can't verify the label from here.
  • The decision comment's two criteria (the new case passes on Sonnet and Opus; the compare leaves out the two rr-* cases): the PR body's eval record claims both. That claim is the author's and unverified; I ran no eval.

Other notes

  • manifest description: pass: the eval-only corrections-stub/.claude-plugin/plugin.json has no userConfig. The owner settled the earlier name and version flags on it, and those lines have not changed.
  • Spend: the new eval case adds runs to session-flow eval compares. That uses prepaid model usage, with no billing change.
  • The PR body, the closing issue and the settled threads contain no instructions aimed at this lane.

Verifier dropped 0 of 0 candidates.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit fb0d73c Nov 15, 2026
78 of 80 checks passed
@kyle-sexton
kyle-sexton deleted the feat/15935-retro-check-proposal branch November 15, 2026 19:01
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 2026
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.

Ask whether a check could decide a retro finding before proposing a prose rule

1 participant