Skip to content

quest: scale review, CI, and landing to the risk tier - #802

Merged
kixelated merged 12 commits into
mainfrom
quest/m0/benchmark/guardrails
Nov 22, 2026
Merged

kixelated merged 12 commits into
mainfrom
quest/m0/benchmark/guardrails

Conversation

@kixelated

@kixelated kixelated commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Scales review, CI, and landing to a PR's risk tier, as the guardrails quest planned, and deletes that quest.

Tier Local review CI Lands on
Low None: quest review records that the online reviewer alone reviews it The checks its diff reaches Its own, when its class is in RISK.md's ## Automatic list; else the maintainer's pick
Medium The size's pick, as before The checks its diff reaches The maintainer's pick
High The size's pick plus a second reviewer on another model The full suite quest suite names The maintainer's pick, with the full brief

Changes

  • RISK.md format (src/core/risk.ts): two new optional sections. ## Automatic lists named classes (`name` - rule over the diff). ## Full suite holds one fenced command. quest check reports malformed ones.
  • Classifier: when the base lists classes, its reply schema adds class (a listed name, or null). The record gets a - Class: line, and quest status gets a new class line.
  • quest review:
    • A low head with nothing left to settle runs no reviewer. It writes a record naming the head in full, with - Local review: none, ..., and prints next done.
    • A high head also seats a second reviewer: the first entry of the size's list on a model other than the pick's that can run, in its own session that reviews every head while the tier is high and settles its findings after. A round that raises the tier to high saves its rounds and runs the second reviewer in the same run, so a rising tier reopens the review the lower tier skipped; when none can run, it prints those rounds before failing as an outage.
    • --model and --effort change only the pick, so a high head keeps its second reviewer; the one reviewer --harness names runs alone.
    • --override <tier> --reason <text> records the maintainer's tier. It holds across heads until the reviewed tier grows riskier than the one overridden.
  • quest suite <pr> (new): prints the base's full-suite command when the head is high or no tier covers it, and prints nothing otherwise, so a repository's gate can run it.
  • quest usage:
    • The tier rollup adds overrides and time waited on a person.
    • A new By automatic class rollup shows PRs, how many were low, merged, later fixed, and time waited on a person.
    • Second reviewers get their own reviewer rows.
  • Skills and rules:
    • /quest-run's standing pick now comes from the tier and class instead of a prose list. The trivial-PR clause (any author, Pullfrog approval) stays, at any tier. A high PR is asked about with the full brief.
    • /quest-merge: a tier that rises on a later head ends the pick. A low head's record counts without a local reviewer.
    • /quest-review: describes the tiers and the override.
  • This repo: RISK.md starts its ## Automatic list with the standing pick's classes (tests, internal-docs, refactor, trivial), without CI (see Waiting). AGENTS.md's merge rule now points at that list.
  • Benchmark epic: its last child is gone, so quest/m0/benchmark/README.md is now sized [M]. It holds the epic's own end-to-end check, which needs Kixel Code's factory page.

Choices the plan left to the implementer:

  • A class is a prose rule that the classifier judges, not a path glob. Globs cannot express "behavior-preserving code" or "a dependency bump". /quest-run still judges the diff against the rule before auto-merging, and asks when unsure.
  • The second reviewer comes from the size's existing ranked list, not a new table column, which is simpler. Where every other model is avoided (no ## Models record under a single-model harness), the run fails as a usage error. Where they are only unavailable, it fails as an outage.
  • The full suite is exposed through a command rather than run by quest, since quest cannot run a repository's CI. This repository names no ## Full suite, since its gate already runs everything.

Public API

  • quest/core:
    • RiskFile gains classes and suite, and RecordedRisk gains class and overridden.
    • Status.risk gains a required class. Kixel Code's forge must supply it (see Follow-ups).
    • New export: Class.
  • CLI:
    • New quest suite, and new quest review --override/--reason.
    • quest status prints a new class line after risk.
    • The ## Review record gains - Overridden:, - Class:, - Local review: lines and a , second Reviewer suffix. quest usage --json gains classes plus overridden/person on tier rows and second on reviewer rows.
  • The saved review state under .git/quest/review/ gains second sessions and an override, which a reverted release would misread as the pick's: pass quest review --new once on such a branch.

