@ferris1225/pi-subagents 4.3.21 → 4.3.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 CHANGED
@@ -3,6 +3,12 @@
3
3
  Release notes for `@ferris1225/pi-subagents`. Only the most recent releases
4
4
  are kept here; every published version is preserved as a GitHub Release.
5
5
 
6
+ ## 4.3.22
7
+
8
+ - Use a subagent when the work can run independently in parallel, its boundary
9
+ is clear, and delegation will actually reduce cost or improve completion
10
+ quality. Role choice still prefers scout or artisan when that gate is met.
11
+
6
12
  ## 4.3.21
7
13
 
8
14
  - Ship `scout` and `artisan` only. Scout is the lightweight read-only researcher;
package/README.md CHANGED
@@ -8,10 +8,15 @@
8
8
 
9
9
  On-demand delegation for [pi](https://github.com/earendil-works/pi): a lightweight
10
10
  reader and an implementer, durable threads, and Git worktree isolation. Main
11
- prefers those two roles when the work fits, and keeps small understood edits itself.
11
+ uses a subagent when the work can run independently in parallel, the boundary
12
+ is clear, and delegation will actually reduce cost or improve completion quality.
12
13
 
13
14
  ## What's new
14
15
 
16
+ **4.3.22** — use a subagent when the work can run independently in parallel, its
17
+ boundary is clear, and delegation will actually reduce cost or improve
18
+ completion quality. Role choice stays with scout and artisan.
19
+
15
20
  **4.3.21** — two built-in roles. `scout` is the lightweight read-only researcher
16
21
  and `artisan` implements one substantial change. Steward and sentinel are no
17
22
  longer shipped. Role prompts follow the GPT-6 Astra guidance: the brief wins,
@@ -77,11 +82,13 @@ at "spawn a child with a prompt" and leave the hard parts — when to delegate,
77
82
  wide to fan out, what happens when a model dies, how results come
78
83
  back — with you. This extension owns them:
79
84
 
80
- - Main prefers `scout` for unfamiliar code or external facts and `artisan` for
81
- one substantial change. Independent phases go out together. A small edit
82
- already understood in the current context stays in main, and a free process
83
- slot is not a reason to invent another phase. Briefs define the outcome, done
84
- condition, useful context, and boundaries.
85
+ - Main uses a subagent when the work can run independently in parallel, its
86
+ boundary is clear, and delegation will actually reduce cost or improve
87
+ completion quality. `scout` covers unfamiliar code or external facts;
88
+ `artisan` covers one substantial change. A small edit already understood in
89
+ the current context stays in main, and a free process slot is not a reason
90
+ to invent another phase. Briefs define the outcome, done condition, useful
91
+ context, and boundaries.
85
92
  - A stable `phaseId` owns a logical phase in one resolved working directory even if
86
93
  its task wording changes. IDs are 1–80 ASCII letters, numbers, or `._:-`, starting
87
94
  with a letter or number, so lease output stays single-line. Exact normalized task+cwd
@@ -185,9 +192,11 @@ subagent({
185
192
  });
186
193
  ```
187
194
 
188
- Main prefers scout or artisan when that role fits, and puts independent phases
189
- in one `tasks` array. It keeps a small, already-understood edit itself. A free
190
- process slot is not a reason to invent another phase. The runtime paces
195
+ Main uses a subagent when the work can run independently in parallel, its
196
+ boundary is clear, and delegation will actually reduce cost or improve
197
+ completion quality. It puts those independent phases in one `tasks` array and
198
+ keeps a small, already-understood edit itself. A free process slot is not a
199
+ reason to invent another phase. The runtime paces
191
200
  execution: `maxConcurrentAgents: 0` (the default) keeps automatic capacity at half
192
201
  the machine's cores, bounded to 4–6 child processes. Set `maxConcurrentAgents` to
193
202
  1–6 for an explicit capacity. Wider batches queue and start as slots free.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferris1225/pi-subagents",
3
- "version": "4.3.21",
3
+ "version": "4.3.22",
4
4
  "description": "A managed sub-agent team for pi: lightweight scout research and artisan implementation, one-shot runs, read-only status, and Git worktree isolation.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -149,7 +149,7 @@ function preferredRoleUse(agents: readonly AgentConfig[]): string | undefined {
149
149
  }
150
150
  if (uses.length === 0) return undefined;
151
151
  const preference = uses.length === 1 ? `Prefer ${uses[0]}` : `Prefer ${uses[0]}, and ${uses[1]}`;
152
- return `${preference}. Delegate that work instead of doing it in main when a fresh context or an independent parallel phase would help. Keep a small edit already understood in the current context in main. Do not open a phase that repeats owned work, splits one tightly coupled change, or exists only to fill a free slot.`;
152
+ return `${preference}. Keep a small edit already understood in the current context in main. Do not open a phase that repeats owned work, splits one tightly coupled change, or exists only to fill a free slot.`;
153
153
  }
154
154
 
155
155
  function delegationBody(agents: AgentConfig[]): string {
@@ -160,6 +160,7 @@ function delegationBody(agents: AgentConfig[]): string {
160
160
 
161
161
  const dispatchRules = [
162
162
  "The user's task sets the outcome. If it conflicts with this section, follow the task. Admission still rejects duplicate phases and overlapping writers.",
163
+ "Use a subagent when the work can run independently in parallel, its boundary is clear, and delegation will actually reduce cost or improve completion quality.",
163
164
  ...(preferred ? [preferred] : []),
164
165
  "Give each phase one owner, a stable `phaseId`, and exact writer `scope`. Parallelize independent phases in one call; never overlap writers or duplicate an owned phase. Dependent phases wait for prerequisites. Scope is conflict metadata, not permissions or a sandbox.",
165
166
  "Children have no parent conversation; send a self-contained brief and reuse established evidence.",