@mrciphersmith/keryx 0.4.39 → 0.4.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,47 +6,21 @@ Read the section SKILL.md points you to; nothing here overrides SKILL.md.
6
6
  ## Project-local reviewers
7
7
 
8
8
  `keryx review reviewers --json` returns every project-skill under module
9
- `review`. The routing tables in SKILL.md cannot name a project reviewer's
10
- triggers, so each `project` entry carries its own. Use them; do not re-derive
11
- them from the reviewer's prose.
12
-
13
- ### Selecting project reviewers — the same two filters, from the inventory
9
+ `review`, and `keryx review required` already puts them in the roster with their
10
+ path gates and stack scoping. The fields below are what the dispatch and the
11
+ report still need from each `project` entry. Use the fields, not the reviewer's
12
+ prose or raw frontmatter: the inventory has already read and normalised them.
14
13
 
15
14
  | Field | Use |
16
15
  |---|---|
17
- | `flags` | The reviewer's selection flags: `metadata.flags` from its frontmatter when it has at least one non-empty entry — then it takes precedence, even when none of its entries turns out to be a flag or it holds only `--all`, and the reviewer has no flags — otherwise the flags its description names. An empty `metadata.flags` (`[]`, `''`) leaves the description's flags in force. Already normalised (lower-case, `--` prefixed), so compare a passed flag with them as they are. A flag the user passed that is in this list selects the reviewer. Whether that selection is also exempt from the path gate depends on `familyFlags`. `--all` selects every project reviewer. |
18
- | `flagWarnings` | One line per `metadata.flags` entry that was dropped because it is not a flag after normalising, plus one more when that left the reviewer with no flags. A list of only `--all` leaves no flags and no warning. Empty in the ordinary case. A dropped entry selects nothing: do not match a passed flag against the raw spelling in the reviewer's frontmatter. Dispatch the reviewer as its other fields say, and name the warnings once in the report — a reviewer its author meant to be flag-selectable is not. Never a finding against the code. |
19
- | `familyFlags` | The subset of `flags` that at least one other project reviewer also carries. A passed flag listed here is a **family flag**: it selects this reviewer, and the reviewer stays path-gated. A passed flag that is in `flags` and not here is unique to this reviewer: the selection is **explicit** and never path-gated, like any flag-selected bundled reviewer. |
20
- | `paths` | Its path triggers for the **path gate**. No file in scope A matches → `Skipped reviewers`, reason `no-matching-paths`. |
21
- | `pathsSource` | `metadata` (declared `metadata.paths`) or `description` (globs read out of its description, and the literal file paths such as `src/utils/column-zone.ts` listed beside them; a cited `.md` / `.mdc` document and a `.metaproject/` path are not triggers). A description with no glob gives `none` even when it names a file: a literal path counts only beside a glob. `none` means there is nothing to gate on: **dispatch it** — ambiguity includes. |
22
- | `stackRequires` | Apply stack scoping exactly as for a bundled reviewer carrying `metadata.stack_requires`. |
16
+ | `flags` | A flag the user passed that is in this list selects the reviewer (already normalised: lower-case, `--` prefixed). Whether that selection is also exempt from the path gate depends on `familyFlags`. `--all` selects every project reviewer. |
17
+ | `flagWarnings` | Declared `metadata.flags` entries dropped as not being flags. A dropped entry selects nothing: do not match a passed flag against the raw spelling. Name the warnings once in the report. Never a finding against the code. |
18
+ | `familyFlags` | The subset of `flags` another project reviewer also carries. A passed flag listed here is a **family flag**: it selects this reviewer, and the reviewer stays path-gated. A passed flag in `flags` and not here is unique to this reviewer: the selection is **explicit** and never path-gated. |
19
+ | `paths` / `pathsSource` | Its path triggers. `pathsSource: none` means there is nothing to gate on: dispatch it. |
20
+ | `stackRequires` | Stack scoping, applied by `keryx review required`. |
23
21
  | `unresolvedRules` | Rules it cites that the project does not have. Dispatch it anyway, tell it in the prompt which rules are absent, and name them once in the report with the fix (`keryx review import --from <overlay> --only '<glob>'` copies them). Never a finding against the code. |
24
22
  | `shadowedRules` | `[{ ref, resolved }]`: rules it cites by one path and must read from another. The project holds its own version of the rule at `resolved` — the reference's slot under `.metaproject/rules/project/`, the whole reference kept (`core/x.mdc` → `.metaproject/rules/project/core/x.mdc`) — which answers the reference before the file `ref` names — or, for a rule keryx moved out of `core/`, the file at its new path (`core/<name>.mdc` → `.metaproject/rules/process/<name>.mdc`). In the dispatch prompt, tell the reviewer to read `resolved` in place of `ref` — see "Dispatching a project reviewer" below. Not a defect and not reported as one. |
