@howaboua/pi-subagent-review 0.2.9 → 0.2.10

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 (2) hide show
  1. package/README.md +24 -90
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,119 +1,53 @@
1
- # pi-subagent-review
1
+ # @howaboua/pi-subagent-review
2
2
 
3
- `@howaboua/pi-subagent-review` is a Pi extension that adds one slash command:
3
+ Adds `/review`, which sends the current repository state to an isolated review subagent and injects its findings back into the main session for triage.
4
4
 
5
- - `/review`
6
- - `/review loop`
7
-
8
- It runs an isolated review subagent against your current repo, optionally prepares a compact conversation-context summary first, injects the findings back into the session as a user message, and asks the main agent to triage those advisory findings before deciding what to address. It is modelled after Codex CLI's /review command.
9
-
10
- ## What it does
11
-
12
- `/review`:
13
- - detects the current git repo
14
- - chooses a base branch automatically
15
- - computes the merge base with `HEAD`
16
- - if no usable base branch or merge base exists, reviews the current checkout as-is
17
- - if the checkout is clean and has no diff against the selected base, reviews the latest commit instead of stopping early
18
- - inspects committed and dirty worktree changes
19
- - summarizes the current Pi session branch as review context, when enabled
20
- - runs an isolated review subagent
21
- - sends the findings back into the current Pi session as a user message
22
- - makes clear that the findings are advisory, not direct user instructions, so the main agent should triage them against prior context before editing
23
-
24
- `/review loop` starts a review loop. It sets a review-specific marker at the current conversation point, strips the `loop` word from the review guidance, and then runs the normal review.
25
-
26
- The first `/review` in a session branch also adds a visible advisory preface without starting an agent turn. The preface tells the main agent not to treat review findings as a TODO list, and to summarize and triage them against session context and the current implementation before changing code.
27
-
28
- After that, plain `/review` detects the active review marker, summarizes the work since that marker back into a compact review-fix increment, advances the review marker, and then runs the next isolated review pass from the compacted point. If the stored marker is gone, `/review` simply behaves like a normal review.
29
-
30
- The review marker is separate from `@howaboua/pi-auto-trees`' generic `/marker`, so both extensions can be used in the same session.
31
-
32
- While `/review` is running, the extension shows a small review widget above the editor with one of two states:
33
-
34
- - `Preparing review context…`
35
- - `Reviewing changes…`
36
-
37
- The widget is UI-only and is cleared when the command finishes, fails, or is cancelled.
38
-
39
- ## Automatic base branch selection
40
-
41
- The command chooses the base branch automatically:
42
-
43
- - if you are on a branch other than `main`, `master`, or `dev`, it reviews against `dev`
44
- - if no local `dev` exists, it falls back to `main`, then `master`
45
- - if you are on `dev`, it reviews against `main`, then `master`
46
- - if you are on `main` or `master`, it prefers `dev` when available
47
-
48
- This means you usually never need to specify the diff base manually.
49
-
50
- ## User arguments
5
+ ## Install
51
6
 
52
- Anything after `/review` is treated as extra review guidance.
7
+ ```bash
8
+ pi install npm:@howaboua/pi-subagent-review
9
+ ```
53
10
 
54
- If the first word is `loop` in any casing, it starts review-loop mode and that word is removed from the review guidance.
11
+ Run `/reload` after installation if Pi is already open.
55
12
 
56
- Examples:
13
+ ## Usage
57
14
 
58
15
  ```text
59
16
  /review
17
+ /review focus on migrations and tests
60
18
  /review loop
61
- /review LoOp focus extra attention on migrations and tests
62
- /review focus extra attention on migrations and tests
63
- /review assess whether we introduced new UI elements instead of reusing established components and existing CSS patterns
64
19
  ```
65
20
 
66
- ## Config
21
+ Anything after `/review` becomes additional reviewer guidance. A leading `loop` starts review-loop mode and is removed from that guidance.
67
22
 
