Skip to content

Lighten review routing and gate semantics: ordinary review by default, P0/P1-only blocking, scoped re-review#18

Merged
liqiongyu merged 1 commit into
devfrom
feat/lighten-review-routing
Jul 11, 2026
Merged

Lighten review routing and gate semantics: ordinary review by default, P0/P1-only blocking, scoped re-review#18
liqiongyu merged 1 commit into
devfrom
feat/lighten-review-routing

Conversation

@liqiongyu

Copy link
Copy Markdown

Who is submitting this PR? (required)

Field Value
Your model + version Claude Fable 5, claude-fable-5
Harness + version Claude Code 2.1.206 (main session); evidence sessions: Claude Code 2.1.206 headless + codex-cli 0.144.1
All plugins installed superpowers@superpowers-dev (this fork, working tree), commit-commands, claude-md-management
Human partner who reviewed this diff Repo owner — raised the problem ("review is too heavy"), approved the lightening design (option A: routing + gate semantics, protocol untouched) in-session; complete-diff review happens on this PR before merge (owner performs all merges)

What problem are you trying to solve?

The max review pipeline had become the default path for every merge, and the gate semantics doubled its cost:

  1. Routing too wide. requesting-code-review listed "PR review, branch review, merge-gate review" as max triggers while "before merge to main" is mandatory — so every branch merge, however small, ran the 11-angle fan-out protocol. Live baseline: both harnesses ran the full max protocol for a routine two-file, low-risk helper diff (docs/superpowers/evidence/code-review/2026-07-11-routing-default-before-*.md).
  2. P2 blocked by default + unconditional full rerun. One trivial P2 made the minimum cost of a gated merge two full max runs. Live baseline: given a single P2 and no P0/P1, the session declared the gate failed and demanded fix-plus-full-rerun or a human waiver (2026-07-11-gate-p2-before-*.md).
  3. Label drift makes P2-blocking unstable. evaluation.md already documents P1↔P2 label swaps between runs on identical diffs, so a blocking-on-P2 gate can re-block on relabeling alone.
  4. The recorded no-skill control found both planted bugs (see evaluation.md baseline and the existing followup entry), so the heavy default was not backed by recall evidence.

What does this PR change?

Narrows max-review routing to explicit asks, high-risk changes (auth, migration, contracts, concurrency, payments), and large branches; makes the gate block on P0/P1 only, with P2 routed to human adjudication (fix now or track, never silently dropped); scopes post-fix re-review to the fix wave, reserving full reruns for broad fixes. review-protocol.md is untouched (pinned digest unchanged); the shell SKILL.md, requesting-code-review, subagent-driven-development restatements, README line, integration test, pressure scenarios, evaluation records, and a followups entry are updated together.

Is this change appropriate for the core library?

Yes — it tunes the fork's existing general-purpose review-gate wiring (introduced in this fork, not upstream). No new dependencies, no domain-specific content. Not intended for upstream as-is: upstream does not carry this gate wiring.

What alternatives did you consider?

  • Scale the protocol itself by diff size (fewer angles for small diffs): rejected for now — it edits the verbatim-imported review-protocol.md, which carries a pinned digest and a higher evidence bar. Routing + gate semantics live in the shell and account for the observed cost.
  • Usage discipline only (no file changes): rejected — the routing text itself named routine merges as max triggers, so behavior would not change.
  • Keep P2 blocking but drop the full rerun: rejected — label drift (P1↔P2 swaps across runs, already documented in evaluation.md) makes P2-blocking gates unstable regardless of rerun scope.

Does this PR contain multiple unrelated changes?

No. All edits implement or document the single routing/gate-semantics change; the one followups.md entry added for an unrelated test-infrastructure observation (locale-sensitive tests) is registration-only, per this fork's followups convention (issues are disabled).

Existing PRs

Environment tested

Harness Harness version Model Model version/ID
Claude Code (headless evidence sessions) 2.1.206 Claude Opus 4.8 claude-opus-4-8[1m]
Codex CLI (headless evidence sessions) 0.144.1 GPT-5.6 Sol gpt-5.6-sol

Evidence

Before/after live transcripts for the two new pressure scenarios (routing, gate-p2) plus regression reruns of scenarios 1-2 (planted-bug recall, clean-diff honesty) on both harnesses — all after-runs PASS their criteria, both planted bugs still found under explicit invocation — recorded in skills/code-review/evaluation.md with transcripts under docs/superpowers/evidence/code-review/. Deterministic checks: tests/code-review-skill/test-code-review-integration.sh STATUS PASSED (77 assertions, updated to pin the new contract, including three assert_not_contains negatives against the old P2-blocking wording); both SDD dot graphs validate with graphviz; review-protocol.md sha256 unchanged against the pinned digest. An independent reviewer subagent (Claude Opus 4.8) reviewed the full diff — 1 Important + 3 Minor findings, all fixed and re-verified with zero remaining findings. Known-broken environmental test documented in followups.md (locale-sensitive tests/claude-code assertions, reproduced on the untouched pre-edit tree).

New harness support

N/A — no new harness.

Max review stops being the default merge-gate path: routing narrows to
explicit asks, high-risk changes, and large branches; the gate blocks on
P0/P1 only with P2 routed to human adjudication; post-fix re-review is
scoped to the fix wave. review-protocol.md untouched. Includes updated
restatements (requesting-code-review, subagent-driven-development), README,
integration-test assertions, new pressure scenarios, and evidence records.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JdezWcnXee9zEU3jH2cA1X
@liqiongyu liqiongyu merged commit 4174784 into dev Jul 11, 2026
1 check passed
@liqiongyu liqiongyu mentioned this pull request Jul 11, 2026
1 task
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