@sjawhar/opencode-legion-envoy 5.0.0 → 5.0.2
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/src/server.js +1 -1
- package/package.json +1 -1
- package/skills/AGENTS.md +3 -3
- package/skills/dispatch/references/brainstorming.md +2 -2
- package/skills/dispatch/references/issues.md +13 -14
- package/skills/legion-controller/SKILL.md +1 -1
- package/skills/legion-worker/SKILL.md +1 -1
- package/skills/legion-worker/references/merge-gate.md +6 -6
package/dist/src/server.js
CHANGED
|
@@ -14316,7 +14316,7 @@ var dispatchToolSpecs = [
|
|
|
14316
14316
|
},
|
|
14317
14317
|
{
|
|
14318
14318
|
name: "dispatch_issues",
|
|
14319
|
-
example: { project: "
|
|
14319
|
+
example: { project: "PROJ", limit: 250, offset: 250 },
|
|
14320
14320
|
description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, open-ask count, and route with whether it reaches anyone, " + "so you can see backlog shape without opening every issue. Optionally filter by status, parent, " + "label, priority, route status, or how recently it changed; priority takes one or more of 0-3 " + "(P0-P3) and null for an issue with no priority, so an owner's P0/P1 audit is priority [0, 1]. " + 'route_status "no_holder" lists every open issue whose route names a role nobody holds or a ' + "session that is not running at the moment of the read, whatever its priority. A restarting " + "session is absent for minutes, so an issue is unowned only when a read ten minutes later agrees. " + "Do not use it to search by keyword or phrase; dispatch_search remains the keyword surface. " + "Dispatch pages the list: limit sets the page size (default " + `${DEFAULT_ISSUE_PAGE_LIMIT}, max ${MAX_ISSUE_PAGE_LIMIT}) and offset selects where it starts ` + "(default 0), and the answer names how many issues match, so repeat with the next offset to " + "walk every matching issue. A walk is exact only while the list does not change: an issue " + "that enters or leaves what the filters match, or whose status or rank changes, between two " + "pages shifts rows across a page boundary, so one issue can come back twice and another never.",
|
|
14321
14321
|
arguments: (z2) => ({
|
|
14322
14322
|
project: z2.string().describe("Project key to list issues from."),
|
package/package.json
CHANGED
package/skills/AGENTS.md
CHANGED
|
@@ -21,6 +21,6 @@ event intake, process lifecycle, credentials, and role delivery.
|
|
|
21
21
|
The owning skill above is where each contract is defined; a role prompt that needs a contract from its own seat points there or restates only its own step. This file lists and does not restate.
|
|
22
22
|
A Legion prompt (a skill here, a role prompt, or an agent definition in `packages/pi-envoy/agents/`) names a task agent only as `task(agent="<name>")` and a skill it tells the model to load only as `skill://<name>`. Those are the two forms the Go daemon's boot gate and `legion probe-image` resolve through Oh My Pi, refusing by name one it cannot find; a dispatch or a load written any other way goes unchecked. An agent or skill Legion's prompts name is shipped here or in `packages/pi-envoy/agents/`, unless Oh My Pi bundles it.
|
|
23
23
|
A skill file an agent loads stays under 51,200 bytes, Oh My Pi's spill threshold (a longer one arrives with its middle cut out), and a skill's detail lives in `references/` files linked as `skill://<name>/references/<file>.md`, never by relative path, which a read by path cuts at 300 lines. `packages/pi-envoy/src/skills-guard.test.ts` fails on a file at the threshold, on any `SKILL.md` body of 500 lines or more, on a skill whose frontmatter `name` is not its directory's name, on a `dispatch-first` over its budget, on a `skill://<name>/<path>` link that names a missing file or a missing `#heading`, and on a `legion-worker` reference nothing links.
|
|
24
|
-
The text a worker boots with (its role prompt) lives in `packages/
|
|
25
|
-
composed per role
|
|
26
|
-
holds the structural rules for those parts.
|
|
24
|
+
The text a worker boots with (its role prompt) lives in `packages/daemon/internal/prompts/roles/`,
|
|
25
|
+
embedded in the `legion` binary and composed per role by `packages/daemon/internal/prompts/prompts.go`;
|
|
26
|
+
`packages/daemon/internal/prompts/roles_test.go` holds the structural rules for those parts.
|
|
@@ -43,10 +43,10 @@ do corrections to it. Neither your model nor theirs is the starting truth.
|
|
|
43
43
|
|
|
44
44
|
## A worked example
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Take the spec for the secrets broker's identity model. Its first version
|
|
47
47
|
held the problem, the human's words, what exists today, and the one question that was ready then;
|
|
48
48
|
it also called itself "a conversation", which the human struck as commentary. Each later version
|
|
49
49
|
folds the answers in with the human's words and date and adds the questions they open. Its first
|
|
50
|
-
approval request, on
|
|
50
|
+
approval request, on the spec's version 35, named four inferences the human
|
|
51
51
|
had never discussed; the human rejected it, and each of the four was then either put to the human
|
|
52
52
|
as its own decision block or taken out of the spec.
|
|
@@ -9,14 +9,13 @@ project's architecture model, or list or audit a project's backlog.
|
|
|
9
9
|
When you finish an issue, or are told to work on the next thing, take the top ready issue of the
|
|
10
10
|
whole backlog, across every project: status `todo`, highest priority first, then board rank. There
|
|
11
11
|
are no areas: a standing role, a product owner and a lane each take the top issue like everyone
|
|
12
|
-
else (
|
|
13
|
-
|
|
14
|
-
waits on one belongs in `backlog`, with what it waits on said on the issue.
|
|
12
|
+
else (Sami's ruling). `todo` means ready: specced, unblocked, and waiting on neither a deploy nor a
|
|
13
|
+
decision. An issue that waits on one belongs in `backlog`, with what it waits on said on the issue.
|
|
15
14
|
|
|
16
15
|
Hold at most three issues in flight (`in_progress`, `testing`, `needs_review` or `retro`), of any
|
|
17
|
-
kind (
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
kind (Sami's ruling). The limit is per agent and has nothing to do with the week's priorities
|
|
17
|
+
(Sami, correcting a reading that tied the two together): the priorities decide only what you pull
|
|
18
|
+
next. Past three:
|
|
20
19
|
push any unfinished work, say where in one comment on the issue, move it to `backlog` and clear
|
|
21
20
|
its route. Each issue counts on its own; a child does not ride under its parent's slot.
|
|
22
21
|
In-flight issues with no owner at all go
|
|
@@ -28,9 +27,9 @@ writes on the root of a tree Legion is running is set back and the tree's archit
|
|
|
28
27
|
it; only a person in the dashboard, or `legion status`, stops that tree. On an issue under one, a
|
|
29
28
|
status that takes it out of the flow parks that issue and stops its workers.
|
|
30
29
|
|
|
31
|
-
One agent keeps the backlog's order against those priorities, with Sami
|
|
32
|
-
(
|
|
33
|
-
|
|
30
|
+
One agent keeps the backlog's order against those priorities, with Sami, as he ruled. Setting an
|
|
31
|
+
issue's priority stays yours ([Priority is yours to set](#priority-is-yours-to-set)); reordering
|
|
32
|
+
the board does not.
|
|
34
33
|
When the top of the backlog looks wrong, or a priority's next step is not yet a ready issue,
|
|
35
34
|
publish it to `notifications.role.backlog-order`, which the order keeper holds, instead of
|
|
36
35
|
reordering the board yourself.
|
|
@@ -88,11 +87,11 @@ Waiting for the deploy lane is not a status and is never announced.
|
|
|
88
87
|
|
|
89
88
|
```ts
|
|
90
89
|
// PATCH /api/v1/issues/{key} — status, title, labels, priority, external_links (merged by URL), route, parent
|
|
91
|
-
dispatch_issue_update({ issue: "
|
|
92
|
-
dispatch_issue_update({ issue: "
|
|
93
|
-
dispatch_issue_update({ issue: "
|
|
94
|
-
dispatch_issue_update({ issue: "
|
|
95
|
-
dispatch_issue_update({ issue: "
|
|
90
|
+
dispatch_issue_update({ issue: "PROJ-175", status: "testing" })
|
|
91
|
+
dispatch_issue_update({ issue: "PROJ-175", status: "done", reason: "Shipped in owner/repo#7; verified on the production dashboard." })
|
|
92
|
+
dispatch_issue_update({ issue: "PROJ-175", priority: 1 }) // 0–3; see Priority is yours to set
|
|
93
|
+
dispatch_issue_update({ issue: "PROJ-175", external_links: ["https://github.com/owner/repo/pull/7"] })
|
|
94
|
+
dispatch_issue_update({ issue: "PROJ-175", parent: "PROJ-170" }) // same-project key; "" clears the parent
|
|
96
95
|
```
|
|
97
96
|
|
|
98
97
|
Closing takes a `reason`, and the tool refuses `status: "done"` without one: it posts the reason on
|
|
@@ -197,7 +197,7 @@ dispatch_issues({ project: "<PROJECT>", status: "todo", priority: [0], limit: 25
|
|
|
197
197
|
|
|
198
198
|
When the first line ends `(showing 1-250 of N)`, the next page is `offset: 250`, then `500`. Read
|
|
199
199
|
pages only as far as you need: stop listing once the free slots are filled. `<PROJECT>` is the
|
|
200
|
-
Dispatch project key, the prefix of this deployment's issue keys (`
|
|
200
|
+
Dispatch project key, the prefix of this deployment's issue keys (`PROJ-12` → `PROJ`), which is
|
|
201
201
|
also `daemon.project` in `legion state --json`: the project key exactly as `legion.yaml` writes it.
|
|
202
202
|
A row that shows `claimed by …` and does not end its claim with `· not running` (the route, when
|
|
203
203
|
the row shows one, comes after the claim) is claimed, as the table below says: skip it without
|
|
@@ -317,7 +317,7 @@ line), the full definition of a proof, what the tester verifies, and the simplif
|
|
|
317
317
|
## Completion gate: handoff write, verification, and persistence
|
|
318
318
|
|
|
319
319
|
The merger writes no handoff and pushes nothing, so this gate does not apply to it
|
|
320
|
-
(`packages/
|
|
320
|
+
(`packages/daemon/internal/prompts/roles/merger.md`).
|
|
321
321
|
|
|
322
322
|
Write the phase-specific handoff: call the `legion` tool with `op: "handoff_write"`, `phase: "<p>"`,
|
|
323
323
|
and `data`: a JSON object of the phase-specific fields only. It runs `legion handoff write` in
|
|
@@ -73,12 +73,12 @@ completion leaves the issue in reviewing until you finish.
|
|
|
73
73
|
in READY (an empty output is quoted as `no file changes above the approved head`); then the same
|
|
74
74
|
with `'~docs/solutions'` appended, which must print nothing. *The READY packet*: the merger
|
|
75
75
|
always posts `READY #<n> at <current sha> (approved at <approved sha>) for <KEY> (<pr url>)`
|
|
76
|
-
(the shape `packages/
|
|
77
|
-
its `Not proven / risk:` value — every bullet under that label joined with
|
|
78
|
-
READY line, or `none` — quoted from the `## For the reviewer` block at that same
|
|
79
|
-
line saying the body carries no brief — the packet still publishes), then the
|
|
80
|
-
output and the PR body's gate facts, as a `dispatch_message` on the issue. When the
|
|
81
|
-
addressing` line names a merge queue, it also publishes the same packet there with
|
|
76
|
+
(the shape `packages/daemon/internal/prompts/roles/merger.md` defines), then the PR body's
|
|
77
|
+
`Outcome:` line and its `Not proven / risk:` value — every bullet under that label joined with
|
|
78
|
+
`; ` on the one READY line, or `none` — quoted from the `## For the reviewer` block at that same
|
|
79
|
+
head (or one line saying the body carries no brief — the packet still publishes), then the
|
|
80
|
+
`--summary` output and the PR body's gate facts, as a `dispatch_message` on the issue. When the
|
|
81
|
+
`Legion addressing` line names a merge queue, it also publishes the same packet there with
|
|
82
82
|
`envoy_publish`; a 404 means the Dispatch message remains the durable notice and the merger
|
|
83
83
|
stays idle. The READY packet names both the implementer's and tester's `E2E` lines; a missing
|
|
84
84
|
one is reported to the architect instead of published. Legion never merges.
|