Skip to content

verification: gate-based verification across Sonnet 5.5, Opus 5.5 and Fable 5.1 #5678

Closed

Description

@kyle-sexton

Move must-not-break verification from instructed prose into deterministic gates (a Stop hook or /goal) plus a scoped independent verifier, with one off/advisory/enforce setting per gate defaulting to Anthropic's recommendation. Includes the gate definitions, the reviewer-weaker-than-implementer gap, and running review on Sonnet versus the consequential-verdict tier rule.

Follow-on from the Sonnet 5.5 prompting-guide work (plan: docs/topics/sonnet-5-5-prompting-digest/PLAN.md on branch feat/sonnet-5-5-prompting-digest; interview answers Q3, Q26, Q32, Q36).

Owner decision D3 (2026-10-18): design first, then decompose. This issue now carries only the design proposal, a read-only lane deliverable. Split out: the owner's approval of the gate set, the defaults and the reviewer rule, after which /work-items:decompose files one slice per gate (see the needs-human child).

Acceptance criteria (C1 design proposal; no file is edited)

  • One comment on this issue with a table listing each candidate must-not-break gate. Columns:
    • the definition, as one checkable condition;
    • the vehicle (Stop hook, /goal, or a scoped verifier);
    • the proposed default (off, advisory or enforce);
    • an upstream URL from code.claude.com or platform.claude.com for that default, or judgment.
  • Each gate names the file that owns it today, if any. For example plugins/toolchain/skills/check/SKILL.md skip classes and plugins/verification/skills/confirm/SKILL.md.
  • Two to three options for the reviewer-weaker-than-implementer rule, and for review-on-Sonnet against the consequential-verdict tier rule. Each option has pros and cons, and the comment cites the file:line where the tier rule lives.
  • No file is edited.

