@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 +1 -1
- package/dist/legion.js +1 -1
- package/dist/skills/AGENTS.md +5 -2
- package/dist/skills/dispatch/SKILL.md +9 -3
- package/dist/skills/legion-worker/SKILL.md +24 -14
- package/package.json +1 -1
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(),
|
package/dist/skills/AGENTS.md
CHANGED
|
@@ -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
|
|
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
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
457
|
-
|
|
458
|
-
|
|
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
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
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
|
|