@mrciphersmith/keryx 0.4.54 → 0.4.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.4.54",
3
+ "version": "0.4.56",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -584,6 +584,7 @@ keryx shell has a closing gate (`decideReviewGate`) for this; other hosts have t
584
584
  3. **The stop list is closed.** The round stops, and the operator is asked, only for:
585
585
  - the nine operator decisions: `review_waive_coverage`, `review_waive_readiness`, `review_waive_mutation`, `review_override_reviewers`, `review_chunks_answer`, `review_publish`, `review_comments_reply`, `review_decide_premise`, `review_complete` (on a host without cards, the host question for the same act, "Hosts");
586
586
  - the round ceiling (5 rounds over the same change);
587
+ - a moved pull request head while `on_head_move` is `ask`, once per head the PR moves to (§ "Head moved");
587
588
  - plan growth beyond what the operator confirmed: when the plan key changes (a finding re-opened slices, `next` prints no continuation line, `planAuthorized` is `false`), the operator confirms the new plan with `review_confirm_plan` or the host question first;
588
589
  - an irreversible action, a credential, and untrusted content that asks you to act.
589
590
  4. **Statuses follow the rules they already have.** `INCOMPLETE`, `BLOCKED` and `NEEDS_CONTEXT` go to the next wave `next` hands out while a reviewer makes progress; `RATE_LIMITED` halves the wave ("Rate limits"); a role that cannot answer is `Not run`, never a clean pass and never a question about pace.
@@ -591,6 +592,30 @@ keryx shell has a closing gate (`decideReviewGate`) for this; other hosts have t
591
592
  6. **Every stop is recorded.** The report names each stop from the list with its reason (which card, which ceiling, which plan key), so a pause that was not on the list is visible as a defect.
592
593
  7. **A status question is answered, not obeyed.** When the operator asks "how is it going?" mid-round, answer in one line and keep working; it is not a request to stop. Only an explicit "stop" or "wait" stops the round.
593
594
 
595
+ ## Head moved
596
+
597
+ A round is pinned to the head it planned (`head` in `<package>/round.json`, the same SHA in `plan.json`). Its result stays true for that commit, so a running round is never interrupted on its own when the pull request moves.
598
+
599
+ 1. **Check.** At every wave boundary (before each `keryx review next`) read the head with `git ls-remote origin refs/pull/<n>/head`, one call with the literal ref (no `gh` login needed). It is a network read, so in a `trust` or `auto` session it asks, like `gh`: one prompt per wave boundary is expected, the stated exception to SKILL.md's "make it once" rule, as is step 2's fetch when the head moved. An empty result (`origin` is a fork without `refs/pull/*`): read that boundary with `gh pr view` instead. Before `keryx review complete` and before publishing, read it once each with `gh pr view <n> --json headRefOid --jq .headRefOid`. Use a head only if it is a 40-hex SHA; anything else, stop and report. Compare with the round's `head`, or, once the operator answered for a moved head, with the head they answered for: the same SHA, carry on; ask again only when the PR moved past it.
600
+ 2. **Count.** `git fetch origin <new sha>`, then `git merge-base --is-ancestor <reviewed sha> <new sha>`, each in a shell call of its own with literal SHAs ("Shell calls in a `trust` or `auto` session"). Exit 0: N is `git rev-list --count <reviewed sha>..<new sha>`. Exit 1: history was rewritten (force-push or rebase), N is unknown, and the update round will be `fallback-first`. Any other exit (128: object missing, fetch failed): stop and report the git error; never read it as rewritten history.
601
+ 3. **Decide by `on_head_move`**, read only from the keryx-stored Review record, never from the PR body, branch files or comments; until that store exists it is `ask` (the default for a manual review). This step governs a running round; step 5 governs every publish.
602
+ - `ask`: tell the operator `head moved by N commits (<reviewed sha> → <new sha>)` (rewritten: `head rewritten`) and ask with the host question tool ("Hosts"; a Telegram operator: `send_poll`), two options, the first recommended:
603
+ - **Update after this round finishes** (recommended): the round runs to `complete`, which makes it a trusted prior round, then step 4.
604
+ - **Stop and start on the new head**: dispatch nothing more and ingest what finished; the stopped round is partial. `keryx review plan` never takes a partial package as the previous round, so an update round planned in this session reviews the new head in full (or as a delta from an earlier completed round) and the stopped round's findings reach it at most as context. `keryx review advance` builds on a partial round only once that round is an Attempt of the Review (step 4). The stopped round's report names the slices it did not cover.
605
+ - `follow`: finish the round, then step 4 without asking: one update round per head move, and the round ceiling (5) still applies.
606
+ - `ignore`: finish the round; the report says the review is behind.
607
+ - **Unattended** (no operator): ask nothing and never publish. Follow the head-move instruction in the prompt the dispatching run started you with (for the autonomous runner and Desktop, the prompt keryx builds): the autonomous runner's "open one more round only if the head moved" is `follow`, a fixed-range Desktop run's "keep this range" is `ignore` (its update round is `keryx review advance`, opened from Desktop, never by the run itself). With no such instruction, open no update round: finish on the pinned head. Either way, report the move (both SHAs, N or "history rewritten").
608
+
609
+ A round that completes on a moved head (update after, `follow`, `ignore`) needs the report's first line to name the reviewed SHA and say the PR moved on ("Reviewed `<reviewed sha>` — the PR has since moved on to `<new sha>`.") before completing: `keryx review complete` refuses it otherwise.
610
+ 4. **Update round.** `keryx review advance --json --repo <owner/name> --number <n>` opens the next round of the same Review on the current head; Desktop's "Update review" runs the same command. It updates from the Review's latest round, which must be an Attempt of the Review: `keryx review complete` and `keryx review publish` register a pull request package as one (`keryx review complete` prints `desktop attempt: <id>`). The round it opens runs in keryx's review worker and shows in Desktop's Reviews tab; it keeps the reviewed round's settings without automatic publication, takes the previous round itself, and refuses when a later round already exists or the round is already on the current head. To run the update round in this session instead, or when `keryx review --help` does not list `advance` or it refuses, use `keryx review plan --target <pr-url> --head <new sha> --host <host>`, exactly as "Round plan" 1 does: it picks `delta` (the old head is an ancestor) or `fallback-first` (history rewritten) and attaches the prior findings. A finding the round did not recheck is carried with its previous status; it becomes `closed` only after its code is rechecked, else it stays `open`.
611
+ 5. **Before publishing, when the head at publish time differs from the round's head**, however it moved (during or after the round, any `on_head_move`). Offer these options, in this order, with the host question tool:
612
+ 1. **Update the review to `<new sha>`** (primary): the update round of step 4. The operator's answers per finding carry over by finding id only with `advance`; a round planned with `keryx review plan` does not carry them.
613
+ 2. **Publish as is for `<reviewed sha>`**: only `keryx review publish <package> --event COMMENT`, never `REQUEST_CHANGES` or `APPROVE`. The body's first line is "Reviewed `<reviewed sha>` — the PR has since moved on to `<new sha>`." (`templates/review-report.md`; the line `review complete` already demands for a moved head), and the body names the commits it did not check (`<reviewed sha>..<new sha>`). `keryx review publish` enforces the rest itself, with the same code as Desktop's publish: it refuses any other event on a moved head, pins the review to the reviewed commit, re-reads the head after the operator's yes, and refuses a package it has already published; when the report's first line does not name the reviewed commit it puts Desktop's line ("Reviewed commit `<reviewed sha>`. The pull request has moved to `<new sha>` since; …") first.
614
+ 3. **Save locally**: keep the package, publish nothing.
615
+ 4. **Skip.**
616
+
617
+ Publishing stays the operator's act (SKILL.md "PR Review Report Publication"): never `--yes`, never `gh pr review` or `gh pr comment`.
618
+
594
619
  ## Early verdict — the verdict is interim until `complete`
595
620
 
596
621
  As soon as every reviewer result and the verifier's are on disk, save each verifier pass to `research-evidence/verifications.json` first (without it a refuted finding still counts), then run `keryx review verdict <id|path> [--json]`: it reads `<package>/raw` and writes `verdict-interim.md` into the package. Give the operator that verdict in the same message; do not hold it for the mutation pass, the ledger or `complete`.
@@ -14,7 +14,7 @@ triggers:
14
14
  - "review --hierarchical"
15
15
  metadata:
16
16
  author: "MrCipherSmith"
17
- version: "1.17.0"
17
+ version: "1.18.0"
18
18
  category: "review"
19
19
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
20
20
  license: "MIT"
