@sjawhar/opencode-legion-envoy 5.0.2 → 5.0.4
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/package.json +2 -1
- package/skills/AGENTS.md +2 -2
- package/skills/dispatch/SKILL.md +20 -19
- package/skills/dispatch/references/brainstorming.md +3 -2
- package/skills/dispatch/references/examples.md +31 -2
- package/skills/thermonuclear-code-quality/LICENSE +21 -0
- package/skills/thermonuclear-deep-review/LICENSE +21 -0
package/package.json
CHANGED
package/skills/AGENTS.md
CHANGED
|
@@ -15,8 +15,8 @@ event intake, process lifecycle, credentials, and role delivery.
|
|
|
15
15
|
| `legion-oracle/` | any role doing research | repository-grounded research |
|
|
16
16
|
| `legion-retro/` | the implementer, at retro | the pre-merge retrospective and its Dispatch message |
|
|
17
17
|
| `legion-worker/` | planner, implementer, tester, reviewer, merger | the phase contracts: handoffs, GitHub identity, PR body and READY discipline, the merge-gate order |
|
|
18
|
-
| `thermonuclear-code-quality/` | the `thermonuclear-code-quality` agent | the maintainability rubric of the reviewer's pair |
|
|
19
|
-
| `thermonuclear-deep-review/` | the `thermonuclear-deep-review` agent, and the reviewer (the Security Guidelines) | the correctness rubric of the reviewer's pair, with its tagged, diff-triggered Security Guidelines and the attack on the PR body's claims |
|
|
18
|
+
| `thermonuclear-code-quality/` | the `thermonuclear-code-quality` agent | the maintainability rubric of the reviewer's pair (adapted from the MIT-licensed Thermos plugin in `cursor/plugins`; `LICENSE` beside it) |
|
|
19
|
+
| `thermonuclear-deep-review/` | the `thermonuclear-deep-review` agent, and the reviewer (the Security Guidelines) | the correctness rubric of the reviewer's pair, with its tagged, diff-triggered Security Guidelines and the attack on the PR body's claims (adapted from the MIT-licensed Thermos plugin in `cursor/plugins`; `LICENSE` beside it) |
|
|
20
20
|
|
|
21
21
|
The owning skill above is where each contract is defined; a role prompt that needs a contract from its own seat points there or restates only its own step. This file lists and does not restate.
|
|
22
22
|
A Legion prompt (a skill here, a role prompt, or an agent definition in `packages/pi-envoy/agents/`) names a task agent only as `task(agent="<name>")` and a skill it tells the model to load only as `skill://<name>`. Those are the two forms the Go daemon's boot gate and `legion probe-image` resolve through Oh My Pi, refusing by name one it cannot find; a dispatch or a load written any other way goes unchecked. An agent or skill Legion's prompts name is shipped here or in `packages/pi-envoy/agents/`, unless Oh My Pi bundles it.
|
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ after `skill://dispatch/` is relative to this skill's base directory.
|
|
|
30
30
|
| find who answers an ask, edit, retract or resolve one, reply with the turn, or follow a thread | [Asks after they open](skill://dispatch/references/asks.md) |
|
|
31
31
|
| catch up after a restart, trace what cites a node, or write a `dispatch://` reference | [Reading back](skill://dispatch/references/reading.md) |
|
|
32
32
|
| answer a BTW, Aside or Steer frame, or a message from the Agents page | [Targeted and direct messages](skill://dispatch/references/messages.md) |
|
|
33
|
-
| see a worked ask, a message not to send, and where a draft goes | [Before and after](skill://dispatch/references/examples.md) |
|
|
33
|
+
| see a worked ask, a reply that names its mechanism, a message not to send, and where a draft goes | [Before and after](skill://dispatch/references/examples.md) |
|
|
34
34
|
| set up a token, or call a route the tools do not cover | [Authentication and the HTTP API](skill://dispatch/references/api.md) |
|
|
35
35
|
|
|
36
36
|
## Design changes are brainstormed here
|
|
@@ -55,6 +55,11 @@ not share this session's vocabulary, and is often on a phone. Write for that per
|
|
|
55
55
|
|
|
56
56
|
- Plain English, full sentences, one idea per sentence. Never repo shorthand or nouns you coined:
|
|
57
57
|
not "fix 8c", "READY-target", "PR B", "spec@v3", "the pair", "the packet" — say what the thing is.
|
|
58
|
+
- A real name is not a coined noun: name a product, a tool and its operation
|
|
59
|
+
(`dispatch_request_approval`), an event type (`artifact.approved`), a route, a setting or a
|
|
60
|
+
status exactly, and say how it works in a clause ("the daemon opens the gate when Dispatch emits
|
|
61
|
+
`artifact.approved` for that document at that version"), never with a vague verb such as
|
|
62
|
+
"notice", "accept", "tell" or "pick up" ([before and after](skill://dispatch/references/examples.md#naming-the-mechanism)).
|
|
58
63
|
- Expand every identifier the first time it appears: an issue key gets its title, a PR number its
|
|
59
64
|
title, a file what it is for, a session id who it is. Link a URL rather than pasting a bare id.
|
|
60
65
|
- A question lives in the spec or discussion it came from, placed as
|
|
@@ -63,15 +68,13 @@ not share this session's vocabulary, and is often on a phone. Write for that per
|
|
|
63
68
|
the recommendation with its reason. It asks how to solve the problem or which outcome is wanted;
|
|
64
69
|
never enumerate choices in the question. The options carry the genuinely different approaches.
|
|
65
70
|
Each option has a label, and its description says what that approach costs.
|
|
66
|
-
- Describe a change by what its reader stands to lose
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
answerable at once. Where the judgment rule below applies, the judgment leads and this rule
|
|
74
|
-
shapes the sentence under it.
|
|
71
|
+
- Describe a change first by what its reader stands to lose — who can do what today, what they
|
|
72
|
+
will not be able to do after it, what still works, and what you cannot tell — then by what the
|
|
73
|
+
system does, each mechanism named exactly. The reader's sentence is a different sentence, not a
|
|
74
|
+
shorter engineering one: shortening keeps the system as its subject. Test that the first sentence
|
|
75
|
+
has a human subject, even on a sentence you already simplified; a lead naming what a change does
|
|
76
|
+
inside a system leaves the reader nothing to act on. Where the judgment rule below applies, the
|
|
77
|
+
judgment leads and this rule shapes the sentence under it.
|
|
75
78
|
- Before posting, test it: could Sami, reading only this text on his phone, know what he is being
|
|
76
79
|
told or asked? If not, rewrite it. Length is not the problem; density is.
|
|
77
80
|
- When an ask or message communicates a judgment, lead with that judgment in one sentence and put the mechanism underneath it. Do not make the reader ask a second time whether the result is a win. This shapes communication only when a judgment exists; it does not pre-decide an open question or remove its genuine options.
|
|
@@ -251,9 +254,9 @@ Every `dispatch_ask` passes four gates first:
|
|
|
251
254
|
this issue before, but whether it asks him to re-report something he has already answered.
|
|
252
255
|
3. **Can someone who has not read the code answer it on a phone?** Write it as
|
|
253
256
|
[Writing for the human](#writing-for-the-human) says — who can do what today and what changes
|
|
254
|
-
for them, then two options with what each costs and your recommendation —
|
|
255
|
-
decision numbers, no coined nouns,
|
|
256
|
-
|
|
257
|
+
for them, then two options with what each costs and your recommendation — with no slice or
|
|
258
|
+
decision numbers, no coined nouns, and each real tool, event, route or setting named exactly with
|
|
259
|
+
what it does. If you cannot write it that way, you do not understand it well enough to ask.
|
|
257
260
|
4. **Is it outside what he has already told you he wants?** If not, that want is settled, and so
|
|
258
261
|
is every choice inside it his words do not make: build it and ask nothing about it or beside it
|
|
259
262
|
until it is delivered, whatever the ask says about the build. Afterwards, ask only about a choice his own
|
|
@@ -290,10 +293,10 @@ References belong in the question text; `ref` is sugar that appends its `dispatc
|
|
|
290
293
|
|
|
291
294
|
An ask is read on a phone by someone who has not read the code. Write its question and options as
|
|
292
295
|
[Writing for the human](#writing-for-the-human) says, and apply its phone test before posting.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
document question with `anchor: { artifact, quote, occurrence? }`; `occurrence`
|
|
296
|
-
|
|
296
|
+
No file path, line number, sequence number, document version or role token leads the question; the
|
|
297
|
+
evidence under it may cite one where the reader would check it, or anchor the ask to the passage.
|
|
298
|
+
Anchor a document question with `anchor: { artifact, quote, occurrence? }`; `occurrence` is
|
|
299
|
+
zero-based and selects a repeated quote. A quote anchor is pinned to its lowest complete
|
|
297
300
|
containing block while retaining its quote as display text, so rewording the passage keeps it
|
|
298
301
|
attached; a quote spanning top-level blocks, and existing anchors without a block, stay readable
|
|
299
302
|
against their original document version if their quote disappears.
|
|
@@ -312,8 +315,6 @@ issue's comments. The rules:
|
|
|
312
315
|
pointers an ask may carry are a `dispatch://` reference or a document `anchor`, and they cite —
|
|
313
316
|
the ask still says in one line what the reader will find there and can be answered without
|
|
314
317
|
following them.
|
|
315
|
-
- Expand every term the reader has not used first. A product name, an internal setting, an
|
|
316
|
-
acronym, a value you coined this session — write what it is in the ask, in his words.
|
|
317
318
|
- A runbook the human must execute is one ask per step, each self-contained: what to do, where,
|
|
318
319
|
what result proves it, and options that name the step's outcomes. Each later step opens only
|
|
319
320
|
after the previous is answered and states that step's verified result in one line ("Step 1
|
|
@@ -38,8 +38,9 @@ goes out at once, whatever its stage.
|
|
|
38
38
|
## Coming to terms
|
|
39
39
|
|
|
40
40
|
The conversation comes to terms in both directions. Explain what the code does today, plainly
|
|
41
|
-
enough for the human to react to
|
|
42
|
-
|
|
41
|
+
enough for the human to react to and with each tool, event and route it uses named exactly (as
|
|
42
|
+
"Writing for the human" in `skill://dispatch` says), and ask; the human's model comes out of those
|
|
43
|
+
reactions, and so do corrections to it. Neither your model nor theirs is the starting truth.
|
|
43
44
|
|
|
44
45
|
## A worked example
|
|
45
46
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# Before and after: an ask, a message, and a draft
|
|
1
|
+
# Before and after: an ask, a reply, a message, and a draft
|
|
2
2
|
|
|
3
3
|
`skill://dispatch` sends you here for worked examples: a decision written as clickable options, a
|
|
4
|
-
message that should not be sent, and a draft placed where the
|
|
4
|
+
reply that names its mechanism, a message that should not be sent, and a draft placed where the
|
|
5
|
+
human reads it.
|
|
5
6
|
|
|
6
7
|
## Before / after
|
|
7
8
|
|
|
@@ -95,3 +96,31 @@ dispatch_ask({
|
|
|
95
96
|
],
|
|
96
97
|
})
|
|
97
98
|
```
|
|
99
|
+
|
|
100
|
+
## Naming the mechanism
|
|
101
|
+
|
|
102
|
+
Before — a reply explaining a design paraphrases its tool, its route and its event away, so the
|
|
103
|
+
reader has to ask which tool, and how Legion "notices" anything:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
Today, when a spec is ready, the architect tells Legion so with a dedicated call on its Legion
|
|
107
|
+
tool, and Legion then waits for your approval. This change removes that call, because Legion will
|
|
108
|
+
notice your approval of the spec by itself.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
After — the reader's sentence first, then each mechanism by its real name, with how it works in a
|
|
112
|
+
clause:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
For you nothing changes: you still click Approve on the spec. What goes is a step the architect
|
|
116
|
+
takes today: it calls `register_gate` on its `legion` tool, which posts to the daemon's
|
|
117
|
+
`POST /legion/v1/gates/register` route and names the spec document and the version that gate the
|
|
118
|
+
tree. The daemon opens the gate when Dispatch emits `artifact.approved` for that document at that
|
|
119
|
+
version, which Dispatch does when you click Approve on the request the architect opened with
|
|
120
|
+
`dispatch_request_approval`. Without `register_gate`, the daemon reads the issue's primary
|
|
121
|
+
document from Dispatch itself and waits for the same event.
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
"A dedicated call", "tells" and "notice" each stood for something the reader can search for, find
|
|
125
|
+
in a log, or set. None is a noun anyone coined, so each is named; the clause after each name is
|
|
126
|
+
what keeps the reply readable on a phone.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cursor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cursor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|