@sjawhar/pi-legion-envoy 1.24.3 → 1.24.4

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/envoy.js CHANGED
@@ -29972,7 +29972,7 @@ var dispatchToolSpecs = [
29972
29972
  },
29973
29973
  {
29974
29974
  name: "dispatch_doc_edit",
29975
- description: "Apply deterministic document edits, including retyping an identified paragraph into a schema-declared typed block. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
29975
+ description: "Apply deterministic document edits, including retyping an identified paragraph into a schema-declared typed block. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + "For replace, delete, and quote insert anchors, find text exactly as rendered: omit Markdown markers such as backticks or asterisks. " + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
29976
29976
  arguments: (z) => ({
29977
29977
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
29978
29978
  project: z.string().describe("Project key owning the document.").optional(),
package/dist/legion.js CHANGED
@@ -29972,7 +29972,7 @@ var dispatchToolSpecs = [
29972
29972
  },
29973
29973
  {
29974
29974
  name: "dispatch_doc_edit",
29975
- description: "Apply deterministic document edits, including retyping an identified paragraph into a schema-declared typed block. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
29975
+ description: "Apply deterministic document edits, including retyping an identified paragraph into a schema-declared typed block. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + "For replace, delete, and quote insert anchors, find text exactly as rendered: omit Markdown markers such as backticks or asterisks. " + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
29976
29976
  arguments: (z) => ({
29977
29977
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
29978
29978
  project: z.string().describe("Project key owning the document.").optional(),
@@ -34,8 +34,11 @@ durable human question; replies come back to the worker's own session.
34
34
  ## Durable artifacts
35
35
 
36
36
  Phase handoffs are committed in lifecycle order: architect, plan, implement, test, and review.
37
+ Only the implementer pushes them: it and the merger act as the code-writing GitHub App, while
38
+ the planner, tester, reviewer, and architects act as the review App (`appRoleForLegionRole`,
39
+ `packages/daemon/src/daemon/github-apps.ts`), which holds no `contents` permission — their
40
+ handoff commits stay on the shared workspace's issue branch and ride the implementer's next push.
37
41
  A clean review ends with the `.legion/` deletion pushed by the implementer at the reviewer's
38
- direction (the review App holds no `contents` permission and cannot push), which the reviewer
39
- then approves; retro records its learning in
42
+ direction, which the reviewer then approves; retro records its learning in
40
43
  `docs/solutions/` and writes no handoff. GitHub comments and reviews carry the required Legion
41
44
  footer so the daemon can attribute artifacts to their worker session.
@@ -243,9 +243,10 @@ type EditOp = {
243
243
  };
244
244
  ```
245
245
 
246
- Target `replace` and `delete` by the document's plain text: inline-code and link text match without Markdown syntax, and a table-cell
247
- anchor is its cell text. Quote code-block contents without their Markdown fences. A quote must stay within one textblock; split changes
248
- that span separate blocks into separate operations.
246
+ Target `replace`, `delete`, and quote insert anchors by a block's text as rendered: write inline
247
+ code without backticks, bold without asterisks, and link text without link syntax. A table-cell
248
+ anchor is its cell text. Quote code-block contents without their Markdown fences. A quote must stay
249
+ within one textblock; split changes that span separate blocks into separate operations.
249
250
 
250
251
  `replace` requires `find` and `with`; `delete` requires `find`; `insert` requires `markdown` and exactly one of `after` or `before`. An
251
252
  insert anchor is a quote, `"start"`, `"end"`, or `"heading:Title"`. Ordinary inserts create a sibling block before or after the quote or
@@ -286,6 +287,11 @@ Should we ship the migration?
286
287
  :::
287
288
  ```
288
289
 
290
+ When a human answers a decision written as an ask block, the answer lives on that ask. Use
291
+ `dispatch_resolve_ask` when the decision is resolved without a human response, or preserve the
292
+ human's answer; never rewrite the question into its answer or blank its options. An edit that leaves
293
+ an ask block without a question or with a blank option is rejected with `INVALID_ASK_BLOCK`.
294
+
289
295
  ## Comments and suggestions
290
296
 
291
297
  Add feedback with:
@@ -89,7 +89,7 @@ Concurrent issues have disjoint workspaces; only the currently active phase muta
89
89
  one. After you complete and go idle, treat `$LEGION_WORKSPACE` as read-only: you are kept
90
90
  alive to answer questions, not to keep editing. Do not create new commits, run
91
91
  `jj -R "$LEGION_WORKSPACE" new`, or touch tracked files once your own handoff is committed
92
- and pushed — a code change belongs to whichever phase is active now.
92
+ (and, for the implementer, pushed) — a code change belongs to whichever phase is active now.
93
93
 
94
94
  On every start, and especially after revival or re-creation, read the issue and then the
95
95
  committed predecessor handoffs in lifecycle order from `$LEGION_WORKSPACE/.legion/`:
@@ -453,9 +453,12 @@ cd -- "$LEGION_WORKSPACE" && \
453
453
  jj -R "$LEGION_WORKSPACE" split -m "<phase>: record handoff" .legion/<phase>.json
454
454
  ```
455
455
 
456
- If the issue bookmark exists locally, advance it and push it with the provisioned
457
- credential helper. `--bookmark` also publishes the locally provisioned bookmark on its
458
- first push — a bookmark not yet tracking a remote one is tracked automatically:
456
+ **Only the implementer pushes the issue branch.** It acts as the code-writing App
457
+ (`legion-implementer[bot]`, `appRoleForLegionRole` in `packages/daemon/src/daemon/github-apps.ts`),
458
+ the one App with `contents` permission (the merger acts as the same App but pushes nothing: it
459
+ verifies and publishes READY). If you are the implementer, advance the issue bookmark and push it
460
+ with the provisioned credential helper. `--bookmark` also publishes the locally provisioned
461
+ bookmark on its first push — a bookmark not yet tracking a remote one is tracked automatically:
459
462
 
460
463
  ```bash
461
464
  cd -- "$LEGION_WORKSPACE" && \
@@ -463,16 +466,23 @@ cd -- "$LEGION_WORKSPACE" && \
463
466
  jj -R "$LEGION_WORKSPACE" git push --bookmark legion/<KEY>
464
467
  ```
465
468
 
466
- Do not report phase completion until the write, existence check, and handoff commit
467
- succeed; when an issue branch exists, its push is also required. This is the committed
468
- copy the next phase reads after revival. It is removed once, at the end of a clean review: the
469
- implementer pushes that deletion at the reviewer's direction. No other phase removes it — and
470
- once it is gone (`jj -R "$LEGION_WORKSPACE" file list -r @- .legion` prints nothing on stdout;
471
- jj warns on stderr), this
472
- gate no longer applies: a later rebase, bare-gate re-check, confirmation, or retro writes no
473
- `.legion/<phase>.json`, commits no handoff, and reports with `legion handoff complete` alone
474
- (below). Recreating `.legion/` after its deletion changes the approved head and restarts the
475
- review loop this rule exists to end.
469
+ Every other role — planner, tester, reviewer, architects — acts as the review App
470
+ (`legion-reviewer[bot]`), which cannot push: the `split` above is your last step, and the commit
471
+ rides the implementer's next push (the corrective push after a review, or the final `.legion/`
472
+ deletion). A push from one of those roles is refused — over git it reads
473
+ `remote: Repository not found.`; the REST API's form of the same refusal is
474
+ `Resource not accessible by integration` — and that refusal is expected, not a failure to report
475
+ or retry.
476
+
477
+ Do not report phase completion until the write, existence check, and handoff commit succeed —
478
+ and, for the implementer, until the push has too. This is the committed copy the next phase
479
+ reads after revival. It is removed once, at the end of a clean review: the implementer pushes
480
+ that deletion at the reviewer's direction. No other phase removes it — and once it is gone
481
+ (`jj -R "$LEGION_WORKSPACE" file list -r @- .legion` prints nothing on stdout; jj warns on
482
+ stderr), this gate no longer applies: a later rebase, bare-gate re-check, confirmation, or retro
483
+ writes no `.legion/<phase>.json`, commits no handoff, and reports with `legion handoff complete`
484
+ alone (below). Recreating `.legion/` after its deletion changes the approved head and restarts
485
+ the review loop this rule exists to end.
476
486
 
477
487
  ## Completion: report to the architect, then stay
478
488
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "1.24.3",
3
+ "version": "1.24.4",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [