@zephyrdeng/pi-review 0.7.1 → 0.8.1

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.
Files changed (181) hide show
  1. package/README.md +37 -8
  2. package/README.zh-CN.md +31 -5
  3. package/dist/args.d.ts +4 -0
  4. package/dist/args.d.ts.map +1 -1
  5. package/dist/args.js +61 -4
  6. package/dist/args.js.map +1 -1
  7. package/dist/args.test.js +62 -1
  8. package/dist/args.test.js.map +1 -1
  9. package/dist/child-process.d.ts +3 -0
  10. package/dist/child-process.d.ts.map +1 -1
  11. package/dist/child-process.js +27 -5
  12. package/dist/child-process.js.map +1 -1
  13. package/dist/child-process.test.js +42 -1
  14. package/dist/child-process.test.js.map +1 -1
  15. package/dist/cli-exit.test.js +14 -5
  16. package/dist/cli-exit.test.js.map +1 -1
  17. package/dist/cli.js +8 -3
  18. package/dist/cli.js.map +1 -1
  19. package/dist/index.d.ts +7 -5
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +5 -4
  22. package/dist/index.js.map +1 -1
  23. package/dist/install-args.test.js +1 -1
  24. package/dist/install-args.test.js.map +1 -1
  25. package/dist/install.d.ts.map +1 -1
  26. package/dist/install.js +2 -3
  27. package/dist/install.js.map +1 -1
  28. package/dist/json-events.d.ts +6 -0
  29. package/dist/json-events.d.ts.map +1 -1
  30. package/dist/json-events.js +48 -6
  31. package/dist/json-events.js.map +1 -1
  32. package/dist/json-events.test.js +20 -1
  33. package/dist/json-events.test.js.map +1 -1
  34. package/dist/loop.d.ts +28 -2
  35. package/dist/loop.d.ts.map +1 -1
  36. package/dist/loop.js +45 -3
  37. package/dist/loop.js.map +1 -1
  38. package/dist/loop.test.js +24 -1
  39. package/dist/loop.test.js.map +1 -1
  40. package/dist/matcher.test.js +1 -1
  41. package/dist/matcher.test.js.map +1 -1
  42. package/dist/meta-footer.d.ts +4 -8
  43. package/dist/meta-footer.d.ts.map +1 -1
  44. package/dist/meta-footer.js +19 -5
  45. package/dist/meta-footer.js.map +1 -1
  46. package/dist/meta-footer.test.js +11 -4
  47. package/dist/meta-footer.test.js.map +1 -1
  48. package/dist/panel-aggregate.test.js +1 -1
  49. package/dist/panel-aggregate.test.js.map +1 -1
  50. package/dist/panel-cancellation.test.js +33 -2
  51. package/dist/panel-cancellation.test.js.map +1 -1
  52. package/dist/panel-cli-ui.test.d.ts +2 -0
  53. package/dist/panel-cli-ui.test.d.ts.map +1 -0
  54. package/dist/panel-cli-ui.test.js +91 -0
  55. package/dist/panel-cli-ui.test.js.map +1 -0
  56. package/dist/panel-cli.test.js +37 -39
  57. package/dist/panel-cli.test.js.map +1 -1
  58. package/dist/panel-config.d.ts +38 -0
  59. package/dist/panel-config.d.ts.map +1 -1
  60. package/dist/panel-config.js +135 -2
  61. package/dist/panel-config.js.map +1 -1
  62. package/dist/panel-config.test.js +79 -2
  63. package/dist/panel-config.test.js.map +1 -1
  64. package/dist/panel-loop.test.js +1 -1
  65. package/dist/panel-loop.test.js.map +1 -1
  66. package/dist/panel-tools.test.js +1 -1
  67. package/dist/panel-tools.test.js.map +1 -1
  68. package/dist/panel-ui.d.ts +20 -0
  69. package/dist/panel-ui.d.ts.map +1 -0
  70. package/dist/panel-ui.js +84 -0
  71. package/dist/panel-ui.js.map +1 -0
  72. package/dist/panel-ui.test.d.ts +2 -0
  73. package/dist/panel-ui.test.d.ts.map +1 -0
  74. package/dist/panel-ui.test.js +122 -0
  75. package/dist/panel-ui.test.js.map +1 -0
  76. package/dist/panel-view.d.ts +1 -0
  77. package/dist/panel-view.d.ts.map +1 -1
  78. package/dist/panel-view.js +40 -6
  79. package/dist/panel-view.js.map +1 -1
  80. package/dist/panel-view.test.js +68 -1
  81. package/dist/panel-view.test.js.map +1 -1
  82. package/dist/panel.d.ts +11 -1
  83. package/dist/panel.d.ts.map +1 -1
  84. package/dist/panel.js +67 -21
  85. package/dist/panel.js.map +1 -1
  86. package/dist/prompt.d.ts +2 -0
  87. package/dist/prompt.d.ts.map +1 -1
  88. package/dist/prompt.js +34 -3
  89. package/dist/prompt.js.map +1 -1
  90. package/dist/prompt.test.js +21 -2
  91. package/dist/prompt.test.js.map +1 -1
  92. package/dist/review-events.test.js +1 -1
  93. package/dist/review-events.test.js.map +1 -1
  94. package/dist/review-result.test.js +1 -1
  95. package/dist/review-result.test.js.map +1 -1
  96. package/dist/review.js +3 -3
  97. package/dist/review.js.map +1 -1
  98. package/dist/review.meta.test.js +1 -1
  99. package/dist/review.meta.test.js.map +1 -1
  100. package/dist/skill-protocol.test.js +1 -1
  101. package/dist/skill-protocol.test.js.map +1 -1
  102. package/dist/skill-update.test.d.ts +2 -0
  103. package/dist/skill-update.test.d.ts.map +1 -0
  104. package/dist/skill-update.test.js +23 -0
  105. package/dist/skill-update.test.js.map +1 -0
  106. package/dist/skill.d.ts +22 -0
  107. package/dist/skill.d.ts.map +1 -1
  108. package/dist/skill.js +109 -22
  109. package/dist/skill.js.map +1 -1
  110. package/dist/types.d.ts +23 -1
  111. package/dist/types.d.ts.map +1 -1
  112. package/dist/types.js.map +1 -1
  113. package/dist/ui-client.d.ts +13 -0
  114. package/dist/ui-client.d.ts.map +1 -0
  115. package/dist/ui-client.js +161 -0
  116. package/dist/ui-client.js.map +1 -0
  117. package/dist/ui-client.test.d.ts +2 -0
  118. package/dist/ui-client.test.d.ts.map +1 -0
  119. package/dist/ui-client.test.js +48 -0
  120. package/dist/ui-client.test.js.map +1 -0
  121. package/dist/ui-html.d.ts +7 -0
  122. package/dist/ui-html.d.ts.map +1 -0
  123. package/dist/ui-html.js +52 -0
  124. package/dist/ui-html.js.map +1 -0
  125. package/dist/ui-html.test.d.ts +2 -0
  126. package/dist/ui-html.test.d.ts.map +1 -0
  127. package/dist/ui-html.test.js +26 -0
  128. package/dist/ui-html.test.js.map +1 -0
  129. package/dist/ui-server-main.d.ts +3 -0
  130. package/dist/ui-server-main.d.ts.map +1 -0
  131. package/dist/ui-server-main.js +128 -0
  132. package/dist/ui-server-main.js.map +1 -0
  133. package/dist/ui-server-main.test.d.ts +2 -0
  134. package/dist/ui-server-main.test.d.ts.map +1 -0
  135. package/dist/ui-server-main.test.js +123 -0
  136. package/dist/ui-server-main.test.js.map +1 -0
  137. package/dist/ui-server.d.ts +42 -0
  138. package/dist/ui-server.d.ts.map +1 -0
  139. package/dist/ui-server.js +233 -0
  140. package/dist/ui-server.js.map +1 -0
  141. package/dist/ui-server.test.d.ts +2 -0
  142. package/dist/ui-server.test.d.ts.map +1 -0
  143. package/dist/ui-server.test.js +236 -0
  144. package/dist/ui-server.test.js.map +1 -0
  145. package/dist/update.d.ts +2 -0
  146. package/dist/update.d.ts.map +1 -1
  147. package/dist/update.js +80 -20
  148. package/dist/update.js.map +1 -1
  149. package/dist/update.test.d.ts +2 -0
  150. package/dist/update.test.d.ts.map +1 -0
  151. package/dist/update.test.js +17 -0
  152. package/dist/update.test.js.map +1 -0
  153. package/extensions/panel-tool.test.ts +366 -8
  154. package/extensions/panel-tool.ts +289 -68
  155. package/extensions/review.test.ts +79 -0
  156. package/extensions/review.ts +188 -44
  157. package/extensions/rv-completions.test.ts +177 -18
  158. package/extensions/rv-completions.ts +490 -60
  159. package/extensions/rv-interactive.test.ts +562 -0
  160. package/extensions/rv-interactive.ts +616 -0
  161. package/extensions/rv-locale.test.ts +12 -4
  162. package/extensions/rv-locale.ts +44 -11
  163. package/extensions/rv-model-picker.test.ts +172 -0
  164. package/extensions/rv-model-picker.ts +313 -0
  165. package/extensions/rv-model-priorities.test.ts +29 -9
  166. package/extensions/rv-model-priorities.ts +23 -8
  167. package/extensions/rv-prompts.test.ts +274 -2
  168. package/extensions/rv-prompts.ts +479 -33
  169. package/extensions/rv-resolve.test.ts +189 -0
  170. package/extensions/rv-resolve.ts +313 -0
  171. package/extensions/rv-semantic.test.ts +1 -1
  172. package/extensions/rv-semantic.ts +38 -4
  173. package/package.json +7 -4
  174. package/resources/rv-model-priorities.json +18 -9
  175. package/skills/pi-review/SKILL.md +84 -60
  176. package/skills/pi-review/references/codex-tools.md +18 -11
  177. package/skills/pi-review/references/model-selection.md +49 -28
  178. package/dist/extensions/review.d.ts +0 -2
  179. package/dist/extensions/review.js +0 -22
  180. package/dist/extensions/rv-prompts.d.ts +0 -19
  181. package/dist/extensions/rv-prompts.js +0 -132
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: pi-review
3
- description: Use pi-review to delegate isolated code, diff, repository, architecture, or plan reviews to fresh Pi sessions and return review conclusions. Also use for loop review, review-fix-re-review closeout, structured review gates, and review status/progress. Model selection presets for code, frontend, and plan review are in references/model-selection.md. On Claude Code or Codex, default to --progress-log with a background shell run and tail the log (chat tools buffer stdout).
3
+ description: Use pi-review to delegate isolated code, diff, repository, architecture, or plan reviews to fresh Pi sessions and return review conclusions. Also use for loop review, review-fix-re-review closeout, panel review gates, and review status/progress questions.
4
4
  ---
5
5
 
6
6
  # Pi Review
7
7
 
8
- Use `pi-review` to run a fresh Pi review session and return only the review conclusion.
8
+ Use `pi-review` to run a fresh Pi review session and return only the review conclusion. Every review run is read-only: the child session never edits, patches, or commits — the host agent owns all fixes.
9
9
 
10
- ## CLI Resolution
10
+ ## CLI resolution
11
11
 
12
12
  Prefer the shell command when it exists:
13
13
 
@@ -15,61 +15,68 @@ Prefer the shell command when it exists:
15
15
  pi-review --help
16
16
  ```
17
17
 
18
- If `pi-review` is not on PATH but this skill came from the Pi package, use the package-local CLI relative to this skill directory:
18
+ If `pi-review` is not on PATH but this skill came from the Pi package, use the package-local CLI relative to the actual directory that contains this `SKILL.md`:
19
19
 
20
20
  ```bash
21
21
  node ../../bin/pi-review.js --help
22
22
  ```
23
23
 
24
- When resolving this fallback, use the actual directory that contains this `SKILL.md`.
25
-
26
- ## Codex / Claude Code
27
-
28
- - Map skill mentions of `Bash` to your host shell tool.
29
- - Read **[references/codex-tools.md](./references/codex-tools.md)** for `--progress-log` + background run + tail.
30
- - Read **[references/model-selection.md](./references/model-selection.md)** when choosing `--model` after `pi-review models` (code / frontend / plan presets).
31
- - Do not use a blocking foreground shell alone for live progress; follow **Default workflow by host** below.
32
-
33
24
  ## Default workflow by host
34
25
 
35
26
  | Host | How to run `pi-review` |
36
27
  |------|-------------------------|
37
- | **Pi** (`/rv`) | New reviews call the native `pi_review` tool, which launches the packaged CLI in event mode and renders live Panel state. Continuations, kept sessions, and explicit `--no-stream` retain the foreground CLI path. |
38
- | **Claude Code, Codex, Cursor**, and similar AI agents | **Default: `--progress-log <path>` + background run + tail** (see below). Do **not** rely on foreground Bash stdout for “streaming” — the tool buffers until exit. |
39
- | Scripts / CI | Foreground is fine; use `--no-stream` only when you must buffer until exit. |
28
+ | **Pi** (`/rv`) | New panel reviews call the native `pi_review` API tool, shown to users as **Pi Review Panel**, which launches the packaged CLI in event mode and renders live reviewer state. Continuations, kept sessions, `/rv-loop`, and explicit `--no-stream` use the shell CLI. |
29
+ | **Pi terminal** | Foreground `pi-review`; text deltas stream live by default. |
30
+ | **Claude Code / Codex / Cursor** and similar agent hosts | These hosts buffer a shell tool's output until the command exits, so a foreground run looks like a silent wait. **Panel review (`--reviewers`/`--panel`) default: `--ui web --ui-url-file <path>` + background run** — hand the user the printed dashboard URL so they watch live progress in a browser instead of the chat. **Single review / `loop` default: `--progress-log <path>` + background run + tail the log** (`--ui web` requires an active panel and rejects `loop`). See [references/codex-tools.md](./references/codex-tools.md). Map skill mentions of `Bash` to your host shell tool. |
31
+ | Scripts / CI | Foreground is fine; add `--no-stream` only when the caller must buffer until exit (cannot combine with `--progress-log`). |
32
+
33
+ `--progress-log <path>` tees the raw `--mode json` event stream to a file for outside observation and debugging; it is never a prerequisite for metrics. Token usage accumulates by default, and `pi-review` writes milestone notices (`pi-review: review started`, `pi-review: tool <name> started/finished`, `pi-review: review finished`) to stderr.
34
+
35
+ `--ui web` starts a loopback-only browser dashboard for panel review; `--ui-url-file <path>` writes its URL atomically so a buffered-output host can read it without parsing stderr. It never substitutes for panel semantics — findings, gate status, and exit code come from the same `PI_REVIEW_META_JSON` as always.
36
+
37
+ ## Run metrics
38
+
39
+ Quote metrics from the run output; never estimate or invent them.
40
+
41
+ - **ASCII footer** (the `── pi-review` / `── pi-review panel` block): Duration, Tokens as `in · out · cache · reason` plus total, and Cost — the provider-reported value, or `n/a` when the provider reports none. On Pi `/rv` the panel tool result is **plain text / ASCII only** (Pi does not render markdown in tool results) — same classic chrome as the CLI, no `###` headings or fenced code blocks.
42
+ - **Pi Review Panel**: each reviewer row shows **role persona · lifecycle · model · thinking · elapsed · tokens**. Lifecycle is `queued` / `running` / `completed` / `failed` / `cancelled`. Expanded view adds bounded activity, plain-text findings, and the ASCII footer.
43
+ - Machine output: parse `PI_REVIEW_META_JSON:` from **stderr** (or set `PI_REVIEW_META_STDOUT=1` to emit it on stdout). Show users the plain review text and ASCII footer, not raw JSON, unless they ask for machine output. Do **not** rewrap the tool result into markdown tables or `###` report sections.
40
44
 
41
- ## Pi host (`/rv`)
45
+ ## Pi host (`/rv*`)
42
46
 
43
- - In **Pi interactive** sessions, ordinary `/rv @path` calls the native `pi_review` tool and needs no streaming flags. The tool owns normalized events, live rendering, and the packaged CLI process.
44
- - `--continue`, `--keep-session`, and explicit `--no-stream` use the shell CLI path because they retain single-review session semantics.
47
+ Slash commands select **strategy only**. Everything after the command is a **natural-language target**.
45
48
 
46
- ## Streaming vs agent hosts (Claude Code / Codex)
49
+ | Command | Strategy |
50
+ |---------|----------|
51
+ | `/rv <natural-language target>` | Panel review via native **Pi Review Panel** (`pi_review` API tool); preset `code-experts` unless `--reviewers`/`--panel` say otherwise |
52
+ | `/rv-loop <natural-language target>` | Loop closeout via shell `pi-review loop`; host fix point `--max-rounds 1` by default |
53
+ | `/rv-models` | Model catalog only |
54
+ | `/rv --continue <handle> [text]` | Continue a kept single-review session |
47
55
 
48
- - `pi-review` always runs the child in `--mode json` internally. In streaming mode it forwards **readable text deltas** to stdout live and writes **semantic milestone notices** (`pi-review: review started`, `pi-review: tool <name> started/finished`, `pi-review: review finished`) to **stderr**. Token usage (`input`/`output`/`cache`/`reasoning`) is accumulated by default — no `--progress-log` required to see it in the ASCII footer or `PI_REVIEW_META_JSON`.
49
- - `--progress-log <path>` is now an **optional** convenience: it tees the raw `--mode json` event stream to a file for external observation (tail, debugging). It no longer gates token visibility.
50
- - **Claude Code, Cursor, Codex** and similar hosts still buffer a Bash tool's stdout until the command exits. The semantic milestone notices on stderr + the final Markdown + ASCII footer on stdout give you progress and the result without needing to tail a file. If you still want the full event log for fine-grained debugging, add `--progress-log <path>` and tail it.
51
- - **Pi interactive** sessions stream text deltas live to the terminal by default — no `--no-stream` or `--progress-log` needed.
56
+ - Pass the user target **as given**. Path mentions like `@src` or `@src/foo.ts` are fine as text. Do **not** expand directories into multi-file lists in the parent agent.
57
+ - Remaining strategy matching lives here and in the CLI: mode defaults (`code` / `plan` / `challenge`), model choice from `pi-review models` + [references/model-selection.md](./references/model-selection.md), panel width, and path-vs-file handling (directories stay tool path targets; only real files are attached).
58
+ - `/rv` needs no streaming flags; the tool owns normalized events, live rendering, and the packaged CLI process. `/rv --reviewers 1` is an explicit non-panel single review and stays on the shell CLI path — never substitute the default panel.
52
59
 
53
60
  ## Review status (no slash command)
54
61
 
55
- There is **no** `/status` slash in this skill. When the user asks for **review status**, **progress**, **is pi-review still running**, or **/status** in the sense of review progress, run read-only checks and summarize—do **not** start a new review.
62
+ There is **no** `/status` slash in this skill. When the user asks for **review status**, **progress**, or **is pi-review still running**, run read-only checks and summarize — do **not** start a new review.
56
63
 
57
64
  1. **In-flight review (heuristic)** — list likely `pi-review` / child `pi -p` processes:
58
65
  ```bash
59
66
  pgrep -fl 'pi-review' 2>/dev/null || true
60
67
  pgrep -fl 'pi.*-p' 2>/dev/null | head -20 || true
61
68
  ```
62
- If matches exist, say a review **may still be running** (heuristic; other `pi -p` jobs can match). If none, say **no obvious in-flight pi-review** from process list—not that the last review failed.
69
+ If matches exist, say a review **may still be running** (heuristic; other `pi -p` jobs can match). If none, say **no obvious in-flight pi-review** from the process list — not that the last review failed.
63
70
 
64
71
  2. **Persisted sessions** (only after `--keep-session` / `--continue`) — default dir `~/.pi/pi-review/sessions`, overridable with `PI_REVIEW_SESSION_DIR`:
65
72
  ```bash
66
73
  ls -lt "${PI_REVIEW_SESSION_DIR:-$HOME/.pi/pi-review/sessions}" 2>/dev/null | head -15 || true
67
74
  ```
68
- Mention newest folders and that **Session** from the ASCII footer (or `sessionHandle` in `PI_REVIEW_META_JSON` on stderr) is used with `--continue`.
75
+ Mention newest folders and that **Session** from the ASCII footer (or `sessionHandle` in `PI_REVIEW_META_JSON`) is used with `--continue`.
69
76
 
70
- 3. **Last conclusion** — if this conversation already has the ASCII `── pi-review` footer, quote verdict, duration, and session path instead of re-running review.
77
+ 3. **Last conclusion** — if this conversation already has the ASCII `── pi-review` footer, quote verdict, duration, and session path instead of re-running the review.
71
78
 
72
- 4. **Live output** — remind that chat tools may not stream; prefer re-running with `--progress-log <path>` + a background/tail workflow for live progress, or use a **terminal** running `pi-review` (default streaming) as a fallback.
79
+ 4. **Live output** — for live progress, re-run with the host's default workflow: panel review gets `--ui web` (browser dashboard) on agent hosts, single review/`loop` gets background + `--progress-log` + tail; a terminal running `pi-review` is a fallback for either.
73
80
 
74
81
  Do not implement findings from a status check; status is informational only.
75
82
 
@@ -78,26 +85,36 @@ Do not implement findings from a status check; status is informational only.
78
85
  Use this protocol when the host is closing out implementation work and may edit between reviews. `pi-review` and every child session remain review-only; the host agent owns all fixes.
79
86
 
80
87
  1. **Freeze the scope baseline before the first review.** Record the originating task, accepted files/modules, required behavior, and proof commands. Do not silently expand this baseline because a reviewer noticed adjacent cleanup.
81
- 2. **Run a bounded structured gate.** Prefer the productized command:
88
+ 2. **Confirm until-clean stop conditions with the user.** An until-clean run starts only after the user confirms two things: what **clean** must mean for this run, and the hard `--max-rounds` cap. Offer a suggested default they can accept or adjust — e.g. "clean = zero confirmed actionable findings (advisories allowed), hard cap 10 rounds". A user request that already pins both counts as confirmation; restate it in one line and proceed. Fixed-round gates (`--max-rounds N` without `--until`) need no confirmation.
89
+ 3. **Run a bounded structured gate.** Prefer the productized command:
82
90
  ```bash
83
91
  pi-review loop --max-rounds 1 [shared review options] -- <@files|text...>
92
+ # Or host-driven until-clean (still hard-capped; never unlimited):
93
+ pi-review loop --until clean --max-rounds 10 [shared review options] -- <@files|text...>
84
94
  ```
85
- A one-round invocation gives the host a fix point between reviews. Increase `--max-rounds` only when repeated independent review of the unchanged tree is intentional; the CLI never waits for edits. Re-invocation after a host fix is a new process. On Claude Code / Codex, compose `loop` with the normal `--progress-log <path>` background + tail workflow. On Pi, retain default foreground streaming. `loop` rejects `--keep-session`, `--continue`, and `--name`.
86
- 3. **Read the gate signals.** Parse `status`, `findings`, and `actionableCount` from each `PI_REVIEW_META_JSON` line and use the final loop summary. Expected statuses are `clean`, `has_findings`, `needs_human`, and `blocked`.
87
- 4. **Apply the scope governor to every finding:**
95
+ Round budgets: CLI `loop` defaults to `--max-rounds 3` when the flag is omitted; `--until clean` without an explicit flag defaults to a hard cap of 10; `/rv-loop` defaults to `--max-rounds 1` as a host fix point. A one-round invocation gives the host a fix point between reviews. `--until clean` declares the success **goal** and never removes the hard ceiling. The CLI never waits for edits and never loops forever on an unchanged tree. Re-invocation after a host fix is a new process (or the next host cycle under until-clean). Run `loop` with the host's default workflow from the table above. `loop` rejects `--keep-session`, `--continue`, and `--name`.
96
+
97
+ **Clean goal definition:**
98
+ - Single review: `status=clean` means no actionable findings (notes/non-actionable may remain).
99
+ - Panel review: `status=clean` means zero **confirmed** actionable clusters. Advisories do **not** fail clean.
100
+ - `needs_human` / `blocked` never count as clean.
101
+ - Successful closeout requires exit code `0`.
102
+ 4. **Read the gate signals.** Parse `status`, `findings`, and `actionableCount` from each `PI_REVIEW_META_JSON` line and use the final loop summary. Expected statuses are `clean`, `has_findings`, `needs_human`, and `blocked`.
103
+ 5. **Apply the scope governor to every finding:**
88
104
  - **in-scope blocker** — accepted, actionable, and required by the frozen task; the host may fix it now.
89
105
  - **follow-up** — valid but outside the baseline or not required for safe closeout; record it without drive-by edits.
90
106
  - **stop-and-escalate** — ambiguous intent, architectural expansion, unsafe migration, blocked tooling, or anything requiring a human decision; stop rather than guess.
91
107
  - A rejected finding must be intentional and recorded with its rationale in the final report. Never silently ignore it.
92
108
  - Check sibling instances of the same bug class only inside the frozen task/PR scope. Do not turn the check into a repository-wide refactor.
93
- 5. **Fix only in-scope blockers in the host.** Never ask the child review session to implement fixes. After each host patch, rerun the narrowest relevant proof (focused test, typecheck, lint, or reproduction) before re-reviewing.
94
- 6. **Re-review until a stop condition:**
95
- - `clean` → gate open; proceed to final proof and closeout.
109
+ 6. **Fix only in-scope blockers in the host.** Never ask the child review session to implement fixes. After each host patch, rerun the narrowest relevant proof (focused test, typecheck, lint, or reproduction) before re-reviewing.
110
+ 7. **Re-review until a stop condition:**
111
+ - `clean` → clean goal met; proceed to final proof and closeout.
96
112
  - `has_findings` → classify, fix accepted in-scope blockers, and re-invoke within the agreed host-cycle budget.
97
113
  - `needs_human` or `blocked` → stop early and escalate with the review history.
98
114
  - budget exhausted → report remaining findings and ask for a decision; do not loop indefinitely.
99
- 7. **Detect non-convergence.** After two non-converging patch cycles (the same finding persists, findings oscillate, or scope grows), pause and reclassify all remaining findings before any further edit.
100
- 8. **Gate completion claims.** Never claim done, ship, commit-ready, or clean without a fresh `clean` result, unless the user gives explicit human acceptance of named remaining findings. Report accepted fixes, rejected findings with rationale, follow-ups, stop reason, and proof evidence.
115
+ - With `--until clean`, the host owns the fix→re-review cycle until clean or hard budget. Advisories alone do not block clean; confirmed actionable findings do.
116
+ 8. **Detect non-convergence.** After two non-converging patch cycles (the same finding persists, findings oscillate, or scope grows), pause and reclassify all remaining findings before any further edit.
117
+ 9. **Gate completion claims.** Never claim done, ship, commit-ready, or clean without a fresh `clean` result, unless the user gives explicit human acceptance of named remaining findings. Report accepted fixes, rejected findings with rationale, follow-ups, stop reason, and proof evidence.
101
118
 
102
119
  The shell exit policy is: `0` clean, `1` status is `has_findings`, `2` usage error, `3` needs human, `4` blocked/runtime failure. A non-zero loop result is a gate signal, not permission for the child reviewer to edit.
103
120
 
@@ -108,7 +125,9 @@ Panel review runs multiple **independent** reviewers in isolated child sessions
108
125
  ### When to use panel vs single review
109
126
 
110
127
  - **Single review (default):** keep for small, low-cost changes. Reviewer count defaults to one; the existing execution, output, status mapping, and exit policy stay unchanged.
111
- - **Panel review:** use when a change deserves independent scrutiny. Activate it with `--reviewers <n>` (2-8) or `--panel <name>`.
128
+ - **Panel review:** use when a change deserves independent scrutiny. Activate it with `--reviewers <n>` (2-8) or `--panel <name>`; the two flags cannot combine. `--reviewers 1` stays a shell single review, and the `pi_review` API tool accepts only 2-8 reviewers.
129
+ - **Generic `--reviewers N` roles** are distinct persona labels (rappers / AI KOLs / sports stars), **not** the literal string `Independent reviewer`. Named presets (`code-experts`) keep their fixed roles (correctness/security/testing). Do not invent or hardcode role names when calling `pi_review` — the CLI assigns them.
130
+ - **Per-reviewer thinking**: pass `id=provider/model:thinking` via `--reviewer-model` / `reviewerModels` (e.g. `r1=zenmux/deepseek/deepseek-v4-flash:low`). The `:thinking` suffix is stripped into the thinking field and **must not** be overridden by a shared `--thinking` or preset default. Display should look like `model · low`, never `model:low · high`.
112
131
 
113
132
  ### Consensus
114
133
 
@@ -146,12 +165,16 @@ Panel review rejects `--keep-session`, `--continue`, and `--name` in v1 (reviewe
146
165
  ### Examples
147
166
 
148
167
  ```bash
149
- # Single panel review
168
+ # Single panel review (roles auto-assigned as distinct personas)
150
169
  pi-review --reviewers 3 --consensus quorum --min-agree 2 -- @src
170
+ # Per-reviewer model + thinking (suffix wins over shared --thinking)
171
+ pi-review --reviewers 3 --reviewer-model r1=zenmux/deepseek/deepseek-v4-flash:low --reviewer-model r2=zenmux/minimax/minimax-m3:off -- @src
151
172
  # Expert preset
152
173
  pi-review --panel code-experts --consensus majority -- @src
153
174
  # Panel loop review (up to 6 reviewer runs + adjudication)
154
175
  pi-review loop --reviewers 3 --consensus quorum --max-rounds 2 -- @src
176
+ # Claude Code / Codex / Cursor default: browser dashboard instead of a tailed log
177
+ pi-review --reviewers 3 --ui web --ui-url-file /tmp/pi-review-ui-url.txt -- @src
155
178
  ```
156
179
 
157
180
  ## Steps
@@ -161,53 +184,54 @@ pi-review loop --reviewers 3 --consensus quorum --max-rounds 2 -- @src
161
184
  pi-review models [search]
162
185
  ```
163
186
  Rules:
164
- - Run this before building the review command.
165
- - If the user named a model, use that text as `[search]` and verify the **exact** listed `provider/model` from the output.
166
- - If the user did not name a model, follow **[references/model-selection.md](./references/model-selection.md)**: infer profile (code / frontend / plan), match the priority list against catalog ids, then set `--model` with optional `:thinking` when supported.
187
+ - Run this before building the review command. **Never invent a `provider/model` id** — only ids from the catalog output.
188
+ - Follow **[references/model-selection.md](./references/model-selection.md)** for everything else: profile inference (code / frontend / plan), priority lists, user-named-model resolution, and thinking aliases (`max`/`最高` → `xhigh`, with fallback to the nearest supported level).
189
+ - Ambiguous match across model families: show the top candidates and ask; do not guess.
190
+ - No priority match: omit `--model` (Pi default) or pick a listed reasoning model with a large context window — say which and why.
167
191
  - On **Claude Code / Codex / Cursor**, state the chosen model in one line (match the user's language) before running the review command.
168
- - If nothing in the priority list matches, omit `--model` (Pi default) or pick a listed reasoning model with large context—say which and why.
169
192
  Completion criterion: exact listed `provider/model[:thinking]` or an explicit default; never invented ids.
170
193
 
171
194
  2. Choose one mode:
172
195
  - default `code` — code, diff, MR, file, or repository review.
173
196
  - `--mode plan` — broad plan, architecture, product, or strategy review through multiple expert lenses.
174
197
  - `--mode challenge` — adversarial review of assumptions, boundaries, dependencies, and missing evidence.
175
- Completion criterion: use default `code` unless the target is clearly a plan/design review; if two modes fit equally, ask the user to choose.
198
+ **Challenge mode: grill first.** Before running an adversarial review, grill the user with 2-3 pointed questions — for example: what outcome must this work achieve, which assumption hurts most if wrong, what evidence supports it? Weave the answers into the natural-language target so the reviewer attacks the real weak points.
199
+ Completion criterion: use default `code` unless the target is clearly a plan/design review; if two modes fit equally, ask the user to choose. For `challenge`, the grill answers are folded into the target before the command runs.
176
200
 
177
201
  3. Run an isolated review:
178
202
  ```bash
179
- pi-review [--mode <name>] [--model <provider/model[:thinking]>] [--keep-session|--continue <handle>] [--progress-log <path>] -- <@files|text...>
203
+ pi-review [--mode <name>] [--model <provider/model[:thinking]>] [--keep-session|--continue <handle>] [--progress-log <path>] -- <natural-language target...>
180
204
  ```
181
205
  Rules:
182
- - Use the model decision from step 1; do not invent model IDs.
206
+ - Use the model decision from step 1 and the execution path from **Default workflow by host**.
183
207
  - Omit `--mode` for normal code review; the command defaults to `code`.
184
- - Use `--keep-session` only when the user wants follow-up questions on this review.
185
- - Use `--continue <handle>` only with a **Session** path from a prior ASCII footer or `sessionHandle` in `PI_REVIEW_META_JSON`.
186
- - Put file references as `@path` after `--`.
208
+ - Use `--keep-session` only when the user wants follow-up questions on this review; use `--continue <handle>` only with a **Session** path from a prior ASCII footer or `sessionHandle` in `PI_REVIEW_META_JSON`.
209
+ - Pass the review request as natural language after `--`. Path mentions (`@src`, `@src/foo.ts`) are allowed as text. Do **not** expand directories into multi-file attachment lists — the CLI keeps directory `@refs` as tool path targets and only attaches real files.
210
+ - On Pi `/rv`, call `pi_review` with that same natural-language target. On Pi `/rv-loop`, run shell `pi-review loop` with it and follow **Loop closeout protocol**.
187
211
  - Do not ask `pi-review` to edit, patch, commit, or implement.
188
- - **Pi `/rv`:** default streaming; no `--progress-log` unless the user asked.
189
- - **Claude Code / Codex / Cursor:** **include `--progress-log <path>` by default**; background the CLI and tail the log for user-visible progress. Foreground Bash alone does not stream in chat.
190
- - Add `--no-stream` only when the caller must buffer until exit (cannot combine with `--progress-log`).
191
- Completion criterion: the command includes the resolved model/default choice and a concrete review target.
212
+ Completion criterion: the command includes the resolved model/default choice and a concrete natural-language review target.
192
213
 
193
214
  4. Return the result:
194
- - Show the Markdown review body and the **ASCII footer** (`── pi-review` block on stdout). Do not paste raw `PI_REVIEW_META_JSON` to the user unless they ask for machine output.
195
- - Scripts: parse `PI_REVIEW_META_JSON:` from **stderr** (or set `PI_REVIEW_META_STDOUT=1` to emit JSON on stdout instead).
215
+ - Show the review conclusion and ASCII footer as plain text, with metrics quoted per **Run metrics**. Do not reformat into markdown tables or invented `###` sections — Pi does not render markdown for this output.
196
216
  - For an ordinary review-only request, do not apply findings automatically; implementation is a separate user decision. When the user already requested implementation closeout, follow **Loop closeout protocol** and let only the host fix accepted in-scope blockers.
197
217
  Completion criterion: the user sees the review conclusion and readable footer.
198
218
 
199
219
  ## Examples
200
220
 
201
221
  ```bash
222
+ pi-review -- @src
202
223
  pi-review -- @src/foo.ts
203
- pi-review --model openai/gpt-5.5 -- @src/foo.ts
204
- pi-review --mode challenge --keep-session -- @docs/design.md
224
+ pi-review --model openai/gpt-5.5 -- "review the auth changes under @src"
225
+ pi-review --mode challenge --keep-session -- @docs/design.md # after the 2-3 grill questions
205
226
  pi-review --mode challenge --continue <sessionHandle> -- "expand finding 2"
206
- pi-review loop --max-rounds 1 -- @src
227
+ pi-review loop --max-rounds 1 -- @src # host fix point
228
+ pi-review loop -- @src # CLI default: --max-rounds 3
229
+ pi-review loop --until clean --max-rounds 10 -- @src # after the user confirms the stop conditions
207
230
  pi-review loop --max-rounds 1 --progress-log /tmp/pi-review-loop.jsonl -- @src
208
231
  ```
209
232
 
210
233
  ## Status examples (user phrasing)
211
234
 
212
235
  - "review status" / "is the review still running?" → run **Review status** checks above.
213
- - "show streaming in Claude Code" / "the wait is bad, is there a better way" → explain tool buffering; re-run with `--progress-log <path>` + a background/tail workflow (or Pi `/rv`) for live progress, offering a local terminal only as a fallback.
236
+ - "show streaming in Claude Code" / "the wait is bad, is there a better way" → explain that the host buffers tool output; re-run with the default workflow for the run type — panel review gets `--ui web` (share the dashboard URL), single review/`loop` gets background + `--progress-log` + tail (or Pi `/rv`) — offering a local terminal only as a fallback.
237
+ - "give me a dashboard" / "watch it in the browser" / "can I see this visually" → if the run is (or can be) a panel review, re-run with `--ui web --ui-url-file <path>` and share the printed URL; single review and `loop` do not support `--ui web` (offer to make it a panel review, or fall back to `--progress-log` + tail).
@@ -12,28 +12,35 @@ General Codex subagent and worktree mappings live in the **using-superpowers** s
12
12
 
13
13
  ## Long-running `pi-review` (default on Codex / Claude Code)
14
14
 
15
- Native shell tools usually **buffer stdout/stderr until the command exits**. A multi-minute `pi-review` run can look like a silent wait, then one large dump. `pi-review` mitigates this in two ways that need **no** `--progress-log`:
15
+ Native shell tools on these hosts **buffer stdout/stderr until the command exits**. A multi-minute foreground `pi-review` run looks like a silent wait, then one large dump — never promise live foreground streaming. Which side channel to use depends on the run type: panel review gets the browser dashboard; single review and `loop` get the tailed progress log.
16
16
 
17
- 1. **Semantic milestone notices on stderr** (`pi-review: review started`, `pi-review: tool <name> started/finished`, `pi-review: review finished`). Capture stderr separately or interleave it to show progress.
18
- 2. **Token usage by default**: the ASCII footer and `PI_REVIEW_META_JSON` always include `thinking` + token usage (`input`/`output`/`cache`/`reasoning`) when the child session reports them — no `--progress-log` required.
17
+ ### Panel review: browser dashboard (default)
19
18
 
20
- When the **pi-review** skill applies on Codex, Claude Code, or Cursor:
19
+ `--reviewers <n>` or `--panel <name>` activates panel review. On Codex, Claude Code, or Cursor, default to the dashboard instead of a tailed log:
21
20
 
22
- 1. **Default:** run `pi-review ... -- <target>` (foreground or background). Stderr carries milestone notices; stdout carries the review Markdown + ASCII footer on exit.
23
- 2. If you want the **full** `--mode json` event log for fine-grained debugging, add `--progress-log <path>` and tail it — but this is optional, not required for tokens or progress.
24
- 3. After exit, show the Markdown review body and ASCII `── pi-review` footer (skill step 4).
21
+ 1. Run `pi-review --reviewers <n> --ui web --ui-url-file <path> -- <target>` (or `--panel <name>`) in the **background**.
22
+ 2. Read `<path>` shortly after launch — it is written atomically as soon as the dashboard server is ready, well before reviewers finish (poll a few times a second for a couple of seconds if the file is not there yet). Share that URL with the user immediately: *"Dashboard: `<url>` — open it to watch live per-reviewer progress. I'll report back when the review completes."*
23
+ 3. Wait for the background job. On exit, show the Markdown review body and ASCII `── pi-review` footer as usual (skill step 4) — the dashboard is a presentation layer only; findings, gate status, and exit code always come from `PI_REVIEW_META_JSON`.
24
+ 4. `--ui web` requires an active panel and rejects `loop` — for a single review or a panel `loop`, fall back to the progress-log workflow below.
25
25
 
26
- **Pi interactive (`/rv`)**: foreground `pi-review`, default streaming. Text deltas appear live on the terminal; no `--progress-log` unless the user asked.
26
+ ### Single review / `loop`: progress log + tail
27
+
28
+ 1. **Default:** run `pi-review ... --progress-log <path> -- <target>` in the **background** and **tail the log** for user-visible progress (see the tail example below). Stdout still delivers the review Markdown + ASCII footer on exit.
29
+ 2. `--progress-log` tees the raw `--mode json` event stream to the chosen file for observation and debugging. It is **not** a prerequisite for metrics: the ASCII footer and `PI_REVIEW_META_JSON` always include `thinking` + token usage (`input`/`output`/`cache`/`reasoning`) when the child session reports them.
30
+ 3. `pi-review` also writes semantic milestone notices to stderr (`pi-review: review started`, `pi-review: tool <name> started/finished`, `pi-review: review finished`); they surface once the host flushes output.
31
+ 4. After exit, show the Markdown review body and ASCII `── pi-review` footer (skill step 4).
32
+
33
+ **Pi interactive (`/rv`)**: foreground `pi-review`, default streaming. Text deltas appear live on the terminal; no `--progress-log`/`--ui web` unless the user asked — Pi already renders panel progress natively.
27
34
 
28
35
  See the parent skill: sections *Default workflow by host* and *Streaming vs agent hosts (Claude Code / Codex)*.
29
36
 
30
37
  ### Loop closeout
31
38
 
32
- `loop` composes with the same default streaming + stderr-milestone workflow:
39
+ `loop` composes with the same background + `--progress-log` + tail workflow:
33
40
 
34
41
  ```bash
35
- pi-review loop --max-rounds 1 -- @src
36
- # optional: --progress-log /tmp/pi-review-loop.jsonl for the full event log
42
+ pi-review loop --max-rounds 1 --progress-log /tmp/pi-review-loop.jsonl -- @src
43
+ # CLI default when --max-rounds is omitted: 3; --until clean defaults to a hard cap of 10
37
44
  ```
38
45
 
39
46
  A non-zero command exit is an expected gate result when findings remain. Wait for the process, read the final `PI_REVIEW_META_JSON` / loop summary, let the host fix only accepted in-scope findings, rerun focused proof, and invoke a new loop process. The child review session never edits. Reuse or truncate the progress log deliberately because every loop round appends events to the chosen path.
@@ -8,65 +8,86 @@ Use this after `pi-review models` (or `pi-review models <search>`). **Never inve
8
8
  2. Infer **review profile** from the target (see table below).
9
9
  3. Walk the **priority list** for that profile; pick the **first** row whose `idContains` matches some listed model id (case-insensitive substring). If several ids match one row, prefer the **newest** id (higher version suffix, e.g. `2.7` over `2.5`, `4-8` over `4-6`).
10
10
  4. Set `--model <exact-listed-provider/model>` from the catalog. Add `:thinking` only if that model supports it in Pi and the preset suggests it (see thinking column).
11
+ - User “max / 最高档” maps to Pi thinking `xhigh` when supported; otherwise fall back to the highest available level.
12
+ - User “low / off / medium / high” maps to that exact level when supported — **do not upgrade** a user-specified low/off to high/xhigh.
11
13
  5. If **no** priority row matches anything in the catalog, either omit `--model` (Pi default) or pick the best **reasoning** model with a large context window from the list—state the choice in one line to the user.
12
14
 
13
15
  ## Profiles
14
16
 
15
17
  | Profile | When to use |
16
18
  |---------|-------------|
17
- | **code** | Default: diffs, MRs, backend/ general code paths (`@src/...`, `.ts`, `.go`, …). |
18
- | **frontend** | UI-heavy targets: `.vue`, `.svelte`, `.css`, `.scss`, `.html`, or user says frontend / UI / multimodal. |
19
- | **plan** | `--mode plan` or `--mode challenge`, or reviewing `.md` / design / architecture docs (not line-by-line code only). |
19
+ | **code** | **Fast review**: diffs, MRs, routine backend/general code (`@src/...`, `.ts`, `.go`, …). |
20
+ | **frontend** | **Vision / UI / multimodal**: `.vue`, `.svelte`, `.css`, `.scss`, `.html`, screenshots, or user says frontend / UI / vision / 多模态. |
21
+ | **plan** | **Complex / 方案评审**: `--mode plan` or `--mode challenge`, architecture docs, hard design trade-offs (not line-by-line code only). |
20
22
 
21
23
  ## Priority lists (same as Pi `/rv` package preset)
22
24
 
23
25
  Configurable on disk for Pi: `resources/rv-model-priorities.json` or `PI_REVIEW_RV_PRIORITIES`. Agents should follow this table unless the user overrides.
24
26
 
25
- ### Code review
27
+ Thinking notes: Pi levels are `off|minimal|low|medium|high|xhigh`. Treat user **max / 最高档** as **`xhigh`**.
26
28
 
27
- | Order | Match model id containing | Suggested thinking |
28
- |-------|---------------------------|------------------|
29
- | 1 | `gpt-5.5` | `xhigh` |
30
- | 2 | `glm-5.2` | `high` |
29
+ ### Code — fast review
31
30
 
32
- ### Frontend / multimodal review
31
+ | Order | Match model id containing | Suggested thinking | Notes |
32
+ |-------|---------------------------|--------------------|--------|
33
+ | 1 | `claude-sonnet` (prefer `5`) | `xhigh` (or `high`) | Fast strong default |
34
+ | 2 | `deepseek-v4-flash` | `xhigh` | |
35
+ | 3 | `glm-5.2` | `xhigh` (or `high`) | |
36
+ | 4 | `minimax-m3` | `xhigh` | |
37
+ | 5 | `grok-4.5` | `xhigh` (or `high`) | |
38
+ | 6 | `gpt-5.6-terra` | any / omit | Any supported tier |
39
+ | 7 | `gpt-5.6-luna` | `xhigh` | max/`xhigh` preferred |
40
+
41
+ ### Frontend — vision / multimodal
33
42
 
34
43
  | Order | Match model id containing | Notes |
35
44
  |-------|---------------------------|--------|
36
- | 1 | `kimi` | Prefer id that also contains `2.7` when multiple Kimi ids exist |
37
- | 2 | `claude-sonnet` | Prefer id containing `5` when multiple |
38
- | 3 | `minimax-m3` | Multimodal-friendly |
45
+ | 1 | `claude` | Claude family first for vision |
46
+ | 2 | `gpt` | GPT family |
47
+ | 3 | `kimi` (prefer `2.7`, e.g. kimi-2.7-code) | Vision-friendly Kimi |
48
+ | 4 | `minimax-m3` | Multimodal-friendly |
39
49
 
40
- Use **code** mode (`pi-review` default) unless the user asked for plan/challenge.
50
+ Use **code** mode unless the user asked for plan/challenge.
41
51
 
42
- ### Plan / challenge review
52
+ ### Plan / challenge — complex & 方案评审
43
53
 
44
- | Order | Match model id containing |
45
- |-------|---------------------------|
46
- | 1 | `claude-opus-4-8` |
47
- | 2 | `claude-opus-4` (+ prefer `8` in id if several) |
48
- | 3 | `deepseek-v4-pro` |
49
- | 4 | `deepseek-v4` |
54
+ | Order | Match model id containing | Suggested thinking | Notes |
55
+ |-------|---------------------------|--------------------|--------|
56
+ | 1 | `gpt-5.6-sol` | `xhigh` (max) | Preferred for hard cases |
57
+ | 2 | `claude-opus-4-8` / `claude-opus-4` (prefer `8`) | `xhigh` | |
58
+ | 3 | `claude-fable-5` | `xhigh` (max) | **Use cautiously** |
59
+ | 4 | `glm-5.2` | `xhigh` (最高档) | |
60
+ | 5 | `deepseek-v4-pro` | `xhigh` (最高档) | |
61
+ | 6 | `grok-4.5` | `xhigh` (最高档) | |
50
62
 
51
63
  Use `--mode plan` or `--mode challenge` as appropriate.
52
64
 
53
65
  ## Examples (illustrative—always substitute exact catalog strings)
54
66
 
55
67
  ```bash
56
- # Code
57
- pi-review --model openai-codex/gpt-5.5:xhigh -- @src/auth.ts
68
+ # Fast code review
69
+ pi-review --model px:anthropic/claude-sonnet-4-5:xhigh -- @src/auth.ts
58
70
 
59
- # Frontend
60
- pi-review --model wafer.ai/Kimi-K2.6 -- @src/App.vue
71
+ # Complex / plan
72
+ pi-review --mode plan --model openai-codex/gpt-5.6-sol:xhigh -- @docs/architecture.md
61
73
 
62
- # Plan
63
- pi-review --mode plan --model px:anthropic/claude-opus-4-8 -- @docs/architecture.md
74
+ # Vision / frontend
75
+ pi-review --model wafer.ai/Kimi-K2.7-code -- @src/App.vue
64
76
  ```
65
77
 
66
78
  ## User-named model
67
79
 
68
- If the user specifies a model, run `pi-review models <fragment>` and use the **exact** listed id. Do not normalize or guess provider prefixes.
80
+ If the user specifies a model, resolve against the catalog instead of inventing an id:
81
+
82
+ 1. Exact `provider/model` match wins.
83
+ 2. Bare id / family fragment (`gpt-5.6-sol`, `kimi`, `opus`) may uniquely match one listed id. Prefer the host session's primary provider when the same id exists on multiple providers.
84
+ 3. If several unrelated families match, show the top candidates and ask. Do not silently jump from `gpt` to `claude`.
85
+ 4. Thinking aliases are allowed: `max`/`最高`/`最高档` → `xhigh`, `高` → `high`, `中` → `medium`, `快`/`off` → `off`. If unsupported by the chosen model, fall back to the nearest supported level.
86
+ 5. Inline form `provider/model:thinking` is valid.
87
+ 6. **Panel per-reviewer overrides** use the same inline form: `--reviewer-model r1=provider/model:low` (or `reviewerModels: ["r1=..."]` on `pi_review`). The CLI splits the trailing thinking level into its own field so a shared `--thinking high` / preset cannot clobber a per-reviewer `:low`. Prefer this over putting thinking only on the shared flag when reviewers need different levels.
88
+
89
+ On Pi `/rv*`, short model/thinking tokens are resolved against the live registry before the review starts. On other hosts, run `pi-review models <fragment>` and apply the same rules.
69
90
 
70
91
  ## Language
71
92
 
72
- Explain your model choice briefly in the **same language** as the user's request (Chinese ↔ English). The review body language is independent; this rule is only for the one-line rationale before/after invoking `pi-review`.
93
+ Explain your model choice briefly in the **same language** as the user's request (Chinese ↔ English). The review body language is independent; this rule is only for the one-line rationale before/after invoking `pi-review`.
@@ -1,2 +0,0 @@
1
- import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
- export default function piReviewExtension(pi: ExtensionAPI): void;
@@ -1,22 +0,0 @@
1
- import { buildRvOrchestrationPrompt, parseRvArgs, RV_COMPLETIONS } from "./rv-prompts.js";
2
- export default function piReviewExtension(pi) {
3
- pi.registerCommand("rv", {
4
- description: "Delegate pi-review to the agent (English prompts). Usage: /rv [--mode plan|challenge] [--model id] [--keep-session] @file-or-text | models",
5
- getArgumentCompletions: (prefix) => {
6
- const filtered = RV_COMPLETIONS.filter((item) => item.value.startsWith(prefix));
7
- return filtered.length
8
- ? filtered.map(({ value, hint }) => ({ value, label: value, description: hint }))
9
- : null;
10
- },
11
- handler: async (rawArgs, ctx) => {
12
- const trimmed = rawArgs.trim();
13
- const parsed = parseRvArgs(trimmed);
14
- const prompt = buildRvOrchestrationPrompt(parsed);
15
- if (!trimmed && !parsed.modelsOnly) {
16
- ctx.ui.notify("/rv needs a target or `models`. Try: /rv @path or /rv models", "warning");
17
- return;
18
- }
19
- pi.sendUserMessage(prompt);
20
- },
21
- });
22
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * English orchestration prompts for /rv — parent Pi agent runs pi-review per skill.
3
- * Child review sessions use presets in resources/review-presets.json (also English).
4
- */
5
- export type RvParsed = {
6
- mode: "code" | "plan" | "challenge";
7
- model?: string;
8
- keepSession: boolean;
9
- continueHandle?: string;
10
- modelsOnly: boolean;
11
- target: string;
12
- };
13
- export declare function parseRvArgs(raw: string): RvParsed;
14
- export declare function buildRvOrchestrationPrompt(parsed: RvParsed): string;
15
- /** Short labels for TUI completions (English). */
16
- export declare const RV_COMPLETIONS: {
17
- value: string;
18
- hint: string;
19
- }[];