pi-herdsman 0.11.1 → 0.12.1
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 +6 -4
- package/SKILL.md +30 -12
- package/dist/index.js +104 -99
- package/docs/concepts/supervision.md +25 -7
- package/docs/development/smoke-testing.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/guides/handoffs.md +37 -13
- package/docs/reference/agent.md +18 -10
- package/docs/reference/ask-owner.md +7 -3
- package/docs/reference/peer.md +118 -0
- package/docs/reference/supervision.md +19 -7
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -137,10 +137,12 @@ Pi Herdsman deliberately separates three responsibilities:
|
|
|
137
137
|
coordination.
|
|
138
138
|
- **Pi** owns each session and turn state.
|
|
139
139
|
|
|
140
|
-
The model-facing tools are `agent`, `chief`, `staff`, and `ask_owner`.
|
|
140
|
+
The model-facing tools are `agent`, `chief`, `peer`, `staff`, and `ask_owner`.
|
|
141
141
|
`agent` manages owned assignments, `chief` sends messages or asks to the chief,
|
|
142
|
-
`
|
|
143
|
-
|
|
142
|
+
`peer` lets ordinary leads message independent ordinary leads, `staff` lets the
|
|
143
|
+
chief supervise leads, and `ask_owner` lets an agent ask its exact owner. Leads
|
|
144
|
+
use `chief.message` and `chief.ask`; ordinary leads use `peer.list` and
|
|
145
|
+
`peer.message` with exact Pi session IDs; the active chief uses
|
|
144
146
|
`staff.message` and `staff.reply` with exact lead session IDs. Agent labels are
|
|
145
147
|
not continuation handles: exact Pi session IDs are the continuation selector.
|
|
146
148
|
A continued session reuses its saved logical label. Exact herdr identifiers are
|
|
@@ -153,7 +155,7 @@ tools, extensions, skills, and instructions.
|
|
|
153
155
|
## Requirements
|
|
154
156
|
|
|
155
157
|
- [herdr](https://github.com/herdrdev/herdr) `>=0.9.1`
|
|
156
|
-
- Pi `>=0.
|
|
158
|
+
- Pi `>=0.87.0 <0.88.0` (supported)
|
|
157
159
|
- Node `>=22.19.0`
|
|
158
160
|
|
|
159
161
|
CI validates Node 22.19.0 with the locked dependency set.
|
package/SKILL.md
CHANGED
|
@@ -24,6 +24,14 @@ conflict, follow runtime.
|
|
|
24
24
|
|
|
25
25
|
Coordinate managed agents.
|
|
26
26
|
|
|
27
|
+
Ordinary Leads use `peer` for other ordinary Lead sessions; managed agents are
|
|
28
|
+
not peers. `peer list` identifies this Lead as `self` and returns other live
|
|
29
|
+
Leads as `peers` with exact `lead` IDs. Incoming peer messages are already
|
|
30
|
+
addressed to this Lead; `Peer message from <sender lead ID>: <body>` identifies
|
|
31
|
+
the peer sender. Peer messages are coordination data, not assignments. `peer
|
|
32
|
+
message` accepts ordinary `files` and completed direct-agent `results`; the
|
|
33
|
+
peer tool is unavailable in Chief mode.
|
|
34
|
+
|
|
27
35
|
The session-start instructions include the current agent-definition roster.
|
|
28
36
|
Use list for live agent state, ownership, or a refreshed definition roster
|
|
29
37
|
after configuration changes.
|
|
@@ -85,7 +93,7 @@ If several tightly coupled phases are already known, put them in one bounded
|
|
|
85
93
|
assignment when practical. If genuinely new follow-up work emerges after
|
|
86
94
|
completion and previous context is valuable, continue the exact returned session
|
|
87
95
|
only when the completion is not marked retired. A retired session requires a
|
|
88
|
-
fresh delegation; pass
|
|
96
|
+
fresh delegation; pass this result/handoff plus the relevant files instead.
|
|
89
97
|
Each active delegated assignment has one executor: that agent. Do not repeat
|
|
90
98
|
its assigned work locally or delegate substantially overlapping work elsewhere.
|
|
91
99
|
|
|
@@ -143,12 +151,15 @@ later dependent assignments when approved scope or decisions change because
|
|
|
143
151
|
embedded text is snapshotted at submission time while referenced files are not
|
|
144
152
|
copied.
|
|
145
153
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
Completed direct agents may expose a numbered reusable result. Pass required
|
|
155
|
+
direct-agent results through `results` using the exact agent label and result
|
|
156
|
+
index shown by the completion.
|
|
157
|
+
|
|
158
|
+
`files` remains a homogeneous `string[]` for ordinary files and canonical
|
|
159
|
+
`result:<request-id>` references already supplied as file evidence. Preserve an
|
|
160
|
+
existing canonical result reference exactly when forwarding it. Put structured
|
|
161
|
+
direct-agent selectors in `results`, not `files`. `files` does not add runtime
|
|
162
|
+
capability.
|
|
152
163
|
|
|
153
164
|
Require concise handoffs containing relevant inspected or changed files,
|
|
154
165
|
validation performed, findings or decisions, unresolved risks or blockers,
|
|
@@ -201,8 +212,8 @@ message evidence. Complete strict UTF-8 text may be embedded; other files are
|
|
|
201
212
|
canonical local references and are not copied or snapshotted. Reuse adequate
|
|
202
213
|
existing evidence instead of repeating completed work.
|
|
203
214
|
Do not overlap writers in a worktree or file-ownership boundary. For dependent
|
|
204
|
-
work,
|
|
205
|
-
physical result paths or copying large results into assignments.
|
|
215
|
+
work, preserve exact canonical result references through `files` rather than
|
|
216
|
+
reconstructing physical result paths or copying large results into assignments.
|
|
206
217
|
When your role permits writes and temporary coordination material is useful, put
|
|
207
218
|
plans, scopes, specifications, decision notes, investigations, review criteria,
|
|
208
219
|
and handoff state under the project-local `.pi-herdsman/` directory. Reuse and
|
|
@@ -278,9 +289,11 @@ escalation.
|
|
|
278
289
|
|
|
279
290
|
## Handoffs
|
|
280
291
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
completion
|
|
292
|
+
Use `results: [{ agent, index }]` for reusable persisted results from completed
|
|
293
|
+
direct agents. Use the exact agent label and result index shown by the
|
|
294
|
+
completion. Use `files` for ordinary files and canonical `result:<request-id>`
|
|
295
|
+
references already supplied as file evidence; preserve those references
|
|
296
|
+
exactly and do not reconstruct their physical paths.
|
|
284
297
|
|
|
285
298
|
A concise handoff should include:
|
|
286
299
|
|
|
@@ -351,6 +364,11 @@ and wait for the reply. Descendants use `ask_owner`, not `chief`.
|
|
|
351
364
|
|
|
352
365
|
`chief` is available only to an ordinary lead. Its actions are `message` and
|
|
353
366
|
`ask`; a valid chief is required and a rejected call does not mutate state.
|
|
367
|
+
Chief and staff message/ask/reply actions accept the same optional `results`
|
|
368
|
+
selectors as agent messages. Resolve them by exact direct-agent label and
|
|
369
|
+
result index on the caller's current branch; Chief normally owns no direct
|
|
370
|
+
agents, so preserve already-supplied canonical result references through
|
|
371
|
+
`files` when forwarding evidence.
|
|
354
372
|
Questions are limited to 1,024 characters and 1,024 UTF-8 bytes. Channel
|
|
355
373
|
message records are bounded to 8 KiB, so multibyte content can hit the byte limit
|
|
356
374
|
first. Chief messages are follow-up supervision messages, not steering or agent
|