@sjawhar/claude-envoy 2.31.1 → 2.31.3
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/dispatch.js +17 -15
- package/dist/envoy-channel.js +18 -16
- package/dist/session-hook.js +17 -15
- package/legion/skills/legion-architect/SKILL.md +6 -6
- package/legion/skills/legion-architect/references/acceptance.md +2 -2
- package/legion/skills/legion-architect/references/decomposition.md +23 -17
- package/package.json +1 -1
package/.omp-plugin/plugin.json
CHANGED
package/dist/dispatch.js
CHANGED
|
@@ -25608,6 +25608,12 @@ function withinWindow(items, now) {
|
|
|
25608
25608
|
const start = now - SESSION_ANSWERS_WINDOW_MS;
|
|
25609
25609
|
return items.filter((item) => Date.parse(item.at) >= start);
|
|
25610
25610
|
}
|
|
25611
|
+
function windowOf(items, now) {
|
|
25612
|
+
return {
|
|
25613
|
+
words: sessionAnswersWords(withinWindow(items, now)),
|
|
25614
|
+
since: new Date(now - SESSION_ANSWERS_WINDOW_MS).toISOString()
|
|
25615
|
+
};
|
|
25616
|
+
}
|
|
25611
25617
|
function sessionAnswersWords(items) {
|
|
25612
25618
|
return items.map((item) => JSON.stringify([
|
|
25613
25619
|
item.kind,
|
|
@@ -25624,7 +25630,7 @@ function leftOutLine(count, namesCommand) {
|
|
|
25624
25630
|
const counted = `${count} older ${count === 1 ? "item" : "items"} left out to stay under ${MAX_CHARS_TEXT} characters`;
|
|
25625
25631
|
return namesCommand ? `${counted}: run \`dispatch answers\` to read every one in full.` : `${counted}.`;
|
|
25626
25632
|
}
|
|
25627
|
-
function
|
|
25633
|
+
function renderSessionAnswers(items, options) {
|
|
25628
25634
|
const inWindow = withinWindow(items, Number(options.now));
|
|
25629
25635
|
const unsent = inWindow.length === items.length ? Math.max(0, (options.total ?? items.length) - items.length) : 0;
|
|
25630
25636
|
const count = inWindow.length + unsent;
|
|
@@ -25652,7 +25658,7 @@ As read at ${options.cached.readAt}; this read failed: ${failureSentence(options
|
|
|
25652
25658
|
].join(`
|
|
25653
25659
|
|
|
25654
25660
|
`);
|
|
25655
|
-
return
|
|
25661
|
+
return text;
|
|
25656
25662
|
}
|
|
25657
25663
|
function renderSessionAnswersList(items, options) {
|
|
25658
25664
|
const shown = withinWindow(items, Number(options.now));
|
|
@@ -25725,24 +25731,19 @@ async function readSessionAnswers(options) {
|
|
|
25725
25731
|
const entries = state.sessions.get(session) ?? new Map;
|
|
25726
25732
|
state.sessions.set(session, entries);
|
|
25727
25733
|
const carry = (cache, reason, noRoute = false) => {
|
|
25728
|
-
const
|
|
25729
|
-
|
|
25734
|
+
const at = now();
|
|
25735
|
+
const text = cache === undefined ? undefined : renderSessionAnswers(cache.items, {
|
|
25736
|
+
now: at,
|
|
25730
25737
|
total: cache.total,
|
|
25731
25738
|
cached: { readAt: cache.read_at, reason },
|
|
25732
25739
|
withoutCommand: noRoute
|
|
25733
25740
|
});
|
|
25734
|
-
if (cache === undefined ||
|
|
25741
|
+
if (cache === undefined || text === undefined) {
|
|
25735
25742
|
if (noRoute)
|
|
25736
25743
|
return { text: undefined, source: "unavailable", reason };
|
|
25737
25744
|
return { text: sessionAnswersFailureLine(reason), source: "failure", reason };
|
|
25738
25745
|
}
|
|
25739
|
-
return {
|
|
25740
|
-
text: rendered.text,
|
|
25741
|
-
source: "cache",
|
|
25742
|
-
readAt: cache.read_at,
|
|
25743
|
-
words: sessionAnswersWords(rendered.shown),
|
|
25744
|
-
reason
|
|
25745
|
-
};
|
|
25746
|
+
return { text, source: "cache", readAt: cache.read_at, ...windowOf(cache.items, at), reason };
|
|
25746
25747
|
};
|
|
25747
25748
|
if (!dispatch.enabled) {
|
|
25748
25749
|
const url = options.dispatchUrl;
|
|
@@ -25783,6 +25784,7 @@ async function readSessionAnswers(options) {
|
|
|
25783
25784
|
retryNoRoute: false
|
|
25784
25785
|
});
|
|
25785
25786
|
const started = client.sessionAnswers(session, {
|
|
25787
|
+
since: new Date(now() - SESSION_ANSWERS_WINDOW_MS).toISOString(),
|
|
25786
25788
|
maxChars: SESSION_ANSWERS_MAX_CHARS,
|
|
25787
25789
|
signal: AbortSignal.timeout(READ_TIMEOUT_MS)
|
|
25788
25790
|
}).then((response) => {
|
|
@@ -25834,12 +25836,12 @@ async function readSessionAnswers(options) {
|
|
|
25834
25836
|
return noRoute();
|
|
25835
25837
|
if ("failure" in outcome)
|
|
25836
25838
|
return carry(current.cache, outcome.failure);
|
|
25837
|
-
const
|
|
25839
|
+
const at = now();
|
|
25838
25840
|
return {
|
|
25839
|
-
text:
|
|
25841
|
+
text: renderSessionAnswers(outcome.cache.items, { now: at, total: outcome.cache.total }),
|
|
25840
25842
|
source: "fresh",
|
|
25841
25843
|
readAt: outcome.cache.read_at,
|
|
25842
|
-
|
|
25844
|
+
...windowOf(outcome.cache.items, at)
|
|
25843
25845
|
};
|
|
25844
25846
|
}
|
|
25845
25847
|
async function sessionAnswersSettled(session) {
|
package/dist/envoy-channel.js
CHANGED
|
@@ -52640,6 +52640,12 @@ function withinWindow(items, now) {
|
|
|
52640
52640
|
const start = now - SESSION_ANSWERS_WINDOW_MS;
|
|
52641
52641
|
return items.filter((item) => Date.parse(item.at) >= start);
|
|
52642
52642
|
}
|
|
52643
|
+
function windowOf(items, now) {
|
|
52644
|
+
return {
|
|
52645
|
+
words: sessionAnswersWords(withinWindow(items, now)),
|
|
52646
|
+
since: new Date(now - SESSION_ANSWERS_WINDOW_MS).toISOString()
|
|
52647
|
+
};
|
|
52648
|
+
}
|
|
52643
52649
|
function sessionAnswersWords(items) {
|
|
52644
52650
|
return items.map((item) => JSON.stringify([
|
|
52645
52651
|
item.kind,
|
|
@@ -52656,7 +52662,7 @@ function leftOutLine(count, namesCommand) {
|
|
|
52656
52662
|
const counted = `${count} older ${count === 1 ? "item" : "items"} left out to stay under ${MAX_CHARS_TEXT} characters`;
|
|
52657
52663
|
return namesCommand ? `${counted}: run \`dispatch answers\` to read every one in full.` : `${counted}.`;
|
|
52658
52664
|
}
|
|
52659
|
-
function
|
|
52665
|
+
function renderSessionAnswers(items, options) {
|
|
52660
52666
|
const inWindow = withinWindow(items, Number(options.now));
|
|
52661
52667
|
const unsent = inWindow.length === items.length ? Math.max(0, (options.total ?? items.length) - items.length) : 0;
|
|
52662
52668
|
const count = inWindow.length + unsent;
|
|
@@ -52684,7 +52690,7 @@ As read at ${options.cached.readAt}; this read failed: ${failureSentence(options
|
|
|
52684
52690
|
].join(`
|
|
52685
52691
|
|
|
52686
52692
|
`);
|
|
52687
|
-
return
|
|
52693
|
+
return text;
|
|
52688
52694
|
}
|
|
52689
52695
|
function renderSessionAnswersList(items, options) {
|
|
52690
52696
|
const shown = withinWindow(items, Number(options.now));
|
|
@@ -52757,24 +52763,19 @@ async function readSessionAnswers(options) {
|
|
|
52757
52763
|
const entries = state.sessions.get(session) ?? new Map;
|
|
52758
52764
|
state.sessions.set(session, entries);
|
|
52759
52765
|
const carry = (cache, reason, noRoute = false) => {
|
|
52760
|
-
const
|
|
52761
|
-
|
|
52766
|
+
const at = now();
|
|
52767
|
+
const text = cache === undefined ? undefined : renderSessionAnswers(cache.items, {
|
|
52768
|
+
now: at,
|
|
52762
52769
|
total: cache.total,
|
|
52763
52770
|
cached: { readAt: cache.read_at, reason },
|
|
52764
52771
|
withoutCommand: noRoute
|
|
52765
52772
|
});
|
|
52766
|
-
if (cache === undefined ||
|
|
52773
|
+
if (cache === undefined || text === undefined) {
|
|
52767
52774
|
if (noRoute)
|
|
52768
52775
|
return { text: undefined, source: "unavailable", reason };
|
|
52769
52776
|
return { text: sessionAnswersFailureLine(reason), source: "failure", reason };
|
|
52770
52777
|
}
|
|
52771
|
-
return {
|
|
52772
|
-
text: rendered.text,
|
|
52773
|
-
source: "cache",
|
|
52774
|
-
readAt: cache.read_at,
|
|
52775
|
-
words: sessionAnswersWords(rendered.shown),
|
|
52776
|
-
reason
|
|
52777
|
-
};
|
|
52778
|
+
return { text, source: "cache", readAt: cache.read_at, ...windowOf(cache.items, at), reason };
|
|
52778
52779
|
};
|
|
52779
52780
|
if (!dispatch.enabled) {
|
|
52780
52781
|
const url = options.dispatchUrl;
|
|
@@ -52815,6 +52816,7 @@ async function readSessionAnswers(options) {
|
|
|
52815
52816
|
retryNoRoute: false
|
|
52816
52817
|
});
|
|
52817
52818
|
const started = client.sessionAnswers(session, {
|
|
52819
|
+
since: new Date(now() - SESSION_ANSWERS_WINDOW_MS).toISOString(),
|
|
52818
52820
|
maxChars: SESSION_ANSWERS_MAX_CHARS,
|
|
52819
52821
|
signal: AbortSignal.timeout(READ_TIMEOUT_MS)
|
|
52820
52822
|
}).then((response) => {
|
|
@@ -52866,12 +52868,12 @@ async function readSessionAnswers(options) {
|
|
|
52866
52868
|
return noRoute();
|
|
52867
52869
|
if ("failure" in outcome)
|
|
52868
52870
|
return carry(current.cache, outcome.failure);
|
|
52869
|
-
const
|
|
52871
|
+
const at = now();
|
|
52870
52872
|
return {
|
|
52871
|
-
text:
|
|
52873
|
+
text: renderSessionAnswers(outcome.cache.items, { now: at, total: outcome.cache.total }),
|
|
52872
52874
|
source: "fresh",
|
|
52873
52875
|
readAt: outcome.cache.read_at,
|
|
52874
|
-
|
|
52876
|
+
...windowOf(outcome.cache.items, at)
|
|
52875
52877
|
};
|
|
52876
52878
|
}
|
|
52877
52879
|
async function sessionAnswersSettled(session) {
|
|
@@ -57446,7 +57448,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
57446
57448
|
|
|
57447
57449
|
// package.json
|
|
57448
57450
|
var name = "@sjawhar/claude-envoy";
|
|
57449
|
-
var version2 = "2.31.
|
|
57451
|
+
var version2 = "2.31.3";
|
|
57450
57452
|
var legion = {
|
|
57451
57453
|
daemonApiVersion: 144
|
|
57452
57454
|
};
|
package/dist/session-hook.js
CHANGED
|
@@ -24576,6 +24576,12 @@ function withinWindow(items, now) {
|
|
|
24576
24576
|
const start = now - SESSION_ANSWERS_WINDOW_MS;
|
|
24577
24577
|
return items.filter((item) => Date.parse(item.at) >= start);
|
|
24578
24578
|
}
|
|
24579
|
+
function windowOf(items, now) {
|
|
24580
|
+
return {
|
|
24581
|
+
words: sessionAnswersWords(withinWindow(items, now)),
|
|
24582
|
+
since: new Date(now - SESSION_ANSWERS_WINDOW_MS).toISOString()
|
|
24583
|
+
};
|
|
24584
|
+
}
|
|
24579
24585
|
function sessionAnswersWords(items) {
|
|
24580
24586
|
return items.map((item) => JSON.stringify([
|
|
24581
24587
|
item.kind,
|
|
@@ -24592,7 +24598,7 @@ function leftOutLine(count, namesCommand) {
|
|
|
24592
24598
|
const counted = `${count} older ${count === 1 ? "item" : "items"} left out to stay under ${MAX_CHARS_TEXT} characters`;
|
|
24593
24599
|
return namesCommand ? `${counted}: run \`dispatch answers\` to read every one in full.` : `${counted}.`;
|
|
24594
24600
|
}
|
|
24595
|
-
function
|
|
24601
|
+
function renderSessionAnswers(items, options) {
|
|
24596
24602
|
const inWindow = withinWindow(items, Number(options.now));
|
|
24597
24603
|
const unsent = inWindow.length === items.length ? Math.max(0, (options.total ?? items.length) - items.length) : 0;
|
|
24598
24604
|
const count = inWindow.length + unsent;
|
|
@@ -24620,7 +24626,7 @@ As read at ${options.cached.readAt}; this read failed: ${failureSentence(options
|
|
|
24620
24626
|
].join(`
|
|
24621
24627
|
|
|
24622
24628
|
`);
|
|
24623
|
-
return
|
|
24629
|
+
return text;
|
|
24624
24630
|
}
|
|
24625
24631
|
function renderSessionAnswersList(items, options) {
|
|
24626
24632
|
const shown = withinWindow(items, Number(options.now));
|
|
@@ -24693,24 +24699,19 @@ async function readSessionAnswers(options) {
|
|
|
24693
24699
|
const entries = state.sessions.get(session) ?? new Map;
|
|
24694
24700
|
state.sessions.set(session, entries);
|
|
24695
24701
|
const carry = (cache, reason, noRoute = false) => {
|
|
24696
|
-
const
|
|
24697
|
-
|
|
24702
|
+
const at = now();
|
|
24703
|
+
const text = cache === undefined ? undefined : renderSessionAnswers(cache.items, {
|
|
24704
|
+
now: at,
|
|
24698
24705
|
total: cache.total,
|
|
24699
24706
|
cached: { readAt: cache.read_at, reason },
|
|
24700
24707
|
withoutCommand: noRoute
|
|
24701
24708
|
});
|
|
24702
|
-
if (cache === undefined ||
|
|
24709
|
+
if (cache === undefined || text === undefined) {
|
|
24703
24710
|
if (noRoute)
|
|
24704
24711
|
return { text: undefined, source: "unavailable", reason };
|
|
24705
24712
|
return { text: sessionAnswersFailureLine(reason), source: "failure", reason };
|
|
24706
24713
|
}
|
|
24707
|
-
return {
|
|
24708
|
-
text: rendered.text,
|
|
24709
|
-
source: "cache",
|
|
24710
|
-
readAt: cache.read_at,
|
|
24711
|
-
words: sessionAnswersWords(rendered.shown),
|
|
24712
|
-
reason
|
|
24713
|
-
};
|
|
24714
|
+
return { text, source: "cache", readAt: cache.read_at, ...windowOf(cache.items, at), reason };
|
|
24714
24715
|
};
|
|
24715
24716
|
if (!dispatch.enabled) {
|
|
24716
24717
|
const url = options.dispatchUrl;
|
|
@@ -24751,6 +24752,7 @@ async function readSessionAnswers(options) {
|
|
|
24751
24752
|
retryNoRoute: false
|
|
24752
24753
|
});
|
|
24753
24754
|
const started = client.sessionAnswers(session, {
|
|
24755
|
+
since: new Date(now() - SESSION_ANSWERS_WINDOW_MS).toISOString(),
|
|
24754
24756
|
maxChars: SESSION_ANSWERS_MAX_CHARS,
|
|
24755
24757
|
signal: AbortSignal.timeout(READ_TIMEOUT_MS)
|
|
24756
24758
|
}).then((response) => {
|
|
@@ -24802,12 +24804,12 @@ async function readSessionAnswers(options) {
|
|
|
24802
24804
|
return noRoute();
|
|
24803
24805
|
if ("failure" in outcome)
|
|
24804
24806
|
return carry(current.cache, outcome.failure);
|
|
24805
|
-
const
|
|
24807
|
+
const at = now();
|
|
24806
24808
|
return {
|
|
24807
|
-
text:
|
|
24809
|
+
text: renderSessionAnswers(outcome.cache.items, { now: at, total: outcome.cache.total }),
|
|
24808
24810
|
source: "fresh",
|
|
24809
24811
|
readAt: outcome.cache.read_at,
|
|
24810
|
-
|
|
24812
|
+
...windowOf(outcome.cache.items, at)
|
|
24811
24813
|
};
|
|
24812
24814
|
}
|
|
24813
24815
|
async function sessionAnswersSettled(session) {
|
|
@@ -26,9 +26,9 @@ An answered root stands in the admission line until the pass that resumes it, an
|
|
|
26
26
|
|
|
27
27
|
- Read a child's handoff, create children, split across repositories, attach architecture components or record that an issue waits on work outside this tree as `skill://legion-architect/references/decomposition.md` says; the wait has its own section, "Recording a wait on other work" (`skill://legion-architect/references/decomposition.md#recording-a-wait-on-other-work`).
|
|
28
28
|
- Adopt children a human created and release them at once. Never replace or re-decompose them.
|
|
29
|
-
-
|
|
30
|
-
- A
|
|
31
|
-
-
|
|
29
|
+
- Size pull requests to deliver the work most efficiently and reliably, with no preference on their number. Each round tests a large pull request whole again; one failure holds all the work, and the request merges late. It can also conflict with the default branch. Many small pull requests each cost a workspace, an admission wait, review, CI, a queue wait and a deploy. They can conflict with each other, and dependent slices run in sequence.
|
|
30
|
+
- 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. 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
|
+
- A child may wait on a sibling's merge in the same repository: release it with `--blocked-by` that sibling, and Legion holds it until the sibling is `done`.
|
|
32
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`. A check carrying `ci_check` is CI's: it names the CI check run that proves it and takes no `run` (`skill://legion-architect/references/design-gate.md#a-check-ci-proves`). Where a CI job that runs on an ordinary pull request already makes a check's proof, write `ci_check` rather than a command. The checks are the gate every later role reads: the implementer and the tester record a result against each check with no `ci_check`, 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.
|
|
@@ -40,7 +40,7 @@ An answered root stands in the admission line until the pass that resumes it, an
|
|
|
40
40
|
|
|
41
41
|
## 2. Children in flight
|
|
42
42
|
|
|
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 by itself; you do nothing for it (https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label). 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.
|
|
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 by itself; you do nothing for it (https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label). 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. A child may wait on a sibling's merge in the same repository with `--blocked-by`.
|
|
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
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
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").
|
|
@@ -53,7 +53,7 @@ Your issue's own first phase does not start while Dispatch shows an open child u
|
|
|
53
53
|
## 4. Integration verification
|
|
54
54
|
|
|
55
55
|
- Prove every criterion of your issue in its own pull request, never in a child: a child that proves its parent defers the tree's own verification. Its last round: `skill://legion-architect/references/acceptance.md`, "The last round".
|
|
56
|
-
- Read the issue's own tester evidence, not a child pull request's check status. A failed check goes back to its implementer by the daemon's table; a fix that belongs in other work
|
|
56
|
+
- Read the issue's own tester evidence, not a child pull request's check status. A failed check goes back to its implementer by the daemon's table; a fix that belongs in other work follows section 1's sizing reasons and red-team check. Never downgrade a parent criterion or carry the failure forward.
|
|
57
57
|
|
|
58
58
|
## 5. Retro
|
|
59
59
|
|
|
@@ -94,5 +94,5 @@ Handle each delivered wake by its row in `skill://legion-architect/references/wa
|
|
|
94
94
|
|
|
95
95
|
- `envoy_publish` to the controller (its topic is on your addressing line) a child that serves no criterion of the root, a need for admission slots, and two trees changing the same code, because only it sees other trees. Handle everything else.
|
|
96
96
|
- A decision that needs the human, yours or a worker's, is a decision block you write, never the worker, because a new version of an approved root spec closes the gate.
|
|
97
|
-
- A clear defect the controller hands you is in code your tree owns, so it is work inside the tree.
|
|
97
|
+
- A clear defect the controller hands you is in code your tree owns, so it is work inside the tree. Choose an open pull request or a child by section 1's sizing reasons, with a child (`dispatch issue --parent`) only after the red-team check. Reply under its evidence comment with the issue that carries it. Change no root spec for it: a child's spec is never gated, and a new root-spec version closes the gate (`skill://legion-architect/references/design-gate.md`, "After approval"). Only a fix that would change the root's Summary, its requirements, its checks or its scope is a decision block instead.
|
|
98
98
|
- A tool a worker cannot get is yours: a pull request changing `cybermonklabs/legion`'s worker image (`skill://legion-worker/references/tools.md`).
|
|
@@ -73,8 +73,8 @@ proves a parent's check: such a result was recorded at the child's head and not
|
|
|
73
73
|
and a child carrying part of a parent's
|
|
74
74
|
requirement proves it with a check on its own Verification document whose `serves` names that
|
|
75
75
|
requirement. Nothing in the tree builds on the parent's own merge, which comes last: a child
|
|
76
|
-
that waits for it waits forever, so work another child builds on is a child of its own
|
|
77
|
-
|
|
76
|
+
that waits for it waits forever, so work another child builds on is a child of its own.
|
|
77
|
+
While the approved head does not carry those
|
|
78
78
|
merges, or a check in another repository has no pass standing since the close of a child it
|
|
79
79
|
needs, leave the issue in `accepting` until each has closed (`child-closed`) or a park has
|
|
80
80
|
already taken it out (`child-status`). That wait is no reason to park a child. Move a parked
|
|
@@ -43,16 +43,21 @@ EOF
|
|
|
43
43
|
child list, each child's title and whole spec. Its mandate: *"You did not write this list. Argue
|
|
44
44
|
that each child should not exist. Name every child that is a to-do, a fix found in review, a
|
|
45
45
|
proof of the root's acceptance, or a part of the architect's own work, and say where it folds:
|
|
46
|
-
the root's pull request or an open child's.
|
|
47
|
-
its
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
the root's pull request or an open child's. Weigh each separate pull request against combining
|
|
47
|
+
its work. Size pull requests to deliver the work most efficiently and reliably, with no preference on their number.
|
|
48
|
+
Each round tests a large pull request whole again; one failure holds all the work, and the request merges late.
|
|
49
|
+
It can also conflict with the default branch.
|
|
50
|
+
Many small pull requests each cost a workspace, an admission wait, review, CI, a queue wait and a deploy.
|
|
51
|
+
They can conflict with each other, and dependent slices run in sequence."*
|
|
52
|
+
`wait` for its verdict, since it runs as a job of its own.
|
|
53
|
+
Size pull requests to deliver the work most efficiently and reliably, with no preference on their number.
|
|
54
|
+
Each round tests a large pull request whole again; one failure holds all the work, and the request merges late.
|
|
55
|
+
It can also conflict with the default branch.
|
|
56
|
+
Many small pull requests each cost a workspace, an admission wait, review, CI, a queue wait and a deploy.
|
|
57
|
+
They can conflict with each other, and dependent slices run in sequence.
|
|
58
|
+
A child may wait on a sibling's merge in the same repository: release it with `--blocked-by` that sibling, and Legion holds it until the sibling is `done`.
|
|
59
|
+
A repeated change — the same edit per program, directory or instance of this tree's own work — is one child, never one per instance.
|
|
60
|
+
Include deletion of what this tree replaced in this tree's work, sized by those reasons.
|
|
56
61
|
Post the verdict, with the folds you made, as one `dispatch comment` on your own issue (the
|
|
57
62
|
root, in a root session). Its first line is exactly `Red-team verdict for <root key>:`, with
|
|
58
63
|
the root's own key in place of the placeholder, so a reader can find it among the issue's
|
|
@@ -80,11 +85,10 @@ EOF
|
|
|
80
85
|
`gates.design: off`: the gate's opening starts the root's own first phase unless the root waits
|
|
81
86
|
on another issue, an open child under it or a `blocked_by` link to an issue that is not `done`,
|
|
82
87
|
so a child filed after that leaves the root working beside its children.
|
|
83
|
-
-
|
|
84
|
-
|
|
88
|
+
- A child may wait on a sibling's merge in the same repository with `--blocked-by`.
|
|
89
|
+
Release every child at once with `release_children`:
|
|
85
90
|
Legion holds a released child until its last blocker closes, and a child is inert only until it
|
|
86
|
-
is released.
|
|
87
|
-
request in; that work is written into the spec of the issue whose pull request carries it.
|
|
91
|
+
is released.
|
|
88
92
|
Each child the daemon starts takes an admission slot of its own, so four started children can
|
|
89
93
|
take four of the deployment's cap; when a child holds none, [Admission and the `legion` label](https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label) says.
|
|
90
94
|
- Never release a child `--blocked-by` its own parent: the parent now merges last, so that child
|
|
@@ -104,9 +108,11 @@ issue `LEGION-41`, role `architect` is `legion-acme-legion-41-architect`.
|
|
|
104
108
|
|
|
105
109
|
## Across repositories
|
|
106
110
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
Split a change across repositories into children, each in one repository.
|
|
112
|
+
Size their pull requests by the reasons above.
|
|
113
|
+
Create each child with:
|
|
114
|
+
`dispatch issue --project <project> --parent <root> --repo <owner/name> …`.
|
|
115
|
+
Choose the repository at creation, because the daemon fixes it when it records the child.
|
|
110
116
|
|
|
111
117
|
Release a child that depends on another repository's change only after that change's pull request
|
|
112
118
|
merges, because the child's work must build on the merged change. Name the merged commit in its
|