Skip to content

feat(finalize-pr): run the self-review at /code-review medium - #319

Merged
Ardnived merged 5 commits into
mainfrom
claude/self-review-medium
Nov 25, 2026
Merged

Ardnived merged 5 commits into
mainfrom
claude/self-review-medium

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • finalize-pr step 2 runs /code-review medium on a FULL diff, and keeps high on TINY.
  • Both levels live in review.selfReview, so the next tuning change is a data edit.
  • Joined: two level names were wrong — why.md:367 read high, and step 2 offered ultra.
  • Plugin version 5.13.0 → 5.14.0, so installed copies pick this up.

Change outline

Behaviour — which level step 2 runs at

Step 2 picked one level for every diff. It now reads the level per tier, and the TINY tier keeps the level main already ran.

 classify(origin/<base>...HEAD)                 workflow/skills/finalize-pr/SKILL.md
   TINY — at or under review.skipWhen
     skip /simplify, and the dispatcher skips the critic
-    /code-review high                          # step 2, "as usual"
+    /code-review <review.selfReview.tinyLevel> # high: the only agent that reads this diff
   FULL — over review.skipWhen
     /simplify  ‖  step 2
-    /code-review high
+    /code-review <review.selfReview.level>     # medium: review-pr reads it again, unanchored

Contract — the dial left the prose

The level was typed in four places, and the review of this PR found one of them still reading high. loop-config.json holds it now, and each reader names the key.

 loop-config.json  review
   skipWhen { maxFiles: 2, maxLines: 40 }
+  selfReview { level: "medium", tinyLevel: "high" }
 readers of the level
-  finalize-pr/SKILL.md    "/code-review high"   ×2
+  finalize-pr/SKILL.md    "<level>" = review.selfReview.level, or tinyLevel on TINY
-  review-pr/SKILL.md      "/code-review high"
+  review-pr/SKILL.md      "/code-review at review.selfReview.level"
-  lib/review-scope.mjs    "/code-review high"   # header comment
+  lib/review-scope.mjs    "/code-review"        # the comment is about which reviews run
-  docs/why.md:367         "/code-review high"   # present tense, went stale
+  docs/why.md:367         "/code-review"        # line 368's median stays as history

The failure this prevents

The Routines account keeps hitting its usage limit. Every PR over review.skipWhen is reviewed twice: by the author's own /code-review in finalize-pr, then by review-pr, a fresh session that never saw the author's reasoning. At high, the self-review is the biggest agent fan-out in an implement run, and its findings overlap the critic's. medium still catches the plain bugs before the PR opens. The critic, which isn't anchored on the author's view, is unchanged.

That premise does not hold at or under review.skipWhen. There the dispatcher skips the critic and this skill skips /simplify, so step 2 is the only agent read, and a dropped finding has nothing behind it to catch the miss. tinyLevel keeps high on that tier, where the diff is at most two files and forty lines and high is cheapest.

What it gives up: lower-confidence findings from the self-review, on FULL diffs only. The critic either repeats those or rightly drops them. If critic reviews start reporting bugs a self-review should have caught, revert this.

Local note: /code-review remembers the last level typed, so a local /workflow:finalize-pr leaves your next bare /code-review at medium.

Test results

  • Lean gate: ✓ claude plugin validate ./workflow --strict, then 184 lib tests pass.
  • rule-delta.mjs --base origin/main workflow/skills: 94 → 94 directives, none removed.
  • /security-review: no findings. The diff adds no executable code, widens no allowed-tools, and weakens no gate.

Notes for reviewer

🤖 Generated with Claude Code

Every PR over review.skipWhen is reviewed twice: by the author's own
/code-review in finalize-pr step 2, then by review-pr, a fresh session that
never saw the author's reasoning. At high, the first pass is the biggest
fan-out in an implement run, and its findings overlap the critic's. The
routines account keeps hitting its usage limit, so the self-review drops to
medium. The independent critic is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🤖 no session running

recent dispatches
  • 20:35Z address-review · attempt 1 · session · done
  • 20:35Z address-review · attempt 1 · session
  • 20:28Z review-pr · attempt 1 · session · done
  • 20:28Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 25, 2026

@sydevs-bot sydevs-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.

🧐 Adversarial review

The diff is the size of its problem: one dial, four mentions, a version bump, one why.md section. Nothing is smuggled in, and the skill/ceiling split holds — #317 and #318 carry those. The body's rule-delta claim checks out: 94 → 94, nothing removed. Two things weaken it. The stated premise, reviewed twice, fails on the TINY tier, where this same skill says step 2 is the only agent read. And one mention of high was missed.