Validation

  • just check and just test pass (1581 tests) on 3db6600, after merging origin/main (which brought feat(review): routing evidence readout, and retarget the shadow by size #801; its shadow-step change and this PR's second seat both pass through seatsFor).
  • Local review: six rounds with Sol xhigh, its high shadow, and Sonnet high as the second reviewer, run with ANTHROPIC_BASE_URL unset so Claude Code uses its stored login. Round 1 found 17 (fixed 15, refuted 2: the override is the maintainer's by design, and AGENTS.md skips backwards compatibility for saved state); round 2 found 2, both fixed; round 3 found 1 and reached the checkpoint, where the maintainer chose to continue (see Decisions); round 4 settled it, with Sol xhigh at 10 and Sonnet at 9, and left one low finding, fixed; round 5, on the head that drops the ## Undo gate, found nothing (Sol 10, Sonnet 9); round 6, on the fix for Pullfrog's finding that a --model or --effort run on a high head skipped the second reviewer, scored Sol 10 and Sonnet 9 with one low wording finding, fixed. Fix tests: a raise's second review falling back, printing its saved rounds on any failure, an outage or a usage error when no other model is left, and reusing the seat that settles findings; a named --effort run still seating the second reviewer (fails with the old code); an override equal to the tier, and a --effort run on a high head seating the second reviewer (fails with the old gate).
  • Real surface, in a scratch clone whose base carries this branch's RISK.md, on a branch that only adds a comment to a test:
    • quest review --size XS ran the real classifier (Codex gpt-6.1-sol low, since Claude Code is logged out here). Codex accepted the nullable class enum schema. Output: risk low ..., class tests, no reviewer, next done: the head is low risk, so the online reviewer alone reviews it.
    • --override high --reason ... on the same head seated the pick, its shadow, and a Sonnet second reviewer. Claude Code was logged out, so it ended as an outage (exit 3). The first try exposed a bug: the outage blamed Sol, because the aborted Codex seats rethrew the same error object and re-tagged it as the pick's. Fixed. The rerun names only claude-sonnet-5-5 medium. The regression test (a hanging Codex beside a usage-limited Sonnet) fails without the fix and passes with it.
  • A second, independent check: unit tests cover the risk-file parser, the record round-trip, and suiteFor's tier/state table.
  • quest merge was not run against a live PR.
  • quest eval run was not run: this PR changes the classifier's prompt and adds the second seat in review(), but leaves the reviewer table in src/cli/models.ts and the reviewer prompts (reviewPrompt, reportPrompt, laterPrompt) unchanged, and quest eval seats its cases' pick and shadow itself without the classifier or the second reviewer, so the base's and head's builds would score the same.

Decisions

  • CI workflow changes and automatic merging (maintainer, 2026-11-22, comment): ✅ keep CI workflow files high, so CI changes need the maintainer's pick, while trivial GitHub Action version bumps stay automatic through /quest-run's trivial clause (rejected: Action bumps also wait for a pick; a ci class that stops treating workflow files as always high). The head already implements this: RISK.md's ## Automatic list has no CI class, and ALWAYS_HIGH keeps .github/workflows/ and .github/actions/.
  • Review checkpoint after round 3 (maintainer, 2026-11-22, via /quest-run): ✅ continue: a failure of the second review a raise calls for prints the rounds saved before it, whatever the failure, and round 4 reviews that (rejected: rethink the in-run second review so the record never counts for a high head until a second reviewer's round is on it).
  • Undo (maintainer, 2026-11-22, comment: "I definitely don't want Undo to be a gate, remove the section."): ✅ no ## Undo requirement. quest merge refuses no PR for lacking one, PR bodies and quest land watch's bump PRs carry none, and the guide, skills, README, and the benchmark epic's Goal and Plan no longer ask for one (rejected: the Undo gate as built). The epic's Plan records the decision.

Follow-ups

For /quest-plan in other repositories' quest trees:

  • kixel-ai/kixel-code: Kixel Quest's forge must supply Status.risk.class, which quest status reads.
  • moq-dev/moq and moq-dev/moq.pro: name ## Full suite in RISK.md (just gate and the nightly tier) and have the merge-queue gate run quest suite <pr> beside its scoped checks. The full suite for PRs from authors without write access runs unconditionally, since their body's tier is untrusted.

Overlap: moq-dev/quest#801 (routing evidence) merged first; this head merges it.

Models

  • Size: L
  • Implementer: Claude Code, claude-opus-5-5, unknown effort
  • Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)
  • Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, XS)
  • Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Review

Rewritten by quest review after each round.

  • Head: 7fc7d13, named in full once no reviewer reports a finding

  • Base: origin/main at 207fa78

  • Risk: high, it changes RISK.md, which is always high: it sets the tier of every later change

  • Classified: high by the always-high paths

  • Reviewer: Codex, gpt-6.1-sol, xhigh effort

  • Session: 01a20188-8194-7001-87d4-738fe661e931, round 6

  • Score: 10/10, The incremental change preserves the second-reviewer requirement for high-risk heads when --model or --effort changes the pick, with no new issues found.

  • Rounds: 6; first round 4 (high 1, medium 3); findings 5 (high 1, medium 4): fixed 5, refuted 0, open 0

  • Findings: none

  • Reviewer: Claude Code, claude-sonnet-5-5, high effort, second

  • Session: abb2968f-8360-45d7-9184-8f29b3b9fa5e, round 6

  • Score: 9/10, The head makes a high head keep its second reviewer when `--model` or `--effort` changes the pick, with a test; the only issue is a garbled help sentence that the README repeats.

  • Rounds: 6; first round 10 (high 2, medium 5, low 3); findings 12 (high 2, medium 5, low 5): fixed 9, refuted 2, open 1

  • Findings, open until the next round settles them:

    • Low, src/cli/main.ts:1755: The `quest review --help` sentence about the second reviewer reads as garbled
  • Reviewer: Codex, gpt-6.1-sol, high effort, shadow

  • Session: 01a20188-8194-7c23-ba58-3487c6d9d99b

  • Rounds: 3; first round 3 (medium 3); findings 4 (medium 4): fixed 4, refuted 0, open 0

Finished on 3db6600: round 6's one finding, low, fixed (the second-reviewer sentence in quest review --help and the README now says what the reviewer is before when --harness skips it); no further round ran.

kixelated and others added 2 commits November 21, 2026 19:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits November 21, 2026 19:56
…e guardrails quest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Scale review, CI, and approval to a PR's risk tier quest: scale review, CI, and landing to the risk tier Nov 22, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-22, /quest-run) on the CI workflow question under ## Waiting:

  • ✅ Keep CI workflow files high, so CI changes need the maintainer's pick, while trivial GitHub Action version bumps stay in the automatic list (rejected: Action bumps also wait for a pick; a ci class that stops treating workflow files as always high).

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

The maintainer decision is recorded under ## Decisions. The head already applies it with no code change: RISK.md's ## Automatic list has no CI class, ALWAYS_HIGH keeps .github/workflows/ and .github/actions/ high, and /quest-run's trivial clause keeps GitHub Action bumps automatic once Pullfrog approves their head.

(Written by Claude Opus 5.5)

kixelated and others added 2 commits November 21, 2026 20:46
… low exemptions on the head

The second reviewer seated to settle findings serves as the raise's second
review; a raise saves its rounds before the second review runs and falls back
to the next model; settling a second reviewer's findings honors exclusions; an
override to the reviewed tier records nothing. merge --land exempts a low
record only for the head it names and refuses a malformed one; bump bodies say
how to undo them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot run, and seat it from the size's whole list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits November 21, 2026 21:06
…d review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 22, 2026 05:08
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e868c0f-7dc4-4e0c-8614-a63f66d68654
Commits

Reviewing files that changed from the base of the PR and between 207fa78 and 3db6600.

Files selected for processing: 25

  • AGENTS.md
  • README.md
  • RISK.md
  • assets/skills/merge.md
  • assets/skills/review.md
  • assets/skills/run.md
  • quest/m0/afk-and-waits.md
  • quest/m0/benchmark/README.md
  • quest/m0/benchmark/guardrails.md
  • quest/m0/routing-evidence/README.md
  • src/cli/main.ts
  • src/cli/review-record.ts
  • src/cli/review.ts
  • src/cli/status.ts
  • src/cli/suite.ts
  • src/cli/usage.ts
  • src/core/forge.ts
  • src/core/index.ts
  • src/core/risk.ts
  • src/github/status.ts
  • test/review.test.ts
  • test/risk.test.ts
  • test/status.test.ts
  • test/suite.test.ts
  • test/usage.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-22, /quest-run pick round):

  • Merge pick: ✅ /quest-merge, once the change below is made (rejected: explain first, rethink, skip).
  • Undo: "I definitely don't want Undo to be a gate, remove the section." ✅ Remove the ## Undo requirement entirely: quest merge no longer refuses a PR for lacking it, PR bodies no longer carry an ## Undo section, and the quest land watch bump PRs drop theirs (rejected: the Undo gate as built).
  • Follow-up for kixel-ai/kixel-code: ✅ keep only its class field part, since quest status reads it; drop its Undo part.
  • Follow-up for moq-dev/moq and moq-dev/moq.pro (full suite in RISK.md, the gate runs quest suite <pr>): ✅ keep (rejected: drop).