25
- | `unresolvedReferences` | `[{ ref, reason }]`: other references in its text that will not hold. `missing` — a backticked `skills/…` or `rules/…` path ending `.md` / `.json` with no file under `.metaproject/`; `non-portable` — a rule cited by an absolute or `~` path, true on one machine at most. Dispatch it anyway, tell it in the prompt which references are absent, and name them once in the report. Never a finding against the code. |
26
-
27
- `metadata.paths`, `metadata.flags` and `metadata.stack_requires` are read by
28
- one frontmatter reader that supports a YAML subset (BOM and CRLF accepted,
29
- trailing `# comments` dropped, `paths` and `flags` as a flow, block or
30
- comma-separated list, `stack_requires` as a string, only keys directly under
31
- `metadata:`); a shape outside it reads as not declared.
32
- `reviewer-skill-creator`'s `SKILL.detail.md` lists the subset. The inventory
33
- has already applied it — use the fields, not the raw frontmatter.
34
-
35
- A description saying another entry point dispatches it ("Dispatched by
36
- acme-review …") is its author's routing note, not a restriction: this
37
- orchestrator dispatches it through the fields above.
38
-
39
- ### Family flags — why a shared flag does not lift the path gate
40
-
41
- An overlay usually gives every reviewer it ships the same umbrella flag beside
42
- the reviewer's own: eight reviewers all carrying `--acme`, each also carrying
43
- `--acme-styling`, `--acme-testing` and so on. Read as explicit, `--acme` would
44
- dispatch all eight against a diff that touches one of their path sets — the
45
- waste the path gate exists to stop, brought back by a flag.
46
-
47
- So the two cases are told apart by how many project reviewers carry the flag,
48
- and the inventory reports the answer per reviewer in `familyFlags` rather than
49
- leaving the orchestrator to count:
23
+ | `unresolvedReferences` | `[{ ref, reason }]`: other references in its text that will not hold (`missing`, `non-portable`). Dispatch it anyway, tell it in the prompt which references are absent, and name them once in the report. Never a finding against the code. |
50
24
 
51
25
  | Passed flag | In this reviewer's `familyFlags`? | Result |
52
26
  |---|---|---|
@@ -55,10 +29,10 @@ leaving the orchestrator to count:
55
29
  | both | — | the unique flag wins: not path-gated |
56
30
 
57
31
  A family member gated out goes to `Skipped reviewers` with reason
58
- `no-matching-paths` like any other gated reviewer. `pathsSource: none` still
59
- means dispatch. An inventory that has no `familyFlags` field comes from a keryx
60
- that predates it: treat every passed flag as explicit, which is the earlier
61
- behaviour, and say so once in the report.
32
+ `no-matching-paths`. An inventory that has no `familyFlags` field comes from a
33
+ keryx that predates it: treat every passed flag as explicit, and say so once in
34
+ the report. A description saying another entry point dispatches it ("Dispatched
35
+ by acme-review …") is its author's routing note, not a restriction.
62
36
 
63
37
  ### Dispatching a project reviewer — by its package, not by its name
64
38
 
@@ -66,81 +40,47 @@ Each `project` entry carries `path`, the directory its package is registered
66
40
  at. Dispatch it with the absolute path of `<path>/SKILL.md` as `skill_path` in
67
41
  the reviewer input, and state in the prompt that this file is the reviewer's
68
42
  definition and overrides the built-in definition of any agent type with the
69
- same name. `skill_path` in the reviewer input is set for project reviewers
70
- only, and it carries that override. A bundled reviewer's input never has it:
71
- when one runs through the `general-purpose` fallback, the prompt text names its
72
- skill file and `review_context.review_plan.dispatch_plan` records the path, but nothing is
73
- being overridden, so the input field stays out. This holds on every branch of "Agent Runtime Compatibility" in
43
+ same name. `skill_path` is set for project reviewers only. A bundled reviewer's
44
+ input never has it: when one runs through the `general-purpose` fallback, the
45
+ prompt text names its skill file and `review_context.review_plan.dispatch_plan`
46
+ records the path. This holds on every branch of "Agent Runtime Compatibility" in
74
47
  SKILL.md: when a same-named agent type exists, dispatch it **with** the path
75
48
  and the override sentence; when none exists, dispatch `general-purpose` with
76
- the same two things.
77
-
78
- The reason is a name collision nobody chose. A runtime can ship an agent type
79
- whose name equals a project reviewer's — an earlier copy of the same reviewer,
80
- or an unrelated one. Dispatched by name alone, the round runs that built-in
81
- prompt and files its findings under the project reviewer's name, and nothing in
82
- the report shows the project's own text was never read.
49
+ the same two things. A runtime can ship an agent type whose name equals a
50
+ project reviewer's; dispatched by name alone, the round runs that built-in
51
+ prompt and files its findings under the project reviewer's name.
83
52
 
84
53
  If `<path>/SKILL.md` does not exist, the reviewer is `BLOCKED`: record the
85
54
  missing path, continue with the independent reviewers, and do not run the
86
- same-named agent type or any other reviewer in its place. A substituted
87
- reviewer reads as coverage the round did not have.
55
+ same-named agent type or any other reviewer in its place.
88
56
 
89
57
  **Shadowed rules go into the same prompt.** For every entry in the reviewer's
90
58
  `shadowedRules`, add one line to the dispatch: "where your text names `<ref>`,
91
59
  read `<absolute path of resolved>` instead" — for a reviewer citing
92
60
  `core/error-handling.mdc`, that is
93
61
  `<project root>/.metaproject/rules/project/core/error-handling.mdc`. Take the
94
- path from `resolved`; do not build it from the rule's filename, because the slot
95
- keeps the reference's directory and a file lying directly in `rules/project/`
96
- answers only a literal `project/<name>.mdc` citation. An import keeps an
97
- overlay's rule in that slot whenever a file already answers the reference with
98
- other content, or the name is one keryx also ships under `rules/core`, because
99
- `keryx init`, `keryx update` and the legacy-profile `keryx skills install`
100
- overwrite `rules/core` with keryx's own rules (the manifest form with
101
- `--target keryx-shell` skips an existing file it did not record unless
102
- `--force`; see "Skills present only when installed"). The reviewer's text was written against the overlay and
103
- still says `core/<name>.mdc`, so followed literally it reads keryx's generic
104
- rule of the same name and reviews against the wrong standard — silently, since
105
- both files exist. The inventory computes the project-first order and reports
106
- it; no loader applies it. This line in the dispatch is the only place it takes
107
- effect, and a project reviewer run outside this orchestrator reads what its
108
- text names.
62
+ path from `resolved`; do not build it from the rule's filename. This line in the
63
+ dispatch is the only place the project-first order takes effect: followed
64
+ literally, the reviewer's text reads keryx's generic rule of the same name.
109
65
 
110
66
  ### `drift` — the source moved, the reviewer did not
111
67
 
112
- A project reviewer built from an external file — a rules file, a review profile,
113
- a conventions doc — records where it came from and the hash of that file at
114
- import. `keryx review reviewers` re-reads the source and reports:
115
-
116
68
  | `drift` | Meaning | What to do this round |
117
69
  |---|---|---|
118
- | `none` | No origin recorded; written here. The text row reads `(no recorded origin)` | Nothing |
70
+ | `none` | No origin recorded; written here | Nothing |
119
71
  | `clean` | Source matches the import | Nothing |
120
72
  | `changed` | Source has moved on since import | Dispatch it, and say so in the report |
121
73
  | `missing` | Source can no longer be read | Dispatch it, and say so in the report |
122
74
 
123
- **A drifted reviewer still runs.** It is a reviewer built from an older version
124
- of its source, which is a fact about provenance, not a defect in its findings —
125
- suppressing it would trade real coverage for tidiness. Record the drift in
126
- `review_context` and name it once in the report, so the next person knows the
127
- profile is due a re-read. Never file it as a finding against the code under
128
- review: it is a fact about the review, not about the diff.
75
+ **A drifted reviewer still runs.** Record the drift in `review_context` and name
76
+ it once in the report. Never file it as a finding against the code under review.
129
77
 
130
78
  ## Skills present only when installed
131
79
 
132
- SKILL.md names two skills that the `minimal` and `recommended` profiles do not
133
- install — they are in the `full` profile only (`src/gdskills/catalog.ts`):
134
-
135
- | Skill | Reached through |
136
- |---|---|
137
- | `review-pr-feedback` | "A round never answers a pull request another skill is answering" |
138
- | `code-learned-review` | `--learned`, `--legacy-profiles` |
139
-
140
- Whether one is **present** is read from `keryx review reviewers --json`, and
141
- the answer depends on the inventory's `bundledSource`, which says which tree
142
- the `bundled` half was read from. Do not infer presence from the flag table,
143
- which describes what keryx ships, not what this project has.
80
+ `review-pr-feedback` and `code-learned-review` are in the `full` profile only.
81
+ Whether one is **present** is read from `keryx review reviewers --json`, by its
82
+ `bundledSource`. Do not infer presence from the flag table, which describes what
83
+ keryx ships, not what this project has.
144
84
 
145
85
  | `bundledSource` | What the `bundled` half is | Is a listed skill installed here? |
146
86
  |---|---|---|
@@ -148,40 +88,24 @@ which describes what keryx ships, not what this project has.
148
88
  | `"package"` | the review skills the keryx package itself ships | the list cannot say |
149
89
  | `"not-found"` | empty — neither tree could be located (the command exits 1) | the list cannot say |
150
90
 
151
- `"package"` means the project has no `.metaproject/skills/gdskills/review`
152
- directory at all — a worktree or clone whose `.metaproject/` holds only data,
153
- for instance. The inventory then lists every review skill in the package, both
154
- above included, whatever profile the project would install, and each
155
- entry's `path` is relative to the keryx package (`src/gdskills/bundled/…`), not
156
- to the project. Nothing is installed in this project in that state, so a name
157
- being in the list is not evidence that it is, and a name missing from it is not
158
- what `not-installed` means either. Decide each of the two by what can actually
159
- be dispatched: if the runtime has an agent type of that exact name ("Agent
160
- Runtime Compatibility" in SKILL.md), the skill is usable and is dispatched as
161
- any other reviewer; if it does not, record `not-installed` with the command
162
- below, because the project holds no skill file to hand a `general-purpose`
163
- agent. Say once in the report that the bundled half came from the package, so
164
- nobody reads the round's reviewer list as this project's install.
165
-
166
- `"not-found"` is a failed inventory, not an empty install: report it and do not
167
- record any reviewer as `not-installed` on its strength.
91
+ With `"package"`, decide each by what can be dispatched: if the runtime has an
92
+ agent type of that exact name, dispatch it as any other reviewer; if not, record
93
+ `not-installed` with the command below. Say once in the report that the bundled
94
+ half came from the package. `"not-found"` is a failed inventory, not an empty
95
+ install: report it and do not record any reviewer as `not-installed` on its
96
+ strength.
168
97
 
169
98
  When one is absent:
170
99
 
171
100
  - **A legacy reviewer a flag asked for** is not dispatched and not replaced.
172
101
  Record it in `Skipped reviewers` with reason `not-installed` and the command
173
- below. `--legacy-profiles` dispatches the legacy reviewers that are
174
- installed and records the others the same way; `--all` never selects them. Leave an absent reviewer out of
175
- the `Optional legacy/profile reviewers` preview: offering a flag that cannot
176
- run is worse than not offering it.
177
- - **`review-pr-feedback`** changes nothing about a round. No caller can declare
178
- that it owns a pull request's reply, so this orchestrator owns the reply as it
179
- does by default. If the user wants existing pull-request comments interpreted
180
- and answered, say the skill is not installed and give the command; do not
102
+ below. Leave it out of the `Optional legacy/profile reviewers` preview.
103
+ - **`review-pr-feedback`** changes nothing about a round: this orchestrator owns
104
+ the reply. If the user wants existing pull-request comments interpreted and
105
+ answered, say the skill is not installed and give the command; do not
181
106
  improvise its workflow from this file.
182
107
 
183
- Adding one. The commands are `keryx skills install` in its two forms
184
- (`src/commands/skills.ts`):
108
+ Adding one:
185
109
 
186
110
  ```bash
187
111
  # everything the full profile holds, including both
@@ -192,176 +116,73 @@ keryx skills install --profile full
192
116
  keryx skills install --profile core --target keryx-shell
193
117
  ```
194
118
 
195
- What those flags do and do not reach:
196
-
197
- - `--target keryx-shell` is what writes under `.metaproject/skills/gdskills/`,
198
- where the inventory looks. Without it the manifest installer targets `claude`
199
- and writes `.claude/skills/`.
200
- - `--with <id>` is repeatable and takes a **component** id from
201
- `install-manifest.json` (`capability:mobx`, `framework:react`, …). It has no
202
- single-skill form: the smallest unit the manifest installs is a module.
203
- `review-pr-feedback` and `code-learned-review` live in module
204
- `review-core-skills`, which belongs to no component and arrives through a
205
- profile that lists it (`core`, `full`).
206
- - Add `--dry-run` first to read the plan. A file already on disk that the
207
- manifest installer did not write is left alone unless `--force` is passed.
208
-
209
- What to expect from the exit code:
210
-
211
- - **The manifest-installer forms can exit 1 after installing what was missing.**
212
- `applyInstall` (`src/gdskills/manifest/apply.ts`) writes every planned file
213
- whose destination is free, skips every planned file that already exists and
214
- is not recorded in the manifest installer's install-state (or has drifted from
215
- its recorded hash), and returns `ok: false` when it skipped anything;
216
- `src/commands/skills.ts` turns that into exit 1. The legacy installer, which
217
- `keryx init` uses, records no such state, so on a project it set up the output
218
- is a `Wrote N file(s)` line for the missing skills, then a `Skipped (existing
219
- file not recorded in install-state…)` list naming the skills already there,
220
- then exit 1. Running the command again gives the same skip list and the same
221
- exit code.
222
- - **Judge the outcome by the inventory, not the exit code.** Run
223
- `keryx review reviewers --json`: with `bundledSource: "project"`, a skill in
224
- the `bundled` half is installed. (`"package"` after an install means the
225
- install did not write under `.metaproject/skills/gdskills/review` — check
226
- `--target`.) If it is there, continue. If it is not, read the `Skipped` and `Errors` lines
227
- for the skill's own path before doing anything else. `--force` makes the
228
- installer overwrite the skipped files with the bundled copies, local edits
229
- included, so it is the user's call, not a default retry.
230
- - **`keryx skills install --profile full` does not behave this way.** With no
231
- manifest flag it takes the legacy route (`installGdskills`,
232
- `src/gdskills/install.ts`), which copies each bundled skill directory over the
233
- installed one without consulting install-state, and rewrites the project's
234
- skills catalog and gdskills module manifest for the `full` profile. It sets
235
- exit 1 only when `.metaproject/` is absent; a destination it will not write
236
- through (a symlink, a non-directory) is listed under `Warnings` with exit 0.
237
- - **The dry-run's `Apply this plan:` hint is the whole command.** It repeats
238
- every plan-shaping flag (`--with`, `--without`, `--include-deprecated`,
239
- `--target`, `--profile`), so run it as printed.
240
-
241
- Run `keryx review reviewers --json` again afterwards and dispatch from what it
242
- returns.
119
+ `--target keryx-shell` is what writes under `.metaproject/skills/gdskills/`, where
120
+ the inventory looks (without it the manifest installer writes `.claude/skills/`).
121
+ `--with <id>` takes a component id and has no single-skill form: both skills live
122
+ in module `review-core-skills` and arrive only through a profile that lists it
123
+ (`core`, `full`). Add `--dry-run` first and run its `Apply this plan:` hint as printed. **Judge the
124
+ outcome by the inventory, not the exit code**: the manifest form exits 1 when it
125
+ skipped a file that already exists. Run `keryx review reviewers --json`; with
126
+ `bundledSource: "project"`, a skill in the `bundled` half is installed (`"package"`
127
+ after an install: check `--target keryx-shell`). If it is not there, read the
128
+ `Skipped` and `Errors` lines for the skill's own path. `--force` overwrites local
129
+ edits, so it is the user's call, not a default retry. Dispatch from what the
130
+ inventory then returns.
243
131
 
244
132
  ## CLI-engine reviewers — dispatched as a command, not a sub-agent
245
133
 
246
- `review-jev-rules` (flow 330), `review-jev-risk` and `review-jev-scenarios`
247
- (both flow 332), `review-jev-docs` and `review-jev-comments` (flow 333), and
248
- `review-jev-contract` (flow 335) are ADDITIONAL reviewers, never replacing
249
- any other, and their dispatch mechanism differs from every reviewer named in
250
- SKILL.md's Routing Table: there is no platform-native agent to invoke,
251
- because each is a deterministic **keryx program**. Run them with `keryx
252
- review jev-rules --scope <scope.json> --json`, `keryx review jev-risk
253
- --scope <scope.json> --json`, and `keryx review jev-scenarios --scope
254
- <scope.json> --json` — the SAME `scope.json` every other Wave A/B reviewer's
255
- dispatch already reads, so each checks exactly the same hunks.
256
- `review-jev-docs` and `review-jev-comments` take a diff/PR target instead:
257
- `keryx review jev-docs (--diff <ref>|--pr <n>) --json` and `keryx review
258
- jev-comments --pr <n> --repo <owner/repo> --json`. `review-jev-contract`
259
- also takes a diff/PR target, plus an optional linked flow: `keryx review
260
- jev-contract (--diff <ref>|--pr <n>) [--flow <id>] --json` — a `--pr` target
261
- checks the description's own claims; `--flow <id>` additionally checks that
262
- flow's frozen acceptance criteria (reusing flow 328's `check-ac.ts`, see its
263
- own SKILL.md). Read each `--json` output as a `REVIEW_RESULT` and merge its
264
- `findings` into the consolidated array exactly like a sub-agent reviewer's:
265
- same Sub-Agent Report Quality Gate, same dedup, same Wave C verification.
266
- `review-jev-risk` additionally emits `ranked` and `routingHints`;
267
- `review-jev-scenarios` additionally emits `checklist`; `review-jev-contract`
268
- additionally emits `claims`, `budget`, and (when `--flow` was given)
269
- `acCheck` — see each reviewer's own SKILL.md for what to do with its extra.
270
-
271
- Gate each BEFORE running its command, not after: skip it — recorded in
272
- `Skipped reviewers` with the reason, never silently absent — when its own
273
- opt-in (`review.jev.rules` / `review.jev.risk` / `review.jev.scenarios` /
274
- `review.jev.docs` / `review.jev.comments` / `review.jev.contract`) is not
275
- `true` in `.metaproject/tasks.config.json`, or when no Jev/OpenRouter
276
- credential is resolvable. Either gate failing means the command itself would
277
- refuse before any read or network call, so checking first saves a doomed
278
- dispatch. The six opt-ins are independent: any subset may be on.
279
- `review-jev-comments` additionally needs a comment ledger to already exist
280
- (`keryx review comments collect` run first) — it refuses, before any read,
281
- when there is none. When `review.jev.contract` is on, dispatch
282
- `review-jev-contract` with `--pr` (never `--diff`, which has no description
283
- to check) and let its `findings` cover the description-vs-diff claim, in
284
- place of the by-eye Stage 1 judgement described in SKILL.md's "This gate owns
285
- the description-vs-diff comparison" — see that section's own note.
286
-
287
- `keryx review reviewers --json` marks a CLI-engine reviewer with
288
- `"engine": "jev"` on its `bundled` entry — the field's presence, not its
289
- absence, is what distinguishes it from the default (an LLM sub-agent
290
- dispatch). A future engine-backed reviewer follows the same pattern: gate on
291
- its own opt-in and reachability, dispatch as a command, merge its `--json`
292
- output the same way.
293
-
294
- ### Measured verdicts (flow 344 — a live benchmark on a large production React/MobX frontend)
295
-
296
- Gating them on is still a project's own choice; these are RESULTS, not a change to the gates above.
297
-
298
- | Reviewer | Verdict | Measured |
299
- |---|---|---|
300
- | `review-jev-risk` | **Off by default** — measured weaker than a strong model | Top-3 recall 21% vs. "largest diff first" 30%; Sonnet 5 alone: 44%. |
301
- | `review-jev-contract` | **Off by default** — measured weaker than a strong model | Caught 12.5% of false PR-description claims vs. Sonnet 5's 67.5%. |
302
- | `review-jev-rules` | **Not useful on top of a strong reviewer** | Dispatched as an EXTRA reviewer beside an already-strong reviewer: +0 findings. |
303
- | `review-jev-scenarios` | Experimental — not measured | — |
304
- | `review-jev-docs` | Experimental — not measured | — |
305
- | `review-jev-comments` | Experimental — not measured | — |
306
-
307
- By contrast, `keryx review ci-triage` (Step 0b, not a reviewer) and `keryx
308
- review jev-select` (Step 5c, not a reviewer either) both have a measured case
309
- FOR them: CI triage cut developer minutes per failure from 30 to 15.4 under an
310
- explicit cost model (38% vs. 25% flaky/regression/infra accuracy against
311
- Sonnet 5 reading the same log, p=0.035); reviewer *selection* is the
312
- unmeasured lever this benchmark named as most promising, which is why
313
- `jev-select` ships recall-first and fails open rather than waiting for a
314
- measurement that has not run yet. Full numbers, methodology and the cost
315
- model: `docs/docs/jev-in-review.md`.
134
+ `review-jev-rules`, `review-jev-risk`, `review-jev-scenarios`, `review-jev-docs`,
135
+ `review-jev-comments` and `review-jev-contract` are ADDITIONAL reviewers, never
136
+ replacing any other, marked `"engine": "jev"` in `keryx review reviewers --json`.
137
+ Each is a keryx program, run as a command in Wave B:
316
138
 