Findings

  • should-fix — workflow/skills/finalize-pr/SKILL.md:141: the premise fails on TINY diffs. See thread.
  • should-fix — docs/why.md:367: still reads "/code-review high ... each fan out reviewer agents", present tense, naming step 2's composition. Line 368's median is history and can stay.
  • consider — workflow/skills/finalize-pr/SKILL.md:131: the level is hard-coded in four places. See thread.
  • consider — workflow/skills/finalize-pr/SKILL.md:156: /code-review ultra names no level. They are low, medium, high, xhigh, max. max is the one Claude may not pick itself, which is what that sentence describes.
  • consider — the body omits ## Change outline. pr-template.md makes it optional only at or under review.skipWhen, and this diff is 5 files.

What was checked

Read whole on the branch: finalize-pr/SKILL.md, review-pr/SKILL.md, pr-template.md, review-scope.mjs, marketplace.json, and why.md's sections on simplify fan-out, tiny diffs, and plugins no routine has. new-pieces.mjs: NONE, so no streamliner ran. git grep '/code-review' over the branch: 11 hits, 1 stale. marketplace.json pins no version, so 5.14.0 needs nothing beside it. No question threads, so no second opinions. No ## Preview is correct — this repo configures no previewUrl. No contract surface touched. Reviewer profile read.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread workflow/skills/finalize-pr/SKILL.md Resolved
Comment thread workflow/skills/finalize-pr/SKILL.md Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 25, 2026
The level was typed into four places: finalize-pr's step 2 twice,
review-pr's stance, review-scope.mjs's header comment and docs/why.md.
The review of #319 found one of them still reading `high`, which is the
failure this prevents: a tuning change that needs five edits will miss
one, and a stale level in a run-loaded skill is read as an instruction.

`review.selfReview.level` holds it now, so the next change is a data
edit with no version bump. The cost is one config lookup in a skill the
run already reads loop-config.json for. No behaviour change: the level
stays `medium`. review-scope.mjs's comment drops the level entirely —
it was describing which reviews run, not at what level.

Addresses #319 (comment)

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjX7iLXaSzsKR9YZwd6
The PR's premise — every PR is read twice, so the first pass can drop to
`medium` — fails at or under `review.skipWhen`. The dispatcher skips the
critic on that threshold and this skill skips `/simplify`, so step 2 is
the only agent that reads a TINY diff. Lowering it there removes a
finding with nothing behind it to catch the miss, which is the failure
this prevents.

`review.selfReview.tinyLevel` holds `high`, the level main already ran,
so a TINY diff is unchanged by #319. The cost is bounded: a TINY diff is
at most two files and forty lines, which is where `high` is cheapest.

Addresses #319 (comment)

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjX7iLXaSzsKR9YZwd6
Two level names were wrong, both found by the review of #319.

`why.md#the-reviews-run-while-simplify-does` read `/code-review high` in
the present tense, describing step 2's composition, which #319 made
false. It drops the level: the entry is about three reviews running
together, not about any one's level. The median on the next line is a
measurement taken at `high` and stays as history.

`finalize-pr` step 2 offered the user `/code-review ultra`, which is not
a level. The levels are low, medium, high, xhigh and max, and `max` is
the one Claude may not pick for itself — which is what that sentence was
describing. A skill naming a level that does not exist sends the reader
to a command that fails.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjX7iLXaSzsKR9YZwd6
Whitespace only. The config-name substitutions pushed three lines past
the surrounding wrap, and one left a four-word orphan line.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjX7iLXaSzsKR9YZwd6
@Ardnived
Ardnived enabled auto-merge November 25, 2026 20:44
@sydevs-bot

Copy link
Copy Markdown
Contributor

Four commits, head 54ba4ee. Both threads adopted, plus the three findings the review body left without a thread.

Adopted

  • TINY keeps high — 4b434dc. review.selfReview.tinyLevel, so that tier is unchanged by this PR.
  • One dial, four places — 6108f8e. review.selfReview.level, no behaviour change.
  • why.md:367, present-tense /code-review high — 6f3c85a. Line 368's median stays as history.
  • Step 2 offered /code-review ultra, which is not a level — 6f3c85a, now max.
  • ## Change outline was missing — added, a Behaviour view and a Contract view.

Nothing rebutted, nothing asked. No base merge: the branch sits on main.

Lean gate green, 184 lib tests. rule-delta: 94 → 94, none removed. /security-review: no findings.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026

@sydevs-dispatcher sydevs-dispatcher 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.

Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. 🤖 Written by the sydevs autonomous loop — see what this is

@Ardnived
Ardnived added this pull request to the merge queue Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 25, 2026
Merged via the queue into main with commit 01ea696 Nov 25, 2026
49 of 50 checks passed
@Ardnived
Ardnived deleted the claude/self-review-medium branch November 25, 2026 20:46
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants