From 3763845b38c9f8d0eea89c7ebdfe0157a15516b8 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 21 Nov 2026 19:24:35 -0800 Subject: [PATCH 1/5] chore(quest): claim quest/m0/review-dependents.md Quest-Claim: f1d1640d673288e9 From 4df8c1b80301548dfe2f430e1b0706fc1cdb5f29 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 21 Nov 2026 19:33:13 -0800 Subject: [PATCH 2/5] feat(review): reviewers trace a changed contract to its dependents Co-Authored-By: Claude Opus 5.5 --- src/cli/review.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cli/review.ts b/src/cli/review.ts index b35644aa..9ab8ec34 100644 --- a/src/cli/review.ts +++ b/src/cli/review.ts @@ -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. @@ -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"); } From e042096613b011bdcec9738b04a794b29d883fe1 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 21 Nov 2026 20:43:12 -0800 Subject: [PATCH 3/5] quest: finish review-dependents; eval-in-kixel-quest imports its moq-dev/moq set Co-Authored-By: Claude Opus 5.5 --- quest/m0/eval-in-kixel-quest.md | 15 ++++----- quest/m0/mistake-audit.md | 6 ++-- quest/m0/review-dependents.md | 54 --------------------------------- 3 files changed, 12 insertions(+), 63 deletions(-) delete mode 100644 quest/m0/review-dependents.md diff --git a/quest/m0/eval-in-kixel-quest.md b/quest/m0/eval-in-kixel-quest.md index 583238a4..55f96b04 100644 --- a/quest/m0/eval-in-kixel-quest.md +++ b/quest/m0/eval-in-kixel-quest.md @@ -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. @@ -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 ` runs another that the token can read, and `--source ` @@ -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 diff --git a/quest/m0/mistake-audit.md b/quest/m0/mistake-audit.md index 9cdb0bcb..315dbbd0 100644 --- a/quest/m0/mistake-audit.md +++ b/quest/m0/mistake-audit.md @@ -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 diff --git a/quest/m0/review-dependents.md b/quest/m0/review-dependents.md deleted file mode 100644 index 9e32cb2d..00000000 --- a/quest/m0/review-dependents.md +++ /dev/null @@ -1,54 +0,0 @@ -# [M] Reviewers trace a changed contract to its dependents - -## Goal - -`quest review`'s reviewers find more of the escapes where a change altered -a contract (a signature, a key's meaning, a default, a format, a guard, a -documented behavior) and left a dependent on the old one: a caller, a -consumer, a sibling implementation or path, a parallel registry, a test, a -bench, or the docs. `quest eval run` shows the gain on a set holding that -class, at no more clean-PR noise. - -## Plan - -Decided 2026-11-19 (maintainer, merge pick of -[moq-dev/quest#786](https://github.com/moq-dev/quest/pull/786)): - -- Keep it? ✅ Keep, in m0 (rejected: m1, drop) - -From the 2026-11-18 [mistake audit](/quest/m0/mistake-audit.md) run: this -was the largest class of real escapes, about 41 of 204 across moq-dev/moq, -moq-dev/moq.pro, and moq-dev/quest. 26 of them were catchable or maybe from -the culprit's diff, and each had passed a local review. Neither the review -prompts in `src/cli/review.ts` nor a `REVIEW.md` asks a reviewer to look -past the diff for what depends on what it changed. A type check already -catches the callers a compiler sees, so what remains is semantic, which -leaves a reviewer instruction as the highest level that holds. - -Recommended: - -- Build the cases first. Add this class's catchable and maybe escapes to - an eval set with `quest eval add`, each defect located at the culprit's - head from the fix's diff. moq-dev/quest's own set holds two - ([moq-dev/quest#186](https://github.com/moq-dev/quest/pull/186) fixed by - [moq-dev/quest#632](https://github.com/moq-dev/quest/pull/632), and - [moq-dev/quest#585](https://github.com/moq-dev/quest/pull/585) fixed by - [moq-dev/quest#685](https://github.com/moq-dev/quest/pull/685)). For - moq-dev/moq, build a set in a clone with `--set` rather than waiting on - a PR there. Its pairs (culprit then fix) are 8541/8580, 8618/8817, - 7943/8920, 5003/8920, 6177/8927, 8956/9013, 7656/9023, 5283/9047, - 8896/9048, 7706/9060, 8596/9065, 2547/9116, 7844/8529, and 8561/8602. - Add clean PRs from the same weeks so noise is measured too. -- Then change the review prompt: ask the reviewer to name each contract - the diff changes and to search the repository for that contract's - dependents, reporting one it left on the old contract. Keep it a short - addition to the existing prompt, not a checklist. -- Score base and head builds with `quest eval run` on both sets, and put - both scores and their cost in the PR's `## Validation`, as this - repository's `AGENTS.md` requires for a review-prompt change. Land it - only if defects found rise and clean findings do not. - -## Related - -- [Routing evidence](/quest/m0/routing-evidence/README.md) - the escape - baseline reviewers are scored against From 0a529e3163d19d0fc8db8a3df8fc8d305ad2f980 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 21 Nov 2026 22:09:52 -0800 Subject: [PATCH 4/5] docs: the first review round traces changed contracts to their dependents Co-Authored-By: Claude Opus 5.5 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de5eed5a..28ac39d0 100644 --- a/README.md +++ b/README.md @@ -1570,7 +1570,8 @@ 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 ...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 +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 From a431ceb233e7faf7d4673ad9d0e58155bc5f70d7 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 21 Nov 2026 22:42:22 -0800 Subject: [PATCH 5/5] docs: rewrap the first-round paragraph Co-Authored-By: Claude Opus 5.5 --- README.md | 70 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 28ac39d0..d850b162 100644 --- a/README.md +++ b/README.md @@ -1569,40 +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 ...HEAD` with text after the target, given the range, the -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. +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