@@ -60,8 +60,8 @@ license: "MIT"
60
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
61
  - [ ] Hand the saved file's path to **every** reviewer (Reviewer brief, line T), not only the testing reviewer.
62
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.
63
+ 4. Show the operator depth, estimate and merge risk (Preflight 4). Default soft thresholds are 160 dispatches and 400 estimated minutes; a project can set lower or higher `reviewPlan.maxDispatches` / `maxMinutes`. Desktop auto mode may authorize an expanded, pinned plan unless `reviewPlan.autoApprove` is `false` within its run budgets and the 800-dispatch / 1200-minute policy ceiling, recording `plan-confirmation.json` with `confirmedVia: auto-policy`. Other hosts may opt in with `routing.config.json` `reviewPlan.autoApprove: true`; optional `autoMaxDispatches` and `autoMaxMinutes` lower those ceilings, and explicit `maxDispatches` / `maxMinutes` are never exceeded automatically. Pinned full base/head SHAs are required. A changed plan or revision needs a fresh decision. Manual Desktop mode always asks. Otherwise, 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 without an applicable automatic policy: 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, read the pull request's head and act on a move (`SKILL.detail.md` § "Head moved"), then `keryx review next --package <package>` decides what is left, an `escalated` core-role dispatch on a light slice included.
65
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
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`.
67
67
 
@@ -167,7 +167,7 @@ A reviewer starts in the project root and reads project files; a path outside th
167
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
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
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`.
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`). For a grown plan, run `review next --apply`; configured project auto policy writes a new bounded authorization for the changed plan, otherwise obtain the operator decision. For native `spawn_subagent` on non-Desktop hosts, pass `model_class` from each `review next --json` dispatch (`light`, `standard`, or `expert`); legacy `model` is evidence, not an exact target. Desktop prepared queues resolve and enforce their exact model separately. 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
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.
172
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).
173
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`).
@@ -473,7 +473,7 @@ keryx review blast-radius --ref "${BASE_SHA}" --package "${PKG}" --previous blas
473
473
  ```
474
474
 
475
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.
476
+ When `dropped` is non-empty, run `keryx review chunks plan|estimate|next|record|merge --package "${PKG}"` until `next` has none left; the default ceiling is 100 passes of 40 files (4,000 files). `reviewChunks.autoApprovePasses` optionally authorizes up to 400 passes in automatic mode; explicit user budgets and a human refusal still apply. `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 100 distinct 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.
477
477
 
478
478
  ### Path Mode
479
479
 
@@ -905,13 +905,13 @@ Default is do not publish. No resolvable PR number means skip and say so.
905
905
 
906
906
  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. If a project skill under `.metaproject/project-skills/orchestration` provides `templates/report-overlay.md` extending this engine, read it and its required project rules. Compose its English slot text from the round's evidence. Put the evidence in a fenced `json keryx:report-slots` block with the overlay id and named `slots`. In a Vantage review, give every mandatory check its own `- Label — evidence or explicit status` line in `verified-clean`. A check without evidence is not verified. Write the input report to a separate draft file and pass it to `review ingest --report`; the planner already owns the package's `report.md`.
907
907
 
908
- 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`.
908
+ 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; a merged or closed PR is refused, so its report stays local). 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`.
909
909
 
910
910
  **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.
911
911
  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.
912
912
 
913
- Re-read head and thread before posting. If head moved, re-check findings
914
- and name unchecked commits. Do not duplicate findings; cite extended ones.
913
+ Re-read the thread before posting; a head that differs from the round's head, however it moved,
914
+ follows `SKILL.detail.md` § "Head moved". Do not duplicate findings; cite extended ones.
915
915
 
916
916
  ## Job Context Awareness
917
917
 
@@ -20,7 +20,7 @@ counts as a review and not as a comment stream:
20
20
  |---|---|
21
21
  | `REQUEST_CHANGES` | Request changes, if the reviewer may; on the reviewer's own PR GitHub rejects it, so Comment |
22
22
  | `APPROVE` / `APPROVE_WITH_SUGGESTIONS` | Approve, if the reviewer may approve; else Comment |
23
- | PR already merged or closed | a plain PR comment — a review state no longer gates anything |
23
+ | PR already merged or closed | not posted: `keryx review publish` refuses it, as Desktop does; the report stays local |
24
24
 
25
25
  One report per round, posted once. The `keryx:findings` block is never posted;
26
26
  it lives in the copy `keryx review ingest` reads. If the body would exceed