@sjawhar/opencode-legion-envoy 8.16.0 → 8.17.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/dist/dispatch.js +10 -0
- package/dist/src/server.js +10 -0
- package/package.json +1 -1
- package/skills/AGENTS.md +1 -1
- package/skills/dispatch/SKILL.md +107 -409
- package/skills/dispatch/references/api.md +16 -48
- package/skills/dispatch/references/asks.md +19 -78
- package/skills/dispatch/references/document-edits.md +38 -187
- package/skills/dispatch/references/documents.md +32 -224
- package/skills/dispatch/references/examples.md +10 -27
- package/skills/dispatch/references/issues.md +34 -196
- package/skills/dispatch/references/messages.md +13 -58
- package/skills/dispatch/references/reading.md +10 -45
- package/skills/dispatch-brainstorming/SKILL.md +34 -99
- package/skills/dispatch-first/SKILL.md +16 -34
- package/skills/legion-architect/SKILL.md +78 -52
- package/skills/legion-controller/SKILL.md +3 -3
- package/skills/legion-retro/SKILL.md +14 -11
- package/skills/legion-worker/SKILL.md +11 -11
- package/skills/legion-worker/references/merge-gate.md +74 -28
- package/skills/legion-worker/references/pr-body.md +2 -2
|
@@ -88,8 +88,8 @@ into the branch only on a real conflict or a retarget
|
|
|
88
88
|
implementer's own proof on a production-like surface at the head that merges, an applied simplify
|
|
89
89
|
head included (`skill://legion-worker/references/pr-body.md#what-a-proof-is`,
|
|
90
90
|
`skill://legion-worker/references/pr-body.md#the-rules-every-phases-evidence-follows`); and the
|
|
91
|
-
implementer's production check after the merge
|
|
92
|
-
(`skill://legion-worker/references/merge-gate.md#after-the-
|
|
91
|
+
implementer's production check after the merge closes the issue
|
|
92
|
+
(`skill://legion-worker/references/merge-gate.md#the-production-check-after-the-close`).
|
|
93
93
|
|
|
94
94
|
## Asking another role
|
|
95
95
|
|
|
@@ -304,12 +304,12 @@ line), the full definition of a proof, what the tester verifies, and the simplif
|
|
|
304
304
|
forward merge and never `jj rebase`; the unchanged-diff fingerprint each role compares
|
|
305
305
|
afterwards is in the same reference: `skill://legion-worker/references/conflicts-and-rewrites.md`.
|
|
306
306
|
- **The merge gate**, in order: the tester's evidence green → the reviewer's approval of the head
|
|
307
|
-
→ retro → the merger's READY → the merge
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
repository's required reviews and
|
|
311
|
-
(`skill://legion-worker/references/merge-gate.md`). The reviewer's
|
|
312
|
-
the
|
|
307
|
+
→ the architect's acceptance → retro → the merger's READY → the merge, which closes the issue →
|
|
308
|
+
the implementer's production check, after the close. On READY's acceptance the daemon submits
|
|
309
|
+
the merge of the head READY named, unless the answer's note begins `MANUAL_MERGE_REQUIRED:`,
|
|
310
|
+
where a person merges it; no role runs `gh pr merge`, and the repository's required reviews and
|
|
311
|
+
checks decide when it lands (`skill://legion-worker/references/merge-gate.md`). The reviewer's
|
|
312
|
+
submissions, the acceptance, retro's commit, READY, the daemon's submission, and the check follow the same reference.
|
|
313
313
|
- **No surface reaches the changed path** is a report to the architect, never a reason to
|
|
314
314
|
complete the phase: `skill://legion-worker/references/pr-body.md`.
|
|
315
315
|
|
|
@@ -370,9 +370,9 @@ check, or the `MANUAL_MERGE_REQUIRED:` note of a pull request a person merges).
|
|
|
370
370
|
|
|
371
371
|
Retro's last commit removes `.legion/<issue>/` from the head that merges (`skill://legion-retro`);
|
|
372
372
|
a round after it, such as one a withdrawn READY sends back, writes and commits its own handoff
|
|
373
|
-
again, since `handoff_complete` reports the commit carrying the file. Retro
|
|
374
|
-
|
|
375
|
-
with `handoff_complete`
|
|
373
|
+
again, since `handoff_complete` reports the commit carrying the file. Retro and the merger write no
|
|
374
|
+
`.legion/<issue>/<phase>.json`, commit no handoff, and report with `handoff_complete` alone, which
|
|
375
|
+
reports the commit the workspace stands on; a look of the production check after the close reports with `handoff_complete` and a `verdict`, and no commit at all.
|
|
376
376
|
|
|
377
377
|
**Every role pushes its own commits.** After the handoff commit — and, for the tester, the red
|
|
378
378
|
tests it wrote — push the issue branch with the plain `jj` of your pane, from bash in your
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
# The merge gate: review, retro, READY, and the production check
|
|
1
|
+
# The merge gate: review, acceptance, retro, READY, the merge, and the production check
|
|
2
2
|
|
|
3
3
|
Part of `skill://legion-worker`. Read it when you are the reviewer submitting a review or an
|
|
4
|
-
approval, the implementer
|
|
5
|
-
path it cites is in sjawhar/legion.
|
|
4
|
+
approval, the implementer on a look of its closed issue's production check, or the merger
|
|
5
|
+
building READY. Every path it cites is in sjawhar/legion.
|
|
6
6
|
|
|
7
|
-
The order, in full: the tester's evidence green → the reviewer's approval of the head →
|
|
8
|
-
retro → the merger's READY → the merge
|
|
7
|
+
The order, in full: the tester's evidence green → the reviewer's approval of the head → the
|
|
8
|
+
architect's acceptance, in `accepting` → retro → the merger's READY → the merge, which closes the
|
|
9
|
+
issue → the implementer's production check, after the close. The approved
|
|
9
10
|
head carries the issue's handoffs, `.legion/<issue>/`; retro's last commit removes them from the
|
|
10
11
|
head that merges (dispatch://LEGION-605), since a squash merge commits that head merged into
|
|
11
12
|
the default branch and nothing there reads a handoff, and READY refuses a head that still
|
|
@@ -92,6 +93,18 @@ longer has. The daemon moves the issue once both are in — the decision GitHub
|
|
|
92
93
|
completion, in either order — so a review posted without a completion leaves the issue in
|
|
93
94
|
reviewing until you finish.
|
|
94
95
|
|
|
96
|
+
## The architect's acceptance
|
|
97
|
+
|
|
98
|
+
- Between the reviewer's approval and retro the issue sits in `accepting` (Dispatch status
|
|
99
|
+
`needs_review`), where no worker is started: the tree's architect reads the evidence (the
|
|
100
|
+
tester's handoff, the PR body's `E2E (implementer)` and `E2E (tester)` lines, the reviewer's
|
|
101
|
+
approval of the head by SHA, and for a parent that every child is done) and accepts with the
|
|
102
|
+
`legion` tool's `sign_off`, which moves the issue to retro, or sends it back to `implementing`
|
|
103
|
+
or `testing` with `request_backward_move` and a reason, which reaches the started worker's task
|
|
104
|
+
as its `Reason:` line and counts a review round. The acceptance asks no `Production:` line of
|
|
105
|
+
anyone: that line is written after the close (*The production check after the close*, below).
|
|
106
|
+
CI red at the head in `accepting` returns the issue to `implementing` as it does in review.
|
|
107
|
+
|
|
95
108
|
## Retro
|
|
96
109
|
|
|
97
110
|
- **Retro's commits do not void the reviewer's approval.** Retro's commits above the approved
|
|
@@ -104,8 +117,8 @@ reviewing until you finish.
|
|
|
104
117
|
with no review round after it brings the base's paths above that head, so READY refuses it the
|
|
105
118
|
same way; one sent back through `implementing` by the conflict procedure gets its confirmation
|
|
106
119
|
before READY runs. A READY refusal's return reaches the reviewer as a new round, never a
|
|
107
|
-
fingerprint confirmation. Every approval
|
|
108
|
-
|
|
120
|
+
fingerprint confirmation. Every approval goes through the architect's acceptance to retro
|
|
121
|
+
again, so each retro ends with the removal again.
|
|
109
122
|
- **Retro brings the PR body's path-derived content up to date before its push.** Whatever the
|
|
110
123
|
repository's instructions derive from the pull request's changed paths (a checklist named for
|
|
111
124
|
each class of path, read by a required check), retro recomputes for the whole diff at its head
|
|
@@ -200,25 +213,58 @@ reviewing until you finish.
|
|
|
200
213
|
request reopened at an awaiting READY's head gets that head's merge submitted again. No role runs
|
|
201
214
|
a disarm.
|
|
202
215
|
|
|
203
|
-
##
|
|
216
|
+
## The production check after the close
|
|
204
217
|
|
|
205
|
-
- **
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
- **The merge closes the issue; the production check is the implementer's work after the close.**
|
|
219
|
+
When the pull request merges, the daemon writes `done` and, in the implementer's session, still
|
|
220
|
+
live, hands it the check task. Its first line is `Production check of <KEY>: <title>.`, and it
|
|
221
|
+
names the repository, the pull request, the merge commit, the look's number, what woke the look
|
|
222
|
+
(`the merge`, for the first) and whether it is the last. A resumed session tells the check task
|
|
223
|
+
from its last phase task by that first line. The check carries no phase and no handoff: a look
|
|
224
|
+
ends with `handoff_complete` carrying a `verdict` and a `summary`, no commit, and the daemon
|
|
225
|
+
refuses a report on an issue with no open check (`CHECK_NOT_OPEN`), on a look already ended
|
|
226
|
+
(`CHECK_LOOK_NOT_OPEN`), or with no verdict of `pass`, `pending` or `fail`
|
|
227
|
+
(`CHECK_VERDICT_REQUIRED`).
|
|
228
|
+
- **Each look does three things.** Do what the deployment instructions say to reach the deploy:
|
|
229
|
+
when they name an agent or role for it, `envoy_publish` the merge commit to that role's topic
|
|
230
|
+
with `expects_reply: none`, and await no reply. Read whether production carries the merge. Then
|
|
231
|
+
report one of three outcomes:
|
|
232
|
+
- `pass`, once you drove the changed path in production through the user's own access path and
|
|
233
|
+
wrote the record: the PR body's `Production:` line,
|
|
234
|
+
`<what was checked in production, how, what was observed> — merge commit <sha>; woken by <event>`,
|
|
235
|
+
and one pull-request comment carrying the Legion footer. A staging pass is not this, since a
|
|
236
|
+
staging gate does not run every resource production does.
|
|
237
|
+
- `pending`, when production does not carry the merge yet (a shared profile still holding the
|
|
238
|
+
previous release, a daemon still running the previous commit, a deploy nobody has run): the
|
|
239
|
+
summary names what is missing, and the `Production:` line stays at
|
|
240
|
+
`pending deploy of <merge sha>`.
|
|
241
|
+
- `fail`, for a defect: file it as an issue of its own in the issue's project with
|
|
242
|
+
`dispatch issue` (`--external <owner>/<repo>#<n>` links the pull request; its spec names the
|
|
243
|
+
closed issue as `dispatch://<KEY>`), never as a child of the closed issue, and name the new
|
|
244
|
+
issue in the `Production:` line and in the summary.
|
|
245
|
+
- **Nothing waits in the session for a deploy.** A `pending` ends the look: the daemon suspends
|
|
246
|
+
your claim with its session and the issue's volume kept, the pod goes, and the daemon wakes the
|
|
247
|
+
check (the pod comes back and your session resumes with a new check task) on Dispatch's
|
|
248
|
+
`issue.deployed` event for the pull request, or, for `sjawhar/legion`, on a Legion daemon's boot
|
|
249
|
+
on a build containing the merge, on Dispatch's `server.started` naming such a build, or on the
|
|
250
|
+
build the daemon read from Dispatch at its boot. The woken look's task names the event
|
|
251
|
+
(`Dispatch's issue.deployed: run <id> completed <t>`, `the Legion daemon's boot on build <sha>`,
|
|
252
|
+
`Dispatch's start on build <sha>`, `Dispatch's build <sha>`), and its `Production:` line names
|
|
253
|
+
it too, so the pull request carries the cause. Never poll for the deploy, never wait on a reply,
|
|
254
|
+
and never ask anyone for approval to deploy. Open a `dispatch ask` to a person only when the
|
|
255
|
+
instructions name nobody for that deploy; it starts with the production gap and why it matters,
|
|
256
|
+
then names the required install or restart step, its risk, and outcome-named options, and the
|
|
257
|
+
look still ends `pending`.
|
|
258
|
+
- **The bounds.** A look is bounded at 2 hours: one that reports nothing ends as a `pending`
|
|
259
|
+
would. The whole check is bounded by the project's `production_check_hours` (336, 14 days, by
|
|
260
|
+
default) from the close, and the wake at that bound is the last look, told so in its task
|
|
261
|
+
(`the bound: production did not carry the merge within <N days>`). A `pass` or `fail` there
|
|
262
|
+
closes the check as any look's would; a `pending` closes it as not run, and before reporting it
|
|
263
|
+
you write on the pull request, in the `Production:` line and a comment, that the check did not
|
|
264
|
+
run because production did not carry the merge within the bound.
|
|
265
|
+
- **The record lives on the pull request alone.** Dispatch refuses a message or a comment on a
|
|
266
|
+
closed issue (`ISSUE_CLOSED`), so the deployment instructions' "on the pull request and the
|
|
267
|
+
issue" is the pull request for a closed issue, and a defect reaches Dispatch as the new issue.
|
|
268
|
+
The architect accepted the issue before the merge and is asked nothing after it. `pass` or
|
|
269
|
+
`fail` closes the check: your claim is retired and, for a child, the issue's Sandbox and volume
|
|
270
|
+
are released.
|
|
@@ -42,8 +42,8 @@ Negative control: <deliberately broken input or call> → <refusal or failure ob
|
|
|
42
42
|
Negative control: <deliberately broken input or call> → <refusal or failure observed>.
|
|
43
43
|
Verified the implementer's proof by <re-running its command | driving the same surface independently>.
|
|
44
44
|
|
|
45
|
-
**Production:** <what was checked in production, how, what was observed> — merge commit <sha>.
|
|
46
|
-
(written by the implementer after the merge
|
|
45
|
+
**Production:** <what was checked in production, how, what was observed> — merge commit <sha>; woken by <event>.
|
|
46
|
+
(written by the implementer from the production check after the merge closes the issue, naming what woke that look; `pending deploy of <sha>` until then)
|
|
47
47
|
|
|
48
48
|
**Fast-follow:** <one named cleanup item and where it will land>, or "none".
|
|
49
49
|
|