@ferris1225/pi-subagents 4.1.13 → 4.1.15

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 CHANGED
@@ -19,22 +19,25 @@ model dies, how results come back — stays with you. pi-subagents owns that
19
19
  burden:
20
20
 
21
21
  - **The main model actually delegates.** A lean delegation directive is injected
22
- into its system prompt: substantive work goes to children so the main context
23
- stays lean for orchestration, trivial work stays inline, and nothing is
24
- re-explained twice. No custom prompts needed.
22
+ into its system prompt: child contexts are cheap and yours is scarce
23
+ non-trivial implementation defaults to `worker`, trivial work stays inline,
24
+ and dispatching never blocks or ends the main turn, so it can fire several
25
+ dispatches and keep working while they run.
25
26
  - **Fan-out is the model's call, not a cap.** One parallel dispatch carries as
26
27
  many tasks as the work genuinely decomposes into. The runtime paces execution
27
28
  at four concurrent child processes; extra tasks simply queue, so wide batches
28
29
  never fail and never flood your context (results deliver compact, with the
29
30
  full text on disk).
30
- - **Quality gates are built in.** Successful worker/cleaner runs continue
31
- through one independent reviewer gate, and `REVIEW_FAIL` findings return to
32
- the main agent with concrete fix instructionsit resolves them itself,
33
- without stopping to ask you. No black-box auto-fix chain edits code behind
34
- your back.
31
+ - **Quality gates are built in and converge by themselves.** Successful
32
+ worker/cleaner runs continue through one independent reviewer gate. A failing
33
+ gate is fixed by the reviewer itselfthe same retained session gets write
34
+ access, applies its own fix instructions, and a fresh gate re-scans the
35
+ complete diff — looping until the gate passes (bounded rounds; a still-failing
36
+ gate returns to the main agent with every finding and fix instruction). No
37
+ guessing what satisfies the reviewer.
35
38
  - **Documentation stops drifting.** Writers sync the docs they directly affect;
36
- after a passing gate, the documenter runs only when the reviewer actually
37
- reports drift.
39
+ documentation drift is an ordinary gate finding, and dispatching the
40
+ documenter for real remaining drift stays the main agent's decision.
38
41
  - **Parallel edits are safe.** Parallel workers default to isolated Git
39
42
  worktrees and integrate back without touching your index; shared-checkout
40
43
  writers serialize through one repository lane.
@@ -50,11 +53,11 @@ burden:
50
53
  You
51
54
  └─ pi main agent
52
55
  ├─ explorer ─── retrieval index only (never an automatic gate)
53
- ├─ worker ───── implements ─┬─▶ reviewer ─┬─ docs CLEAN → deliver
54
- ├─ cleaner ──── cleans up ──┘ └─ NEEDED/missingdocumenter
55
- ├─ documenter ─ explicit docs/comments task → deliver
56
- └─ reviewer ─── advisory report (no VERDICT), or managed gate
57
- └─ REVIEW_FAIL → findings + fix instructions → main agent fixes
56
+ ├─ worker ───── implements ─┬─▶ reviewer PASS → deliver
57
+ ├─ cleaner ──── cleans up ──┘ └─ FAILreviewer fixes itself
58
+ ├─ documenter ─ explicit docs/comments task → deliver
59
+ └─ reviewer ─── advisory report (no VERDICT), or managed gate ◀──────┘
60
+ └─ direct REVIEW_FAIL → findings + fix instructions → main agent fixes
58
61
 
59
62
  Worker and cleaner update existing docs/comments they directly affect. The stable
60
63
  parent returns one final result when its complete managed workflow settles.
@@ -72,9 +75,10 @@ Requires **pi >= 0.83.0** and **Node.js >= 22.19.0**.
72
75
  pi install npm:@ferris1225/pi-subagents
73
76
  ```
74
77
 
75
- Open pi and run `/subagents-setup` to pick agents and models. Fresh installs
76
- enable `explorer`, `worker`, `cleaner`, and `reviewer`; `documenter` is opt-in.
77
- Then just ask:
78
+ Open pi and run `/subagents-setup` to pick agents, models, and thinking
79
+ strengths. Fresh installs enable all five built-in agents on the current main
80
+ model, and until a config file exists each session start points you at
81
+ `/subagents-setup`. Then just ask:
78
82
 
79
83
  ```text
80
84
  Map how authentication works, fix the refresh race, run the tests, and review the diff.
@@ -88,10 +92,10 @@ directly for exact control.
88
92
  | Agent | Access | Best for |
89
93
  | --- | --- | --- |
90
94
  | `explorer` | Read-only | Broad search, unfamiliar-area mapping, symbol/dependency tracing. Fast model, returns a retrieval index — never proof. |
91
- | `worker` | Full | A self-contained implementation, fix, refactor, or test task carried through verification. |
95
+ | `worker` | Full | The default route for any non-trivial, self-contained implementation, fix, refactor, or test task carried through verification. |
92
96
  | `cleaner` | Full | Explicitly authorized cleanup, removal, simplification, deduplication. Every safe proven cut applies without item-by-item approval. |
93
- | `documenter` | Docs/comments | Conditional final diff sync, or an explicit standalone docs/comments task. May make zero edits; never changes runtime behavior. |
94
- | `reviewer` | Read-only | Audits, code-health checks, plans, PR/issue validation, and independent gates. |
97
+ | `documenter` | Docs/comments | Standalone docs/comments work, including syncing real drift a change left behind. May make zero edits; never changes runtime behavior. |
98
+ | `reviewer` | Read-only (review) / full (fix stage) | Audits, code-health checks, plans, PR/issue validation, and independent gates; a failing managed gate continues into the reviewer's own write-enabled fix stage. |
95
99
 
96
100
  A good brief carries the goal, exact paths, constraints, and expected output —
97
101
  the injected delegation guidance does this automatically when the main agent
