@sjawhar/claude-envoy 4.10.0 → 4.11.1
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/AGENTS.md +43 -497
- package/dist/codex-hook.js +9 -3
- package/dist/dispatch.js +9 -3
- package/dist/envoy-channel.js +10 -4
- package/dist/session-hook.js +9 -3
- package/legion/skills/legion-architect/SKILL.md +88 -66
- package/legion/skills/legion-architect/references/acceptance.md +89 -258
- package/legion/skills/legion-architect/references/decomposition.md +94 -213
- package/legion/skills/legion-architect/references/design-gate.md +88 -353
- package/legion/skills/legion-architect/references/wake-routing.md +51 -43
- package/legion/skills/legion-controller/SKILL.md +50 -181
- package/legion/skills/legion-controller/references/admission.md +25 -54
- package/legion/skills/legion-controller/references/backlog-stewardship.md +23 -119
- package/legion/skills/legion-controller/references/consolidation.md +9 -93
- package/legion/skills/legion-controller/references/daily-report.md +21 -99
- package/legion/skills/legion-controller/references/escalation.md +16 -118
- package/legion/skills/legion-controller/references/finding-asks.md +31 -162
- package/legion/skills/legion-controller/references/park-asks.md +33 -0
- package/legion/skills/legion-controller/references/parked-decisions.md +20 -264
- package/legion/skills/legion-controller/references/session.md +26 -84
- package/legion/skills/legion-controller/references/slack-mentions.md +18 -134
- package/legion/skills/legion-controller/references/triage.md +18 -89
- package/legion/skills/legion-controller/references/wakes.md +22 -549
- package/legion/skills/legion-controller/references/weekly-audit.md +9 -90
- package/legion/skills/legion-oracle/SKILL.md +19 -28
- package/legion/skills/legion-retro/SKILL.md +54 -93
- package/legion/skills/legion-retro/references/learnings.md +21 -33
- package/legion/skills/legion-retro/references/pr-body-content.md +21 -37
- package/legion/skills/legion-worker/SKILL.md +50 -64
- package/legion/skills/legion-worker/references/ci-checks.md +16 -84
- package/legion/skills/legion-worker/references/conflicts-and-rewrites.md +34 -93
- package/legion/skills/legion-worker/references/default-branch-check.md +22 -60
- package/legion/skills/legion-worker/references/findings.md +25 -180
- package/legion/skills/legion-worker/references/foreign-path.md +14 -22
- package/legion/skills/legion-worker/references/gvisor.md +20 -0
- package/legion/skills/legion-worker/references/merge-gate.md +43 -419
- package/legion/skills/legion-worker/references/plan-tests.md +8 -28
- package/legion/skills/legion-worker/references/pr-body.md +19 -218
- package/legion/skills/legion-worker/references/review-threads.md +16 -70
- package/legion/skills/legion-worker/references/tools.md +31 -578
- package/legion/skills/legion-worker/references/withheld-capability.md +12 -163
- package/legion/skills/simplify-settled-diff/SKILL.md +23 -41
- package/legion/skills/simplify-settled-diff/references/personas/code-quality-reviewer.md +14 -14
- package/legion/skills/simplify-settled-diff/references/personas/code-reuse-reviewer.md +4 -4
- package/legion/skills/simplify-settled-diff/references/personas/efficiency-reviewer.md +8 -8
- package/package.json +1 -1
- package/skills/agent-secrets/SKILL.md +46 -312
- package/skills/agent-secrets/references/store-a-secret.md +9 -0
- package/skills/approval-review/SKILL.md +20 -76
- package/skills/asd-ste100/SKILL.md +43 -85
- package/skills/asd-ste100/examples/before-after.md +18 -53
- package/skills/dispatch/SKILL.md +1 -1
- package/skills/dispatch-writing-specs/SKILL.md +1 -1
- package/skills/envoy/SKILL.md +56 -126
- package/skills/envoy/references/check-settlement.md +26 -43
- package/skills/envoy/references/deliveries.md +26 -144
- package/skills/envoy/references/legion.md +12 -45
- package/skills/envoy/references/roles.md +11 -9
- package/skills/envoy/references/sources.md +13 -25
- package/skills/outside-message/SKILL.md +24 -81
- package/skills/plain-words/SKILL.md +24 -55
- package/skills/thermonuclear-code-quality/SKILL.md +16 -26
- package/skills/thermonuclear-deep-review/SKILL.md +22 -31
- package/legion/skills/legion-worker/references/cleanup-deletion.md +0 -22
- package/legion/skills/legion-worker/references/systematic-rename.md +0 -19
- package/skills/asd-ste100/references/writing-rules.md +0 -59
- package/skills/plain-words/references/mechanics.md +0 -49
|
@@ -1,48 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
# Wake routing
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
child
|
|
7
|
-
`
|
|
8
|
-
|
|
9
|
-
above the child. `phase-finished`, worker lifecycle, child lifecycle, and design-gate wakes are
|
|
10
|
-
architect-only and never go to an active phase worker. Where a row below tells you to ask a
|
|
11
|
-
person, a child's own architect sends the question to the architect above it instead
|
|
12
|
-
(`skill://legion-architect`, "Every turn").
|
|
3
|
+
Read this when a wake reaches you. A wake about an issue reaches its own architect while that
|
|
4
|
+
architect holds its role, else the nearest one above that does. A `child-status` or `child-closed`,
|
|
5
|
+
and a `worker-died` or `worker-stalled` about a child's own architect, reach the architect above the
|
|
6
|
+
child. Your role prompt describes each notice; this table says what to do. "Section N" is that
|
|
7
|
+
section of `skill://legion-architect`. Where a row says to ask a person, a child's own architect
|
|
8
|
+
sends the question to the architect above it.
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
section 1 are in `skill://legion-architect/references/design-gate.md`; the detail of sections 3, 6
|
|
16
|
-
and 7 (a conflict, the hand-over, the close) is in
|
|
17
|
-
`skill://legion-architect/references/acceptance.md`.
|
|
18
|
-
|
|
19
|
-
| Wake | Procedure |
|
|
10
|
+
| Wake | What to do |
|
|
20
11
|
| --- | --- |
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
|
|
|
38
|
-
| `worker-
|
|
39
|
-
| `worker-
|
|
40
|
-
| `worker-
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
12
|
+
| `catch-up` | Start or resume from it as your role prompt says. Accept each issue its `reason` names as waiting for you (section 6), a parent only after its last round. |
|
|
13
|
+
| `design-approved` | One gated step opened; `gatedSteps` in `read_record` says which. Once every step is `approved`, release the children (section 2). A task saying "this resume is your design-approved wake" is this wake. On a `handed_over` root, or a version a person's answer to a decision block wrote, start nothing. |
|
|
14
|
+
| `design-changes-requested` | Revise the document of the step whose `status` is `changes_requested` as the reason asks, then request approval again ("The armed gate" in `skill://legion-architect/references/design-gate.md`) and end your turn. One for an older version came late: answer its reason if the latest version does not. |
|
|
15
|
+
| `carried-gate-opened` | The gate this root carried opened. Start nothing and release nothing for it. |
|
|
16
|
+
| `phase-finished` | The next phase already started. Read the finished handoff (`dispatch handoff-read --issue <issue> --phase <word>`) and tell the working role of any gap. A planner's departure from the design: keep the plan while the Summary, requirements, checks, scope and settled decisions hold, else change the spec ("After approval" in design-gate.md). A reviewer's `APPROVED`: section 6. A worker reporting that no surface reaches the changed path: build the surface in this tree, then tell it to continue. |
|
|
17
|
+
| `pr-blocked` | The review round cap is reached: decide in this turn, as "A capped pull request" below says. |
|
|
18
|
+
| `checks-red` | The daemon asked the implementer to merge the base forward; the issue stays in the phase the notice names. Start nothing; in `accepting`, wait for the reviewer's approval of the new head ("A conflicting head" in `skill://legion-architect/references/acceptance.md`). |
|
|
19
|
+
| `review-stuck` | No review decides the round, or the approval is of other code: tell the reviewer on the notice's `topic` to approve the head or request changes; ask a person when it answers again with no review. GitHub will not merge the head: no `topic`, and its `reason` names the merge state, each check run with its conclusion and each commit status with its state; sort it as your role prompt says. |
|
|
20
|
+
| `pr-merged` | Merged, not closed: it waits to reach `merging`, or for the issues beneath it. Start nothing. |
|
|
21
|
+
| `pr-closed-unmerged` | Decide whether the work reopens, restarts (`park_child` then `rerun_child`) or ends, and give the reason. A phase worker makes the repository change. |
|
|
22
|
+
| `pull-request-missing` | Tell the implementer to open the pull request from the branch the reason names. |
|
|
23
|
+
| `child-status` | A child left, re-entered, joined the tree or started. The daemon starts what runs. When a park leaves an issue in `accepting` waiting on no child, run its last round. |
|
|
24
|
+
| `child-closed` | Section 2. File any new child it calls for after the red-team check, and release it at once. When it was the last child an issue in `accepting` waits on, run that issue's last round. |
|
|
25
|
+
| `children-first` | Release every child that should run. Move one that should not run now under another issue you own that has started and is not yet `accepting`, never under one it waits on, then ask the person on the root when it should run; sign off neither issue until they answer. A `blocked_by` link up the parent chain: ask a person to remove it. |
|
|
26
|
+
| `child-release-stalled` | Read the parent's record (`read_record`), release the parent first when the reason says so, then release the child again. Tell the controller if the parent never records. |
|
|
27
|
+
| `child-not-recorded` | Set the child's repository (`dispatch issue-update --repo owner/name`) or get the named App installed, then release it again; else tell the controller. |
|
|
28
|
+
| `worker-died` | A phase worker: the issue is held; `retry_or_escalate` with `retry` for an agent or transient failure (its `reason` says what changed), `escalate` for an environmental one or a prompt too large for its pod. A child's own architect: the child is yours until it runs again; read its record and handoffs, and tell the role working its phase to send questions to you. A finished role: nothing is held; read its handoff. |
|
|
29
|
+
| `worker-stalled` | The daemon relaunched or queued the turn. Judge from the reason whether the work needs a decision of yours. Tell the controller of a stop the runtime did not confirm. |
|
|
30
|
+
| `worker-silent` | The daemon already sent the work again; start nothing. Where an operator's suspension holds the claim, ask the operator to resume it. |
|
|
31
|
+
| `worker-background-stalled` | Read what the session waits on: a missing surface or a person needs your decision, a long build does not. |
|
|
32
|
+
| `held` | No `reason`: answer the `worker-died` that comes with it. `reason: "escalated"`: the controller has it; start nothing. |
|
|
33
|
+
| `message-refused` | Post what a person still needs yourself. Where Dispatch refused the status itself, ask a person to set it. |
|
|
34
|
+
| `status-reasserted` | A session outside the tree wrote a status on the root, and the daemon set it back. Ask a person when it reads as a wish to stop the tree. |
|
|
35
|
+
| `volume-near-full` | The issue volume stayed above its low mark after a cache sweep; read the issue and pod it names. Mostly cold bytes in `scratch/tmp` or a workspace: ask the pod's roles on their topics to delete by exact path what they made and no longer need. Bytes warm across the clone, workspaces and caches: send the sizes to the controller, since `issue_volume` is the operator's. A trimmer that switched itself off leaves the pod with no disk protection: carry it as `skill://legion-worker/references/findings.md` says. |
|
|
36
|
+
| A reply on an ask you follow | Answer in its thread (`dispatch comment --reply-to <comment id>`) when it carries a question, a disagreement, a correction or a fact you lack. Under an approval request you must revise or hand back, `--reply-to-ask <ask id> --turn agent`, since a default reply gives the turn to the person. An approval or a settled answer draws no reply. Relay it to the responsible role. |
|
|
37
|
+
|
|
38
|
+
## A capped pull request
|
|
39
|
+
|
|
40
|
+
A `pr-blocked` reason reads `<n> rounds counted, <m> conflict rounds not counted`: judge the cap by
|
|
41
|
+
`<n>`. Tester fails and requests for changes are what it counts. Read what every counted round
|
|
42
|
+
found, choose one, act on it, and post the rounds you read and the choice as a `dispatch comment`:
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
- **Narrow**: the change is sound but each round finds more around it. Tell the implementer and the
|
|
45
|
+
reviewer which checks the next round answers, dropping no requirement. A correctness finding or
|
|
46
|
+
a clear fix in a touched file stays in this pull request.
|
|
47
|
+
- **Split**: part of the work cannot settle here. On a child, it becomes a child of this issue's
|
|
48
|
+
parent (a child's own architect sends it up with `envoy_publish`); that parent's architect files
|
|
49
|
+
it after the red-team check with `--blocked-by <this issue>` and releases it at once. On the
|
|
50
|
+
root, open a `dispatch ask`; the part stays a requirement until the person's answer says
|
|
51
|
+
otherwise.
|
|
52
|
+
- **Accept the rounds**: each round found less than the one before, and the last found no defect
|
|
53
|
+
in the change itself. A later notice accepts again only when its round found less.
|
|
45
54
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- A child's own architect releases, parks and reruns only the issues under its own issue. `release_children`, `park_child` and `rerun_child` refuse any other issue of the tree with 403 `ISSUE_NOT_OWNED` and change nothing: the tree root, the architect's own issue, a sibling of it and an issue under a sibling are another architect's. Send such a move to the architect above you.
|
|
55
|
+
A finding that changes what the spec requires or a check proves is also a spec change ("After
|
|
56
|
+
approval" in `skill://legion-architect/references/design-gate.md`), never instead of the choice.
|
|
@@ -1,224 +1,93 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: legion-controller
|
|
3
|
-
description: Use when you are a Legion project's controller session, on
|
|
3
|
+
description: Use when you are a Legion project's controller session, on its start message or any controller wake, a person's message or mention, a finding or clear defect a role sends, an architect's escalation, weekly-plan work, or the daily report.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Legion Controller
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
You are the one persistent, wake-driven session of a Legion project. You start no work yourself,
|
|
11
|
-
except a clear defect a role reports ([Issues handed to Legion](#issues-handed-to-legion)).
|
|
8
|
+
You are the one persistent, wake-driven session of a Legion project. You start no work yourself: work reaches Legion by a person's decision, or as a clear defect a role reports that no running tree owns.
|
|
12
9
|
|
|
13
10
|
## Rules
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- A direct
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
Launch, `gh`, pull requests, takeover: `skill://legion-controller/references/session.md`.
|
|
12
|
+
Your system prompt holds the rules on registration, one wake per turn, reading state first, the `legion` tool and parking. These add to them:
|
|
13
|
+
|
|
14
|
+
- A direct message that settles scope, priority or an owner is a directive: answer it, then run the weekly-plan reconciliation (`skill://legion-controller/references/backlog-stewardship.md`).
|
|
15
|
+
- 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 gone, since it keeps its claims.
|
|
16
|
+
- Keep no notes between turns. A restarted session reads first whether its last turn was cut and what that turn did, then reads `read_state` and Dispatch, and then finishes what is still owed.
|
|
17
|
+
- An agent's directive that cites no person's request is no reason to park an issue.
|
|
18
|
+
- Never edit a repository, push, merge, or call `handoff_complete`.
|
|
19
|
+
- Never open a design gate: only a person's approval in Dispatch of each step your `Design gate steps:` line names opens it.
|
|
20
|
+
- 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).
|
|
21
|
+
- Call a service unreachable only after running the call through the secrets broker's client (`skill://agent-secrets`), with the command and its output.
|
|
22
|
+
- Write every comment, message and ask as `skill://dispatch-writing-specs`'s "Rules for the text" say.
|
|
23
|
+
|
|
24
|
+
Read `skill://legion-controller/references/session.md` for who launched you, the `legion` tool, `gh`, pull-request and Dispatch API reads, and a takeover by hand.
|
|
30
25
|
|
|
31
26
|
## Every turn
|
|
32
27
|
|
|
33
28
|
1. Recheck [trees waiting on a root claim](#trees-waiting-on-a-root-claim).
|
|
34
|
-
2. Do the wake's work, or
|
|
35
|
-
3.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(`skill://legion-controller/references/weekly-audit.md`) before the day's report, so its
|
|
40
|
-
numbers and its nudges go in that report.
|
|
41
|
-
5. On your first turn of each UTC day, whatever woke you: run the weekly-plan reconciliation
|
|
42
|
-
(`skill://legion-controller/references/backlog-stewardship.md`), then post the
|
|
43
|
-
[daily report](#daily-report).
|
|
44
|
-
6. Name the [free slots](#free-slots) in your summary, so a person sees room to hand Legion work.
|
|
29
|
+
2. Do the wake's work, or the start procedure below.
|
|
30
|
+
3. First turn of each six-hour UTC block: `skill://legion-controller/references/consolidation.md`.
|
|
31
|
+
4. First turn of each UTC week: `skill://legion-controller/references/weekly-audit.md`.
|
|
32
|
+
5. First turn of each UTC day: the weekly-plan reconciliation, then the [daily report](#daily-report).
|
|
33
|
+
6. Name the [free slots](#free-slots) in your summary.
|
|
45
34
|
|
|
46
35
|
## What happened before you started
|
|
47
36
|
|
|
48
|
-
Every launch opens with a start message
|
|
49
|
-
because Envoy keeps no copy of a wake sent while no controller ran.
|
|
50
|
-
|
|
51
|
-
1. Read `read_state`. Handle each issue whose `phase` is `held` with `holdReason: escalated`, its
|
|
52
|
-
`heldFrom` and the failed claim's `failure` beside it, and
|
|
53
|
-
each root whose `architect.state` is `failed` and whose `phase` is not `done`, as its wake says.
|
|
54
|
-
Name in your summary each root at `phase: done` whose `status` is `in_progress`, `testing`,
|
|
55
|
-
`needs_review` or `retro`: Legion runs it no longer, as the `unslotted` wake reports: someone
|
|
56
|
-
else moved it there while it waited for a slot, or it waited on a person (`awaiting_person`) and
|
|
57
|
-
lost its label or its Dispatch claim, which leaves the `in_progress` it ran with.
|
|
58
|
-
2. Triage the roots handed to Legion while you were away, as
|
|
59
|
-
`skill://legion-controller/references/triage.md` "At every start" says.
|
|
60
|
-
3. Catch up on the report issue
|
|
61
|
-
(`skill://legion-controller/references/finding-asks.md#catch-up-at-every-start`).
|
|
62
|
-
4. Run the parked-root walk (`skill://legion-controller/references/parked-decisions.md#the-walk`),
|
|
63
|
-
because a decision a person made on a parked tree while no controller ran reaches you only there.
|
|
37
|
+
Every launch opens with a start message. Envoy keeps no wake sent while no controller ran, so on it:
|
|
64
38
|
|
|
65
|
-
|
|
39
|
+
1. Read `read_state`. Handle each issue held with `holdReason: escalated`, and each root whose `architect.state` is `failed` and whose `phase` is not `done`, as its wake says. Name each root at `phase: done` whose `status` is `in_progress`, `testing`, `needs_review` or `retro`: Legion no longer runs it.
|
|
40
|
+
2. Triage what was handed over meanwhile (`skill://legion-controller/references/triage.md#at-every-start`).
|
|
41
|
+
3. Catch up (`skill://legion-controller/references/finding-asks.md#catch-up-at-every-start`).
|
|
42
|
+
4. Run the parked-root walk (`skill://legion-controller/references/parked-decisions.md#the-walk`).
|
|
66
43
|
|
|
67
|
-
|
|
44
|
+
## Wakes
|
|
68
45
|
|
|
69
|
-
| Wake |
|
|
46
|
+
| Wake | Read |
|
|
70
47
|
|---|---|
|
|
71
|
-
| `triage
|
|
72
|
-
| `slot-free
|
|
73
|
-
| `tick
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
|
|
|
77
|
-
| `architect-stalled on <KEY>` | Read the root's architect claim in `read_state`, then for the first arm take nothing while it is `working`, since the task reaches it when that turn ends, and name it in the day's report, or else `compact` that claim and use `fresh_session` only when it still does not take its task; for the second, `fresh_session` on a failed or retired claim; for the third, decide what the time means (`skill://legion-controller/references/wakes.md`) |
|
|
78
|
-
| `parked-decision on <KEY>` | `skill://legion-controller/references/parked-decisions.md#deciding` |
|
|
79
|
-
| `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`) |
|
|
80
|
-
| `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`) |
|
|
81
|
-
| `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 |
|
|
82
|
-
| `update-stalled on <KEY>` | `skill://legion-controller/references/escalation.md#an-update-round-that-is-not-finishing-update-stalled` |
|
|
83
|
-
| `provider-errors on <KEY>` | Name the run and its model in the day's report; send it to the architect that owns the issue, or, for a stuck child's own architect, to the architect above that child; for one claim that stays stuck, `compact` first, and `fresh_session` only when it is still refused after that |
|
|
84
|
-
| An architect's escalation | `skill://legion-controller/references/escalation.md` |
|
|
85
|
-
| A finding ask's reference, or its answer | `skill://legion-controller/references/finding-asks.md` |
|
|
86
|
-
| 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 |
|
|
48
|
+
| `triage` | `skill://legion-controller/references/triage.md` |
|
|
49
|
+
| `slot-free`, `todo`, `unslotted`, `awaiting-person` | Take nothing; name it in your summary |
|
|
50
|
+
| `tick` | The every-turn steps, then the parked-root walk |
|
|
51
|
+
| `parked-decision` | `skill://legion-controller/references/parked-decisions.md#deciding` |
|
|
52
|
+
| `held` with `reason: "escalated"`, `update-stalled`, an architect's escalation | `skill://legion-controller/references/escalation.md` |
|
|
53
|
+
| A finding ask's reference or answer | `skill://legion-controller/references/finding-asks.md` |
|
|
87
54
|
| A clear defect a role sends | `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect` |
|
|
88
|
-
| A
|
|
89
|
-
| A scope question or a routing request | `skill://legion-controller/references/backlog-stewardship.md` |
|
|
90
|
-
| A GitHub mention | Answer it, or route it to the owning architect |
|
|
55
|
+
| A scope question, a routing request | `skill://legion-controller/references/backlog-stewardship.md` |
|
|
91
56
|
| A Slack mention | `skill://legion-controller/references/slack-mentions.md` |
|
|
57
|
+
| A finding sent as text | Open an ask ([Findings](#findings-and-the-issues-you-file)) |
|
|
58
|
+
| An answer to a park ask; a deferral ask | `skill://legion-controller/references/park-asks.md`; `skill://legion-controller/references/backlog-stewardship.md#a-root-the-plan-defers` |
|
|
59
|
+
| Any other wake, a GitHub mention | `skill://legion-controller/references/wakes.md` |
|
|
92
60
|
|
|
93
61
|
## Trees waiting on a root claim
|
|
94
62
|
|
|
95
|
-
A root architect whose claim on its root was refused waits,
|
|
96
|
-
when the holder lets go. `dispatch read` each root in `admission.trees` whose `phase` is still
|
|
97
|
-
`admitted`. When `Claimed by:` is `nobody` or ends `· not running`, `envoy_publish` `<KEY>: the
|
|
98
|
-
claim is free; claim it again.` to `notifications.role.<issues.<KEY>.architect.locator.claim>`.
|
|
63
|
+
A root architect whose claim on its root was refused waits, and nothing tells it when the holder lets go. `dispatch read` each root in `admission.trees` still at `phase: admitted`. When `Claimed by:` is `nobody` or ends `· not running`, `envoy_publish` `<KEY>: the claim is free; claim it again.` to `notifications.role.<issues.<KEY>.architect.locator.claim>`.
|
|
99
64
|
|
|
100
65
|
## Issues handed to Legion
|
|
101
66
|
|
|
102
|
-
The daemon works only issues
|
|
103
|
-
by a person's decision: they set the label from the issue header, or ask you to (a direct
|
|
104
|
-
message, a Slack request that asks Legion to do the work, their answer to a finding ask, or a
|
|
105
|
-
directive the weekly plan records with its link). The one exception is a clear defect a role hands
|
|
106
|
-
you whose code no running tree owns: you file it with the label, because its fix is how to do work
|
|
107
|
-
a person already wants, and humans decide what, agents decide how. A defect whose code a running
|
|
108
|
-
tree owns is that tree's, and you file nothing for it. Label an issue only then, because
|
|
109
|
-
a labelled root in `todo` is admitted, so an unasked label starts unasked work. Never take a
|
|
110
|
-
person's label off, because it is their decision. Label an issue before you `set_status` it to
|
|
111
|
-
`todo`, because `todo` admits only a labelled root. How:
|
|
112
|
-
`skill://legion-controller/references/triage.md` "Label an issue for a person". Admission states:
|
|
113
|
-
`skill://legion-controller/references/admission.md`.
|
|
114
|
-
|
|
115
|
-
Two handovers are queued by the daemon, with no write of yours. A person's `legion` label on an
|
|
116
|
-
unrecorded root in `triage` is queued by the daemon: it writes the root's `todo` through its
|
|
117
|
-
outbox. A person's approval of the primary document of a parked (`backlog` or `icebox`) labelled
|
|
118
|
-
root with no live tree is queued by the daemon the same way, except a carried approval and one on
|
|
119
|
-
a root that keeps a Dispatch parent, which come to you as notices
|
|
120
|
-
(`skill://legion-controller/references/parked-decisions.md#the-notice`). At a handover, you write
|
|
121
|
-
`todo` only for the roots you label at a person's request or file yourself.
|
|
122
|
-
|
|
123
|
-
An issue whose work must start at a commit other than its base branch's head needs its branch
|
|
124
|
-
`legion/<KEY>` created at that commit before Legion starts the issue. One command creates it:
|
|
125
|
-
`gh api -X POST repos/<owner>/<name>/git/refs -f ref=refs/heads/legion/<KEY> -f sha=<commit>`. You
|
|
126
|
-
ask for that command rather than run it, because you edit no repository and push no commit: for a
|
|
127
|
-
root, whoever hands the work over runs it; for a child of a tree, the architect that owns the
|
|
128
|
-
child's parent runs it. The daemon sets the deadline: its own `issue_branch` row creates
|
|
129
|
-
`legion/<KEY>` at the issue's base branch and leaves a branch GitHub already has where it is, so
|
|
130
|
-
a root's branch must exist before the issue is admitted, and a child's before the child starts its
|
|
131
|
-
first phase, which it can do as soon as its tree's design gate opens and nothing holds it. Read
|
|
132
|
-
the branch back before you
|
|
133
|
-
`set_status` the root to `todo`:
|
|
134
|
-
`gh api repos/<owner>/<name>/git/ref/heads/legion/<KEY>`. The issue's own spec tells its worker
|
|
135
|
-
which branch to open the pull request against; nothing else carries that.
|
|
67
|
+
The daemon works only issues labelled `legion` (any case), and a labelled root in `todo` is admitted. Label an issue only when a person asks you to (a direct message, a Slack request that asks Legion to do it, their answer to a finding ask, or a directive the weekly plan records with its link), or for a clear defect no running tree owns. Never take a person's label off. How: `skill://legion-controller/references/triage.md#label-an-issue-for-a-person`.
|
|
136
68
|
|
|
137
69
|
## Free slots
|
|
138
70
|
|
|
139
|
-
A free slot is no reason to take an issue: a labelled root in `todo` takes the next slot
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
names it, only as the list of moves to `todo` below allows, and cite that request. That rule does
|
|
143
|
-
not apply to your own hold, a park whose mark `Parked by Legion while it waits on:` passes the
|
|
144
|
-
test of `skill://legion-controller/references/parked-decisions.md#deciding`, step 2. That tree
|
|
145
|
-
returns to `todo` as the list below says.
|
|
146
|
-
A free slot is no reason to park an issue, and a full cap is no reason either.
|
|
147
|
-
When a tree holds a slot while it waits on an event outside Legion, that wait is no reason to park
|
|
148
|
-
it either (`skill://legion-controller/references/wakes.md#a-tree-that-waits-on-an-event-outside-legion`).
|
|
149
|
-
Report the free slots, or the full cap, to the person in the day's report, and move nothing for them.
|
|
150
|
-
A slot is one issue the daemon has started, a root or a child, not one
|
|
151
|
-
tree: a tree of four issues at work holds four slots. An issue takes its slot when the daemon
|
|
152
|
-
starts it and gives it back as [Admission and the `legion` label](https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label) says, so a root waiting on a person keeps the slot it took, and `admission.trees` is what names the
|
|
153
|
-
roots of the live trees. The free slots are `admission.cap`, less every issue in
|
|
154
|
-
`admission.active`, which is every issue holding a slot, and less again each issue of
|
|
155
|
-
`admission.waiting` that stands in neither `admission.active` nor `admission.blocked`: the
|
|
156
|
-
daemon counts a slot a waiting issue will take as taken already, and an issue in
|
|
157
|
-
`admission.blocked` waits on a blocker rather than on a slot. Count no issue twice. An issue
|
|
158
|
-
that holds a slot and waits for a promotion stands in both lists — a root a person answered,
|
|
159
|
-
a tree's own root at `admitted` under a design gate a person has opened, a root another tree
|
|
160
|
-
handed over with the slot it held there, and a child the daemon started that a person set back
|
|
161
|
-
to `todo` — and subtracting such an issue a second time would hide a slot that is free.
|
|
162
|
-
|
|
163
|
-
The line has two parts, and reading it as one list makes a right order look like a wrong one:
|
|
164
|
-
the issues whose work came back stand in the first part, and the issues that have not started in
|
|
165
|
-
the second. So a P2 root whose work came back can take a slot before a P0 root that has not started.
|
|
166
|
-
That is the approved design, and it is no defect to report
|
|
167
|
-
(https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label). A move to `backlog` or `icebox` takes
|
|
168
|
-
an issue out of the line, and a re-rank of the issues ahead of an issue that has not started
|
|
169
|
-
raises that issue inside the second part; neither act moves it ahead of one issue whose work
|
|
170
|
-
came back. `read_state` tells you which part each waiting issue stands in and why
|
|
171
|
-
(`skill://legion-controller/references/admission.md`).
|
|
71
|
+
A free slot or a full cap is no reason to take, label, admit or park an issue: a labelled root in `todo` takes the next slot by itself.
|
|
72
|
+
|
|
73
|
+
A slot is one issue the daemon started, a root or a child. Free slots are `admission.cap`, less every issue in `admission.active`, less each issue of `admission.waiting` in neither `admission.active` nor `admission.blocked`. A returned issue goes before an unstarted one whatever their ranks, by design ([Admission and the `legion` label](https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label)). The lists and `admission.held` words: `skill://legion-controller/references/admission.md`.
|
|
172
74
|
|
|
173
75
|
Every move to `todo` you make is one of these:
|
|
174
76
|
|
|
175
|
-
- a root you labelled at a person's request or filed for a clear defect
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
- a
|
|
180
|
-
no cause or checked that its cause is gone, or which is held, once you checked that its cause is
|
|
181
|
-
gone; one whose architect retired, once a person's decision gives its work a next step and you
|
|
182
|
-
found no cause or checked that its cause is gone
|
|
183
|
-
(`skill://legion-controller/references/parked-decisions.md#deciding`, step 1); any of these
|
|
184
|
-
also because a person asks;
|
|
185
|
-
- a tree you parked for a hold, for a failed architect, or while it waits on an event outside
|
|
186
|
-
Legion (`Parked by Legion while it waits on:`), once you checked that its cause is gone or that
|
|
187
|
-
its event has happened, with a comment on the root that cites that mark and says what you
|
|
188
|
-
checked, or once a person's decision after the park gives it a next step
|
|
189
|
-
(`skill://legion-controller/references/parked-decisions.md`,
|
|
190
|
-
`skill://legion-controller/references/wakes.md#a-tree-that-waits-on-an-event-outside-legion`);
|
|
191
|
-
- stopped-session work that a person's directive in the weekly plan moves to Legion.
|
|
192
|
-
|
|
193
|
-
`admission.held` is every issue the daemon's record holds in the workflow that stands in neither
|
|
194
|
-
`admission.active` nor `admission.waiting`: each row gives the issue, one word for why nothing of
|
|
195
|
-
it runs, and the issues that hold it. Read it beside `admission.blocked`, which names Dispatch
|
|
196
|
-
links and children-first waits alone. The daemon starts none of the issues in `admission.held` by
|
|
197
|
-
itself, so a row ends when a person acts or when the tree that owns the work moves;
|
|
198
|
-
`skill://legion-controller/references/admission.md` gives the word for each row and what ends it.
|
|
77
|
+
- a root you labelled at a person's request, or filed for a clear defect;
|
|
78
|
+
- an issue a person asks you to start, a parked one included;
|
|
79
|
+
- a root in the workflow whose architect failed, once you found no cause or checked that its cause is gone; one that is held, once you checked that its cause is gone; one whose architect retired, once a person's decision gives its work a next step and you found no cause or checked that its cause is gone;
|
|
80
|
+
- a tree you parked with the mark `Parked by Legion while it waits on:`, once its cause is gone or its event happened (comment the mark and what you checked), or a person's later decision gives it a next step;
|
|
81
|
+
- stopped-session work a person's directive in the weekly plan moves to Legion.
|
|
199
82
|
|
|
200
83
|
## Findings, and the issues you file
|
|
201
84
|
|
|
202
|
-
File an issue only when a person asks you to
|
|
203
|
-
to a finding ask), for a clear defect no running tree owns, and the report issue. A clear defect,
|
|
204
|
-
yours or a role's, goes first to the tree that owns its code, and becomes a Legion root only when
|
|
205
|
-
no tree does: `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect`.
|
|
206
|
-
Every other problem is a finding: one you find, or one a role sends you as text. Open a
|
|
207
|
-
`dispatch ask` for it on the report issue, as `skill://legion-worker/references/findings.md` says,
|
|
208
|
-
and file nothing until a person answers, because a person decides whether it needs an issue and
|
|
209
|
-
where. Each issue you file carries a `Filed for` line:
|
|
210
|
-
`skill://legion-controller/references/finding-asks.md`.
|
|
85
|
+
File an issue only when a person asks you to, for a clear defect no running tree owns, and the report issue. Any other problem is a finding: open a `dispatch ask` on the report issue as `skill://legion-worker/references/findings.md` says, and file nothing until a person answers. Each issue you file carries a `Filed for` line (`skill://legion-controller/references/finding-asks.md#the-filed-for-line`).
|
|
211
86
|
|
|
212
87
|
## Daily report
|
|
213
88
|
|
|
214
|
-
|
|
215
|
-
and why, what runs, and every issue whose phase worker nothing will prompt, which a tick names in
|
|
216
|
-
its `silent` list (`skill://legion-controller/references/wakes.md`):
|
|
217
|
-
`skill://legion-controller/references/daily-report.md`.
|
|
89
|
+
Post it on your first turn of each UTC day: `skill://legion-controller/references/daily-report.md`.
|
|
218
90
|
|
|
219
91
|
## Deployment instructions
|
|
220
92
|
|
|
221
|
-
The
|
|
222
|
-
code owners, roles you may consult) override this skill where the two conflict, and may narrow
|
|
223
|
-
what you label for Legion. They never hand Legion work: a person does, or a role reports a clear
|
|
224
|
-
defect.
|
|
93
|
+
The deployment instructions in your system prompt override this skill and may narrow what you label. They never hand Legion work.
|