@sjawhar/claude-envoy 2.42.1 → 2.43.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.
@@ -73,11 +73,15 @@ sent to one asks its architect to fold work that is already finished.
73
73
 
74
74
  - a tree with at least one open descendant, and more than 8 descendants in all or more than 2
75
75
  levels below its root;
76
- - a tree with at least one open descendant that filed a child no red-team verdict names. The
77
- verdict is a comment on the root whose first line reads `Red-team verdict for <root key>:`
78
- (`skill://legion-architect/references/decomposition.md`). Read the root's comments with
79
- `dispatch read --issue <ROOT> --all-events` and the replies under each verdict comment; a child
80
- named in none of them was filed without the check.
76
+ - a tree with at least one open descendant that filed a child no red-team verdict names. Each
77
+ architect posts its verdict on its own issue, the issue it files its children under: a comment
78
+ whose first line reads `Red-team verdict for <issue key>:`, with that issue's key
79
+ (`skill://legion-architect/references/decomposition.md`). The root's architect posts on the
80
+ root, and a child's own architect posts on that child. So read the verdicts on every
81
+ architect's issue of the tree, not only the root's: the root and each issue of the tree that has
82
+ children. Read each one's comments with `dispatch read --issue <KEY> --all-events` and the
83
+ replies under each verdict comment. A child named in none of the tree's verdicts was filed
84
+ without the check.
81
85
 
82
86
  Count no child created before that first line existed. The architects write it from the Legion
83
87
  release that carries this file, so every child filed before then has no verdict comment to
@@ -7,7 +7,7 @@ description: Use when dispatched as a per-process Legion phase worker — planne
7
7
 
8
8
  If this skill disagrees with the code, a command's output or its `--help`, follow those and say which line of this skill is wrong.
9
9
 
10
- You work one phase of one issue in a jj workspace every role of the issue shares; the architect owns the tree. Your role prompt gives the workspace binding, `gh`, the push, the handoff record, `handoff_complete` and how long your session stays; this skill adds the rest.
10
+ You work one phase of one issue in a jj workspace every role of the issue shares; the architect your `Legion addressing` line names owns your issue. When an architect above it tells you that it takes your issue's work while your issue's own architect does not run, send to that architect instead. Your role prompt gives the workspace binding, `gh`, the push, the handoff record, `handoff_complete` and how long your session stays; this skill adds the rest.
11
11
 
12
12
  ## Every phase, in this order
13
13
 
@@ -7,6 +7,9 @@ every Legion role (each phase worker, each architect, the controller) and for ea
7
7
  subagents, and it replaces the filing step of `skill://dispatch-first` and `skill://dispatch`. The
8
8
  controller fixes nothing itself: it hands a finding to the tree that owns the code, as
9
9
  `skill://legion-controller`, "Findings, and the issues you file", says.
10
+ A child's own architect opens no ask itself: where this page says to open a `dispatch ask`, it
11
+ sends the finding to the architect above it with `envoy_publish`, and the root's architect opens
12
+ the ask (`skill://legion-architect`, "Every turn").
10
13
 
11
14
  ## Fix it where you are, else hand it over, and ask only for a decision
12
15
 
@@ -29,10 +32,11 @@ A fix you are not sure of is not step 1: hand it over, or ask when a person must
29
32
  - A problem inside your issue is not such a finding: fix it in your change, since nothing needed
30
33
  for correctness is deferred.
31
34
  - A problem inside your tree is work its root spec's acceptance needs. A phase worker's such
32
- problem outside its own issue goes to the tree's architect (`skill://legion-worker`, *Stop
33
- rules*), which adds it to an open pull request of the tree, or files a child when it is a
34
- separately deliverable change. Anything else, in the same
35
- repository or not, is a finding.
35
+ problem outside its own issue goes to the architect that owns its issue, the one its
36
+ `Legion addressing` line names (`skill://legion-worker`, *Stop rules*). That architect adds it
37
+ to an open pull request of an issue it owns, or files a child under its own issue when it is a
38
+ separately deliverable change. It sends a problem in an issue it does not own to the architect
39
+ above it. Anything else, in the same repository or not, is a finding.
36
40
  - Search first (`skill://dispatch-first`): when an open issue already tracks the problem, comment
