@mrciphersmith/keryx 0.4.38 → 0.4.40
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.
- package/dist/cli.js +296 -121
- package/dist/core.js +2 -2
- package/dist/keryx-general-worker-entry.js +12 -5
- package/package.json +1 -1
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +174 -463
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +154 -584
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +213 -853
|
@@ -14,21 +14,22 @@ triggers:
|
|
|
14
14
|
- "review --hierarchical"
|
|
15
15
|
metadata:
|
|
16
16
|
author: "MrCipherSmith"
|
|
17
|
-
version: "1.
|
|
17
|
+
version: "1.17.0"
|
|
18
18
|
category: "review"
|
|
19
19
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
20
20
|
license: "MIT"
|
|
21
21
|
---
|
|
22
22
|
# Review Orchestrator
|
|
23
23
|
|
|
24
|
-
**You are the orchestrator. Run the round yourself, inline, in the main session that loaded this skill; never hand the whole round to one subagent.** This skill routes: it detects scope, dispatches specialized reviewers, and consolidates their findings into one report sorted by severity. The reviewers do the reviewing.
|
|
24
|
+
**You are the orchestrator. Run the round yourself, inline, in the main session that loaded this skill; never hand the whole round to one subagent.** This skill routes: it detects scope, dispatches specialized reviewers, and consolidates their findings into one report sorted by severity. The reviewers do the reviewing. Where a `keryx review` command computes or refuses something, this file says "run X; it decides Y" and does not repeat the rule: read the command's output and act on it.
|
|
25
25
|
|
|
26
26
|
## Preflight — before Step 0, in this order
|
|
27
27
|
**Engine selection fails closed.** The legacy flat path is the default. `--hierarchical` is the only hierarchical opt-in and requires all seven exact host tools: `review_agents_start`, `review_agents_plan`, `review_agents_spawn`, `review_agents_status`, `review_agents_wait`, `review_agents_result`, `review_agents_cancel`. If any is absent, stop before useful work with `STATUS: BLOCKED hierarchical_capability_unavailable — missing <names>`; never silently fall back to legacy or the autonomous runner. If all are present, follow `SKILL.detail.md` § "Review agents — explicit hierarchical path"; its start-result capability check may still refuse the selected adapter.
|
|
28
28
|
1. **Can it spawn?** Without `--hierarchical`, the round needs a subagent-spawn tool (`Agent`, `spawn_subagent` or the host's equivalent) and depth budget left: Claude Code nests subagents at most 3 deep, and at the limit `Agent` is withheld. A host with no spawn tool at all (Codex and other AGENTS.md hosts) does not stop here and does not review alone: it runs the round through the autonomous runner, `keryx review run --autonomous --target pr --ref <pull request URL>` (no pull request: `--target branch --ref <base> [--head <commit>]`), and relays its verdict and exit code (see "Hosts"). Only a session that has spent the depth budget (a nested subagent) stops; its whole output is this line, with no tool calls and no review of your own: `STATUS: BLOCKED nested_dispatch_unavailable — run this skill in the main session`
|
|
29
29
|
2. **Is a round needed?** List the files with `git diff --name-status --no-renames <base>...HEAD`, so a rename shows both paths. A diff where EVERY file is prose or machine-written data ends here with one line, `round not needed: <reason>`, and no reviewer. Prose is exactly: README or CHANGELOG at any depth; CONTRIBUTING, LICENSE, SECURITY or CODE_OF_CONDUCT at the top level; and under `docs/`, `.metaproject/wiki`, `.metaproject/reviews` or a flow's `journal.md`, a file with extension md, rst or adoc whose name holds a lowercase letter (an all-uppercase name such as AGENT or WARP is steering by convention). Machine-written data is a file under `coverage/` or `__generated__/` with extension lcov, info or map only; json, txt, html and md there are code. Steering is code wherever it sits, `docs/` included: a directory (singular or plural) named agent, skill, command, rule, prompt, instruction, persona, steering or hook, any path segment starting with a dot (`.claude`, `.cursorrules`, `.mcp.json`), a file name starting with SKILL, AGENT, CLAUDE, GEMINI, QWEN, CODEX, WARP, CRUSH, JULES, KNOWLEDGE, GUIDELINES, CONVENTIONS or copilot-instructions, ending in .local, .override, .instructions, .prompt, .agent or .chatmode before the extension, or containing prompt, instruction or system. A flow's `description.md`, `acceptance-criteria.md` and `tasks/` are gate inputs, so they are code. Every other file counts as code too, including lockfiles, committed `dist/` output, CI, auth, migrations, config JSON, and any path with `..`, a backslash, a leading `./` or `//`. `classifyRoundNeed` in `src/review/round-need.ts` is the tested reference of this rule; the host executes this text, and nothing in the CLI calls the function yet. `--all`, an explicit reviewer list or a gating round forces a round.
|
|
30
30
|
3. **Round ceiling.** 5 rounds (`REVIEW_ROUND_CAP`) over the same change. Past it: interactive, ask the operator; unattended, `STATUS: BLOCKED round_cap`.
|
|
31
|
-
|
|
31
|
+
- [ ] Check it, and say it: once `review plan` has written `<package>/round.json`, print `round cap: round <N> of 5` (N from `round.json`) before the first dispatch, and keep it as an item of your todo list. A round you did not state was not checked.
|
|
32
|
+
4. **PR state, shown before dispatch.** On a PR target read its state (`gh pr view <n> --json state,reviewDecision,statusCheckRollup`) and tell the operator, in one line, the risk that it merges before the round ends: an approved PR with green CI can merge any minute; a merged PR makes the round a post-merge audit. Depth and the estimate come from `keryx review plan` ("Round plan" 1, 4) and are shown with it before the first reviewer starts.
|
|
32
33
|
|
|
33
34
|
## Hosts — the same round, different tools
|
|
34
35
|
|
|
@@ -41,62 +42,64 @@ license: "MIT"
|
|
|
41
42
|
| Result file | `save_result_to: <package>/raw/<reviewer>.txt` | the reviewer writes `<package>/raw/<reviewer>.txt` itself, before it replies | as Claude Code | its own package |
|
|
42
43
|
| Wave bytes | `--host keryx-shell` (60000: a child dies at 5 min) | `--host claude-code` (150000) | `--host codex` / `--host other` (150000) | its own |
|
|
43
44
|
|
|
44
|
-
- **Every host keeps the same files, per package** (`<package>` is the directory `keryx review start` created): slices in `<package>/slices/`, one reply per dispatch in `<package>/raw/<reviewer>.txt` (reviewer replies only), one driver per dispatch in `<package>/drivers
|
|
45
|
+
- **Every host keeps the same files, per package** (`<package>` is the directory `keryx review start` created): slices in `<package>/slices/`, one reply per dispatch in `<package>/raw/<reviewer>.txt` (reviewer replies only), one driver per dispatch in `<package>/drivers/`, and `research.json` from `keryx review ledger build --package <package>` — never by hand. The shared `.metaproject/data/review/raw` holds other rounds' replies: never write there and never pass it as `--raw`.
|
|
45
46
|
- **The result is the file, never the spawn tool's output.** keryx shell cuts a child's summary at 16000 characters and Claude Code returns only the last message: parse `<package>/raw/<reviewer>.txt`. A missing file is no result (`BLOCKED`). Token spend: keryx shell appends `KERYX_USAGE {"tokens_in":…,"tokens_out":…,"model":…,"by":"host"}` to that file itself; on another host, when your spawn tool's result reports the subagent's tokens, append that one line, with `"by":"host"`, to the file yourself (a dispatch without it is counted unknown, never 0; a line without the mark is counted as stated by the reviewer, not measured).
|
|
46
|
-
- **Caller token.** `keryx review start` prints `export KERYX_REVIEW_CALLER_TOKEN=…`; outside keryx shell export it on this session
|
|
47
|
-
- **Operator decisions.** In keryx shell the operator answers a card: `review_confirm_plan`, `review_waive_readiness`, `review_waive_coverage`, `review_waive_mutation`, `review_override_reviewers`, `review_chunks_answer`, `review_publish`, `review_comments_reply`, `review_decide_premise`, `review_complete`. Call the card and never send the operator to a terminal for these acts; they answer it in the shell or in the Telegram topic. A card is a keryx-verified press
|
|
48
|
-
- **Host question, four acts:** `confirm-plan`, `waive-mutation`, `override-reviewers`, `decide-premise`. Where no card exists (Claude Code, Codex, other hosts) never send the operator to a terminal or keryx shell for them. Ask with the host's own question tool, as you would on a card, with the verb's options: `yes` or `no`; `waive` or `keep`; `override` or `keep`; `uphold` or `dismiss`. The question names its subject: for `confirm-plan` the plan numbers as the plan card shows them (reviewers, waves, dispatches, minutes, cost); for `waive-mutation` the mutant ids or their count; for `override-reviewers` the reviewer names; for `decide-premise` the finding id. **A Telegram operator:** When the session has the `mcp__helyx-channel__send_poll` tool, the operator reads Telegram and not the terminal, and the host's own question tool never reaches them: `AskUserQuestion` draws a selector in a terminal nobody watches and the session hangs. Ask every question of this skill through `send_poll` instead (`questions: [{question, options}]`, one call for the three start questions), recommended option first, and wait for the `poll_submit:<id>` message; do not re-ask in the terminal. Record the answer with `--answered-by helyx-poll:<poll-id>` and a distinct `:<message-id>` or `/<question>` ref per question.
|
|
47
|
+
- **Caller token.** `keryx review start` prints `export KERYX_REVIEW_CALLER_TOKEN=…`; outside keryx shell export it on every later keryx call of this session (`tier`, `blast-radius`, `layers`, `dispatch-check`, `next`, `ingest` …: each shell command starts with the export), or readiness item 10 reads "not observable on this host".
|
|
48
|
+
- **Operator decisions.** In keryx shell the operator answers a card: `review_confirm_plan`, `review_waive_readiness`, `review_waive_coverage`, `review_waive_mutation`, `review_override_reviewers`, `review_chunks_answer`, `review_publish`, `review_comments_reply`, `review_decide_premise`, `review_complete`. Call the card and never send the operator to a terminal for these acts; they answer it in the shell or in the Telegram topic. A card is a keryx-verified press: first choice wherever one exists.
|
|
49
|
+
- **Host question, four acts:** `confirm-plan`, `waive-mutation`, `override-reviewers`, `decide-premise`. Where no card exists (Claude Code, Codex, other hosts) never send the operator to a terminal or keryx shell for them. Ask with the host's own question tool, as you would on a card, with the verb's options: `yes` or `no`; `waive` or `keep`; `override` or `keep`; `uphold` or `dismiss`. The question names its subject: for `confirm-plan` the plan numbers as the plan card shows them (reviewers, waves, dispatches, minutes, cost); for `waive-mutation` the mutant ids or their count; for `override-reviewers` the reviewer names; for `decide-premise` the finding id. **A Telegram operator:** When the session has the `mcp__helyx-channel__send_poll` tool, the operator reads Telegram and not the terminal, and the host's own question tool never reaches them: `AskUserQuestion` draws a selector in a terminal nobody watches and the session hangs. Ask every question of this skill through `send_poll` instead (`questions: [{question, options}]`, one call for the three start questions), recommended option first, and wait for the `poll_submit:<id>` message; do not re-ask in the terminal. Record the answer with `--answered-by helyx-poll:<poll-id>` and a distinct `:<message-id>` or `/<question>` ref per question. Unattended, nobody is asked: the command refuses `--answered-by`, and the act is recorded Not run.
|
|
49
50
|
- **Record the answer** with `keryx review <verb> --package <package> --answered-by <source>:<ref> --answer-text "<their words, verbatim>" --question-text "<the question as asked>"`, plus `--reason "<why>"` on `waive-mutation`, `override-reviewers` and `decide-premise` (`decide-premise` also `--finding <global_id> --answer uphold|dismiss`). In keryx shell use the card first: `keryx-shell:<ref>` is only for a plain question the shell itself asked. `claude-code:<ref>` and `codex:<ref>` are for the host harness's own question tool, `<ref>` its question id; `helyx-poll:<poll-id>[:<message-id>]` for a Telegram poll; `other:<ref>` for a host that asks in its reply, `<ref>` the message id or a short label.
|
|
50
|
-
- **What the record means.** `confirmedVia: "host-question"` keeps the question and the answer so a reviewer can check them; keryx does not verify them, which is why it is weaker than a card. Record only an answer the operator gave: free text that is not one of the options, a decline, an answer naming the other choice, or words you wrote is not a decision.
|
|
51
|
-
- **Terminal or card only.** The other acts stay with the operator, who runs the exact command in their own terminal outside keryx shell: `keryx review complete <package> --waive <item> "<their words>"` or `--waive-coverage "<their words>"`, `keryx review chunks estimate --package <package> --answer yes --quote "<their words>"`, `keryx review publish <package>`, `keryx review comments reply … --final`. You wait. Never run `--mode automatic` or `--yes`.
|
|
51
|
+
- **What the record means.** `confirmedVia: "host-question"` keeps the question and the answer so a reviewer can check them; keryx does not verify them, which is why it is weaker than a card. Record only an answer the operator gave: free text that is not one of the options, a decline, an answer naming the other choice, or words you wrote is not a decision.
|
|
52
|
+
- **Terminal or card only.** The other acts stay with the operator, who runs the exact command in their own terminal outside keryx shell: `keryx review complete <package> --waive <item> "<their words>"` or `--waive-coverage "<their words>"`, `keryx review chunks estimate --package <package> --answer yes --quote "<their words>"`, `keryx review publish <package>`, `keryx review comments reply … --final`. You wait. Never run `--mode automatic` or `--yes`. **Shell calls in a `trust` or `auto` session.** Once a search, web, MCP or external-agent result has entered the turn, only a routine command runs without asking the operator, so write each call to stay routine: one keryx command per shell call (a short `&&` chain of keryx and read-only git commands is fine, a chain with `gh` or any other program is not); no `$(…)`, backticks or variables inside it, so read a pull request's base and head in a call of their own and pass them as literal SHAs; `keryx agents external list --no-probe`, never without the flag; a revision with braces quoted (`git cat-file -e '<sha>^{commit}'`). A `gh` call still asks: that is expected, so make it once and reuse what it printed.
|
|
52
53
|
|
|
53
54
|
## Round plan — the order on every host
|
|
54
55
|
|
|
55
|
-
1. `keryx review plan --target <pr-url|branch> [--ref <base>] [--head <sha>] --host <host> [--memory-query "<query>"] [--unattended]` is the one command: it runs start, scope (
|
|
56
|
-
2.
|
|
57
|
-
3.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
1. `keryx review plan --target <pr-url|branch> [--ref <base>] [--head <sha>] --host <host> [--memory-query "<query>"] [--unattended]` is the one command: it runs `start` (round detection, `round.json`, `prior_findings.json`), `scope` (into `<package>/scope.json` and `scope-files.json`), `blast-radius` (Step 3b), `slice` (slices, manifest, one driver per reviewer × wave), `required --depth auto` (the roster) and `estimate`, writes `<package>/plan.json` and dispatches nothing. Read the round first (Step 1a). `--head` wants a SHA (`git rev-parse HEAD`), not `HEAD`. **A pull request is reviewed at its own head.** Without `--head` the round records the checkout's commit, so read the pull request's head first (`gh pr view <n> --json headRefOid --jq .headRefOid`) and, unless `git rev-parse HEAD` prints the same commit, fetch it (`git fetch origin <sha>`) and pass `--head <sha>`; `review start` and `review plan` refuse a checkout that is at another commit than the pull request.
|
|
57
|
+
2. If `plan` stops with an error, run the stages one by one in the same order and fix what the failing one names: `keryx review start --target <kind> --ref <ref> --memory-query "<query>" --host <host> [--unattended]`, `keryx review scope --ref <base> --json > <package>/scope.json`, `keryx review blast-radius --ref <base> --package <package> --json > <package>/blast-radius.json`, `keryx review slice --ref <base> --package <package> --host <host>`, `keryx review required --mode all --scope <package>/scope.json --depth auto --package <package>`, `keryx review estimate --package <package>`.
|
|
58
|
+
3. **Run the tests in `<package>/tests-to-run.json`, every round — reading the list is not running it.** Reasoned omissions (`unrelated-symbol`, `hub-damped`, `text-hub`, `test-consumer`) are context, not scope.
|
|
59
|
+
- [ ] Run them through keryx so the run is recorded: `keryx review verify-run --package <package> --finding tests-to-run -- "<test command> <the listed files>"` (the command the radius prints; `bun test` here). It saves `<package>/research-evidence/verify-tests-to-run-<n>.txt`; without that file `verdict` and `readiness` warn "none recorded as run".
|
|
60
|
+
- [ ] Run them at the reviewed head. A working tree at another commit is not a reason to skip: `git worktree add <scratch dir> <head-sha>` and run inside it (`-- "cd <scratch dir> && <test command> …"`).
|
|
61
|
+
- [ ] Hand the saved file's path to **every** reviewer (Reviewer brief, line T), not only the testing reviewer.
|
|
62
|
+
- [ ] Only when they cannot run at all (no installable dependencies, no test command): every brief and the report carry `Not run: tests-to-run (<reason>)`. A silent skip is a gap.
|
|
63
|
+
4. Show the operator depth, estimate and merge risk (Preflight 4). Over threshold, the operator confirms: in keryx shell call the card `review_confirm_plan` (never send them to a terminal); outside it, ask them with the host's question tool, the plan's numbers in the question, and record it with `keryx review confirm-plan --package <package> --answered-by … --answer-text … --question-text …` ("Hosts"). `dispatch-check` and `ledger build` refuse an unconfirmed plan. Unattended: report the estimate and stop with `STATUS: BLOCKED plan_over_threshold`.
|
|
64
|
+
5. Dispatch by slice roles from the drivers `slice` wrote: each role gets the slices that name it ("Slices, waves and results"). After each batch, `keryx review next --package <package>` decides what is left, an `escalated` core-role dispatch on a light slice included.
|
|
65
|
+
6. Verifier on the first blocker or major (Step 10). It runs no command itself: run `keryx review verify-run --package <package> --finding <id> -- <command>` and hand it the saved `research-evidence/verify-<id>-<n>.txt` as context. After it (no verifier ran: after the last reviewer), Wave D: `review-premise` (Step 10b).
|
|
66
|
+
7. `keryx review verdict <package>` to the operator, then the tail: mutation pass, `ledger build`, `ingest` (with `--premises`), the operator's answer to each held finding (Wave D), `readiness`, `complete`.
|
|
64
67
|
|
|
65
68
|
## Clean context — the round starts empty
|
|
66
69
|
|
|
67
70
|
Context comes only from your own context stages: scope, the Review Context Pack, the memory stage and the layers. Your session memory, the auto-memory index (`MEMORY.md`), remembered feedback and the earlier conversation are not inputs: do not read, quote or apply them.
|
|
68
71
|
- **Accepted exceptions, the only three:** `prior_findings` of an earlier round of the same package; review-notes and learning that reach you through the memory stage; a reviewer's own `memory_search`.
|
|
69
|
-
- **One memory read.** Run the stage query once and record it with `keryx review start … --memory-query "<query>"`. keryx writes `<package>/tool-calls/orchestrator.jsonl` itself from the moment the package starts: never create, edit or append to it. Readiness item 10, `memory-outside-stage`, blocks the `review_complete` card, `keryx review complete` and `review publish` on any other memory call; only the operator's waiver lifts it: in keryx shell call `review_waive_readiness` (a card, never a terminal), outside it `--waive memory-outside-stage "<operator quote>"` in their terminal
|
|
70
|
-
- **Open question.** Look in this skill and `SKILL.detail.md` first. If the answer is not there, ask the user: one question with the host's question tool (`AskUserQuestion`, `ask_user`, `send_poll` for a Telegram operator; "Hosts") interactively; unattended, the whole output is `STATUS: BLOCKED question — <the question>`. Never answer from memory or a guess. The one exception is the round's own pace: while the plan is authorized, "continue?", "launch the next wave?" and "close with waivers or continue?" are not open questions; the answer is already given ("
|
|
72
|
+
- **One memory read.** Run the stage query once and record it with `keryx review start … --memory-query "<query>"`. One `keryx memory search "<query>" --status accepted` call in the whole round, before `review plan`; `--memory-query` only records that query and searches nothing, so do not search again after `plan`. keryx writes `<package>/tool-calls/orchestrator.jsonl` itself from the moment the package starts: never create, edit or append to it. Readiness item 10, `memory-outside-stage`, blocks the `review_complete` card, `keryx review complete` and `review publish` on any other memory call; only the operator's waiver lifts it: in keryx shell call `review_waive_readiness` (a card, never a terminal), outside it `--waive memory-outside-stage "<operator quote>"` in their terminal; unattended, record it as Not run. Detail: `SKILL.detail.md` § "Clean context".
|
|
73
|
+
- **Open question.** Look in this skill and `SKILL.detail.md` first. If the answer is not there, ask the user: one question with the host's question tool (`AskUserQuestion`, `ask_user`, `send_poll` for a Telegram operator; "Hosts") interactively; unattended, the whole output is `STATUS: BLOCKED question — <the question>`. Never answer from memory or a guess. The one exception is the round's own pace: while the plan is authorized, "continue?", "launch the next wave?" and "close with waivers or continue?" are not open questions; the answer is already given ("One batch", `SKILL.detail.md` § "Between waves").
|
|
71
74
|
- **Named limit.** keryx cannot stop a runtime that loads the agent's memory before this skill starts, and reads of personal memory outside `keryx memory` are not visible to the log. The guarantee is instruction plus detection, not isolation.
|
|
72
75
|
|
|
73
76
|
## Workflow
|
|
74
77
|
|
|
75
78
|
```
|
|
76
79
|
Review Orchestrator Progress:
|
|
77
|
-
- [ ] Step 0: On a PR target, collect external comments — `keryx review comments collect`
|
|
80
|
+
- [ ] Step 0: On a PR target, collect external comments — `keryx review comments collect`; and `keryx review context-collect` (sets `pr_context`)
|
|
78
81
|
- [ ] Step 0b: On a PR target whose checks are red, triage each failed run with `keryx review ci-triage --run <id>` (opt-in `review.jev.ci_triage`) — see "CI Triage on Red Checks"
|
|
79
|
-
- [ ] Step 1: Build Review Context Pack — PR metadata AND the PR's own description, scope, rules, context_doc summary, accepted memory, and the cross-repo contracts the diff consumes (prose step: no `keryx review` command builds it
|
|
82
|
+
- [ ] Step 1: Build Review Context Pack — PR metadata AND the PR's own description, scope, rules, context_doc summary, accepted memory, and the cross-repo contracts the diff consumes (prose step: no `keryx review` command builds it)
|
|
80
83
|
- [ ] Step 2: Detect review mode (diff mode vs. path mode)
|
|
81
|
-
- [ ] Step 3: Build the bounded scope with `keryx review scope` — never by hand
|
|
82
|
-
- [ ] Step 3b: On a deep round,
|
|
83
|
-
- [ ] Step 4: Parse flags
|
|
84
|
-
- [ ] Step 5: Start questions, once, after Steps 1 and 3 — reviewers (default: the set `keryx review required --depth auto` prints; `--all` only when the operator asks), counterpart verification (default on), model plan; unattended — and an `auto` or `trust` shell session, which has no operator at the keyboard — takes the defaults
|
|
85
|
-
- [ ] Step 5c: When `review.jev.select` is on, run `keryx review jev-select`
|
|
86
|
-
- [ ] Step 6:
|
|
87
|
-
- [ ] Step 7: Stage 1 gate - spec compliance check (
|
|
88
|
-
- [ ] Step 8: Dispatch selected reviewers in parallel with the reviewer-input schema — see "How to spawn"
|
|
84
|
+
- [ ] Step 3: Build the bounded scope with `keryx review plan` (or `keryx review scope`) — never by hand
|
|
85
|
+
- [ ] Step 3b: On a deep round, keep the blast-radius `--json` file for `review ingest --blast-radius`; when it says "Cut blast radius", run the chunk waves and bring in pass findings (see "Scope B")
|
|
86
|
+
- [ ] Step 4: Parse flags (Routing Table); the rest of the roster is what `keryx review required` prints
|
|
87
|
+
- [ ] Step 5: Start questions, once, after Steps 1 and 3 — reviewers (default: the set `keryx review required --depth auto` prints; `--all` only when the operator asks), counterpart verification (default on), model plan; unattended — and an `auto` or `trust` shell session, which has no operator at the keyboard — takes the defaults
|
|
88
|
+
- [ ] Step 5c: When `review.jev.select` is on, run `keryx review jev-select` and drop its `skip` decisions from Wave A/B — see "Reviewer selection with Jev"
|
|
89
|
+
- [ ] Step 6: Compute each dispatch's model with `keryx review tier`; show the operator depth, estimate and merge risk, and get an over-threshold plan confirmed before any dispatch ("Round plan" 4; 6a: publish this plan)
|
|
90
|
+
- [ ] Step 7: Stage 1 gate - spec compliance check (issue, task doc, or the PR body)
|
|
91
|
+
- [ ] Step 8: Dispatch selected reviewers in parallel with the reviewer-input schema — see "How to spawn"; tick "Reviewer brief — required contents" for every payload first
|
|
89
92
|
- [ ] Step 9: Collect reviewer-finding schema results and handle NEEDS_CONTEXT
|
|
90
|
-
- [ ] Step 9b: `jev-triage` — advisory, annotate-only
|
|
93
|
+
- [ ] Step 9b: `jev-triage` — advisory, annotate-only annotations over the consolidated findings (opt-in `review.jev.triage`)
|
|
91
94
|
- [ ] Step 10: Wave C — when blockers/majors exist, `--verify` is set, or the PR is high-risk, dispatch `review-verifier` on the first blocker/major without waiting for other reviewers, then once per later pass over the findings held at that point
|
|
92
|
-
- [ ] Step 10b: Wave D — after the last verifier pass (none ran: after the last reviewer), dispatch `review-premise` (deep tier) over the canonical findings of severity ≥ minor (delta round: only those without a carried premise); pass its claims with `review ingest --premises <file>`;
|
|
95
|
+
- [ ] Step 10b: Wave D — after the last verifier pass (none ran: after the last reviewer), dispatch `review-premise` (deep tier) over the canonical findings of severity ≥ minor (delta round: only those without a carried premise); pass its claims with `review ingest --premises <file>`; then ask the operator about each held finding (see "Wave D")
|
|
93
96
|
- [ ] Step 11: Sort by severity, deduplicate, emit unified report
|
|
94
97
|
- [ ] Step 12: Emit the machine-readable `keryx:findings` block alongside the report
|
|
95
98
|
- [ ] Step 13: Report the stage counts: dropped by pre-filter, refuted by the verifier, downgraded and held by the premise judge, retained
|
|
96
99
|
- [ ] Step 14: Managed rounds only (not `lightweight`, which is report-only), after the final round, on an open pull request at the head you reviewed — answer every external comment once with `keryx review comments reply --final` (render with `--dry-run`; the post itself is the operator's: the `review_comments_reply` card in keryx shell, else they run it in their terminal; unattended: do not publish, hand the rendered body back) — never against a pull request the dispatch named as the caller's
|
|
97
100
|
```
|
|
98
101
|
|
|
99
|
-
Step 0 runs on **every** round. Step 14 runs **once**, after the last one.
|
|
102
|
+
Step 0 runs on **every** round. Step 14 runs **once**, after the last one.
|
|
100
103
|
|
|
101
104
|
### Step 6 — the model is computed, not chosen
|
|
102
105
|
|
|
@@ -113,43 +116,75 @@ Publish this checklist with `plan_set` under the ids `step-0`…`step-14` and `s
|
|
|
113
116
|
- One `Agent` call per reviewer, all calls of a wave in a single message, so the wave runs in parallel.
|
|
114
117
|
- Reviewers are read-only: they read the diff and the files and run only the read-only commands: `git log`, `git blame` and `git show` (law 4; `review-premise` too) where the host gives a read-only child git. keryx shell does not: a `spawn_subagent` child has no shell and no git tool, so you run `git log -L <start>,<end>:<file>` and `git blame -L <start>,<end> <file>` for each deliberate-looking site a reviewer must judge and pass the output in `context_files`; with neither, the reviewer says the history was not read. Beyond those, a reviewer runs only the layers-block commands (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`) and `keryx ctx rg|read`, never tests, health checks, servers, mutation or any command that writes in the reviewed tree: that evidence comes from you (`keryx review verify-run --timeout <seconds>`, `keryx review mutate`), the verifier, or the one testing reviewer with `run-tests`, in a scratch copy and a time budget. Each payload carries `allowed_tools` (`read-only` or `run-tests`) and `exec_budget_s`.
|
|
115
118
|
- Use the reviewer's exact `subagent_type`. If the runtime has no such type, use `general-purpose` and name the reviewer's `SKILL.md` path in the prompt. Neither available: that reviewer is `BLOCKED`.
|
|
116
|
-
-
|
|
119
|
+
- Build every payload and prompt from "Reviewer brief — required contents" below, and tick it off per dispatch before the wave goes.
|
|
120
|
+
- Prompts carry pointers, not pasted files — the diff, the SHAs, the PR, the schema paths — and never paraphrase a contract. On keryx shell the slices travel in `context_files` instead (below). Run `keryx review dispatch-check --payload <file> --manifest <package>/slices/manifest.json --package <package>` on every payload before a mass dispatch; on exit 1 fix the payload it names and do not dispatch around it (no slice, over the wave ceiling: dispatch fewer slices, a missing `skill_path` or `context_doc`, an unconfirmed plan, a schema break, no `pr_context` with `--pr-context`).
|
|
117
121
|
- A reply is a result only if it starts with a `STATUS:` line and carries a `REVIEW_RESULT` block matching `reviewer-finding.schema.json`; anything else is `BLOCKED`. The one exception: a reply or dispatch error of `STATUS: RATE_LIMITED` is handled by the Rate limits rule under Control, never marked `BLOCKED`.
|
|
118
122
|
- The model comes from `keryx review tier` (Step 6). On `spawn_subagent` pass its tier as `model_tier` on every reviewer — `review-verifier` and simple reviewers `light`, normal `standard`, complex reviewers and `review-premise` `deep` (`keryx review tier --premise`); an omitted tier runs the child on your own model.
|
|
119
123
|
|
|
124
|
+
### Reviewer brief — required contents (every dispatch)
|
|
125
|
+
|
|
126
|
+
One payload file per dispatch (`reviewer-input.schema.json`) plus one prompt. Each line: what goes in ← where it comes from. A line left out is a defect of the brief, whatever `dispatch-check` says (it checks the schema, not this list). Pointers, not paraphrases: where a line says "path", give the path and do not restate the text in your words.
|
|
127
|
+
|
|
128
|
+
**Payload fields**
|
|
129
|
+
- [ ] A `reviewer`, `scope_mode`, `branch`, `base_sha` ← `plan.json` / `round.json`; the prompt also names base and head SHA and the PR URL.
|
|
130
|
+
- [ ] B `slices` = this wave's slice ids ← the driver `drivers/<reviewer>-w<n>.json`; the prompt names their absolute paths (keryx shell: `context_files`).
|
|
131
|
+
- [ ] C `pr_context: <package>/pr-context.md` ← `keryx review context-collect` (Step 0).
|
|
132
|
+
- [ ] D `model` = the block `keryx review tier` printed for this dispatch, pasted verbatim ← Step 6. The same block goes, verbatim, into the prompt text and into the driver's `model` field (line S). "See payload", a summary or `model: omitted` is not the block.
|
|
133
|
+
- [ ] E `allowed_tools` and `exec_budget_s` on every payload ← `read-only` / `0`, except the one testing reviewer: `run-tests` / its seconds. The prompt states both values.
|
|
134
|
+
- [ ] F `budget` (`max_prompt_tokens`, `max_findings`) ← the token policy.
|
|
135
|
+
- [ ] G `layers` ← `keryx review layers block … --json` for this reviewer's files.
|
|
136
|
+
- [ ] H `metaproject.memory` ← the same entries as `review_context.memory` (line M).
|
|
137
|
+
- [ ] I Delta round, FIX slice: `is_fix_round: true` and `prior_findings` = the findings that slice answers ← `prior_findings.json`; the prompt asks for `prior_dispositions: [{id, disposition}]`, one per attached id. Later wave: `known_findings`.
|
|
138
|
+
- [ ] J Project reviewer: `skill_path` (absolute `<path>/SKILL.md`), the sentence that it overrides a same-named agent type, one "where your text names `<ref>`, read `<resolved>` instead" line per `shadowedRules` entry ← `keryx review reviewers --json`.
|
|
139
|
+
|
|
140
|
+
**`review_context` (`review-context.schema.json`) — one object, the same for every reviewer of the round**
|
|
141
|
+
- [ ] K `request` (the operator's words, flags, mode, range) and `git` (repo, branch, base, head, merge-base) ← the request, `round.json`.
|
|
142
|
+
- [ ] L `pr` = `number`, `url`, `title`, `state`, and `body` = the full description text ← `gh pr view <n> --json title,body`. The text itself, in `pr.body`: a path, a `body_summary` or a pointer to `pr-context.md` does not replace it.
|
|
143
|
+
- [ ] M `memory` = `{query, status_filter: "accepted", entries, searched}` ← the one `keryx memory search … --status accepted` of the round ("Memory (required)").
|
|
144
|
+
- [ ] N `requirements` = issue URL, task docs, and the acceptance criteria listed one by one ← `context_doc`, the issue, else the PR body (Stage 1 gate).
|
|
145
|
+
- [ ] O `rules` = the rule and convention files matched by the changed paths, as paths ← the scope's paths against `.metaproject/rules` and the project's convention docs.
|
|
146
|
+
- [ ] P `scope` (files by domain, `changed_lines`, `risk_areas`) and `token_policy` (budget, `omissions` from `slices/manifest.json`, `model_plan`) ← `<package>/scope.json`, the manifest, `keryx review tier`.
|
|
147
|
+
- [ ] Q `routing` = the decisions entry: `selected_reviewers`, `skipped_reviewers`, and `reasons` (why each reviewer was selected or skipped) ← `keryx review required`, Start question 1, `jev-select`.
|
|
148
|
+
- [ ] R `cross_repo` = one entry per consumed contract, pinned SHA (`state: merged`) or PR (`state: open`) ← "Cross-repo contracts are read, not assumed"; none consumed: `[]`.
|
|
149
|
+
|
|
150
|
+
**Driver**
|
|
151
|
+
- [ ] S `drivers/<reviewer>-w<n>.json` carries `model` (line D) and `result` under `<package>/raw/` ← `slice` wrote it with `model` empty; a dispatch with no driver gets one ("Slices, waves and results" 4).
|
|
152
|
+
|
|
153
|
+
**Prompt text**
|
|
154
|
+
- [ ] T Test output: the path of `research-evidence/verify-tests-to-run-<n>.txt`, or the `Not run: tests-to-run (<reason>)` line ← "Round plan" 3.
|
|
155
|
+
- [ ] U Severity and finding fields: point to `## Severity (canonical)` in `.metaproject/skills/gdskills/review/review-orchestrator/SKILL.md` and to `reviewer-finding.schema.json`; do not restate the rubric.
|
|
156
|
+
- [ ] V The cross-repo rule, pasted as written in "Cross-repo contracts are read, not assumed" (the one quoted sentence there, `info` not `major`) ← Context Pack.
|
|
157
|
+
- [ ] W Counterpart rules and round obligations: point to `SKILL.detail.md` § "Counterpart verification" and § "Round obligations" by path ← Start question 2.
|
|
158
|
+
- [ ] X Scope-B reviewer: `keryx review blast-radius … --brief` stdout verbatim; `review-degradation`: the `--degradation` stdout verbatim ← "Scope B".
|
|
159
|
+
- [ ] Y Write the whole reply to the driver's `result` (`<package>/raw/<reviewer>…txt`) before answering ← line S.
|
|
160
|
+
- [ ] Z Start with a `STATUS:` line and return a `REVIEW_RESULT` per `reviewer-finding.schema.json`, listing as `slices` the ids it read in full ← "Slices, waves and results" 3.
|
|
161
|
+
|
|
120
162
|
## Slices, waves and results — every host; keryx shell specifics marked
|
|
121
163
|
|
|
122
|
-
A reviewer starts in the project root and reads project files; a path outside the project root is unreadable to it. On keryx shell its `context_files` content reaches it wrapped as DATA, and slices and measurements travel only there (never pasted or retyped); elsewhere the prompt names the slice paths. `skill_path` and `pr_context` stay payload fields.
|
|
164
|
+
A reviewer starts in the project root and reads project files; a path outside the project root is unreadable to it. On keryx shell its `context_files` content reaches it wrapped as DATA, and slices and measurements travel only there (never pasted or retyped); elsewhere the prompt names the slice paths. `skill_path` and `pr_context` stay payload fields.
|
|
123
165
|
|
|
124
166
|
0. **Publish the plan before anything else (keryx shell).** Your first tool call is `plan_set` with `step-0`…`step-14` and `step-10b` all `pending`. A shell turn that has open plan items is continued by the host; a turn that ends on a text reply is over, and a message saying the review "cannot be honestly completed" ends the run with nothing reviewed. Never end the turn while a step is `pending` or `in_progress`: mark it `blocked` only with a cause you cannot fix with a command, and otherwise keep working. Step 6a then updates this plan rather than creating it.
|
|
125
|
-
1. **
|
|
126
|
-
2. **Slices travel by path; on keryx shell, only by `context_files`.**
|
|
127
|
-
3. **
|
|
128
|
-
4. **One batch.** Dispatch the whole wave — up to 10 reviewers — in one message, not one at a time. On keryx shell every round reviewer's `spawn_subagent` carries `review_wave: {"package": "<package>", "pass": "round"}` (a wave outside it counts against the turn's 32 children) and a `timeout_ms` that fits its wave: the default 300000 is sized for a wave of 60000 bytes, so a larger `--wave-bytes` needs a larger `timeout_ms`. Give each reviewer `max_rounds` of at least 40 (the default); a reviewer that spends its rounds reading the skill and the schema returns nothing.
|
|
129
|
-
5. **Never print a scope or a slice.** The tool output of one call is cut at about 20 KB and `keryx review scope` of a large PR prints hundreds of KB.
|
|
167
|
+
1. **Slices.** `review plan` (or `review slice`) cuts the diff into `<package>/slices/slice-NN.diff` files, a `manifest.json` with the wave budget, and drivers `drivers/<reviewer>-w<n>.json` (slice ids, absolute slice paths, `result` path). On keryx shell with a large diff pass a small `--max-bytes` (for example 18000) and `--wave-bytes` (for example 54000) so no wave outruns a reviewer's five minutes. Ledgers (csv, lockfiles, snapshots, generated files) are listed under `omissions` with a reason — list them in the report as not reviewed, never as clean.
|
|
168
|
+
2. **Slices travel by path; on keryx shell, only by `context_files`.** On keryx shell pass each reviewer its slice paths in `spawn_subagent`'s `context_files`: the host copies the text into that reviewer's task, so you never paste or retype a slice. Elsewhere name the slice paths in the prompt. Put the `slices` ids in its reviewer-input. A dispatch that names a git range but no slice leaves the reviewer with nothing to read — that is `BLOCKED`, not a review.
|
|
169
|
+
3. **The brief asks for the covered slices.** Tell every reviewer to list the `slices` it read in full in its `REVIEW_RESULT` object, as ids (`"slices": ["slice-01", "slice-02"]`), and to leave out a slice it did not read. A finished reply with no `slices` list covers nothing.
|
|
170
|
+
4. **One batch.** Dispatch the whole wave — up to 10 reviewers — in one message, not one at a time. On keryx shell every round reviewer's `spawn_subagent` carries `review_wave: {"package": "<package>", "pass": "round"}` (a wave outside it counts against the turn's 32 children) and a `timeout_ms` that fits its wave: the default 300000 is sized for a wave of 60000 bytes, so a larger `--wave-bytes` needs a larger `timeout_ms`. Give each reviewer `max_rounds` of at least 40 (the default); a reviewer that spends its rounds reading the skill and the schema returns nothing. Write the dispatch's `model` block into each driver you dispatch (`slice` leaves the field empty; Reviewer brief, line S); a dispatch with no driver gets `<package>/drivers/<reviewer>.json` = `{"reviewer", "slices", "result": "raw/<reviewer>.txt", "definition": "<path of the reviewer's SKILL.md>"}`, because `ledger build` takes the rule file from `definition`. Save each reply to its driver's `result`; only reviewer replies belong in `raw/`. **After each batch run `keryx review next --package <package>`** (never `retry-plan` once per reviewer): it decides every reviewer's next wave (reason `missing`, `retry`, `stalled` or `escalated`), prints the `- **Not run:** …` line to paste for a reviewer that stopped making progress, or prints `done`. **While the plan is authorized, do not stop between batches.** `next` says so with the line "plan authorized; continue the loop without asking the operator; stop only for the card list, for plan growth, or on done / Not run" (`--json`: `planAuthorized`, `continue`). Then dispatch what it returned in the same turn: no "continue?", no "launch the next wave?", no "close with waivers or continue?", and no end of turn before `next` prints `done` or the reviewer is `Not run`. The stops are the closed list in `SKILL.detail.md` § "Between waves" and nothing else. Only the operator can accept a smaller set than that (the `review_override_reviewers` card, or their answer to the host question recorded with `keryx review override-reviewers`, "Hosts"). An unfinished reviewer is never counted as a clean pass. **Persist every result, on every host.** On keryx shell pass each reviewer `save_result_to: <package>/raw/<reviewer>.txt`: the host writes its full final text there. Elsewhere the prompt tells the reviewer to write its whole reply to `<package>/raw/<reviewer>.txt` before it answers. Build `research.json` with `keryx review ledger build --package <package>` — never by hand — and do each gap's next command it prints; run `keryx review ingest --research <package>/research.json` once it prints READY (exit 0). A refused `review_complete` card (or `keryx review complete` at a human's terminal) names what is missing: fix that with a command and close again; it is never `blocked`.
|
|
171
|
+
5. **Never print a scope or a slice.** The tool output of one call is cut at about 20 KB and `keryx review scope` of a large PR prints hundreds of KB. Write it to a file and read the counts from the file (`keryx ctx read`, or `jq`); take `<base>` from `git symbolic-ref refs/remotes/origin/HEAD`, not a guessed `origin/main`. A missing directory is a command to run (`mkdir -p`), not a blocker. **Machine artifacts by direct write.** Save slices, payloads and results by redirection or `keryx ctx run --raw -- <command>`; the summarized form of `keryx ctx run` drops the bytes a later step parses.
|
|
130
172
|
6. **Write mutants whole.** A testing reviewer's `mutant_candidates` cover every changed branch, code downstream of the diff included. Write them to `research-evidence/mutants.json` unchanged; you may not narrow them, and a candidate no pass has run still blocks the coverage gate (`SKILL.detail.md`, mutation pass).
|
|
131
|
-
7. **Measure before `review-layout`.** Run the browser measurements (Playwright/Storybook) yourself and pass them in its first dispatch (`context_files` on keryx shell, by path elsewhere); they count as evidence when the command and viewport are named
|
|
173
|
+
7. **Measure before `review-layout`.** Run the browser measurements (Playwright/Storybook) yourself and pass them in its first dispatch (`context_files` on keryx shell, by path elsewhere); they count as evidence when the command and viewport are named (`SKILL.detail.md`).
|
|
132
174
|
|
|
133
175
|
## Control
|
|
134
176
|
|
|
135
177
|
- **Profiles.** The default is read-only: one round, no edits. `--fix` hands the findings to `flow-orchestrator` or `task-implementer`; the orchestrator never edits code. Control returns to this main session after each hand-off, which loads this skill again (never the implementer, which would nest); each re-review counts toward the ceiling (it adds 1 to the count).
|
|
136
|
-
- **Waves.** Split by diff domain (`core` = logic, security, architecture; `domain` = frontend, backend, conventions; `support` = style, tests), in that order; A/B/C/D below keep their dependency order, except Wave C, which starts early and overlaps A and B (see Wave C); Wave D runs after the last verifier pass. A full or `--all` round runs at most 10 reviewers per wave (`MAX_REVIEWERS_PER_WAVE_FULL`).
|
|
178
|
+
- **Waves.** Split by diff domain (`core` = logic, security, architecture; `domain` = frontend, backend, conventions; `support` = style, tests), in that order; A/B/C/D below keep their dependency order, except Wave C, which starts early and overlaps A and B (see Wave C); Wave D runs after the last verifier pass. A full or `--all` round runs at most 10 reviewers per wave (`MAX_REVIEWERS_PER_WAVE_FULL`). The domain order ranks reviewers inside a dispatch; it never holds Wave B back while `estimate` says the plan fits one wave — then every required reviewer goes out in the first message.
|
|
137
179
|
- **Rate limits.** On a reviewer dispatch that fails with a rate-limit or overloaded error (reported as `STATUS: RATE_LIMITED`, a harness signal, not a schema status), halve the wave, requeue the rest and honour `retry-after`, at most 300 seconds (`MAX_RETRY_AFTER_SECONDS`). After at most two halvings (`MAX_RATE_HALVINGS`) stop with `STATUS: BLOCKED rate_limited`, naming the queue left.
|
|
138
|
-
- **Early verdict.** When every reviewer and the verifier are done, save every verifier pass to `research-evidence/verifications.json`, then run `keryx review verdict <package>`
|
|
139
|
-
- **Recovery.** After a timeout
|
|
140
|
-
- **Done when** the consolidated report and the `keryx:findings` block are emitted and the stage counts and **Not run** are stated. A managed round (not `lightweight`, which is report-only) is also done only when every dispatched reviewer's result is recorded with `keryx review ingest` and the `review_complete` card has been answered (an agent never runs `keryx review complete`; that command is for a human in a terminal). `completed` means `keryx review readiness` passed, or each failing item but `premise-decisions` (answered per finding, never waived) is waived by the operator
|
|
180
|
+
- **Early verdict.** When every reviewer and the verifier are done, save every verifier pass to `research-evidence/verifications.json` and Wave D's claims to `research-evidence/premises.json`, then run `keryx review verdict <package>` and give the operator the verdict in the same message. A verdict given before Wave D ran is provisional, and you say so. The verdict is interim: the tail (mutation pass, ledger, ingest, readiness, the `review_complete` card) still runs, and the round is not done until `complete` (`SKILL.detail.md` § "Early verdict").
|
|
181
|
+
- **Recovery.** After a timeout, crash or resumed session: run `keryx review next --package <package>` first — it collects late results from `<package>/raw/` and never re-hands a finished slice — validate and ingest what it collected, then dispatch only what it returns. Never re-dispatch a wave whose results are on disk; after a second timeout of the same reviewer change the task (fewer slices, narrower focus, a lighter tier for a mechanical slice), not only the diff size (`SKILL.detail.md` § "Recovery").
|
|
182
|
+
- **Done when** the consolidated report and the `keryx:findings` block are emitted and the stage counts and **Not run** are stated. A managed round (not `lightweight`, which is report-only) is also done only when every dispatched reviewer's result is recorded with `keryx review ingest` and the `review_complete` card has been answered (an agent never runs `keryx review complete`; that command is for a human in a terminal). `completed` means `keryx review readiness` passed, or each failing item but `premise-decisions` (answered per finding, never waived) is waived by the operator ("Hosts": card or their terminal; unattended, record Not run); publishing is held by the same checklist (`SKILL.detail.md` § "Readiness").
|
|
141
183
|
|
|
142
184
|
---
|
|
143
185
|
## Step 12 — the `keryx:findings` block
|
|
144
186
|
|
|
145
|
-
The prose report is for a human. **`keryx review ingest` reads the fenced block,
|
|
146
|
-
not the prose**, and a round that emits only prose cannot be used to build the
|
|
147
|
-
next round's input — the reviewer's `confidence`, `evidence`, `impact` and
|
|
148
|
-
`suggested_fix` do not survive rendering, and no regex recovers what was never
|
|
149
|
-
written down.
|
|
150
|
-
|
|
151
|
-
So every report ends with one fenced block whose info string carries
|
|
152
|
-
`keryx:findings`:
|
|
187
|
+
The prose report is for a human. **`keryx review ingest` reads the fenced block, not the prose**, so every report ends with one fenced block whose info string carries `keryx:findings`:
|
|
153
188
|
|
|
154
189
|
````text
|
|
155
190
|
```json keryx:findings
|
|
@@ -157,41 +192,11 @@ So every report ends with one fenced block whose info string carries
|
|
|
157
192
|
```
|
|
158
193
|
````
|
|
159
194
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
findings into one array, never by concatenating one block each.
|
|
166
|
-
- The fence may be indented up to three spaces (CommonMark), which is what
|
|
167
|
-
happens when the block is nested under a list item. Beyond that it is not a
|
|
168
|
-
fence and ingest will not see it.
|
|
169
|
-
- Each object conforms to **`review-finding.schema.json`** — the same contract
|
|
170
|
-
`prior_findings[].finding` is validated against, which is why the block
|
|
171
|
-
round-trips. Unknown per-finding properties are **dropped, not rejected**:
|
|
172
|
-
ingest writes exactly the properties that contract names, so anything else you
|
|
173
|
-
put on a finding is silently discarded rather than flagged. Pipeline triage
|
|
174
|
-
fields (`classification`, `flow_relevance`) are not finding properties at all;
|
|
175
|
-
they are the orchestrator's judgement, not the reviewer's, and are recorded in
|
|
176
|
-
`decisions.md`.
|
|
177
|
-
- `reviewer` is the reviewer that actually produced the finding. Never the
|
|
178
|
-
orchestrator's own name — that is the field whose loss made round 2
|
|
179
|
-
unconstructible.
|
|
180
|
-
- **A block that is present but unusable fails loudly.** Ingest refuses a block
|
|
181
|
-
it cannot parse, and equally refuses one that parses to something other than
|
|
182
|
-
an array of findings (or a single `{ reviewer, findings }` result) — `null`
|
|
183
|
-
included. It never falls back to parsing the prose, because a silent fallback
|
|
184
|
-
would reintroduce exactly the lossy path this replaces while the report still
|
|
185
|
-
visibly carries the structured array.
|
|
186
|
-
|
|
187
|
-
A report without the block is still readable by a human and still ingestible by
|
|
188
|
-
the legacy Markdown path — but it is a **legacy** report. Four fields the prose
|
|
189
|
-
does not carry (`impact`, `suggested_fix`, `evidence`, `confidence`) are written
|
|
190
|
-
with an explicit `not recorded:` provenance where the report supplies nothing,
|
|
191
|
-
and `confidence` is stamped `low` because a regex over prose is a low-confidence
|
|
192
|
-
derivation whatever the reviewer believed. Such a round **can** still seed a fix
|
|
193
|
-
round — that is the point of keeping the parser — but it seeds one that knows
|
|
194
|
-
which of its inputs were recovered and which were never written down.
|
|
195
|
+
- **Exactly one block per report.** It is the array the reviewers returned, carried through — not re-derived from the prose above it. Consolidate by merging the reviewers' findings into one array, never by concatenating one block each (ingest refuses a second block, and a block that is not an array of findings).
|
|
196
|
+
- Each object conforms to **`review-finding.schema.json`**; ingest drops any property that contract does not name. Pipeline triage fields (`classification`, `flow_relevance`) are not finding properties: they are the orchestrator's judgement and are recorded in `decisions.md`.
|
|
197
|
+
- `reviewer` is the reviewer that actually produced the finding. Never the orchestrator's own name.
|
|
198
|
+
|
|
199
|
+
A report without the block is a **legacy** report: ingest still reads its prose, but writes `impact`, `suggested_fix`, `evidence` and `confidence` as `not recorded:` and stamps `confidence: low`.
|
|
195
200
|
|
|
196
201
|
---
|
|
197
202
|
|
|
@@ -215,123 +220,39 @@ which of its inputs were recovered and which were never written down.
|
|
|
215
220
|
|
|
216
221
|
## Managed Review Feedback Loop
|
|
217
222
|
|
|
218
|
-
A **first-pass** review is lightweight by default: emit the consolidated report
|
|
219
|
-
only and create no Task Manager artifacts. Use managed mode when requested by the
|
|
220
|
-
caller or when an unambiguous related flow is detected and the caller accepts
|
|
221
|
-
attachment.
|
|
222
|
-
|
|
223
|
-
**A fix round is managed, not optional.** Before dispatching reviewers on any
|
|
224
|
-
round where `is_fix_round: true`, run `keryx review start --target <kind> --ref
|
|
225
|
-
<ref>`; after synthesis, run `keryx review ingest --report <path> --ref <ref>`.
|
|
226
|
-
A round whose findings were never ingested cannot be cited as a completed round,
|
|
227
|
-
because nothing durable records what it found.
|
|
228
|
-
|
|
229
|
-
The reason is measured, not theoretical: eleven review rounds across flows 127
|
|
230
|
-
and 128 ran without this. `.metaproject/data/reviews/` did not exist afterwards.
|
|
231
|
-
Every finding lived in a chat transcript and, later, in hand-written journal
|
|
232
|
-
prose — so round N+1 had nothing to diff against, `prior_findings` could not be
|
|
233
|
-
populated from anything but memory, and `keryx memory ingest --from-review` had
|
|
234
|
-
no input. The loop that produced "reviewers keep finding problems in fixes"
|
|
235
|
-
starts here.
|
|
236
|
-
|
|
237
|
-
Runtime CLI surface:
|
|
238
|
-
|
|
239
|
-
```text
|
|
240
|
-
keryx review attach --flow <id> --target <kind> --ref <ref>
|
|
241
|
-
keryx review start --target <kind> --ref <ref>
|
|
242
|
-
keryx review ingest --report <path> [--flow <id>] --ref <ref>
|
|
243
|
-
[--verifications <file>] [--verification-mode off|annotate|filter]
|
|
244
|
-
[--scope <scope.json>] [--blast-radius <blast-radius.json>]
|
|
245
|
-
[--refuted <file>] [--premises <file>]
|
|
246
|
-
# --blast-radius is REQUIRED whenever this round dispatched a
|
|
247
|
-
# scope-B reviewer (review-regression). See below.
|
|
248
|
-
keryx review status <review-id-or-path>
|
|
249
|
-
keryx review complete <review-id-or-path>
|
|
250
|
-
[--finding <id> --disposition <state> --evidence <ref>]... # human terminal; agents pass `dispositions` to review_complete
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
**An unrecognised option is refused, not ignored** — a misspelled flag exits non-zero rather than printing `status: closed` and writing nothing at all.
|
|
254
|
-
|
|
255
|
-
`--verifications` takes what `review-verifier` returned. `--scope` takes the
|
|
256
|
-
whole `--json` output of `keryx review scope`, so the package records what the
|
|
257
|
-
pre-filter dropped, **with a reason per drop**, as well as what the verifier
|
|
258
|
-
refuted. Without it — and with no `## Pre-filter scope` block already in the
|
|
259
|
-
package — the record says **`not recorded`** for that stage rather than `0`;
|
|
260
|
-
"dropped nothing" and "never ran" are different facts.
|
|
261
|
-
|
|
262
|
-
`--blast-radius` is **not optional on any round that dispatched
|
|
263
|
-
`review-regression`** — which is every `recommended` and `full` round, because
|
|
264
|
-
`review-regression` is in both profiles. AC3 is enforced in code: an ingest
|
|
265
|
-
carrying a scope-B finding with no blast-radius record is **refused**, and the
|
|
266
|
-
round is not recordable until the set is supplied. Pass the `--json` output of
|
|
267
|
-
`keryx review blast-radius` — the same record you computed at dispatch time to
|
|
268
|
-
bound the round.
|
|
223
|
+
A **first-pass** review is lightweight by default: emit the consolidated report only and create no Task Manager artifacts. Use managed mode when requested by the caller or when an unambiguous related flow is detected and the caller accepts attachment.
|
|
269
224
|
|
|
270
|
-
|
|
225
|
+
**A fix round is managed, not optional.** Before dispatching reviewers on any round where `is_fix_round: true`, run `keryx review start --target <kind> --ref <ref>`; after synthesis, run `keryx review ingest --report <path> --ref <ref>`. A round whose findings were never ingested cannot be cited as a completed round, because nothing durable records what it found.
|
|
271
226
|
|
|
272
|
-
- `--blast-radius <file>`
|
|
273
|
-
- `.metaproject/reviews/blast-radius.json` (or `.metaproject/flows/<flow>/reviews/blast-radius.json` for a flow-attached round) — the handoff slot, read when no flag is passed. The ingest **consumes** it: copied into the package it screened and removed from the slot, so a later round cannot be screened against a set nobody recomputed.
|
|
227
|
+
Pass `ingest` everything the round produced, by flag (`keryx review ingest --help` lists them; an unknown option is refused): `--scope` (the whole `--json` scope document, so the record keeps each pre-filter drop with its reason), `--blast-radius <file>` (required whenever the round dispatched `review-regression`; never write the record inside the package before ingest), `--verifications`, `--premises`, `--research`, and `--refuted <file>` — the findings this round **raised and then dismissed**, in the finding shape, each with `disposition: {state, evidence}` in a `dismissed-*` state. Without `--refuted` a package keeps only the survivors of an unlogged triage.
|
|
274
228
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
`review-degradation` (profile `full`, deep tier) asks what the regression screen does not: is the code worse than on the base, and can that be shown? It reads the diff plus the importers of the module that holds each changed shared export (and of a barrel that re-exports it), which `keryx review blast-radius --degradation [--degradation-cap <n>]` prints from the code graph under one cap shared by all exports; the model never picks the set. It has no severity floor and needs no `--blast-radius` record. A `major` or `blocker` of its with no `evidence_kind` is lowered to `info` at ingest and listed in `scope.md` under `## Degradation evidence screen`. A light round does not dispatch it. A delta round dispatches it on a fix slice that changes a source-code file (not a test, a document or a data file) and on every new deep slice; a fix slice's lines cannot tell whether they sit inside an exported function, so the payload settles it.
|
|
278
|
-
|
|
279
|
-
`--refuted` takes the findings this round **raised and then dismissed**, in the
|
|
280
|
-
same finding shape, each carrying `disposition: {state, evidence}` with one of
|
|
281
|
-
the `dismissed-*` states. Without it a package keeps only the survivors of an
|
|
282
|
-
unlogged triage — which is why precision measured over the recorded corpus
|
|
283
|
-
returns 100% whatever the reviewers actually got right.
|
|
229
|
+
`review-degradation` (profile `full`, deep tier) asks whether the code is worse than on the base and can that be shown; slice routing decides which slices get it, and Scope B below says what to hand it.
|
|
284
230
|
|
|
285
231
|
The `review_complete` card records what became of a finding when the fix round closes: pass `dispositions`, a list of `{finding, disposition, evidence}`, one per finding; the operator sees each on the card.
|
|
286
232
|
At a human's terminal the same is `review complete --finding <id> --disposition <state> --evidence <ref>`, a triple repeatable per finding.
|
|
287
|
-
States: `unknown`, `acted-on`, `dismissed-incorrect`,
|
|
288
|
-
`dismissed-wont-fix`, `dismissed-out-of-scope`, `dismissed-deprioritised`.
|
|
289
|
-
Everything except `unknown` must cite where the outcome is written down — the
|
|
290
|
-
commit, the test, the decision. A recorded state and its citation cannot be
|
|
291
|
-
overwritten by a later close; record a correction as a new round.
|
|
233
|
+
States: `unknown`, `acted-on`, `dismissed-incorrect`, `dismissed-wont-fix`, `dismissed-out-of-scope`, `dismissed-deprioritised`. Everything except `unknown` must cite where the outcome is written down — the commit, the test, the decision. Record a correction as a new round.
|
|
292
234
|
|
|
293
235
|
`review complete` on a PR-bound package refuses a merged PR or a moved head unless `report.md`'s first line names the reviewed SHA and says so; a package with no PR binding is unaffected.
|
|
294
236
|
`review complete` refuses a report with no `Evidence level:` line (`static only — did not run: <what>` or `ran — <what>`); a package ingested before the field existed only warns.
|
|
295
237
|
`review ingest` keeps an internal finding whose `quote` is not at its `path` at the reviewed SHA (absent, or in several places) with no line, flagged `quote_unlocated`, instead of refusing the round (readiness item `quotes-located` lists it until it has a disposition); it still refuses, naming the finding, a quote it could not check at all (commit not in the checkout, no file named, or a size bound), and adds a `citation not found` line, never a deletion, to a rebuttal citing a rule or document that is not in the tree.
|
|
296
238
|
A finding may close as `narrowed` (research obligation `"status":"narrowed","remains":"<what remains>"`); it counts as closed only with that text, and the report keeps it under "Refuted and narrowed".
|
|
297
239
|
|
|
298
|
-
**Closing a fix round without dispositions leaves every finding reading `unknown
|
|
240
|
+
**Closing a fix round without dispositions leaves every finding reading `unknown`** — "nobody wrote down what happened".
|
|
299
241
|
|
|
300
242
|
Managed modes:
|
|
301
243
|
|
|
302
244
|
- `lightweight`: report-only; no flow or managed review artifacts are created, and nothing is posted — no `comments reply`.
|
|
303
|
-
- `attach-review`: write under
|
|
304
|
-
`.metaproject/flows/<flow-dir>/reviews/<review-id>/`.
|
|
245
|
+
- `attach-review`: write under `.metaproject/flows/<flow-dir>/reviews/<review-id>/`.
|
|
305
246
|
- `review-flow`: write under `.metaproject/reviews/<review-id>/`.
|
|
306
|
-
- `ingest`: convert an existing review report into managed findings, decisions,
|
|
307
|
-
and learning handoff, attached to a flow when one is explicit or matched.
|
|
308
|
-
|
|
309
|
-
Required artifacts for managed modes:
|
|
247
|
+
- `ingest`: convert an existing review report into managed findings, decisions, and learning handoff, attached to a flow when one is explicit or matched.
|
|
310
248
|
|
|
311
|
-
|
|
312
|
-
- `scope.md`
|
|
313
|
-
- `coverage.md`
|
|
314
|
-
- `report.md`
|
|
315
|
-
- `findings.json`
|
|
316
|
-
- `learning.md`
|
|
317
|
-
- `decisions.md`
|
|
318
|
-
|
|
319
|
-
When attaching to a flow, resolve the flow by explicit `flow_id`, PR URL, issue
|
|
320
|
-
URL, or branch metadata. Never mutate `.metaproject/flows/*/flow.json` from
|
|
321
|
-
review code; Task Manager state changes remain owned by `keryx flow`.
|
|
249
|
+
When attaching to a flow, resolve the flow by explicit `flow_id`, PR URL, issue URL, or branch metadata. Never mutate `.metaproject/flows/*/flow.json` from review code; Task Manager state changes remain owned by `keryx flow`.
|
|
322
250
|
|
|
323
251
|
---
|
|
324
252
|
|
|
325
253
|
## External PR comments
|
|
326
254
|
|
|
327
|
-
|
|
328
|
-
it, nothing fixed it and nothing answered it — silence was the behaviour for every
|
|
329
|
-
comment, and to the person who wrote it silence is indistinguishable from
|
|
330
|
-
disagreement.
|
|
331
|
-
|
|
332
|
-
**Collect every round. Answer once, at the end.** Both halves are mechanical and
|
|
333
|
-
both live in the CLI; the judgement — is this comment right, what do we say — stays
|
|
334
|
-
here.
|
|
255
|
+
**Collect every round. Answer once, at the end.** Collection, severity classification and the reply limits live in the CLI; the judgement — is this comment right, what do we say — stays here.
|
|
335
256
|
|
|
336
257
|
```text
|
|
337
258
|
keryx review comments collect --repo <owner/repo> --pr <n> --sha <head-sha>
|
|
@@ -342,61 +263,11 @@ keryx review comments reply --repo <owner/repo> --pr <n> --outcomes <file|->
|
|
|
342
263
|
[--flow-link <url>]
|
|
343
264
|
```
|
|
344
265
|
|
|
345
|
-
|
|
346
|
-
no token, no network, nothing posted. Use it to see what a reply pass would say
|
|
347
|
-
before it says it.
|
|
348
|
-
|
|
349
|
-
`--sha` is the pull request's **current head**, and it is required. `collect`
|
|
350
|
-
prints the PR's state and head and warns when they disagree; `reply` **refuses** a
|
|
351
|
-
closed or merged PR (`--allow-closed-pr` overrides), an unreadable one, and a `--sha`
|
|
352
|
-
that is not its head. The completion gate compares the recorded SHA as well; a
|
|
353
|
-
record with no SHA reads as "cannot be shown current", never as "fresh".
|
|
354
|
-
|
|
355
|
-
### What collection does, so you do not do it by hand
|
|
356
|
-
|
|
357
|
-
- Reads **all three** sources: inline review comments, review submissions and
|
|
358
|
-
their bodies, and PR-level discussion.
|
|
359
|
-
- **A bot reviewer is a reviewer.** CodeRabbit, Greptile and Copilot comments go
|
|
360
|
-
down exactly the same path as a human's. The bot flag is recorded so a report
|
|
361
|
-
can say who spoke; nothing filters on it.
|
|
362
|
-
- Excludes our own identity, and comments already answered — **unless** the thread
|
|
363
|
-
has a newer reply from somebody else, which makes the comment new again.
|
|
364
|
-
- Everything filtered is listed with its reason. A filter that removes silently
|
|
365
|
-
reads as "nobody commented".
|
|
366
|
-
|
|
367
|
-
### Severity is classified, never invented
|
|
368
|
-
|
|
369
|
-
A comment on a review whose state is `CHANGES_REQUESTED` starts at **`major`**.
|
|
370
|
-
Everything else starts at **`minor`**. There is no third rule and no model call.
|
|
371
|
-
|
|
372
|
-
When the classifying fact is missing — an inline comment whose parent review was
|
|
373
|
-
not returned, or a review state GitHub does not document — the comment is **not
|
|
374
|
-
dropped and the severity is not guessed**: it takes the `minor` floor and carries
|
|
375
|
-
`basis: unclassified` naming what was missing. A derived `minor` and a defaulted
|
|
376
|
-
one are different claims, and a record that cannot tell them apart is the
|
|
377
|
-
`dismissed-out-of-scope: 0` failure in a new field.
|
|
378
|
-
|
|
379
|
-
You may **lower** a severity only by assigning a terminal disposition with a
|
|
380
|
-
reason. You may never silently drop an external comment.
|
|
266
|
+
`--sha` is the pull request's **current head**. `--fixtures <dir>` runs either against JSON on disk, nothing posted. `collect` reads every source, treats a bot reviewer as a reviewer, classifies severity (`major` under `CHANGES_REQUESTED`, else `minor`, `basis: unclassified` when the fact is missing) and lists everything it filtered with its reason.
|
|
381
267
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
exception: **a `refuted` verdict does not remove it and does not dismiss it.** A
|
|
386
|
-
human asked a question; a machine deciding the question was invalid is not an
|
|
387
|
-
answer. `keryx review ingest` turns that verdict into the disposition
|
|
388
|
-
`answered-disagree`, keeps the finding, and records the reclaim in `scope.md`.
|
|
389
|
-
`answered-disagree` still owes a reply explaining why.
|
|
390
|
-
|
|
391
|
-
The per-reviewer findings cap does not truncate external comments either, for the
|
|
392
|
-
same reason: the cap drops silently, and an external comment may not be dropped
|
|
393
|
-
silently.
|
|
394
|
-
|
|
395
|
-
### Replying — once, at the end, briefly
|
|
396
|
-
|
|
397
|
-
The reply pass runs **after the final round and before the completion gate**, so
|
|
398
|
-
every reply states a settled outcome rather than an intention. `keryx review
|
|
399
|
-
comments reply` refuses without `--final`; it is not a reminder you can skip.
|
|
268
|
+
- You may **lower** an external comment's severity only by assigning a terminal disposition with a reason. You may never silently drop an external comment.
|
|
269
|
+
- The verifier cannot refute an external comment: ingest turns a `refuted` verdict into `answered-disagree`, which still owes a reply explaining why.
|
|
270
|
+
- The reply pass runs **after the final round and before the completion gate**, so every reply states a settled outcome. Write one outcome per comment:
|
|
400
271
|
|
|
401
272
|
| Outcome | Reply is |
|
|
402
273
|
|---|---|
|
|
@@ -404,80 +275,24 @@ comments reply` refuses without `--final`; it is not a reminder you can skip.
|
|
|
404
275
|
| `answered-disagree` | one or two sentences on why not, and a link to the flow's journal entry |
|
|
405
276
|
| `dismissed-out-of-scope` / `dismissed-deprioritised` | one sentence, and where it was recorded instead |
|
|
406
277
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
- **At most two sentences per comment.** A longer reply is CUT to two and the
|
|
410
|
-
remainder is replaced by a link — the long version is not reachable from the
|
|
411
|
-
command's output. A truncation with no link to point at is refused outright: the
|
|
412
|
-
conclusion posted and the explanation nowhere is worse than either alternative.
|
|
413
|
-
- A fenced code block in a reply is refused. Link, do not paste.
|
|
414
|
-
- Replies go **in the thread**. A review submission body and a PR-level comment
|
|
415
|
-
have no thread — GitHub offers no reply endpoint for either — so those become one
|
|
416
|
-
top-level comment that names what it answers.
|
|
417
|
-
- **Never resolve or hide a thread we did not open.** Replying is ours; resolving
|
|
418
|
-
is the reviewer's call, and auto-resolving is how a bot silences a human. The
|
|
419
|
-
resolve, hide, minimise and dismiss endpoints are unreachable through the port
|
|
420
|
-
this command uses, GraphQL included.
|
|
421
|
-
- Exactly **one** reply per comment, and one disposition. A round that changed
|
|
422
|
-
nothing for a comment still gets a reply saying so, with a terminal disposition
|
|
423
|
-
— `unknown` is refused, because it is what an unanswered comment already reads
|
|
424
|
-
as.
|
|
425
|
-
- Capped at **30** replies. Beyond it, one summary comment and a backlog reported
|
|
426
|
-
by id.
|
|
427
|
-
- Handling is durable: `.metaproject/reviews/pr-comments/<owner>__<repo>__<n>.json`
|
|
428
|
-
records id, thread, author, url, first-seen round, handled-at, sha, disposition
|
|
429
|
-
and reply url, written after **every** post. A resumed session answers nobody
|
|
430
|
-
twice.
|
|
431
|
-
|
|
432
|
-
**The trade-off, stated rather than hidden:** a reviewer who comments early waits
|
|
433
|
-
until the end. That is deliberate — answering with a work-in-progress state that
|
|
434
|
-
later changes is worse. If a comment **blocks** progress rather than reporting a
|
|
435
|
-
problem, mark its outcome `escalate: true`: it leaves the reply queue, is reported
|
|
436
|
-
to the operator immediately, and the command exits non-zero. Answering a blocking
|
|
437
|
-
question at the end answers the wrong question late.
|
|
278
|
+
`comments reply` enforces the rest (two sentences, no code block, one reply per comment in its thread, no `unknown`, 30 replies then a summary, never resolving or hiding a thread, a durable record per post). A comment that **blocks** progress rather than reporting a problem gets `escalate: true`: it leaves the reply queue and is reported to the operator immediately.
|
|
438
279
|
|
|
439
280
|
### A round never answers a pull request another skill is answering
|
|
440
281
|
|
|
441
|
-
`review-pr-feedback`
|
|
442
|
-
human or a bot has already reviewed pull request `#A`, and someone wants those
|
|
443
|
-
comments interpreted, checked against the code, fixed and answered. Under its
|
|
444
|
-
`--fix` mode it dispatches `flow-orchestrator`, which opens a **second** pull
|
|
445
|
-
request `#B` carrying the fix, based on `#A`'s own head branch, and runs
|
|
446
|
-
**this** orchestrator inline, in the main session, on every round against `#B`. `review-pr-feedback` is present only when installed — it is in the `full` profile only. When it is absent no caller of this kind exists, so the default below holds and this orchestrator owns the reply; do not hand a request to it, say it is not installed and name the install command (`SKILL.detail.md`, "Skills present only when installed").
|
|
447
|
-
|
|
448
|
-
`#B` is its own conversation. Collect and reply on it exactly as always: someone
|
|
449
|
-
reviewing the fix deserves an answer from the run that made the fix, and its
|
|
450
|
-
record is filed under `#B`'s own number, so nothing about `#A` is touched.
|
|
282
|
+
`review-pr-feedback` handles the other direction: a pull request `#A` someone already reviewed. Under its `--fix` mode it dispatches `flow-orchestrator`, which opens a **second** pull request `#B` carrying the fix and runs **this** orchestrator inline on every round against `#B`. `review-pr-feedback` is present only when installed (profile `full`); when it is absent this orchestrator owns the reply — say it is not installed and name the install command (`SKILL.detail.md`, "Skills present only when installed").
|
|
451
283
|
|
|
452
|
-
|
|
284
|
+
`#B` is its own conversation. Collect and reply on it exactly as always: its record is filed under `#B`'s own number.
|
|
453
285
|
|
|
454
286
|
- **Never run a reply pass against a pull request the dispatch named as the
|
|
455
|
-
caller's.** When `constraints` says the caller owns the reply for `#A` — or
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
after the merge, from the outcomes its own verdicts produced.
|
|
459
|
-
|
|
460
|
-
The harm is not a duplicate. `collectPrComments` skips a comment whose record
|
|
461
|
-
carries a `reply_url` as `already-handled`, rescuing it only when somebody else
|
|
462
|
-
posts later in the thread — so a round that answered mid-loop writes that record
|
|
463
|
-
FIRST, and the post-merge reply citing the merge SHA is then skipped as already
|
|
464
|
-
answered. The reviewer keeps the interim answer, which by then has stopped being
|
|
465
|
-
true, and `replies.posted` counts only what went out. A suppressed correction is
|
|
466
|
-
worse than a duplicate, because nothing shows it is missing.
|
|
467
|
-
- **Absent such a constraint this orchestrator owns the reply**, as it always
|
|
468
|
-
has. A top-level review of a pull request is the normal case; a caller holding
|
|
469
|
-
the conversation is the exception, and the exception declares itself.
|
|
470
|
-
- The reply is the only thing that moves. Collection, severity classification,
|
|
471
|
-
the refusal to let the verifier refute an external comment, and the cap
|
|
472
|
-
exemption are unchanged in both shapes.
|
|
287
|
+
caller's.** When `constraints` says the caller owns the reply for `#A` — or the target resolves onto a pull request another skill declared — collect if the round needs the record and stop there. `review-pr-feedback` answers `#A` once, after the merge; a mid-loop reply would make that post-merge reply be skipped as already answered.
|
|
288
|
+
- **Absent such a constraint this orchestrator owns the reply.**
|
|
289
|
+
- The reply is the only thing that moves; collection, classification, the verifier exemption and the cap exemption are unchanged.
|
|
473
290
|
|
|
474
291
|
---
|
|
475
292
|
|
|
476
293
|
## CI Triage on Red Checks (Step 0b)
|
|
477
294
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
Read each run's verdict (`flaky` | `regression` | `infra`) into the report: `flaky` suggests a rerun rather than a finding; `regression` means investigate before trusting this round's other findings, since a broken build can hide or mimic a real defect; `infra` is noted and the round continues. Advisory only — a verdict never gates dispatch and is never itself a finding.
|
|
295
|
+
Once per round, on a PR target whose checks are red, before Step 1: for each failed check run, `keryx review ci-triage --run <id>`. When `review.jev.ci_triage` is not `true` in `.metaproject/tasks.config.json`, or no Jev/OpenRouter credential is resolvable, skip it and say so in the report — never silently absent. Read each verdict into the report: `flaky` suggests a rerun rather than a finding; `regression` means investigate before trusting this round's other findings; `infra` is noted and the round continues. Advisory only: a verdict never gates dispatch and is never itself a finding.
|
|
481
296
|
|
|
482
297
|
---
|
|
483
298
|
|
|
@@ -489,53 +304,26 @@ PR bodies, comments, replies and commit messages lead with the conclusion, say w
|
|
|
489
304
|
|
|
490
305
|
Before routing reviewers, build a compact `review_context` object. This is the shared source of truth for all sub-agents and must follow `.metaproject/skills/gdskills/review/review-orchestrator/review-context.schema.json`.
|
|
491
306
|
|
|
492
|
-
Required content:
|
|
307
|
+
Required content (the typed keys and their sources, one line each: "Reviewer brief — required contents", lines K–R):
|
|
493
308
|
- Request: raw user request, flags, review mode, explicit paths or commit range.
|
|
494
309
|
- Git/PR metadata: repo, branch, base, head, merge-base, PR number/URL when available.
|
|
495
310
|
- Scope summary: changed files grouped by domain, high-risk files, generated/ignored files.
|
|
496
|
-
- Requirements: issue URL, linked task docs, acceptance criteria extracted from `context_doc`
|
|
311
|
+
- Requirements: issue URL, linked task docs, acceptance criteria extracted from `context_doc` (else the issue or the PR body), listed one by one.
|
|
497
312
|
- **The PR's own description**, fetched not assumed: `gh pr view <n> --json title,body`, into the typed `pr.body`. See below.
|
|
498
313
|
- **Cross-repo contracts the diff depends on**, in the typed `cross_repo`: each pinned to the ref you read it at, and each recording whether the producer has merged. See below.
|
|
499
314
|
- Rules: matched repository rules and convention docs by path.
|
|
500
315
|
- **Memory: accepted project memory intersecting the changed paths.** See below — this step is required, not best-effort.
|
|
501
|
-
- Decisions: why each reviewer was selected or skipped.
|
|
316
|
+
- Decisions: why each reviewer was selected or skipped, in the typed `routing` (`selected_reviewers`, `skipped_reviewers`, `reasons`).
|
|
502
317
|
- Token policy: effective budget, truncation decisions, files summarized instead of fully inlined.
|
|
503
318
|
- Legacy/profile reviewer availability and selection state.
|
|
504
319
|
|
|
505
320
|
### The PR description is evidence, not decoration
|
|
506
321
|
|
|
507
|
-
Fetch the body into `review_context.pr.body` and hand it to every reviewer. It is
|
|
508
|
-
the author's own statement of what the change does, and it is checkable against
|
|
509
|
-
the diff.
|
|
510
|
-
|
|
511
|
-
**A description that promises an approach the diff does not take is a `minor`
|
|
512
|
-
finding** — file it, do not merely mention it. The failure this catches is
|
|
513
|
-
specific: over a multi-round review the code moves and the description does not,
|
|
514
|
-
so by round three the PR body describes an approach that was deleted in round one.
|
|
515
|
-
Whoever reads the merge commit a year later reads the description, not the rounds.
|
|
516
|
-
|
|
517
|
-
It is `minor` and not `major` because nothing at runtime is wrong. It is a finding
|
|
518
|
-
and not a pleasantry because unfiled housekeeping is raised again every round and
|
|
519
|
-
fixed in none — three consecutive rounds of "still worth rewriting" is the
|
|
520
|
-
recorded outcome of leaving it out of the findings array.
|
|
521
|
-
|
|
522
|
-
**The Stage 1 gate files it.** Handing the body to every reviewer is what makes
|
|
523
|
-
the body available; it is not what makes the comparison happen. A rule addressed
|
|
524
|
-
to everyone is owned by no one, and that is the state this finding sat in for
|
|
525
|
-
three rounds. The gate already holds the stated intent and the diff side by side,
|
|
526
|
-
so the comparison belongs there — see `## Stage 1 Gate — Spec Compliance`.
|
|
527
|
-
|
|
528
|
-
Same class, same severity: an approach that depends on another repository's change
|
|
529
|
-
being deployed first, with no deploy note saying so. Note the boundary — that
|
|
530
|
-
`minor` is about the *description*. When the dependency is real and this change
|
|
531
|
-
can merge first, the blocker is filed against the call site instead; see
|
|
532
|
-
`### A producer that has not merged yet`.
|
|
322
|
+
Fetch the body into `review_context.pr.body` — the full text, not a path or a summary — and hand it to every reviewer. It is the author's own statement of what the change does, and it is checkable against the diff. **A description that promises an approach the diff does not take is a `minor` finding** — file it, do not merely mention it; the Stage 1 gate files it (`## Stage 1 Gate — Spec Compliance`). Same class, same severity: an approach that depends on another repository's change being deployed first, with no deploy note saying so. That `minor` is about the *description*; when the dependency is real and this change can merge first, the blocker is filed against the call site instead (`### A producer that has not merged yet`).
|
|
533
323
|
|
|
534
324
|
### Cross-repo contracts are read, not assumed
|
|
535
325
|
|
|
536
|
-
When the diff consumes a contract owned by another service — a payload shape, a
|
|
537
|
-
status enum, a timeout, a permission, a default — **read the producer** and pin
|
|
538
|
-
the SHA:
|
|
326
|
+
When the diff consumes a contract owned by another service — a payload shape, a status enum, a timeout, a permission, a default — **read the producer** and pin the SHA:
|
|
539
327
|
|
|
540
328
|
```yaml
|
|
541
329
|
cross_repo:
|
|
@@ -547,89 +335,38 @@ cross_repo:
|
|
|
547
335
|
facts_pinned_round: 1
|
|
548
336
|
facts:
|
|
549
337
|
- "sqlScore/schemaDriftScore stay null when the half is absent"
|
|
550
|
-
- "sqlWeightPercentage/schemaDriftWeightPercentage init to 0.0 and are set unconditionally"
|
|
551
338
|
```
|
|
552
339
|
|
|
553
|
-
Put the facts in `review_context.cross_repo` so every reviewer shares one reading,
|
|
554
|
-
and so a later round can tell a contract that moved from a reviewer that misread
|
|
555
|
-
it. The shape is typed in `review-context.schema.json`: `repo`, `reason`, `facts`
|
|
556
|
-
and `state` are required, `state: merged` requires the `sha`, and `state: open`
|
|
557
|
-
requires the `pr`.
|
|
340
|
+
Put the facts in `review_context.cross_repo` so every reviewer shares one reading. The shape is typed in `review-context.schema.json`. The rule that follows for reviewers, and that belongs in the dispatch prompt:
|
|
558
341
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
> **A claim about another service's behaviour, with no `file:line` at a pinned SHA
|
|
562
|
-
> behind it, is `info`.** Not `major`, however confident. The two failure modes are
|
|
563
|
-
> symmetric and both recorded: a finding asserted from the consuming side that the
|
|
564
|
-
> producer disproves, and a defect missed because the producer's actual default was
|
|
565
|
-
> assumed rather than read.
|
|
342
|
+
> **A claim about another service's behaviour, with no `file:line` at a pinned SHA behind it, is `info`.** Not `major`, however confident.
|
|
566
343
|
|
|
567
344
|
If you cannot locate the producer, ask the operator where it is (Start question 2); record `state: unavailable` only when it cannot be read, and leave the dependent findings at `info`.
|
|
568
|
-
An
|
|
569
|
-
paired PR or not — SKILL.detail.md § "Counterpart verification". Unattended, nobody is asked: record
|
|
345
|
+
An input rule records the producer's full check set and is verified every round, paired PR or not — SKILL.detail.md § "Counterpart verification". Unattended, nobody is asked: record
|
|
570
346
|
`state: unavailable` with the reason and continue.
|
|
571
347
|
|
|
572
348
|
A finding whose evidence lives in the producer sets `repo` on the finding itself.
|
|
573
|
-
`file` and `line` alone name a path in the repository under review, so without
|
|
574
|
-
`repo` a cross-repo claim cannot say where its evidence is — and the `info` rule
|
|
575
|
-
above then rests on nothing a later round can check.
|
|
576
349
|
|
|
577
350
|
### A producer that has not merged yet
|
|
578
351
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
the
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
**Pin the pull request, not just the commit.** An open branch gets rebased and
|
|
585
|
-
squashed. A SHA read from it today names a commit that will not exist after the
|
|
586
|
-
merge, so `state: open` requires `pr` and the SHA becomes a note about when you
|
|
587
|
-
read it rather than an address a later reader can follow.
|
|
588
|
-
|
|
589
|
-
**Merge order is a `blocker`, not a note.** A missing deploy note in the PR body
|
|
590
|
-
is `minor` — that is a documentation finding and it stays where it is. The
|
|
591
|
-
operational case is not that one: when an entry is `state: open` with
|
|
592
|
-
`merge_order: producer_first`, and this change can merge without the producer,
|
|
593
|
-
**production breaks the moment it does**. That is a `blocker` under the existing
|
|
594
|
-
enumeration, not a new shape — the consumer calls what is not there, or reads a
|
|
595
|
-
default the producer has not changed yet, which is shape 1 or shape 2 in
|
|
596
|
-
`### \`blocker\` — merge-blocking, and nothing else`. File it against the consuming
|
|
597
|
-
call site rather than the description, and write the fix as what it is: a merge
|
|
598
|
-
gate, a flag, or a fallback, never an edit to a diff that may be perfectly
|
|
599
|
-
correct. Scope it exactly — both facts have to be recorded, an open producer AND
|
|
600
|
-
a producer-first order, and no gate already holding the merge. A
|
|
601
|
-
`merge_order: unknown` is a question to resolve, not a blocker to file.
|
|
602
|
-
|
|
603
|
-
**Re-read an open producer every round.** `facts` pinned in round 1 are a
|
|
604
|
-
statement about a branch that is still being written; by round 3 the contract may
|
|
605
|
-
have changed under a finding that still cites it. On each round, re-read every
|
|
606
|
-
entry with `state: open` and set `revalidated_round`. An entry whose
|
|
607
|
-
`revalidated_round` is behind the current round has not been checked this round,
|
|
608
|
-
and findings resting on it drop to `info` until it is. This is the same discipline
|
|
609
|
-
`prior_findings` already imposes on the local diff, applied to the one input that
|
|
610
|
-
is most likely to have moved.
|
|
352
|
+
A **parallel pull request** — the producer change still open — is pinned differently from `state: merged`:
|
|
353
|
+
|
|
354
|
+
- **Pin the pull request, not just the commit.** An open branch gets rebased and squashed, so `state: open` requires `pr` and the SHA is only a note about when you read it.
|
|
355
|
+
- **Merge order is a `blocker`, not a note.** When an entry is `state: open` with `merge_order: producer_first`, and this change can merge without the producer and no gate already holds the merge, file a `blocker` (shape 1 or shape 2 under "Severity") against the consuming call site, with a fix that is a merge gate, a flag or a fallback — never an edit to a diff that may be correct. A missing deploy note in the PR body stays the `minor` above. A `merge_order: unknown` is a question to resolve, not a blocker to file.
|
|
356
|
+
- **Re-read an open producer every round.** On each round, re-read every entry with `state: open` and set `revalidated_round`. An entry whose `revalidated_round` is behind the current round has not been checked this round, and findings resting on it drop to `info` until it is.
|
|
611
357
|
|
|
612
358
|
### Memory (required)
|
|
613
359
|
|
|
614
|
-
Run, once, per review:
|
|
360
|
+
Run, once, per review — the round's only memory call, before `review plan` (whose `--memory-query` records this query and searches nothing):
|
|
615
361
|
|
|
616
362
|
```bash
|
|
617
363
|
keryx memory search "<changed modules and the concepts they touch>" --status accepted
|
|
618
364
|
```
|
|
619
365
|
|
|
620
|
-
Put the matched entries in `review_context.memory` and in each reviewer's
|
|
621
|
-
`metaproject.memory`. Record `query` alongside them so the search is
|
|
622
|
-
reproducible, and set `searched: false` **only** when the memory module is
|
|
623
|
-
disabled — an empty `entries` with `searched: true` means the search ran and
|
|
624
|
-
matched nothing, which is a different fact and must stay distinguishable.
|
|
625
|
-
|
|
626
|
-
Two rules, both load-bearing:
|
|
366
|
+
Put the matched entries in `review_context.memory` and in each reviewer's `metaproject.memory`. Record `query` alongside them, and set `searched: false` **only** when the memory module is disabled — an empty `entries` with `searched: true` means the search ran and matched nothing.
|
|
627
367
|
|
|
628
|
-
- **`--status accepted` only.** A draft entry is a hypothesis. Handing one to a
|
|
629
|
-
|
|
630
|
-
- **Scope it to the change.** The whole memory index is not context; entries
|
|
631
|
-
whose recorded scope does not intersect the changed files or modules are noise
|
|
632
|
-
that costs budget in every reviewer prompt.
|
|
368
|
+
- **`--status accepted` only.** A draft entry is a hypothesis. Handing one to a reviewer as project truth is how a wrong hypothesis becomes a wrong finding.
|
|
369
|
+
- **Scope it to the change.** Entries whose recorded scope does not intersect the changed files or modules stay out.
|
|
633
370
|
|
|
634
371
|
Context modes:
|
|
635
372
|
- `none`: no additional context collection; use only diff/path and local rules.
|
|
@@ -638,7 +375,7 @@ Context modes:
|
|
|
638
375
|
|
|
639
376
|
High-risk triggers for `full` recommendation:
|
|
640
377
|
- Auth, permissions, API contracts, a client-side mirror of a server rule (validation, limit, permission, uniqueness, reserved names), migrations, shared core, state management, graph/flow, security, performance-critical paths.
|
|
641
|
-
- More than 20 changed source files or more than 2,000 changed lines. Size never lowers depth below the risk class
|
|
378
|
+
- More than 20 changed source files or more than 2,000 changed lines. Size never lowers depth below the risk class (SKILL.detail.md § "Depth floor").
|
|
642
379
|
- Missing or ambiguous linked requirements.
|
|
643
380
|
|
|
644
381
|
If `full` context would be useful but was not explicitly requested, ask once:
|
|
@@ -681,13 +418,13 @@ record `model_assignment: adaptive` with the model you chose.
|
|
|
681
418
|
|
|
682
419
|
### Fix round check (Step 1a)
|
|
683
420
|
|
|
684
|
-
`keryx review start` (or `keryx review plan`) decides the round; you never pick a range. `<package>/round.json` says round N, the mode (`first`, `delta`, `fallback-first`), the source that found the previous round and the `range`; `<package>/prior_findings.json` holds the earlier findings. "Round 1 — no previous round found (sources tried …)" is a valid outcome: review as a first round and say which sources were tried.
|
|
421
|
+
`keryx review start` (or `keryx review plan`) decides the round; you never pick a range. `<package>/round.json` says round N, the mode (`first`, `delta`, `fallback-first`), the source that found the previous round and the `range`; `<package>/prior_findings.json` holds the earlier findings. "Round 1 — no previous round found (sources tried …)" is a valid outcome: review as a first round and say which sources were tried. An empty range (base equals head) is refused; pass the recorded base with `review start --base` / `review plan --ref`.
|
|
685
422
|
|
|
686
|
-
- **`delta` round.**
|
|
423
|
+
- **`delta` round.** Slice routing decides who reads each FIX, NEW and SECOND-LOOK slice; `review plan` prints them. On every dispatch over a FIX slice set `is_fix_round: true` and attach the findings that slice answers as `prior_findings`; the reviewer returns `prior_dispositions: [{id, disposition}]` in its `REVIEW_RESULT`, one entry for every attached finding id. A NEW slice is reviewed as round 1. When round.json says "previous round weak: …", that code is `kind: new` and gets the full round-1 treatment.
|
|
687
424
|
- **`fallback-first` round** (force-push or rebase: the previous head is not an ancestor). Review `merge-base..head` in full, with the prior findings attached.
|
|
688
|
-
- **Every attached prior finding leaves the round with a disposition** — `closed`, `open`, `partial`, `regressed` or `withdrawn` — one line each in the report before the new findings, checked against the code and not the commit message. A fix is new code: the report carries a `## Regressions the fixes introduced` section. A finding this round disproves is withdrawn at the top of the report with its evidence. Table
|
|
425
|
+
- **Every attached prior finding leaves the round with a disposition** — `closed`, `open`, `partial`, `regressed` or `withdrawn` — one line each in the report before the new findings, checked against the code and not the commit message. A fix is new code: the report carries a `## Regressions the fixes introduced` section. A finding this round disproves is withdrawn at the top of the report with its evidence. Table and shapes: `SKILL.detail.md` § "Fix rounds — dispositions, regressions, withdrawal".
|
|
689
426
|
- **Duplicates.** `keryx review ingest` merges duplicate findings; later waves receive `known_findings` and do not report them again.
|
|
690
|
-
- **Enumerate what NAMES the thing the fix changed.** For each guard, instruction, message, refusal or helper a fix hunk touched, find its callers and the text that recommends it, and record the result in `review_context.scope.files`.
|
|
427
|
+
- **Enumerate what NAMES the thing the fix changed.** For each guard, instruction, message, refusal or helper a fix hunk touched, find its callers and the text that recommends it, and record the result in `review_context.scope.files`. A round that searched and found nothing is a different fact from one that never searched; only the recorded list tells them apart.
|
|
691
428
|
|
|
692
429
|
**The Jev edit guard is a FIX-phase tool.** `keryx review jev-edit-guard` runs in the author's agent while it applies fixes; this skill never runs it. Nothing refuses a dispatch that omits them (the `prior_findings`): `reviewer-input.schema.json` states the rule, no production code loads it, and the `prior_findings` array a reviewer receives is the only evidence it was met.
|
|
693
430
|
|
|
@@ -708,82 +445,35 @@ Before anything else, determine whether the request is **diff mode** or **path m
|
|
|
708
445
|
|
|
709
446
|
### Diff Mode
|
|
710
447
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
Run the script to determine `BASE_SHA`, then let the pre-filter build the scope:
|
|
714
|
-
|
|
715
|
-
```bash
|
|
716
|
-
keryx review scope --ref "${BASE_SHA}" --json > scope.json # KEEP THIS FILE
|
|
717
|
-
keryx review scope --ref "${BASE_SHA}" --scoped-diff # what reviewers get
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
**Keep `scope.json` until the round is ingested, and pass it as `--scope`.** That
|
|
721
|
-
file is how the drop list reaches the review record. `--append
|
|
722
|
-
"<review-package>/scope.md"` also writes it and is still supported — it now
|
|
723
|
-
REPLACES an existing `## Pre-filter scope` block rather than adding a second, and
|
|
724
|
-
`review ingest` carries any block it finds forward verbatim rather than
|
|
725
|
-
overwriting it — but `--scope scope.json` is the supported path, because it is
|
|
726
|
-
the one that does not depend on running two commands against the same file in the
|
|
727
|
-
right order.
|
|
728
|
-
|
|
729
|
-
**Do not run `git diff` yourself, and do not decide what to leave out.** The
|
|
730
|
-
pre-filter is deterministic code with no model call: it drops generated,
|
|
731
|
-
lockfile, snapshot, vendored and minified paths, drops whitespace-only and
|
|
732
|
-
comment-only change blocks, and bounds every retained change to ±20 lines of
|
|
733
|
-
context (`--context <n>`) instead of the whole file. Dropping a lockfile needs no
|
|
734
|
-
judgement, so it does not get one.
|
|
735
|
-
|
|
736
|
-
The record carries the retained scope **and every drop with its reason**. Both
|
|
737
|
-
halves are required: a scope that shrank without saying so reads afterwards as
|
|
738
|
-
"we reviewed everything". Note that `--scope` takes the WHOLE `--json` document —
|
|
739
|
-
handing over only its `counts` object is refused, because eight integers carry no
|
|
740
|
-
reason for any individual drop.
|
|
741
|
-
|
|
742
|
-
Use `.files` from `scope.json` for the auto-detection table below. A dropped path
|
|
743
|
-
must not select a reviewer, and **neither may a blast-radius path**: scope B is
|
|
744
|
-
under regression check, so a `.tsx` file that only appears there must not pull in
|
|
745
|
-
`review-frontend`. Reviewer selection is driven by the scope-A file list alone.
|
|
746
|
-
|
|
747
|
-
Scope is limited to **changes introduced in the current branch since merge-base**.
|
|
448
|
+
Scope A is what `keryx review scope` (run by `review plan`) retained: the change since the merge base, with generated, lockfile, snapshot, vendored and minified paths and whitespace- or comment-only blocks dropped, each drop with its reason. **Do not run `git diff` yourself for the review scope, and do not decide what to leave out.** Keep the scope file until the round is ingested and pass the whole `--json` document as `--scope`. Reviewer selection is driven by the scope-A file list alone; `keryx review required` already does that.
|
|
748
449
|
|
|
749
450
|
---
|
|
750
451
|
|
|
751
452
|
### Scope B — the blast radius (deep rounds)
|
|
752
453
|
|
|
753
|
-
|
|
754
|
-
correct?* It does not answer *did this change break something that was working*,
|
|
755
|
-
and those are different questions — only the first has ever been asked here.
|
|
756
|
-
|
|
757
|
-
A deep round dispatches under **both**. Scope B is computed, never browsed:
|
|
454
|
+
Scope A answers *is this change correct?*; scope B answers *did this change break something that was working*. A deep round dispatches under **both**. Scope B is computed, never browsed:
|
|
758
455
|
|
|
759
456
|
```bash
|
|
760
457
|
keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --json > blast-radius.json # KEEP THIS FILE
|
|
761
458
|
keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --brief # what a scope-B reviewer is told
|
|
762
459
|
```
|
|
763
460
|
|
|
764
|
-
**KEEP THIS FILE**: the ingest at Step 12 is **refused** for a scope-B finding without it — pass it as `review ingest ... --blast-radius blast-radius.json`.
|
|
461
|
+
**KEEP THIS FILE**: the ingest at Step 12 is **refused** for a scope-B finding without it — pass it as `review ingest ... --blast-radius blast-radius.json`. Do not pick the files or widen the set; an empty radius is `unresolved`, not clean.
|
|
765
462
|
|
|
766
|
-
|
|
767
|
-
first. Do not pick the files or widen the set. Record it with `--out "<review-package>/blast-radius.md"`,
|
|
768
|
-
including every file the cap removed; an empty radius is `unresolved`, not clean.
|
|
463
|
+
A scope-B reviewer answers one question: does this change break an existing behaviour **at these sites**? Pass `--brief` verbatim so no reviewer spends the round on findings ingest will refuse (`outside-set`, `non-regression-severity`, `no-link-to-change`). `class_scope` names the caller that breaks.
|
|
769
464
|
|
|
770
|
-
A scope-B reviewer
|
|
771
|
-
sites**? The orchestrator refuses, in code, a finding that is `outside-set`, below `major`
|
|
772
|
-
(`non-regression-severity`), or names nothing the change touched (`no-link-to-change`) — pass
|
|
773
|
-
`--brief` verbatim so no reviewer spends the round on findings that will be refused. `class_scope`
|
|
774
|
-
names the caller that breaks.
|
|
465
|
+
A missing input is replaced in the dispatch, never left blank. No linked flow means no frozen acceptance criteria: put the PR body or issue text in the scope-B payload, labelled as the criteria it stands in for; with neither, write `acceptance criteria: none supplied`, and the reviewer's summary says it judged behaviour against the diff alone. A FIX slice in a `delta` round gets no graph blast-radius set: its radius is the names the fix changed (`review_context.scope.files`), and the reviewer checks the fix lines for regressions of the behaviour they touch before it disposes each attached finding.
|
|
775
466
|
|
|
776
467
|
`review-degradation` is told its consumers by the graph, not by its own search: before each dispatch of it (a deep slice, or a delta round's fix or new deep slice), run `keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --degradation` from the worktree root and hand its stdout to the reviewer verbatim as its payload section. It needs no `--blast-radius` record; without the payload the reviewer has no consumers to read.
|
|
777
468
|
|
|
778
|
-
|
|
469
|
+
On rounds 2..N and always on the final round, run this and follow the decision it prints:
|
|
779
470
|
|
|
780
471
|
```bash
|
|
781
472
|
keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --previous blast-radius.json [--final]
|
|
782
473
|
```
|
|
783
474
|
|
|
784
|
-
`PKG` is the review package, created by `keryx review start` before dispatch
|
|
785
|
-
When `dropped` is non-empty, run `keryx review chunks plan|estimate|next|record|merge --package "${PKG}"` until `next` has none left. `review complete` refuses while a file is uncovered; the coverage waiver
|
|
786
|
-
The measurements, the rule table and the recompute table: `SKILL.detail.md` § "Scope B — bounds, rejections and recompute".
|
|
475
|
+
`PKG` is the review package, created by `keryx review start` before dispatch. Give each reviewer `keryx review layers block --package "${PKG}" --files <its slice files> --json` as the payload's `layers` field.
|
|
476
|
+
When `dropped` is non-empty, run `keryx review chunks plan|estimate|next|record|merge --package "${PKG}"` until `next` has none left; an unattended run runs every wave without a question, up to the 25-pass ceiling. `review complete` refuses while a file is uncovered; the coverage waiver (`review_waive_coverage`) and the chunk-run question (`review_chunks_answer`) are the operator's alone, never yours ("Hosts": card or their terminal; unattended, record Not run). Pass `review_wave: {"package": "${PKG}", "pass": "<chunk id>"}` on every `spawn_subagent` of a chunk pass (`"pass": "round"` for the round's own reviewers): each wave counts its own 32 children and one turn opens at most 25 waves; a wave the package does not record is ignored and counts against the turn's 32. **Bring in pass findings.** `chunks merge` prints each finding the pass raised and `N chunk-pass findings not in round`; read it as you read a reviewer's result, and run `keryx review ingest --review-id <id>` (the package where the chunks ran) to bring them in. When a pass finishes after the report was written, run `chunks merge`, then ingest again and rewrite the report: `review complete` only warns about a pass finding out of `findings.json`, and a warning left standing is a defect you shipped.
|
|
787
477
|
|
|
788
478
|
### Path Mode
|
|
789
479
|
|
|
@@ -806,136 +496,15 @@ Then put the list through the same exclusions before reading anything:
|
|
|
806
496
|
keryx review scope --path "src/a.ts,src/b.ts" --json > scope.json
|
|
807
497
|
```
|
|
808
498
|
|
|
809
|
-
Pass the full **file contents** of the paths it **retained** to sub-reviewers, and
|
|
810
|
-
read none of the ones it dropped. Set `SCOPE_MODE: path`. Path mode has no hunks
|
|
811
|
-
and therefore no context window; the drop list is recorded exactly the same way.
|
|
499
|
+
Pass the full **file contents** of the paths it **retained** to sub-reviewers, and read none of the ones it dropped. Set `SCOPE_MODE: path`.
|
|
812
500
|
|
|
813
501
|
**Reviewer behavior in path mode:** reviewers check the entire file content — not just added lines. All findings apply to the current state of the code, not only to changes.
|
|
814
502
|
|
|
815
|
-
###
|
|
816
|
-
|
|
817
|
-
When no flag is provided, infer reviewers from the collected file list:
|
|
818
|
-
|
|
819
|
-
| File pattern | Domain detected | Reviewers invoked |
|
|
820
|
-
|---|---|---|
|
|
821
|
-
| `*.tsx`, `*.jsx`, `*.css`, `*.scss`, `*.html` | frontend | `review-logic` + `review-frontend` + `review-style` |
|
|
822
|
-
| `*.store.ts`, files containing `makeObservable` | frontend/store | `review-logic` + `review-frontend` + `review-style` |
|
|
823
|
-
| `*.ts`, `*.js` in `src/api/`, `src/services/`, `src/controllers/`, `src/modules/` | backend | `review-logic` + `review-backend` + `review-architecture` |
|
|
824
|
-
| `*.ts`, `*.js` mixed (both UI and service files) | fullstack | all of the above |
|
|
825
|
-
| Migration files, `*.sql`, `prisma/schema.prisma` | backend | `review-backend` + `review-architecture` |
|
|
826
|
-
| `*.test.*`, `*.spec.*` | any | append `review-logic` (spec compliance focus) |
|
|
827
|
-
| No recognizable extension pattern | fallback | `review-logic` + `review-architecture` |
|
|
828
|
-
|
|
829
|
-
### Project Convention Auto-Detection
|
|
830
|
-
|
|
831
|
-
If the repository has local convention docs such as `CLAUDE.md`, `AGENTS.md`,
|
|
832
|
-
`.junie/guidelines.md`, or module-level `CLAUDE.md` files, append these reviewers by path:
|
|
833
|
-
|
|
834
|
-
| File pattern | Reviewers appended |
|
|
835
|
-
|---|---|
|
|
836
|
-
| `src/**/*.tsx`, `*.stories.tsx`, or a `.ts`/`.js` change in a repo where `package.json` declares `react`/`react-dom`/`mobx`/`mobx-react`/`mobx-react-lite` as a dependency | `review-frontend-conventions` |
|
|
837
|
-
| `**/*.test.*`, `**/*.spec.*`, `**/*.integration.test.*`, `**/*.msw.ts`, `src/test/**`, `test/**`, `e2e/**` | `review-testing-practices` |
|
|
838
|
-
| `src/core/**`, `core/**`, `shared/**`, `foundation/**` | `review-core-boundaries` |
|
|
839
|
-
| `src/core/flow/**`, `src/graph/**`, `src/shared/flow/**` | `review-flow-graph` |
|
|
840
|
-
| A `.tsx`/`.jsx`/`.css`/`.scss` hunk that adds or changes a sizing or spacing utility on a rendered element — `w-*`, `min-w-*`, `max-w-*`, `flex-*`, `basis-*`, `grid-cols-*`, `truncate`, `line-clamp-*`, `overflow-*`, `p*`/`m*`/`gap-*` and their logical `ps-*`/`pe-*`/`ms-*`/`me-*` forms, or an inline `style` carrying a dimension | `review-layout` (and `review-ui-ux` for any non-test, non-story `.tsx`/`.jsx`/`.vue`/`.svelte`/`.html`/`.css`/`.scss` change to user-facing UI) |
|
|
841
|
-
| `pr-context.md` is in the package | `review-pr-contract` |
|
|
842
|
-
|
|
843
|
-
These convention reviewers are additive: keep the generic reviewers selected by normal detection,
|
|
844
|
-
then add the matching convention pass. Deduplicate reviewer names before dispatch.
|
|
845
|
-
|
|
846
|
-
### Stack scoping — run it after detection, before dispatch
|
|
847
|
-
|
|
848
|
-
The tables above select reviewers by **file shape**. A `.ts` file looks the same
|
|
849
|
-
whether or not the repository has React in it, so those tables will happily
|
|
850
|
-
dispatch a React/MobX conventions reviewer at a Bun CLI with no frontend — which
|
|
851
|
-
is exactly what happened here, on every review, for months.
|
|
503
|
+
### Reviewer selection — computed by `keryx review required`
|
|
852
504
|
|
|
853
|
-
|
|
854
|
-
declares:
|
|
505
|
+
`keryx review required --mode all --scope <scope.json> --depth auto [--package <package>]` prints the roster: every installed bundled and project reviewer, filtered by the repository's stack (`metadata.stack_requires`), by path gates over scope A (`no-matching-paths`), by role switches, by depth (light: logic, testing and the stack's conventions reviewer), and with `review-regression` and `review-pr-contract` only when their inputs exist. Dispatch every reviewer it prints, and copy its exclusions, each with its reason, into the report's `Skipped reviewers`: a reviewer silently absent reads as "it had nothing to say".
|
|
855
506
|
|
|
856
|
-
|
|
857
|
-
keryx review stack --json
|
|
858
|
-
```
|
|
859
|
-
|
|
860
|
-
It reads `package.json` and reports, per reviewer, `include` or `exclude` with a
|
|
861
|
-
reason. A reviewer carrying `metadata.stack_requires` is dispatched when **any**
|
|
862
|
-
tag it names is present — matching what `keryx review stack` actually computes,
|
|
863
|
-
and failing toward inclusion rather than away from it.
|
|
864
|
-
|
|
865
|
-
**Its failure mode is to include, never to skip.** A missing, unparsable or
|
|
866
|
-
unexpected manifest sets `uncertain`, and an uncertain detection marks every tag
|
|
867
|
-
present, so every reviewer runs. A reviewer that runs needlessly costs tokens; a
|
|
868
|
-
reviewer wrongly skipped hides a real defect, and that asymmetry is not close.
|
|
869
|
-
|
|
870
|
-
Record the exclusions with their reasons alongside the pre-filter drops. A
|
|
871
|
-
reviewer silently absent from a report reads as "it had nothing to say".
|
|
872
|
-
|
|
873
|
-
### Path gate — the second filter, same asymmetry
|
|
874
|
-
|
|
875
|
-
Stack scoping asks *does this repository have the thing*. The path gate asks *does
|
|
876
|
-
this diff*. A reviewer whose path triggers match **no file in scope A** is not
|
|
877
|
-
dispatched; it goes to `Skipped reviewers` with reason `no-matching-paths`.
|
|
878
|
-
|
|
879
|
-
This is worth its own step because `--all` is the common case and it is where the
|
|
880
|
-
waste is: a run of sixteen reviewers over a fourteen-file frontend diff dispatched
|
|
881
|
-
`review-core-boundaries` and `review-flow-graph` against a diff containing no
|
|
882
|
-
`src/core/**` file at all. Two agents, full prompt each, guaranteed empty.
|
|
883
|
-
|
|
884
|
-
Three bounds keep it from deleting coverage:
|
|
885
|
-
|
|
886
|
-
- **Only path-triggered reviewers.** A reviewer selected by an explicit flag, or
|
|
887
|
-
one whose scope is the whole change rather than a path set — `review-logic`,
|
|
888
|
-
`review-regression`, `review-verifier`, `review-premise` — is never path-gated. One exception, for project reviewers only: a flag that more than one project reviewer carries is a **family flag** (the inventory lists it in that reviewer's `familyFlags`). It selects the whole family, and each member stays path-gated — `--<family>` over a diff touching one member's paths dispatches that member, not all of them.
|
|
889
|
-
- **Scope A only.** Scope B is the blast radius; it is *supposed* to name files the
|
|
890
|
-
diff never touched.
|
|
891
|
-
- **Ambiguity includes.** If you cannot decide whether a path matches, dispatch.
|
|
892
|
-
Same asymmetry as stack scoping: a needless reviewer costs tokens, a missing one
|
|
893
|
-
costs a defect.
|
|
894
|
-
|
|
895
|
-
Record every gated reviewer with the trigger set that found nothing. "Skipped:
|
|
896
|
-
no matching paths" is a result the reader can check; an absent reviewer is not.
|
|
897
|
-
|
|
898
|
-
### Project-local reviewers — ask, do not assume
|
|
899
|
-
|
|
900
|
-
The routing table below names the reviewers **keryx ships**. A project may also
|
|
901
|
-
define its own, and before this step existed they were invisible to every round:
|
|
902
|
-
a team could write a reviewer, register it, and watch nothing dispatch it.
|
|
903
|
-
|
|
904
|
-
So the reviewer set is asked for, not recited:
|
|
905
|
-
|
|
906
|
-
```bash
|
|
907
|
-
keryx review reviewers --json
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
It returns two halves. `bundled` is the installed gdskills review tree — the set
|
|
911
|
-
this project's install profile actually produced, which is not everything keryx
|
|
912
|
-
ships — when `bundledSource` is `"project"`; when it is `"package"` the project has no installed review tree and the list is the keryx package's own (`SKILL.detail.md`, "Skills present only when installed"). `project` is every project-skill under module `review`, living at
|
|
913
|
-
`.metaproject/project-skills/review/<name>/` so that it sits beside
|
|
914
|
-
`.metaproject/skills/gdskills/review/<name>/` and needs no other marking.
|
|
915
|
-
|
|
916
|
-
**Dispatch the project half alongside the bundled one.** A project reviewer is a
|
|
917
|
-
reviewer: it returns `REVIEW_RESULT`, its findings merge with everyone else's,
|
|
918
|
-
it is bound by the canonical severity rubric and the shared laws, and it is
|
|
919
|
-
verified in Wave C like any other. It is not advisory and not a second-class
|
|
920
|
-
pass — a team that wrote down how it reviews has said something about this
|
|
921
|
-
codebase that no shipped reviewer knows.
|
|
922
|
-
|
|
923
|
-
Two things it does NOT get:
|
|
924
|
-
|
|
925
|
-
- **No exemption from the contract.** A project reviewer whose output does not
|
|
926
|
-
conform is handled by the Sub-Agent Report Quality Gate exactly as a bundled
|
|
927
|
-
one would be. Local authorship is not evidence.
|
|
928
|
-
- **No self-verification.** The never-self-verify rule is about the actor, not
|
|
929
|
-
the origin.
|
|
930
|
-
|
|
931
|
-
**Select them with the fields the inventory returns, not by reading prose.**
|
|
932
|
-
Each `project` entry carries `flags` (a passed flag selects it) and `familyFlags` (the subset of `flags` another project reviewer also carries: a passed flag listed there selects it but leaves it path-gated; a passed flag in `flags` and not in `familyFlags` is unique to it, so it is explicit and ungated), `flagWarnings` (declared `metadata.flags` entries that were dropped as not being flags: they select nothing; name them once in the report),
|
|
933
|
-
`paths` + `pathsSource` (the path gate; `none` → dispatch), `stackRequires`
|
|
934
|
-
(stack scoping), `unresolvedRules` (dispatch, name the missing rules once in the
|
|
935
|
-
report), `shadowedRules` (the dispatch prompt names each `resolved` file as the one to read in place of the `ref` the reviewer's own text spells), `unresolvedReferences` (dispatch, name them once in the report) and `drift` (dispatch, name it once in the report). What each means and
|
|
936
|
-
what to do with it: `SKILL.detail.md` beside this file, section "Project-local
|
|
937
|
-
reviewers". A description saying another entry point dispatches it is its
|
|
938
|
-
author's routing note, not a restriction.
|
|
507
|
+
**Project-local reviewers.** `keryx review reviewers --json` returns the `bundled` and `project` halves; a project reviewer is a reviewer — same contract, same rubric and laws, verified in Wave C, never self-verified. From each `project` entry, use the inventory's fields, not its prose: `flags` / `familyFlags` (a passed unique flag selects it explicitly and ungated; a family flag selects it and leaves it path-gated), and name once in the report its `flagWarnings`, `unresolvedRules`, `unresolvedReferences` and `drift`; `shadowedRules` go into the dispatch prompt ("Agent Runtime Compatibility"). What each field means: `SKILL.detail.md`, "Project-local reviewers". A description saying another entry point dispatches it is its author's routing note, not a restriction.
|
|
939
508
|
|
|
940
509
|
### Start questions (Step 5)
|
|
941
510
|
|
|
@@ -964,28 +533,20 @@ round also carries the always-on obligations — SKILL.detail.md § "Depth floor
|
|
|
964
533
|
|
|
965
534
|
### Reviewer selection with Jev (`jev-select`) — advisory, before dispatch (Step 5c)
|
|
966
535
|
|
|
967
|
-
When `review.jev.select` is on, before Wave A/B dispatch: run `keryx review jev-select (--diff <ref>|--pr <n>) --json` over the finalized candidate set
|
|
536
|
+
When `review.jev.select` is on, before Wave A/B dispatch: run `keryx review jev-select (--diff <ref>|--pr <n>) --json` over the finalized candidate set and drop every reviewer whose `decision` is `skip` from Wave A/B — never the Wave A core safety set (`review-logic`, `review-architecture`, `review-security-code`, `review-highload` when selected). Record every decision in the report's scope section as `skipped by Jev selection (advisory)`, naming the probability and reason: this lever is unmeasured, so its skips must stay visible. A `jev-select` failure keeps every candidate; it is never a reason to skip a reviewer.
|
|
968
537
|
|
|
969
538
|
---
|
|
970
539
|
|
|
971
540
|
## Legacy/Profile Reviewer Auto-Detection
|
|
972
541
|
|
|
973
|
-
Legacy/profile reviewers
|
|
542
|
+
Legacy/profile reviewers (`code-learned-review`, profile `full` only) are exempt from the finding contract (free prose, no per-finding severity), so they are dispatched ONLY when the user passes one of the flags below, or when `job-orchestrator` provides `reviewers` / `conditional_reviewers` that name them; never auto-included, never prompted, interactive or unattended, and `--all` never selects them.
|
|
974
543
|
|
|
975
544
|
| Trigger | Reviewers appended |
|
|
976
545
|
|---|---|
|
|
977
546
|
| `--legacy-profiles` | `code-learned-review` |
|
|
978
547
|
| `--learned` | `code-learned-review` |
|
|
979
548
|
|
|
980
|
-
|
|
981
|
-
ask about them. They are exempt from the finding contract (`code-learned-review` emits
|
|
982
|
-
free prose with no per-finding severity field, so its output cannot be normalised into
|
|
983
|
-
the unified report), which is why inclusion must be a deliberate, explicit act rather than a
|
|
984
|
-
default the user has to opt out of on every review. Dispatch them ONLY when the user passes one
|
|
985
|
-
of the flags in the Trigger table above, or when `job-orchestrator` provides `reviewers` /
|
|
986
|
-
`conditional_reviewers` automation settings that name them.
|
|
987
|
-
|
|
988
|
-
Review Plan Preview must include an `Optional legacy/profile reviewers` group (each installed one with the flag that selects it) and a `Skipped reviewers` group with each one's reason; the wording: `SKILL.detail.md` § "Review Plan Preview — legacy groups".
|
|
549
|
+
When the inventory's `bundledSource` is `"project"` and the reviewer is missing from its `bundled` half, it is not installed: do not dispatch a substitute; record it in `Skipped reviewers` with reason `not-installed` and the command that adds it (`SKILL.detail.md`, "Skills present only when installed", also for `"package"`). Review Plan Preview includes an `Optional legacy/profile reviewers` group (each installed one with its flag) and a `Skipped reviewers` group with each one's reason (`SKILL.detail.md` § "Review Plan Preview — legacy groups").
|
|
989
550
|
|
|
990
551
|
## Routing Table
|
|
991
552
|
|
|
@@ -1009,17 +570,13 @@ Review Plan Preview must include an `Optional legacy/profile reviewers` group (e
|
|
|
1009
570
|
| `--all` | all reviewers above (including `review-highload` and project convention reviewers when local convention docs exist; `review-clean-code` and `review-style` only when the round started with `--style`, and nothing a project lists under `reviewRoles.disabled` in `routing.config.json`); never the legacy/profile reviewers, which stay flag-only |
|
|
1010
571
|
| `--verify` | `review-verifier`, started on the first blocker or major and re-run for each later one (`SKILL.detail.md` § "Early verifier"); checks the findings by running something. Delete-only. |
|
|
1011
572
|
| (always, Wave D) | `review-premise` after the verifier, over the canonical findings of severity ≥ minor; judges whether each is a defect at all; lowers or holds, never adds. Not a fan-out flag |
|
|
1012
|
-
| (
|
|
1013
|
-
|
|
1014
|
-
Multiple flags may be combined: `review --backend --security` dispatches `review-logic` + `review-backend` + `review-architecture` + `review-security-code`; `review --frontend --frontend-conventions` dispatches the generic frontend set plus the local frontend conventions reviewer.
|
|
573
|
+
| (no flag) | what `keryx review required` prints |
|
|
1015
574
|
|
|
1016
|
-
|
|
1017
|
-
`--frontend` and `--backend` are the exception: this table fans each out to three reviewers, but a bare `review --frontend` reaches `review-frontend` alone, because `review frontend` and `frontend review` are one phrase to the router and that phrase is the specialist's — two skills may not share a trigger token set (`src/gdskills/catalog-single-source.test.ts`). Ask by name, or use `review --all`, when you want the three-reviewer fan-out; `docs/skills/rejected-skill-changes.md` records the alternatives that were measured and rejected.
|
|
575
|
+
Multiple flags may be combined: `review --backend --security` dispatches `review-logic` + `review-backend` + `review-architecture` + `review-security-code`. A bare `review --frontend` (or `--style`, `--architecture`, `--security`, `--performance`) reaches the specialist alone, not this table; ask by name, or use `review --all`, for the three-reviewer fan-out.
|
|
1018
576
|
|
|
1019
577
|
## Stage 1 Gate — Spec Compliance
|
|
1020
578
|
|
|
1021
|
-
**Run this FIRST, before dispatching quality reviewers, whenever the change has a
|
|
1022
|
-
stated intent — an `issue_url`, a task doc, or a PR body.**
|
|
579
|
+
**Run this FIRST, before dispatching quality reviewers, whenever the change has a stated intent — an `issue_url`, a task doc, or a PR body.** Run it on every round, not only the first: the code moves to answer findings and the body does not.
|
|
1023
580
|
|
|
1024
581
|
1. Fetch issue or task requirements.
|
|
1025
582
|
2. Map changed files and functions to acceptance criteria.
|
|
@@ -1027,26 +584,9 @@ stated intent — an `issue_url`, a task doc, or a PR body.**
|
|
|
1027
584
|
4. If there are unimplemented criteria: emit them as `blocker` findings in the final report and note them in `## Blockers`. Their `reviewer` is the reviewer that ran the comparison (`review-jev-contract`, or `review-logic` given the spec and the diff) — never `review-orchestrator`: a finding under the orchestrator's name cannot be routed away from its author, so Wave C silently skips it.
|
|
1028
585
|
5. Continue dispatching the remaining reviewers regardless (spec gaps + quality issues both belong in the report).
|
|
1029
586
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
A pull request with nothing linked is the common case, not the exception, and the
|
|
1033
|
-
gate used to skip entirely on it — which meant the only written statement of what
|
|
1034
|
-
the change was for went unchecked precisely when it was the only one there. When
|
|
1035
|
-
`issue_url` and `context_doc` are both absent, read `pr.body` as the spec and run
|
|
1036
|
-
steps 2-4 against it. Nothing at all to read — no issue, no task doc, an empty
|
|
1037
|
-
body — is itself the finding: `minor`, that the change states no intent.
|
|
587
|
+
**With no issue and no task doc, the PR body is the spec.** When `issue_url` and `context_doc` are both absent, read `pr.body` as the spec and run steps 2-4 against it. Nothing at all to read — no issue, no task doc, an empty body — is itself the finding: `minor`, that the change states no intent.
|
|
1038
588
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
The `minor` for a description that promises an approach the diff does not take
|
|
1042
|
-
(see the Context Pack) is **filed here**. It was previously stated as a rule for
|
|
1043
|
-
"every reviewer" and owned by none, which is how it stayed a remark instead of a
|
|
1044
|
-
finding across three rounds. A domain reviewer reviews its domain; the one step
|
|
1045
|
-
that already holds intent and diff side by side is this one.
|
|
1046
|
-
|
|
1047
|
-
Run it on every round, not only the first. The drift the finding catches is
|
|
1048
|
-
created BY the rounds: the code moves to answer findings, the body does not, and
|
|
1049
|
-
whoever reads the merge commit a year later reads the body. When `review.jev.contract` is on, dispatch `review-jev-contract --pr` and read its `findings` as this comparison's scored result instead of judging it by eye; when that opt-in is off, the fallback is `review-logic` dispatched with the spec and the diff, filing under its own name — `SKILL.detail.md` § "CLI-engine reviewers".
|
|
589
|
+
**This gate owns the description-vs-diff comparison**: the `minor` for a description that promises an approach the diff does not take (Context Pack) is filed here. When `review.jev.contract` is on, dispatch `review-jev-contract --pr` and read its `findings` as this comparison's scored result instead of judging it by eye; when that opt-in is off, the fallback is `review-logic` dispatched with the spec and the diff, filing under its own name — `SKILL.detail.md` § "CLI-engine reviewers".
|
|
1050
590
|
|
|
1051
591
|
---
|
|
1052
592
|
|
|
@@ -1054,23 +594,16 @@ whoever reads the merge commit a year later reads the body. When `review.jev.con
|
|
|
1054
594
|
|
|
1055
595
|
**Dispatch integrity is a completion prerequisite.** Use one distinct execution per selected reviewer role; do not combine multiple roles in one child or count sections of one response as independent runs. When budgets are tight, use sequential waves, not role batching. Resolve every project-rule anchor before dispatch; missing rules require context recovery or a blocked result, never silently skipped checks. A read-only pass cannot discharge executable obligations: dispatch a capable execution pass and retain its evidence. Partial scope and NEEDS_CONTEXT remain incomplete until rerun over the outstanding scope.
|
|
1056
596
|
|
|
1057
|
-
**The reviewer set is not yours to shrink.**
|
|
597
|
+
**The reviewer set is not yours to shrink.** Dispatch every reviewer `keryx review required --mode all` prints (`all` for a pull request, for `--all` and for no narrowing flag). `--mode diff` only when the operator named a narrower mode: pass their words as `--operator-quote`, and on a package `keryx review start` created the operator records the decision themselves (card `review_override_reviewers`, or their answer to the host question recorded with `keryx review override-reviewers --package <package> --reason "<why>" --answered-by … --answer-text … --question-text …`); closure refuses a smaller set without that record. `keryx review ledger build` writes the dispatch record from the drivers and raw results; do not fabricate execution ids or mark a truncated response complete, and audit the evidence and inventory yourself before freezing: the runtime validates the declarations, not their truth. Research closure is mandatory: see [Runtime research-completion ledger](SKILL.detail.md#runtime-research-completion-ledger).
|
|
1058
598
|
|
|
1059
599
|
Dispatch selected reviewers in parallel when independent — this engine dispatches them itself (see "How to spawn"); a host without a dispatch tool runs `keryx review run --autonomous`, a nested session at the depth limit returns `STATUS: BLOCKED` (`nested_dispatch_unavailable`), and neither reviews alone — Preflight 1. Waves follow the diff domains in "Control" and keep their dependency order:
|
|
1060
600
|
|
|
1061
601
|
1. Wave A - core correctness/risk reviewers: logic, architecture, security/highload when selected.
|
|
1062
|
-
2. Wave B - domain reviewers: frontend/backend/testing/convention reviewers filtered to relevant files. `review-jev-rules
|
|
1063
|
-
3. Wave C - **verification**: `review-verifier` over the findings, started on the first blocker/major while other reviewers still run and re-run for each later one (`SKILL.detail.md` § "Early verifier"), or when `--verify` is set or the PR is high-risk.
|
|
602
|
+
2. Wave B - domain reviewers: frontend/backend/testing/convention reviewers filtered to relevant files. The CLI-engine reviewers (`"engine": "jev"` in `keryx review reviewers --json`: `review-jev-rules`, `review-jev-risk`, `review-jev-scenarios`, `review-jev-docs`, `review-jev-comments`, `review-jev-contract`) also run here as commands, not sub-agents, each gated on its own opt-in — `SKILL.detail.md` § "CLI-engine reviewers".
|
|
603
|
+
3. Wave C - **verification**: `review-verifier` over the findings, started on the first blocker/major while other reviewers still run and re-run for each later one (`SKILL.detail.md` § "Early verifier"), or when `--verify` is set or the PR is high-risk. Wave C overlaps A and B; Step 9b's `verify_order` applies to the later passes; each verifier pass is its own run.
|
|
1064
604
|
4. Wave D - **premise**: `review-premise` after the last verifier pass (see "Wave D" below).
|
|
1065
605
|
|
|
1066
|
-
**Execution belongs to both B and C,
|
|
1067
|
-
|
|
1068
|
-
The consequence is directional and easy to get wrong: **a surviving mutation is
|
|
1069
|
-
not something Wave C can hand you.** If Wave B skips its mutation pass, that
|
|
1070
|
-
finding class is unreachable for the entire round, and no amount of verification
|
|
1071
|
-
downstream recovers it. When a testing reviewer returns without a mutation table,
|
|
1072
|
-
treat it the way you would treat a reviewer that returned without findings *and*
|
|
1073
|
-
without evidence: ask once, then record that the pass did not run. Unattended: record
|
|
606
|
+
**Execution belongs to both B and C, for opposite reasons.** Wave C runs a command to decide the fate of a finding that exists; it is delete-only. Wave B runs commands to make findings — `review-testing-practices` deletes each gate the diff added and records whether the suite goes red, and `review-layout` measures rendered geometry. **A surviving mutation is not something Wave C can hand you.** When a testing reviewer returns without a mutation table, treat it as a reviewer that returned without findings and without evidence: ask once, then record that the pass did not run. Unattended: record
|
|
1074
607
|
`Not run: mutation pass` without asking (unattended = `review start --unattended`, or the autonomous runner). Attended (every other start): run `keryx review mutate` ([The mutation pass](SKILL.detail.md#the-mutation-pass-keryx-review-mutate)); skipping it is the operator's waiver (`review_waive_mutation`, or their answer to the host question recorded with `keryx review waive-mutation … --answered-by …`).
|
|
1075
608
|
|
|
1076
609
|
### Wave C — verification, and what it replaced
|
|
@@ -1078,57 +611,28 @@ without evidence: ask once, then record that the pass did not run. Unattended: r
|
|
|
1078
611
|
Wave C replaced `review-strict`, a meta-pass that re-read the findings and adjusted severity with no new evidence. It was **removed, not improved**, on measured evidence:
|
|
1079
612
|
self-correction fell 95.5 → 91.5 → 89.0 (GPT-4, GSM8K) and 75.8 → 38.1 (GPT-3.5, CommonSenseQA), arXiv:2310.01798; Self-Refine's +49.2 on dialogue response generation is +0.2 on maths
|
|
1080
613
|
(arXiv:2303.17651), so re-reading helps subjective tasks and not verifiable ones. A verifier that **runs something** rejects most false reports.
|
|
1081
|
-
Do not restore the re-score because it looks useful.
|
|
614
|
+
Do not restore the re-score because it looks useful.
|
|
1082
615
|
|
|
1083
|
-
`review-verifier`
|
|
1084
|
-
|
|
1085
|
-
It also **never votes.** 80+ agents unanimously endorsed a padding-oracle
|
|
1086
|
-
vulnerability that did not exist, and a single empirical test killed it: consensus
|
|
1087
|
-
cannot detect a hallucination its members share, so agreement between reviewers is
|
|
1088
|
-
not evidence and must never be recorded as verification.
|
|
1089
|
-
|
|
1090
|
-
That rule is about agreement *standing in for* evidence. It is not a rule that
|
|
1091
|
-
two verifiers may not both check the same finding: each claim is admitted on its
|
|
1092
|
-
own — a named non-author, a real method, real evidence, with `reasoning` already
|
|
1093
|
-
capped — and when two such claims reach the **same** verdict the merge records it,
|
|
1094
|
-
naming both verifiers and carrying both pieces of evidence. Claims that
|
|
1095
|
-
**disagree** still cancel, because there the only thing deciding the outcome
|
|
1096
|
-
would be claim order.
|
|
616
|
+
`review-verifier` **never votes**: agreement between reviewers is not evidence and must never be recorded as verification.
|
|
1097
617
|
|
|
1098
618
|
Dispatch rules:
|
|
1099
619
|
|
|
1100
|
-
- Pass the findings held when this pass starts (the whole consolidated set on the last pass), each carrying `global_id` and the **real**
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
findings and is fixed only from 0.2.70 onward.
|
|
1105
|
-
- **A finding is never verified by the reviewer that raised it.** When only one
|
|
1106
|
-
reviewer ran, its findings are simply left unverified; verifying them yourself
|
|
1107
|
-
is worse than not verifying them. The merge compares the two names after
|
|
1108
|
-
normalising case, surrounding whitespace, `_`/`-`, and a trailing `(model)`
|
|
1109
|
-
annotation, so `review-logic `, `Review-Logic` and `review-logic (sonnet)` are
|
|
1110
|
-
all the same actor. Do not try to route around it by respelling the name — the
|
|
1111
|
-
comparison deliberately over-matches, because a refused claim only ever costs a
|
|
1112
|
-
verdict while a missed self-verification costs the finding.
|
|
1113
|
-
- Start it on the first blocker or major and re-run it for later ones; it stays delete-only.
|
|
1114
|
-
- The verifier returns `verification-claim.schema.json`. Merge it with
|
|
1115
|
-
`keryx review ingest --verifications <file>`; do not apply verdicts by hand.
|
|
1116
|
-
- **The verifier can only delete.** If it returns a severity, a new finding, or a
|
|
1117
|
-
rewritten finding, the merge discards that whole claim and records the attempt.
|
|
1118
|
-
Do not "help" by applying it.
|
|
620
|
+
- Pass the findings held when this pass starts (the whole consolidated set on the last pass), each carrying `global_id` and the **real** originating `reviewer`.
|
|
621
|
+
- **A finding is never verified by the reviewer that raised it.** When only one reviewer ran, its findings are simply left unverified; verifying them yourself is worse than not verifying them. Do not route around the name check by respelling the name.
|
|
622
|
+
- Start it on the first blocker or major and re-run it for later ones.
|
|
623
|
+
- The verifier returns `verification-claim.schema.json`. Merge it with `keryx review ingest --verifications <file>`; do not apply verdicts by hand, and do not apply a severity, new finding or rewrite it returns (the merge discards that whole claim).
|
|
1119
624
|
|
|
1120
625
|
### Wave D — the premise judge, after the verifier
|
|
1121
626
|
|
|
1122
|
-
A finding can reproduce and still not be a defect
|
|
1123
|
-
- Before dispatch, renumber any display id that another finding, carried or new, already has, in the saved reviewer results, so the judge, its claims and ingest all see the same ids
|
|
627
|
+
A finding can reproduce and still not be a defect. `review-premise` asks the other question, on the deep tier and a clean context: intent, accepted practice, consistency, fix soundness.
|
|
628
|
+
- Before dispatch, renumber any display id that another finding, carried or new, already has, in the saved reviewer results, so the judge, its claims and ingest all see the same ids (ingest refuses two findings under one key; a claim naming a shared id is rejected as `ambiguous-finding`).
|
|
1124
629
|
- Dispatch it once after the last verifier pass (no verifier ran: after the last reviewer), over the canonical findings of severity ≥ minor, each with its display `id`, the **real** `reviewer` and `source`, and, for a finding carried from an earlier round, its `global_id`. External (PR-comment, `source: external`) findings are included: they can be challenged, never downgraded. In a delta round only findings without a carried premise. On keryx shell the judge has no shell and no git tool: run `git log -L` and `git blame -L` for each cited site first and pass the output in `context_files`.
|
|
1125
|
-
-
|
|
1126
|
-
- `challenged` and `owner-decision` **hold** a finding: it is neither fixable nor clean — not an open blocker or major, never in a fix loop's `fix_context.review_feedback`, and it blocks until answered; the verdict lists it as awaiting the operator. **Asking about a held finding** (every skill that meets one points here): at the tail, after `ingest --premises` wrote `findings.json` (never during Wave D, before the ingest: the answer commands read `findings.json`), in keryx shell call the card `review_decide_premise`, which records the answer; elsewhere put its `question` and `options` to the operator with the host's question tool (`uphold` or `dismiss`, the finding id in the question; never send them to a terminal), then record what they chose: `keryx review decide-premise --package <package> --finding <global_id> --answer uphold|dismiss --reason "<why>" --answered-by <source>:<ref> --answer-text "<their words, verbatim>" --question-text "<the question as asked>"` (`confirmedVia: "host-question"`; "Hosts", Operator decisions). Record only an answer they gave and never write their words or their reason yourself. In a flow, journal the recorded answer.
|
|
630
|
+
- Save its claims object unchanged to `research-evidence/premises.json` (the verdict reads it there) and pass that file with `keryx review ingest --premises <file>`; never apply verdicts by hand.
|
|
631
|
+
- `challenged` and `owner-decision` **hold** a finding: it is neither fixable nor clean — not an open blocker or major, never in a fix loop's `fix_context.review_feedback`, and it blocks until answered; the verdict lists it as awaiting the operator. **Asking about a held finding** (every skill that meets one points here): at the tail, after `ingest --premises` wrote `findings.json` (never during Wave D, before the ingest: the answer commands read `findings.json`), in keryx shell call the card `review_decide_premise`, which records the answer; elsewhere put its `question` and `options` to the operator with the host's question tool (`uphold` or `dismiss`, the finding id in the question; never send them to a terminal), then record what they chose: `keryx review decide-premise --package <package> --finding <global_id> --answer uphold|dismiss --reason "<why>" --answered-by <source>:<ref> --answer-text "<their words, verbatim>" --question-text "<the question as asked>"` (`confirmedVia: "host-question"`; "Hosts", Operator decisions). Record only an answer they gave and never write their words or their reason yourself. In a flow, journal the recorded answer. Unattended: leave it held and report it.
|
|
1127
632
|
|
|
1128
633
|
### `verification_mode`
|
|
1129
634
|
|
|
1130
|
-
`off` | `annotate` | `filter`. **Default `annotate
|
|
1131
|
-
one release.**
|
|
635
|
+
`off` | `annotate` | `filter`. **Default `annotate`.** Do not switch a project to `filter` on the strength of one round.
|
|
1132
636
|
|
|
1133
637
|
| Mode | What happens |
|
|
1134
638
|
|---|---|
|
|
@@ -1136,34 +640,38 @@ one release.**
|
|
|
1136
640
|
| `annotate` | Verdicts are recorded on the findings. **Nothing is removed.** A `refuted` finding is still reported, marked refuted. |
|
|
1137
641
|
| `filter` | An applied `refuted` verdict removes the finding from the reported set and records it as `dismissed-incorrect`, with the verification evidence. |
|
|
1138
642
|
|
|
1139
|
-
`annotate` is the default so the drop rate is a **measured number** before it
|
|
1140
|
-
costs a real finding. The risk is named rather than assumed away: SWE-agent keeps
|
|
1141
|
-
its equivalent step opt-in because it sometimes rejects correct patches. Do not
|
|
1142
|
-
switch a project to `filter` on the strength of one round.
|
|
1143
|
-
|
|
1144
643
|
### Agent Runtime Compatibility
|
|
1145
644
|
|
|
1146
645
|
Before dispatching a reviewer through a platform-native sub-agent mechanism, verify that the exact reviewer name is available as an agent type in the current runtime.
|
|
1147
646
|
|
|
1148
647
|
Runtime rules:
|
|
1149
648
|
- If the exact reviewer agent type exists, dispatch that reviewer directly.
|
|
1150
|
-
- If the exact reviewer agent type does not exist but `.metaproject/skills/gdskills/review/<reviewer>/SKILL.md` exists, dispatch `general-purpose` and include the reviewer name, the path of that skill file, bounded review context, and required `REVIEW_RESULT` schema in the prompt. For a bundled reviewer that path goes in the prompt text and in `dispatch_plan`, not in the input's `skill_path` field, which is for project reviewers only
|
|
649
|
+
- If the exact reviewer agent type does not exist but `.metaproject/skills/gdskills/review/<reviewer>/SKILL.md` exists, dispatch `general-purpose` and include the reviewer name, the path of that skill file, bounded review context, and required `REVIEW_RESULT` schema in the prompt. For a bundled reviewer that path goes in the prompt text and in `dispatch_plan`, not in the input's `skill_path` field, which is for project reviewers only.
|
|
1151
650
|
- If neither the agent type nor the skill file exists, do not silently substitute another reviewer. Mark that reviewer as `BLOCKED`, include the missing agent/skill name, and continue only with independent reviewers.
|
|
1152
|
-
- **A project reviewer is dispatched by its package, on every branch above.**
|
|
651
|
+
- **A project reviewer is dispatched by its package, on every branch above.** Put the absolute path of its registered `<path>/SKILL.md` in the dispatch (`skill_path`) and say in the prompt that this file is the reviewer's definition and overrides the built-in definition of any agent type with the same name. If the file is missing, mark the reviewer `BLOCKED` and name the missing path — do not fall back to the same-named agent type or to any other reviewer. For every entry in that reviewer's `shadowedRules`, the prompt also says: "where your text names `<ref>`, read `<resolved>` instead" (the absolute path of `resolved`) — see `SKILL.detail.md`, "Dispatching a project reviewer".
|
|
1153
652
|
- Record the chosen runtime per reviewer in `review_context.review_plan.dispatch_plan`.
|
|
1154
653
|
- The user-facing progress line must be explicit: "Running `<reviewer>` via `general-purpose` fallback because native agent type is unavailable." Do not use vague fallback messages such as "running through available agent types" without naming which reviewers used fallback and why.
|
|
1155
654
|
|
|
1156
655
|
Pass each sub-reviewer a payload matching `.metaproject/skills/gdskills/review/review-orchestrator/reviewer-input.schema.json`:
|
|
1157
656
|
|
|
1158
657
|
```yaml
|
|
1159
|
-
|
|
658
|
+
# Every field and its source, and what the prompt adds: "Reviewer brief — required contents" (How to spawn), lines A–Z.
|
|
659
|
+
review_context: <bounded context pack — lines K–R, incl. pr.body as full text>
|
|
1160
660
|
reviewer: <skill-name>
|
|
1161
661
|
skill_path: <absolute path of <path>/SKILL.md — project reviewers only; omit for a bundled reviewer>
|
|
1162
662
|
scope_mode: diff | path
|
|
1163
663
|
context_doc: <path or empty>
|
|
1164
664
|
issue_url: <url or empty>
|
|
665
|
+
pr_context: <package>/pr-context.md on a pull-request review
|
|
1165
666
|
conduct: <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
|
|
1166
|
-
model: <the `model` block `keryx review tier` printed for this dispatch — paste verbatim>
|
|
667
|
+
model: <the `model` block `keryx review tier` printed for this dispatch — paste verbatim; also into the prompt and the driver>
|
|
668
|
+
allowed_tools: read-only | run-tests
|
|
669
|
+
exec_budget_s: <0 for read-only; seconds for run-tests>
|
|
670
|
+
layers: <keryx review layers block … --json>
|
|
671
|
+
metaproject: {memory: <the review_context.memory entries>}
|
|
672
|
+
is_fix_round: <true on a FIX slice of a delta round>
|
|
673
|
+
prior_findings: <the findings that FIX slice answers>
|
|
674
|
+
known_findings: <earlier waves of this round>
|
|
1167
675
|
budget:
|
|
1168
676
|
max_prompt_tokens: <number or null>
|
|
1169
677
|
max_findings: <number>
|
|
@@ -1171,7 +679,7 @@ budget:
|
|
|
1171
679
|
# If scope_mode = diff:
|
|
1172
680
|
branch: <branch>
|
|
1173
681
|
base_sha: <base sha>
|
|
1174
|
-
|
|
682
|
+
slices: <the slice ids of this wave>
|
|
1175
683
|
|
|
1176
684
|
# If scope_mode = path:
|
|
1177
685
|
target_path: <resolved path or file list>
|
|
@@ -1180,27 +688,6 @@ file_contents: <bounded file contents relevant to this reviewer>
|
|
|
1180
688
|
|
|
1181
689
|
Each reviewer must return a `REVIEW_RESULT` object matching `.metaproject/skills/gdskills/review/review-orchestrator/reviewer-finding.schema.json`, followed by a concise markdown summary. The orchestrator must reject or normalize free-form reports before consolidation. **Important for path mode:** instruct each reviewer to check the **entire file**, not just changes. The scope report should say "Path: `<TARGET_PATH>`" instead of a branch/merge-base.
|
|
1182
690
|
|
|
1183
|
-
## Scope Boundaries
|
|
1184
|
-
|
|
1185
|
-
| Concern | This skill | Use instead |
|
|
1186
|
-
|---------|------------|-------------|
|
|
1187
|
-
| Routing and consolidation | YES | — |
|
|
1188
|
-
| Logic correctness | NO | `review-logic` |
|
|
1189
|
-
| Frontend patterns (React, MVVM) | NO | `review-frontend` |
|
|
1190
|
-
| Architectural violations | NO | `review-architecture` |
|
|
1191
|
-
| Security vulnerabilities | NO | `review-security-code` |
|
|
1192
|
-
| Performance anti-patterns | NO | `review-performance` |
|
|
1193
|
-
| Style / naming / import order | NO | `review-style` |
|
|
1194
|
-
| Checking whether a reported finding is real | NO | `review-verifier` |
|
|
1195
|
-
| Judging whether a finding is a defect at all | NO | `review-premise` |
|
|
1196
|
-
| Clean Code principles + SOLID at code level | NO | `review-clean-code` |
|
|
1197
|
-
| Concurrency, resource pools, caching, queues, idempotency | NO | `review-highload` |
|
|
1198
|
-
| Frontend repository conventions | NO | `review-frontend-conventions` |
|
|
1199
|
-
| Test / e2e conventions | NO | `review-testing-practices` |
|
|
1200
|
-
| Shared core boundary rules | NO | `review-core-boundaries` |
|
|
1201
|
-
| Shared flow/graph abstraction contracts | NO | `review-flow-graph` |
|
|
1202
|
-
| Legacy/profile review profiles | NO | `code-learned-review` |
|
|
1203
|
-
|
|
1204
691
|
## Sub-Agent Report Quality Gate
|
|
1205
692
|
|
|
1206
693
|
Before consolidation, validate every reviewer result:
|
|
@@ -1211,11 +698,11 @@ Before consolidation, validate every reviewer result:
|
|
|
1211
698
|
| `DONE` | Consolidate. |
|
|
1212
699
|
| `DONE_WITH_CONCERNS` | Consolidate and carry the concerns into the report. |
|
|
1213
700
|
| `NEEDS_CONTEXT` | One targeted context refill; if still unresolved, keep it as an explicit open question, not a blocker. |
|
|
1214
|
-
| `BLOCKED` | `
|
|
701
|
+
| `BLOCKED` | `review next` hands out the next wave of the uncovered slices; a reviewer with no progress is listed under **Not run**. |
|
|
1215
702
|
| `RATE_LIMITED` | Halve the wave and requeue (Control). |
|
|
1216
703
|
| anything else, or no result | Treat as `BLOCKED`. |
|
|
1217
704
|
|
|
1218
|
-
- Required finding fields: id, severity, file, `quote`, problem, impact, suggested_fix, evidence, confidence, reviewer. **`quote`, not `line`:**
|
|
705
|
+
- Required finding fields: id, severity, file, `quote`, problem, impact, suggested_fix, evidence, confidence, reviewer. **`quote`, not `line`:** the reviewer copies the code the finding is about verbatim out of `file` and does not count lines — `keryx review ingest` locates the quote at the round's head and derives `line`. Quote enough to be unambiguous. A finding about the round rather than a site carries neither.
|
|
1219
706
|
- Every blocker must include evidence and a concrete suggested fix.
|
|
1220
707
|
- Findings without evidence are downgraded to `info` or returned to the reviewer for clarification.
|
|
1221
708
|
- Duplicate findings are merged by `dedupe_key` or by `(file, quote, problem)`.
|
|
@@ -1225,11 +712,7 @@ Before consolidation, validate every reviewer result:
|
|
|
1225
712
|
|
|
1226
713
|
## Severity (canonical)
|
|
1227
714
|
|
|
1228
|
-
**This is the only severity rubric in the review domain.** Reviewers do not carry
|
|
1229
|
-
their own. Ten private rubrics feeding one sort produce a ranking that means ten
|
|
1230
|
-
different things at once, and ranking is what an operator uses to decide what to
|
|
1231
|
-
read first. A reviewer may state which of *its* conditions land where; it may not
|
|
1232
|
-
redefine the levels.
|
|
715
|
+
**This is the only severity rubric in the review domain.** Reviewers do not carry their own. A reviewer may state which of *its* conditions land where; it may not redefine the levels.
|
|
1233
716
|
|
|
1234
717
|
### `blocker` — merge-blocking, and nothing else
|
|
1235
718
|
|
|
@@ -1251,15 +734,11 @@ the linter", or "this is how the last outage started".
|
|
|
1251
734
|
|
|
1252
735
|
**An unshipped dependency is shape 1 or shape 2, and the list stays closed.**
|
|
1253
736
|
When a producer is recorded `state: open` with `merge_order: producer_first` and
|
|
1254
|
-
nothing stops this change merging first,
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
consuming call site, and say in the fix that the remedy is a merge gate, a flag,
|
|
1260
|
-
or a fallback — never a change to the diff, which may be entirely correct. A
|
|
1261
|
-
missing deploy note with no recorded producer state behind it is not this; that
|
|
1262
|
-
is the `minor` in the Context Pack. See `### A producer that has not merged yet`.
|
|
737
|
+
nothing stops this change merging first, the consumer calls what is not there
|
|
738
|
+
(shape 1) or reads the default the producer has not changed yet (shape 2). File it
|
|
739
|
+
against the consuming call site, and say in the fix that the remedy is a merge gate,
|
|
740
|
+
a flag, or a fallback — never a change to the diff. A missing deploy note with no
|
|
741
|
+
recorded producer state behind it is the `minor` in the Context Pack.
|
|
1263
742
|
|
|
1264
743
|
### `major` / `minor` / `info` — the boundary test
|
|
1265
744
|
|
|
@@ -1278,32 +757,18 @@ Ask one question, and ask it of the **finding**, not of the code:
|
|
|
1278
757
|
- **`info`** — it names neither. An observation, a preference, or a risk with no
|
|
1279
758
|
demonstrated path.
|
|
1280
759
|
|
|
1281
|
-
|
|
1282
|
-
someone who did not write it — and has not read the code — reaches the same
|
|
1283
|
-
answer: look for the trigger and the outcome. Present → `major`. Absent, but a
|
|
1284
|
-
concrete maintenance cost is named → `minor`. Neither → `info`.
|
|
760
|
+
Look for the trigger and the outcome. Present → `major`. Absent, but a concrete maintenance cost is named → `minor`. Neither → `info`.
|
|
1285
761
|
|
|
1286
762
|
A surviving mutant shows a missing assertion, not wrong behaviour: a test gap in code the
|
|
1287
763
|
suite exercises is `minor`; `severity-audit` raises it only when no mutant in that file was killed.
|
|
1288
764
|
|
|
1289
|
-
Two consequences, both previously decided differently in different files:
|
|
1290
|
-
|
|
1291
765
|
- A finding that **claims** runtime harm and cannot name the trigger is `info`,
|
|
1292
|
-
not `major
|
|
1293
|
-
claimed runtime harm at all. The two are different failures and stay
|
|
1294
|
-
distinguishable.
|
|
766
|
+
not `major` — and not `minor`, which is for findings that never claimed runtime harm.
|
|
1295
767
|
- Severity is a property of the demonstrated outcome, never of the reviewer that
|
|
1296
|
-
found it
|
|
1297
|
-
|
|
1298
|
-
-
|
|
1299
|
-
|
|
1300
|
-
trigger is named; otherwise a cosmetic nit stated as "trigger X produces output Y"
|
|
1301
|
-
reads as `major` and survives the findings cap while a terse real defect is cut.
|
|
1302
|
-
|
|
1303
|
-
The boundary this rubric does **not** draw is `major` against `major`. Two
|
|
1304
|
-
findings that both name a trigger and an outcome are the same severity even when
|
|
1305
|
-
one is obviously worse; the ordering inside a severity is the operator's, and
|
|
1306
|
-
inventing a fifth level to express it would put us back where we started.
|
|
768
|
+
found it, and never of how crisply the finding is worded: an outcome that costs a
|
|
769
|
+
user, a caller or persisted state nothing is `minor` however precisely its trigger is named.
|
|
770
|
+
- Two findings that both name a trigger and an outcome are the same severity even when
|
|
771
|
+
one is obviously worse; the ordering inside a severity is the operator's.
|
|
1307
772
|
|
|
1308
773
|
### Shared laws (every reviewer)
|
|
1309
774
|
|
|
@@ -1317,12 +782,6 @@ Every `blocker` and `major` finding must carry `class_scope`: **every** site tha
|
|
|
1317
782
|
holds the shape you found, and **how you enumerated them** — the grep or query
|
|
1318
783
|
you ran, or the guard that derives the set.
|
|
1319
784
|
|
|
1320
|
-
A finding anchored to one `file:line` is a claim about one site. The recorded
|
|
1321
|
-
history of this repository is that a fix then repairs that site and leaves its
|
|
1322
|
-
siblings: one writer of five, one operator instruction of four, six readers of
|
|
1323
|
-
eight. Each was found by the *next* review round, which is why reviews here have
|
|
1324
|
-
run to seven and four rounds instead of one.
|
|
1325
|
-
|
|
1326
785
|
```yaml
|
|
1327
786
|
class_scope:
|
|
1328
787
|
sites: ["src/lib/shell-config.ts:60", "src/session/store.ts:133"]
|
|
@@ -1330,43 +789,10 @@ class_scope:
|
|
|
1330
789
|
```
|
|
1331
790
|
|
|
1332
791
|
"I checked the others" is not an enumeration method. A single-entry `sites` list
|
|
1333
|
-
is a claim that the class has exactly one member — make it deliberately
|
|
1334
|
-
`
|
|
1335
|
-
|
|
1336
|
-
`minor` and `info` may omit it: enumerating the class for every low-severity
|
|
1337
|
-
observation is theatre, not rigour.
|
|
1338
|
-
|
|
1339
|
-
#### Negative enumeration — the empty set is also a class scope
|
|
1340
|
-
|
|
1341
|
-
Some of the strongest findings assert that something is **absent**: nothing clears
|
|
1342
|
-
this state, nothing reads this field, this prop can never fire, no test builds this
|
|
1343
|
-
shape. Those are claims about a set being empty, and an empty set is exactly as
|
|
1344
|
-
enumerable as a full one — the same `class_scope` machinery carries it.
|
|
1345
|
-
|
|
1346
|
-
```yaml
|
|
1347
|
-
class_scope:
|
|
1348
|
-
sites: []
|
|
1349
|
-
enumeration_method: "all 5 clearSubmitExecutionState() call sites are onUnmount,
|
|
1350
|
-
setActiveControl, setActiveTemplate, submitActiveControl, resetActiveControlForm;
|
|
1351
|
-
none reachable from a check-section edit, and there is no reaction/autorun"
|
|
1352
|
-
```
|
|
1353
|
-
|
|
1354
|
-
The `enumeration_method` is the whole finding here, so it carries more weight than
|
|
1355
|
-
usual: it must name the complete candidate set and why each member fails to apply.
|
|
1356
|
-
"I looked and did not find one" is not that. A search that returned nothing, with
|
|
1357
|
-
the query, is.
|
|
1358
|
-
|
|
1359
|
-
This form covers a class of defect nothing else in this pipeline reaches:
|
|
792
|
+
is a claim that the class has exactly one member — make it deliberately.
|
|
793
|
+
`minor` and `info` may omit it.
|
|
1360
794
|
|
|
1361
|
-
|
|
1362
|
-
of disabling; a field added to two type `Pick`s and never read; a `=== undefined` guard against a producer that never emits `undefined`. The diff looks like it
|
|
1363
|
-
does something and does nothing, and the reviewer that checks whether the change is *correct* passes it, because it is.
|
|
1364
|
-
- **The missing clear.** State is set on one path and no path unsets it.
|
|
1365
|
-
- **The unreachable branch.** A value the code handles that its producer cannot emit.
|
|
1366
|
-
|
|
1367
|
-
An inert change is `minor` when it is merely dead, and `major` when its deadness
|
|
1368
|
-
means the bug it was added to fix is still live — the second is the common case
|
|
1369
|
-
when the change was written to answer an earlier round's finding.
|
|
795
|
+
**Negative enumeration — the empty set is also a class scope.** A finding that something is **absent** (nothing clears this state, nothing reads this field, this prop can never fire) carries `sites: []` and an `enumeration_method` that names the complete candidate set and why each member fails to apply; "I looked and did not find one" is not that, a search that returned nothing, with the query, is. It covers the inert change (a prop, guard, field or branch nothing can reach), the missing clear, and the unreachable branch. An inert change is `minor` when it is merely dead, and `major` when its deadness means the bug it was added to fix is still live.
|
|
1370
796
|
|
|
1371
797
|
All findings from all sub-reviewers must be normalized to this format before consolidation:
|
|
1372
798
|
|
|
@@ -1396,7 +822,7 @@ When writing review report metadata or a PR comment:
|
|
|
1396
822
|
1. Read `review_context.token_policy.model_plan`.
|
|
1397
823
|
2. Set `Model strategy` from `model_plan.strategy` (`ask` or `adaptive`).
|
|
1398
824
|
3. Set `Current model` from the first available value: `model_plan.current_model`, detected tool output, current runtime model shown by the platform, or `unknown`.
|
|
1399
|
-
4. Record the model actually assigned per reviewer — the `tier` and (`provider`+`model` or `inherit`) from the `model` block `keryx review tier` printed for that dispatch
|
|
825
|
+
4. Record the model actually assigned per reviewer — the `tier` and (`provider`+`model` or `inherit`) from the `model` block `keryx review tier` printed for that dispatch; include `complex_model`, `normal_model`, and `simple_model` too when `model_plan` reports them.
|
|
1400
826
|
5. If the dispatch's `model` block carried `inherit: true`, write `Model assignment: adaptive` and the model the host actually dispatched on for that tier (or `unknown`).
|
|
1401
827
|
6. If the actual model is unknown, write `unknown`; do not substitute `adaptive` or `inherit`.
|
|
1402
828
|
|
|
@@ -1409,67 +835,36 @@ STATUS: DONE | DONE_WITH_CONCERNS
|
|
|
1409
835
|
`DONE` — no blockers or majors in the changed code.
|
|
1410
836
|
`DONE_WITH_CONCERNS` — one or more blocker or major findings in the changed code.
|
|
1411
837
|
|
|
1412
|
-
The machine `verdict` is unchanged (`APPROVE`, `APPROVE_WITH_SUGGESTIONS`,
|
|
1413
|
-
`REQUEST_CHANGES`). The prose does not print those tokens. It prints the line
|
|
1414
|
-
in `templates/review-report.md`: `Changes requested` or `No blockers, merge-ready`.
|
|
838
|
+
The machine `verdict` is unchanged (`APPROVE`, `APPROVE_WITH_SUGGESTIONS`, `REQUEST_CHANGES`). The prose does not print those tokens. It prints the line in `templates/review-report.md`: `Changes requested` or `No blockers, merge-ready`.
|
|
1415
839
|
|
|
1416
|
-
Render the human report from that file. Do not invent a second skeleton here
|
|
840
|
+
Render the human report from that file. Do not invent a second skeleton here; its shape, for orientation:
|
|
1417
841
|
|
|
1418
842
|
```markdown
|
|
1419
843
|
<!-- slot:pre-verdict -->
|
|
1420
844
|
**Changes requested — 1 Blocker, 2 Major, 4 Minor, 1 question.** <what holds, and where the risk is.>
|
|
1421
845
|
Reviewed `<head>` against `<base>` · round N · <files> files, +<add>/−<del> · CI <state>.
|
|
1422
846
|
<!-- slot:after-verdict -->
|
|
1423
|
-
|
|
1424
|
-
### Blocker
|
|
1425
|
-
**F-001. <one-sentence claim>.** [`path/to/file.ts:line`](<blob link at head>), in the diff.
|
|
1426
|
-
<proof: traced path, probe, or failing scenario>
|
|
1427
|
-
Fix: <concrete>
|
|
1428
|
-
|
|
1429
|
-
### Major
|
|
1430
|
-
**F-002. <one-sentence claim>.** [`path/to/file.ts:line`](<blob link at head>), in the diff.
|
|
1431
|
-
|
|
1432
|
-
### Minor
|
|
1433
|
-
- **F-010. <claim>.** `path:line`, in the diff — <proof and fix, one to three sentences>.
|
|
1434
|
-
|
|
1435
|
-
### Questions
|
|
1436
|
-
1. <an info finding that needs an author answer; other info is not published>
|
|
1437
|
-
|
|
847
|
+
### Blocker · ### Major · ### Minor · ### Questions (an info finding that needs an author answer; other info is not published)
|
|
1438
848
|
<details> Pre-existing (not blocking) · Verified clean <!-- slot:verified-clean --> · How this review was run — **Workflow:**, **Scope:**, **Models:**, **Tools:**, **Skills:**, **Subagents:**, **Not run:**, **Verification:** <!-- slot:how-run --> </details>
|
|
1439
849
|
```
|
|
1440
850
|
|
|
1441
|
-
Pick the domain file the same way reviewers are picked: frontend scope, or a
|
|
1442
|
-
fullstack / paired PR, reads `templates/pr-comment-frontend.md`. Backend-only
|
|
1443
|
-
reads `templates/pr-comment-backend.md`. A paired PR always uses the frontend
|
|
1444
|
-
file and must include the wire-contract line.
|
|
851
|
+
Pick the domain file the same way reviewers are picked: frontend scope, or a fullstack / paired PR, reads `templates/pr-comment-frontend.md`. Backend-only reads `templates/pr-comment-backend.md`. A paired PR always uses the frontend file and must include the wire-contract line.
|
|
1445
852
|
|
|
1446
853
|
## Stage counts
|
|
1447
854
|
|
|
1448
855
|
Required in **How this review was run**, copied from `scope.md`, not re-counted by hand. State what each stage removed. Never state it as a precision improvement: no precision baseline exists to improve on. The line carries `verification_mode` (`off | annotate | filter`), confirmed / refuted / unverifiable / unverified, the premise verdicts (upheld / downgraded / held), and retained.
|
|
1449
856
|
|
|
1450
|
-
|
|
1451
|
-
that was tested and died, with the evidence, not a list of virtues. There is
|
|
1452
|
-
no Positive Notes section. A compliment is not a result.
|
|
857
|
+
**Verified clean** is a hypothesis that was tested and died, with the evidence, not a list of virtues. There is no Positive Notes section. A compliment is not a result.
|
|
1453
858
|
|
|
1454
|
-
Tables: counts, ids, `file:line`, statuses, before/after, pass/fail only. A
|
|
1455
|
-
finding is a paragraph or a list item. A cell longer than about ten words is
|
|
1456
|
-
not a table cell.
|
|
859
|
+
Tables: counts, ids, `file:line`, statuses, before/after, pass/fail only. A finding is a paragraph or a list item. A cell longer than about ten words is not a table cell.
|
|
1457
860
|
|
|
1458
861
|
## Skill Learning Handoff
|
|
1459
862
|
|
|
1460
|
-
After findings are consolidated, decide whether any of them should re-train a
|
|
1461
|
-
project-skill (see `rules/process/skill-lifecycle.mdc`). A review is the strongest
|
|
1462
|
-
learning signal: a finding that a project-skill *should have prevented* means the
|
|
1463
|
-
skill is stale or incomplete.
|
|
863
|
+
After findings are consolidated, decide whether any of them should re-train a project-skill (see `rules/process/skill-lifecycle.mdc`): a finding that a project-skill *should have prevented* means the skill is stale or incomplete.
|
|
1464
864
|
|
|
1465
|
-
1. For each blocker/major finding, `keryx skills route <finding-file>` to
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
contradicts — especially if the **same class of finding recurs** across files
|
|
1469
|
-
or across reviews — flag it for learning.
|
|
1470
|
-
3. Do not mutate the skill yourself. Emit a `Skill Learning` block in the report
|
|
1471
|
-
and hand it to the caller (`job-orchestrator` / `flow-orchestrator`), which
|
|
1472
|
-
dispatches `skills learn` as a subagent (cheaper model if available):
|
|
865
|
+
1. For each blocker/major finding, `keryx skills route <finding-file>` to see if a project-skill covers that module/entity.
|
|
866
|
+
2. If a covered skill exists and the finding reflects a rule the skill omits or contradicts — especially if the **same class of finding recurs** across files or across reviews — flag it for learning.
|
|
867
|
+
3. Do not mutate the skill yourself. Emit a `Skill Learning` block in the report and hand it to the caller (`job-orchestrator` / `flow-orchestrator`), which dispatches `skills learn` as a subagent (cheaper model if available):
|
|
1473
868
|
|
|
1474
869
|
```markdown
|
|
1475
870
|
## Skill Learning
|
|
@@ -1521,38 +916,3 @@ and name unchecked commits. Do not duplicate findings; cite extended ones.
|
|
|
1521
916
|
## Job Context Awareness
|
|
1522
917
|
|
|
1523
918
|
When a prompt carries `JOB_NAME` and `CONTEXT_PATH`, read that context document before scope detection (`SKILL.detail.md` § "Job Context Awareness"). It is optional and non-blocking.
|
|
1524
|
-
|
|
1525
|
-
---
|
|
1526
|
-
|
|
1527
|
-
## Red Flags
|
|
1528
|
-
|
|
1529
|
-
| Rationalization | Why it is wrong |
|
|
1530
|
-
|----------------|-----------------|
|
|
1531
|
-
| "I'll pick the reviewers myself, by feel" | The set is what `keryx review required` prints, routed per slice; adding by feel over-reviews and dropping one needs the operator's own override |
|
|
1532
|
-
| "Spec compliance can wait until after quality review" | Stage 1 gate exists because unimplemented requirements invalidate quality work |
|
|
1533
|
-
| "I'll deduplicate findings manually in my head" | Always normalize to [F-NNN] format before consolidation to avoid losing findings |
|
|
1534
|
-
| "The reviewer's own severity table said blocker" | There are no reviewer tables. One rubric, in **Severity (canonical)** above; a reviewer that ships one is the defect this replaced |
|
|
1535
|
-
| "It's a security/architecture finding, so it's a blocker" | Severity is the demonstrated outcome, not the domain that found it. `blocker` is exactly the four shapes |
|
|
1536
|
-
| "It will definitely break something eventually, so blocker" | Name the trigger and the outcome. Named → `major`. Unnamed → `info`. "Eventually" is neither |
|
|
1537
|
-
| "A strict re-read of the findings will sharpen them" | That pass existed and was removed: self-correction without new evidence measured 95.5 → 91.5 → 89.0 on GSM8K and 75.8 → 38.1 on CommonSenseQA. Run something instead |
|
|
1538
|
-
| "Three reviewers agree, so the finding is verified" | Consensus is not evidence. 80+ agents unanimously endorsed a vulnerability that did not exist; one empirical test killed it |
|
|
1539
|
-
| "The verifier suggested a higher severity, I'll apply it" | It cannot suggest one. A claim carrying a severity is discarded whole and the attempt is recorded |
|
|
1540
|
-
| "The verifier confirmed it, so the fixer gets it" | Confirmed means the fact reproduces, not that it is a defect. Wave D judges the premise; a held finding waits for the operator |
|
|
1541
|
-
| "This finding has no `verification`, so it can be dropped" | Absent means nobody checked. All 83 recorded findings are in that state; none of them is thereby wrong |
|
|
1542
|
-
| "Precision went up after the verifier landed" | There is no precision baseline to have gone up from. State stage counts: dropped, refuted, retained |
|
|
1543
|
-
| "I'll widen the blast radius, this change looks risky" | It is bounded because review quality decays with context: F1 0.65 at round 2 → 0.29 at round 10. Widening makes the later rounds worse, not safer |
|
|
1544
|
-
| "The blast radius came back empty, so nothing can break" | Empty and unresolved are different facts. The graph indexes code — a Markdown or JSON change has no radius at all, and the record says which one you got |
|
|
1545
|
-
| "The changed files are the same as last round, so scope B can be skipped on the final round" | The final round always recomputes. A fix landed in round 3 is the change; skipping means the certifying round checked the least |
|
|
1546
|
-
| "This scope-B file has an obvious naming problem, I'll report it" | Rejected in code: a naming problem is `minor` at best, and the floor is `major`. The set is under regression check, not under review — raise it under scope A |
|
|
1547
|
-
| "The reviewer ran out of budget but I saw enough of the diff to write its findings" | Then the report names a review that did not happen. It is `BLOCKED`: `retry-plan` hands out the uncovered slices in waves that fit the budget, else **Not run** |
|
|
1548
|
-
| "The verifier returned nothing, so I'll confirm the findings myself" | The orchestrator never verifies. No verdict means `unverified`, stated in the stage counts |
|
|
1549
|
-
| "The spec-gate finding is mine, so `reviewer: review-orchestrator`" | That name makes the finding unroutable in Wave C. File it under the reviewer that ran the comparison |
|
|
1550
|
-
| "Steps 8–10 are done, I'll tick them now and ingest later" | `completed` means the ingest record exists. A plan that runs ahead of the artifacts is how an unrun review looked finished |
|
|
1551
|
-
| "The user said publish, so I can post the comment" | That chose whether, not what. Show the rendered body and get approval of it before any GitHub write |
|
|
1552
|
-
| "I cannot spawn reviewers, so I will review it myself" | A review nobody dispatched is not the review the report names. Run `keryx review run --autonomous` (Preflight 1); at the depth limit output the `BLOCKED` line and stop |
|
|
1553
|
-
| "The spawn tool's output has the reviewer's answer" | It is cut (16000 characters on keryx shell) or only the last message. Parse `<package>/raw/<reviewer>.txt` |
|
|
1554
|
-
| "The plan is over threshold, but the reviewers are ready, so I'll dispatch" | `dispatch-check` and `ledger build` refuse an unconfirmed over-threshold plan; the operator confirms it first ("Round plan" 6) |
|
|
1555
|
-
| "I'll keep the results in the shared `.metaproject/data/review/raw`" | It holds other rounds' replies, which then leak into this verdict and retry plan. Results live in `<package>/raw` on every host |
|
|
1556
|
-
| "The operator is busy, I'll pass `--yes` / `--mode automatic` / write the quote" | An operator decision is their card, their answer to the host question, or their terminal ("Hosts"); words you typed are not theirs |
|
|
1557
|
-
| "User named a module so I'll use diff mode" | Named module/component/store → path mode; diff mode is only for branch changes |
|
|
1558
|
-
| "Path mode should only show lines I'd flag in diff mode" | Path mode reviews the entire file — all findings apply, not just added lines |
|