317
- ## `jev-triage` — advisory annotations, not a reviewer (Step 9b)
139
+ ```bash
140
+ keryx review jev-rules --scope <scope.json> --json
141
+ keryx review jev-risk --scope <scope.json> --json
142
+ keryx review jev-scenarios --scope <scope.json> --json
143
+ keryx review jev-docs (--diff <ref>|--pr <n>) --json
144
+ keryx review jev-comments --pr <n> --repo <owner/repo> --json # after `keryx review comments collect`
145
+ keryx review jev-contract (--diff <ref>|--pr <n>) [--flow <id>] --json
146
+ ```
318
147
 
319
- `review-jev-triage` (flow 340) is a DIFFERENT shape from every CLI-engine
320
- reviewer above: it never produces a `findings` array of its own, and it is
321
- never merged into the consolidated array. It runs AFTER the Sub-Agent Report
322
- Quality Gate has already validated/merged/deduplicated the round's findings
323
- (Step 9) and BEFORE the later Wave C passes (Step 10; the early verifier pass starts first, on the findings held then) — Step 9b in the Workflow
324
- block — annotating the findings that already exist. It is advisory and
325
- annotate-only by construction: nothing it returns drops or demotes a finding,
326
- and no downstream step is permitted to treat its output as anything but a
327
- hint.
148
+ The `--scope` is the same `scope.json` every other Wave A/B reviewer reads. Read
149
+ each `--json` output as a `REVIEW_RESULT` and merge its `findings` like a
150
+ sub-agent reviewer's: same Sub-Agent Report Quality Gate, same dedup, same Wave C
151
+ verification; see each reviewer's own SKILL.md for its extra fields (`ranked`,
152
+ `routingHints`, `checklist`, `claims`, `acCheck`).
153
+
154
+ Gate each before running it: skip it — recorded in `Skipped reviewers` with the
155
+ reason, never silently absent — when its own opt-in (`review.jev.rules` /
156
+ `review.jev.risk` / `review.jev.scenarios` / `review.jev.docs` /
157
+ `review.jev.comments` / `review.jev.contract`) is not `true` in
158
+ `.metaproject/tasks.config.json`, or when no Jev/OpenRouter credential is
159
+ resolvable. When `review.jev.contract` is on, dispatch `review-jev-contract` with
160
+ `--pr` (never `--diff`, which has no description to check) and let its
161
+ `findings` cover the description-vs-diff claim in place of the by-eye Stage 1
162
+ judgement. Measured results per reviewer: `docs/docs/jev-in-review.md`.
328
163
 
329
- Run it once per round, over the round's own consolidated findings:
164
+ ## `jev-triage` — advisory annotations, not a reviewer (Step 9b)
165
+
166
+ `review-jev-triage` never produces findings of its own and is never merged into
167
+ the consolidated array. Run it once per round, after the quality gate merged and
168
+ deduplicated the findings (Step 9) and before the later Wave C passes:
330
169
 
331
170
  ```bash
332
171
  keryx review jev-triage --report <this round's review package dir> --json
333
172
  ```
334
173
 
335
- Gate it the same way as every other CLI-engine reviewer: skip it — recorded
336
- in `Skipped reviewers` with the reason — when `review.jev.triage` is not
337
- `true` in `.metaproject/tasks.config.json`, or when no Jev/OpenRouter
338
- credential is resolvable. Either gate failing means the command itself would
339
- refuse before any read or network call.
174
+ Gate it like the CLI-engine reviewers (`review.jev.triage`, a resolvable
175
+ credential; skipped is recorded with its reason). Its `annotations` carry three
176
+ tracks:
340
177
 
341
- Its `--json` output is `{status, reviewer: "review-jev-triage", summary,
342
- annotations, budget, tokens}` — never a `REVIEW_RESULT` merged into the
343
- findings array. `annotations` carries three tracks, each read and used
344
- differently in the report:
178
+ | Track | What to do with it |
179
+ |---|---|
180
+ | `severity_check` (`flagged` = `p < 0.4`) | Show a flagged finding with a soft note next to its existing severity. Never change `severity` from this alone. |
181
+ | `merge_candidates` | A note on both findings that they may be one defect. Never merge, drop, or renumber either from this alone. |
182
+ | `verify_order` | Feed this order into the later Wave C passes, lowest plausibility first — never as a reason to skip verifying any finding. |
345
183
 