37
41
  the evidence on that issue and send or ask nothing. When an open ask on the report issue already
38
42
  asks about it (`dispatch open-asks --project <PROJECT>` lists them), add your evidence under that
@@ -41,7 +45,7 @@ A fix you are not sure of is not step 1: hand it over, or ask when a person must
41
45
 
42
46
  These issues are filed:
43
47
 
44
- - an architect's children of its own tree (`dispatch issue --parent`, `skill://legion-architect`)
48
+ - an architect's children of its own issue (`dispatch issue --parent`, `skill://legion-architect`)
45
49
  - a Legion root the controller files for a clear defect no running tree owns
46
50
  - an issue a person asked the controller to file, in a direct message, in a Slack request, or in
47
51
  their answer to an ask
@@ -97,12 +101,13 @@ of these that holds, so a person sees it and the controller finds it when it ret
97
101
  KEY>/ask/<id>` under that comment, so the controller takes the ask and not the comment. The
98
102
  report issue's assignee sees the ask, and the controller's catch-up takes it.
99
103
  2. **The report issue is missing or closed:** ask on your own issue, the evidence posted there as
100
- a comment first. Then publish the ask's reference to your tree's architect (`skill://legion-worker`,
101
- *Stop rules*). An architect holds its own. The architect holds your issue's
102
- acceptance until a controller has taken the ask (`skill://legion-architect`, "Acceptance and the
103
- merge"). That hold is what keeps the ask readable: an open ask on a closed issue drops out of
104
- the controller's own listing (`asks.go`'s `listOpenAsks` takes `i.closed_at is null`), so an
105
- issue that closed over one hides it for good.
104
+ a comment first. Then publish the ask's reference to the architect that owns your issue, the
105
+ one your `Legion addressing` line names (`skill://legion-worker`, *Stop rules*). A root's
106
+ architect holds its own ask. The architect holds your issue's acceptance until a controller has
107
+ taken the ask (`skill://legion-architect`, "Acceptance and the merge"). That hold is what keeps
108
+ the ask readable: an open ask on a closed issue drops out of the controller's own listing
109
+ (`asks.go`'s `listOpenAsks` takes `i.closed_at is null`), so an issue that closed over one hides
110
+ it for good.
106
111
  3. **Your own issue is closed too** (Dispatch refuses the ask `409 ISSUE_CLOSED`, as on a
107
112
  production check): put the report issue back in reach yourself, with the `dispatch` commands
108
113
  below, and ask there. Never `legion({op: "set_status"})`, which the controller's report steps
@@ -51,7 +51,7 @@ as the fingerprint decides (*The reviewer*, below, and
51
51
  ```
52
52
 
53
53
  A read GitHub refuses stops the command there, and is reported to the architect, never guessed.
54
- With that read refused, the required set is unknown, so no required item can be judged: do not approve, and wait with a `WAITING` line naming the refused read. The architect has the read made with a credential that can make it, or asks a person, and the review goes on from its answer.
54
+ With that read refused, the required set is unknown, so no required item can be judged: do not approve, and wait with a `WAITING` line naming the refused read. The architect has the read made with a credential that can make it, or asks a person (a child's own architect asks through the architect above it), and the review goes on from the answer.
55
55
  The head's check-runs
56
56
  (`gh api repos/<o>/<r>/commits/<headRefOid>/check-runs --paginate --jq '.check_runs[] | [.name, .status, .conclusion] | @tsv'`):
57
57
  every required name present, `completed` and `success` (GitHub counts `neutral` and `skipped`
@@ -200,10 +200,11 @@ wait, since it stands whatever CI says and the issue leaves reviewing with it. T
200
200
  on nothing either: it ends the round whatever CI says at the head it names, since the round reads
201
201
  no CI verdict, and a settlement the daemon reads later — at that head or any above it — moves the
202
202
  issue nowhere. The daemon names each check GitHub reported, with the conclusion GitHub gave it,
203
- in one message to the tree's architect, the worker of the issue's current phase and the
204
- implementer, and judges none of them: a red is the implementer's to fix or re-run, the
205
- architect's to decide on, and GitHub's to hold the merge for. So the reviewer's own read before
206
- it approves is the only read that decides anything. A review that names an older head reviews
203
+ in one message to the architect that owns the issue (the one your `Legion addressing` line
204
+ names), the worker of the issue's current phase and the implementer, and judges none of them: a
205
+ red is the implementer's to fix or re-run, the architect's to decide on, and GitHub's to hold the
206
+ merge for. So the reviewer's own read before it approves is the only read that decides anything.
207
+ A review that names an older head reviews
207
208
  code the pull request no longer has. The daemon moves the issue once all three are in — the
208
209
  decision GitHub reports, your completion, in either order, and GitHub's own answer that the
209
210
  approved head is one the issue may advance on — so a review posted without a completion leaves
@@ -213,8 +214,9 @@ it there until that answer comes clean.
213
214
  ## The architect's acceptance
214
215
 
215
216
  - Between the reviewer's approval and retro the issue sits in `accepting` (Dispatch status
216
- `needs_review`), where no worker is started: the tree's architect reads the evidence (the
217
- tester's handoff, `dispatch results --issue <issue>` at the approved head and the reviewer's
217
+ `needs_review`), where no worker is started: the architect that owns the issue, the one each
218
+ phase worker's `Legion addressing` line names, reads the evidence (the tester's handoff,
219
+ `dispatch results --issue <issue>` at the approved head and the reviewer's
218
220
  approval of the head by SHA; the daemon refuses the sign-off while an issue beneath it is still
219
221
  in the workflow, `SIGNOFF_CHILD_IN_WORKFLOW`, so a parent is accepted after its children, on
220
222
  the head of its last round, `skill://legion-architect`, section 4) and accepts with the
@@ -280,10 +282,17 @@ it there until that answer comes clean.
280
282
  passes `--merge` in place of `--squash` where the repository allows merge commits
281
283
  (`allow_merge_commit`) and the base's rules require no linear history
282
284
  (`required_linear_history`), since a squash there leaves each open pull request built on the
283
- merged branch a conflict of history alone; otherwise it squashes and tells the architect which
284
- open pull requests of the tree build on the merged branch. Each one GitHub then reports
285
- `CONFLICTING` comes back to `implementing`, and the architect tells its implementer to expect
286
- it and to merge the base forward in that implementing round. On a base with a merge queue —
285
+ merged branch a conflict of history alone; otherwise it squashes and tells the architect its
286
+ addressing line names which open pull requests of the tree build on the merged branch. Each one
287
+ whose issue stands past `implementing` and that GitHub then reports `CONFLICTING` comes back to
288
+ `implementing` by the daemon's own move, with a task that names the base to merge forward, and
289
+ the architect that owns its issue hears of it by a `checks-red` notice. The architect the
290
+ merger told tells the implementer of each of those pull requests whose issue is still in
291
+ `implementing` and is an issue it owns to expect the conflict and to merge the base forward in
292
+ that implementing round. The implementer of one whose issue that architect does not own merges
293
+ the base forward once GitHub reports its pull request `CONFLICTING`, as its role prompt says
294
+ (*Reintegrating the base* in
295
+ `skill://legion-worker/references/conflicts-and-rewrites.md`). On a base with a merge queue —
287
296
  a `merge_queue`
288
297
  rule among the base branch's rules — it enqueues the pull request instead, with GraphQL
289
298
  `enqueuePullRequest` and the same head as `expectedHeadOid`, because `gh pr merge` on such a
@@ -57,8 +57,9 @@ to it (below). Then it pushes and completes. It never waits for, watches or poll
57
57
  allows, and they read no check; `skill://legion-worker`, *Every role pushes its own commits*,
58
58
  gives them).
59
59
  Under the Go daemon a check that settles red on the head moves the issue nowhere: the daemon names
60
- every check GitHub reported, with the conclusion GitHub gave it, in one message to the tree's
61
- architect, the worker of the issue's current phase and the implementer, and judges none of them.
60
+ every check GitHub reported, with the conclusion GitHub gave it, in one message to the architect
61
+ that owns the issue, the worker of the issue's current phase and the implementer, and judges none
62
+ of them.
62
63
  That message is the implementer's to act on while it still works the issue: a red that failed on
63
64
  its own is re-run once (`gh run rerun <run-id> --failed`), woken by the pull request's checks
64
65
  event (`skill://envoy`, *Wait for CI or a merge*: subscribe, then end the turn) and never by a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "2.42.1",
3
+ "version": "2.43.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",