Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 36 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1569,39 +1569,42 @@ base gained since, which a diff against its tip shows as reverted.
The first round explores the change once. It runs the reviewer's own review,
`codex exec review` with custom instructions or Claude Code's `/code-review
<effort> <merge-base>...HEAD` with text after the target, given the range, the
base's `REVIEW.md`, if any, and any earlier findings and responses up front.
Neither returns a JSON schema itself, so the round resumes that session for one
turn that reads nothing and reports the review in one schema, with a score from
0 to 10 for how ready the head is to land and one sentence on why: 10 lands as
is, 7 to 9 lands after the findings are fixed, 4 to 6 needs rework, and 0 to 3
is the wrong approach. A head with no findings can still score below 10. A
reply without a valid score fails like any malformed reply. Each finding is
high, medium, or low severity; low is anything that would not block landing.
The score informs; the findings and their refutations still decide when the
loop ends. Later rounds take `--responses`, the author's free-text fixes and
refutations, which a round that reported findings requires. A later round
resumes the session and checks only what changed since the last round's head
and its findings when nothing but the head changed: the same model, effort, and
base, a merge base the last round's covers, as when the base moved on, and the
same applicable `AGENTS.md`, `CLAUDE.md`, and `REVIEW.md`. Otherwise it starts a
new session that reviews the whole change and still weighs the responses. A
round that would resume on the head the last round reviewed, when that round
found nothing, runs no reviewer and repeats that round, marked `unchanged`. A refutation stands only when it cites evidence the
reviewer can check. Findings are numbered across the reviewers, in the order
the round printed them. The prompt numbers the last round's findings, and the reply
settles each by its number as fixed, refuted, or still open, with a one-sentence
reason; a reply that skips or repeats one, or keeps more open than it reports,
fails like any malformed reply. A first round's schema has no such list. Each
reviewer settles only its own findings, and gets `--responses` only when it has
some, so on the same head only a reviewer with findings runs. Resuming keeps the
reviewer's prompt cache; Claude Code is asked for its 1-hour cache, and Codex
keeps its default. Each reviewer's session is kept per branch in the clone's
common Git directory, so any worktree of the clone resumes it;
`--new` starts new sessions, but continues each reviewer's tally of its findings
on the branch, less those it drops unsettled, unless the saved state is one
this quest cannot read. `--branch` names the branch instead of the checked-out one, which a
detached `HEAD` requires, such as a checkout of a branch another worktree
holds, so its rounds continue that branch's session.
base's `REVIEW.md`, if any, and any earlier findings and responses up front. It
also asks the reviewer to name each contract the change alters and search past
the diff for the dependents left on the old one. Neither returns a JSON schema
itself, so the round resumes that session for one turn that reads nothing and
reports the review in one schema, with a score from 0 to 10 for how ready the
head is to land and one sentence on why: 10 lands as is, 7 to 9 lands after the
findings are fixed, 4 to 6 needs rework, and 0 to 3 is the wrong approach. A
head with no findings can still score below 10. A reply without a valid score
fails like any malformed reply. Each finding is high, medium, or low severity;
low is anything that would not block landing. The score informs; the findings
and their refutations still decide when the loop ends. Later rounds take
`--responses`, the author's free-text fixes and refutations, which a round that
reported findings requires. A later round resumes the session and checks only
what changed since the last round's head and its findings when nothing but the
head changed: the same model, effort, and base, a merge base the last round's
covers, as when the base moved on, and the same applicable `AGENTS.md`,
`CLAUDE.md`, and `REVIEW.md`. Otherwise it starts a new session that reviews
the whole change and still weighs the responses. A round that would resume on
the head the last round reviewed, when that round found nothing, runs no
reviewer and repeats that round, marked `unchanged`. A refutation stands only
when it cites evidence the reviewer can check. Findings are numbered across the
reviewers, in the order the round printed them. The prompt numbers the last
round's findings, and the reply settles each by its number as fixed, refuted,
or still open, with a one-sentence reason; a reply that skips or repeats one,
or keeps more open than it reports, fails like any malformed reply. A first
round's schema has no such list. Each reviewer settles only its own findings,
and gets `--responses` only when it has some, so on the same head only a
reviewer with findings runs. Resuming keeps the reviewer's prompt cache; Claude
Code is asked for its 1-hour cache, and Codex keeps its default. Each
reviewer's session is kept per branch in the clone's common Git directory, so
any worktree of the clone resumes it; `--new` starts new sessions, but
continues each reviewer's tally of its findings on the branch, less those it
drops unsettled, unless the saved state is one this quest cannot read.
`--branch` names the branch instead of the checked-out one, which a detached
`HEAD` requires, such as a checkout of a branch another worktree holds, so its
rounds continue that branch's session.

The reviewer is read-only: Codex in its `read-only` sandbox, ignoring
execpolicy rules, and Claude Code with only read tools and the Bash commands it
Expand Down
15 changes: 8 additions & 7 deletions quest/m0/eval-in-kixel-quest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
`quest eval add` writes a case to Kixel Quest and `quest eval run` reads the
repository's set from it; `review-eval.json` and `EVAL_FILE` are gone, and so
are the audits' baselines in this tree, which move to Kixel Quest too. The
[mistake audit](/quest/m0/mistake-audit.md) and
[review-dependents](/quest/m0/review-dependents.md) add their cases there,
for every repository, instead of to a repository's own set.
[mistake audit](/quest/m0/mistake-audit.md) adds its cases there, for every
repository, instead of to a repository's own set.

Non-goals: changing how a case is found, located, or scored.

Expand All @@ -26,8 +25,8 @@ follow-up). Confirmed 2026-11-20 (maintainer, `/quest-plan` after a
- Key each set by the repository whose escape a case records, and tag each
defect, not its case, with what added it: the audit's name and run date, or
`manual` for a plain `quest eval add`. A defect `quest eval add` appends to
an existing culprit's case carries its own tag. The mistake audit and
review-dependents add each case to its own repository's set, so "for every
an existing culprit's case carries its own tag. The mistake audit
adds each case to its own repository's set, so "for every
repository" means each repository's set, not one shared pool. `quest eval
run` runs the current repository's set, every tag included; `--repo
<owner/repo>` runs another that the token can read, and `--source <tag>`
Expand All @@ -41,8 +40,10 @@ follow-up). Confirmed 2026-11-20 (maintainer, `/quest-plan` after a
- Move each audit's baseline (such as the mistake audit's "Baseline from the
2026-11-18 run") into Kixel Quest's records the same way, and have each
audit read its baseline from there.
- [review-dependents](/quest/m0/review-dependents.md) keeps its 14-case set
in a clone until this lands, then adds it here.
- Import the 20-case moq-dev/moq set (11 culprits, 9 clean PRs) that
[moq-dev/quest#799](https://github.com/moq-dev/quest/pull/799) built in a
clone, from the JSON in that PR's body, tagging its defects
`review-dependents 2026-11-21`.

## Waiting

Expand Down
6 changes: 4 additions & 2 deletions quest/m0/mistake-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ Check first next run:
this run's.
- Contract changes that left a dependent on the old contract, the largest
escape class: about 41 of 204 real escapes, 26 catchable or maybe, all
past a local review. [Review dependents](/quest/m0/review-dependents.md)
takes it, if kept.
past a local review. Since
[moq-dev/quest#799](https://github.com/moq-dev/quest/pull/799) the review
prompt asks reviewers to trace each changed contract to its dependents:
count how many of this class still escape.
- Gating mistakes, after [the gate's cheap commands](/quest/m1/gate-cheap-commands.md)
lands, if kept: 887 of 3,048 gated runs (29%) used under 5 CPU-seconds,
together 0.16% of gated CPU, against 20% to 22% before the 2026-11-15
Expand Down
54 changes: 0 additions & 54 deletions quest/m0/review-dependents.md

This file was deleted.

11 changes: 11 additions & 0 deletions src/cli/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,16 @@ function scope({ base, mergeBase, head }: Change): string {
);
}

/**
* Looking past the diff for what relied on what it changed: the largest class of escapes a type check misses,
* since what remains once the compiler has checked the callers is semantic.
*/
const DEPENDENTS =
"Name each contract the change alters, such as a signature, a key's meaning, a default, a format, a guard, or " +
"documented behavior, and search the repository beyond the diff for what depends on it: callers, consumers, " +
"sibling implementations and paths, parallel lists, tests, and docs. Report each dependent the change left on " +
"the old contract, at the dependent's line.";

/**
* A session's review turn, which the CLI's own review runs with everything the round needs up front: the
* change, the base's REVIEW.md, and the findings and responses of an earlier session it answers.
Expand All @@ -1291,6 +1301,7 @@ export function reviewPrompt(
]),
...(earlier.length > 0 ? [earlierList(earlier, first), settling("in your review")] : []),
...responseParts(responses),
DEPENDENTS,
`${SEVERITY} End with a score from 0 to 10 for how ready the head is to land, and one sentence on why.`,
].join("\n\n");
}
Expand Down