346
- | Track | Shape | What to do with it |
347
- |---|---|---|
348
- | `severity_check` | `{id, p, flagged}` per blocker/major finding — `flagged` means `p < 0.4` | Show `flagged` findings as a soft note next to their existing severity ("Jev's own trigger+outcome check scored this low"). Never change the finding's `severity` field from this alone. |
349
- | `merge_candidates` | `{id, a, b, reason, p}` per candidate pair | A high `p` is a suggestion to a human that `a` and `b` may be the same defect — surface it in the report as a note on both findings. Never merge, drop, or renumber either finding from this alone. |
350
- | `verify_order` | `{id, p}`, sorted lowest-`p`-first | Feed this order into the later Wave C passes — verify the lowest-plausibility findings first — never as a reason to skip verifying any of them. |
351
-
352
- `status` is `DONE_WITH_CONCERNS` — never `DONE` — when any `severity_check` is
353
- `flagged` OR any `merge_candidates` pair scores `p >= 0.5`
354
- (`LIKELY_DUPLICATE_THRESHOLD`, `src/commands/review-jev-triage.ts`). Live-check
355
- calibration found same-file pairs that were NOT duplicates scoring around
356
- 0.6, so a merge candidate above the threshold is a prompt to look, never a
357
- merge — the status flip is a nudge to read the pair, not a verdict that the
358
- findings are duplicates.
359
-
360
- Show its annotations in the report as their own subsection, next to (not
361
- inside) the findings they annotate — same separation the finding schema
362
- itself draws between a reviewer's claim (`severity`, `problem`, …) and what
363
- became of it (`disposition`), which a reviewer never states and this pass
364
- does not either.
184
+ Show its annotations in the report as their own subsection, next to (not inside)
185
+ the findings they annotate.
365
186
 
366
187
  ## Clean context — why, the log, the three accepted paths
367
188
 
@@ -369,7 +190,7 @@ A review must be reproducible from its package: the same inputs give the same co
369
190
 
370
191
  **Inputs.** Only the orchestrator's context stages (scope, Review Context Pack, the memory stage, layers) and, for a reviewer, its payload. The agent's session memory, the auto-memory index (`MEMORY.md`), remembered feedback and the earlier conversation are not inputs, and neither is a second memory search made "to double-check".
371
192
 
372
- **The three accepted paths** are known and kept on the operator's decision (poll 179), not leaks:
193
+ **The three accepted paths** are known and kept on the operator's decision, not leaks:
373
194
 
374
195
  1. `prior_findings` — findings of an earlier round of the same package enter by design from round 2 on.
375
196
  2. Review-notes and skill learning — auto-accepted output of earlier reviews reaches a later one only through the memory stage, as accepted memory.
@@ -377,7 +198,7 @@ A review must be reproducible from its package: the same inputs give the same co
377
198
 
378
199
  **One memory read, and the log.** The stage query is `keryx memory search "<changed modules and the concepts they touch>" --status accepted`, once. Pass the same text to `keryx review start … --memory-query "<query>"` so the manifest's `cleanContext` block holds it next to the start time. keryx writes the orchestrator log, `<package>/tool-calls/orchestrator.jsonl`, on its own: `keryx review start` and `keryx review attach` mark the package active, and every `keryx memory` command and every MCP memory tool (`memory_search`, `memory_handoff`, `memory_propose`) appends one line naming its caller. You do not write that file and must not edit it; a hand-written line is a forgery the readiness item cannot tell apart from a record. A call by a `spawn_subagent` child is recorded under the child's reviewer id and is not judged by item 10. A call from a host that names no caller is recorded as `unattributed`: it warns in the item's detail line and never blocks. Reviewer logs stay in their own files.
379
200
 
380
- Item 10, `memory-outside-stage`, reads that log. Outside the stage is: a memory search with a different query, a search without `--status accepted`, any other memory command or MCP memory tool, and a stage call stamped before the round started. The same query repeated is the stage. Repair is to rerun from a session whose only memory read is the stage; only the operator's waiver lifts it: in keryx shell call `review_waive_readiness` (the operator answers a card, never a terminal), then call `review_complete`; outside keryx shell `keryx review complete <package> --waive memory-outside-stage "<operator quote>"` in a terminal; unattended, record Not run. With no orchestrator log the item passes and its evidence says it could not see your reads; with a log that holds no memory call it passes and says so. Outside keryx shell, `keryx review start` prints a caller token (`export KERYX_REVIEW_CALLER_TOKEN=…`): export it on this session's keryx calls so they are attributed to you; without it the item reads "not observable on this host" rather than a clean pass. Only calls that go through keryx are visible: a read through a tool keryx does not wrap is not in the log.
201
+ Item 10, `memory-outside-stage`, reads that log. Outside the stage is: a memory search with a different query, a search without `--status accepted`, any other memory command or MCP memory tool, and a stage call stamped before the round started. The same query repeated is the stage. Repair is to rerun from a session whose only memory read is the stage; only the operator's waiver lifts it: in keryx shell call `review_waive_readiness` (the operator answers a card, never a terminal), then call `review_complete`; outside keryx shell `keryx review complete <package> --waive memory-outside-stage "<operator quote>"` in a terminal; unattended, record Not run. Outside keryx shell, `keryx review start` prints a caller token (`export KERYX_REVIEW_CALLER_TOKEN=…`): export it on this session's keryx calls so they are attributed to you; without it the item reads "not observable on this host" rather than a clean pass. Only calls that go through keryx are visible: a read through a tool keryx does not wrap is not in the log.
381
202
 
382
203
  **Open questions.** One general rule, replacing per-fork wording: the answer is in this skill or `SKILL.detail.md`, or it is the user's. Interactive: one `AskUserQuestion`, or one `send_poll` when the operator is in Telegram. Unattended: the whole output is one line, `STATUS: BLOCKED question — <the question>`, and you stop. A guess and a recollection are both wrong answers.
383
204
 
@@ -440,14 +261,13 @@ which option to take carries a `policy` tag: `{ kind, facts }`. `kind` is one of
440
261
  `option_choice`, `partial_coverage`, `smaller_slice`, `slice_order`. `facts` holds only numbers and booleans that
441
262
  describe the **recommended** option (for `budget`: `budgetUsedPercent`, `raisesBudget`; the guide lists the rest).
442
263
  Nothing from the diff, a finding or a PR comment goes into the facts: the arbiter builds its prompt from the tag and
443
- nothing else, so a quote there is dropped, and a question that carries one is shaped by outside content, which the
444
- arbiter does not decide.
264
+ nothing else, so a question shaped by outside content is not the arbiter's to decide.
445
265
 
446
266
  In `review-auto` and in an unattended run the review arbiter answers a tagged question from its numbered rules and
447
267
  writes `arbiter.log` into the package; `allow` takes the recommended option, `deny` and `escalate` refuse in an
448
- unattended run and ask the operator in `review-auto`. An untagged question keeps the old behaviour. A release, a
449
- merge, a credential, a destructive action or a publish is never tagged and never the arbiter's: those ask a person,
450
- and in an unattended run they are refused. In an interactive `ask` round the operator is asked, tagged or not.
268
+ unattended run and ask the operator in `review-auto`. A release, a merge, a credential, a destructive action or a
269
+ publish is never tagged and never the arbiter's: those ask a person, and in an unattended run they are refused. In an
270
+ interactive `ask` round the operator is asked, tagged or not.
451
271
 
452
272
  ## Depth floor — a gating round does not degrade
453
273
 
