@sjawhar/claude-envoy 2.11.1 → 2.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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/envoy-channel.js +21 -2
- package/legion/skills/legion-architect/SKILL.md +4 -4
- package/legion/skills/legion-architect/references/acceptance.md +21 -12
- package/legion/skills/legion-architect/references/decomposition.md +3 -1
- package/legion/skills/legion-architect/references/wake-routing.md +5 -5
- package/legion/skills/legion-controller/SKILL.md +38 -11
- package/legion/skills/legion-controller/references/admission.md +32 -0
- package/legion/skills/legion-controller/references/backlog-stewardship.md +43 -4
- package/legion/skills/legion-controller/references/daily-report.md +30 -5
- package/legion/skills/legion-controller/references/escalation.md +10 -6
- package/legion/skills/legion-controller/references/finding-asks.md +7 -1
- package/legion/skills/legion-controller/references/parked-decisions.md +103 -43
- package/legion/skills/legion-controller/references/session.md +11 -3
- package/legion/skills/legion-controller/references/slack-mentions.md +3 -2
- package/legion/skills/legion-controller/references/triage.md +14 -8
- package/legion/skills/legion-controller/references/wakes.md +156 -19
- package/legion/skills/legion-worker/references/findings.md +3 -0
- package/package.json +2 -2
- package/skills/dispatch/SKILL.md +10 -9
- package/skills/dispatch-first/SKILL.md +6 -6
- package/skills/dispatch-writing-specs/SKILL.md +7 -7
package/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -53123,12 +53123,31 @@ var legionBlockedIssue = object({
|
|
|
53123
53123
|
issue: issueKey,
|
|
53124
53124
|
blockedBy: array(issueKey)
|
|
53125
53125
|
});
|
|
53126
|
+
var LEGION_HELD_REASONS = [
|
|
53127
|
+
"tree_closed",
|
|
53128
|
+
"tree_parked",
|
|
53129
|
+
"label_off",
|
|
53130
|
+
"ancestry",
|
|
53131
|
+
"root_awaiting_person",
|
|
53132
|
+
"design_gate",
|
|
53133
|
+
"dispatch_blocker",
|
|
53134
|
+
"children_first",
|
|
53135
|
+
"accepted_ancestor",
|
|
53136
|
+
"at_work",
|
|
53137
|
+
"unclassified"
|
|
53138
|
+
];
|
|
53139
|
+
var legionHeldIssue = object({
|
|
53140
|
+
issue: issueKey,
|
|
53141
|
+
reason: _enum2(LEGION_HELD_REASONS),
|
|
53142
|
+
heldBy: array(issueKey).optional()
|
|
53143
|
+
});
|
|
53126
53144
|
var legionAdmission = object({
|
|
53127
53145
|
cap: number2().int().nonnegative(),
|
|
53128
53146
|
active: array(nonEmptyString2),
|
|
53129
53147
|
waiting: array(nonEmptyString2),
|
|
53130
53148
|
trees: array(issueKey).optional(),
|
|
53131
53149
|
blocked: array(legionBlockedIssue),
|
|
53150
|
+
held: array(legionHeldIssue).optional(),
|
|
53132
53151
|
free: number2().int().nonnegative().optional()
|
|
53133
53152
|
});
|
|
53134
53153
|
var legionControllerLocator = object({
|
|
@@ -56163,9 +56182,9 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
56163
56182
|
|
|
56164
56183
|
// package.json
|
|
56165
56184
|
var name = "@sjawhar/claude-envoy";
|
|
56166
|
-
var version2 = "2.
|
|
56185
|
+
var version2 = "2.12.0";
|
|
56167
56186
|
var legion = {
|
|
56168
|
-
daemonApiVersion:
|
|
56187
|
+
daemonApiVersion: 98
|
|
56169
56188
|
};
|
|
56170
56189
|
|
|
56171
56190
|
// ../pi-shared/src/agent-stream.ts
|
|
@@ -29,7 +29,7 @@ An answered root stands in the admission line until the pass that resumes it, an
|
|
|
29
29
|
- Choose a single-issue tree only when one pull request in one repository can deliver every criterion.
|
|
30
30
|
- A child issue needs a repository or a deploy order of its own: its code is in a repository no open pull request of this tree is in, or it must be applied on its own before other work of the tree can build on it. A repeated change — the same edit per program, directory or instance — is one child, never one per instance. Never use a child to track a to-do, a fix found in review, a proof of the root's acceptance, or a part of your own work: do it in this tree. Each child costs a workspace, an admission wait and a review loop. Before any `dispatch issue` that creates a child, and before `release_children`, run the red-team check in `skill://legion-architect/references/decomposition.md`.
|
|
31
31
|
- Work in a repository this tree already has a pull request in, which waits on a sibling's merge, is no child and is not parked in `backlog`: write it into the spec of the issue whose pull request carries it — the parent's, or the sibling's when the parent's pull request is in another repository — so one pull request lands it in order.
|
|
32
|
-
- A child that duplicates another issue and is not yet released is never released: fold it by the duplicate rule of `skill://dispatch-first`. The daemon records a child at its release and re-asserts a status only on an issue it has recorded, so that close stands. A released duplicate goes out with `park_child` instead.
|
|
32
|
+
- A child that duplicates another issue and is not yet released is never released: fold it by the duplicate rule of `skill://dispatch-first`. The daemon records a child at its release and re-asserts a status only on an issue it has recorded, so that close stands. A released duplicate goes out with `park_child` instead, because its work is folded into the issue you keep. Move an issue to `backlog`, `icebox` or `triage` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the issue: for a duplicate, name the issue you keep in a `dispatch comment` on the child.
|
|
33
33
|
- Every child names the running system its criteria are proven on (the command, service or page the tester drives) and the repository skill that drives it. If the repository cannot exercise a criterion end to end, building that path is work of this tree.
|
|
34
34
|
- The issue's primary document is the root spec: extend it in place, because a second "spec" artifact replaces the human's document. Mark each requirement of it as a `requirement` block, and write the issue's Verification document (`verification.md`) beside it: one `check` block per thing to be proved, each with `serves` naming the requirements it serves, its `surface` (`browser`, `cli` or `api`), `run`, `when` (`before_merge`, `after_merge` or `default_branch`) and `negative_control`. The checks are the gate every later role reads: the implementer and the tester record a result against each, and the reviewer approves only once a pass stands for every `before_merge` check at the head. The decomposition's order and the plan's tasks go in the children and the planner's `plan` handoff, not the root spec.
|
|
35
35
|
- Before you write a design, state the problem to `task(agent="design-outsider")` and read its answer with `wait`. The brief holds the problem statement and the design principles, and no design of your own. The four questions are where the proposal is stupid, whether the thing in question should exist at all, what the smallest thing that gives the person what they asked for is, and what to delete. Record the answer in a comment on the issue, or in the issue's `plan.md` where one exists, before any action that states or favours a design, and give your reason where you do not follow it. Run the step once per design: at the first design of an issue, and again when a push-back or a review changes what the design is for. It is a challenge, never a gate.
|
|
@@ -42,13 +42,13 @@ An answered root stands in the admission line until the pass that resumes it, an
|
|
|
42
42
|
|
|
43
43
|
- Set a child's dependencies in one call naming every issue it waits on: `dispatch issue-update --issue <child> --blocked-by <a> --blocked-by <b>`, or `--blocked-by` on `dispatch issue` at creation. The call replaces the child's whole list, so read its existing links first (`dispatch read`). Release it with the rest: `legion({ op: "release_children", issues: ["LEGION-41", "LEGION-42"] })`. Legion holds a released child that waits on an issue not `done` and starts it itself at its last blocker's close. A child that builds on another repository's merged change is not held this way: release it as `skill://legion-architect/references/decomposition.md` "Across repositories" says. No child of this tree waits on a sibling's merge in a repository this tree already has a pull request in: that work rides in the pull request that carries it (section 1).
|
|
44
44
|
- Release every child as soon as it is filed, each with `--blocked-by` the issues it waits on, and never hold a release back for a close: a released child, held or running, keeps the root's close waiting, but once the root's own pull request has merged the root closes the moment its last released child leaves, and a child released after that finds no live tree and runs as an orphan root of its own.
|
|
45
|
-
- On each `child-closed`, read the child's handoff. Edit the spec of each open child the result changes, and take out each child it makes unneeded with `park_child
|
|
46
|
-
- Before you park a child for good (
|
|
45
|
+
- On each `child-closed`, read the child's handoff. Edit the spec of each open child the result changes, and take out each child it makes unneeded with `park_child`. Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and say with `dispatch comment` which of those it is.
|
|
46
|
+
- Before you park a child for good (any park the rule allows), set the `--blocked-by` list of each sibling that waits on it again without it (one call with the rest of its list, or `--clear-blocked-by` when it was the only one), or park that sibling too when its work ends with the parked child, under the same rule: a parked child is stopped, not done, and its dependents stay held with no notice. A park followed by `rerun_child` keeps its dependents' links: they wait through the rerun and start when the rerun's merge closes the child. A child whose work has not ended is not parked to let its tree reach the end: you ask the person whether its work must end with the root, and the root's close hands such a child to Legion as a root of its own (`skill://legion-architect/references/acceptance.md`, "Hand-over at a root's linger").
|
|
47
47
|
- A released child takes an admission slot of its own when the daemon starts its first phase and keeps it until it is done or leaves the workflow, and it waits in the admission line until the daemon starts it, so a tree of four started issues holds four of the cap's issues. It never becomes a root while your tree is live.
|
|
48
48
|
|
|
49
49
|
## 3. Children complete
|
|
50
50
|
|
|
51
|
-
Your issue's own first phase does not start while Dispatch shows an open child under it, one you filed and have not released included: the daemon tells you once per issue and run of its tree with a `children-first` notice naming each open child and the Dispatch status that holds it, and starts the parent at its next admission slot once the last of them has left the workflow, closed, gone to `icebox`, or been moved out from under it, to another parent or to none. So file and release every child
|
|
51
|
+
Your issue's own first phase does not start while Dispatch shows an open child under it, one you filed and have not released included: the daemon tells you once per issue and run of its tree with a `children-first` notice naming each open child and the Dispatch status that holds it, and starts the parent at its next admission slot once the last of them has left the workflow, closed, gone to `icebox`, or been moved out from under it, to another parent or to none. So file every child at once, and release every child that should run. Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the child. A released child, a held one included, stays under the parent, because the parent's wait ends when that child leaves the workflow. Move out from under the parent only a child you have not released and that should not run now. Move it under another issue of the same tree that has started a phase and has not reached `accepting`, and never under an issue it waits on: that move ends the parent's wait and leaves the child in the tree, because only an issue at `admitted` holds a children-first wait (`ChildrenFirstCandidates` in `packages/daemon/internal/record/children_first.go`) and a re-parent never changes the record's tree (`packages/daemon/internal/admit/admit.go`). After the move, ask the person on the root (`dispatch ask`) when that child's work should run or stop: release it when they say to run it; when they say to stop it, close it, or move it to `icebox` under the rule when they say its work should wait, citing their answer. Hold the acceptance of the issue you moved it under, and of the root, until they answer. Never give such a child the `legion` label, and never clear its parent while the tree is live, because the daemon admits an orphan as a root of its own only when its tree is not live (`admit.go`): such a child would run nowhere. Where the tree holds no issue to move the child under, ask the person. No notice marks the last child's close. A child filed after your issue started runs beside it, and the daemon refuses the parent's `sign_off` while that child is in the workflow: run the parent's last round (section 4) so its head carries the child's merge.
|
|
52
52
|
|
|
53
53
|
## 4. Integration verification
|
|
54
54
|
|
|
@@ -36,11 +36,17 @@ legion({ op: "sign_off", issue: "LEGION-40" })
|
|
|
36
36
|
failed architect's notice is dropped, so a retried one learns of the wait from its catch-up
|
|
37
37
|
alone). Accept it as this section says, a parent only after its last round (below).
|
|
38
38
|
- The daemon refuses `sign_off` while an issue beneath the one you accept is still in the workflow
|
|
39
|
-
(`SIGNOFF_CHILD_IN_WORKFLOW`, naming each one):
|
|
40
|
-
with `park_child
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
(`SIGNOFF_CHILD_IN_WORKFLOW`, naming each one): run each one to done, and sign off again.
|
|
40
|
+
Park one with `park_child` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed,
|
|
41
|
+
and say in a comment which of those it is. Ask the person about a child that can reach neither
|
|
42
|
+
`done` nor a park under that rule, and hold the acceptance until they answer. Hold it too, for
|
|
43
|
+
the root and for the issue you moved an unreleased child under, until the person answers the ask
|
|
44
|
+
on the root about that child (`skill://legion-architect`, section 3): release the child when they
|
|
45
|
+
say to run it; when they say to stop it, close it, or move it to `icebox` under the rule when
|
|
46
|
+
they say its work should wait, citing their answer. A parent: sign off only after its last round
|
|
47
|
+
(below). The daemon then closes a parent that is not the root at its own merge, which under this
|
|
48
|
+
rule comes after its children's. One issue beneath never holds it: one the daemon itself holds
|
|
49
|
+
at `admitted` under an ancestor it has already accepted, which starts when that ancestor closes.
|
|
44
50
|
- `request_backward_move` names the issue, because your grant serves the tree; the daemon starts
|
|
45
51
|
that phase's role with your reason in its task.
|
|
46
52
|
- `handoff_complete` from you in `accepting` is refused `ACCEPTANCE_IS_SIGN_OFF`. CI red at the head
|
|
@@ -70,9 +76,10 @@ requirement. Nothing in the tree builds on the parent's own merge, which comes l
|
|
|
70
76
|
that waits for it waits forever, so work another child builds on is a child of its own, in a
|
|
71
77
|
repository of its own or with a deploy of its own. While the approved head does not carry those
|
|
72
78
|
merges, or a check in another repository has no pass standing since the close of a child it
|
|
73
|
-
needs, leave the issue in `accepting` until each has closed (`child-closed`) or
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
needs, leave the issue in `accepting` until each has closed (`child-closed`) or a park has
|
|
80
|
+
already taken it out (`child-status`). That wait is no reason to park a child. Move a parked
|
|
81
|
+
child's criterion to the root's own pull request or a released, open child first; never
|
|
82
|
+
downgrade it. A root's requirement stays the root's, pending
|
|
76
83
|
until this round, where its head must meet it.
|
|
77
84
|
Then, in one turn:
|
|
78
85
|
|
|
@@ -210,11 +217,13 @@ phase records and pull request carried into a new generation, and that phase's r
|
|
|
210
217
|
child that never started is handed over too, carrying no run, whatever held it at `admitted`: it
|
|
211
218
|
waits in the line for a slot and for any unfinished blocker, and its architect starts as a fresh
|
|
212
219
|
root and registers its own spec. Only a child that finished, was parked or was never released
|
|
213
|
-
stays. The child stays its own tree; reopening the old root does not take it back.
|
|
214
|
-
|
|
220
|
+
stays. The child stays its own tree; reopening the old root does not take it back. The hand-over
|
|
221
|
+
runs by itself and needs no action from you.
|
|
222
|
+
Park a child with `park_child` before then only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the child.
|
|
223
|
+
Ask the person whether a child's work must end with the root. A root that is parked
|
|
215
224
|
rather than closed hands over only a child in `merging` whose pull request is still open,
|
|
216
225
|
since the daemon re-admits no parked root and only that child's own merger, started again under
|
|
217
|
-
its own tree, merges that head
|
|
226
|
+
its own tree, merges that head. Ask the person whether that child's merge must wait for the root.
|
|
218
227
|
|
|
219
228
|
If you are that child's architect:
|
|
220
229
|
|
|
@@ -240,6 +249,6 @@ The first phase that resume starts needs no slot of its own either, since the ro
|
|
|
240
249
|
A changes request, or a newer version of the document that hands the request back to you, leaves the gate closed, so it holds the tree's work until a new approval.
|
|
241
250
|
While your answered root stands in the line, your record carries `waitingLine`: your place in the line and its length, your `part` (`returned`) and `kind` (`answered`), your `partPlace` of `partLength` among the issues whose work came back, `holdsSlot` true because your root has held its slot since its start, `since`, the moment your work came back, and `reason`, the daemon's own sentence for that place.
|
|
242
251
|
An issue that has not started carries `rootRank`, `ownRank` and `rootKey` in place of `since`, the two Dispatch ranks that placed it and the key of its tree root.
|
|
243
|
-
`why` beside it says why any issue of your tree is not working now, in one word and one sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it; `unlisted`, an issue the record holds in the workflow that no admission list places.
|
|
252
|
+
`why` beside it says why any issue of your tree is not working now, in one word and one sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it, though its reason can be the sentence of the issue's `admission.held` word (the sentence table of `packages/daemon/internal/projection/why.go` says when); `unlisted`, an issue the record holds in the workflow that no admission list places.
|
|
244
253
|
Nothing is sent to you about that wait, and your resume task says what answered it.
|
|
245
254
|
Act on neither your place nor your wait: the daemon starts you again on the pass that reads the answer.
|
|
@@ -62,7 +62,9 @@ EOF
|
|
|
62
62
|
- A child that duplicates another issue and is not yet released is never released: fold it by the
|
|
63
63
|
duplicate rule of `skill://dispatch-first`. The daemon records a child at its release and
|
|
64
64
|
re-asserts a status only on an issue it has recorded, so that close stands. A released duplicate
|
|
65
|
-
goes out with `park_child` instead.
|
|
65
|
+
goes out with `park_child` instead, because its work is folded into the issue you keep.
|
|
66
|
+
Move an issue to `backlog`, `icebox` or `triage` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the issue:
|
|
67
|
+
for a duplicate, name the issue you keep in a `dispatch comment` on the child.
|
|
66
68
|
- Then paste each survivor's whole spec into a fresh `task(agent="plan-gap-analyst")` to check it
|
|
67
69
|
against `skill://dispatch-writing-specs`, `wait` for its result, and fix what it flags: your own
|
|
68
70
|
reread misses the terms
|
|
@@ -15,17 +15,17 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
15
15
|
| Wake | Procedure |
|
|
16
16
|
| --- | --- |
|
|
17
17
|
| `carried-gate-opened` | Only a root whose catch-up said `carried` gets it. Its `version` and `reason`: a human approved the old root's spec document at `version`, which opened the gate this root carried; the daemon has started any child waiting on it. It names no step: the carry brings the old root's gate records, and the catch-up reports every gated step the carry did not bring as unregistered, so register each of those on this issue's own document for that step (`skill://legion-architect/references/design-gate.md`). It is not `design-approved`: do not proceed to section 2 or release a wave because of it, and start nothing. |
|
|
18
|
-
| `child-status` | A child of your tree left the workflow or re-entered it, or joined your tree from the admission queue; the reason names the child and its new status, or reads `<KEY> joined the tree of <ROOT> from the admission queue
|
|
19
|
-
| `child-closed` | Read the child completion and remaining open children. Re-scope open work,
|
|
18
|
+
| `child-status` | A child of your tree left the workflow or re-entered it, or joined your tree from the admission queue or from a closed tree; the reason names the child and its new status, or reads `<KEY> joined the tree of <ROOT> from the admission queue`, or, for a member of a closed tree your release took, `<KEY> joined the tree of <ROOT> from the closed tree of <OLD ROOT>`. `todo` (a human's move, your `release_children`, or your `rerun_child`) means it runs again under your tree from planning, and the daemon starts it; you start nothing. A child held for a blocker starts the same way once nothing holds it, and the reason, naming it and its root, says what cleared the hold: its last blocker's close, naming the issues it waited on, now done, or a person or you taking its blocked-by links off; you start nothing for it either. `backlog`, `icebox` or `triage` (a human's move, or your `park_child`) means the daemon has suspended its workers, and it advances no further until it is set back to `todo`. A `park_child` and then a `rerun_child` is that child's restart and not a park, because the daemon refuses `rerun_child` on a child whose phase is not `done` (`CHILD_RUNNING`, `packages/daemon/internal/api/architect.go`). Joined from the admission queue means a root that waited for a slot and never ran, which a person made a child of your tree or your `release_children` adopted, now runs in your tree with no architect of its own and takes an admission slot of its own when its work starts, from planning when it is `todo` and parked otherwise; one that waits on an unfinished blocked-by issue is held for that blocker like any other child, and starts when nothing holds it; you start nothing. A reason saying an issue is beneath an ancestor whose reviewed head the daemon has already accepted is a person's `todo` the daemon recorded and holds at `admitted`: nothing starts it until that ancestor closes, and a `request_backward_move` of the ancestor is what runs it under the ancestor now. What the rest of the tree does is your decision. When a park leaves no child that an issue in `accepting` waits on, run that issue's last round (`skill://legion-architect/references/acceptance.md`). |
|
|
19
|
+
| `child-closed` | Read the child completion and remaining open children. Re-scope open work, and take out with `park_child` each child the result makes unneeded (first take its link off each sibling that waits on it, or park that sibling too when its work ends with the parked child, under the same rule, as section 2 says) and say why with `dispatch comment`. Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed. Then file any new child the result calls for, after the red-team check in `skill://legion-architect/references/decomposition.md`, and release it at once with `release_children`, blocked by what it builds on (section 2). When a worker waits on this child for a missing surface (see `phase-finished`), tell it to continue with `envoy_publish` to its role topic. The last child's close is not the end-game (section 3). When it was the last child an issue in `accepting` waits on, run that issue's last round (`skill://legion-architect/references/acceptance.md`). |
|
|
20
20
|
| `child-release-stalled` | Its `reason` names a child your `release_children` released that your tree has not recorded, its parent, and why, one of three: the parent's release has not reached the daemon after three tries; or GitHub did not answer the App installation read of a repository on the child's parent chain, and the release left the child unrecorded because a parent on that chain is not `todo`, or did not write the child `todo` because its parent is not recorded; or the daemon's recovery of such a repository, once GitHub answered, still left children unrecorded (one notice per tree lists them all, each with its parent). Read the parent's record with the `legion` tool's `read_record` (`issue` the parent); release the parent first when the `reason` says to, then run `release_children` for the child again once the parent is recorded in your tree, and tell the controller if it never is. |
|
|
21
21
|
| `child-not-recorded` | Its `reason` names a child your tree did not record and why: its repository resolves to none (neither it nor an ancestor names one, and the project has no default), or to one not mapped to the project, or to one the daemon leaves out for a missing GitHub App. The daemon said why on the child too. Set the child's repository to one of the project's (`dispatch issue-update --repo owner/name`), then release it again with `release_children`; tell the controller when the repository it needs is not served. |
|
|
22
|
-
| `children-first` | An issue of your tree starts no phase of its own while Dispatch shows an open child under it, a child you filed and have not released included. The reason names the parent and each open child with the Dispatch status that holds it, and each cycle it found (a child `blocked_by` an issue above it on its own parent chain, which only a person taking that link off ends: open a `dispatch ask`). It comes once per issue and run of its tree. Release every child that should run, and
|
|
22
|
+
| `children-first` | An issue of your tree starts no phase of its own while Dispatch shows an open child under it, a child you filed and have not released included. The reason names the parent and each open child with the Dispatch status that holds it, and each cycle it found (a child `blocked_by` an issue above it on its own parent chain, which only a person taking that link off ends: open a `dispatch ask`). It comes once per issue and run of its tree. Release every child that should run. Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the child. A released child, a held one included, stays under the parent, because the parent's wait ends when that child leaves the workflow. Move out from under the parent only a child you have not released and that should not run now. Move it under another issue of the same tree that has started a phase and has not reached `accepting`, and never under an issue it waits on: that move ends this wait and leaves the child in the tree (section 3). After the move, ask the person on the root (`dispatch ask`) when that child's work should run or stop: release it when they say to run it; when they say to stop it, close it, or move it to `icebox` under the rule when they say its work should wait, citing their answer. Hold the acceptance of the issue you moved it under, and of the root, until they answer. Never give such a child the `legion` label, and never clear its parent while the tree is live, because such a child would then run nowhere (section 3). Where the tree holds no issue to move the child under, ask the person. The daemon starts the parent's first phase once the last open child has left the workflow — at once for a parent that already holds an admission slot, since an issue keeps the slot the daemon gave it until it is done or leaves the workflow, and at the next free slot for one that holds none. You start nothing. |
|
|
23
23
|
| `design-approved` | Its `version` is the approved one, and it names no step: under more than one gated step, read `gatedSteps` in your own record (the `legion` tool's `read_record`) to see which step that version opened and whether another still holds the tree. A human approved the document of one gated step at its current version; that step is open. Proceed to section 2 once every gated step is `approved` — except on a root whose catch-up said `handed_over`: its workers already run their phases, so start nothing. One whose `version` is the version a human's own answer to a decision block wrote, after an earlier approval (Dispatch carried that approval to it, "After approval" in `skill://legion-architect/references/design-gate.md`), opens nothing new: carry on, and release no wave because of it. A root that was waiting on a question in `awaiting_person` gets no such notice: the task that resumes it says "Your spec is approved at version N and the design gate is open: this resume is your design-approved wake", and that resume is this wake — proceed to section 2 on it. |
|
|
24
24
|
| `design-changes-requested` | Its `version` and `reason`, and no step: under more than one gated step, read `gatedSteps` in your own record (the `legion` tool's `read_record`) and take the step whose `status` is `changes_requested`. A human asked for changes to that step's document at `version`, for `reason`. Revise that document as the reason asks and request approval again as "The armed gate" in `skill://legion-architect/references/design-gate.md` says; end your turn; that step is closed. On a root that was waiting on a question in `awaiting_person`, a review the human gave after the wait began comes in the resume task, not in this notice, whether it answered the wait or came after something else did: the task names the review with its version and reason, unless a later approval superseded it. A `version` below the latest, or a second request for one version, is a request that reached the daemon late: read it as the same section's last paragraph says. Each request arrives once. |
|
|
25
25
|
| `phase-finished` | The daemon has already moved the issue to its next phase by its fixed table and started that phase's role; you start nothing. Read the finishing phase's handoff on the Dispatch issue (`dispatch handoff-read --issue <issue> --phase <word>`); if it shows unresolved gaps, tell the role now working the issue (`envoy_publish` to its role topic). A `planner` notice that names a departure from the spec's design defers to the full condition in "After approval" of `skill://legion-architect/references/design-gate.md`: when the approved Summary, the requirements, the checks, the scope and the settled decisions still hold, the plan is the record; otherwise change the root spec and request approval again as that section says. A `reviewer` notice whose GitHub review is `CHANGES_REQUESTED` needs nothing from you: the daemon has returned the issue to `implementing` (Dispatch `in_progress`) and started the **implementer**, whose correction goes through the tester and the reviewer again, never straight to retro. A `reviewer` notice with an `APPROVED` review means the issue is in `accepting` and the acceptance is yours (section 6): read the evidence, then `sign_off` (a parent only after its last round, "The last round" in `skill://legion-architect/references/acceptance.md`) or send it back with `request_backward_move`. A `tester` notice with `verdict: "fail"` — its handoff carries `implementerProof.verdict: "rejected"`, or a failure naming a check with no pass standing at the head — has gone back to the **implementer** by the daemon's table; never record that check's result from another role. A worker that reports no surface reaches the changed path sends that report instead of completing its phase, so the daemon starts nothing more on that issue and the worker stays idle in its session, not suspended: build the surface in this tree: a child issue (infrastructure, tooling, or a skill) after the red-team check in `skill://legion-architect/references/decomposition.md`, or, when the red team folds it, tell the waiting worker to move the issue back to `implementing` with `request_backward_move`, naming the surface. When it is a child, tell the waiting worker to continue with `envoy_publish` to its role topic once that child's `child-closed` arrives. That report is never a reason to advance the phase. |
|
|
26
26
|
| `pr-blocked` | Its `reason` reads `Issue reached review_round_cap=<N>: <n> rounds counted, <m> conflict rounds not counted.`, the implementer's round count: every move back to an earlier phase counts one, and a move made while the head conflicts with its base counts as a conflict round the cap leaves out; the notice comes once for each value the cap holds, so the rounds past the cap tell you nothing again, a cap raised in `legion.yaml` tells again at its new number, a lowered one tells once on the next counted round, and a new generation tells again from its own first crossing. It moves nothing, since the round that reached the cap has already started its worker. Tell the rounds apart by what announced each: a tester's fail by its `phase-finished` with `verdict: "fail"`; a request for changes by the reviewer's `phase-finished` over a `CHANGES_REQUESTED` review; the daemon's own move by a `checks-red` notice, whose reason names the conflict it was raised for (`the head conflicts with <base>: GitHub runs no checks on it; merge <base> forward`); a worker's `request_backward_move` by a `phase-finished` from the role that asked, whose reason reaches only the task of the worker the move started, so ask that worker; your own send-back from `accepting` by the reason you gave. The message's `<n> rounds counted` has already left the conflict rounds out, so judge the cap by it. Conflict returns need nothing from you beyond the next round. Tester fails and requests for changes are the rounds the cap is for; a red check moves nothing and is told to nobody as a notice, so it is no round at all. Each `review_round_cap` notice is a decision you make in the turn it wakes, never one left for the next round to make: read what every counted round found, choose one of the three below, act on it in the same turn, and post it as a `dispatch comment` on the issue naming the rounds you read and the choice. **Narrow**: the change itself is sound but each round finds more around it; tell the implementer and the reviewer (`envoy_publish` to each one's role topic) which checks the next round answers, dropping no requirement; a correctness finding is still fixed in this pull request, and so is a wording nit or any clear fix in a file it touches, so the `Fast-follow:` line carries only cleanup in files it does not touch. **Split**: part of the work cannot settle in this pull request and is a separately deliverable change (`skill://legion-architect`, section 1). On a child, run the red-team check in `skill://legion-architect/references/decomposition.md`, then file that part as a child of this issue's parent, never of this one (this issue closes at its own merge, and the split part usually builds on this pull request's unmerged code): `dispatch issue --project <project> --parent <parent> --title '<outcome>' --blocked-by <this issue> --spec-file -`. Release it now with `release_children`: Legion holds it on that `--blocked-by` link until this issue closes, and starts it then. A requirement moves only to that released child. On the root, open a `dispatch ask` for the part that cannot settle here (`skill://legion-worker/references/findings.md`): it stays this issue's requirement, and this pull request carries it, until the person who answers that ask records that the issue will not deliver it. **Accept the rounds**: each round found less than the one before it, and the last found no defect in the change itself (a stale line, a comment that states an old default); let the loop run and say why in the comment. A later notice is a new decision: accept again only when its round found less than the round you last accepted, and otherwise narrow or split. A finding that changes what the spec requires or what a check proves is a decision block in the root spec ("After approval" in `skill://legion-architect/references/design-gate.md`), and `dispatch ask` is only for a decision that needs a human's authority; neither replaces the choice. Judge a worker's backward move by the reason that worker gives. A move that sends back code found wrong counts with the tester fails. |
|
|
27
27
|
| `pr-merged` | The pull request merged and the issue did not close; its `reason` says why. Merged before the issue reached `merging`: the workflow runs on, and the merge closes the issue the moment it gets there, your acceptance and retro first. Merged while the rest of the tree still runs: the reason names the pull request and every issue the close waits for, and the root stays in `merging`, slot and workers kept, until the last of them is done or parked ("The close" in `skill://legion-architect/references/acceptance.md`). Either way you start nothing and no further notice follows. |
|
|
28
|
-
| `pr-closed-unmerged` | Decide from current scope whether the work is reopened, started over (`park_child` then `rerun_child`,
|
|
28
|
+
| `pr-closed-unmerged` | Decide from current scope whether the work is reopened, started over (for a child, `park_child` and then `rerun_child`, which is that child's restart and not a park, because the daemon refuses `rerun_child` on a child whose phase is not `done`: `CHILD_RUNNING`, `packages/daemon/internal/api/architect.go`), or ended with a reason. Delegate the repository action to the responsible phase worker and keep ownership. |
|
|
29
29
|
| `pull-request-missing` | Its `reason` names the issue, the repository, the branch and the handoff commit: the issue's implementer completed at that commit and GitHub lists no open pull request on the branch, so the issue stays in `implementing`. Tell the implementer (`envoy_publish` to its role topic) to open the pull request from that branch; the daemon records it and moves the issue to `testing` once it is open. When the work should not go on, decide as the `pr-closed-unmerged` row says. It comes once per handoff commit. |
|
|
30
30
|
| `message-refused` | Dispatch refused a write the daemon was making on an issue of your tree, the way it would refuse every attempt, so the daemon makes it no more. A close reason is held to Dispatch's bound at the call that carries it (`close_root` answers `CLOSE_REASON_TOO_LONG`, naming the bound and how far over the text is), so this is a refusal that check did not predict. Read its `reason`: on a status write the daemon writes the status all the same, so the status is set unless Dispatch refused the status itself, which the reason says — with the status set, only the reason beside it is on no issue, and you post what a person still needs yourself; with the status refused, the issue keeps the status it had while the daemon's own record reads the one the write carried, a disagreement no retry of the daemon's closes, so ask a person with `dispatch ask` to set it. On a message write nothing of what it carried reached the issue, and the `reason` gives its length and its first line, so post what a person needs yourself. |
|
|
31
31
|
| A reply on an ask you follow | Interpret the reply in the issue's design context. Answer in its thread (`dispatch comment --reply-to <comment id>`; under an open ask whose next move is yours, such as the approval request you must revise or hand back, `--reply-to-ask <ask id> --turn agent`, since a default-turn reply hands that request back to the human and a corrected `--summary` is then refused) where the reply carries a question, a disagreement, a correction or a fact you do not have, and whenever you are unsure; an approval, or an answer that settles the question with nothing left to say, draws no comment and no message back to the person who answered. Then adjust the plan or relay the reply via `envoy_publish` to the responsible worker's role token, which an answer needing nothing from you still needs; scope and product decisions remain with you. |
|
|
@@ -38,4 +38,4 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
38
38
|
## A root that joins your tree, and a refused release
|
|
39
39
|
|
|
40
40
|
- A root that waited in the admission queue, never ran and never left another tree joins your tree once a person makes it your child, if it is `todo`, and otherwise at your release of it (the `child-status` row of [wake routing](skill://legion-architect/references/wake-routing.md)); once in, it is held for its blockers like any child you release. A root that left another tree, handed over by its finished tree or admitted as an orphan, stays its own tree and never joins yours, even one that was your root's child before your root was admitted again. A labelled `todo` issue under a child you have not released, unless it ran as a tree of its own or left another tree, is held under that unreleased child (not a blocked-by hold): it waits for no slot until your release of it or of that child brings it in, with any `todo` child of its own.
|
|
41
|
-
- A release that cannot take a child in is refused 409 and writes nothing, its message naming the child and why: release the rest again without it. `CHILD_NOT_ADOPTABLE` is an issue that runs or ran as a tree of its own, carries a run handed over to it, or was handed over (or admitted as an orphan) as a root of its own: leave it there, or ask the controller. `CHILD_IN_OTHER_TREE` is another tree's child. When the tree it names is a root held under an unreleased child of yours (a root that queued and never ran, so it has no architect of its own), release that root, or the unreleased child it sits under, instead: its children come with it. Otherwise re-parent the child back in Dispatch, or ask that tree's architect or the controller.
|
|
41
|
+
- A release that cannot take a child in is refused 409 and writes nothing, its message naming the child and why: release the rest again without it. `CHILD_NOT_ADOPTABLE` is an issue that runs or ran as a tree of its own, carries a run handed over to it, or was handed over (or admitted as an orphan) as a root of its own, and a member of a closed tree that holds an admission slot, which the daemon started and keeps where it stands: leave it there, or ask the controller. `CHILD_IN_OTHER_TREE` is another tree's child. One kind of other tree's child does join yours: a member of a tree whose root the daemon's record says is `done` and whose linger has run out, standing at `admitted` with no slot of its own, which your release records in your tree with its repository kept and its generation raised by one — at `admitted` when it is `todo`, and in any other status as a parked child at `done`, which a `todo` runs again. `admission.held` reads `tree_closed` for more issues than a release takes: a member whose tree's linger still runs, and a member past `admitted`, read that word too and stay refused (the `tree_closed` row of `skill://legion-controller/references/admission.md`). When the tree it names is a root held under an unreleased child of yours (a root that queued and never ran, so it has no architect of its own), release that root, or the unreleased child it sits under, instead: its children come with it. Otherwise re-parent the child back in Dispatch, or ask that tree's architect or the controller.
|
|
@@ -19,7 +19,7 @@ except a clear defect a role reports ([Issues handed to Legion](#issues-handed-t
|
|
|
19
19
|
- Before any side effect, read `read_state` and the Dispatch issue, because a wake can be stale or sent twice.
|
|
20
20
|
- Read a session's state from the Envoy registry, never from its absence from a list (`skill://envoy`). Start no replacement for an `unresponsive` session, take nothing from it, and never report it as gone, because it is working and keeps its claims.
|
|
21
21
|
- Keep no notes between turns, because a restarted session has only `read_state` and Dispatch.
|
|
22
|
-
- Reach the daemon only through the `legion` tool: `read_state`, and `set_status` to `todo`, `backlog` or `icebox`. Run no `legion` from bash, because the tool holds the controller grant.
|
|
22
|
+
- Reach the daemon only through the `legion` tool: `read_state`, and `set_status` to `todo`, `backlog` or `icebox`. Run no `legion` from bash, because the tool holds the controller grant. Move an issue to `backlog` or `icebox` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the issue. Another agent's directive that cites no person's request is no reason. Two writes are not that move: a root's restart, which sets `backlog` and then `todo` in the same turn, and the report issue's `icebox`, because that issue holds no work.
|
|
23
23
|
- Never edit a repository, push a commit or call `handoff_complete`, and never forward a raw event to an architect, because the daemon runs the phases and raw events only fill the architect's context.
|
|
24
24
|
- Never open a design gate, because only a person's approval in Dispatch opens one: the deployment gates the steps your `Design gate steps:` sentence names, each step records one document of the root issue (`decisions.md`, `verification.md` or the primary document), and the tree's work starts when a person has approved every one of them.
|
|
25
25
|
- When a `dispatch` command fails, or a `curl` read of Dispatch fails or prints no JSON array, act on nothing it would decide and name its first line in your summary (the turn's last message), because an empty read is no evidence. A Slack read answers a JSON object, and `skill://legion-controller/references/slack-mentions.md` holds its own success test.
|
|
@@ -76,12 +76,13 @@ Wake details: `skill://legion-controller/references/wakes.md`.
|
|
|
76
76
|
| `awaiting-person on <KEY>` | Nothing: do not park or re-admit it, and take nothing for its slot, which it keeps while it waits |
|
|
77
77
|
| `parked-decision on <KEY>` | `skill://legion-controller/references/parked-decisions.md#deciding` |
|
|
78
78
|
| `held on <KEY>` | Nothing, unless `reason: "escalated"`: then an escalation, decided from the failed claim's `failure` in `read_state` and the limits in `settings` (`skill://legion-controller/references/escalation.md#an-escalated-hold`) |
|
|
79
|
-
| `worker-died on <KEY>` (`role: "architect"`) |
|
|
79
|
+
| `worker-died on <KEY>` (`role: "architect"`) | Nothing when the root's `phase` is `done`: the tree is parked already. Otherwise restart the tree when you find no cause or its cause is gone, and ask whether to park it when the cause stays (`skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree`) |
|
|
80
80
|
| `worker-stalled on <KEY>` (`role: "architect"`) | Nothing, unless the notice says the claim failed: its turn was ended, its task is still owed, and the notice says what became of its process |
|
|
81
81
|
| `update-stalled on <KEY>` | `skill://legion-controller/references/escalation.md#an-update-round-that-is-not-finishing-update-stalled` |
|
|
82
82
|
| `provider-errors on <KEY>` | Name the run and its model in the day's report; send it to the issue's architect; for one claim that stays stuck, `compact` first, and `fresh_session` only when it is still refused after that |
|
|
83
83
|
| An architect's escalation | `skill://legion-controller/references/escalation.md` |
|
|
84
84
|
| A finding ask's reference, or its answer | `skill://legion-controller/references/finding-asks.md` |
|
|
85
|
+
| An answer to a park ask (`Park it`, `Leave it admitted`) or a deferral ask (`Defer it`, `Let it run`) | The procedure that opened it: `skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree` step 4, or `skill://legion-controller/references/backlog-stewardship.md#a-root-the-plan-defers` step 4 |
|
|
85
86
|
| A clear defect a role sends | `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect` |
|
|
86
87
|
| A finding sent as text | Open an ask ([Findings](#findings-and-the-issues-you-file)) |
|
|
87
88
|
| A scope question or a routing request | `skill://legion-controller/references/backlog-stewardship.md` |
|
|
@@ -116,8 +117,10 @@ person's label off, because it is their decision. Label an issue before you `set
|
|
|
116
117
|
Two handovers are queued by the daemon, with no write of yours. A person's `legion` label on an
|
|
117
118
|
unrecorded root in `triage` is queued by the daemon: it writes the root's `todo` through its
|
|
118
119
|
outbox. A person's approval of the primary document of a parked (`backlog` or `icebox`) labelled
|
|
119
|
-
root with no live tree is queued by the daemon the same way
|
|
120
|
-
|
|
120
|
+
root with no live tree is queued by the daemon the same way, except a carried approval and one on
|
|
121
|
+
a root that keeps a Dispatch parent, which come to you as notices
|
|
122
|
+
(`skill://legion-controller/references/parked-decisions.md#the-notice`). At a handover, you write
|
|
123
|
+
`todo` only for the roots you label at a person's request or file yourself.
|
|
121
124
|
|
|
122
125
|
An issue whose work must start at a commit other than its base branch's head needs its branch
|
|
123
126
|
`legion/<KEY>` created at that commit before Legion starts the issue. One command creates it:
|
|
@@ -136,8 +139,16 @@ which branch to open the pull request against; nothing else carries that.
|
|
|
136
139
|
|
|
137
140
|
A free slot is no reason to take an issue: a labelled root in `todo` takes the next slot through
|
|
138
141
|
`admission.waiting` without you, and a parked issue (status `backlog` or `icebox`) means "do not
|
|
139
|
-
run now". Move an issue out of `backlog` or `icebox` only on a request or a plan directive that
|
|
140
|
-
it,
|
|
142
|
+
run now". Move an issue out of `backlog` or `icebox` only on a request or a plan directive that
|
|
143
|
+
names it, only as the list of moves to `todo` below allows, and cite that request. That rule does
|
|
144
|
+
not apply to your own hold, a park whose mark `Parked by Legion while it waits on:` passes the
|
|
145
|
+
test of `skill://legion-controller/references/parked-decisions.md#deciding`, step 2. That tree
|
|
146
|
+
returns to `todo` as the list below says.
|
|
147
|
+
A free slot is no reason to park an issue, and a full cap is no reason either.
|
|
148
|
+
When a tree holds a slot while it waits on an event outside Legion, that wait is no reason to park
|
|
149
|
+
it either (`skill://legion-controller/references/wakes.md#a-tree-that-waits-on-an-event-outside-legion`).
|
|
150
|
+
Report the free slots, or the full cap, to the person in the day's report, and move nothing for them.
|
|
151
|
+
A slot is one issue the daemon has started, a root or a child, not one
|
|
141
152
|
tree: a tree of four started issues holds four slots. An issue takes its slot when the daemon
|
|
142
153
|
starts it and keeps it
|
|
143
154
|
until it is done or leaves the workflow,
|
|
@@ -168,13 +179,29 @@ Every move to `todo` you make is one of these:
|
|
|
168
179
|
|
|
169
180
|
- a root you labelled at a person's request or filed for a clear defect no tree owns, at triage (a
|
|
170
181
|
root a person labelled is queued by the daemon);
|
|
171
|
-
- an issue a person asks you to start
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
gives
|
|
182
|
+
- an issue a person asks you to start, a parked one included, because that request is the
|
|
183
|
+
person's own (`skill://legion-controller/references/triage.md#label-an-issue-for-a-person`);
|
|
184
|
+
- a root still in the workflow (its `phase` is not `done`) whose architect failed, once you found
|
|
185
|
+
no cause or checked that its cause is gone, or which is held, once you checked that its cause is
|
|
186
|
+
gone; one whose architect retired, once a person's decision gives its work a next step and you
|
|
187
|
+
found no cause or checked that its cause is gone
|
|
188
|
+
(`skill://legion-controller/references/parked-decisions.md#deciding`, step 1); any of these
|
|
189
|
+
also because a person asks;
|
|
190
|
+
- a tree you parked for a hold, for a failed architect, or while it waits on an event outside
|
|
191
|
+
Legion (`Parked by Legion while it waits on:`), once you checked that its cause is gone or that
|
|
192
|
+
its event has happened, with a comment on the root that cites that mark and says what you
|
|
193
|
+
checked, or once a person's decision after the park gives it a next step
|
|
194
|
+
(`skill://legion-controller/references/parked-decisions.md`,
|
|
195
|
+
`skill://legion-controller/references/wakes.md#a-tree-that-waits-on-an-event-outside-legion`);
|
|
176
196
|
- stopped-session work that a person's directive in the weekly plan moves to Legion.
|
|
177
197
|
|
|
198
|
+
`admission.held` is every issue the daemon's record holds in the workflow that stands in neither
|
|
199
|
+
`admission.active` nor `admission.waiting`: each row gives the issue, one word for why nothing of
|
|
200
|
+
it runs, and the issues that hold it. Read it beside `admission.blocked`, which names Dispatch
|
|
201
|
+
links and children-first waits alone. The daemon starts none of the issues in `admission.held` by
|
|
202
|
+
itself, so a row ends when a person acts or when the tree that owns the work moves;
|
|
203
|
+
`skill://legion-controller/references/admission.md` gives the word for each row and what ends it.
|
|
204
|
+
|
|
178
205
|
## Findings, and the issues you file
|
|
179
206
|
|
|
180
207
|
File an issue only when a person asks you to (a direct message, a Slack request, or their answer
|
|
@@ -25,3 +25,35 @@ wake — an unanswered `awaiting_person` root only when its label or its Dispatc
|
|
|
25
25
|
resume unsafe. Holding no slot is by itself no fault: a root waiting in the line and a child its
|
|
26
26
|
architect has not released yet hold none while their tree runs. The wake is live only, so a
|
|
27
27
|
controller that starts later finds such a root by the last row, as its start procedure does.
|
|
28
|
+
|
|
29
|
+
## `admission.held`: what nothing starts
|
|
30
|
+
|
|
31
|
+
`admission.held` is every issue the daemon's record holds in the workflow that stands in neither
|
|
32
|
+
`admission.active` nor `admission.waiting`. Each row carries the issue, one word for why nothing
|
|
33
|
+
of it runs, and `heldBy`, the issues that hold it, which is absent where no issue holds it. The
|
|
34
|
+
daemon reads the words in the order of the table below and takes the first that is true, so one
|
|
35
|
+
issue reads one word, and that word is the same in `read_state` and in the `tick` notice. The
|
|
36
|
+
list names no issue `admission.active` or `admission.waiting` names, so the three lists together
|
|
37
|
+
are every issue of the workflow and what each one is doing. `admission.blocked` keeps its own
|
|
38
|
+
rows beside them: it names Dispatch links and children-first waits alone, and an issue it names
|
|
39
|
+
that stands in `admission.held` reads there under whichever word the daemon's order gives it,
|
|
40
|
+
which can be an earlier one — a child under a shut gate that a link also holds reads
|
|
41
|
+
`design_gate`. A blocked root the line carries stands in `admission.waiting` and has no held row
|
|
42
|
+
at all.
|
|
43
|
+
|
|
44
|
+
The daemon starts none of these issues by itself. Name them in the day's report and take nothing
|
|
45
|
+
for them, except where the row's last column names an act of yours.
|
|
46
|
+
|
|
47
|
+
| Word | What it means | What ends the hold |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `tree_closed` | The daemon's record of the issue's tree root says `done`, or that root's linger is still running after it left the workflow. `heldBy` names that root | An architect's `release_children` of the live tree whose Dispatch parent the issue reaches: the daemon records it in that tree with its repository kept and its generation raised by one, at `admitted` when it is `todo` and in any other status as a parked child at `done`, which a `todo` runs again. The row alone does not say whether that release would be accepted, and three kinds of issue read this word that no release takes: a member of a tree still in its linger, and a member of a parked tree, whose park starts a linger of its own, both refused while that linger runs; and a member past `admitted`, refused `CHILD_IN_OTHER_TREE`. A member of a closed tree that holds an admission slot stands in `admission.active` and has no held row: a release of one past `admitted`, the usual member at work, is refused `CHILD_IN_OTHER_TREE`, and of one at `admitted`, `CHILD_IN_OTHER_TREE` while its root's linger runs and `CHILD_NOT_ADOPTABLE` once that linger has ended |
|
|
50
|
+
| `tree_parked` | The issue's tree root left the workflow to `backlog` or `icebox`, because that tree was parked (by a person, or by your own hold), and that root's linger has run out. While it still runs the member reads `tree_closed` instead. `heldBy` names that root | A `todo` on the root, which re-admits the tree, and nothing else: no release takes such a member. Where the park is your own hold, the parked-root walk decides it (`skill://legion-controller/references/parked-decisions.md`) |
|
|
51
|
+
| `label_off` | The issue is a root the admission queue does not carry, because the record says the `legion` label is off. A person took it out of Legion | A person's label. Take no issue back yourself: the intake rule in your deployment instructions keeps such a root out |
|
|
52
|
+
| `ancestry` | The root's Dispatch chain reaches another live root, so the issue is that tree's unreleased work. `heldBy` names the live roots on that chain | That tree's architect releasing the issue, or releasing the parent above it; or every live root leaving that chain, after which it queues as a root of its own |
|
|
53
|
+
| `root_awaiting_person` | The issue's tree root has handed work to a person, a question or its spec, and has not resumed yet, whether or not the person has answered, so the daemon starts no issue of the tree. `heldBy` names that root | The root's resume, which the person's answer or review brings: the daemon then resumes the root's architect |
|
|
54
|
+
| `design_gate` | The design gate of the issue's tree root is not open at every step the deployment gates. `heldBy` names that root | A person's approval of each gated step's document at its current version |
|
|
55
|
+
| `dispatch_blocker` | A Dispatch `blocked_by` link of the issue names an issue that is not `done`, and holds the issue where it stands. `heldBy` names the unfinished blockers | Each blocker reaching `done` (a person's close, or the blocker's own merge), or the link taken off by a person or by the tree's architect. The issue is in `admission.blocked` as well |
|
|
56
|
+
| `children_first` | Dispatch shows an open child under the issue, so its own first phase waits for the children. `heldBy` names the open children | The last open child leaving the workflow, which is the tree architect's work. The issue is in `admission.blocked` as well |
|
|
57
|
+
| `accepted_ancestor` | The daemon has accepted the reviewed head of an issue above this one, so nothing of its own work starts before that ancestor closes. `heldBy` names that ancestor | The ancestor's close, which the merge of its pull request writes |
|
|
58
|
+
| `at_work` | An issue in a phase that keeps no admission slot; no issue reads it today (`record.HeldAtWork` says why) | None today: no issue reads this word. No `heldBy`: no other issue holds it |
|
|
59
|
+
| `unclassified` | No word above is true of the issue. The daemon logs it once for that issue and run | Nothing of yours. Name it in the day's report with its `phase` and `status`, so a person can read what the daemon could not say |
|
|
@@ -96,7 +96,46 @@ tree (a root in `admission.trees`, or an issue whose `tree` is one); its archite
|
|
|
96
96
|
|
|
97
97
|
A person's `legion` label outranks a plan's deferral. The daemon queues the root at once: a
|
|
98
98
|
person's label on an unrecorded root in `triage` is the root's `todo`, written by the daemon. A
|
|
99
|
-
labelled root the
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
and
|
|
99
|
+
labelled root that the daemon has queued or runs, and that the weekly plan says to defer, is
|
|
100
|
+
parked by you at your next backlog pass, not before, and only when the plan's line names a
|
|
101
|
+
person's request to defer it: `set_status` it to `backlog`, or to `icebox` for a longer deferral,
|
|
102
|
+
and cite that request in a comment on the issue.
|
|
103
|
+
Park a root only when a person asked for that move, or when the work is done, folded into another issue or no longer needed.
|
|
104
|
+
A plan row you wrote with no such request behind it moves nothing. Ask the person whether to
|
|
105
|
+
defer that root instead:
|
|
106
|
+
|
|
107
|
+
1. Look for your earlier ask for that row. Read the root's comments with the command of
|
|
108
|
+
`skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree` step 1, with
|
|
109
|
+
`Asked whether to defer: ` in place of `Asked whether to park: `, and take the newest whose
|
|
110
|
+
second line is exactly that plan row. Compare that line alone. A comment or a reply from any
|
|
111
|
+
session counts as yours. When its ask is open, open nothing and post nothing. When it is
|
|
112
|
+
resolved with no answer, open nothing and post nothing for that row. The day's report names
|
|
113
|
+
the root and that ask, as `skill://legion-controller/references/daily-report.md` says. When it
|
|
114
|
+
is answered, and no reply of yours under it starts `Deferred dispatch://`,
|
|
115
|
+
`Not deferred dispatch://` or `Let run dispatch://`, act on its answer now (step 4). When your
|
|
116
|
+
reply under it starts `Deferred dispatch://` or `Let run dispatch://`, the person decided
|
|
117
|
+
already: open nothing and post nothing. When your reply under it starts
|
|
118
|
+
`Not deferred dispatch://`, that ask is spent, because its `Defer it` came when the check of
|
|
119
|
+
step 2 failed. Go on to step 2.
|
|
120
|
+
2. Otherwise, and when step 1 sends you here, check first that Legion runs the root: it carries
|
|
121
|
+
the `legion` label, it stands in `admission.active` or `admission.waiting` of `read_state` (the
|
|
122
|
+
`active` and `waiting` lines of its summary), and
|
|
123
|
+
`issues.<root>.phase` is not `done`. When one of these fails, open nothing and post nothing,
|
|
124
|
+
because there is nothing to defer. When all of them hold, open a `dispatch ask` on the report
|
|
125
|
+
issue that names the root and the plan row and
|
|
126
|
+
asks the person whether to defer that root, with the options `Defer it` and `Let it run`.
|
|
127
|
+
Follow it (`dispatch follow --ask '<ref>' --action follow`). Post one comment on the root
|
|
128
|
+
(`dispatch comment --issue <root> --body-file -`). Make its first line
|
|
129
|
+
`Asked whether to defer: dispatch://<REPORT KEY>/ask/<id>`. Make its second line the plan row,
|
|
130
|
+
exactly as the plan gives it: that line is the key that step 1 compares.
|
|
131
|
+
3. Name the row and that ask in the day's report while the ask is open.
|
|
132
|
+
4. On `Defer it`, when the check of step 2 still holds, park the root as
|
|
133
|
+
above, and cite the answer in a comment on the issue. On `Defer it` in any other case, move
|
|
134
|
+
nothing, and say in your reply what you checked. On `Let it run`, move nothing, and take the
|
|
135
|
+
deferral off that plan row with `dispatch doc-edit`, as step 4 of
|
|
136
|
+
[Reconcile the weekly plan](#reconcile-the-weekly-plan) edits a row, so that the next backlog
|
|
137
|
+
pass asks nothing. In each case, reply under the ask with what you did, its first line exactly
|
|
138
|
+
`Deferred dispatch://<root>`, `Not deferred dispatch://<root>` or `Let run dispatch://<root>`:
|
|
139
|
+
`dispatch comment --issue <REPORT KEY> --reply-to-ask '<ask id>' --body-file -`.
|
|
140
|
+
|
|
141
|
+
The cost is the architect's work between the daemon's `todo` and your park.
|
|
@@ -8,10 +8,13 @@ answer a finding ask: the report issue holds them all.
|
|
|
8
8
|
Use the issue the deployment instructions name for Legion's reports. With none named, use the
|
|
9
9
|
project's `Legion daily report` issue:
|
|
10
10
|
`dispatch search --query '"Legion daily report"' --project <PROJECT>`. When it does not exist,
|
|
11
|
-
create it once (the one issue you file unasked) and park it in `icebox
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
create it once (the one issue you file unasked) and park it in `icebox`.
|
|
12
|
+
The report issue holds no work, which is why it stays in `icebox`, and it is the one issue you
|
|
13
|
+
park with neither a person's request nor the end of its work behind it:
|
|
14
|
+
you park every other issue in `backlog` or `icebox` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the issue.
|
|
15
|
+
It never carries the `legion` label.
|
|
16
|
+
Assign it to the person who answers for the project: the one the deployment instructions name,
|
|
17
|
+
else the owner `dispatch whoami` names, because its asks reach that person's Inbox.
|
|
15
18
|
|
|
16
19
|
```text
|
|
17
20
|
dispatch issue --project <PROJECT> --title 'Legion daily report' --assignee '<email>' --spec-file - <<'EOF'
|
|
@@ -32,7 +35,8 @@ Each time you read it:
|
|
|
32
35
|
|
|
33
36
|
- `Status: done` means someone closed it: the close withdrew its open asks (each recorded
|
|
34
37
|
`withdrawn`; a reopen brings them back), and Dispatch refuses an ask there
|
|
35
|
-
(`409 ISSUE_CLOSED`). Reopen it with `set_status` to `icebox
|
|
38
|
+
(`409 ISSUE_CLOSED`). Reopen it with `set_status` to `icebox`, where the issue holds no work
|
|
39
|
+
and its asks stay answerable, and say so in the day's report.
|
|
36
40
|
- `Assignee: unassigned` with a person known: assign it, naming your session (`dispatch whoami`):
|
|
37
41
|
`curl -sS -X PATCH -H "Authorization: Bearer $(cat "$DISPATCH_TOKEN_FILE")" -H 'Content-Type: application/json' -d '{"assignee": "<email>", "actor": {"kind": "session", "id": "<session id>"}}' "$DISPATCH_URL/api/v1/issues/<REPORT KEY>"`.
|
|
38
42
|
An answer that does not print the issue with its new `assignee` left the assignee as it was
|
|
@@ -67,6 +71,12 @@ every issue by its `dispatch://` link and what it does for the reader, every pul
|
|
|
67
71
|
link's wait ends when each blocker reaches `done` (a person's close, or the blocker's own
|
|
68
72
|
merge) or its link is taken off (by a person or the tree's architect), and a children-first wait
|
|
69
73
|
ends when the last open child leaves the workflow, so take nothing for them.
|
|
74
|
+
- **What nothing starts.** Each issue in `admission.held`, grouped by its `reason`, with the
|
|
75
|
+
issues `heldBy` names: each group's count and its issues. Say for each
|
|
76
|
+
group what ends the hold, from the table in
|
|
77
|
+
`skill://legion-controller/references/admission.md`, so a reader sees whose act the work waits
|
|
78
|
+
on. An issue whose `reason` is `unclassified` goes in the report with its `phase` and its
|
|
79
|
+
`status`: the daemon could give it no word, and a person reads it.
|
|
70
80
|
- **Phase workers nothing will prompt.** Each entry of the tick's `silent` list, with the role whose
|
|
71
81
|
claim is silent and how long it has been quiet (`skill://legion-controller/references/wakes.md`).
|
|
72
82
|
That list arrives on the tick wake alone and is in no `read_state` field, so the report names the
|
|
@@ -74,6 +84,21 @@ every issue by its `dispatch://` link and what it does for the reader, every pul
|
|
|
74
84
|
An entry with `backgroundSince` is a worker whose own background work has stood past `worker_background_hours`,
|
|
75
85
|
which the daemon does not prompt.
|
|
76
86
|
Name it with how long that work has stood, counted from `backgroundSince`.
|
|
87
|
+
- **Waiting on a person.** Each tree whose next step waits on a person's answer, with that ask's
|
|
88
|
+
`dispatch://` reference, while the ask is open. Each row of the weekly plan that moved nothing,
|
|
89
|
+
because no person's request stands behind it, with its deferral ask's `dispatch://` reference,
|
|
90
|
+
while that ask is open. Leave out a row whose ask is resolved with no answer, because the next
|
|
91
|
+
bullet names it. Leave out a row whose root fails the check of step 2 of
|
|
92
|
+
`skill://legion-controller/references/backlog-stewardship.md#a-root-the-plan-defers`.
|
|
93
|
+
- **Asks resolved with no answer.** For each issue in `admission.active` or `admission.waiting`
|
|
94
|
+
that is the root of its tree (`issues.<KEY>.tree` is `<KEY>`), read its `Asked whether to park:`
|
|
95
|
+
and `Asked whether to defer:` comments with step 1's command of
|
|
96
|
+
`skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree`, once with each
|
|
97
|
+
prefix. Take the newest comment of each key (the comment's second line). When the ask that its
|
|
98
|
+
first line names is resolved with no answer (`dispatch read --ref '<that reference>'`), name the
|
|
99
|
+
root, the key and that ask's `dispatch://` reference. Leave out a key whose wait has ended: a
|
|
100
|
+
`held` or `architect failed:` key that `read_state` no longer builds (step 4 of that section),
|
|
101
|
+
an `event:` key whose event has happened, and a plan row that the weekly plan no longer defers.
|
|
77
102
|
- **Free slots.** Counted as the skill's "Free slots" says, in issues rather than trees; each
|
|
78
103
|
stays free until an issue in the line takes it.
|
|
79
104
|
- **Open capabilities.** Each row of `read_state`'s `capabilities` whose `status` is `open`: its
|
|
@@ -41,8 +41,9 @@ you release it. Read the record, then choose the release.
|
|
|
41
41
|
linger, `set_status` to `todo` releases the hold and costs nothing: the issue returns to the
|
|
42
42
|
phase `heldFrom` names, that phase's role starts with its task, and the generation, the review
|
|
43
43
|
rounds, the pod and the place in the admission line stay as they were. Take it when the cause
|
|
44
|
-
is gone
|
|
45
|
-
|
|
44
|
+
is gone, a cause that a relaunch no longer meets: a launch the runtime refused
|
|
45
|
+
(`launch_refused`), a process that died (`died`), an agent that never came up
|
|
46
|
+
(`never_registered`); and when you fixed what the `detail` names. On
|
|
46
47
|
a child, the same `todo` brings it back at `admitted` with a new generation of its own, since
|
|
47
48
|
the free release reaches a root alone. Where the claim's own session is what the provider keeps
|
|
48
49
|
refusing (`provider_error`, and `prompt_retires_exhausted` for an agent that takes no turn),
|
|
@@ -51,8 +52,10 @@ you release it. Read the record, then choose the release.
|
|
|
51
52
|
runs no Oh My Pi session to compact — the refusal itself names `fresh_session` as what starts
|
|
52
53
|
the claim again. The claim starts the held phase again in a new session and loses everything
|
|
53
54
|
the old one held. (`compact` is for a claim that still runs, which is the stuck claim of the
|
|
54
|
-
`provider-errors` wake, not this one.) Where the cause stands,
|
|
55
|
-
|
|
55
|
+
`provider-errors` wake, not this one.) Where the cause stands, the tree stays admitted: ask the
|
|
56
|
+
person whether to park the tree, as
|
|
57
|
+
`skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree` says, and park the
|
|
58
|
+
tree only as the `held` wake says.
|
|
56
59
|
|
|
57
60
|
## A child that looks independent
|
|
58
61
|
|
|
@@ -70,8 +73,9 @@ person's yes:
|
|
|
70
73
|
`--label legion` only when the answer asks Legion to run it. `<PROJECT>` is the issue key's
|
|
71
74
|
prefix before `-<n>` (`ACME-3` → `ACME`), which `read_state` shows as `daemon.project`; it is
|
|
72
75
|
not the lowercase project token in role names such as `legion-<project>-controller`.
|
|
73
|
-
2. Park the child (`set_status` to `icebox`) and comment
|
|
74
|
-
|
|
76
|
+
2. Park the child (`set_status` to `icebox`) and comment the new root's key on it.
|
|
77
|
+
Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed.
|
|
78
|
+
You cannot close it, because only its architect or the daemon sets `done`.
|
|
75
79
|
3. A root filed with the label opens in `triage`, and its triage wake brings it back to you
|
|
76
80
|
(`skill://legion-controller/references/triage.md`).
|
|
77
81
|
|
|
@@ -89,6 +89,12 @@ When `dispatch read --ref` shows it answered already, act on its answer now.
|
|
|
89
89
|
|
|
90
90
|
## Act on its answer
|
|
91
91
|
|
|
92
|
+
A park ask (`Park it`, `Leave it admitted`) and a deferral ask (`Defer it`, `Let it run`) take
|
|
93
|
+
none of the four finding actions below. Act on the answer to a park ask as
|
|
94
|
+
`skill://legion-controller/references/wakes.md#ask-whether-to-park-a-tree` step 4 says, and on
|
|
95
|
+
the answer to a deferral ask as
|
|
96
|
+
`skill://legion-controller/references/backlog-stewardship.md#a-root-the-plan-defers` step 4 says.
|
|
97
|
+
|
|
92
98
|
Once it is answered (an ask you follow brings its answer to you), read it with
|
|
93
99
|
`dispatch read --ref 'dispatch://<KEY>/ask/<id>'` and act on the newest answer. When its typed
|
|
94
100
|
text asks for a different one of the four actions than the option selected, do what the text
|
|
@@ -148,7 +154,7 @@ finding asks roles opened on their own issues while no controller ran:
|
|
|
148
154
|
|
|
149
155
|
```text
|
|
150
156
|
asks=$(curl -sS --fail-with-body -H "Authorization: Bearer $(cat "$DISPATCH_TOKEN_FILE")" "$DISPATCH_URL/api/v1/issues/<ISSUE KEY>/asks?state=answered&thread=1") || { echo "Dispatch read failed" >&2; exit 1; }
|
|
151
|
-
printf '%s' "$asks" | jq -cn 'input | if type == "array" then [.[] | select(any(.options[]; .label == "Do not file" or .label == "Admit it")) | .answer.at as $t | select([.thread.replies[]? | select(.author.kind == "session" and .created_at > $t and (.body | test("^(Filed dispatch://|Handed dispatch://|Admitted dispatch://|Not filed:|Not admitted
|
|
157
|
+
printf '%s' "$asks" | jq -cn 'input | if type == "array" then [.[] | select(any(.options[]; .label == "Do not file" or .label == "Admit it" or .label == "Park it" or .label == "Leave it admitted" or .label == "Defer it" or .label == "Let it run")) | .answer.at as $t | select([.thread.replies[]? | select(.author.kind == "session" and .created_at > $t and (.body | test("^(Filed dispatch://|Handed dispatch://|Admitted dispatch://|Not filed:|Not admitted:|Parked dispatch://|Not parked dispatch://|Left admitted dispatch://|Deferred dispatch://|Not deferred dispatch://|Let run dispatch://)")))] | length == 0) | {id, question, answer}] else error("Dispatch did not answer the list") end'
|
|
152
158
|
```
|
|
153
159
|
|
|
154
160
|
Read it for the report issue, then for each issue in `needs_review`, whose architect holds its
|