@sjawhar/pi-legion-envoy 5.11.1 → 5.12.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.
package/dist/legion.js CHANGED
@@ -16192,7 +16192,7 @@ import { logger } from "@oh-my-pi/pi-utils";
16192
16192
  // package.json
16193
16193
  var package_default = {
16194
16194
  name: "@sjawhar/pi-legion-envoy",
16195
- version: "5.11.1",
16195
+ version: "5.12.0",
16196
16196
  type: "module",
16197
16197
  omp: {
16198
16198
  extensions: [
@@ -106,7 +106,10 @@ A spec has two readers: the human who decides reads the **Summary** and **New si
106
106
  between two lanes or a halt condition, a question for the platform PO (see
107
107
  [Before you ask](#before-you-ask) under Asking).
108
108
  - Keep each section to one screen; work that exceeds one screen per section is two specs.
109
- - Update the spec as decisions land: the spec is the record, comments are the discussion.
109
+ - Update the spec as decisions land: the spec is the record, comments are the discussion. It
110
+ records decisions and requirements, never progress: no status, timestamps, "Update HH:MMZ"
111
+ section, PR list, or handoff notes. Progress is not a Dispatch object at all; it lives in your
112
+ transcript and your pull request (see [Messages](#messages)).
110
113
  - Before sending it: no sections conflict, every requirement has exactly one reading, and the
111
114
  Summary and every ask block pass the phone test above.
112
115
 
@@ -548,9 +551,8 @@ the document's approval state; `stale` means it was approved and then edited - r
548
551
  ## The Spec
549
552
 
550
553
  The spec holds requirements, design, acceptance, decisions, and rejected alternatives, structured per [Writing a spec](#writing-a-spec).
551
- It changes only when a decision or requirement changes, and every version that records one is named with `summary`. Never write
552
- progress, status, timestamps, an "Update HH:MMZ" section, a PR list, or handoff notes into the spec. Progress is not a
553
- Dispatch object at all: it lives in your transcript and your pull request (see [Messages](#messages)).
554
+ It changes only when a decision or requirement changes, and every version that records one is named with `summary`. What it
555
+ never carries is in [Rules](#rules) under Writing a spec.
554
556
 
555
557
  Read the current document before changing it:
556
558
 
@@ -97,7 +97,8 @@ arrives as a wake. At every start, before anything else:
97
97
  `issues.<KEY>.architect.state` is `failed` and whose `issues.<KEY>.phase` is not `done`, exactly
98
98
  as the matching wake below. A parked tree (root phase `done`: it lingers or is closed) needs
99
99
  nothing from you: a failed architect ignores the park and reads `failed` until the tree closes.
100
- 2. List the project's triage issues with `dispatch_issues({project, status: "triage", limit: 250})`.
100
+ 2. List the project's triage issues handed to Legion with
101
+ `dispatch_issues({project, status: "triage", label: "legion", limit: 250})`.
101
102
  When its first line ends `(showing N of M)`, it is one page: say in your summary how many rows
102
103
  it left unread. The rows show no parent, so open each row with `dispatch_read`: one whose
103
104
  `Links:` name a `child_of` issue is a child, which its parent's architect owns, so leave it,
@@ -105,12 +106,24 @@ arrives as a wake. At every start, before anything else:
105
106
  of this issue, not its parent). Of the rest, triage each that `legion state --json` does not
106
107
  record under `issues` as a new issue. A root recorded there and now in `triage` is work the
107
108
  daemon holds that a human pulled back: never re-admit it yourself; name it in your summary to
108
- the human ("<KEY> was pulled back to triage; what do you want?"). This listing is also the only
109
- way you learn of an unrecorded root moved back into triage, or of a child detached to a root
110
- while it is in triage, since the daemon wakes you only on a root's creation.
109
+ the human ("<KEY> was pulled back to triage; what do you want?").
111
110
 
112
111
  The issue record and Dispatch are the truth; the topic is the wake.
113
112
 
113
+ ### Issues handed to Legion (Go daemon)
114
+
115
+ The Go daemon works only the issues handed to it with the Dispatch label `legion` (in any case),
116
+ since its project may be shared with humans and other agents. It never admits a root in `todo`
117
+ without the label, and wakes you for a root in `triage` only while the root carries it and is
118
+ unrecorded: on its creation with the label, and on each change to it after that while it stays
119
+ in triage, the change that adds the label included (the dashboard creates an issue without
120
+ labels, so a human adds it from the issue header). Leave an issue without the label alone:
121
+ handing work to Legion is its owner's decision, so never triage, park, label, or comment on it.
122
+ A child needs no label: it runs under its tree's architect once its root is admitted.
123
+ `legion status <KEY> todo` admits a root only while it carries the label, so a root you file for
124
+ Legion to run carries it (`labels: ["legion"]` in `dispatch_issue`). Taking the label off a
125
+ waiting root drops it from the waiting line; taking it off an admitted tree does not stop it.
126
+
114
127
  ## Deployment instructions
115
128
 
116
129
  Deployment instructions, when present, are the operator's standing rules for this repository —
@@ -137,7 +150,7 @@ quoted here.
137
150
 
138
151
  | Wake | Content | Controller action |
139
152
  |---|---|---|
140
- | New issue created in the Dispatch project (`issue.created`, status `triage`; under the TypeScript daemon resync heals misses, under the Go daemon the boot step above does). From the Go daemon: `triage on <KEY>` (payload `{kind: "triage"}`) on the controller topic, for a root only | issue key + triage context (incl. pre-existing children) | Triage: `legion status <KEY> todo` to admit, or set `backlog`/`icebox` to park |
153
+ | New issue created in the Dispatch project (`issue.created`, status `triage`; under the TypeScript daemon resync heals misses, under the Go daemon the boot step above does). From the Go daemon: `triage on <KEY>` (payload `{kind: "triage"}`) on the controller topic, for an unrecorded root carrying the `legion` label only ("Issues handed to Legion" above) | issue key + triage context (incl. pre-existing children) | Triage: `legion status <KEY> todo` to admit, or set `backlog`/`icebox` to park |
141
154
  | Backlog eligibility | slot freed / priority change | Reconsider parked items and move the eligible root to `todo` |
142
155
  | Architect escalation (controller-actionable only: re-file a child as a root issue, capacity, cross-tree conflicts) | request + context | Judge and act; issue-scoped human Q&A goes through `dispatch_ask` from the owning architect, not here |
143
156
  | Resync report | artifact-driven anomaly list (zero-owner trees, untriaged-open, launch-failed, admission-drift) | Verify against fresh state, then heal |
@@ -172,9 +185,9 @@ quoted here.
172
185
  legion status <issue> backlog
173
186
  ```
174
187
 
175
- (or `icebox` for longer-term deferral). Dispatch status is the durable record;
176
- there is no separate marker to maintain. Do not triage a system-created child as a root
177
- issue.
188
+ (or `icebox` for longer-term deferral). Dispatch status is the durable record; there is no
189
+ other marker to maintain, beyond the Go daemon's `legion` label, which parking leaves in
190
+ place. Do not triage a system-created child as a root issue.
178
191
  4. When you post a triage note (a `dispatch_comment` on the issue saying what you decided and
179
192
  why), name who will be asked: `Assigned to <login>, who will get this tree's questions`,
180
193
  or, when the `Assignee:` line says `unassigned`, `Unassigned — nobody's Inbox shows this
@@ -197,7 +210,8 @@ architect, not the controller.
197
210
  For an independence judgment, verify the child and its parent against current daemon state
198
211
  and the Dispatch issue. If the work belongs in an independent root:
199
212
 
200
- 1. File a **fresh root issue** with `dispatch_issue({ project, title, spec })` (no `parent`).
213
+ 1. File a **fresh root issue** with `dispatch_issue({ project, title, spec })` (no `parent`;
214
+ under the Go daemon add `labels: ["legion"]`, without which it is never admitted).
201
215
  `project` is the issue key's prefix before `-<n>` (e.g. `LEGSMOKE-3` → `LEGSMOKE`) — not
202
216
  the role-token `<project>` (the daemon's own project, e.g. `acme`), a different string.
203
217
  2. Park the child (`legion status <child> icebox`) and leave
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "5.11.1",
3
+ "version": "5.12.0",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [