@sjawhar/pi-legion-envoy 7.9.0 → 7.9.2
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/README.md +5 -4
- package/agents/plan-gap-analyst.md +20 -13
- package/dist/envoy.js +4 -1
- package/dist/legion.js +5 -2
- package/dist/skills/AGENTS.md +1 -1
- package/dist/skills/dispatch-first/SKILL.md +1 -1
- package/dist/skills/legion-worker/SKILL.md +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,10 +73,11 @@ package ships skills at `dist/skills` (not the plugin root itself), so the field
|
|
|
73
73
|
for every session — including a headless Legion controller — to see the Legion skills at all.
|
|
74
74
|
The tarball also ships `agents/`, the task agents Legion's prompts dispatch (`oracle`; the
|
|
75
75
|
reviewer's pair `thermonuclear-deep-review` and `thermonuclear-code-quality`; `deep-worker`,
|
|
76
|
-
which writes the implementer's code; and the planner's checks, `plan-gap-analyst` before it drafts
|
|
77
|
-
and `plan-reviewer` after), which Oh My Pi discovers
|
|
78
|
-
an installed plugin in a pane, the explicit `--extension` root in
|
|
79
|
-
model as a role the operator maps (`docs/kubernetes.md`,
|
|
76
|
+
which writes the implementer's code; and the planner's checks, `plan-gap-analyst` before it drafts,
|
|
77
|
+
which also reads a spec before a human does, and `plan-reviewer` after), which Oh My Pi discovers
|
|
78
|
+
under any extension package root: an installed plugin in a pane, the explicit `--extension` root in
|
|
79
|
+
a Sandbox pod. Each declares its model as a role the operator maps (`docs/kubernetes.md`,
|
|
80
|
+
"Model roles"). The skills those agents and the
|
|
80
81
|
role prompts load (the pair's rubrics, the implementer's `ce-simplify-code`) ship in
|
|
81
82
|
`dist/skills` with the rest. The Go daemon's boot gate and `legion probe-image` resolve every
|
|
82
83
|
`task(agent="…")` and every `skill://<name>` those prompts name through the same launch, and
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-gap-analyst
|
|
3
3
|
description: |
|
|
4
|
-
Pre-planning gap analyst. Read-only. Use before drafting a plan
|
|
5
|
-
ambiguities,
|
|
6
|
-
what
|
|
4
|
+
Pre-planning and spec gap analyst. Read-only. Use before drafting a plan, or before a spec reaches
|
|
5
|
+
a human: finds the hidden requirements, ambiguities, missing machine-checkable acceptance criteria,
|
|
6
|
+
and unsupported claims an issue or spec carries, each with what its author must answer.
|
|
7
7
|
# @oracle is the deployment's `oracle` model role; the Go daemon's boot gate refuses to start unless the operator's settings give
|
|
8
8
|
# this agent a model, through modelRoles.oracle or a task.agentModelOverrides entry for it (docs/kubernetes.md, Operator configuration).
|
|
9
9
|
model: ["@oracle"]
|
|
@@ -14,8 +14,9 @@ blocking: true
|
|
|
14
14
|
color: yellow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
You read an issue before its plan exists
|
|
18
|
-
the
|
|
17
|
+
You read an issue before its plan exists, or a spec before a human reads it, and find what it leaves
|
|
18
|
+
unsaid or asserts without support that would derail the work. You advise its author; the author
|
|
19
|
+
owns the document.
|
|
19
20
|
|
|
20
21
|
## What you look for
|
|
21
22
|
|
|
@@ -26,21 +27,27 @@ the plan. You advise the planner; the planner owns the plan.
|
|
|
26
27
|
and what each would cost.
|
|
27
28
|
3. **Acceptance a machine cannot check.** A criterion with no command, test, or request whose
|
|
28
29
|
expected output decides it, or a requirement with no criterion at all.
|
|
30
|
+
4. **Claims and requirements with no source.** A statement about how a system works today that the
|
|
31
|
+
code, its documentation or command output you were given does not show; and, when the caller
|
|
32
|
+
gave you the owner's words to check the document against, a requirement that traces to neither
|
|
33
|
+
them nor a cited fact. A requirement in a version a human approved has its source. Say what you
|
|
34
|
+
checked. You cannot run commands, so a claim about live state you cannot read is reported as
|
|
35
|
+
unverified, not as false.
|
|
29
36
|
|
|
30
37
|
Read the code and the repository's own documentation before you call something a gap. A gap the
|
|
31
38
|
issue, the code, or the documentation already answers is not a finding.
|
|
32
39
|
|
|
33
40
|
## What a finding contains
|
|
34
41
|
|
|
35
|
-
- **The gap**, quoting the
|
|
36
|
-
- **The evidence**: the file and line, or the
|
|
37
|
-
- **What the
|
|
38
|
-
acceptance gap, a check a machine could run. Say whether the code settles it or only the
|
|
42
|
+
- **The gap**, quoting the document's words where it has them.
|
|
43
|
+
- **The evidence**: the file and line, or the document's text, that shows it.
|
|
44
|
+
- **What the author must answer**: the question or decision the plan or spec has to settle and, for
|
|
45
|
+
an acceptance gap, a check a machine could run. Say whether the code settles it or only the
|
|
39
46
|
issue's owner can (a product choice).
|
|
40
47
|
|
|
41
|
-
Report the findings that change the
|
|
42
|
-
can settle in passing, and the design you would have chosen
|
|
43
|
-
the
|
|
48
|
+
Report the findings that change the work, the most work-changing first, and every finding of the
|
|
49
|
+
fourth kind. Style, edge cases the plan can settle in passing, and the design you would have chosen
|
|
50
|
+
are not findings. When nothing changes the work, say so in one line.
|
|
44
51
|
|
|
45
52
|
## Constraints
|
|
46
53
|
|
|
@@ -49,4 +56,4 @@ the plan, say so in one line.
|
|
|
49
56
|
tools: read with them if you need to, but write nothing through them — no issue, comment, ask,
|
|
50
57
|
message, suggestion or document edit, and nothing sent or published.
|
|
51
58
|
- Cite what you read. Anything you did not read is an assumption and is written as one.
|
|
52
|
-
- Do not write the plan.
|
|
59
|
+
- Do not write the plan or edit the document.
|
package/dist/envoy.js
CHANGED
|
@@ -33150,6 +33150,7 @@ function followsAsk(owner) {
|
|
|
33150
33150
|
return `You follow this ask: its answer and replies reach you directly. For every event on ${owner.label}: envoy_subscribe ${owner.topic}`;
|
|
33151
33151
|
}
|
|
33152
33152
|
var triageAdviceShown = new Set;
|
|
33153
|
+
var SPEC_CHECK_REMINDER = 'Has a fresh reader checked this spec? Each claim about how a system works today should trace to code read or a command run, and each requirement to the human\'s words or a cited fact. If not, have a fresh read-only subagent (`plan-gap-analyst` on Oh My Pi) check it now and fix what it finds. See the `dispatch-first` skill, "Design in the spec".';
|
|
33153
33154
|
function renderAdvice(tool, key, advice, opts) {
|
|
33154
33155
|
if (advice === undefined)
|
|
33155
33156
|
return [];
|
|
@@ -34403,6 +34404,7 @@ async function executeDispatchTool(input) {
|
|
|
34403
34404
|
return {
|
|
34404
34405
|
text: [
|
|
34405
34406
|
`Created ${created.key}: ${created.title} ${notSubscribed(issueTopic(created.key))}`,
|
|
34407
|
+
...spec === undefined ? [] : [SPEC_CHECK_REMINDER],
|
|
34406
34408
|
...adviceLines
|
|
34407
34409
|
].join(`
|
|
34408
34410
|
`),
|
|
@@ -34967,7 +34969,8 @@ ${trailer.join(`
|
|
|
34967
34969
|
const details = await followedAskDetails(client, result.ask, resolved.artifact);
|
|
34968
34970
|
const outcome = result.recorded ? `Approval requested for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}).` : `The approval request for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}) already waits on the human, so this call changed nothing: nothing since it last reached the human (a newer version, a human's reply in its thread, or your progress note) left it waiting on you.`;
|
|
34969
34971
|
return {
|
|
34970
|
-
text: `${outcome} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and an edit after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one
|
|
34972
|
+
text: `${outcome} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and an edit after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one.${result.recorded ? `
|
|
34973
|
+
${SPEC_CHECK_REMINDER}` : ""}`,
|
|
34971
34974
|
details: { ...details, artifact: resolved.artifact.id, version: result.version }
|
|
34972
34975
|
};
|
|
34973
34976
|
}
|
package/dist/legion.js
CHANGED
|
@@ -15905,6 +15905,7 @@ function followsAsk(owner) {
|
|
|
15905
15905
|
return `You follow this ask: its answer and replies reach you directly. For every event on ${owner.label}: envoy_subscribe ${owner.topic}`;
|
|
15906
15906
|
}
|
|
15907
15907
|
var triageAdviceShown = new Set;
|
|
15908
|
+
var SPEC_CHECK_REMINDER = 'Has a fresh reader checked this spec? Each claim about how a system works today should trace to code read or a command run, and each requirement to the human\'s words or a cited fact. If not, have a fresh read-only subagent (`plan-gap-analyst` on Oh My Pi) check it now and fix what it finds. See the `dispatch-first` skill, "Design in the spec".';
|
|
15908
15909
|
function renderAdvice(tool, key, advice, opts) {
|
|
15909
15910
|
if (advice === undefined)
|
|
15910
15911
|
return [];
|
|
@@ -17158,6 +17159,7 @@ async function executeDispatchTool(input) {
|
|
|
17158
17159
|
return {
|
|
17159
17160
|
text: [
|
|
17160
17161
|
`Created ${created.key}: ${created.title} ${notSubscribed(issueTopic(created.key))}`,
|
|
17162
|
+
...spec === undefined ? [] : [SPEC_CHECK_REMINDER],
|
|
17161
17163
|
...adviceLines
|
|
17162
17164
|
].join(`
|
|
17163
17165
|
`),
|
|
@@ -17722,7 +17724,8 @@ ${trailer.join(`
|
|
|
17722
17724
|
const details = await followedAskDetails(client, result.ask, resolved.artifact);
|
|
17723
17725
|
const outcome = result.recorded ? `Approval requested for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}).` : `The approval request for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}) already waits on the human, so this call changed nothing: nothing since it last reached the human (a newer version, a human's reply in its thread, or your progress note) left it waiting on you.`;
|
|
17724
17726
|
return {
|
|
17725
|
-
text: `${outcome} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and an edit after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one
|
|
17727
|
+
text: `${outcome} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and an edit after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one.${result.recorded ? `
|
|
17728
|
+
${SPEC_CHECK_REMINDER}` : ""}`,
|
|
17726
17729
|
details: { ...details, artifact: resolved.artifact.id, version: result.version }
|
|
17727
17730
|
};
|
|
17728
17731
|
}
|
|
@@ -18028,7 +18031,7 @@ function endInjectedUserTurns(sessionID) {
|
|
|
18028
18031
|
// package.json
|
|
18029
18032
|
var package_default = {
|
|
18030
18033
|
name: "@sjawhar/pi-legion-envoy",
|
|
18031
|
-
version: "7.9.
|
|
18034
|
+
version: "7.9.2",
|
|
18032
18035
|
license: "Apache-2.0",
|
|
18033
18036
|
type: "module",
|
|
18034
18037
|
omp: {
|
package/dist/skills/AGENTS.md
CHANGED
|
@@ -9,7 +9,7 @@ event intake, process lifecycle, credentials, and role delivery.
|
|
|
9
9
|
| `ce-simplify-code/` | the implementer, once per pull request | the behaviour-preserving simplify pass, in the implementer's first implementing round (Legion's copy of the MIT-licensed Compound Engineering skill; `LICENSE` beside it) |
|
|
10
10
|
| `dispatch/` | every role, and any session writing to Dispatch | specs, asks, comments, artifacts, and messages on native Dispatch |
|
|
11
11
|
| `dispatch-brainstorming/` | any session with Dispatch that starts a design conversation or writes a plan, as `dispatch-first` directs | the design conversation in the issue's spec, turn by turn to one approval, and the plan as the issue's `plan.md`; in a session with Dispatch it replaces superpowers' `brainstorming` and `writing-plans` |
|
|
12
|
-
| `dispatch-first/` | every session with Dispatch configured, injected by each host plugin on every request (Oh My Pi), on every `SessionStart` (startup, resume, clear, compact, fork) and `SubagentStart` (Claude Code), or as an instruction file (OpenCode) | searching Dispatch before acting, extending the existing issue, citing decisions, closing duplicates; kept under 60 lines and 6,000 characters |
|
|
12
|
+
| `dispatch-first/` | every session with Dispatch configured, injected by each host plugin on every request (Oh My Pi), on every `SessionStart` (startup, resume, clear, compact, fork) and `SubagentStart` (Claude Code), or as an instruction file (OpenCode) | searching Dispatch before acting, extending the existing issue, citing decisions, closing duplicates, the fresh-reader check before a spec reaches a human; kept under 60 lines and 6,000 characters |
|
|
13
13
|
| `envoy/` | every role | subscriptions, agent-to-agent messages, and topic formats |
|
|
14
14
|
| `legion-architect/` | root and sub-architects | tree ownership, decomposition, waves, gates, integration, sign-off |
|
|
15
15
|
| `legion-controller/` | the controller root process | wake routing, keeping the admission slots full from `todo`, the daily report, escalation |
|
|
@@ -50,7 +50,7 @@ found yourself.
|
|
|
50
50
|
A design conversation with a person, or the implementation plan that follows one, uses
|
|
51
51
|
`skill://dispatch-brainstorming`: read it before your first design question on a change, the spec,
|
|
52
52
|
or that plan. It replaces superpowers' `brainstorming` and `writing-plans` here, even when the user
|
|
53
|
-
invokes one by name. A Legion architect's own issue spec follows `skill://legion-architect`.
|
|
53
|
+
invokes one by name. A Legion architect's own issue spec follows `skill://legion-architect`. Before a spec's first version and each approval request, have a fresh read-only subagent (on Oh My Pi, `task(agent="plan-gap-analyst")`) check it against the code, the human's words and any command output a claim rests on, and resolve what it flags.
|
|
54
54
|
|
|
55
55
|
## Load the full skill before you write
|
|
56
56
|
|
|
@@ -386,7 +386,11 @@ It pushes `@-` through the provisioned credential helper, which authenticates as
|
|
|
386
386
|
which pushes skip CI and which commit-message keywords it refuses. While the head commit carries
|
|
387
387
|
`skip-checks: true`, a pull-request body edit alone starts no GitHub workflow run, so a check that
|
|
388
388
|
re-judges the body re-runs on that head only after a later push; on a code head the same edit
|
|
389
|
-
re-runs it at once.
|
|
389
|
+
re-runs it at once. While the pull request conflicts with its base (GitHub shows it
|
|
390
|
+
`CONFLICTING`), no workflow triggered `on: pull_request` runs for any of its activity types, so
|
|
391
|
+
a body edit re-judges nothing there either; a push cures both, but only once the pull request is
|
|
392
|
+
mergeable, so the implementer forward-merges a conflicting one first (*Reintegrating the base* in
|
|
393
|
+
`skill://legion-worker/references/conflicts-and-rewrites.md`). Its ancestry check refuses
|
|
390
394
|
unless `@-` descends from `legion/<KEY>@origin` (or the branch is not on GitHub yet): every issue
|
|
391
395
|
workspace shares one clone, so another role's push moves `legion/<KEY>@origin` here at once, and
|
|
392
396
|
a push that did not descend from it would move the remote branch sideways onto your commit and
|