@@ -461,23 +281,13 @@ selected.
461
281
  request URL>`, or `--target branch --ref <base> [--head <commit>]`), which
462
282
  spawns the reviewers itself; a nested session whose depth budget is spent
463
283
  returns `STATUS: BLOCKED` with reason `nested_dispatch_unavailable` and no
464
- verdict. Neither reviews the diff alone and calls that a round. Measured (flow 405):
465
- a single-agent round on a 150-line frontend PR wrote "did not dispatch any
466
- sub-reviewers", approved it with two cosmetic minors, and the next human round
467
- filed six real findings, every one reachable from the diff and the backend at
468
- a pinned SHA.
284
+ verdict. Neither reviews the diff alone and calls that a round.
469
285
  - **Size never lowers depth below the risk class.** The budget table sizes the
470
- context, not the depth. Outside the risk class a small change does not need the
471
- whole roster: `keryx review required --depth auto` picks the **light** round —
472
- `review-logic`, `review-testing-practices` and the stack-conventions reviewer
473
- only — when the diff is at most 5 files and 300 changed lines, matches no risk
474
- path gate, and is neither `--all` nor gating. Auto needs a file list AND a line
475
- count: `--scope <scope.json>` gives both (`review start|ingest --scope` stores
476
- the count in `scope-files.json`, so `--package <review-dir>` has both too);
477
- with either missing the round is full. Light is only ever granted by those auto
478
- checks; `--all`, gating and `--depth full` force full. A light round records `Not run: mutation
479
- (light round)` instead of the mutation gate and says so in the report. Inside the
480
- risk class the round is full.
286
+ context, not the depth. `keryx review required --depth auto` decides light or
287
+ full and prints why; pass `--scope` (or `--package`) so it has the file list
288
+ and the line count, without which the round is full. `--all`, gating and
289
+ `--depth full` force full. A light round records `Not run: mutation
290
+ (light round)` instead of the mutation gate and says so in the report.
481
291
  - **High-risk includes a client-side mirror of a server rule** — validation,
482
292
  limits, permissions, uniqueness, reserved names — beside the triggers the main
483
293
  file lists.
@@ -655,144 +465,21 @@ These apply to every round without a question:
655
465
 
656
466
  ### Runtime research-completion ledger
657
467
 
658
- New managed packages carry `research.json`, initially pending. Before closing a round, enumerate unresolved observations from raw reviewers and the changed-file/consumer census, assign stable obligation IDs, and investigate them. Run the probe or inspect the relevant source and assertions: merely proposing a check does not resolve it. An unexecuted probe is not a verified claim. `keryx review ledger build` writes the ledger from the saved raw results and turns each raw finding into an obligation; it closes one only from a matching canonical finding or a `--dispositions` entry that carries evidence and a reason, and it leaves everything else `unresolved`.
659
-
660
- Supply the ledger using `keryx review ingest --research <ledger.json>` alongside the report and findings. Format: `version: 1`, `scopeReviewed: true`, `rawReconciled: true`, `obligations: [...]`. Each obligation requires `id`, `source`, `question`, `status`, `evidence`, `reason`. Status `finding` additionally requires `finding` pointing to exactly one canonical finding ID or global ID. Other terminal statuses are `refuted` and `out-of-scope`, both requiring evidence and reason. Preserve distinct scenarios when deduplicating. Assert census/reconciliation flags only after performing those checks; an empty obligations array is valid only if the actual census found no open observations.
661
-
662
- Open, deferred and unverifiable obligations block completion. If context, runtime or budget prevents resolution, retain the obligation and report incomplete; do not relabel it refuted or out-of-scope. Completion and the flow gate re-read the ledger even when the manifest says closed. Legacy packages without this artifact remain compatible, not proven complete. This gate validates the declared ledger, not the truth or exhaustiveness of its census; independent source/raw audits remain necessary.
663
-
664
- ## Why Wave C verifies instead of re-scoring
665
-
666
- Wave C used to run `review-strict`: a meta-pass that re-read the consolidated
667
- findings and **adjusted their severity with no new evidence**, under an elevation
668
- table biased 3:1 toward escalation. It was **removed, not improved**, and the
669
- reason is measured rather than stylistic:
670
-
671
- - **GPT-4 on GSM8K across self-correction rounds: 95.5 → 91.5 → 89.0.**
672
- **GPT-3.5 on CommonSenseQA: 75.8 → 38.1.** Among the answers that changed,
673
- correct → incorrect exceeded incorrect → correct (Huang et al., *Large Language
674
- Models Cannot Self-Correct Reasoning Yet*, ICLR 2024, arXiv:2310.01798).
675
- - **Self-Refine (arXiv:2303.17651): +49.2 on dialogue response generation, +0.2
676
- on maths.** Self-refinement gains are on subjective tasks and vanish on
677
- verifiable reasoning. Judging whether a null-guard is missing is verifiable
678
- reasoning.
679
-
680
- Re-scoring a finding by re-reading it is therefore not a rigour pass; it is a
681
- coin flip weighted toward more findings. **Do not restore it because it looks
682
- obviously useful — it looked obviously useful the first time.**
683
-
684
- `review-verifier` occupies the slot and differs in exactly one way that matters:
685
- **it runs something.** Verification that executes rejects 85–96% of false reports
686
- against 4–15% unaided while finding 30–44% more true bugs (AnyPoC,
687
- arXiv:2604.11950); Meta's TestGen-LLM funnel discards 75% of its own output
688
- (75% build → 57% build and pass → 25% improve coverage) and the surviving quarter
689
- reaches 73% human acceptance (arXiv:2402.09171).
690
-
691
- ## Scope B — bounds, rejections and recompute
692
-
693
- It walks `gdgraph affected` outward from every changed file, ranks by edge
694
- distance, keeps distance ≤ 2, cuts at 40 files closest-first, and adds a changed
695
- file's naming-related tests when the graph did not already reach them. Requires a
696
- built graph — run `keryx gdgraph build` if it refuses.
697
-
698
- **Do not pick the files yourself, and do not widen it.** "Review the
699
- functionality so nothing breaks" naively means "review the whole repository every
700
- round", which is unaffordable *and* actively harmful: review quality decays as
701
- context grows — measured F1 0.65 at round 2 falling to 0.29 at round 10. An
702
- unbounded scope B makes later rounds worse than earlier ones.
468
+ `keryx review ledger build --package <package>` writes `research.json` from the saved raw results: it turns each raw finding into an obligation, closes one only from a matching canonical finding or a `--dispositions` entry that carries evidence and a reason, and prints each gap with its next command. Your part: before closing a round, enumerate the unresolved observations from raw reviewers and the changed-file/consumer census, and investigate them. Run the probe or inspect the relevant source and assertions: merely proposing a check does not resolve it, and an unexecuted probe is not a verified claim. A `--dispositions` entry closes an obligation as `finding` (pointing to exactly one canonical finding id or global id), `refuted` or `out-of-scope`, each with evidence and a reason. Preserve distinct scenarios when deduplicating. Supply the ledger with `keryx review ingest --research <ledger.json>`.
703
469
 
704
- The bounds are measured on this repository, not guessed: at depth 2 the set is a
705
- median of 19 files (p90 65); depth 3 buys eight more in the median and doubles
706
- the p90. The 40-file cap fires on 25% of commits and removes only hop-2 entries
707
- on all but 2 of 80, so it almost never costs a direct dependent — and when it
708
- does, it says so.
709
-
710
- **Record the whole thing.** `--out "<review-package>/blast-radius.md"` writes the
711
- set, the depth, and **every file the cap removed**. A truncation nobody can see
712
- reads afterwards as "we checked everything", which is the claim this pipeline
713
- exists to stop making. An empty radius is reported as `unresolved`, not as clean:
714
- the graph indexes code, so a change to a skill, a rule or a schema has no blast
715
- radius at all and that is a different fact from "nothing depends on it".
716
-
717
- ### The scope-B question, and what is rejected
718
-
719
- > Does this change break an existing behaviour **at these sites**?
720
-
721
- Nothing else. The blast-radius set is **under regression check, not under
722
- review**. A finding about style, naming or architecture in code the change did
723
- not touch is refused **by the orchestrator in code** — not discouraged here —
724
- under three rules, every one of them a fact about the claim rather than about who
725
- made it:
726
-
727
- | Rule | Refused because |
728
- |---|---|
729
- | `outside-set` | the file is neither in the computed set nor in the changed set; the reviewer went browsing |
730
- | `non-regression-severity` | below `major`. Under the canonical rubric `minor` states the code behaves correctly and `info` names neither trigger nor outcome; neither can be a claim that something broke |
731
- | `no-link-to-change` | nothing in the finding names a changed file, module or symbol. A regression claim says THE CHANGE broke this site |
732
-
733
- Rejections are **recorded, not deleted** — raise the observation under scope A or
734
- as a separate review. Pass `--brief` output verbatim into the scope-B dispatch:
735
- the code rejection is the enforcement, but a reviewer told afterwards has already
736
- spent the round producing findings that will all be refused.
737
-
738
- **A missing input is replaced in the dispatch, never left blank.** No linked
739
- flow means no frozen acceptance criteria: put the PR body or issue text in the
740
- scope-B payload, labelled as the criteria it stands in for; with neither, write
741
- `acceptance criteria: none supplied`, and the reviewer's summary says it judged
742
- behaviour against the diff alone. A FIX slice in a `delta` round gets no graph
743
- blast-radius set: its radius is the names the fix changed
744
- (`review_context.scope.files`, see the `delta` round below), and the reviewer
745
- checks the fix lines for regressions of the behaviour they touch before it
746
- disposes each attached finding.
747
-
748
- `class_scope` on a scope-B finding names the **caller that breaks**, not the
749
- changed line, because that is the site a human has to look at.
750
-
751
- ### When it is recomputed
752
-
753
- | Round | Scope A | Scope B |
754
- |---|---|---|
755
- | 1 (first after the draft PR) | yes | yes |
756
- | 2..N | yes | recomputed only if the changed-file set moved |
757
- | final | yes | **yes, always** |
758
-
759
- Do not decide this by memory:
760
-
761
- ```bash
762
- keryx review blast-radius --ref "${BASE_SHA}" --previous blast-radius.json [--final]
763
- ```
764
-
765
- It prints the decision and the reason, and reuses the previous record when
766
- nothing moved. The final round recomputes whatever the file set did — otherwise a
767
- fix introduced in round 3 gets no regression check at all, and the round that
768
- certifies the flow is the one that checked the least.
470
+ Open, deferred and unverifiable obligations block completion. If context, runtime or budget prevents resolution, retain the obligation and report incomplete; do not relabel it refuted or out-of-scope. The gate validates the declared ledger, not the truth or exhaustiveness of its census; independent source/raw audits remain necessary.
769
471
 
770
472
  ## Readiness — the checklist behind `completed` and behind publishing
771
473
 
772
- `keryx review readiness <review-id-or-path> [--json]` reads the package and prints every readiness item, READY or NOT READY, each with the evidence and the command that repairs it. It writes nothing, and exits non-zero when the verdict is NOT READY. Only item 9 reaches GitHub (the PR's own file list); the TUI and `review status` read the package alone.
773
-
774
- 1. `files-covered` — every changed file is in a wave or carries a recorded waiver.
775
- 2. `blast-radius` — no file the blast radius cut is left unreviewed. A cut radius writes `chunks.json`; run `keryx review chunks plan`, `estimate`, `next`/`record`, `merge`. Then bring in what the passes found: `merge` lists the findings and how many `findings.json` lacks; `keryx review ingest --review-id <id>` records them as `review-regression/<chunk>`; ingest and the report are repeated when a pass finished after the report was written. `review complete` warns about a pass finding still out of `findings.json` and does not refuse. In an unattended run every wave runs without a question, up to the 25-pass ceiling; in an interactive run the operator is asked once: in keryx shell call `review_chunks_answer` (a card, never a terminal); elsewhere the operator runs `keryx review chunks estimate --package <dir> --answer yes --quote "<their words>"` in their terminal; unattended, record Not run.
776
- 3. `reviewers` — every planned reviewer was dispatched and its result ingested.
777
- 4. `verifier` — the verifier checked every finding it should, or the report says how many it did not.
778
- 5. `ledger` — the ledger is READY.
779
- 6. `coverage-md` — coverage.md does not list a reviewer as `run` that the dispatch record says did not finish. Re-run `keryx review ingest` for the package.
780
- 7. `head` — the report's head is the PR head.
781
- 8. `report-names` — pending mutation candidates and parity warnings are named in the report.
782
- 9. `pr-files` — the changed-file count equals the PR's own file list. A recount more than 3x the recorded scope is refused: it came from the wrong base. Recount with `keryx review blast-radius --package <ref> --changed <the PR's files>`.
783
- 10. `memory-outside-stage` — the orchestrator read memory only in its memory stage ("Clean context" above). Outside keryx shell it reads "not observable on this host" unless this session's keryx calls carry the caller token `keryx review start` printed.
784
- 11. `premise-decisions` — every finding `review-premise` held (`challenged` or `owner-decision`) has an operator decision: in keryx shell the card `review_decide_premise`; elsewhere ask the operator with the host's question tool and record the answer with `keryx review decide-premise --package <dir> --finding <global_id> --answer uphold|dismiss --reason "<why>" --answered-by <source>:<ref> --answer-text "<their words>" --question-text "<the question>"` (SKILL.md "Wave D"; the record reads `confirmedVia: "host-question"`). Not waivable: each held finding needs its own answer, and `review_waive_readiness` / `--waive` refuse this item.
785
- 12. `quotes-located` — every open finding whose quote `review ingest` could not place (absent from the file at the reviewed head, or in it more than once) has a disposition. Ingest keeps such a finding with no line, flagged `quote_unlocated` and listed in scope.md, instead of refusing the round. Re-quote one distinct line and re-ingest, record a disposition, or the operator waives the item.
474
+ `keryx review readiness <review-id-or-path> [--json]` prints every readiness item, READY or NOT READY, each with its evidence and the command that repairs it; run the repair it names. `keryx review complete` and `keryx review publish` are held by the same checklist.
786
475
 
