@sjawhar/pi-legion-envoy 1.23.0 → 1.23.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.
@@ -204,13 +204,13 @@ legion({
204
204
  op: "spawn_worker",
205
205
  issue: "LEGION-40",
206
206
  role: "implementer",
207
- task: "Run the legion-retro skill now. Capture durable learnings and post the issue comment; do not create a .legion handoff file."
207
+ task: "Run the legion-retro skill now. Capture durable learnings and post the retro message on the Dispatch issue with dispatch_message; do not create a .legion handoff file."
208
208
  })
209
209
  ```
210
210
 
211
211
  Wait for the implementer to report its durable retro result. Retro output is
212
- `docs/solutions/` plus an issue comment; it must not create a `.legion` file or rewrite
213
- the reviewer-approved head after cleanup.
212
+ `docs/solutions/` plus one `dispatch_message` on the issue; it must not create a `.legion`
213
+ file or rewrite the reviewer-approved head after cleanup.
214
214
 
215
215
  ## 6. Architect sign-off and merge
216
216
 
@@ -17,7 +17,8 @@ retrospective's durable output.
17
17
  1. Tester green and all code-review cycles finish.
18
18
  2. The implementer pushes the `.legion/` deletion at the reviewer's direction, and the reviewer
19
19
  approves that head.
20
- 3. Run this retro: commit durable learnings to `docs/solutions/` and post the issue comment.
20
+ 3. Run this retro: commit durable learnings to `docs/solutions/` and post the retro message on
21
+ the Dispatch issue.
21
22
  Retro writes **no `.legion` file**, so it never re-dirties the cleaned handoff tree.
22
23
  4. The merger verifies the tip is the approved head plus commits that change only
23
24
  `docs/solutions/` — `jj diff --from <approved-sha> --to <tip-sha> --summary`, quoted in READY —
@@ -66,18 +67,22 @@ date: YYYY-MM-DD
66
67
  status: active
67
68
  module: affected-module
68
69
  related_issues:
69
- - "owner/repo#123"
70
+ - "LEGION-123" # the Dispatch issue
71
+ - "owner/repo#456" # the pull request
70
72
  ---
71
73
  ```
72
74
 
73
75
  Commit the documentation on the existing issue branch, advance its existing bookmark, and push
74
- that branch. Do not create a replacement branch or bookmark. Then post an issue comment naming
75
- the documents and the one-to-three most useful takeaways. The comment must carry this revived
76
- implementer's structured attribution footer with `phase` set to `retro`:
76
+ that branch. Do not create a replacement branch or bookmark. Then post one Dispatch message on
77
+ the issue — `issue` is your `LEGION_ISSUE`; Legion issues live on Dispatch, never on a GitHub
78
+ issue, and the `gh` shim refuses every GitHub-issue write — naming the documents and the
79
+ one-to-three most useful takeaways. The message must carry this revived implementer's structured
80
+ attribution footer with `phase` set to `retro`; the body is capped at 2,000 characters:
77
81
 