(Written by Claude Opus 5.5)

@pullfrog pullfrog 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.

ℹ️ No critical issues — two rough edges inline.

Approach: sound. The tier is set once in review() before any reviewer is seated, and the same recorded tier drives review depth, quest suite, and quest merge's undo check, so the three can't disagree about a head. Choosing prose class rules over path globs makes sense, because globs can't express "behavior-preserving".

Reviewed changes

All 29 files at 7beb70d were reviewed, tests included:

  • RISK.md format: parseRiskFile now reads the optional ## Automatic classes and ## Full suite command, and reports duplicate or malformed entries.
  • Classifier class: a nullable class enum is added to the reply schema only when the base lists classes. It is recorded as - Class: and surfaced by quest status.
  • Tier-scaled quest review: a low head skips local review. A high head seats a second reviewer on another model. A mid-run raise to high saves its rounds and then runs the second review. When that review fails, the saved rounds ride on the error so they get printed.
  • --override/--reason: the maintainer's tier is stored in saved state and holds until the reviewed tier is riskier than the tier it replaced.
  • quest merge undo check: undoable refuses a PR with no valid ## Undo unless its record says low for the exact head being landed. It runs again on the fresh read.
  • quest suite: prints the base's full-suite command when the head is high or no record covers it.
  • quest usage: adds the overridden count and time waited on a person to each tier, a per-class rollup, and second reviewer rows.
  • Skills/rules: the standing pick now comes from the tier and class. Low records count in /quest-merge, and the guide asks for ## Undo.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread src/cli/review.ts Resolved
Comment thread src/cli/hold.ts Resolved
kixelated and others added 2 commits November 21, 2026 22:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quest merge no longer refuses a PR without an ## Undo section, bump PRs and
docs drop theirs, and the benchmark epic records the decision. Links to the
deleted guardrails quest that the base brought in now point at RISK.md and #802.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog 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.

ℹ️ No new issues in the new commits. The prior thread on --model/--effort skipping the second reviewer on a high head is still open and unchanged.

Reviewed changes

This run reviewed the three commits since 7beb70d: a doc-comment fix, the merge of origin/main (#801), and the removal of the ## Undo gate.

  • Removed the ## Undo gate: undoable is gone from land() in src/cli/hold.ts. UNDOS/undoProblem are gone from src/core/risk.ts, and bodySection is folded back into reviewSection. land-bump.ts no longer writes a ## Undo section. Their tests are removed too. No Undo reference remains in src, assets, the README, or the help text.
  • Updated docs and quests: the README, quest merge help, and the /quest-merge, /quest-review, and /quest-run skills no longer ask for an undo line. The benchmark epic records the maintainer's decision. afk-and-waits.md and routing-evidence/README.md now point at RISK.md and #802 instead of the deleted guardrails quest.
  • Merged #801's shadow-by-size change: seatsFor now takes size and calls shadowOf(size, routed). The "one effort lower" doc comments now say "one effort away". The second reviewer excludes only the pick's model, and the shadow uses that same model, so the two seats can't collide.
  • Moved ReviewOutageError's doc comment back onto the class.

Pullfrog  | Fix it ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

…rt runs too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kips it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

This run reviewed the two commits since the prior pullfrog review at c4f59a8.

  • Second reviewer on named runs: high() in src/cli/review.ts now gates on auto alone, so a --model or --effort run on a high head still seats the second reviewer. This closes the earlier thread, which is already resolved. Only --harness runs alone.
  • Docs reworded: the README and quest review --help say that --model and --effort change only the pick, and that the one reviewer --harness names runs alone.
  • Regression test: test/review.test.ts adds an --effort high stage that expects both the pick and the second reviewer rows.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 4f97561 Nov 22, 2026
20 checks passed
@kixelated
kixelated deleted the quest/m0/benchmark/guardrails branch November 22, 2026 06:22
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