787
- `keryx review complete` refuses status `completed` while any item fails. A failing item other than `premise-decisions` is waived only by the operator. In keryx shell call `review_waive_readiness` for the item: the operator answers it as a card, the waiver is recorded with the card text and the time, and then you call the `review_complete` card (the operator answers it in the shell or in the Telegram topic). An agent completes a review only through that card; `keryx review complete` is for a human in a terminal. Never send the operator to a terminal. Outside keryx shell the operator runs `keryx review complete --waive <item> "<their own words>"` in a terminal, repeatable. Unattended, record the item as Not run. `keryx review publish` is held by the same checklist. Publishing is the operator's decision too: in keryx shell call `review_publish` (a card shows the target and the body; never send the operator to a terminal). A not-ready package goes to GitHub only as a partial review (`review_publish` with `partial: true`, or `keryx review publish --partial`), which puts a "Partial review" header on the post and never approves. The shell guard stops a publish command that runs through the keryx shell; a publisher outside it (CI, another agent, a script file) is not stopped, and that limit is named, not hidden.
476
+ A failing item other than `premise-decisions` is waived only by the operator. In keryx shell call `review_waive_readiness` for the item (the operator answers it as a card), then call the `review_complete` card. An agent completes a review only through that card; `keryx review complete` is for a human in a terminal. Never send the operator to a terminal. Outside keryx shell the operator runs `keryx review complete --waive <item> "<their own words>"` in a terminal, repeatable. Unattended, record the item as Not run. Each held finding needs its own answer (SKILL.md "Wave D"). An interactive run with a cut blast radius asks the operator once about the chunk passes: `review_chunks_answer` in keryx shell, elsewhere their `keryx review chunks estimate --package <dir> --answer yes --quote "<their words>"`. Publishing is the operator's decision too: in keryx shell call `review_publish`. A not-ready package goes to GitHub only as a partial review (`review_publish` with `partial: true`, or `keryx review publish --partial`), which never approves. The shell guard stops a publish command that runs through the keryx shell; a publisher outside it (CI, another agent, a script file) is not stopped, and that limit is named, not hidden.
788
477
 
789
478
  ## Fix rounds — dispositions, regressions, withdrawal
790
479
 
791
480
  ### Every prior finding leaves the round with a disposition
792
481
 
793
- A fix round that reports only new findings is unreadable: the author cannot tell
794
- which of their fixes landed. Close the loop explicitly — one line per prior
795
- finding, in the report, before the new findings:
482
+ One line per prior finding, in the report, before the new findings:
796
483
 
797
484
  | Disposition | Meaning |
798
485
  |---|---|
@@ -802,61 +489,26 @@ finding, in the report, before the new findings:
802
489
  | `regressed` | The fix removed this defect and introduced another — file the new one separately |
803
490
  | `withdrawn` | The finding was wrong. See below |
804
491
 
805
- **Check the code, not the commit message.** A commit titled *"report an abandoned
806
- sync as abandoned"* is a claim; the disposition is whether the branch it renamed
807
- is reachable and pinned. On a recorded round, two such commits asserted behaviour
808
- on lines no test could reach.
492
+ **Check the code, not the commit message.** A commit title is a claim; the disposition is whether the branch it changed is reachable and pinned.
809
493
 
810
494
  ### Delta rounds — what `review start` hands you
811
495
 
812
- `keryx review start` detects the round and writes `<package>/round.json` and `<package>/prior_findings.json`. It searches every source, because the earlier round may have run on another machine: the local package, git history (tracked package files), the PR's `keryx round` block, PR comments, and the flow's packages. `round.json` carries `round`, `source`, `sourcesTried`, `previous`, `mode`, `range`, `fixHunks`, `newHunks` and `carried`.
813
-
814
- | `mode` | `range` | Review |
815
- |---|---|---|
816
- | `first` | merge-base..head | A first round. `sourcesTried` records what was searched when nothing was found. |
817
- | `delta` | previous head..head | `fix` slices (a hunk that answers a prior finding): `review-logic`, `review-regression`, the authors of the attached findings, `review-security-code` when one of them is a security finding, the roles the fix lines themselves route by content (e.g. `review-security-code` for a fix that spawns a process), and the verifier, each with its `prior_findings`. `new` slices: round 1, with the roles the slice names. Unchanged code: not re-reviewed. `carried` findings keep their dispositions. |
818
- | `fallback-first` | merge-base..head | The previous head is not an ancestor (force-push, rebase). Review the whole range with the prior findings attached. |
819
-
820
- A fix hunk still has a radius: enumerate what names the thing it changed (`review_context.scope.files`), as in any fix round. The attached findings are the contract: each leaves the round with a disposition, below.
821
-
822
- A reviewer on a FIX slice reports those dispositions itself: its `REVIEW_RESULT` carries `prior_dispositions: [{id, disposition}]` with one entry for every attached finding id (`disposition` is `closed`, `open`, `partial`, `regressed` or `withdrawn`), judged against the code. `keryx review ingest` reads the array into the ledger; an attached id with no entry stays undisposed.
496
+ `keryx review start` detects the round and writes `<package>/round.json` (`round`, `source`, `sourcesTried`, `previous`, `mode`, `range`, `fixHunks`, `newHunks`, `carried`) and `<package>/prior_findings.json`, searching the local package, git history, the PR's `keryx round` block, PR comments and the flow's packages. In a `delta` round slice routing gives each `fix` slice its roles (the authors of the attached findings among them) and unchanged code is not re-reviewed; `carried` findings keep their dispositions. A fix hunk still has a radius: enumerate what names the thing it changed (`review_context.scope.files`). A reviewer on a FIX slice reports `prior_dispositions: [{id, disposition}]`, one entry for every attached finding id, judged against the code; `keryx review ingest` reads it into the ledger, and an attached id with no entry stays undisposed.
823
497
 
824
498
  ### A fix is a change, and changes get reviewed
825
499
 
826
- The most expensive class in a multi-round review is **the defect the fix
827
- introduced**. It is systematically under-found, for a structural reason: the fix
828
- arrives framed as the answer to a finding, so it is read as an answer rather than
829
- as new code. It is new code.
830
-
831
- So scope A of a fix round includes the fix, reviewed on its own merits, and the
832
- report carries its own section:
500
+ The defect the fix introduced is systematically under-found, because the fix arrives framed as the answer to a finding. It is new code. Scope A of a fix round includes the fix, reviewed on its own merits, and the report carries its own section:
833
501
 
834
502
  ```markdown
835
503
  ## Regressions the fixes introduced
836
504
  <[F-NNN] — the finding it was answering, and the new defect it created>
837
505
  ```
838
506
 
839
- Recorded shapes, all from fixes that correctly closed the finding they answered:
840
- an early return added to stop a fall-through, which then skipped the work the
841
- caller needed; a persistence call added to save expanded state, which then
842
- persisted the broken state on the error path too. Both were closed correctly and
843
- both shipped a new bug in the same commit.
507
+ Recorded shapes: an early return added to stop a fall-through, which then skipped the work the caller needed; a persistence call added to save state, which then persisted the broken state on the error path too.
844
508
 
845
509
  ### Withdrawing your own earlier finding
846
510
 
847
- A finding from a previous round that this round disproves is **withdrawn**,
848
- explicitly, at the top of the report, with the evidence — before any new finding.
849
-
850
- This is not a courtesy. An uncorrected wrong finding costs the author a fix they
851
- did not need, and it stays in `prior_findings` steering later rounds. Withdrawal
852
- is also the one self-correction this pipeline permits, and it is permitted because
853
- it is asymmetric: it *deletes* a claim, so it cannot inflate the finding count,
854
- which is the failure mode that removed the re-scoring pass from Wave C.
855
-
856
- State what made the original claim wrong, in one sentence, and if the same
857
- reasoning error has now happened twice in one review, say that too. A reviewer
858
- that names its own recurring error is calibrating; one that quietly drops a
859
- finding is hiding a result.
511
+ A finding from a previous round that this round disproves is **withdrawn**, explicitly, at the top of the report, with the evidence — before any new finding. An uncorrected wrong finding costs the author a fix they did not need and stays in `prior_findings` steering later rounds. Withdrawal is the one self-correction this pipeline permits, because it *deletes* a claim. State what made the original claim wrong, in one sentence, and if the same reasoning error has now happened twice in one review, say that too.
860
512
 
861
513
  ## Job Context Awareness
862
514
 
@@ -876,89 +528,35 @@ If absent, proceed normally — context is optional and non-blocking.
876
528
 
877
529
  ## The mutation pass — `keryx review mutate`
878
530
 
879
- Attended, the pass is not optional once mutants were proposed. The testing reviewer writes
880
- each proposed mutant to `<review-dir>/research-evidence/mutants.json`:
881
- `{ "mutants": [{ "id", "file", "anchor", "replacement" }] }`. `anchor` is exact text that
882
- occurs once in `file`; `"runnable": false` at the top level says the suite cannot run here.
883
-
884
- The testing reviewer's contract is `mutant_candidates` for **every changed branch**, including
885
- code downstream of the diff that the diff makes reachable differently. The main session writes
886
- that list to `mutants.json` unchanged. It may not narrow, drop or merge candidates to fit a
887
- budget: a smaller pass is a cap (below), stated, never a smaller list.
888
-
889
- Run `keryx review mutate --test "<the nearest suite command>" --package <review-dir>`. It
890
- applies each mutant in a scratch copy of the worktree (never in the worktree), refuses to
891
- start when the baseline is red, and writes the table to `research-evidence/mutation-<n>.md`
892
- and `.json`. A mutant is `killed` (the suite went red), `survived` (nothing pins that
893
- behaviour), `timeout`, or `invalid` (anchor missing or not unique, file outside the copy).
894
- A survivor is evidence for the finding that names it.
895
-
896
- When `--test` is a plain `[env] [NAME=value] bun test <paths>` command, each mutant runs with
897
- `--bail` inserted right after `bun test`: the first red test ends that run, so a killed mutant
898
- costs the time to its first failure, not the whole suite. The baseline always runs in full, and
899
- a green run is the same with or without the flag, so a survivor stays a survivor. One verdict can move: a mutant that fails an early test and would hang in a later one is `killed` with bail and `timeout` without it. Any other command shape
900
- (`sh script`, quotes, pipes, `bunx`) runs as given. `--no-bail` turns this off and takes no value.
901
- The `.json` record carries `bail: true` when it was applied; always `startedAt`, `loadavg` (sampled
902
- at the start of the pass), `provenanceMs`, `copyMs` and `mutantsMs`; `sweptScratch` and `sweepMs` only when it removed leftover scratch; and `head` and `treeHash` only
903
- when the worktree is the root of a git checkout and the size and time limits of that step held.
904
- `treeHash` hashes the tracked changes against HEAD (staged or not) and the untracked, non-ignored
905
- files, so two passes over the same code agree. It leaves out the review packages under
906
- `.metaproject/reviews`, ignored files (the scratch copy still includes them, except linked worktrees, which it leaves out), the inside of an
907
- untracked nested repository, and the content of an untracked file over 10 MiB (counted by size).
908
- Records written before these fields exist stay valid.
909
- The scratch copy leaves out linked worktrees (such as those under `.claude/worktrees/` and `.worktrees/`);
910
- submodules and embedded clones are copied, and the repository's own mutate-scratch never is, also with
911
- `--scratch tmp`. Before copying, a pass removes the operator's own `keryx-mutate-*` directories whose owner
912
- died (no heartbeat for two minutes) or stopped refreshing its marker for ten minutes, and unmarked ones older
913
- than six hours.
531
+ Attended, the pass is not optional once mutants were proposed. The testing reviewer proposes
532
+ `mutant_candidates` for **every changed branch**, including code downstream of the diff that the
533
+ diff makes reachable differently, each `{ "id", "file", "anchor", "replacement" }` (`anchor` is
534
+ exact text that occurs once in `file`; `kind` is `behavior` or `presentation`; `"runnable": false`
535
+ at the top level says the suite cannot run here). The main session writes that list to
536
+ `<review-dir>/research-evidence/mutants.json` unchanged. It may not narrow, drop or merge
537
+ candidates to fit a budget: a smaller pass is a cap, stated, never a smaller list.
538
+
539
+ Run `keryx review mutate --test "<the nearest suite command>" --package <review-dir>`. It runs in a
540
+ scratch copy, refuses a red baseline, and writes the table to `research-evidence/mutation-<n>.md`
541
+ and `.json`. A survivor is evidence for the finding that names it. `--cap <n>` runs the first `n`
542
+ candidates; the rest stay pending and keep blocking the coverage gate until a later pass runs them.
914
543
 
915
544
  `keryx review complete` refuses while proposed mutants are unrun on an attended round, unless the
916
545
  operator waived the pass themselves: the `review_waive_mutation` card in keryx shell, or their answer to