78
- ```bash
79
- legion gh -- issue comment <issue-number> \
80
- --body $'## Retro Complete
82
+ ```ts
83
+ dispatch_message({
84
+ issue: "<KEY>",
85
+ body: `## Retro Complete
81
86
 
82
87
  **Learnings documented in:**
83
88
  - docs/solutions/<path>.md
@@ -85,11 +90,11 @@ legion gh -- issue comment <issue-number> \
85
90
  **Key takeaways:**
86
91
  - <reusable lesson>
87
92
 
88
- <!-- legion: {"session":"<session-id>","phase":"retro"} -->' \
89
- --repo <owner>/<repo>
93
+ <!-- legion: {"session":"<session-id>","phase":"retro"} -->`,
94
+ })
90
95
  ```
91
96
 
92
- The issue comment and `docs/solutions/` commit are the only retro outputs. Never write a
97
+ The Dispatch message and the `docs/solutions/` commit are the only retro outputs. Never write a
93
98
  handoff, phase artifact, local feedback log, or completion label; `.legion/` was deleted before
94
99
  retro and nothing recreates it. Report completion with `legion handoff complete` alone (its
95
100
  summary: two sentences for the architect) — no `legion handoff write`.
@@ -100,7 +105,7 @@ Before returning, verify all of the following:
100
105
 
101
106
  - The reviewer cleanup commit remains below the retro documentation commit, and the reviewer's
102
107
  approval of that cleanup head stands: the merger accepts the approved head plus this commit.
103
- - The learning documents and issue comment both exist.
108
+ - The learning documents and the Dispatch message both exist.
104
109
  - No `.legion` file was created or modified by retro.
105
110
  - The fresh-eyes analysis was considered alongside the implementer's context.
106
111
  - The merger remains a subsequent step, not work performed by retro.
@@ -152,22 +152,29 @@ that execs `legion gh -- "$@"`, so `gh …` and `legion gh -- …` are the same
152
152
  redeems a fresh token from your session's grant — identity is supplied per call, never stored.
153
153
  Never run `gh auth login` or `gh auth setup-git`; there is no login state to create. The shim
154
154
  refuses `pr merge` (and a raw `gh api …/merge`): no worker role merges a pull request — the merge
155
- queue does, under its own authority. The credential reaches `legion` through the file
156
- `$LEGION_GRANT_FILE` names, written before each of your bash commands by the extension; never
157
- `cat`, `echo`, copy, or `export` it — `legion credential`, `legion gh`, `jj git push`, and
158
- `legion handoff complete` read it themselves. The file is the pane's, not the command's: a `task`
159
- subagent, an `eval` subprocess, or a background job in your pane reads the grant your last bash
160
- command minted, so its `legion gh` or `jj git push` succeeds only within 60 seconds of that call
161
- and 403s afterwards — a timing artifact, not a broken credential; run credentialed commands from
162
- your own bash calls.
155
+ queue does, under its own authority. It also refuses every GitHub-issue write — the `issue`
156
+ subcommand's `comment`, `create`, `edit`, `close`, `reopen`, `delete`, `pin`, `unpin`, `transfer`,
157
+ `lock`, `unlock`, and `develop`, and any raw `gh api` call to an `/issues` path whose method is not
158
+ GET (an explicit `-X`, or the POST that `-f`/`-F`/`--input` imply; pull-request conversation
159
+ comments live on that path too, so edit them with `gh pr comment`) — printing
160
+ `Legion issues live on Dispatch; use dispatch_message or dispatch_comment on <your LEGION_ISSUE>`:
161
+ Legion never reads or writes a GitHub issue (LEGION-78). `pr comment`, `pr review`,
162
+ `api …/pulls/…`, `api graphql`, and issue reads are unaffected. The credential reaches `legion`
163
+ through the file `$LEGION_GRANT_FILE` names, written before each of your bash commands by the
164
+ extension; never `cat`, `echo`, copy, or `export` it — `legion credential`, `legion gh`,
165
+ `jj git push`, and `legion handoff complete` read it themselves. The file is the pane's, not the
166
+ command's: a `task` subagent, an `eval` subprocess, or a background job in your pane reads the
167
+ grant your last bash command minted, so its `legion gh` or `jj git push` succeeds only within 60
168
+ seconds of that call and 403s afterwards — a timing artifact, not a broken credential; run
169
+ credentialed commands from your own bash calls.
163
170
 
164
171
  ## GitHub PR comment attribution
165
172
 
166
173
  Append this exact structured footer to **every** pull-request comment and review that this
167
174
  phase posts on GitHub. It preserves session provenance on the artifact itself so work stays
168
175
  attributable to the session that produced it. Dispatch comments carry session provenance
169
- natively through their own `actor`/`origin` fields; this footer is only for GitHub PR
170
- artifacts:
176
+ natively through their own `actor`/`origin` fields; this footer is for GitHub PR artifacts and
177
+ for the retro's Dispatch message (`skills/legion-retro`):
171
178
 
172
179
  ```html
173
180
  <!-- legion: {"session":"<session-id>","phase":"<phase>"} -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [