@sjawhar/pi-legion-envoy 1.16.0 → 1.17.0

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.
@@ -127,10 +127,12 @@ legion({
127
127
 
128
128
  The daemon spawns that sub-architect as its own process with the child's context already
129
129
  in its environment; a resume of an existing role continues the same process instead of
130
- starting a fresh one. Keep the returned session identifiers, because retro and adjustment
131
- use those live sessions. Park while children are in flight. On each child closure,
132
- re-scope open work, close obsolete work with a reason, and release the next wave only
133
- when it now makes sense. There is no inter-child dependency mechanism to encode.
130
+ starting a fresh one. Keep the returned session identifiers; retro and adjustment resume
131
+ those same sessions through `spawn_worker` (a finished worker is retired after
132
+ `worker_idle_retire_seconds` and comes back from its session file). Park while children are
133
+ in flight. On each child closure, re-scope open work, close obsolete work with a reason, and
134
+ release the next wave only when it now makes sense. There is no inter-child dependency
135
+ mechanism to encode.
134
136
 
135
137
  ## 3. Children complete
136
138
 
@@ -160,18 +162,24 @@ review and the merge-gate sequence.
160
162
 
161
163
  ## 5. Retro
162
164
 
163
- Retro is mandatory for every issue that passed review, before merge. Message the
164
- implementer's live session (idle since it completed its phase; the daemon never tears
165
- it down) with `envoy_publish` to its role token, naming the skill:
165
+ Retro is mandatory for every issue that passed review, before merge. Send the implementer
166
+ back in through the daemon — `spawn_worker` on the implementer carrying the retro task. This
167
+ resumes the same agent whether its pane is still live or the daemon has already retired it
168
+ idle (a finished worker is retired after `worker_idle_retire_seconds`, default 600 s, and
169
+ resumed from its session file on its next assignment). Never `envoy_publish` to a finished
170
+ worker's role topic for this: a retired role has no live holder and the publish is rejected
171
+ with 404.
166
172
 
167
173
  ```text
168
- envoy_publish({
169
- topic: "notifications.role.<implementer's encoded token>",
170
- message: "Run the legion-retro skill now. Capture durable learnings and post the issue comment; do not create a .legion handoff file."
174
+ legion({
175
+ op: "spawn_worker",
176
+ issue: "LEGION-40",
177
+ role: "implementer",
178
+ task: "Run the legion-retro skill now. Capture durable learnings and post the issue comment; do not create a .legion handoff file."
171
179
  })
172
180
  ```
173
181
 
174
- Wait for the messaged implementer to report its durable retro result. Retro output is
182
+ Wait for the implementer to report its durable retro result. Retro output is
175
183
  `docs/solutions/` plus an issue comment; it must not create a `.legion` file or change
176
184
  the reviewer-approved head after cleanup.
177
185
 
@@ -189,7 +197,8 @@ Preserve this order exactly:
189
197
  head. The deletion must land before that approval, which is head-pinned. An implementer
190
198
  completion always writes the issue's status as `testing`; this one is not a test round,
191
199
  so on its `phase-complete` wake call `legion({ op: "set_status", issue, status: "retro" })`
192
- before messaging the reviewer to approve;
200
+ before `spawn_worker` on the reviewer to approve that head (a finished reviewer may already
201
+ be retired; `spawn_worker` resumes it);
193
202
  3. retro completes without dirtying the branch beyond `docs/solutions/`;
194
203
  4. the merger verifies the current head is the reviewer-approved head plus only the retro
195
204
  commits and publishes `READY #<n> at <sha>` to `notifications.role.pr-queue`; it never
@@ -61,7 +61,9 @@ Reach any live role on this issue the same way you reach the architect: `envoy_p
61
61
  `notifications.role.` followed by that role's encoded token. Use it when you need context an
62
62
  earlier phase has that its handoff doesn't cover — ask the planner why a constraint was
63
63
  scoped that way, ask the implementer what a commit actually did. A role that finished its
64
- phase is still alive and idle in its pane; it answers.
64
+ phase stays idle in its pane for the daemon's idle-retire window and answers; once retired (no
65
+ live holder, a publish is rejected 404), read its committed handoff or ask the architect to
66
+ `spawn_worker` it.
65
67
 
66
68
  ## Workspace and handoff precedence
67
69
 
@@ -316,7 +318,9 @@ record of this issue's active phase. Do not add pipeline labels, run a controlle
316
318
  invent a different completion protocol — this is the whole contract.
317
319
 
318
320
  **Stay in this session afterward.** Your process does not exit when your phase completes;
319
- it goes idle in its pane. Other roles on this issue may reach you through Envoy with
321
+ it goes idle in its pane, and after `worker_idle_retire_seconds` (default 600 s) idle with no
322
+ active phase the daemon retires it — your next assignment resumes this same session from its
323
+ session file, so it is still you. Other roles on this issue may reach you through Envoy with
320
324
  questions about the work you did — answer them, reading `$LEGION_WORKSPACE` and your own
321
325
  committed handoff as needed, without mutating anything (see Workspace and handoff
322
326
  precedence above). You will also be the one resumed, with a new prompt in this same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [