pi-herdsman 0.13.0 → 0.13.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/SKILL.md +46 -52
- package/dist/index.js +118 -218
- package/docs/concepts/delegation.md +14 -2
- package/docs/concepts/lifecycle.md +14 -7
- package/docs/development/documentation.md +17 -19
- package/docs/guides/handoffs.md +13 -4
- package/docs/reference/agent.md +5 -0
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -5,18 +5,18 @@ description: Optional reinforcement and strategy for orchestrating managed agent
|
|
|
5
5
|
|
|
6
6
|
# Pi Herdsman
|
|
7
7
|
|
|
8
|
-
Pi Herdsman injects the
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
This skill
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
Pi Herdsman injects the operational contract into active leads and managed
|
|
9
|
+
agents at runtime. Loading this skill is optional and is never required for
|
|
10
|
+
correct operation.
|
|
11
|
+
|
|
12
|
+
This skill reinforces high-salience runtime invariants and adds strategy,
|
|
13
|
+
rationale, examples, and deeper product guidance. The active runtime contract
|
|
14
|
+
remains authoritative. Loading this skill does not grant tools, change
|
|
15
|
+
capabilities, alter lifecycle semantics, or introduce requirements that do not
|
|
16
|
+
exist at runtime. A behavioral invariant may be reinforced at multiple
|
|
17
|
+
model-facing decision points when timing or salience materially affects
|
|
18
|
+
reliability; those projections preserve one meaning rather than defining
|
|
19
|
+
independent rules.
|
|
20
20
|
|
|
21
21
|
## Runtime controller contract
|
|
22
22
|
|
|
@@ -24,6 +24,22 @@ conflict, follow runtime.
|
|
|
24
24
|
|
|
25
25
|
Coordinate managed agents.
|
|
26
26
|
|
|
27
|
+
Use these high-salience rules for the model-facing agent boundary:
|
|
28
|
+
|
|
29
|
+
- Use agent for genuinely independent or context-heavy work; keep small,
|
|
30
|
+
tightly coupled work local.
|
|
31
|
+
- Each unresolved unit of work has one executor. Delegating a scope transfers
|
|
32
|
+
its execution ownership to that agent until the assignment resolves; do not
|
|
33
|
+
execute or assign overlapping work while it is delegated.
|
|
34
|
+
- For agent handoffs, `task`/`files` carry assignment evidence and
|
|
35
|
+
`fork`/`continue` carry selected Pi history; do not assume the caller's
|
|
36
|
+
conversation or attachments are inherited.
|
|
37
|
+
- When agent work is unresolved, handle required agent control, then continue
|
|
38
|
+
only necessary work you still own or end the turn without concluding; agent
|
|
39
|
+
results or attention will resume the session automatically. Do not check
|
|
40
|
+
progress with list, inspect, transcript, status requests, steering, sleep, or
|
|
41
|
+
other waiting mechanisms, and do not invent work merely to remain active.
|
|
42
|
+
|
|
27
43
|
Ordinary Leads use `peer` for other ordinary Lead sessions; managed agents are
|
|
28
44
|
not peers. `peer list` identifies this Lead as `self` and returns other live
|
|
29
45
|
Leads as `peers` with exact `lead` IDs. Incoming peer messages are already
|
|
@@ -33,8 +49,9 @@ message` accepts ordinary files and completed direct-agent result refs through
|
|
|
33
49
|
`files`; the peer tool is unavailable in Chief mode.
|
|
34
50
|
|
|
35
51
|
The session-start instructions include the current agent-definition roster.
|
|
36
|
-
Use list
|
|
37
|
-
|
|
52
|
+
Use list when fresh agent state or ownership is materially needed for a concrete
|
|
53
|
+
control or recovery decision, or to refresh the definition roster after
|
|
54
|
+
configuration changes. Do not use list merely to check progress.
|
|
38
55
|
|
|
39
56
|
Use delegate to start one bounded assignment from an agent definition.
|
|
40
57
|
Use continue to start one bounded assignment from an exact historical Pi session.
|
|
@@ -88,38 +105,10 @@ conflicting evidence as unresolved. Keep one writer per worktree or file-
|
|
|
88
105
|
ownership boundary. Use a capable definition or report blocked when a required
|
|
89
106
|
runtime capability is unavailable.
|
|
90
107
|
|
|
91
|
-
Delegate genuinely independent or context-heavy work. Prefer agents for broad
|
|
92
|
-
file inspection, large logs or command output, and dataset analysis. Keep small,
|
|
93
|
-
tightly coupled work local.
|
|
94
|
-
If several tightly coupled phases are already known, put them in one bounded
|
|
95
|
-
assignment when practical. If genuinely new follow-up work emerges after
|
|
96
|
-
completion and previous context is valuable, continue the exact returned session
|
|
97
|
-
only when the completion is not marked retired. A retired session requires a
|
|
98
|
-
fresh delegation; pass this result/handoff plus the relevant files instead.
|
|
99
|
-
Each active delegated assignment has one executor: that agent. Do not repeat
|
|
100
|
-
its assigned work locally or delegate substantially overlapping work elsewhere.
|
|
101
|
-
|
|
102
|
-
After starting an agent assignment or receiving an agent result or attention
|
|
103
|
-
event, reassess the remaining work. Handle required agent control when needed.
|
|
104
|
-
If another concrete, necessary objective is independent of active agent
|
|
105
|
-
assignments and an authorized agent is the right owner, delegate it. If a
|
|
106
|
-
concrete, necessary independent objective is best handled locally and doing it
|
|
107
|
-
now materially advances the task, do that work, then reassess.
|
|
108
|
-
|
|
109
|
-
If further useful progress depends on active agents, or no other concrete,
|
|
110
|
-
necessary independent work remains, end your turn without concluding the task.
|
|
111
|
-
Agent results or attention will resume this session automatically. Do not
|
|
112
|
-
conclude or produce the final synthesis while unresolved agent work remains.
|
|
113
|
-
Do not invent side work, broaden scope, perform speculative or precautionary
|
|
114
|
-
exploration, list, inspect, or transcript merely for progress, steer merely for status, sleep,
|
|
115
|
-
poll, or otherwise keep the turn alive while agent results are pending.
|
|
116
|
-
|
|
117
108
|
If list reports result_error, do not start a new delegation over unresolved
|
|
118
109
|
work. Resolve mailbox persistence first, then close the exact agent before
|
|
119
110
|
starting another assignment; follow the stored recovery nextAction.
|
|
120
111
|
|
|
121
|
-
Before delegate, continue, steer, interrupt, or reply, make the message self-contained.
|
|
122
|
-
|
|
123
112
|
Do not attach or mention agent instruction files such as AGENTS.md, CLAUDE.md,
|
|
124
113
|
GEMINI.md, or equivalents merely because they exist. Rely on normal project or
|
|
125
114
|
runtime discovery when it supplies those instructions.
|
|
@@ -133,16 +122,17 @@ Skills are separate. Attach a required SKILL.md only when the task needs it and
|
|
|
133
122
|
the selected definition does not already provide that skill. Ordinary relevant
|
|
134
123
|
source, documentation, configuration, and evidence files remain attachable.
|
|
135
124
|
|
|
136
|
-
Complete strict UTF-8 text is embedded when it fits;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
125
|
+
Complete strict UTF-8 text is embedded when it fits; other files are canonical
|
|
126
|
+
local references with byte size. Embedded text is snapshotted; referenced files
|
|
127
|
+
are not copied or snapshotted. files transfers inline content or canonical
|
|
128
|
+
references, not tools or runtime capabilities.
|
|
129
|
+
|
|
130
|
+
For agent handoffs, task text and `files` carry assignment-specific evidence.
|
|
131
|
+
`fork` and `continue` are the public mechanisms that deliberately select saved
|
|
132
|
+
Pi history. Do not assume the caller's conversation or caller-side attachments
|
|
133
|
+
are inherited by another agent session.
|
|
134
|
+
|
|
135
|
+
Pass relevant evidence explicitly through `files`; omit unrelated evidence.
|
|
146
136
|
|
|
147
137
|
Use the project-local `.pi-herdsman/` directory as the default workspace for
|
|
148
138
|
temporary coordination artifacts such as plans, scopes, specifications,
|
|
@@ -192,6 +182,10 @@ of duplicating work.
|
|
|
192
182
|
|
|
193
183
|
<!-- pi-herdsman-runtime-delegating-agent:start -->
|
|
194
184
|
|
|
185
|
+
Each unresolved unit of work has one executor. Delegating a scope transfers its
|
|
186
|
+
execution ownership to that agent until the assignment resolves; do not execute
|
|
187
|
+
or assign overlapping work while it is delegated.
|
|
188
|
+
Integrate direct agent results after resolution.
|
|
195
189
|
Own only the assigned objective and your direct permitted agents. Agent-started
|
|
196
190
|
agents are leaves. Keep tightly coupled work local; delegate bounded independent
|
|
197
191
|
or unfamiliar work when useful. Reuse adequate supplied evidence rather than
|