@mrciphersmith/keryx 0.3.117 → 0.3.119
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 +101471 -94782
- package/dist/core.js +2276 -1048
- package/package.json +1 -1
- package/src/gdgraph/service.ts +4 -0
- package/src/gdgraph/symbol-reach.ts +1069 -0
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/platform/scheduled-tasks/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-comments/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-contract/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-docs/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-risk/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-jev-scenarios/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +156 -20
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +90 -90
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +4 -4
|
@@ -24,10 +24,47 @@ license: "MIT"
|
|
|
24
24
|
|
|
25
25
|
## Preflight — before Step 0, in this order
|
|
26
26
|
|
|
27
|
-
1. **Can it spawn?** 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.
|
|
27
|
+
1. **Can it spawn?** 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:
|
|
28
28
|
`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 `merge-base..HEAD`. Past it: interactive, ask the operator; unattended, `STATUS: BLOCKED round_cap`.
|
|
31
|
+
4. **PR state, shown before dispatch.** On a PR target read its state (merged, approved, CI) and tell the operator the risk that it merges before the round ends: a verdict ready at minute 55 and held to minute 119 lost the race to the merge. Depth and the estimate need the package and the slice manifest, so they come later: after `review scope`, `review start` and `review slice`, before the first reviewer starts ("Round plan" steps 5-6; `SKILL.detail.md` § "Preflight 4").
|
|
32
|
+
|
|
33
|
+
## Hosts — the same round, different tools
|
|
34
|
+
|
|
35
|
+
| | keryx shell | Claude Code | Codex, other AGENTS.md hosts | autonomous runner |
|
|
36
|
+
|---|---|---|---|---|
|
|
37
|
+
| Spawn | `spawn_subagent` | `Agent` (`subagent_type`) | its spawn tool; none → the runner (Preflight 1) | its own reviewers |
|
|
38
|
+
| Plan | `plan_set`, `plan_update` | its todo/task list | its plan tool (`update_plan`), else the checklist in your reply | none |
|
|
39
|
+
| Question | `ask_user` | `AskUserQuestion` | one question in your reply, then wait | none: defaults, unattended |
|
|
40
|
+
| Operator decision | the card tool | the exact terminal command, for the operator | the exact terminal command, for the operator | refused: recorded Not run |
|
|
41
|
+
| 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
|
+
| 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
|
+
- **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/<reviewer>.json`, and `research.json` from `keryx review ledger build --package <package>` — never by hand. `retry-plan --package`, `verdict` and `ledger build` read `<package>/raw` by default; the shared `.metaproject/data/review/raw` holds other rounds' replies and is read only when named, so never write there.
|
|
45
|
+
- **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`).
|
|
46
|
+
- **Caller token.** `keryx review start` prints `export KERYX_REVIEW_CALLER_TOKEN=…`; outside keryx shell export it on this session's keryx calls, or readiness item 10 reads "not observable on this host".
|
|
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`. Elsewhere give the operator the exact command to run in their own terminal — `keryx review confirm-plan --package <package>`, `keryx review complete <package> --waive <item> "<their words>"` or `--waive-coverage "<their words>"`, `keryx review waive-mutation --package <package> --reason "<why>"`, `keryx review override-reviewers --package <package> --reason "<why>"`, `keryx review chunks estimate --package <package> --answer yes --quote "<their words>"`, `keryx review publish <package>`, `keryx review comments reply … --final` — and wait. You never run `--mode automatic` or `--yes`, and never write an operator quote yourself; unattended, the item is Not run.
|
|
48
|
+
|
|
49
|
+
## Round plan — the order on every host
|
|
50
|
+
|
|
51
|
+
1. `keryx review scope --ref <base> --json > .metaproject/data/review/scope.json` (Step 3).
|
|
52
|
+
2. `keryx review start --target <kind> --ref <ref> --scope .metaproject/data/review/scope.json --memory-query "<query>" --host <host>`, plus `--unattended` when nobody is at the keyboard.
|
|
53
|
+
3. `keryx review blast-radius --ref <base> --package <package> --json > blast-radius.json` (Step 3b). Reasoned omissions (`unrelated-symbol`, `hub-damped`, `text-hub`, `test-consumer`) are context, not scope; only cap drops become chunks. Run the tests in `<package>/tests-to-run.json` with the command the radius prints, instead of reading them, and hand the output to the reviewers as context.
|
|
54
|
+
4. `keryx review slice --ref <base> --package <package> --host <host>`: each slice carries `roles`, `depth` (deep or light) and `audit`.
|
|
55
|
+
5. `keryx review required --mode all --scope .metaproject/data/review/scope.json --depth auto --package <package>`.
|
|
56
|
+
6. `keryx review estimate --package <package>`. Over threshold, the operator confirms (card `review_confirm_plan`, or `keryx review confirm-plan --package <package>` in their terminal); `dispatch-check` and `ledger build` refuse an unconfirmed plan, so never dispatch one. Unattended: report the estimate and stop with `STATUS: BLOCKED plan_over_threshold`.
|
|
57
|
+
7. Dispatch by slice roles: each role gets the slices that name it; a deep slice names every roster role its path gates allow, an `audit` one the whole core set. A major or worse on a light slice comes back from `retry-plan` as an escalation: dispatch the core roles on it.
|
|
58
|
+
8. 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.
|
|
59
|
+
9. `keryx review verdict <package>` to the operator, then the tail: mutation pass, `ledger build`, `ingest`, `readiness`, `complete`.
|
|
60
|
+
|
|
61
|
+
## Clean context — the round starts empty
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
- **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`.
|
|
65
|
+
- **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 `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 a terminal; unattended, record it as Not run. Detail: `SKILL.detail.md` § "Clean context".
|
|
66
|
+
- **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`; "Hosts") interactively; unattended, the whole output is `STATUS: BLOCKED question — <the question>`. Never answer from memory or a guess.
|
|
67
|
+
- **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.
|
|
31
68
|
|
|
32
69
|
## Workflow
|
|
33
70
|
|
|
@@ -38,26 +75,23 @@ Review Orchestrator Progress:
|
|
|
38
75
|
- [ ] 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; do it, tick it, move on)
|
|
39
76
|
- [ ] Step 2: Detect review mode (diff mode vs. path mode)
|
|
40
77
|
- [ ] Step 3: Build the bounded scope with `keryx review scope` — never by hand
|
|
41
|
-
- [ ] Step 3b: On a deep round, compute scope B with `keryx review blast-radius` — never by browsing — and KEEP the `--json` file; `review ingest --blast-radius <file>` is refused without it
|
|
78
|
+
- [ ] Step 3b: On a deep round, compute scope B with `keryx review blast-radius` — never by browsing — and KEEP the `--json` file; `review ingest --blast-radius <file>` is refused without it. When it says "Cut blast radius", the dropped files are not read yet: run the waves (`keryx review chunks plan`, `chunks estimate`, `chunks next`/`record`, `chunks merge`) — in an unattended run without asking, up to the 25-pass ceiling
|
|
42
79
|
- [ ] Step 4: Parse flags / auto-detect domain from scope
|
|
43
|
-
- [ ] Step 5: Start questions, once, after Steps 1 and 3 — reviewers (default `--all`), counterpart verification (default on), model plan; unattended — and an `auto` or `trust` shell session, which has no operator at the keyboard — takes the defaults (SKILL.detail.md § "Start questions"; legacy/profile reviewers stay flag-only)
|
|
80
|
+
- [ ] 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 (SKILL.detail.md § "Start questions"; legacy/profile reviewers stay flag-only)
|
|
44
81
|
- [ ] Step 5c: When `review.jev.select` is on, run `keryx review jev-select` over the finalized candidate set and drop its `skip` decisions from Wave A/B — see "Reviewer selection with Jev"
|
|
45
|
-
- [ ] Step 6: Plan sub-agent dispatch and token budgets; compute each dispatch's model with `keryx review tier` (6a: publish this plan)
|
|
82
|
+
- [ ] Step 6: Plan sub-agent dispatch and token budgets; compute each dispatch's model with `keryx review tier`; after `review scope`, `review start` and `review slice`, and before the first reviewer starts, run `keryx review required --mode all --scope .metaproject/data/review/scope.json --depth auto --package <package>` (auto needs the file list AND a line count, which `--scope` gives; without both the round is full) and `keryx review estimate --package <package>`, show the operator depth, estimate and merge risk, and get an over-threshold plan confirmed before any dispatch ("Round plan" 5-6; 6a: publish this plan)
|
|
46
83
|
- [ ] Step 7: Stage 1 gate - spec compliance check (if issue/task provided)
|
|
47
84
|
- [ ] Step 8: Dispatch selected reviewers in parallel with the reviewer-input schema — see "How to spawn"
|
|
48
85
|
- [ ] Step 9: Collect reviewer-finding schema results and handle NEEDS_CONTEXT
|
|
49
86
|
- [ ] Step 9b: `jev-triage` — advisory, annotate-only severity/duplicate/verify-order annotations over the consolidated findings (opt-in `review.jev.triage`)
|
|
50
|
-
- [ ] Step 10: Wave C — when blockers/majors exist, `--verify` is set, or the PR is high-risk, dispatch `review-verifier` over the
|
|
87
|
+
- [ ] 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
|
|
51
88
|
- [ ] Step 11: Sort by severity, deduplicate, emit unified report
|
|
52
89
|
- [ ] Step 12: Emit the machine-readable `keryx:findings` block alongside the report
|
|
53
90
|
- [ ] Step 13: Report the stage counts: dropped by pre-filter, refuted by the verifier, retained
|
|
54
|
-
- [ ] 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
|
|
91
|
+
- [ ] 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
|
|
55
92
|
```
|
|
56
93
|
|
|
57
|
-
Step 0 runs on **every** round. Step 14 runs **once**, after the last one. They are
|
|
58
|
-
two commands for that reason: a caller that already runs collection per round
|
|
59
|
-
would carry the posting along with it, and the reviewer would get six replies to
|
|
60
|
-
one comment.
|
|
94
|
+
Step 0 runs on **every** round. Step 14 runs **once**, after the last one. They are two commands for that reason: a caller that already runs collection per round would carry the posting along with it, and the reviewer would get six replies to one comment.
|
|
61
95
|
|
|
62
96
|
### Step 6 — the model is computed, not chosen
|
|
63
97
|
|
|
@@ -67,35 +101,37 @@ It names a model only if you gave it your session (`--session-provider`/`--sessi
|
|
|
67
101
|
|
|
68
102
|
### Step 6a — the plan bridge
|
|
69
103
|
|
|
70
|
-
Publish this checklist with `plan_set` under the ids `step-0`…`step-14` once, here, when scope and dispatch are fixed (
|
|
104
|
+
Publish this checklist with `plan_set` under the ids `step-0`…`step-14` once, here, when scope and dispatch are fixed (keryx shell already published it as `pending` at the start — update it with `plan_update` instead; another host uses its own plan tool, "Hosts"). Publish each of steps 0–5 that ran as `completed` and each that did not run as `skipped`; publish steps 6–14 as `pending` (`in_progress` for the one starting now). From then on move each item with `plan_update` as its step completes — see the `session-plan-bridge` rule. `completed` means the step's artifact exists: steps 8–10 become `completed` (in the plan and in the report) only after `keryx review ingest` has recorded their results, and a step whose reviewers were `BLOCKED` is `blocked`.
|
|
71
105
|
|
|
72
106
|
## How to spawn (Steps 8 and 10)
|
|
73
107
|
|
|
74
108
|
- One `Agent` call per reviewer, all calls of a wave in a single message, so the wave runs in parallel.
|
|
75
109
|
- 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`.
|
|
76
|
-
- Prompts carry pointers, not pasted files — the diff, the SHAs, the PR, the schema paths — and never paraphrase a contract.
|
|
110
|
+
- 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; it fails `REVIEWER_INPUT_PATH_MISSING` on a missing `skill_path` or `context_doc`.
|
|
77
111
|
- 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`.
|
|
78
112
|
- 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 `deep`; an omitted tier runs the child on your own model.
|
|
79
113
|
|
|
80
|
-
##
|
|
114
|
+
## Slices, waves and results — every host; keryx shell specifics marked
|
|
81
115
|
|
|
82
|
-
A reviewer
|
|
116
|
+
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. The text reaches the reviewer in slices small enough to finish.
|
|
83
117
|
|
|
84
|
-
0. **Publish the plan before anything else.** Your first tool call is `plan_set` with `step-0`…`step-14` 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.
|
|
85
|
-
1. **Slice first.** `keryx review slice --ref <base> --
|
|
86
|
-
2. **Slices travel by `context_files`.**
|
|
87
|
-
3. **Check before dispatch.** `keryx review dispatch-check --payload <file> --manifest <
|
|
88
|
-
4. **One batch.** Dispatch the whole wave — up to 10 reviewers — in one message, not one at a time. 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. **Incomplete means the next wave while it makes progress, Not run when it stalls.** Every reviewer result lists the `slices` it covered, in its `REVIEW_RESULT` object, as ids (`"slices": ["slice-01", "slice-02"]`); an object with an `id` and an optional `coverage` note (`{"id": "slice-01", "coverage": "read in full"}`) is read the same way. An object with a `status` counts only when it is DONE, COMPLETE, COVERED or OK (any case); a slice marked NOT_READ, INCOMPLETE, SKIPPED or PARTIAL is not covered, so give a slice you did not read no `status` of that kind and leave it out. An entry with no id counts for nothing. **One driver file per dispatch.** Write
|
|
118
|
+
0. **Publish the plan before anything else (keryx shell).** Your first tool call is `plan_set` with `step-0`…`step-14` 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.
|
|
119
|
+
1. **Slice first.** `keryx review slice --ref <base> --package <package> --host <host>` after `keryx review start`. It writes `<package>/slices/slice-NN.diff` files of at most 150000 bytes each and a `manifest.json` carrying a wave budget (`--wave-bytes`, never below the slice ceiling; default by `--host`: 60000 on keryx-shell, 150000 elsewhere): what ONE reviewer dispatch may total, so a role owning many slices is dispatched in slice waves that each fit the child deadline. 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.
|
|
120
|
+
2. **Slices travel by path; on keryx shell, only by `context_files`.** The slices sit under the project (`<package>/slices`). 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.
|
|
121
|
+
3. **Check before dispatch, every payload.** `keryx review dispatch-check --payload <file> --manifest <package>/slices/manifest.json --package <package>` for the wave; exit 1 means a payload names no slice, is over the wave ceiling (dispatch fewer slices, then the next wave), names a `skill_path` or `context_doc` that does not exist (`REVIEWER_INPUT_PATH_MISSING`), belongs to an unconfirmed over-threshold plan (`REVIEWER_INPUT_PLAN_UNCONFIRMED`), or breaks `reviewer-input.schema.json`. Fix it; do not dispatch around it.
|
|
122
|
+
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. **Incomplete means the next wave while it makes progress, Not run when it stalls.** Every reviewer result lists the `slices` it covered, in its `REVIEW_RESULT` object, as ids (`"slices": ["slice-01", "slice-02"]`); an object with an `id` and an optional `coverage` note (`{"id": "slice-01", "coverage": "read in full"}`) is read the same way. An object with a `status` counts only when it is DONE, COMPLETE, COVERED or OK (any case); a slice marked NOT_READ, INCOMPLETE, SKIPPED or PARTIAL is not covered, so give a slice you did not read no `status` of that kind and leave it out. An entry with no id counts for nothing. **One driver file per dispatch.** Write `<package>/drivers/<reviewer>.json` with `{"reviewer": "<name>", "slices": [<ids dispatched>], "result": "raw/<reviewer>.txt", "definition": "<path of the reviewer's SKILL.md>"}`: `ledger build` takes the reviewer's rule file from `definition` (a `skill_path` there, or inside a `payload` object, is read too) and the slices it was handed from `slices`. Only reviewer replies belong in `raw/`; a verification payload or a note filed there is reported as set aside and left in place, but it still costs a step. On `INCOMPLETE`, `BLOCKED` or `NEEDS_CONTEXT` (never accepted as a finished scope), and on a `DONE` that left slices open, `keryx review retry-plan --manifest <package>/slices/manifest.json --result <package>/raw/<reviewer>.txt --package <package>` decides and hands out the next wave of only the slices still uncovered (`--next-wave` plans one without a result). A result that covered a new slice spends no attempt; two results in a row with nothing new, or six failed rounds, print the `- **Not run:** …` line to paste into the report, and a result with nothing new first has its open slices cut in half. Dispatch each wave, save its reply, and run `retry-plan` again until it says `accepted`; after a crash or timeout run `keryx review retry-plan --manifest <package>/slices/manifest.json --package <package> --reviewer <id> --next-wave` first, which collects late results from `<package>/raw/` (per reviewer) and never re-hands a finished slice. Only the operator can accept a smaller set than that (`review_override_reviewers`, or `keryx review override-reviewers` in their terminal). 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. Either way `review complete` has raw evidence after the transcript is cut, and you parse that file, never the tool output. Build `research.json` with `keryx review ledger build --package <package>` — never by hand: it reads the saved results, `scope-files.json` and the retry state, marks a reviewer complete only when its result is finished and its payloads cover the scope, and prints each gap with the exact next command and the waves left (a `retry-plan --next-wave` call, or a `--dispositions` entry for a raw finding). Run `keryx review ingest --research <package>/research.json` once it prints READY (exit 0). A refused `review complete` names what is missing: fix that with a command and run it again; it is never `blocked`. `--head` wants a SHA (`git rev-parse HEAD`), not `HEAD`.
|
|
89
123
|
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. Run it as `keryx review scope --ref <base> --json > .metaproject/data/review/scope.json` 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`. Create `.metaproject/data/review/` first (`mkdir -p`) — a missing directory is a command to run, 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.
|
|
90
124
|
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).
|
|
91
|
-
7. **Measure before `review-layout`.** Run the browser measurements (Playwright/Storybook) yourself and pass them
|
|
125
|
+
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. A second `NEEDS_CONTEXT` from one role is Not run (`layout: no engine`), not another refill (`SKILL.detail.md`).
|
|
92
126
|
|
|
93
127
|
## Control
|
|
94
128
|
|
|
95
129
|
- **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).
|
|
96
|
-
- **Waves.** Split by diff domain (`core` = logic, security, architecture; `domain` = frontend, backend, conventions; `support` = style, tests), in that order; A/B/C below keep their dependency order. A full or `--all` round runs at most 10 reviewers per wave (`MAX_REVIEWERS_PER_WAVE_FULL`).
|
|
130
|
+
- **Waves.** Split by diff domain (`core` = logic, security, architecture; `domain` = frontend, backend, conventions; `support` = style, tests), in that order; A/B/C below keep their dependency order, except Wave C, which starts early and overlaps A and B (see Wave C). A full or `--all` round runs at most 10 reviewers per wave (`MAX_REVIEWERS_PER_WAVE_FULL`).
|
|
97
131
|
- **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.
|
|
98
|
-
- **
|
|
132
|
+
- **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>` (it reads `<package>/raw`; the shared `.metaproject/data/review/raw` only when passed as `--raw`, which mixes in other rounds) and give the operator the verdict then; refuted findings are excluded only once `verifications.json` exists. The mutation pass, ledger and `keryx review complete` continue as the tail, and every managed round finishes them. The verdict is interim: the round is not done until `complete` (`SKILL.detail.md` § "Early verdict").
|
|
133
|
+
- **Recovery.** After a timeout or crash: collect, validate, ingest, then dispatch only what is missing with `keryx review retry-plan --manifest <package>/slices/manifest.json --package <package> --reviewer <id> --next-wave` (it prints `collected late: N`). 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), not only the diff size (`SKILL.detail.md` § "Recovery").
|
|
134
|
+
- **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 `keryx review complete` has run. `completed` means `keryx review readiness` passed, or each failing item is waived by the operator: in keryx shell call `review_waive_readiness` (a card, never a terminal), then run `keryx review complete`; elsewhere the operator runs `keryx review complete <package> --waive <item> "<their words>"` in their terminal; unattended, record Not run; publishing to GitHub is held by the same checklist, and a not-ready package goes out only through `keryx review publish --partial` (in keryx shell: `review_publish` with `partial: true`).
|
|
99
135
|
|
|
100
136
|
---
|
|
101
137
|
|
|
@@ -610,12 +646,6 @@ Two rules, both load-bearing:
|
|
|
610
646
|
whose recorded scope does not intersect the changed files or modules are noise
|
|
611
647
|
that costs budget in every reviewer prompt.
|
|
612
648
|
|
|
613
|
-
Why this is required rather than advisory: `keryx flow init` already collects
|
|
614
|
-
memory automatically for an implementation flow, and the review pipeline
|
|
615
|
-
collected none for eleven rounds across flows 127 and 128. A recorded lesson
|
|
616
|
-
naming the exact failure those rounds kept repeating existed the whole time and
|
|
617
|
-
never reached a reviewer.
|
|
618
|
-
|
|
619
649
|
Context modes:
|
|
620
650
|
- `none`: no additional context collection; use only diff/path and local rules.
|
|
621
651
|
- `light`: default for PR review. Read existing `context_doc`, local `AGENTS.md`/`CLAUDE.md`, and matching rule files. Do not browse external docs.
|
|
@@ -623,7 +653,7 @@ Context modes:
|
|
|
623
653
|
|
|
624
654
|
High-risk triggers for `full` recommendation:
|
|
625
655
|
- 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.
|
|
626
|
-
- 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").
|
|
656
|
+
- More than 20 changed source files or more than 2,000 changed lines. Size never lowers depth below the risk class; outside it the light round is the default and `full` stays available (SKILL.detail.md § "Depth floor").
|
|
627
657
|
- Missing or ambiguous linked requirements.
|
|
628
658
|
|
|
629
659
|
If `full` context would be useful but was not explicitly requested, ask once:
|
|
@@ -643,25 +673,7 @@ Unattended: take A and record it in the review scope.
|
|
|
643
673
|
|
|
644
674
|
## Token and Context Budget Management
|
|
645
675
|
|
|
646
|
-
The orchestrator owns token budget.
|
|
647
|
-
|
|
648
|
-
Budget rules:
|
|
649
|
-
- Compute a scope digest before dispatch: file list, diff stats, module map, and top risks.
|
|
650
|
-
- Send full diffs only for files relevant to each reviewer.
|
|
651
|
-
- For large files, send changed hunks plus nearby symbols first; include full file only when path mode or the reviewer requires whole-file context.
|
|
652
|
-
- Never send generated files, lockfiles, snapshots, build output, or vendored code unless the reviewer is specifically about that file type.
|
|
653
|
-
- Cap each reviewer prompt with `per_reviewer` budget when provided; otherwise use the smallest prompt that preserves evidence.
|
|
654
|
-
- Record omitted files and truncation in `review_context.token_policy.omissions`.
|
|
655
|
-
- If a reviewer returns `NEEDS_CONTEXT`, provide only the missing targeted context, not the entire repository.
|
|
656
|
-
|
|
657
|
-
Default budget guidance:
|
|
658
|
-
|
|
659
|
-
| Review size | Detection | Context mode | Dispatch style |
|
|
660
|
-
|---|---|---|---|
|
|
661
|
-
| small | <= 5 files and <= 300 changed lines | `light` | full relevant diff to selected reviewers |
|
|
662
|
-
| medium | <= 20 files or <= 2,000 changed lines | `light` | per-domain filtered diff |
|
|
663
|
-
| large | > 20 files or > 2,000 changed lines | ask `full` | staged waves by domain |
|
|
664
|
-
| high-risk | auth/API/core/security/data migrations | ask `full` | staged waves, verifier included |
|
|
676
|
+
The orchestrator owns the token budget: each reviewer gets only the context its domain needs (its slices), never generated files, lockfiles, snapshots, build output or vendored code unless it reviews that file type; omitted files and truncation go in `review_context.token_policy.omissions`, and a `NEEDS_CONTEXT` gets only the missing targeted context. The budget rules and the size table: `SKILL.detail.md` § "Token and context budget".
|
|
665
677
|
|
|
666
678
|
---
|
|
667
679
|
|
|
@@ -817,7 +829,7 @@ keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --previous blas
|
|
|
817
829
|
```
|
|
818
830
|
|
|
819
831
|
`PKG` is the review package, created by `keryx review start` before dispatch; `--package` makes scope B read the graph built at the PR head. Give each reviewer `keryx review layers block --package "${PKG}" --files <its slice files> --json` as the payload's `layers` field.
|
|
820
|
-
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;
|
|
832
|
+
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 is the operator's alone, never yours: in keryx shell call `review_waive_coverage` (a card, never a terminal), then run `keryx review complete`; elsewhere the operator runs `keryx review complete <package> --waive-coverage "<their words>"`; unattended, record Not run. The chunk-run question (`estimate`) is answered the same way: `review_chunks_answer`, or the operator's `keryx review chunks estimate --package "${PKG}" --answer yes --quote "<their words>"`. 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.
|
|
821
833
|
The measurements, the rule table and the recompute table: `SKILL.detail.md` § "Scope B — bounds, rejections and recompute".
|
|
822
834
|
|
|
823
835
|
### Path Mode
|
|
@@ -975,10 +987,10 @@ author's routing note, not a restriction.
|
|
|
975
987
|
### Start questions (Step 5)
|
|
976
988
|
|
|
977
989
|
Ask once, after the context pack (Step 1) and the scope (Step 3), in one interaction — one
|
|
978
|
-
`AskUserQuestion` call on Claude Code, the lettered prompt in SKILL.detail.md elsewhere:
|
|
990
|
+
`AskUserQuestion` call on Claude Code, one `ask_user` in keryx shell, the lettered prompt in SKILL.detail.md elsewhere:
|
|
979
991
|
|
|
980
|
-
1. **Reviewers** — default `--all
|
|
981
|
-
(tests only, one domain, custom) is the operator's explicit choice. Passed flags answer it.
|
|
992
|
+
1. **Reviewers** — default the set `keryx review required --depth auto` prints (light or full); `--all` only when the operator asks; detected convention reviewers are included. Narrowing
|
|
993
|
+
(tests only, one domain, custom) is the operator's explicit choice, recorded by them ("Hosts": reviewer override). Passed flags answer it.
|
|
982
994
|
Legacy/profile reviewers stay flag-only and are never prompted.
|
|
983
995
|
2. **Counterpart** — show what the context pack found for the other side of the contract
|
|
984
996
|
(endpoints, mirrored rules, a paired PR, or "no link found") and a checkbox to verify it,
|
|
@@ -987,13 +999,13 @@ Ask once, after the context pack (Step 1) and the scope (Step 3), in one interac
|
|
|
987
999
|
3. **Models** — complexity, the per-role tier from `keryx review tier`, the model each tier
|
|
988
1000
|
resolves to on this host; accept (default), all `deep`, or custom. Once per round.
|
|
989
1001
|
|
|
990
|
-
Unattended rounds ask nothing:
|
|
1002
|
+
Unattended rounds ask nothing: the `required --depth auto` set, counterpart verified, computed models — recorded in
|
|
991
1003
|
`### How this review was run`. In a `job-orchestrator` pipeline the job setting
|
|
992
1004
|
`convention_reviewers` still answers question 1 (unresolved: include all detected reviewers
|
|
993
1005
|
and record that choice in the review scope).
|
|
994
1006
|
|
|
995
|
-
A gating round runs what these answers selected; a host
|
|
996
|
-
returns `STATUS: BLOCKED` (`nested_dispatch_unavailable`) instead of reviewing alone (Preflight 1). Every
|
|
1007
|
+
A gating round runs what these answers selected; a host with no spawn tool runs `keryx review run --autonomous`, and a
|
|
1008
|
+
nested session at the depth limit returns `STATUS: BLOCKED` (`nested_dispatch_unavailable`), instead of reviewing alone (Preflight 1). Every
|
|
997
1009
|
round also carries the always-on obligations — SKILL.detail.md § "Depth floor",
|
|
998
1010
|
§ "Counterpart verification", § "Round obligations".
|
|
999
1011
|
|
|
@@ -1005,7 +1017,7 @@ When `review.jev.select` is on, before Wave A/B dispatch: run `keryx review jev-
|
|
|
1005
1017
|
|
|
1006
1018
|
## Legacy/Profile Reviewer Auto-Detection
|
|
1007
1019
|
|
|
1008
|
-
Legacy/profile reviewers are specialized review profiles that predate the review-domain `review-*` naming. They are still valid and must be shown separately from generic and convention reviewers so the user can opt in deliberately. **They are present only when installed:** `code-ai-review`, `code-learned-review`, `code-style-review` and `code-mobx-store-review` are in the `full` profile only, so in any other profile the flags below (`--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--legacy-profiles`) name reviewers that may not exist. When the inventory's `bundledSource` is `"project"`, a legacy reviewer missing from the `bundled` half of `keryx review reviewers --json` is absent (when it is `"package"` the half is the keryx package's own list and says nothing about this project — decide as `SKILL.detail.md`, "Skills present only when installed", describes): leave it out of the `Optional legacy/profile reviewers` preview, and when a flag asked for it, do not dispatch a substitute — record it in `Skipped reviewers` with reason `not-installed` and the command that adds it (`keryx skills install --profile full`, or the narrower manifest form in `SKILL.detail.md`, "Skills present only when installed"). `--legacy-profiles`
|
|
1020
|
+
Legacy/profile reviewers are specialized review profiles that predate the review-domain `review-*` naming. They are still valid and must be shown separately from generic and convention reviewers so the user can opt in deliberately. **They are present only when installed:** `code-ai-review`, `code-learned-review`, `code-style-review` and `code-mobx-store-review` are in the `full` profile only, so in any other profile the flags below (`--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--legacy-profiles`) name reviewers that may not exist. When the inventory's `bundledSource` is `"project"`, a legacy reviewer missing from the `bundled` half of `keryx review reviewers --json` is absent (when it is `"package"` the half is the keryx package's own list and says nothing about this project — decide as `SKILL.detail.md`, "Skills present only when installed", describes): leave it out of the `Optional legacy/profile reviewers` preview, and when a flag asked for it, do not dispatch a substitute — record it in `Skipped reviewers` with reason `not-installed` and the command that adds it (`keryx skills install --profile full`, or the narrower manifest form in `SKILL.detail.md`, "Skills present only when installed"). `--legacy-profiles` dispatches the legacy reviewers that are installed and skips the rest the same way; `--all` never selects them.
|
|
1009
1021
|
|
|
1010
1022
|
| Trigger | Reviewers appended |
|
|
1011
1023
|
|---|---|
|
|
@@ -1026,21 +1038,7 @@ of the flags in the Trigger table above, or when `job-orchestrator` provides `re
|
|
|
1026
1038
|
auto-suggestion (MobX/store files present) is informational only — list it in the Review Plan
|
|
1027
1039
|
Preview below, but do not dispatch it and do not ask about it without an explicit flag.
|
|
1028
1040
|
|
|
1029
|
-
Review Plan Preview must include an `Optional legacy/profile reviewers` group and a `Skipped reviewers` group with
|
|
1030
|
-
|
|
1031
|
-
```text
|
|
1032
|
-
Optional legacy/profile reviewers:
|
|
1033
|
-
- code-ai-review: available via --code-ai or --legacy-profiles
|
|
1034
|
-
- code-learned-review: available via --learned or --legacy-profiles
|
|
1035
|
-
- code-style-review: available via --code-style or --legacy-profiles
|
|
1036
|
-
- code-mobx-store-review: auto-suggest when *.store.ts or MobX patterns are present; available via --mobx-store or --legacy-profiles
|
|
1037
|
-
|
|
1038
|
-
Skipped reviewers:
|
|
1039
|
-
- code-ai-review: profile reviewer, not selected unless --code-ai/--legacy-profiles
|
|
1040
|
-
- code-learned-review: profile reviewer, not selected unless --learned/--legacy-profiles
|
|
1041
|
-
- code-style-review: legacy style profile, not selected unless --code-style/--legacy-profiles
|
|
1042
|
-
- code-mobx-store-review: not selected unless --mobx-store/--legacy-profiles or MobX store files are detected
|
|
1043
|
-
```
|
|
1041
|
+
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".
|
|
1044
1042
|
|
|
1045
1043
|
## Routing Table
|
|
1046
1044
|
|
|
@@ -1061,8 +1059,8 @@ Skipped reviewers:
|
|
|
1061
1059
|
| `--flow-graph` | `review-flow-graph` |
|
|
1062
1060
|
| `--layout` | `review-layout` |
|
|
1063
1061
|
| `--pr-contract` | `review-pr-contract` |
|
|
1064
|
-
| `--all` | all reviewers above (including `review-clean-code`, `review-highload`,
|
|
1065
|
-
| `--verify` | `review-verifier`,
|
|
1062
|
+
| `--all` | all reviewers above (including `review-clean-code`, `review-highload`, and project convention reviewers when local convention docs exist); never the legacy/profile reviewers, which stay flag-only |
|
|
1063
|
+
| `--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. |
|
|
1066
1064
|
| (auto) | detected from diff file extensions — see Auto-detection table |
|
|
1067
1065
|
|
|
1068
1066
|
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.
|
|
@@ -1108,14 +1106,13 @@ whoever reads the merge commit a year later reads the body. When `review.jev.con
|
|
|
1108
1106
|
|
|
1109
1107
|
**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.
|
|
1110
1108
|
|
|
1111
|
-
**The reviewer set is not yours to shrink.** Run `keryx review required --mode all|diff --scope <scope.json>` (`all` for a pull request, for `--all` and for no narrowing flag; `diff` only when the operator named a narrower mode — pass their words as `--operator-quote` and record them as `dispatch.operatorQuote`, without which the dispatch is refused), dispatch every reviewer it prints, and declare `mode` in `dispatch`; pass the same `--scope` to `keryx review start|ingest` so the package keeps the file list. Closure refuses a smaller set unless `dispatch.override = { operatorQuote, reason }` carries the operator's own words. New managed packages declare `reviewerDispatch: "research.json"`. Alongside the research ledger, provide `dispatch: { version: 1, mode: "all"|"diff", selected: [...], unresolvedRules: [], runs: [...] }`. Preserve the actual computed reviewer inventory. Each run has `reviewer`, unique `executionId`, `status: "complete"`, `scopeComplete: true`, `rawEvidence`, nonempty `ruleEvidence`, and boolean `executionRequired`. Required execution needs nonempty `executionEvidence` (command/output references); a source-only scope requires `executionReason`. Do not fabricate IDs or mark truncated responses complete. Runtime validates these declarations at closure and the flow gate, not their truth: independently audit evidence and inventory before freezing. Legacy artifact absence is compatibility, not proof of a correct launch. Research closure is mandatory: see [Runtime research-completion ledger](SKILL.detail.md#runtime-research-completion-ledger).
|
|
1109
|
+
**The reviewer set is not yours to shrink.** Run `keryx review required --mode all|diff --scope <scope.json>` (`all` for a pull request, for `--all` and for no narrowing flag; `diff` only when the operator named a narrower mode — pass their words as `--operator-quote` and record them as `dispatch.operatorQuote`, without which the dispatch is refused; on a package `keryx review start` created, closure takes that quote only once the operator recorded the decision themselves — card `review_override_reviewers`, or `keryx review override-reviewers --package <package> --reason "<why>"` in their terminal), dispatch every reviewer it prints (`--depth auto` is the default and the only way to a light round: it needs the file list and a line count, `--scope` gives both; `--all`, gating and `--depth full` force full; see `SKILL.detail.md` § "Depth floor"), and declare `mode` in `dispatch`; pass the same `--scope` to `keryx review start|ingest` so the package keeps the file list. Closure refuses a smaller set unless `dispatch.override = { operatorQuote, reason }` carries the operator's own words and that same operator record exists. New managed packages declare `reviewerDispatch: "research.json"`. Alongside the research ledger, provide `dispatch: { version: 1, mode: "all"|"diff", selected: [...], unresolvedRules: [], runs: [...] }`. Preserve the actual computed reviewer inventory. Each run has `reviewer`, unique `executionId`, `status: "complete"`, `scopeComplete: true`, `rawEvidence`, nonempty `ruleEvidence`, and boolean `executionRequired`. Required execution needs nonempty `executionEvidence` (command/output references); a source-only scope requires `executionReason`. Do not fabricate IDs or mark truncated responses complete. Runtime validates these declarations at closure and the flow gate, not their truth: independently audit evidence and inventory before freezing. Legacy artifact absence is compatibility, not proof of a correct launch. Research closure is mandatory: see [Runtime research-completion ledger](SKILL.detail.md#runtime-research-completion-ledger).
|
|
1112
1110
|
|
|
1113
|
-
Dispatch selected reviewers in parallel when independent — this engine dispatches them itself (see "How to spawn"); a host without a dispatch tool returns `STATUS: BLOCKED` (`nested_dispatch_unavailable`) and
|
|
1111
|
+
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:
|
|
1114
1112
|
|
|
1115
1113
|
1. Wave A - core correctness/risk reviewers: logic, architecture, security/highload when selected.
|
|
1116
1114
|
2. Wave B - domain reviewers: frontend/backend/testing/convention reviewers filtered to relevant files. `review-jev-rules` (flow 330), `review-jev-risk`/`review-jev-scenarios` (flow 332), `review-jev-docs`/`review-jev-comments` (flow 333), `review-jev-contract` (flow 335) also run here, CLI-engine not sub-agent, `"engine": "jev"` in `keryx review reviewers --json`, gated on their own opt-in and a resolvable Jev/OpenRouter credential — measured verdicts per reviewer (keep off by default, experimental, etc.) in `SKILL.detail.md` § "CLI-engine reviewers".
|
|
1117
|
-
3. Wave C - **verification**: `review-verifier` over the
|
|
1118
|
-
exist, `--verify` is set, or the PR is high-risk. See below.
|
|
1115
|
+
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. Exception to the A, B, C order: Wave C overlaps A and B and gets the findings held when each pass starts; Step 9b's `verify_order` applies to the later passes; each verifier pass is its own run. See below.
|
|
1119
1116
|
|
|
1120
1117
|
**Execution belongs to both B and C, and they execute for opposite reasons.** Wave C runs a command to *decide the fate of a finding that exists*; it is delete-only and can produce nothing. 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 in a real engine.
|
|
1121
1118
|
|
|
@@ -1125,7 +1122,7 @@ finding class is unreachable for the entire round, and no amount of verification
|
|
|
1125
1122
|
downstream recovers it. When a testing reviewer returns without a mutation table,
|
|
1126
1123
|
treat it the way you would treat a reviewer that returned without findings *and*
|
|
1127
1124
|
without evidence: ask once, then record that the pass did not run. Unattended: record
|
|
1128
|
-
`Not run: mutation pass` without asking. Attended: run `keryx review mutate` ([The mutation pass](SKILL.detail.md#the-mutation-pass-keryx-review-mutate)).
|
|
1125
|
+
`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 `keryx review waive-mutation` in their terminal).
|
|
1129
1126
|
|
|
1130
1127
|
### Wave C — verification, and what it replaced
|
|
1131
1128
|
|
|
@@ -1151,7 +1148,7 @@ would be claim order.
|
|
|
1151
1148
|
|
|
1152
1149
|
Dispatch rules:
|
|
1153
1150
|
|
|
1154
|
-
- Pass the consolidated
|
|
1151
|
+
- Pass the findings held when this pass starts (the whole consolidated set on the last pass), each carrying `global_id` and the **real**
|
|
1155
1152
|
originating `reviewer`. A finding whose `reviewer` is the orchestrator cannot be
|
|
1156
1153
|
routed away from its author, so the never-self-verify rule silently stops
|
|
1157
1154
|
applying — that field was hardcoded to `review-orchestrator` on all 83 recorded
|
|
@@ -1164,6 +1161,7 @@ Dispatch rules:
|
|
|
1164
1161
|
all the same actor. Do not try to route around it by respelling the name — the
|
|
1165
1162
|
comparison deliberately over-matches, because a refused claim only ever costs a
|
|
1166
1163
|
verdict while a missed self-verification costs the finding.
|
|
1164
|
+
- Start it on the first blocker or major and re-run it for later ones; it stays delete-only.
|
|
1167
1165
|
- The verifier returns `verification-claim.schema.json`. Merge it with
|
|
1168
1166
|
`keryx review ingest --verifications <file>`; do not apply verdicts by hand.
|
|
1169
1167
|
- **The verifier can only delete.** If it returns a severity, a new finding, or a
|
|
@@ -1192,7 +1190,7 @@ Before dispatching a reviewer through a platform-native sub-agent mechanism, ver
|
|
|
1192
1190
|
|
|
1193
1191
|
Runtime rules:
|
|
1194
1192
|
- If the exact reviewer agent type exists, dispatch that reviewer directly.
|
|
1195
|
-
- If the exact reviewer agent type does not exist but
|
|
1193
|
+
- 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 (the project-reviewer rule below).
|
|
1196
1194
|
- 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.
|
|
1197
1195
|
- **A project reviewer is dispatched by its package, on every branch above.** For each entry in the `project` half of `keryx review reviewers --json`, 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. A runtime may ship an agent type called exactly what the project called its reviewer, carrying an older or unrelated prompt; without the path the round runs that prompt and reports it under the project reviewer's 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 which file to read: "where your text names `<ref>`, read `<resolved>` instead" (the absolute path of `resolved`). The project keeps its own version of that rule beside the one keryx ships under the same name, the reviewer's text still spells the shipped path, and nothing but this sentence in the dispatch makes it read the project's — see `SKILL.detail.md`, "Dispatching a project reviewer".
|
|
1198
1196
|
- Record the chosen runtime per reviewer in `review_context.review_plan.dispatch_plan`.
|
|
@@ -1328,6 +1326,9 @@ someone who did not write it — and has not read the code — reaches the same
|
|
|
1328
1326
|
answer: look for the trigger and the outcome. Present → `major`. Absent, but a
|
|
1329
1327
|
concrete maintenance cost is named → `minor`. Neither → `info`.
|
|
1330
1328
|
|
|
1329
|
+
A surviving mutant shows a missing assertion, not wrong behaviour: a test gap in code the
|
|
1330
|
+
suite exercises is `minor`; `severity-audit` raises it only when no mutant in that file was killed.
|
|
1331
|
+
|
|
1331
1332
|
Two consequences, both previously decided differently in different files:
|
|
1332
1333
|
|
|
1333
1334
|
- A finding that **claims** runtime harm and cannot name the trigger is `info`,
|
|
@@ -1339,11 +1340,8 @@ Two consequences, both previously decided differently in different files:
|
|
|
1339
1340
|
that puts a style reviewer's unproven concern there.
|
|
1340
1341
|
- **And never of how crisply the finding is worded.** An outcome that costs a
|
|
1341
1342
|
user, a caller or persisted state nothing is `minor` however precisely its
|
|
1342
|
-
trigger is named
|
|
1343
|
-
|
|
1344
|
-
while a real defect stated tersely reads as `info`. That is not academic — the
|
|
1345
|
-
findings cap truncates by severity, so the well-written typo would survive and
|
|
1346
|
-
the terse real defect would be cut.
|
|
1343
|
+
trigger is named; otherwise a cosmetic nit stated as "trigger X produces output Y"
|
|
1344
|
+
reads as `major` and survives the findings cap while a terse real defect is cut.
|
|
1347
1345
|
|
|
1348
1346
|
The boundary this rubric does **not** draw is `major` against `major`. Two
|
|
1349
1347
|
findings that both name a trigger and an outcome are the same severity even when
|
|
@@ -1570,7 +1568,7 @@ Default is do not publish. No resolvable PR number means skip and say so.
|
|
|
1570
1568
|
|
|
1571
1569
|
The review body is the report rendered from `templates/review-report.md`, English, with the domain file chosen above (`templates/pr-comment-frontend.md` / `templates/pr-comment-backend.md`) — never a summary written freehand. It does not use a tool heading, a finding table, or a meta table. It does not carry a co-author line, a `Generated with` trailer, or any sentence that names a vendor or a product as the author. Name the workflow and reviewers that actually ran, with models, tools, skills and subagents. Never identify the operator from `gh auth status`, git config or a credential; do not sign the review as a person, reviewer or model. A project overlay adds content only through the template's overlay slots.
|
|
1572
1570
|
|
|
1573
|
-
The follow-up file path and the metadata rules (real model names, Run vs Not run, no `adaptive` in the model slot) live in that same template.
|
|
1571
|
+
The follow-up file path and the metadata rules (real model names, Run vs Not run, no `adaptive` in the model slot) live in that same template. The body goes out as one formal review whose state follows *Where it is posted* in the template, through the one keryx path to GitHub, held by the readiness checklist: `keryx review publish <package> --event COMMENT|REQUEST_CHANGES|APPROVE` (`--partial` when the package is not ready; `--event COMMENT` on a merged or closed PR). Publishing is the operator's decision: the `review_publish` card in keryx shell, elsewhere they run it in their terminal, where it shows the body first. You never pass `--yes`, and never post around it with `gh pr review` or `gh pr comment`.
|
|
1574
1572
|
|
|
1575
1573
|
**No GitHub write without an approved draft.** Before ANY write — the comment, a thread reply, `keryx review comments reply`, a review — show the user the rendered body and wait for explicit approval of that body.
|
|
1576
1574
|
Picking A or B above chooses *whether* to publish, not *what*; a comment is public and cannot be unsent. With no user to answer (a dispatched run), do not write: hand the rendered body back to the caller.
|
|
@@ -1588,10 +1586,9 @@ When a prompt carries `JOB_NAME` and `CONTEXT_PATH`, read that context document
|
|
|
1588
1586
|
|
|
1589
1587
|
| Rationalization | Why it is wrong |
|
|
1590
1588
|
|----------------|-----------------|
|
|
1591
|
-
| "I'll
|
|
1589
|
+
| "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 |
|
|
1592
1590
|
| "Spec compliance can wait until after quality review" | Stage 1 gate exists because unimplemented requirements invalidate quality work |
|
|
1593
1591
|
| "I'll deduplicate findings manually in my head" | Always normalize to [F-NNN] format before consolidation to avoid losing findings |
|
|
1594
|
-
| "Minor findings from one reviewer cancel out the major from another" | Each finding stands independently; severity is per-finding, not averaged |
|
|
1595
1592
|
| "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 |
|
|
1596
1593
|
| "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 |
|
|
1597
1594
|
| "It will definitely break something eventually, so blocker" | Name the trigger and the outcome. Named → `major`. Unnamed → `info`. "Eventually" is neither |
|
|
@@ -1609,7 +1606,10 @@ When a prompt carries `JOB_NAME` and `CONTEXT_PATH`, read that context document
|
|
|
1609
1606
|
| "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 |
|
|
1610
1607
|
| "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 |
|
|
1611
1608
|
| "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 |
|
|
1612
|
-
| "I cannot spawn reviewers, so I will review it myself" | A review nobody dispatched is not the review the report names.
|
|
1613
|
-
| "
|
|
1609
|
+
| "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 |
|
|
1610
|
+
| "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` |
|
|
1611
|
+
| "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) |
|
|
1612
|
+
| "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 |
|
|
1613
|
+
| "The operator is busy, I'll pass `--yes` / `--mode automatic` / write the quote" | An operator decision is their card or their terminal ("Hosts"); a quote you typed is not theirs |
|
|
1614
1614
|
| "User named a module so I'll use diff mode" | Named module/component/store → path mode; diff mode is only for branch changes |
|
|
1615
1615
|
| "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 |
|
|
@@ -21,7 +21,7 @@ license: "MIT"
|
|
|
21
21
|
|
|
22
22
|
## Purpose
|
|
23
23
|
|
|
24
|
-
Finds real, code-level performance problems introduced in the changed code of the current branch. Covers N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls.
|
|
24
|
+
Finds real, code-level performance problems introduced in the changed code of the current branch. Covers N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
25
25
|
|
|
26
26
|
This skill focuses on **measurable or high-likelihood bottlenecks** only. Premature optimization, hypothetical slowness, and style preferences are out of scope.
|
|
27
27
|
|
|
@@ -27,7 +27,7 @@ license: "MIT"
|
|
|
27
27
|
|
|
28
28
|
# Review — PR Contract
|
|
29
29
|
|
|
30
|
-
Reviewer for what the pull request says about itself.
|
|
30
|
+
Reviewer for what the pull request says about itself. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
31
31
|
|
|
32
32
|
This lane exists because nobody else reads the PR body. `review-logic` reads the code,
|
|
33
33
|
`review-testing-practices` reads the tests, and a retrospective review of a merged
|
|
@@ -31,7 +31,7 @@ license: "MIT"
|
|
|
31
31
|
Analyzes GitHub PR review comments from human reviewers or bots, checks each one
|
|
32
32
|
against the code as it stands, and turns the surviving ones into an ordered fix
|
|
33
33
|
plan. This skill does **not** review code itself — it interprets what others said,
|
|
34
|
-
and it verifies whether what they said is still true.
|
|
34
|
+
and it verifies whether what they said is still true. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
35
35
|
|
|
36
36
|
With `--fix` it also **executes** that plan: the work runs as a managed flow, on a
|
|
37
37
|
branch cut from the reviewed PR's own branch, behind its own draft PR, through a
|
|
@@ -22,7 +22,7 @@ license: "MIT"
|
|
|
22
22
|
# Review: Regression
|
|
23
23
|
|
|
24
24
|
You are reviewing **scope B** of a deep round. The files you are given are not
|
|
25
|
-
under review. They are under **regression check**.
|
|
25
|
+
under review. They are under **regression check**. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
26
26
|
|
|
27
27
|
## The one question
|
|
28
28
|
|
|
@@ -23,7 +23,7 @@ license: "MIT"
|
|
|
23
23
|
|
|
24
24
|
## Purpose
|
|
25
25
|
|
|
26
|
-
Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes.
|
|
26
|
+
Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
27
27
|
|
|
28
28
|
This skill covers **code-level security only**. It does NOT audit npm/bun dependency trees, Docker configurations, or deployment surfaces — use `security-audit` for those.
|
|
29
29
|
|
|
@@ -25,7 +25,7 @@ license: "MIT"
|
|
|
25
25
|
|
|
26
26
|
Focused style reviewer. Covers naming conventions, dead code, readability, DRY violations,
|
|
27
27
|
import organization, comment quality, file length, cyclomatic complexity, and console noise.
|
|
28
|
-
Never touches logic correctness, architecture, security, or performance.
|
|
28
|
+
Never touches logic correctness, architecture, security, or performance. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -29,7 +29,7 @@ license: "MIT"
|
|
|
29
29
|
# Review — Testing Practices
|
|
30
30
|
|
|
31
31
|
Reviewer for local testing discipline. Read project test guides first when present, then apply
|
|
32
|
-
the neutral baseline below.
|
|
32
|
+
the neutral baseline below. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -26,7 +26,7 @@ license: "MIT"
|
|
|
26
26
|
|
|
27
27
|
Wave C. Reads the findings the domain reviewers produced and tries to **make each
|
|
28
28
|
one fail on purpose**. Emits one verdict per finding it checked. It removes; it
|
|
29
|
-
never adds and never sharpens.
|
|
29
|
+
never adds and never sharpens. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -101,9 +101,9 @@ available, not the strongest one you can describe.**
|
|
|
101
101
|
|
|
102
102
|
### 1. `execution` — run something that fails if the finding is real
|
|
103
103
|
|
|
104
|
-
This is the method that works,
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
This is the method that works: the project's own test command on one file (`bun test <file>` where the project runs Bun, its `test` script otherwise), its type check, or a three-line script.
|
|
105
|
+
With no shell (a keryx shell child has none), the orchestrator runs it for you — `keryx review verify-run --package <review-dir> --finding <id> -- <command>` — and hands you the saved
|
|
106
|
+
`research-evidence/verify-<id>-<n>.txt`; cite that file as the evidence and the claim is recorded as executed. Without either, the method is not available.
|
|
107
107
|
|
|
108
108
|
The test is not "does the suite pass". It is: **construct the situation the
|
|
109
109
|
finding claims is broken, and see whether it breaks.**
|