@zephyrdeng/pi-review 0.6.0 → 0.6.2
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/README.md +6 -3
- package/extensions/review.ts +35 -1
- package/extensions/rv-completions.test.ts +41 -29
- package/extensions/rv-completions.ts +156 -111
- package/extensions/rv-locale.test.ts +17 -0
- package/extensions/rv-locale.ts +81 -0
- package/extensions/rv-model-priorities.test.ts +69 -0
- package/extensions/rv-model-priorities.ts +138 -0
- package/extensions/rv-prompts.test.ts +9 -0
- package/extensions/rv-prompts.ts +32 -15
- package/extensions/rv-semantic.test.ts +23 -0
- package/extensions/rv-semantic.ts +110 -0
- package/package.json +3 -3
- package/resources/rv-model-priorities.json +17 -0
- package/skills/pi-review/SKILL.md +9 -6
- package/skills/pi-review/references/codex-tools.md +2 -0
- package/skills/pi-review/references/model-selection.md +72 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Model selection for pi-review (all hosts)
|
|
2
|
+
|
|
3
|
+
Use this after `pi-review models` (or `pi-review models <search>`). **Never invent** `provider/model` IDs—only IDs that appear in that output.
|
|
4
|
+
|
|
5
|
+
## Workflow (Claude Code, Codex, Cursor, Pi parent agent)
|
|
6
|
+
|
|
7
|
+
1. Run `pi-review models` (narrow with search if the user named a vendor or model family).
|
|
8
|
+
2. Infer **review profile** from the target (see table below).
|
|
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
|
+
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
|
+
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
|
+
|
|
13
|
+
## Profiles
|
|
14
|
+
|
|
15
|
+
| Profile | When to use |
|
|
16
|
+
|---------|-------------|
|
|
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). |
|
|
20
|
+
|
|
21
|
+
## Priority lists (same as Pi `/rv` package preset)
|
|
22
|
+
|
|
23
|
+
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
|
+
|
|
25
|
+
### Code review
|
|
26
|
+
|
|
27
|
+
| Order | Match model id containing | Suggested thinking |
|
|
28
|
+
|-------|---------------------------|------------------|
|
|
29
|
+
| 1 | `gpt-5.5` | `xhigh` |
|
|
30
|
+
| 2 | `glm-5.2` | `high` |
|
|
31
|
+
|
|
32
|
+
### Frontend / multimodal review
|
|
33
|
+
|
|
34
|
+
| Order | Match model id containing | Notes |
|
|
35
|
+
|-------|---------------------------|--------|
|
|
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 |
|
|
39
|
+
|
|
40
|
+
Use **code** mode (`pi-review` default) unless the user asked for plan/challenge.
|
|
41
|
+
|
|
42
|
+
### Plan / challenge review
|
|
43
|
+
|
|
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` |
|
|
50
|
+
|
|
51
|
+
Use `--mode plan` or `--mode challenge` as appropriate.
|
|
52
|
+
|
|
53
|
+
## Examples (illustrative—always substitute exact catalog strings)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Code
|
|
57
|
+
pi-review --model openai-codex/gpt-5.5:xhigh -- @src/auth.ts
|
|
58
|
+
|
|
59
|
+
# Frontend
|
|
60
|
+
pi-review --model wafer.ai/Kimi-K2.6 -- @src/App.vue
|
|
61
|
+
|
|
62
|
+
# Plan
|
|
63
|
+
pi-review --mode plan --model px:anthropic/claude-opus-4-8 -- @docs/architecture.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## User-named model
|
|
67
|
+
|
|
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.
|
|
69
|
+
|
|
70
|
+
## Language
|
|
71
|
+
|
|
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`.
|