68
- On first load, the extension creates:
23
+ Findings are advisory. The command tells the main agent to verify and categorize them against the current implementation and session context rather than treating them as a TODO list.
69
24
 
70
- - `~/.pi/agent/pi-subagent-review.json`
25
+ ## Review scope
71
26
 
72
- If Pi is using a custom agent directory via `PI_CODING_AGENT_DIR`, the file is created there instead.
27
+ The extension chooses among local `dev`, `main`, and `master` branches, then reviews from the merge base so committed and dirty changes are included without base-only commits. With no usable base it reviews the checkout; with no changes it reviews the latest commit.
73
28
 
74
- Edit that file to change the default review model or thinking level, and the model used to summarize conversation context before review:
29
+ When enabled, a separate model summarizes the current Pi branch for the reviewer; raw turns are not sent. Review continues diff-only if summarization fails.
75
30
 
76
- ```json
77
- {
78
- "model": "openai-codex/gpt-5.6-sol",
79
- "thinking": "medium",
80
- "summary": {
81
- "enabled": true,
82
- "model": "openai-codex/gpt-5.6-luna",
83
- "thinking": "low"
84
- }
85
- }
86
- ```
31
+ ## Review loops
32
+
33
+ `/review loop` records a review-specific marker. The next `/review` compacts fixes since that point, advances the marker, and starts another pass. It does not conflict with `pi-auto-trees`' `/marker`.
87
34
 
88
- The summary model uses the same `provider/model` string format as the reviewer model. Thinking levels through `max` are accepted and clamped to model capabilities. The generated summary is injected into the isolated review task as branch-style context; raw conversation turns are not sent to the review subagent. If the configured review or summary model is not available for the user, `/review` falls back to the current session model automatically. If conversation summarization still fails, `/review` continues with a diff-only review.
35
+ ## Configuration
89
36
 
90
- Existing config files from older versions are migrated on load. If a config has `model` and `thinking` but no `summary` block, the extension adds one using the same model and low thinking:
37
+ On first load, the extension creates `~/.pi/agent/pi-subagent-review.json`, or the equivalent path under `$PI_CODING_AGENT_DIR`.
91
38
 
92
39
  ```json
93
40
  {
41
+ "model": "openai-codex/gpt-5.6-sol",
42
+ "thinking": "medium",
94
43
  "summary": {
95
44
  "enabled": true,
96
- "model": "<existing review model>",
45
+ "model": "openai-codex/gpt-5.6-luna",
97
46
  "thinking": "low"
98
47
  }
99
48
  }
100
49
  ```
101
50
 
102
- If a `summary` block already exists, it is left unchanged.
103
-
104
- ## Install
105
-
106
- Installation methods:
107
-
108
- ```bash
109
- pi install /absolute/path/to/pi-subagent-review
110
- pi install npm:@howaboua/pi-subagent-review
111
- pi install git:github.com/IgorWarzocha/pi-subagent-review
112
- ```
113
-
114
- Then reload or restart Pi.
115
-
116
- ## Notes
51
+ Models use Pi's `provider/model` format. Thinking levels through `max` are accepted and clamped. If a configured model is unavailable, the command falls back to the current session model.
117
52
 
118
- - This extension registers `/review`.
119
- - Do not load it together with another extension that also registers `/review` unless you intentionally want that command collision.
53
+ Do not load another extension that registers `/review` unless the command collision is intentional.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-subagent-review",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Pi extension that adds /review via an isolated review subagent.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -50,8 +50,8 @@
50
50
  "format": "biome check --write ."
51
51
  },
52
52
  "devDependencies": {
53
- "@earendil-works/pi-ai": "0.80.6",
54
- "@earendil-works/pi-coding-agent": "0.80.6",
53
+ "@earendil-works/pi-ai": "0.80.7",
54
+ "@earendil-works/pi-coding-agent": "0.80.7",
55
55
  "@types/node": "^24.10.0",
56
56
  "typescript": "^5.9.3",
57
57
  "@biomejs/biome": "^2.4.16"