@howaboua/pi-subagent-review 0.2.20 → 0.2.22
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/CHANGELOG.md +11 -0
- package/package.json +5 -5
- package/src/messages.ts +6 -30
- package/src/review-command.ts +1 -1
- package/src/tree-summary.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @howaboua/pi-subagent-review
|
|
2
2
|
|
|
3
|
+
## 0.2.22
|
|
4
|
+
|
|
5
|
+
- Removed redundant developer-message wording while preserving review approval rules and nested AGENTS.md guidance.
|
|
6
|
+
|
|
7
|
+
## 0.2.21
|
|
8
|
+
|
|
9
|
+
- Restore full extension prompt preparation when continuing into a new context window or starting review triage.
|
|
10
|
+
|
|
11
|
+
- Keep tool instructions current through Pi's normal startup hooks without resetting the Notebook.
|
|
12
|
+
- Let active context management own review-loop navigation summaries.
|
|
13
|
+
|
|
3
14
|
## 0.2.20
|
|
4
15
|
|
|
5
16
|
- Preserve extension-owned messages while delivering true developer-role policy through compatible Pi Codex Responses adapters.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howaboua/pi-subagent-review",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "Pi extension that adds /review via an isolated review subagent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@howaboua/pi-codex-conversion": ">=3.0.
|
|
43
|
+
"@howaboua/pi-codex-conversion": ">=3.0.35",
|
|
44
44
|
"@earendil-works/pi-ai": ">=0.84.3",
|
|
45
45
|
"@earendil-works/pi-coding-agent": ">=0.84.3",
|
|
46
46
|
"@earendil-works/pi-tui": ">=0.84.3"
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"format": "biome check --write ."
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@howaboua/pi-codex-conversion": "3.0.
|
|
63
|
-
"@earendil-works/pi-ai": "0.
|
|
64
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
62
|
+
"@howaboua/pi-codex-conversion": "3.0.35",
|
|
63
|
+
"@earendil-works/pi-ai": "0.86.1",
|
|
64
|
+
"@earendil-works/pi-coding-agent": "0.86.1",
|
|
65
65
|
"@types/node": "^26.2.0",
|
|
66
66
|
"typescript": "^7.0.2",
|
|
67
67
|
"@biomejs/biome": "^2.5.10"
|
package/src/messages.ts
CHANGED
|
@@ -12,28 +12,16 @@ import type { ReviewContext } from "./types.js";
|
|
|
12
12
|
export type ReviewDeveloperMessages = Partial<
|
|
13
13
|
Pick<
|
|
14
14
|
typeof import("@howaboua/pi-codex-conversion/developer-messages"),
|
|
15
|
-
"trySendCodexDeveloperCustomMessage"
|
|
15
|
+
"trySendCodexDeveloperCustomMessage"
|
|
16
16
|
>
|
|
17
17
|
>;
|
|
18
18
|
|
|
19
19
|
const REALTIME_VOICE_PROMPT_CHANNEL =
|
|
20
20
|
"@howaboua/pi-codex-conversion/realtime-voice-prompt/v1";
|
|
21
21
|
const REVIEW_LOOP_PREFACE_MESSAGE = [
|
|
22
|
-
"
|
|
23
|
-
"",
|
|
24
|
-
"
|
|
25
|
-
"",
|
|
26
|
-
"When findings return, compare each one against the user’s actual request, prior conversation, accepted decisions, intentional tradeoffs from this session, and the current implementation.",
|
|
27
|
-
"",
|
|
28
|
-
"Default response: verify and triage, not code.",
|
|
29
|
-
"",
|
|
30
|
-
"For each verified finding, recommend one of:",
|
|
31
|
-
"",
|
|
32
|
-
"- address: concrete, in-scope, necessary for the current implementation",
|
|
33
|
-
"- defer: plausible but outside the current work",
|
|
34
|
-
"- skip: stylistic, speculative, preference-based, overengineered, or not useful",
|
|
35
|
-
"",
|
|
36
|
-
"After triage, obtain the user’s disposition. If a finding is not obviously required for the current implementation, recommend deferring or skipping it.",
|
|
22
|
+
"Review findings are advisory and may be wrong or lack session context. Verify each against the user's request, prior decisions, tradeoffs and current state.",
|
|
23
|
+
"Recommend address (necessary and in scope), defer (outside current work), or skip (stylistic, speculative or not useful).",
|
|
24
|
+
"Obtain the user's disposition before making changes.",
|
|
37
25
|
].join("\n");
|
|
38
26
|
|
|
39
27
|
const REVIEW_SUMMARY_STARTED_PROMPT =
|
|
@@ -41,9 +29,9 @@ const REVIEW_SUMMARY_STARTED_PROMPT =
|
|
|
41
29
|
const REVIEW_FINDINGS_READY_PROMPT =
|
|
42
30
|
"The isolated code review has finished, and its findings have been sent to the main agent for triage. Announce this briefly in your natural voice. When the main agent responds, continue with its substantive triage without repeating this status.";
|
|
43
31
|
const REVIEW_FINDINGS_FOLLOW_UP = [
|
|
44
|
-
"Treat the findings above as advisory and unverified. Read the cited files and trace the relevant paths before deciding whether each finding is true, necessary, and in scope. Compare them against the user’s request, prior decisions, and current
|
|
32
|
+
"Treat the findings above as advisory and unverified. Read the cited files and trace the relevant paths before deciding whether each finding is true, necessary, and in scope. Compare them against the user’s request, prior decisions, and current state. Do not merely summarize the reviewer output.",
|
|
45
33
|
"",
|
|
46
|
-
"Before
|
|
34
|
+
"Before making changes, get the user’s disposition on the verified findings using an available ask/questions tool, or a normal message if none is available. After dispositions are agreed, do not summarize them again: start the agreed work. If any remain ambiguous, complete the clear, simple, non-blocking agreed fixes first, then return to the ambiguous findings.",
|
|
47
35
|
].join("\n");
|
|
48
36
|
|
|
49
37
|
function announceReviewStatus(
|
|
@@ -190,7 +178,6 @@ export function sendReviewFindings(
|
|
|
190
178
|
ctx: ExtensionCommandContext,
|
|
191
179
|
review: ReviewContext,
|
|
192
180
|
findings: string,
|
|
193
|
-
developerMessages?: ReviewDeveloperMessages,
|
|
194
181
|
): void {
|
|
195
182
|
const normalizedFindings = findings.trim();
|
|
196
183
|
const idle = ctx.isIdle();
|
|
@@ -208,17 +195,6 @@ export function sendReviewFindings(
|
|
|
208
195
|
normalizedFindings === "No actionable issues found."
|
|
209
196
|
)
|
|
210
197
|
return;
|
|
211
|
-
if (
|
|
212
|
-
typeof developerMessages?.trySendCodexDeveloperMessage === "function" &&
|
|
213
|
-
developerMessages.trySendCodexDeveloperMessage(
|
|
214
|
-
pi,
|
|
215
|
-
REVIEW_FINDINGS_FOLLOW_UP,
|
|
216
|
-
idle
|
|
217
|
-
? { triggerTurn: true }
|
|
218
|
-
: { triggerTurn: true, deliverAs: "followUp" },
|
|
219
|
-
)
|
|
220
|
-
)
|
|
221
|
-
return;
|
|
222
198
|
pi.sendUserMessage(
|
|
223
199
|
REVIEW_FINDINGS_FOLLOW_UP,
|
|
224
200
|
idle ? undefined : { deliverAs: "followUp" },
|
package/src/review-command.ts
CHANGED
|
@@ -190,7 +190,7 @@ export function registerReviewCommand(
|
|
|
190
190
|
details.errorMessage || details.stderr || finalOutput,
|
|
191
191
|
);
|
|
192
192
|
|
|
193
|
-
sendReviewFindings(pi, ctx, review, finalOutput
|
|
193
|
+
sendReviewFindings(pi, ctx, review, finalOutput);
|
|
194
194
|
announceReviewFindingsReady(pi);
|
|
195
195
|
ctx.ui.notify(
|
|
196
196
|
`Review findings sent back to the main agent from /${REVIEW_COMMAND}.`,
|
package/src/tree-summary.ts
CHANGED
|
@@ -117,6 +117,9 @@ export function registerTreeSummaryModel(
|
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
return async (ctx, targetId, options, config) => {
|
|
120
|
+
// Codex projects new_context only while context management is active.
|
|
121
|
+
if (pi.getActiveTools().includes("new_context"))
|
|
122
|
+
return ctx.navigateTree(targetId, options);
|
|
120
123
|
if (!config.enabled) return ctx.navigateTree(targetId, options);
|
|
121
124
|
if (pending) throw new Error("A tree summary is already in progress");
|
|
122
125
|
|