917
546
  the host question recorded with `keryx review waive-mutation --package <review-dir> --reason "<why>"
918
- --answered-by … --answer-text … --question-text …` (it writes `operator-decisions.json`; a `dispatch.mutationWaiver` quote you write is not enough on a package
919
- `keryx review start` created). Attended is what the start recorded in `run-profile.json`: every round
920
- except `review start --unattended` and `keryx review run --autonomous`, which record `Not run: mutation
921
- pass` without asking.
922
-
923
- These operator gates (cards, terminal commands, host questions, plan confirmation, decision records) keep a
924
- cooperating agent from cutting corners and make every decision visible and attributable; they do not
925
- stop a hostile same-user agent, which can fake a pty, invent a host-question answer or write the JSON
926
- records itself (the TM-03/TM-04 boundary). The autonomous runner's mutation-gate exemption predates flow 457 and is kept on purpose.
927
-
928
- `keryx review mutate --cap <n>` runs the first `n` candidates and records `cap` and `not_reached`
929
- in `mutation-<n>.json`. The table then prints `Not run: N candidates` (and the report must carry
930
- that line, see `keryx review report-parity`). A candidate the cap left out is still pending, so it
931
- keeps blocking the coverage gate until a later pass runs it; a cap moves work to the next pass, it
932
- never closes it.
547
+ --answered-by … --answer-text … --question-text …` (a `dispatch.mutationWaiver` quote you write is not
548
+ enough). `review start --unattended` and `keryx review run --autonomous` record `Not run: mutation
549
+ pass` without asking. These operator gates keep a cooperating agent from cutting corners and make every
550
+ decision attributable; they do not stop a hostile same-user agent.
933
551
 
934
552
  ### Severity audit — `keryx review severity-audit`
935
553
 
936
554
  A reviewer that argues a finding from a mutant writes `mutant:<id>` in the finding's `evidence`.
937
- After the mutation pass run `keryx review severity-audit --package <review-dir>`: a cited mutant
938
- that survived on a file the review changed moves a minor finding up to major only when no mutant
939
- in that file was `killed` (or `timeout`) in any recorded pass, because then nothing in the suite
940
- exercises the changed behaviour. It records `severity_audit {from, to, evidence: "mutation-<n>.json#<id>"}`.
941
- When the file has a killed mutant, the suite covers the code, the survivor is a gap in covered
942
- code, and the severity is held (see below). A survivor shows a missing assertion, not wrong
943
- behaviour. A finding that cites a mutant no
944
- run executed stays minor (a major is capped at minor) and gets the label `unproven`. The audit
945
- never deletes a finding and never touches a blocker; it is a separate pass from the verifier,
946
- which can only delete. `--dry-run` prints the changes without writing `findings.json`.
947
-
948
- Each mutant in `mutants.json` carries a `kind`: `behavior` (the default, and what a record written
949
- before the field reads as) or `presentation` (it changes only what a reader sees: a label, a
950
- column, copy, spacing). A behavior survivor in a file with no killed mutant raises as above. When
951
- the only survivors a finding cites are `presentation`, or every behavior survivor sits in a file
952
- with a killed mutant, the severity stays, and the finding gets
953
- `severity_audit {held: {severity, mutant, kind: "presentation" | "covered", evidence, reason}}` instead of
954
- `{from, to}`. A held note is not a raise and not a deletion; it is the record that a survivor was
955
- seen and did not move the severity, so the report must say so.
956
-
957
- `keryx review report-parity <review-dir>` prints what the round left behind as Markdown to paste
958
- into `report.md`: the `Not run: N candidates` line, each held note, and each follow-up still open
959
- as `Not verified: <text>`. The same lines show in `keryx review status`, in the shell
960
- `/review parity` view and in the sidebar. `keryx review complete` warns, and does not refuse, when
961
- any of them exists and the report names none.
555
+ After the mutation pass run `keryx review severity-audit --package <review-dir>`; it raises, holds or
556
+ labels each such finding and records why. A held note is the record that a survivor was seen and did
557
+ not move the severity, so the report must say so. Then run `keryx review report-parity <review-dir>`
558
+ and paste what it prints (the `Not run: N candidates` line, each held note, each open follow-up as
559
+ `Not verified: <text>`) into `report.md`.
962
560
 
963
561
  ### Layout measurements on a shell host
964
562
 
@@ -966,39 +564,20 @@ A shell reviewer cannot start a browser. Before dispatching `review-layout` the
966
564
  the browser measurements itself (Playwright, or Storybook with its test runner) for the changed
967
565
  components and passes the output files as `context_files` in the **first** dispatch. A measurement
968
566
  counts as evidence for `review-layout` when it names the command and the viewport it ran at; one
969
- without them is context, not evidence.
970
-
971
- `src/review/retry-plan.ts` treats `NEEDS_CONTEXT` as one refill: the first one re-dispatches the
972
- role with what it asked for. A second `NEEDS_CONTEXT` from the same role that covered no new slice and
973
- asks nothing new is `notRun`; the reason is `layout: no engine` for `review-layout` and `no engine` for any other
974
- role when its questions ask for a browser or engine and name no route without one, else `no progress after one
975
- context refill`, and the round goes on. A second one that covered a new slice or asked a new question still gets its refill.
567
+ without them is context, not evidence. A second `NEEDS_CONTEXT` that moves nothing is recorded Not
568
+ run by `keryx review next` (`layout: no engine`), and the round goes on.
976
569
 
977
570
  ### Pull request context — `keryx review context-collect`
978
571
 
979
572
  A pull-request review starts with `keryx review context-collect --repo <o/r> --pr <n> --package <review-dir>`.
980
- It writes `pr-context.json` and `pr-context.md` into the package: every review comment in full (the
981
- 800-character cut applies only to a finding's `problem`), the round-1 intent (kept when a later round
982
- collects a new head), the CI status (`--checks <file>` or `gh pr checks`; `unknown` when neither is
983
- available) and the backend pins the pull request names (refs on lines that talk about the backend).
984
- Set `pr_context` in every reviewer payload to the `.md` path; reviewers read it before the diff.
985
- `keryx review dispatch-check --payload <file> --pr-context` refuses a payload without it
986
- (`REVIEWER_INPUT_NO_PR_CONTEXT`).
987
-
988
- ## Preflight 4 — PR state, depth and estimate before dispatch
989
-
990
- Two 2026-10-15 rounds took 2 h and 3.5 h. One verdict was ready at minute 55, was held to
991
- minute 119, and the PR merged first; the other re-dispatched a finished wave and ended at 27 of
992
- 41 slices. The operator can only act on a risk they were told about.
993
-
994
- 1. On a PR target read merged / approved / CI (`gh pr view <n> --json state,reviewDecision,statusCheckRollup`). Say in one line what the state means for the round: an approved PR with green CI can merge any minute, and a merged PR makes the rest of the round a post-merge audit.
995
- 2. **Later, once the package and slices exist** (after `review scope`, `review start` and `review slice --package`, before the first reviewer starts): `keryx review required --mode all --scope .metaproject/data/review/scope.json --depth auto --package <review-dir>` prints the reviewer set and the depth it chose (see "Depth floor"); auto needs the file list and a line count, else the round is full. `keryx review estimate --package <review-dir> [--manifest <slices/manifest.json>]` prints assignments, waves and a duration range; the manifest defaults to `<package>/slices/manifest.json`, then `.metaproject/data/review/slices/manifest.json`.
996
- 3. Show the operator depth + estimate and the merge risk before the first dispatch. Attended: let them choose `full` over a light default. Unattended: record both in the report and continue.
997
- 4. **An over-threshold plan waits for the operator.** `estimate` flags a plan over `reviewPlan.maxDispatches` (default 40) or `reviewPlan.maxMinutes` (default 90) in `routing.config.json`; `dispatch-check --package` and `ledger build` refuse it (`REVIEWER_INPUT_PLAN_UNCONFIRMED`) until `<review-dir>/plan-confirmation.json` exists. Only the operator writes it: the `review_confirm_plan` card in keryx shell, or the operator's answer to the host question recorded with `keryx review confirm-plan --package <review-dir> --answered-by <source>:<ref> --answer-text "<their words>" --question-text "<the question>"` (`confirmedVia: "host-question"`), or `keryx review confirm-plan` / `keryx review estimate --package <review-dir> --confirm --quote "<their words>"` in their terminal (the terminal forms refuse without a TTY). Unattended, the plan is not dispatched: report the estimate and stop.
573
+ It writes `pr-context.json` and `pr-context.md` into the package (every review comment in full, the round-1
574
+ intent, the CI status, the backend pins the pull request names). Set `pr_context` in every reviewer payload to
575
+ the `.md` path; reviewers read it before the diff. `keryx review dispatch-check --payload <file> --pr-context`
576
+ refuses a payload without it.
998
577
 
999
578
  ## Between waves — an authorized plan keeps the round going
1000
579
 
1001
- Rounds on Claude Code lost 31 and 58 minutes between waves with the plan authorized and slices open, to a turn that ended or a "continue?" nobody needed to ask. keryx shell has a closing gate (`decideReviewGate`) for this; other hosts have this section. `keryx review next` records every call in `<package>/tool-calls/wave-events.jsonl` and writes an `idle` event for a gap, so the pause shows in the round summary.
580
+ keryx shell has a closing gate (`decideReviewGate`) for this; other hosts have this section. `keryx review next` records every call in `<package>/tool-calls/wave-events.jsonl` and writes an `idle` event for a gap, so the pause shows in the round summary.
1002
581
 
1003
582
  1. **Authorized.** The plan is authorized when `keryx review estimate` does not ask for confirmation, or the operator's confirmation for this plan is recorded (`plan-confirmation.json` with the current plan key). `keryx review next` reports it: the continuation line in text mode, `planAuthorized` and `continue` under `--json`. `planAuthorized: null` means the check could not run: treat it as not authorized and say why in one line.
1004
583
  2. **No question about pace.** While it is authorized, ask no "continue?", no "launch the next wave?" and no "close with waivers or continue?". Do not end the turn before `next` returns `done` or a reviewer is `Not run`. Dispatch what `next` returned, save the replies, run `next` again.
@@ -1012,30 +591,24 @@ Rounds on Claude Code lost 31 and 58 minutes between waves with the plan authori
1012
591
  6. **Every stop is recorded.** The report names each stop from the list with its reason (which card, which ceiling, which plan key), so a pause that was not on the list is visible as a defect.
1013
592
  7. **A status question is answered, not obeyed.** When the operator asks "how is it going?" mid-round, answer in one line and keep working; it is not a request to stop. Only an explicit "stop" or "wait" stops the round.
1014
593
 
1015
- A gap line in the round summary ("Gaps without a launch after the plan was authorized: N, longest M min") counts the pauses that were not on this list and the waits for an operator card alike; read each against the stops recorded in item 6.
1016
-
1017
594
  ## Early verdict — the verdict is interim until `complete`
1018
595
 
1019
- As soon as every reviewer result and the verifier's are on disk, save each verifier pass to `research-evidence/verifications.json` first (without it a refuted finding still counts), then run `keryx review verdict <id|path> [--json]`: it reads `<package>/raw`, where every host keeps the round's results (`--raw <dir>` only for results kept elsewhere; the shared `.metaproject/data/review/raw` mixes in other rounds' replies). It prints the interim verdict and writes `verdict-interim.md` into the package. Give the operator that verdict in the same message; do not hold it for the mutation pass, the ledger or `complete`.
596
+ As soon as every reviewer result and the verifier's are on disk, save each verifier pass to `research-evidence/verifications.json` first (without it a refuted finding still counts), then run `keryx review verdict <id|path> [--json]`: it reads `<package>/raw` and writes `verdict-interim.md` into the package. Give the operator that verdict in the same message; do not hold it for the mutation pass, the ledger or `complete`.
1020
597
 
1021
598
  The tail keeps running after it: the mutation pass (`keryx review mutate`), `ledger build`, `ingest`, `readiness` and the `review_complete` card (`keryx review complete` for a human at a terminal). Every managed round finishes them. The round is **not done** until `complete`: the verdict you gave is interim, and the report says so and names what the tail may still change (a surviving mutant, a verifier refutation, a late reviewer result). A light round has no mutation pass: its tail is `ledger build`, `ingest`, `readiness`, `complete`.
1022
599
 
1023
600
  ## Early verifier — start on the first blocker or major
1024
601
 
1025
- Do not wait for the last reviewer. When the first `blocker` or `major` finding arrives, dispatch `review-verifier` over the findings you hold, while the other reviewers keep running. Each later blocker or major starts another verifier pass over just the new findings (each pass is its own run; Wave C overlaps A and B here, and Step 9b's `verify_order` orders the later passes), so verification finishes within minutes of the last reviewer. The verifier stays delete-only and never verifies a finding its own reviewer raised; the merge still comes from `keryx review ingest --verifications <file>`, once per pass.
602
+ Do not wait for the last reviewer. When the first `blocker` or `major` finding arrives, dispatch `review-verifier` over the findings you hold, while the other reviewers keep running. Each later blocker or major starts another verifier pass over just the new findings (each pass is its own run; Step 9b's `verify_order` orders the later passes), so verification finishes within minutes of the last reviewer. The merge comes from `keryx review ingest --verifications <file>`, once per pass.
1026
603
 
1027
604
  ## Recovery — collect, validate, ingest, dispatch only what is missing
1028
605
 
1029
606
  After a timeout, a crash or a resumed session, in this order:
1030
607
 
1031
- 1. **Collect.** `keryx review retry-plan --manifest <package>/slices/manifest.json --package <package> --reviewer <id> --next-wave` reads `<package>/raw/` first and collects late reviewer results; it prints `collected late: N` and never re-hands a slice that is finished.
608
+ 1. **Collect.** `keryx review next --package <package>` (or `keryx review retry-plan --manifest <package>/slices/manifest.json --package <package> --reviewer <id> --next-wave` for one reviewer) reads `<package>/raw/` first, collects late reviewer results and never re-hands a finished slice.
1032
609
  2. **Validate** each collected reply (a `STATUS:` line and a `REVIEW_RESULT` block matching `reviewer-finding.schema.json`), **ingest** it, and rebuild `research.json` with `ledger build`; run `ingest --research` once it prints READY.
1033
- 3. **Dispatch only what is missing:** the wave `retry-plan` prints. A wave whose results are on disk is never dispatched again. `keryx review next --package <package>` answers for every reviewer at once: it counts each valid reply a reviewer left (`-w1`, `-w2`, ... in wave order; the file mtime only orders replies with no wave number), so the slices and escalations of an older wave are not lost to a newer file; `*.prev*.txt` copies never take part; a `DONE` or `DONE_WITH_CONCERNS` reply with no `slices` list is listed as `rejected` with the reason and its slices stay open, so re-dispatch that reviewer and ask for the list; a reply already counted (by hash) is not counted twice, so asking again changes nothing. A `needs_context` entry may be a string or an object with a `question`, `text` or `message`; either is an open question.
1034
- 4. **A second timeout of the same reviewer changes the task, not only the diff size:** fewer slices per dispatch, a narrower focus (one concern or one directory), or a lighter model tier for a mechanical slice. Two results in a row with nothing new are `Not run`, as `retry-plan` prints.
1035
-
1036
- ## dispatch-check on every payload
1037
-
1038
- Before any mass dispatch run `keryx review dispatch-check --payload <file> --manifest <dir>/manifest.json` on every payload, on every host. It fails `REVIEWER_INPUT_PATH_MISSING` when a `skill_path` or `context_doc` names a file that is not there, and still fails a payload that names no slice, exceeds the wave ceiling or breaks `reviewer-input.schema.json`. Fix the payload; a dead path costs a whole wave of refusals. Related: `review mutate` runs in a scratch copy under the repo and prints the baseline's tail when the baseline is red; `review start --graph-timeout <s>` bounds the graph build.
610
+ 3. **Dispatch only what is missing:** the waves `next` prints. A wave whose results are on disk is never dispatched again. A reply `next` lists as `rejected` (finished, no `slices` list) is re-dispatched with a request for the list.
611
+ 4. **A second timeout of the same reviewer changes the task, not only the diff size:** fewer slices per dispatch, a narrower focus (one concern or one directory), or a lighter model tier for a mechanical slice. `review start --graph-timeout <s>` bounds a slow graph build.
1039
612
 
1040
613
  ## Review Plan Preview — legacy groups
1041
614
 
@@ -1078,8 +651,7 @@ replies, issue comments, and commit messages going to a PR.**
1078
651
  no summary of the flow.
1079
652
  - Say what changed and where. **Link, do not paste.**
1080
653
  - The reasoning, the evidence, the rejected alternatives and the round history live
1081
- in the flow package — `journal.md`, `context.md`, the review artifacts — which is
1082
- durable, searchable, and costs a reader nothing to skip.
654
+ in the flow package — `journal.md`, `context.md`, the review artifacts.
1083
655
  - A GitHub artifact that needs more than a short paragraph is a signal that the
1084
656
  detail belongs in the flow with a link out, **not** that the paragraph should
1085
657
  grow.
@@ -1087,6 +659,4 @@ replies, issue comments, and commit messages going to a PR.**
1087
659
  carrying a link to the artifact holding the detail. The reply pass enforces
1088
660
  this; for anything else you write outward, hold yourself to it.
1089
661
 
1090
- This is deliberately asymmetric: **verbose in the flow, terse on GitHub.** The
1091
- flow is written for whoever resumes the work; GitHub is read by someone who did
1092
- not ask for our reasoning and is reading between other tasks.
662
+ Verbose in the flow, terse on GitHub.