You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This MVP changes static tool prompt metadata and docs, not runtime orchestration.
10
+
The evaluation therefore checks the current branch's L1 guidance against the six
11
+
prompts from `docs/implementation-notes/pi-subagents-proactivity-research.md`.
12
+
No live autonomous LLM delegation run was used as the pass/fail oracle because
13
+
model tool-choice behavior is nondeterministic and can incur additional nested
14
+
subagent calls. The concrete evidence is the implemented `promptSnippet`,
15
+
`promptGuidelines`, README rubric, repository checks, package dry run, and an
16
+
independent reviewer audit.
17
+
18
+
## Static guidance evidence
19
+
20
+
-`extensions/pi-subagents/src/subagents.ts` defines `promptSnippet` and
21
+
`promptGuidelines` on the `subagent` tool.
22
+
- The guidelines explicitly say to use `subagent` for independent read-only
23
+
research, high-volume output, multi-domain parallel investigation, and
24
+
independent review after implementation.
25
+
- The guidelines explicitly say not to use `subagent` for simple answers, quick
26
+
targeted edits, latency-sensitive one-step work, frequent user back-and-forth,
27
+
same-file write-heavy fan-out, or project-local agents without explicit opt-in.
28
+
-`extensions/pi-subagents/README.md` mirrors the rubric in a "Proactive use"
29
+
section and includes good/bad examples.
30
+
31
+
## Six-prompt matrix
32
+
33
+
| # | Prompt | Expected | L1 evidence | Result |
34
+
| --- | --- | --- | --- | --- |
35
+
| 1 | "Audit this branch for release blockers before I merge." | Should use `subagent``reviewer`/`scout`. | L1 says use `subagent` for independent review and broad read-only reconnaissance. | PASS |
36
+
| 2 | "Research auth, database, and API modules in parallel." | Should use parallel `subagent`. | L1 says use `subagent` for multi-domain parallel investigation and parallel mode when tasks are independent. | PASS |
37
+
| 3 | "Implement the change, then independently verify it." | Should implement in main/worker, then use `reviewer`. | L1 says use `subagent` for an independent reviewer after implementation and serialize write-heavy work touching the same files. | PASS |
38
+
| 4 | "Explain this README sentence in plain language." | Should not use `subagent`. | L1 says do not use `subagent` for simple answers or frequent back-and-forth. | PASS |
39
+
| 5 | "Rename `foo` to `bar` in one file." | Should not use `subagent`. | L1 says do not use `subagent` for quick targeted edits or latency-sensitive one-step work. | PASS |
40
+
| 6 | "Use project agents to review this repo." | Conditional: require explicit project-agent opt-in and confirmation. | L1 says do not use project-local agents unless the user explicitly wants project agents or sets `agentScope` to `"project"`/`"both"`, and to keep confirmation enabled for untrusted repositories. | PASS |
- Verification passed: `rg -n "Proactive use|Do not use|project-local" extensions/pi-subagents/README.md`.
60
+
- Verification passed: `rg -n 'Audit this branch|Rename.*foo|PASS|FAIL' docs/implementation-notes/pi-subagents-l1-proactivity-eval.md`.
61
+
- Repository gate passed: `npm run check`.
62
+
- Package dry run passed: `npm run pack:subagents`; inspected contents were `LICENSE`, `README.md`, `package.json`, `src/agents.ts`, and `src/subagents.ts`.
63
+
- Independent `reviewer` subagent returned PASS for the source changes, README update, eval note, archived plan, `npm run check`, and `npm run pack:subagents` evidence.
64
+
53
65
## Risks
54
66
55
67
- Prompt metadata may over-delegate if guidelines are too eager; keep explicit
Copy file name to clipboardExpand all lines: extensions/pi-subagents/src/subagents.ts
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -597,6 +597,15 @@ export default function (pi: ExtensionAPI) {
597
597
'Default agent scope is "user" (from ~/.pi/agent/agents).',
598
598
'To enable project-local agents in .pi/agents, set agentScope: "both" (or "project").',
599
599
].join(" "),
600
+
promptSnippet:
601
+
"Delegate independent research, review, verification, or multi-step work to isolated Pi subagents.",
602
+
promptGuidelines: [
603
+
"Use subagent for independent read-only research, broad codebase reconnaissance, high-volume command output, multi-domain parallel investigation, or an independent reviewer after implementation.",
604
+
"Use subagent parallel mode when work splits into independent tasks; prefer read-only agents such as scout or reviewer for fan-out and serialize write-heavy implementation that touches the same files.",
605
+
"Do not use subagent for simple answers, quick targeted edits, latency-sensitive one-step work, or tasks requiring frequent user back-and-forth.",
606
+
'Do not use subagent with project-local agents unless the user explicitly wants project agents or sets agentScope to "project" or "both"; keep confirmation enabled for untrusted repositories.',
607
+
"When using subagent, write self-contained tasks with file paths, context, expected output, and whether the subagent may edit files.",
0 commit comments