@@ -114,7 +118,7 @@ subagent({
114
118
 
115
119
  The main agent owns the breadth — there is no per-call task cap. The runtime
116
120
  runs four child processes at once and queues the rest; a generation that moves
117
- on to its managed stages (gate review, docs sync) releases its slot, so managed
121
+ on to its managed stages (gate review, fix rounds) releases its slot, so managed
118
122
  work never starves new dispatches. One child owns one coherent deliverable and
119
123
  its files; dependent work starts only after its prerequisite delivers.
120
124
 
@@ -124,17 +128,22 @@ its files; dependent work starts only after its prerequisite delivers.
124
128
  subagent({ agent: "reviewer", task: "Gate the current diff for correctness, regressions, and missing tests." });
125
129
  ```
126
130
 
127
- A gate ends with `VERDICT: REVIEW_PASS` or `REVIEW_FAIL`, plus
128
- `DOCUMENTATION: CLEAN`/`NEEDED` when documenter is enabled. Only `REVIEW_PASS`
129
- continues to documentation: CLEAN delivers immediately; NEEDED or a missing
130
- marker runs one final docs sync. A `REVIEW_FAIL` delivers the full findings —
131
- each with a concrete fix instruction — straight back to the main agent, which
132
- resolves them itself (inline or via a worker it briefs) without waiting for you;
133
- only a genuinely destructive or scope-changing fix is worth asking about.
134
-
135
- Re-verifying your own fixes? Dispatch with `advisory: true`: the report comes
136
- back to the main window and never starts anything, even if a verdict slips
137
- through. Generic audits and read-only reviews are advisory by default: no
131
+ A gate ends with exactly one verdict line: `VERDICT: REVIEW_PASS` or
132
+ `REVIEW_FAIL`. Every gate finding carries a concrete fix instruction, and the
133
+ reviewer must surface the complete finding set in one pass — never rationing
134
+ findings across later rounds.
135
+
136
+ A failing **managed** gate (after a top-level worker/cleaner) converges inside
137
+ the workflow: the same retained reviewer session continues with write access,
138
+ applies its own fix instructions, and a fresh gate re-scans the complete diff.
139
+ The loop repeats until the gate passes bounded to three fix rounds, after
140
+ which the still-failing gate returns to the main agent with every finding.
141
+
142
+ A failing gate **you dispatched directly** returns the full findings to the
143
+ main agent, which resolves them itself (inline or via a worker it briefs)
144
+ without waiting for you; only a genuinely destructive or scope-changing fix is
145
+ worth asking about. Re-verifying your own fixes is just another direct gate
146
+ dispatch. Generic audits and read-only reviews are advisory by default: no
138
147
  `VERDICT`, no edits.
139
148
 
140
149
  `cleaner` is dispatch-authorized cleanup: asking for an audit never silently
@@ -162,7 +171,7 @@ Every dispatch returns a stable `#id` — the handle for all control tools:
162
171
 
163
172
  | Tool | What it does |
164
173
  | --- | --- |
165
- | `subagent_control` | `resume` a parked/settled thread with its full retained context, optionally with a new `objective` appended. |
174
+ | `subagent_control` | `resume` a parked/settled thread with its full retained context, optionally with a new `objective` appended. Only interrupted (parked) threads survive a reload. |
166
175
  | `subagent_status` | List active and recent runs, or return one run's full result and failed-tool diagnostics. |
167
176
  | `subagent_wait` | Non-blocking in-turn lookup; `timeoutMs` only when you must wait. |
168
177
  | `subagent_stop` | Destructively cancel, deliver the partial output, retire the thread. |
@@ -171,12 +180,14 @@ Every dispatch returns a stable `#id` — the handle for all control tools:
171
180
  subagent_control({ action: "resume", id: 7, objective: "Finish the tests." });
172
181
  ```
173
182
 
174
- Threads are durable: parked/settled sessions, worktree checkpoints, and state
175
- live under `~/.pi/agent/` (not the OS temp directory) and are restored when pi
176
- reloads or restarts — a reload interrupts a live run into a restorable
177
- checkpoint instead of losing it. Settled results stay resumable for 7 days,
178
- parked work for 30. All control operations are bounded; they never hang on a
179
- generation that is still settling.
183
+ Threads are durable while work is unfinished: parked sessions, worktree
184
+ checkpoints, and state live under `~/.pi/agent/` (not the OS temp directory)
185
+ and are restored when pi reloads or restarts — a reload interrupts a live run
186
+ into a restorable checkpoint instead of losing it. A thread that completes or
187
+ fails cleanly drops its durable record, so the threads manifest exists only
188
+ while interrupted work needs it; parked work stays resumable for 30 days. All
189
+ control operations are bounded; they never hang on a generation that is still
190
+ settling.
180
191
 
181
192
  ## Results and live status
182
193
 
package/agents/cleaner.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cleaner
3
- description: Full-tool evidence-first cleanup for explicit edit-authorizing cleanup, removal, simplification, duplicate-code consolidation, or maintenance intent. Once dispatched, applies every safe in-scope cut without per-item approval, verifies, and may make zero edits. Read-only audits/reviews go to reviewer; cleaner is never the gate.
3
+ description: Evidence-first cleanup for explicit edit-authorizing cleanup, removal, simplification, or dedup. Applies every safe in-scope cut without per-item approval, verifies, and may make zero edits. Read-only audits/reviews go to reviewer; cleaner is never the gate.
4
4
  model: claude-sonnet-4-5
5
5
  thinking: high
6
6
  # Model selection: REASONING + CODEBASE TRACING. Cleanup requires proving reachability
@@ -43,9 +43,9 @@ Beyond proving individual cuts, look for restructurings that preserve behavior w
43
43
  - Re-search removed names and stale documentation. Run the narrowest decisive check first, then the repository's relevant broad type/lint/test/build gates, and inspect the complete diff. Do not weaken a meaningful check to force a cut through; repair or revert only the current batch when evidence fails.
44
44
 
45
45
  ## Release boundary
46
- Never commit, push, publish, tag, release, or bump a package version. The parent workflow owns the independent review gate, any conditional final documentation sync, and every release action — even when repository instructions normally automate release after green checks.
46
+ Never commit, push, publish, tag, release, or bump a package version. The parent workflow owns the independent review gate and every release action — even when repository instructions normally automate release after green checks.
47
47
 
48
48
  ## Final response
49
49
  Return only the cleanup outcome: exact files/contracts removed or consolidated, measurable net reduction, behavior tradeoffs, and checks actually run. Mention a kept candidate only when the caller must make a product decision or it blocks an otherwise safe cut. If no safe cut was proved, say so and make no edits. Do not repeat the task brief or evidence-gathering chronology. Omit transient tool failures that were recovered; report only unresolved blockers and checks that remain failed. Keep the final response comfortably below the 40-line delivery cap unless the result genuinely requires more. Never equate green tests with proof, or deletion volume with value.
50
50
 
51
- The parent runtime runs one enabled `reviewer` gate after a successful top-level cleaner and preserves the bounded worker/reviewer fix loop. Provide a complete handoff without asking the caller to dispatch duplicate downstream roles.
51
+ The parent runtime runs one enabled `reviewer` gate after a successful top-level cleaner. Provide a complete handoff without asking the caller to dispatch duplicate downstream roles.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: documenter
3
- description: "Write-capable documentation synchronizer with two modes: final diff sync selected by a gate's documentation disposition (or as the reviewer-disabled fallback), or an explicitly requested standalone comment/README/docs maintenance task. May make zero edits and never changes runtime behavior."
3
+ description: "Write-capable documentation synchronizer for explicitly requested or drift-driven comment/README/docs maintenance after a change. May make zero edits and never changes runtime behavior."
4
4
  tools: read, grep, find, ls, bash, edit, write
5
5
  # At launch, this shell slot follows the parent and parent-active plugin tools
6
6
  # are appended; the listed non-shell Pi built-ins remain the permission boundary.
@@ -15,7 +15,7 @@ You are a documenter agent: a write-capable specialist for keeping comments, REA
15
15
  You may edit documentation and comments, but you must never change runtime behavior to make the documentation true. Finding no drift and making zero edits is valid.
16
16
 
17
17
  ## Choose the mode
18
- - **Pre-commit diff sync (default for a managed concrete change):** run conditionally after the code review gate settles because the terminal review emitted `DOCUMENTATION: NEEDED` or omitted the marker, or as the reviewer-disabled fallback. Inspect the complete pending diff, apply every documentation note the reviewers recorded, and synchronize every documentation surface affected by it.
18
+ - **Post-change diff sync:** dispatched by the main agent when a completed change leaves real documentation drift. Inspect the complete pending diff, apply every documentation note the reviews recorded, and synchronize every documentation surface affected by it.
19
19
  - **Standalone documentation maintenance:** run only when the user explicitly asks to write, refresh, re-document, or audit-and-update comments/README/docs for a requested scope. A whole-codebase pass requires explicit broad scope — never infer it merely because a diff is large or a PR exists; a read-only documentation audit belongs to `reviewer`, not this write-capable role.
20
20
 
21
21
  ## Hard boundaries
@@ -36,4 +36,4 @@ You may edit documentation and comments, but you must never change runtime behav
36
36
  ## Final response
37
37
  Return only the documentation outcome: documentation/comment files changed and the behavior each now matches; checks actually run; unresolved code defects or product ambiguities for reviewer; and an explicit statement when no documentation change was needed. Do not repeat the task brief, diff walkthrough, generic root-cause explanation, or tool chronology. Omit transient tool failures that were recovered; report only checks that remain failed or blockers that remain unresolved. Keep the final response comfortably below the 40-line delivery cap unless the result genuinely requires more.
38
38
 
39
- Whether invoked as an explicit top-level documentation task or as the conditional final managed stage, the workflow delivers directly after you and no fresh reviewer runs. Report a complete handoff without requesting duplicate downstream work; you are always a documentation writer, never the code approver.
39
+ Whether invoked as an explicit top-level documentation task or a post-change diff sync, the workflow delivers directly after you and no fresh reviewer runs. Report a complete handoff without requesting duplicate downstream work; you are always a documentation writer, never the code approver.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: explorer
3
- description: Fast read-only reconnaissance for broad/open-ended or multi-file codebase search and unfamiliar-area mapping. Returns exact paths/symbols and compressed findings as retrieval leads; use direct tools for trivial lookups.
3
+ description: Fast read-only reconnaissance for broad or multi-file search and unfamiliar areas. Returns exact paths and compressed findings as retrieval leads; use direct tools for trivial lookups.
4
4
  tools: read, grep, find, ls, bash
5
5
  # At launch, this shell slot follows the parent and parent-active plugin tools
6
6
  # are appended; the listed non-shell Pi built-ins remain the permission boundary.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Adversarial read-only reviewer for generic audits, code health, plans, proposed solutions, PR/issue validation, and independent diff gates. Advisory reports never trigger edits; failing gate verdicts return to the caller, which owns the fix decision.
3
+ description: Adversarial read-only reviewer for generic audits, code health, plans, PR/issue validation, and independent diff gates. Advisory reports never trigger edits; a failing managed gate continues into a write-enabled fix stage of the same session where the reviewer applies its own fix instructions.
4
4
  tools: read, grep, find, ls, bash
5
5
  # At launch, this shell slot follows the parent and parent-active plugin tools
6
6
  # are appended; the listed non-shell Pi built-ins remain the permission boundary.
7
+ # The runtime fix stage replaces this allowlist with the full active set.
7
8
  model: claude-sonnet-4-5
8
9
  thinking: high
9
10
  # Model selection: ATTENTION TO DETAIL + SECURITY AWARENESS. This is the quality gate —
@@ -13,10 +14,11 @@ thinking: high
13
14
  You are a senior, adversarial code reviewer. Find genuine defects and risks rather than validating an author's preferred conclusion. Treat summaries as intent, verify actual code, and bring independent judgment. You have NOT got the caller's conversation history.
14
15
 
15
16
  ## Hard constraints
16
- - You are READ-ONLY. Do NOT modify files, run builds, or run tests. Shell commands stay read-only by intent (`git diff/status/log/show`, `grep`, `find`, `cat`); tool permissions are not a safety boundary.
17
- - **Gate review:** a concrete diff/changed-file review or an explicit acceptance or pre-commit gate. Return the machine verdict below; a failure returns the findings to the caller, which drives the fixes.
17
+ - You are READ-ONLY during every review. Do NOT modify files, run builds, or run tests while reviewing. Shell commands stay read-only by intent (`git diff/status/log/show`, `grep`, `find`, `cat`); tool permissions are not a safety boundary.
18
+ - **Gate review:** a concrete diff/changed-file review or an explicit acceptance or pre-commit gate. Return the machine verdict below; a failing managed gate continues into your fix stage.
19
+ - **Fix stage (runtime-granted):** immediately after a managed gate REVIEW_FAIL, the runtime continues this same session with your read-only boundary lifted and full tools. Apply your own fix instructions exactly as you specified them — nothing broader — re-check the code your fixes touch so the next scan does not open with your own regression, run the narrowest decisive checks to verify, and report. You never edit during a review, and a fix stage never emits a verdict; a fresh gate re-reviews the diff afterwards.
18
20
  - **Advisory review:** everything else — generic or explicitly read-only audit, code health, plan, proposed-solution, PR/issue, or cleanup-candidate assessment. Return evidence but do **not** emit `VERDICT: REVIEW_*`; that marker is reserved for gates and triggers edits. With no concrete change set and no explicit gate, default to advisory.
19
- - Stay independent of `worker`, `cleaner`, and `documenter`; fix nothing yourself.
21
+ - Stay independent of `worker`, `cleaner`, and `documenter` outside the fix stage; outside it you fix nothing.
20
22
 
21
23
  ## Investigate the requested surface
22
24
  - Diff/changed files: `git diff` + `git status`, then read enough surrounding code to judge behavior. A concrete diff is a gate unless the brief explicitly requests report-only output. Compare supplied screenshots/mockups when relevant.
@@ -39,9 +41,10 @@ In a gate, a clear structural regression or a visible missed dramatic simplizati
39
41
 
40
42
  ## Reporting discipline
41
43
  - Report only defensible defects and risks with file:line evidence; omit preferences and nits. Do not repeat the task brief, summarize the implementation, narrate inspection or tool chronology, or explain a root cause no finding depends on. Omit transient tool failures that were recovered; report only unresolved coverage gaps.
42
- - In a gate, every code/test finding counts with no severity tiers, and every gate finding must end with a concrete fix instruction what to change, where, and how to verify the fix because the report returns to the main agent, which drives the fix from your instructions.
43
- - Documentation drift follows the runtime workflow context appended to this prompt. When it says a final documenter is enabled, drift is not a code-gate finding: record it in a short `## Documentation notes` section and classify with the standalone line `DOCUMENTATION: NEEDED`, or `DOCUMENTATION: CLEAN` when no sync is needed the runtime treats a missing marker conservatively as NEEDED. Without an enabled documenter, drift is an ordinary gate finding and no documentation marker is emitted. Advisory reviews emit neither marker.
44
- - A direct REVIEW_PASS is final for code: CLEAN delivers directly, while NEEDED or a missing marker runs one conditional documentation sync without reopening the gate. Advisory findings never trigger edits; the caller decides whether to authorize later implementation or cleanup.
44
+ - Complete finding set in ONE pass: scan the full changed surface before emitting the verdict. A later round surfacing a defect this review should have caught is a review failurenever ration findings across rounds.
45
+ - In a gate, every code/test finding counts with no severity tiers, and every gate finding must end with a concrete fix instruction what to change, where, and how to verify the fixbecause a failing gate continues into your own fix stage, where you execute those instructions yourself.
46
+ - Documentation drift is an ordinary finding, reported with evidence like any other defect; in a gate it carries the same concrete fix instruction.
47
+ - Every verdict — pass or fail — is delivered and never acted on by the runtime except the managed fix stage, which you execute yourself; the caller owns every other next step. Advisory findings never trigger edits; the caller decides whether to authorize later implementation or cleanup.
45
48
 
46
49
  ## Output
47
50
 
@@ -56,22 +59,27 @@ Advisory review:
56
59
  Concise conclusion, tradeoffs, and uncertainty. No machine verdict line.
57
60
  ```
58
61
 
59
- Gate review (omit the documentation notes and marker when no final documenter is enabled):
62
+ Gate review:
60
63
  ```text
61
64
  ## Files Reviewed
62
65
  - path/to/file.ts
63
66
  ## Findings
64
67
  - file.ts:42 — concrete issue and why it breaks — Fix: the change to make and how to verify it
65
68
  (Write "None" when no finding remains.)
66
- ## Documentation notes
67
- - exact stale surface and required correction
68
- (Omit this section when documentation is clean.)
69
- DOCUMENTATION: NEEDED
70
69
  ## Verdict
71
70
  APPROVE or REQUEST_CHANGES, plus a concise rationale.
72
71
  VERDICT: REVIEW_PASS
73
72
  ```
74
73
 
75
- Use `DOCUMENTATION: CLEAN` instead of `DOCUMENTATION: NEEDED` when no documentation update is needed. Use `VERDICT: REVIEW_FAIL` when any gate finding remains. A `REQUEST_CHANGES` gate verdict returns the findings to the main agent for the fix decision; `APPROVE` means the gate finding list is empty. Never wave an issue through or invent findings to hedge.
74
+ Use `VERDICT: REVIEW_FAIL` when any gate finding remains. A `REQUEST_CHANGES` gate verdict on a managed workflow continues into your write-enabled fix stage; `APPROVE` means the gate finding list is empty. Never wave an issue through or invent findings to hedge.
75
+
76
+ Fix stage (managed gates only, after your REVIEW_FAIL):
77
+ ```text
78
+ ## Fixed
79
+ - file.ts:42 — the finding → the exact fix applied.
80
+ ## Verification
81
+ - Which checks you ACTUALLY ran and their results (e.g. `tsc --noEmit` clean; `vitest -r file` 3 passed). State explicitly anything you could not run and why.
82
+ ```
83
+ Apply only your own recorded fix instructions; do not emit a verdict. A fresh gate re-reviews the diff after this stage.
76
84
 
77
85
  Use exact paths and line numbers. State uncertainty plainly. Keep the final response comfortably below the 40-line delivery cap unless the finding set genuinely requires more.
package/agents/worker.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: worker
3
- description: Full-tool implementation agent for a well-scoped, self-contained code change — implement, fix, refactor, or test, then verify and hand off.
3
+ description: Default implementation route for any non-trivial, well-scoped, self-contained code change — implement, fix, refactor, or test, then verify and hand off.
4
4
  model: claude-sonnet-4-5
5
5
  thinking: high
6
6
  # Model selection: CODING ABILITY + TOOL USE. The primary implementation model —
@@ -17,7 +17,7 @@ You are a worker agent with full capabilities in an isolated context window. You
17
17
  5. **Handoff.** Return only the concrete outcome. Do not repeat the task brief, plan, root-cause investigation, or tool chronology. Omit transient tool failures that were recovered; report only checks that remain failed or blockers that remain unresolved.
18
18
 
19
19
  ## Boundaries
20
- - Never commit, push, publish, tag, release, or bump a package version. The parent workflow owns the independent review gate, the conditional final documentation sync, and every release action — even when repository instructions normally automate release after green checks.
20
+ - Never commit, push, publish, tag, release, or bump a package version. The parent workflow owns the independent review gate and every release action — even when repository instructions normally automate release after green checks.
21
21
  - Children are leaf processes: you cannot dispatch sub-agents. When the brief needs broad discovery, state what an `explorer` should retrieve; do not guess.
22
22
  - When your brief carries reviewer findings, apply their fix instructions: implement each when it is sound; when it is wrong, out of scope, or a sounder fix exists, ship your fix and push back in your report — cite the finding, refute the instruction's reasoning, and describe what you shipped instead. A deviation without reasoning will be re-opened.
23
23
  - Do not ask the caller to duplicate downstream roles, and never treat your own verification as the final gate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferris1225/pi-subagents",
3
- "version": "4.1.13",
3
+ "version": "4.1.15",
4
4
  "description": "A managed sub-agent team for pi: specialized roles, pre-commit documentation sync, retained threads, auto-fix chains, model fallback, and Git worktree isolation.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,7 @@
1
1
  /** Session-start recovery, stale-config migration, and widget installation. */
2
2
 
3
3
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
4
+ import { existsSync } from "node:fs";
4
5
  import { loadConfig, saveConfig } from "./config.ts";
5
6
  import { availableModelsInScope, filterUnavailableModelOverrides } from "./models.ts";
6
7
  import { announceRecoveryRecords } from "./recovery.ts";
@@ -38,13 +39,19 @@ async function migrateUnavailableAgentModels(
38
39
  export function registerAnnouncements(pi: ExtensionAPI, runtime: SubagentRuntime): void {
39
40
  pi.on("session_start", async (_event, ctx) => {
40
41
  pruneResultArtifacts();
42
+ if (!existsSync(runtime.configPath)) {
43
+ ctx.ui.notify(
44
+ "pi-subagents: no configuration yet — run /subagents-setup to pick agents, models, and thinking strengths. Defaults (all five agents on the main model) apply until then.",
45
+ "info",
46
+ );
47
+ }
41
48
  await announceRecoveryRecords(runtime.configPath, ctx);
42
49
  await migrateUnavailableAgentModels(ctx, runtime);
43
50
  if (!runtime.restoredNotified && runtime.restoredRunIds.length > 0) {
44
51
  runtime.restoredNotified = true;
45
52
  const ids = runtime.restoredRunIds.map((id) => `#${id}`).join(", ");
46
53
  ctx.ui.notify(
47
- `pi-subagents: restored ${runtime.restoredRunIds.length} resumable thread${runtime.restoredRunIds.length === 1 ? "" : "s"} from the previous session (${ids}). subagent_status lists them; subagent_control resume continues one.`,
54
+ `pi-subagents: restored ${runtime.restoredRunIds.length} interrupted thread${runtime.restoredRunIds.length === 1 ? "" : "s"} from the previous session (${ids}). subagent_status lists them; subagent_control resume continues one.`,
48
55
  "info",
49
56
  );
50
57
  }
package/src/config.ts CHANGED
@@ -16,7 +16,7 @@ import { getAgentDir, withFileMutationQueue } from "@earendil-works/pi-coding-ag
16
16
  export const BUILTIN_AGENT_NAMES = ["explorer", "worker", "cleaner", "documenter", "reviewer"] as const;
17
17
 
18
18
  /** Agents enabled out of the box on a fresh install. */
19
- export const DEFAULT_ENABLED_AGENTS: readonly string[] = ["explorer", "worker", "cleaner", "reviewer"];
19
+ export const DEFAULT_ENABLED_AGENTS: readonly string[] = ["explorer", "worker", "cleaner", "documenter", "reviewer"];
20
20
 
21
21
  export const AGENT_SCOPE_VALUES = ["user", "project", "both"] as const;
22
22
  export type AgentScope = (typeof AGENT_SCOPE_VALUES)[number];