@zephyrdeng/pi-review 0.1.0 → 0.2.0
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 +15 -10
- package/extensions/review.ts +5 -5
- package/package.json +1 -1
- package/resources/review-presets.json +3 -3
- package/skills/pi-review/SKILL.md +6 -6
package/README.md
CHANGED
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
Works as a standalone CLI, a Pi package (extension + skill), or integrated into CI pipelines and editor workflows.
|
|
12
12
|
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- [Pi CLI](https://pi.dev) installed and configured with at least one model provider
|
|
16
|
+
|
|
13
17
|
## Features
|
|
14
18
|
|
|
15
19
|
- **Isolated review sessions** — each review runs in a clean child process with no shared state
|
|
16
|
-
- **Multiple review modes** — code review,
|
|
20
|
+
- **Multiple review modes** — code review, multi-lens plan review, adversarial challenge review
|
|
17
21
|
- **Structured output** — machine-readable `PI_REVIEW_META` JSON footer for automation
|
|
18
22
|
- **Model-agnostic** — use any model available in your Pi installation
|
|
19
23
|
- **Session continuity** — keep sessions alive for follow-up questions with `--keep-session`
|
|
@@ -39,6 +43,7 @@ pi install npm:@zephyrdeng/pi-review
|
|
|
39
43
|
```bash
|
|
40
44
|
git clone https://github.com/ZephyrDeng/pi-review.git
|
|
41
45
|
cd pi-review
|
|
46
|
+
npm install && npm run build
|
|
42
47
|
npm link
|
|
43
48
|
```
|
|
44
49
|
|
|
@@ -51,11 +56,11 @@ pi-review -- @src/foo.ts
|
|
|
51
56
|
# Review with a specific model
|
|
52
57
|
pi-review --model openai/gpt-5.5 -- @src/foo.ts
|
|
53
58
|
|
|
54
|
-
#
|
|
55
|
-
pi-review --mode plan
|
|
59
|
+
# Multi-lens plan review
|
|
60
|
+
pi-review --mode plan -- @docs/architecture.md
|
|
56
61
|
|
|
57
|
-
#
|
|
58
|
-
pi-review --mode
|
|
62
|
+
# Adversarial challenge review
|
|
63
|
+
pi-review --mode challenge -- @docs/design.md
|
|
59
64
|
|
|
60
65
|
# List available models
|
|
61
66
|
pi-review models
|
|
@@ -66,8 +71,8 @@ pi-review models
|
|
|
66
71
|
| Mode | Description |
|
|
67
72
|
|------|-------------|
|
|
68
73
|
| `code` (default) | Code, diff, MR, file, and repository review. Focuses on correctness, regressions, security, concurrency, API contracts, edge cases, and missing tests. |
|
|
69
|
-
| `plan
|
|
70
|
-
| `
|
|
74
|
+
| `plan` | Broad plan/architecture review through multiple expert lenses: engineering, product, security, QA, operations, and DX. |
|
|
75
|
+
| `challenge` | Adversarial review that pressure-tests assumptions, dependencies, reversibility, failure modes, and migration paths. |
|
|
71
76
|
|
|
72
77
|
## Output Format
|
|
73
78
|
|
|
@@ -93,10 +98,10 @@ PI_REVIEW_META: {"reviewMode":"code","verdict":"request_changes","verdictSource"
|
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
100
|
# Keep a review session for follow-up
|
|
96
|
-
pi-review --mode
|
|
101
|
+
pi-review --mode challenge --keep-session -- @docs/design.md
|
|
97
102
|
|
|
98
103
|
# Continue a previous session
|
|
99
|
-
pi-review --mode
|
|
104
|
+
pi-review --mode challenge --continue <sessionHandle> -- "expand finding 2"
|
|
100
105
|
```
|
|
101
106
|
|
|
102
107
|
## CLI Reference
|
|
@@ -136,7 +141,7 @@ After installing as a Pi package, use the `/review` slash command:
|
|
|
136
141
|
|
|
137
142
|
```
|
|
138
143
|
/review @src/foo.ts
|
|
139
|
-
/review --mode
|
|
144
|
+
/review --mode challenge @docs/design.md
|
|
140
145
|
/review models
|
|
141
146
|
```
|
|
142
147
|
|
package/extensions/review.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
-
const KNOWN_MODES = new Set(["code", "plan
|
|
5
|
+
const KNOWN_MODES = new Set(["code", "plan", "challenge"]);
|
|
6
6
|
|
|
7
7
|
function splitArgs(input: string): string[] {
|
|
8
8
|
const args: string[] = [];
|
|
@@ -52,12 +52,12 @@ function normalizeReviewArgs(args: string[]): string[] {
|
|
|
52
52
|
|
|
53
53
|
export default function piReviewExtension(pi: ExtensionAPI) {
|
|
54
54
|
pi.registerCommand("review", {
|
|
55
|
-
description: "Run an isolated pi-review session. Usage: /review [--mode
|
|
55
|
+
description: "Run an isolated pi-review session. Usage: /review [--mode challenge] @file-or-text",
|
|
56
56
|
getArgumentCompletions: (prefix) => {
|
|
57
57
|
const items = [
|
|
58
58
|
"@",
|
|
59
|
-
"--mode
|
|
60
|
-
"--mode plan
|
|
59
|
+
"--mode challenge",
|
|
60
|
+
"--mode plan",
|
|
61
61
|
"--keep-session",
|
|
62
62
|
"models",
|
|
63
63
|
];
|
|
@@ -69,7 +69,7 @@ export default function piReviewExtension(pi: ExtensionAPI) {
|
|
|
69
69
|
const parsedArgs = normalizeReviewArgs(splitArgs(rawArgs.trim()));
|
|
70
70
|
|
|
71
71
|
if (parsedArgs.length === 0) {
|
|
72
|
-
ctx.ui.notify("Usage: /review [--mode
|
|
72
|
+
ctx.ui.notify("Usage: /review [--mode challenge] @file-or-text", "warning");
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
|
package/package.json
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
"thinking": "high",
|
|
6
6
|
"instructions": "Review code or code changes only. Do not edit, write, patch, format, commit, or otherwise mutate files. Use bash only for read-only inspection commands such as git diff, git status, git show, tests with explicit user permission, or listing files. Focus on correctness, regressions, security, concurrency, API contracts, edge cases, maintainability, and missing tests."
|
|
7
7
|
},
|
|
8
|
-
"plan
|
|
8
|
+
"plan": {
|
|
9
9
|
"description": "High-level plan review with multiple expert lenses; output a decisive conclusion.",
|
|
10
10
|
"tools": ["read", "grep", "find", "ls"],
|
|
11
11
|
"thinking": "high",
|
|
12
12
|
"instructions": "Review the proposal, design, architecture, or product plan through multiple expert lenses: engineering lead, product owner, security, QA, operations, and developer experience. Do not implement. Identify fatal flaws, trade-offs, missing constraints, sequencing risks, and the smallest changes that would make the plan safer."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"challenge": {
|
|
15
15
|
"description": "Adversarial plan review: pressure-test assumptions, boundaries, dependencies, and terminology.",
|
|
16
16
|
"tools": ["read", "grep", "find", "ls"],
|
|
17
17
|
"thinking": "high",
|
|
18
|
-
"instructions": "
|
|
18
|
+
"instructions": "Challenge the plan as an adversarial design reviewer. Do not ask a sequence of live interview questions; produce a one-shot review conclusion. Pressure-test terminology, hidden dependencies, reversibility, edge cases, failure modes, migration paths, ownership boundaries, and what evidence would invalidate the plan."
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pi-review
|
|
3
|
-
description: Use pi-review to delegate isolated code, diff, repository, architecture, or plan reviews to a fresh Pi session and return only the review conclusion. Use when the user asks for Pi review, isolated review, code review, plan
|
|
3
|
+
description: Use pi-review to delegate isolated code, diff, repository, architecture, or plan reviews to a fresh Pi session and return only the review conclusion. Use when the user asks for Pi review, isolated review, code review, plan review, challenge review, or wants to avoid context pollution.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Pi Review
|
|
@@ -37,9 +37,9 @@ When resolving this fallback, use the actual directory that contains this `SKILL
|
|
|
37
37
|
|
|
38
38
|
2. Choose one mode:
|
|
39
39
|
- default `code` — code, diff, MR, file, or repository review.
|
|
40
|
-
- `--mode plan
|
|
41
|
-
- `--mode
|
|
42
|
-
Completion criterion: use default `code` unless the target is clearly a plan/design review; if two
|
|
40
|
+
- `--mode plan` — broad plan, architecture, product, or strategy review through multiple expert lenses.
|
|
41
|
+
- `--mode challenge` — adversarial review of assumptions, boundaries, dependencies, and missing evidence.
|
|
42
|
+
Completion criterion: use default `code` unless the target is clearly a plan/design review; if two modes fit equally, ask the user to choose.
|
|
43
43
|
|
|
44
44
|
3. Run an isolated review:
|
|
45
45
|
```bash
|
|
@@ -64,6 +64,6 @@ When resolving this fallback, use the actual directory that contains this `SKILL
|
|
|
64
64
|
```bash
|
|
65
65
|
pi-review -- @src/foo.ts
|
|
66
66
|
pi-review --model openai/gpt-5.5 -- @src/foo.ts
|
|
67
|
-
pi-review --mode
|
|
68
|
-
pi-review --mode
|
|
67
|
+
pi-review --mode challenge --keep-session -- @docs/design.md
|
|
68
|
+
pi-review --mode challenge --continue <sessionHandle> -- "expand finding 2"
|
|
69
69
|
```
|