@sjawhar/claude-envoy 5.14.0 → 5.15.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/dist/envoy-channel.js +3 -3
- package/legion/skills/legion-architect/SKILL.md +5 -5
- package/legion/skills/legion-architect/references/acceptance.md +16 -16
- package/legion/skills/legion-architect/references/decomposition.md +3 -3
- package/legion/skills/legion-architect/references/plan-changes.md +1 -1
- package/legion/skills/legion-architect/references/plan.md +9 -4
- package/legion/skills/legion-architect/references/wake-routing.md +2 -2
- package/legion/skills/legion-controller/references/admission.md +5 -4
- package/legion/skills/legion-retro/SKILL.md +3 -2
- package/legion/skills/legion-worker/SKILL.md +2 -2
- package/legion/skills/legion-worker/references/conflicts-and-rewrites.md +1 -1
- package/legion/skills/legion-worker/references/findings.md +1 -1
- package/legion/skills/legion-worker/references/merge-gate.md +2 -2
- package/package.json +1 -1
package/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -62199,7 +62199,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
|
|
|
62199
62199
|
|
|
62200
62200
|
// package.json
|
|
62201
62201
|
var name2 = "@sjawhar/claude-envoy";
|
|
62202
|
-
var version2 = "5.
|
|
62202
|
+
var version2 = "5.15.1";
|
|
62203
62203
|
var legion = {
|
|
62204
62204
|
daemonApiVersion: 219
|
|
62205
62205
|
};
|
|
@@ -66044,12 +66044,12 @@ function phaseOpParameters(zod) {
|
|
|
66044
66044
|
var PHASE_OP_SENTENCES = {
|
|
66045
66045
|
readRecord: "read_record returns the record of `issue` from the daemon's record route for that issue, your own issue when you leave `issue` out. " + "A held issue names in `heldFrom` the phase the hold took it out of, and in `holdReason` why it is held when its hold has a reason: " + "`escalated` (its architect sent it to the controller), `task-stopped` (its owner stopped its task with stop_task) or `children` (it " + "waits, before its retro, for the issues beneath it). A failed claim carries `failure`: the " + "`cause` word for what failed it, the `detail` sentence beside that word, `at`, when it failed, and " + "`attempts`, the four counts it failed with. A todo written on a held root releases the hold and starts " + "that phase again, as the architect's retry_or_escalate with retry does, but a root held `task-stopped` starts its task again at its " + "first step (a task that never started waits for its gate and its line, as any task does before its first step), and a root held " + "`children` stays held until the issues beneath it close. ",
|
|
66046
66046
|
readReleaseRecords: "read_release_records returns this deployment's idle-release records from `since` (an RFC 3339 time) on, read with this session's own claim: " + "every release, resume and hold the daemon recorded, and over them the counts of releases, of the releases among them that suspended no " + "role, of resumes by wake kind and of holds by reason, the pod-hours released, the share of releases woken again within ten minutes, and " + "the median, 90th percentile and maximum seconds from a wake to the woken role's first turn. A wake that a project pause held is " + "counted as `heldByPause` and left out of those seconds, since its wait measures the pause. A release that suspended no role is woken by " + "nothing, so the pod-hours released and the woken share count the releases that suspended a role alone. ",
|
|
66047
|
-
requestBackwardMove: "request_backward_move returns an issue to an earlier phase (`to`, `reason`). A phase worker moves its own issue. " + "The architect that owns an issue in accepting moves it, named by `issue`, back to
|
|
66047
|
+
requestBackwardMove: "request_backward_move returns an issue to an earlier phase (`to`, `reason`). A phase worker moves its own issue. " + "The architect that owns an issue in accepting moves it, named by `issue`, back to the phase of an earlier step of its task. " + "That move counts no review round: only a review that requests changes counts one. ",
|
|
66048
66048
|
readBuild: "read_build reports the build this process runs: the plugin package and version the process loaded, and the contract that build speaks. " + "It also reports the contract the daemon states on its answer to the health route. " + "That contract is null where the daemon stated none, where the daemon refused the health route and where no answer reached this process at all, and a note of its own says which. " + "The two numbers can differ, and the answer shows both. " + "Report the version this call answers, never the one at the plugin's path on the image. " + "In a pod, an Oh My Pi role relaunched onto the daemon's contract loads the build that relaunch installed under the role's own state home, " + "and a Claude Code role installs no plugin: it loads its pod image's own claude-envoy. " + "read_build reads no project state. "
|
|
66049
66049
|
};
|
|
66050
66050
|
var STALE_ENTRY_INSTRUCTION = "End this turn without completing. The task of the entry the phase is on is owed to this claim, and the daemon sends it by itself. " + "That task is work of its own: do what it asks at the head it names and complete it with a handoff of its own, never this completion's " + "record, commit or verdict";
|
|
66051
66051
|
function legionToolDescription(host) {
|
|
66052
|
-
return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers alone: the daemon refuses an architect's completion, with ACCEPTANCE_IS_SIGN_OFF where nothing else refuses it first, since an architect accepts with sign_off; " + "the daemon accepts a completion only from the role working the issue's current phase, " + "or a role's first completion of the phase it left, which it records and which moves nothing, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet, or carries it with a requirement only the deploy can show still unobserved and a look still to follow; on the check's last look, only for an issue with no such requirement). " + "A tester's fail may name `return_to`, the place of a step of the task its issue runs, 1 for its first: the step the task goes back " + "to; without it, the task goes back to the first implementation step before the step that failed. Only a completion with the verdict " + "fail names it (RETURN_TO_NEEDS_FAIL), a place below 1 is refused (INVALID_RETURN_TO), and so is a step the task cannot go back to " + "(RETURN_REFUSED). " + "A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads from Dispatch the newest record of the phase your role works or, once the issue has moved on, of the phase it left, " + "and reports it with `commit`, the head that record's body names " + "(`head`, the 40-character lower-case commit the work it reports was done against); in implementing, the implementer's must be the commit its " + "workspace stands on, `@-`, pushed to `legion/<issue>@origin`, so push the branch first; retro, the merger's completion and a phase you left with no record, or with an implement record naming no head, report the commit the workspace stands on. It " + "refuses, posting nothing, a phase you work with no record, a Dispatch that does not answer, and, in implementing, an implement record naming no head, an " + "implementer's `@-` not yet on `legion/<issue>@origin`, or an implement record whose head is not that pushed `@-`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + `The completion that ends the retro carries \`plan_rating\` (${LEGION_PLAN_RATING_LEAST} to ${LEGION_PLAN_RATING_MOST}) and \`plan_reason\`, as ` + "skill://legion-retro says, and the daemon refuses a completion that breaks that skill's rating rule " + "(PLAN_RATING_REQUIRED, PLAN_RATING_UNEXPECTED or PLAN_RATING_INPUT). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first. Then let each subagent and each background job that you started finish, or stop it. Commit and push what it made " + "before you answer. The daemon replaces the pod and its disk when the round ends. The round ends at the moment the message " + "names. It can end earlier, once every role has answered, no role is in a turn and each role's last report names no running " + "subagent or background job. No answer delays that moment, and the end of a turn is no answer. If a subagent or a background " + "job finishes after you answer, commit and push what it made. Then call ready_for_update again with the same round. " + "The call ends no phase. The daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
|
|
66052
|
+
return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers alone: the daemon refuses an architect's completion, with ACCEPTANCE_IS_SIGN_OFF where nothing else refuses it first, since an architect accepts with sign_off; " + "the daemon accepts a completion only from the role working the issue's current phase, " + "or a role's first completion of the phase it left, which it records and which moves nothing, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet, or carries it with a requirement only the deploy can show still unobserved and a look still to follow; on the check's last look, only for an issue with no such requirement). " + "A tester's fail may name `return_to`, the place of a step of the task its issue runs, 1 for its first: the step the task goes back " + "to; without it, the task goes back to the first implementation step before the step that failed. Only a completion with the verdict " + "fail names it (RETURN_TO_NEEDS_FAIL), a place below 1 is refused (INVALID_RETURN_TO), and so is a step the task cannot go back to " + "(RETURN_REFUSED). " + "A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads from Dispatch the newest record of the phase your role works or, once the issue has moved on, of the phase it left, " + "and reports it with `commit`, the head that record's body names " + "(`head`, the 40-character lower-case commit the work it reports was done against); in implementing, the implementer's must be the commit its " + "workspace stands on, `@-`, pushed to `legion/<issue>@origin`, so push the branch first; retro, the merger's completion and a phase you left with no record, or with an implement record naming no head, report the commit the workspace stands on. It " + "refuses, posting nothing, a phase you work with no record, a Dispatch that does not answer, and, in implementing, an implement record naming no head, an " + "implementer's `@-` not yet on `legion/<issue>@origin`, or an implement record whose head is not that pushed `@-`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + `The completion that ends the retro carries \`plan_rating\` (${LEGION_PLAN_RATING_LEAST} to ${LEGION_PLAN_RATING_MOST}) and \`plan_reason\`, as ` + "skill://legion-retro says, and the daemon refuses a completion that breaks that skill's rating rule " + "(PLAN_RATING_REQUIRED, PLAN_RATING_UNEXPECTED or PLAN_RATING_INPUT). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. The reviewer creates no commit and pushes nothing, so each commit " + "and push this description names is not its own, and the merger pushes the merge of the base it made. Push every commit you want kept to the issue branch " + "first. Then let each subagent and each background job that you started finish, or stop it. Commit and push what it made " + "before you answer. The daemon replaces the pod and its disk when the round ends. The round ends at the moment the message " + "names. It can end earlier, once every role has answered, no role is in a turn and each role's last report names no running " + "subagent or background job. No answer delays that moment, and the end of a turn is no answer. If a subagent or a background " + "job finishes after you answer, commit and push what it made. Then call ready_for_update again with the same round. " + "The call ends no phase. The daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
|
|
66053
66053
|
}
|
|
66054
66054
|
function pluginBuildOf(manifest) {
|
|
66055
66055
|
return {
|
|
@@ -33,7 +33,7 @@ Your role prompt holds the lifecycle rules, this skill the procedures.
|
|
|
33
33
|
Record it on the issue or in `plan.md`, with your reason wherever you do not follow it.
|
|
34
34
|
Run it again when a push-back or a review changes what the design is for.
|
|
35
35
|
|
|
36
|
-
3. A root: write and edit the spec as `skill://legion-architect/references/design-gate.md` says, since
|
|
36
|
+
3. A root: write and edit the spec as `skill://legion-architect/references/design-gate.md` says, since a new version closes the gate, except two kinds it names.
|
|
37
37
|
A child: as `skill://legion-architect/references/decomposition.md`, "Creating children", says.
|
|
38
38
|
|
|
39
39
|
4. Decompose, adopt, split across repositories or record a wait on outside work as `skill://legion-architect/references/decomposition.md` says, red-team check first.
|
|
@@ -78,22 +78,22 @@ A parent's own first phase waits while Dispatch shows an open child under it (th
|
|
|
78
78
|
- While the work is built, a role runs the application from the issue's branch and uses it as its user would:
|
|
79
79
|
a passing check does not show that a person can do their job with it.
|
|
80
80
|
|
|
81
|
-
-
|
|
81
|
+
- For a page or a tool a person uses, offer a running build before the reviewer step, or the last if none. The deployment instructions say how a pod runs one.
|
|
82
82
|
|
|
83
83
|
## 5. Retro
|
|
84
84
|
|
|
85
|
-
Where the task
|
|
85
|
+
Where your acceptance is the task's last step, your `sign_off` starts retro; otherwise the pass of the task's last step starts it, or holds a parent before it.
|
|
86
86
|
Never message the implementer to start retro.
|
|
87
87
|
A retro that reports a defect holds its completion until you say whether it moves the issue back, which only retro can do while it holds the phase.
|
|
88
88
|
A retro that cannot write the body: `skill://legion-architect/references/acceptance.md`, "Retro's result".
|
|
89
89
|
|
|
90
90
|
## 6. Acceptance and the merge
|
|
91
91
|
|
|
92
|
-
In `accepting`, which only a task naming `acceptance:owner` enters, no worker
|
|
92
|
+
In `accepting`, which only a task naming `acceptance:owner` enters, no worker holds the phase:
|
|
93
93
|
read, against the goal, every check and requirement in `skill://legion-architect/references/acceptance.md`, "Accepting".
|
|
94
94
|
|
|
95
95
|
Run `task(agent="goal-red-team")` as your role prompt says, then `wait` for its report.
|
|
96
|
-
Accept only when a pass stands for every `before_merge` check at the
|
|
96
|
+
Accept only when a pass stands for every `before_merge` check at the head the step before your acceptance passed, every requirement has a check (with no `before_merge` check, your comment says how each is proven), and none is unmet or read narrower than written:
|
|
97
97
|
post a `dispatch comment` naming each check and its result, then `legion({ op: "sign_off", issue: "<KEY>" })`.
|
|
98
98
|
Wait for a `ci_check` run still going; a name no run answers is yours to correct in the check.
|
|
99
99
|
Finding asks, refusals and what follows: `skill://legion-architect/references/acceptance.md`.
|
|
@@ -11,18 +11,16 @@ answer it on its role topic from the deployment instructions, or open a `dispatc
|
|
|
11
11
|
|
|
12
12
|
## Accepting
|
|
13
13
|
|
|
14
|
-
Only a task whose
|
|
14
|
+
Only a task whose steps name `acceptance:owner` enters `accepting`.
|
|
15
15
|
Read, against the goal, every check and every requirement:
|
|
16
16
|
|
|
17
|
-
1. where
|
|
17
|
+
1. where a tester step comes before your acceptance, the tester's handoff: `dispatch handoff-read --issue <issue> --phase test`;
|
|
18
18
|
|
|
19
|
-
2. `dispatch results --issue <issue>`: whether a pass stands for each check at the
|
|
19
|
+
2. `dispatch results --issue <issue>`: whether a pass stands for each `before_merge` check at the head the step before your acceptance passed;
|
|
20
20
|
|
|
21
|
-
3. where
|
|
21
|
+
3. where a reviewer step comes before your acceptance, the reviewer's approval of the head its Legion footer names, never its `commit_id` (`skill://legion-worker/references/merge-gate.md`), and each claim of its prose, against the code at that head;
|
|
22
22
|
|
|
23
|
-
4.
|
|
24
|
-
|
|
25
|
-
5. `gh pr view <n> --json mergeable,mergeStateStatus`: a `CONFLICTING` head whose checks passed is accepted as any other, and the merger merges the base forward (*A conflicting head*, below).
|
|
23
|
+
4. `gh pr view <n> --json mergeable,mergeStateStatus`: a `CONFLICTING` head whose checks passed is accepted as any other (*A conflicting head*, below).
|
|
26
24
|
|
|
27
25
|
- `sign_off` works only in `accepting`, where the Dispatch status reads `needs_review`; your `handoff_complete` there is refused (`ACCEPTANCE_IS_SIGN_OFF`).
|
|
28
26
|
|
|
@@ -49,9 +47,9 @@ Nothing builds on the parent's merge, which comes last.
|
|
|
49
47
|
Until those children close, leave the issue in `accepting`.
|
|
50
48
|
Then, in one turn:
|
|
51
49
|
|
|
52
|
-
1. Where
|
|
50
|
+
1. Where a tester step comes before your acceptance, `envoy_publish` to its tester's role topic:
|
|
53
51
|
"The next round of <KEY> is its last round: a full test round of every check of the issue with no `ci_check`."
|
|
54
|
-
With no tester step, the implementer's evidence for those checks at the merge head is the full round.
|
|
52
|
+
With no tester step before your acceptance, the implementer's evidence for those checks at the merge head is the full round.
|
|
55
53
|
|
|
56
54
|
2. `request_backward_move` to `implementing`, with the reason "Last round:
|
|
57
55
|
merge the default branch your addressing line names into the branch, push, end your forward-merge comment with `parent's last round: full test round`, and complete."
|
|
@@ -67,7 +65,7 @@ If the pull request merged before its last round, move nothing back. Once the ch
|
|
|
67
65
|
|
|
68
66
|
## After your sign-off
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
The steps after your acceptance in the task run, then retro, then the merger merges the last step's head under the repository's rules; you start none of it.
|
|
71
69
|
A person's request after your sign-off is a requirement of this issue: the role that holds the phase makes the `request_backward_move`.
|
|
72
70
|
When the merger reports:
|
|
73
71
|
|
|
@@ -80,20 +78,22 @@ When the merger reports:
|
|
|
80
78
|
Do not wait for a reviewer phase the task does not have;
|
|
81
79
|
|
|
82
80
|
- a squash into a base other than the default branch:
|
|
83
|
-
tell the implementer of each open pull request of the tree built on that branch whose issue is yours and still in `implementing` to merge that base forward
|
|
84
|
-
Past `implementing`, the daemon asks for that merge itself
|
|
81
|
+
tell the implementer of each open pull request of the tree built on that branch whose issue is yours and still in `implementing` to merge that base forward.
|
|
82
|
+
Past `implementing`, the daemon asks for that merge itself (*A conflicting head*, below).
|
|
85
83
|
|
|
86
84
|
## A conflicting head
|
|
87
85
|
|
|
88
86
|
A head that conflicts with its base keeps the issue in its phase.
|
|
89
|
-
|
|
87
|
+
Until the task's last step has run, the daemon asks the implementer to merge the base forward only when the next step needs a mergeable head (*The daemon's ask* in `skill://legion-worker/references/conflicts-and-rewrites.md`).
|
|
90
88
|
A conflict it does not act on yet is recorded: the task's steps go on at that head, and a reviewer step's approval of it ends its review round.
|
|
91
|
-
|
|
92
|
-
a check the base's newer code breaks is the merger's to fix in that merge too.
|
|
89
|
+
Once every step has run, in `retro` or in `accepting` with no step after yours, the conflict waits, so accept the head as any other; once the issue enters `merging` the daemon asks the merger to merge the base forward,
|
|
90
|
+
and a check the base's newer code breaks is the merger's to fix in that merge too.
|
|
93
91
|
When it asks, the daemon tells you once by `checks-red`, naming the phase the issue stays in, the role asked, the head, the base and why; in `implementing` no notice comes.
|
|
94
92
|
You start nothing for the merge.
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
Where the task's reviewer step already ran, the daemon asks the reviewer to read the merge and approve the new head by its SHA, or request changes; the merger merges the new head only once that approval is on the pull request.
|
|
95
|
+
In `accepting`, wait for that approval before `sign_off`, and send the issue back with `request_backward_move` when the reviewer requests changes.
|
|
96
|
+
A reviewer step after yours reviews the new head when it runs.
|
|
97
97
|
A task with no reviewer step has no review to await.
|
|
98
98
|
|
|
99
99
|
## A review thread GitHub will not resolve
|
|
@@ -11,7 +11,7 @@ Read your own issue (`read_record`), its criteria, its children and their handof
|
|
|
11
11
|
|
|
12
12
|
Release a child a person created at once and as it is: `legion({ op: "release_children", issues: ["LEGION-41", "LEGION-42"] })`.
|
|
13
13
|
The answer names `released`, `started` and `held`, each held child with what it waits on.
|
|
14
|
-
A release refused with
|
|
14
|
+
A release refused with a code below writes nothing: release the rest again without the child it names.
|
|
15
15
|
|
|
16
16
|
- `CHILD_NOT_ADOPTABLE`: it runs or ran as a tree of its own.
|
|
17
17
|
Leave it, or ask the controller.
|
|
@@ -20,8 +20,8 @@ A release refused with one of the codes below writes nothing: release the rest a
|
|
|
20
20
|
|
|
21
21
|
- `ISSUE_NOT_OWNED`: the issue is another architect's; send the move to the architect above you.
|
|
22
22
|
|
|
23
|
-
- `CHILD_UNDER_ACCEPTED_PARENT`: an ancestor
|
|
24
|
-
Release again once it has closed,
|
|
23
|
+
- `CHILD_UNDER_ACCEPTED_PARENT`: the daemon has already accepted an ancestor's head, the head its task's last step passed.
|
|
24
|
+
Release again once it has closed, unless it is the tree's root.
|
|
25
25
|
|
|
26
26
|
## Creating children
|
|
27
27
|
|
|
@@ -19,7 +19,7 @@ Your role prompt says what `stop_task` does, what holds a stopped task and what
|
|
|
19
19
|
Then give a later version that changes the task, or end the work: for a child under your own issue, your own status write in Dispatch, by the rules for ending a child in your role prompt; `dispatch ask` on the root for a root.
|
|
20
20
|
When the stopped task is your own issue's, as a child's architect, send the end of that work to the architect above you with `envoy_publish`: the daemon sets back your status write on your own issue.
|
|
21
21
|
|
|
22
|
-
- **`retro-held`:** a parent's task passed its last step
|
|
22
|
+
- **`retro-held`:** a parent's task passed its last step, which is not your `acceptance:owner` step, while issues beneath it are still in the workflow.
|
|
23
23
|
Legion holds it before its retro, so that it merges after them, and starts the retro when the last one leaves.
|
|
24
24
|
Run each issue it names to done, or end it by your own status write in Dispatch, by the same rules.
|
|
25
25
|
`retry_or_escalate` refuses that hold, a retry and an escalation alike: while issues beneath it are in the workflow, `409 HELD_FOR_CHILDREN` names each of them; with none left, the answer says that its tree lingers or that its root waits in the admission line.
|
|
@@ -26,16 +26,21 @@ writes it for them. For each step, a fresh agent or the agent of an earlier step
|
|
|
26
26
|
|
|
27
27
|
## The roles and their order
|
|
28
28
|
|
|
29
|
+
Name the steps in `steps` in the order they run.
|
|
30
|
+
A `planner` step may stand at any place, and `implementer` stands before each `tester`, `reviewer` and `acceptance:owner` step, since each of them reads the pull request the implementer opens: a plan that names one of them with no `implementer` step before it is refused with a reason that ends `This release of Legion does not carry it out yet.`
|
|
31
|
+
The table lists the steps in the order of the default steps:
|
|
32
|
+
|
|
29
33
|
| Step | Type | Phase | What leaving it out means |
|
|
30
34
|
| --- | --- | --- | --- |
|
|
31
35
|
| `planner` | planning | `planning` | No implementation plan and no plan review: the steps work from your task's text and the spec. |
|
|
32
36
|
| `implementer` | implementation | `implementing` | Required. It also works the retro, and a failed step returns to it unless the failed step names an earlier one. |
|
|
33
|
-
| `tester` | testing | `testing` | Only the implementer records results against the checks, and
|
|
37
|
+
| `tester` | testing | `testing` | Only the implementer records results against the checks, and no other step runs them again, except where a parent's pull request merged before its last round: your subagent then runs and records them (`skill://legion-architect/references/acceptance.md`, *The last round*). |
|
|
34
38
|
| `reviewer` | review | `reviewing` | No review: on a base whose rules require an approving review, the merger waits and tells you. |
|
|
35
|
-
| `acceptance:owner` | review | `accepting` | Your step. Without it the last step's pass starts the retro, and nothing waits for you to read the evidence. |
|
|
39
|
+
| `acceptance:owner` | review | `accepting` | Your step. Without it the last step's pass starts the retro, or holds a parent before it while issues beneath it are in the workflow, and nothing waits for you to read the evidence. |
|
|
36
40
|
|
|
37
|
-
Without `acceptance:owner`,
|
|
38
|
-
|
|
41
|
+
Without `acceptance:owner`, retro holds the checks (`skill://legion-retro`), and so does a reviewer step where the task has one.
|
|
42
|
+
A reviewer step approves only once a pass stands for every `before_merge` check at the head.
|
|
43
|
+
And retro's first step sends back a check with no pass standing there, except a `ci_check` whose run has not concluded or cannot be read.
|
|
39
44
|
So on a task with no reviewer step and no `acceptance:owner`, such a check holds the merge only where it is among the checks the base branch requires.
|
|
40
45
|
|
|
41
46
|
## What Legion refuses
|
|
@@ -13,7 +13,7 @@ Where a row says to ask a person, a child's own architect sends the question to
|
|
|
13
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
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
15
|
| `carried-gate-opened` | Start nothing and release nothing for it. |
|
|
16
|
-
| `phase-finished` | The next phase
|
|
16
|
+
| `phase-finished` | The next phase started, or `retro-held` came too. 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). When the step before `acceptance:owner` finishes, section 6 applies. A worker reporting that no surface reaches the changed path: build the surface in this tree, then tell it to continue. |
|
|
17
17
|
| `retro-held`, `task-stopped`, `plan-not-taken` | Act as "The notices" in `skill://legion-architect/references/plan-changes.md` says. |
|
|
18
18
|
| `pr-blocked` | The review round cap is reached: decide in this turn, as "A capped pull request" below says. |
|
|
19
19
|
| `checks-red` | The daemon asked the implementer, or in `merging` the merger, to merge the base forward; the issue stays in the phase the notice names. Start nothing ("A conflicting head" in `skill://legion-architect/references/acceptance.md`). |
|
|
@@ -39,7 +39,7 @@ Where a row says to ask a person, a child's own architect sends the question to
|
|
|
39
39
|
## A capped pull request
|
|
40
40
|
|
|
41
41
|
A `pr-blocked` reason reads `<n> rounds counted, <m> conflict rounds not counted`: judge the cap by `<n>`.
|
|
42
|
-
|
|
42
|
+
Only requests for changes count: no tester's fail, no move back.
|
|
43
43
|
Read what every counted round found, choose one, act on it, and post the rounds you read and the choice as a `dispatch comment`:
|
|
44
44
|
|
|
45
45
|
- **Narrow**: the change is sound but each round finds more around it.
|
|
@@ -7,7 +7,8 @@ The rules behind them: [Admission and the `legion` label](https://cybermonklabs.
|
|
|
7
7
|
## The lists
|
|
8
8
|
|
|
9
9
|
- `admission.active`: every issue holding a slot, a root or a child, at work, `held` or waiting on a person.
|
|
10
|
-
An issue
|
|
10
|
+
An issue in `accepting`, `retro` or `merging` holds none (in the default steps, the phases after the review), and a step after `accepting` whose phase keeps a slot waits for one again.
|
|
11
|
+
A started issue that waits on another issue holds none either, except three roots that keep theirs:
|
|
11
12
|
one in `awaiting_person`, one at `admitted` whose gate has never opened, and one carried from another tree.
|
|
12
13
|
|
|
13
14
|
- `admission.trees`: the roots of the live trees, whether or not any issue of them holds a slot.
|
|
@@ -51,8 +52,8 @@ Name them in the day's report and take nothing for them.
|
|
|
51
52
|
| `design_gate` | Its root's design gate is not open at every gated step | A person's approval of each step's document |
|
|
52
53
|
| `dispatch_blocker` | A `blocked_by` issue is not `done` | Each blocker `done`, or the link taken off |
|
|
53
54
|
| `children_first` | An open child under it | The last open child leaving the workflow |
|
|
54
|
-
| `accepted_ancestor` |
|
|
55
|
-
| `children_before_retro` | A parent
|
|
55
|
+
| `accepted_ancestor` | The daemon has accepted the head an ancestor's last step passed | That ancestor standing in neither `retro` nor `merging` (a `held` ancestor stands in the phase it was held from) |
|
|
56
|
+
| `children_before_retro` | A parent whose task's last step is not `acceptance:owner` is held before retro while its children run | The last `heldBy` issue leaves the workflow, then Legion starts retro |
|
|
56
57
|
| `task_stopped` | A task is stopped and no step of it runs | A later `register_plan` version that changes the task, or a root's `todo`, starts its first step |
|
|
57
|
-
| `at_work` |
|
|
58
|
+
| `at_work` | In `accepting`, `retro` or `merging`, not `held`, on no slot | Its own sign-off, retro and merge |
|
|
58
59
|
| `unclassified` | None of the above | Nothing of yours: name it with its `phase` and `status` |
|
|
@@ -29,7 +29,8 @@ End each turn of that hold with a WAITING line naming the defect and the answer
|
|
|
29
29
|
## Steps
|
|
30
30
|
|
|
31
31
|
1. **Read the evidence**: the issue, `dispatch results --issue <issue>`, the pull request, and the implementer's handoff.
|
|
32
|
-
Also read the tester's handoff (`dispatch handoff-read --issue <issue> --phase test`) where it has a tester step
|
|
32
|
+
Also read the tester's handoff (`dispatch handoff-read --issue <issue> --phase test`) where it has a tester step.
|
|
33
|
+
Read the review (`--phase review`) where it has a reviewer step, at the version your `Handoff:` line names when that line names one.
|
|
33
34
|
A pass must stand at the last worker step's head for every `before_merge` check, and the body's `Checks` block carries each.
|
|
34
35
|
|
|
35
36
|
- A check carrying `ci_check` is CI's: its derived result is the pass it needs (`skill://legion-worker/references/ci-checks.md`).
|
|
@@ -39,7 +40,7 @@ End each turn of that hold with a WAITING line naming the defect and the answer
|
|
|
39
40
|
Send a name that no run answers (`absent`) to the architect as a finding, since the check's words are wrong, and the same for a check whose `run` is a whole test suite.
|
|
40
41
|
Neither that run nor that finding moves the issue back.
|
|
41
42
|
|
|
42
|
-
- A `ci_check` check whose derived result is a fail is the merger's: the change
|
|
43
|
+
- A `ci_check` check whose derived result is a fail is the merger's: the change passed every step of its task, and the merger decides at the merge whether the base or the change broke it.
|
|
43
44
|
Name it in your retro message and complete.
|
|
44
45
|
|
|
45
46
|
- Any other check with no pass standing, or a check with no `ci_check` whose only evidence is a unit suite:
|
|
@@ -57,7 +57,7 @@ Your role prompt gives the workspace, the push, the handoff, `handoff_complete`,
|
|
|
57
57
|
- No surface reaches the changed path: report it to the architect, never complete (`skill://legion-worker/references/results.md`).
|
|
58
58
|
|
|
59
59
|
- A released pod is not a stop.
|
|
60
|
-
Your session, phase and task are kept, and the next pod restores your unpushed tracked work; nothing else of the disk survives
|
|
60
|
+
Your session, phase and task are kept, and the next pod restores your unpushed tracked work; nothing else of the disk survives but a volume the deployment keeps.
|
|
61
61
|
|
|
62
62
|
- When another role's topic answers 404, read its handoff with `dispatch handoff-read`.
|
|
63
63
|
|
|
@@ -81,7 +81,7 @@ Your role prompt gives the workspace, the push, the handoff, `handoff_complete`,
|
|
|
81
81
|
|
|
82
82
|
- No deferrals.
|
|
83
83
|
A finding that changes behaviour, hides an error, or breaks a gate is fixed in this pull request.
|
|
84
|
-
So is a wording nit or any clear fix in a file it touches: a later round costs a CI pass and a review.
|
|
84
|
+
So is a wording nit or any clear fix in a file it touches: a later round costs a CI pass and a review, if any.
|
|
85
85
|
`Fast-follow:` reads `none` or names cleanup in files the pull request does not touch.
|
|
86
86
|
|
|
87
87
|
- The merge gate follows the task's `Steps:` line: each named step runs in order, then retro and the merger.
|
|
@@ -32,7 +32,7 @@ Every role reads a merge of the base the same way:
|
|
|
32
32
|
|
|
33
33
|
## The daemon's ask
|
|
34
34
|
|
|
35
|
-
A head that conflicts with its base keeps the issue in its phase. The daemon reads GitHub twice, at least a minute apart, and acts only on a conflict both reads report
|
|
35
|
+
A head that conflicts with its base keeps the issue in its phase. The daemon reads GitHub twice, at least a minute apart, and acts only on a conflict both reads report. It acts only when the next step needs a mergeable head, which is so in four cases. The issue stands in `merging`. A check the base requires has no green result on the head, since GitHub runs no check on a conflicting head. The base requires a pull request to be current with it. The daemon could not read the base's rules. Where every step of the task has run, in `retro` or in `accepting` with no step of its task after it, the conflict waits for the merger.
|
|
36
36
|
|
|
37
37
|
- Before `merging` the implementer gets a merge-forward message on its role topic, and in `merging` the merger does. Merge the base forward in `$LEGION_WORKSPACE`, the one workspace every role of the issue shares, as *Reintegrating the base* says, and push the issue branch, with no handoff and no completion for the merge. In `implementing` the phase is the implementer's, and its assignment and its completion stand.
|
|
38
38
|
- In `testing` and `reviewing`, the phase's worker is told to stop writing the workspace: stop at once, complete nothing at the old head, and keep your turn and its jobs. When the push lands you are told the new head: read the merge as above and go on at that head.
|
|
@@ -25,7 +25,7 @@ Search first (`skill://dispatch-first`). An open issue that tracks the problem g
|
|
|
25
25
|
A publish to a role answers with its live `holder`. When no live session holds the controller role, the answer says Envoy kept the message for one hour (`kept_until`); a keep is not a delivery. An `unresponsive` holder is not a stopped one: release nothing, take nothing from it, and publish no second copy. Treat a kept answer as a controller not taking it, and make the finding an ask on the first of these that holds:
|
|
26
26
|
|
|
27
27
|
1. **The report issue is open:** ask there, the question opening `Clear defect from <your role token>` and `--ref` naming your evidence comment, then reply `Asked dispatch://<REPORT KEY>/ask/<id>` under that comment.
|
|
28
|
-
2. **The report issue is missing or closed:** post the evidence on your own issue and ask there, then publish the ask's reference to the architect that owns your issue.
|
|
28
|
+
2. **The report issue is missing or closed:** post the evidence on your own issue and ask there, then publish the ask's reference to the architect that owns your issue. Where your task has an `acceptance:owner` step, it holds your issue's acceptance until a controller takes the ask. That hold keeps your issue open: an open ask on a closed issue drops out of the controller's listing.
|
|
29
29
|
3. **Your own issue is closed too** (`409 ISSUE_CLOSED`): put the report issue back in reach, then post and ask there, and say in your summary that you did. This is the one lifecycle status you write, and never through the `legion` tool's `set_status`.
|
|
30
30
|
- It exists and is closed: `dispatch issue-update --issue <REPORT KEY> --status icebox`, the status alone (a closed issue refuses a reopening status beside any other field).
|
|
31
31
|
- None exists: `dispatch issue --project <PROJECT> --title 'Legion daily report' --spec-file -`, with the Summary `skill://legion-controller/references/daily-report.md` gives, then `dispatch issue-update --issue <NEW KEY> --status icebox`. It carries no `legion` label.
|
|
@@ -53,7 +53,7 @@ Never approve a head while a required item has no run; sort it in this order.
|
|
|
53
53
|
Cases 2, 3, 4 and 6 end: tell the architect, do not approve, and wait with a `WAITING` line naming what you wait on.
|
|
54
54
|
|
|
55
55
|
1. Read `gh pr view <n> --repo <o>/<r> --json mergeable,mergeStateStatus` first.
|
|
56
|
-
`DIRTY` takes a forward merge, the implementer's before
|
|
56
|
+
`DIRTY` takes a forward merge, the implementer's before `merging` and the merger's in it: the daemon asks for it and names the new head.
|
|
57
57
|
`UNKNOWN`: read each minute for up to five minutes, then report it to the architect as a refused read.
|
|
58
58
|
2. A fork head whose runs stand `action_required` waits on a maintainer.
|
|
59
59
|
Never close and reopen it.
|
|
@@ -74,7 +74,7 @@ Cases 2, 3, 4 and 6 end: tell the architect, do not approve, and wait with a `WA
|
|
|
74
74
|
|
|
75
75
|
- Approval is gated by the issue's own `before_merge` checks, as your role prompt says;
|
|
76
76
|
a `ci_check` check as `skill://legion-worker/references/ci-checks.md` says.
|
|
77
|
-
With no tester step, the implementer's evidence for each is what you read.
|
|
77
|
+
With no earlier tester step, the implementer's evidence for each is what you read.
|
|
78
78
|
A check whose `run` is a whole test suite with no pass standing is a finding for the architect: wait for its rewrite, and request no changes for it.
|
|
79
79
|
|
|
80
80
|
### A merge of the base is reviewed for what it changed
|