Activity

  1. added
    needs-triage
    on Oct 1, 2026
  2. kyle-sexton commented on Oct 2, 2026

    @kyle-sexton
    MemberAuthor

    Drift found while verifying #5767. toolchain:check (changed in #5767) now names every skip by class, skip (tool missing: <tool>) and skip (dependencies missing: ...), and rolls environment skips into INCOMPLETE. Two things have not caught up:

    • toolchain:lint still reports a bare skip (plugins/toolchain/skills/lint/SKILL.md around lines 200 and 218), and its claim near line 140 that both skills classify one environment the same way is no longer true.
    • verification:confirm SKILL.md near line 139 says lint reports a named environment skip, which it does not.

    Fix: align lint's cell vocabulary and overall line with check's skip-class table, and have confirm's gate read lint's environment skips the same way. Otherwise a lint-only environment gap can pass as done.

  3. kyle-sexton commented on Oct 4, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Agent Brief

    Type: Feature
    Summary: Move must-not-break verification from instructed prose into deterministic gates plus a scoped independent verifier, with one off/advisory/enforce setting per gate.

    Current behavior:
    Verification posture is partly instructed prose. The Sonnet 5.5 prompting work (#5767, plan and interview ledger on #5685, rows Q3, Q26, Q32, Q36) moved toolchain:check and verification:confirm to counting rules and named skips, but there is no general gate mechanism (Stop hook or /goal) with a per-gate setting, no rule for a reviewer running on a weaker model or effort than the implementer, and no resolved answer on running review on Sonnet against the "consequential verdict at session tier or above" rule.

    Desired behavior:

    • A defined set of must-not-break gates, each enforced deterministically (Stop hook or /goal) rather than by instruction.
    • Each gate has one setting, off / advisory / enforce, defaulting to Anthropic's documented recommendation for that gate.
    • A scoped independent verifier runs where a gate needs judgment.
    • A stated rule for the reviewer-weaker-than-implementer gap, and a decision on review-on-Sonnet versus the tier rule.

    Acceptance criteria:

    • Each gate is listed with its definition, enforcement vehicle and default setting, and each default cites its upstream source.
    • A gate set to enforce blocks a run that breaks it; advisory reports without blocking; off does nothing.
    • The reviewer-strength rule and the review-on-Sonnet decision are recorded where the tier rule lives.

    Out of scope:

    Routing: human-gated, needs decision

    This is cross-cutting work across hooks, verification skills and the tier rule (work class: structural, C4), and it holds open design decisions: which gates exist, which vehicle enforces each, and the review-on-Sonnet question. Those need the operator before any agent picks it up.
    Basis: judgment, from the body's scope and #5685 rows Q3, Q26, Q32, Q36.

    Priority: medium. Nothing is blocked on it today, and it has no deadline.

    Request: split out the confirmed drift as its own bug. The drift in the comment above holds on main (6690dad). toolchain:lint still reports a bare skip and still claims both skills classify an environment identically, and verification:confirm says lint names environment skips, which it does not. A lint-only environment gap can therefore reach CONFIRMED. That is a scoped bug fix (C3) a lane could take today, but it stays unworked while it lives on this epic. Recommended: file it as a separate bug item.
    Basis: verified, plugins/toolchain/skills/lint/SKILL.md:140, :200, :218 (bare skip, identical-classification claim); plugins/toolchain/skills/check/SKILL.md:185-192 (named skip classes, INCOMPLETE); plugins/verification/skills/confirm/SKILL.md:140 (claims lint names environment skips).

    Stale reference: the body points at a PLAN.md on feat/sonnet-5-5-prompting-digest. That branch merged as #5767 and the plan now lives on #5685.

  4. added
    needs-human
    needs-owner-decision
    and removed
    needs-triage
    on Oct 4, 2026
  5. kyle-sexton commented on Oct 4, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during work-loop.

    The confirmed lint-skip drift from the triage comment above is now filed as its own bug, #6192, so a lane can fix it without waiting on this epic.

  6. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    Question: An epic to turn verification prose in the toolchain and verification plugins into deterministic gates with off/advisory/enforce settings. It also asks for a rule for when the reviewer runs on a weaker model than the implementer. Options: (a) design first (gate set, settings, reviewer rule), then decompose; (b) pilot one advisory Stop-hook gate first; (c) park it until a missed defect shows up.

    Owner's answer: (a) Three design questions are open, and a single pilot settles none of them. Nothing is blocked, so (c) is a fair fallback. Basis: issue labels needs-decision and work-class: structural; judgment.

    The owner accepted this recommendation as item D3 of a 32-decision batch in an attended backlog-shaping session on 2026-10-18. The batch question: "Accept all 32 recommendations, including the four flagged above (D2 close the relearn, D26 cross-repo sync without per-repo confirm, D10 narrow hook, D23 delete guard only)?" The owner answered: "Accept all 32 (Recommended)".

    Posted by AI from the owner's answer in that session.

  7. removed
    needs-owner-decision
    needs-human
    on Oct 22, 2026
  8. 14 remaining items

  9. added
    agent-ready
    needs-human
    and removed
    agent-ready
    on Oct 26, 2026
  10. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped partway through this issue and needs a person.

    Why, in the run's own words:

    This lane cannot deliver what the issue asks for. The issue's acceptance criteria (C1 design proposal, owner decision D3) ask for one comment on the issue holding a design table, with a cited upstream URL per gate and file:line citations, and say no file is edited. The work-resolve-issue lane gets text out in only two ways. (1) A done run opens a PR from committed changes, and a done run that commits nothing is reported as stopped (.github/scripts/work-resolve-issue/report-outcome.mjs, decide(), lines 747-756). (2) A pushback or stopped run posts a hand-back comment that quotes at most 3000 characters of the run's reason. That text is neutralized: links and URLs are broken (': // ' becomes ': //') and '#' becomes a full-width character (lines 286-314). The first way breaks the 'no file is edited' criterion. The second cannot carry a cited multi-gate table. So the design was not drafted. A person needs to choose one of these: (a) run the design pass in an attended session (for example /work-items:work 5678, or a work-loop lane that can post issue comments) so the table goes on the issue as a comment; or (b) change the acceptance criteria so the proposal is a committed design doc (for example under docs/topics/), which this lane can deliver as a PR. Then remove needs-human and add agent-ready again. Also noted: the body points to a PLAN.md on feat/sonnet-5-5-prompting-digest, which merged as #5767; the triage comment says the plan now lives on #5685.

    What the run says it did not do:

    • The design-proposal table (gates, vehicles, defaults with upstream citations, owning files) and the reviewer-strength and review-on-Sonnet options were not drafted, because the lane cannot post them as the issue comment the criteria require.
    • PR prep (review, build, lint) was skipped: there is no diff to review.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40354685748

    To retry, remove needs-human and add agent-ready again.

  11. added
    host-run
    status: confirmed
    and removed
    status: ready
    needs-human
    on Oct 27, 2026
  12. kyle-sexton commented on Oct 30, 2026

    @kyle-sexton
    MemberAuthor

    Host run. This run drafted the C1 design proposal for gate-based verification: the gate table, the vehicle and proposed default for each gate, and the options for the reviewer-strength and review-on-Sonnet questions.

    What ran

    • Read origin/main at 9075db7: docs/plugin-philosophy.md, docs/contracts/loop-lane/README.md, docs/conventions/pr-pipeline.yaml, ADR 0002, every plugin hooks.json with a Stop event, and the skills and scripts named below.
    • Fetched these upstream pages live on 2026-10-30, as raw markdown:
    • Claude Code 2.1.314. No model run and no eval: this criterion is a read-only design pass.
    • Acceptance criteria:
      • Gate table with definition, vehicle, default and source: done (below).
      • Owning file per gate: done.
      • Two or three options for each rule, each with pros and cons and the tier rule's file:line: done.
      • No file edited: done. No branch and no PR.

    Facts this design rests on

    • Upstream does not class /goal as deterministic. Best practices, Deterministic and non-deterministic instructions, lists "A request for evidence, /goal, /code-review" under "Non-deterministic (Claude decides)". It lists "Tests, typecheck, a Stop hook, CI" under "Deterministic". The goal evaluator runs on "your configured small fast model". It "does not call tools, so it can only judge what Claude has already surfaced in the conversation" (goal: how evaluation works, evaluation model and cost). The issue body calls /goal a deterministic gate. Below, /goal counts only as a vehicle for a condition that an objective signal already decides in tool output (tier rule 4).
    • No upstream page sets a default. Upstream says "How strict you make the check is up to you" (give Claude a check to run). It also says "a hook is for a rule with zero exceptions" (enforce the rules that can't have exceptions). The pages support the choice of vehicle, never an off/advisory/enforce value, so every default below is judgment. That source limits enforce to zero-exception rules.
    • Upstream maps the three settings onto a Stop hook (hooks: Stop decision control):
      • off: exit 0 and print nothing.
      • advisory: exit 0 with systemMessage, which is shown to the user and does not continue the turn.
      • enforce: decision: "block" with a reason, or exit 2.
      • hookSpecificOutput.additionalContext also continues the turn. It is a nudge, not an advisory, so no setting uses it.
    • enforce on Stop has two limits:
      • After eight blocks in a row with no tool call between them, Claude Code overrides the next block (hooks: Stop input).
      • onFailure: "block" (hooks) conflicts with this repository's Stop-gate stance. plugins/autonomy/hooks/lane-stop-gate.sh:21-30 is default-off and fail-open, so it cannot wedge an interactive stop. Proposed: Stop gates stay fail-open, and enforce blocks only on a definite failure.
    • Review lanes are live on Sonnet and now gate merges.
      • pr-review is sonnet at effort high (docs/conventions/pr-pipeline.yaml:686-688).
      • Routes review-code and review-security use it (:734-735).
      • .github/workflows/pr-review-hosted.yml:102 and pr-review-security-hosted.yml:107 resolve those routes.
      • Since the ADR 0002 addendum of 2026-10-30 (docs/adr/0002-default-on-ai-review-advisory-with-earned-promotion.md:422-427), ci-status fails a non-draft PR unless both review lanes passed on the head.

    Gate table

    Each setting reuses the gate's existing knob. It adds no second mechanism.

    # Gate: one checkable condition Vehicle Proposed default Source for the default Owner today, and existing knob
    G1 The newest mechanical result for the current tree reads Overall: PASS. FAIL, INCOMPLETE (an environment skip remains) and STOPPED do not pass. Stop hook (command). It reads a result recorded for the tree hash and does not rerun the suite. advisory. enforce in lanes. judgment; vehicle: enforce the check with a Stop hook plugins/toolchain/skills/check/SKILL.md:144-152,172 sets the counting rules. No hook and no knob.
    G2 The /toolchain:lint result counts its environment skips the same way G1 does. A lint-only skip never reaches CONFIRMED. Folded into G1, with the same recorded result. Same as G1 judgment plugins/toolchain/skills/lint/SKILL.md. The drift is tracked in #6192.
    G3 The change matches its spec. A fresh-context verifier that sees the spec and the diff, but not the implementer's reasoning, returns CONFIRMED. Scoped verifier: a read-only subagent. A command hook cannot judge intent. advisory judgment; vehicle: review against your spec and know what subagents cost ("a reviewer that hasn't seen how the code was written") plugins/verification/skills/confirm/SKILL.md:148-153 (gate result order). The knob is proof_level (:93).
    G4 An Edit or Write to a test file removes no test block and adds no skip unless it carries a test-change: reason. PreToolUse hook (existing). Not a Stop gate. advisory judgment plugins/testing/hooks/test-weaken.sh:4-6,18-22. The existing knobs map cleanly: off is test_guards_enabled false, advisory is the default, enforce is rules: {test-weaken-block: error}.
    G5 An opted-in autonomous lane does not end its turn until it declares completion. Stop hook (existing) off interactive. enforce for opted-in lanes. judgment; mechanism: Stop decision control plugins/autonomy/hooks/lane-stop-gate.sh:21-23. The knob is boolean lane_stop_gate, from trusted sources only (:32-40), and maps to off or enforce.
    G6 Every acceptance criterion in the run's brief is shown by a command and its output in the transcript. /goal, valid only under tier rule 4: the evaluator is a small fast model with no tools and judges only surfaced output. off. A long unattended run sets it. judgment; upstream: "You rarely need this in the session yourself. It matters for long background runs" (give Claude a check to run) plugins/planning/skills/draft-goal-condition/SKILL.md drafts the condition. No knob.
    G7 A claimed improvement cites a baseline captured before the change. Without one, the verdict is "cannot quantify". Scoped verifier advisory judgment plugins/verification/skills/measure/SKILL.md:17,64,77. No knob.
    G8 gh pr ready runs only when a pass or skipped verify result is recorded for exactly that head. Script gate (existing): check runs in the same shell command as the flip. enforce (as today) judgment plugins/source-control/skills/pull-request/scripts/verify-gate.sh:2-9. --skip verify or pre_ready records skipped.
    G9 The Markdown in uncommitted changes is lint-clean at the end of the turn. Stop hook (existing) off (as today). The PostToolBatch hook already runs on each tool batch that touches Markdown. judgment; vehicle: enforce steps with hooks plugins/markdown-format/hooks/hooks.json Stop row. The knob is MARKDOWN_FORMAT_END_OF_TURN.
    G10 For each review lane, the newest run on the PR head finished with its status job and its Apply the hold step succeeded, and no lane hold label stands. CI: the ci-status required check enforce (as today) judgment; upstream lists "Branch protection" as the last word (table) .github/workflows/pr-require-checks.yml, under ADR 0002 addendum :422-427

    For the verifier gates (G3, G7), the verdict is recorded per head commit, the way verify-gate.sh record stores one. Under advisory, the G1 Stop hook or G8's verify-gate.sh check reports a missing or failing verdict. Under enforce, it refuses.

    Where the setting lives: in plugin userConfig, read from trusted sources only, as lane-stop-gate.sh:32-40 does. A watched repository's own env block must not be able to turn off a gate.

    The tier rule

    Tier rule 3 is at docs/plugin-philosophy.md:1237-1238: "A judgment verdict is never on a weaker model than the work it checks". Rule 4 is at :1239-1240: a cheaper checker only with an objective failure signal. The lane copy is at docs/contracts/loop-lane/README.md:652. The upstream basis is advisor tool: model compatibility: the advisor "must be at least as capable as the executor". Applying an API advisor rule to a review subagent is the repository's own reading, and :1253-1256 says so.

    Reviewer weaker than implementer

    The gap: the tier table (docs/plugin-philosophy.md:1304) sends a verdict to opus, "or the tier of the checked work when that is higher". A Fable-written change therefore needs a Fable reviewer. The lanes have no Fable profile, which is owner-gated (docs/conventions/pr-pipeline.yaml:709-712).

    • R1: strict equal-or-stronger, as written. Fable-written work gets a Fable reviewer.
      • Pros: matches the advisor rule, and has nothing to classify.
      • Cons: the costliest option. Lanes cannot do it until the owner opens a Fable allowance, so today the rule is unmet for any Fable-authored PR.
    • R2: a weaker reviewer may block but not clear. A weaker reviewer's findings stand, but its PASS counts only together with an objective gate (G1 or G8). A finding the implementer disputes goes to an equal-or-stronger adjudicator, as adjudicate-feedback already does "so a weaker model never overrules the reviewer" (pr-pipeline.yaml:742-745).
      • Pros: reuses the existing pattern and matches rule 4.
      • Cons: a judgment-only defect (wrong intent, a missing case with no test) can still pass when the weaker reviewer misses it.
    • R3: cap at the strong tier and raise effort. The reviewer runs at or above min(implementer, opus), at xhigh when the implementer is above opus.
      • Pros: bounded cost, and it can run today.
      • Cons: departs from rule 3 for Fable work. Rule 1 (:1232) tunes effort before adding a model. Rule 3 is about capability, and effort does not raise capability.

    Recommendation: R2 now, with R1 for security-surface work once a Fable allowance exists. That work already routes to the frontier tier (docs/contracts/loop-lane/README.md:653). Basis: judgment, from pr-pipeline.yaml:742-745 precedent.

    Review on Sonnet against the consequential-verdict rule

    The conflict: the review lanes give a consequential verdict, since it gates merges (ADR 0002 :422-427), on sonnet/high (pr-pipeline.yaml:686-688). PRs here are written by Opus or Fable sessions. Upstream names Opus 5.5 as the default model (change the model and effort). The high pin meets the effort rule (docs/plugin-philosophy.md:1427) but not model rule 3 (:1237).

    • S1: raise pr-review to opus.
      • Pros: conforms to rule 3 for Opus-written PRs, and the change is one line.
      • Cons: both lanes run on every push (ADR 0038), so plan usage rises with push count. Fable-written PRs are still reviewed by a weaker model.
    • S2: R2 applied to the review lanes. Sonnet findings hold the PR, and Opus adjudicates a finding only when it is disputed, as adjudicate-feedback does today. A Sonnet PASS clears the PR only when an objective gate is green on the head (G1, or the test lanes). Without one, an Opus confirmation pass must read the diff first.
      • Pros: it is the R2 rule applied here and reuses the adjudicator. Opus runs only on disputes and on PRs that have no objective signal.
      • Cons: on a PR with no objective signal, the confirmation pass costs about as much as S1. On a PR with one, a judgment-only defect that Sonnet misses still passes.
    • S3: keep Sonnet and record a rule-4 exception. Sonnet stays the reviewer only on PRs where an objective signal covers the change (G1 green and test lanes passed on the head). A PR touching a security-surface work class, or one with no test coverage of the changed paths, routes to opus.
      • Pros: cheapest, and the exception is written where the rule lives.
      • Cons: needs a path or coverage classifier. Rule 4's own warning, that a checker which passes bad work lets failures through, still applies to judgment-only defects.

    Recommendation: S2. It keeps the reviewer-strength rule and the review lanes as one rule. It pays for Opus only where neither an adjudication nor an objective signal backs the Sonnet verdict. The evidence that would settle it is the effort eval sweep in #5682: Sonnet high against Opus finding recall on the same PR set. Basis: judgment.

    Target labels: add none; remove host-run.

  13. removed
    host-run
    on Oct 30, 2026
  14. kyle-sexton commented on Oct 31, 2026

    @kyle-sexton
    MemberAuthor

    Closing as completed. Every C1 acceptance criterion is met by the 2026-10-30 design proposal comment. Checked against origin/main at 2e4f59b9b8.

    • One comment with a gate table (definition, vehicle, default, upstream URL or judgment): met. The "Gate table" section has rows G1 to G10, with those columns.
    • Each gate names the file that owns it today: met. The "Owner today, and existing knob" column names one per gate. The ten files it cites exist on origin/main, including plugins/toolchain/skills/check/SKILL.md, plugins/verification/skills/confirm/SKILL.md, plugins/testing/hooks/test-weaken.sh, plugins/autonomy/hooks/lane-stop-gate.sh and plugins/source-control/skills/pull-request/scripts/verify-gate.sh.
    • Two to three options for each rule, with pros, cons and the tier rule's file:line: met. R1 to R3 cover reviewer-weaker-than-implementer, and S1 to S3 cover review on Sonnet, each with pros and cons. The comment cites the tier rule at docs/plugin-philosophy.md:1237-1240, which reads as quoted on origin/main.
    • No file edited: met. The comment records no branch and no PR.

    The owner's approval of the gate set, defaults and reviewer rule stays with #9154, which was blocked by this issue. Its criterion records that decision here as a **Decision recorded.** comment, and a closed issue still takes one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: confirmed

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions