@sjawhar/opencode-legion-envoy 9.3.0 → 9.5.0
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/dist/dispatch.js +4152 -3806
- package/dist/src/server.js +3068 -3054
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +4 -4
- package/skills/dispatch-first/SKILL.md +2 -2
- package/skills/dispatch-writing-specs/SKILL.md +5 -5
- package/skills/legion-architect/references/decomposition.md +9 -1
- package/skills/legion-retro/SKILL.md +1 -1
- package/skills/legion-worker/references/findings.md +19 -15
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -18,15 +18,15 @@ Dispatch is a record for the people who decide, never a log of your work.
|
|
|
18
18
|
|
|
19
19
|
```md
|
|
20
20
|
:::ask{urgency="med"}
|
|
21
|
-
|
|
21
|
+
Which machines, files or people, the numbers, then "A happens to X, or B to Y?" Recommendation: the option and its reason.
|
|
22
22
|
|
|
23
23
|
- Option one: what it costs.
|
|
24
24
|
- Option two: what it costs.
|
|
25
25
|
:::
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
- A to-do or permission only a person can give, or a decision with no document, is a `dispatch ask`.
|
|
29
|
-
- In Legion,
|
|
28
|
+
- A to-do or permission only a person can give, or a decision with no document, is a `dispatch ask`.
|
|
29
|
+
- In Legion, fix a clear defect in code your tree uses, hand others to the controller, and ask about decisions (`skill://legion-worker/references/findings.md`).
|
|
30
30
|
- An open ask is the request. Do not raise it again in each message.
|
|
31
31
|
- Change an open ask's block with `dispatch edit-ask`, or `doc-edit`'s `replace` or `move`. An answered ask is fixed: ask anew.
|
|
32
32
|
- Answer a person's reply to an open ask with `dispatch comment --reply-to-ask`; `--turn agent` for a note that needs nothing from them.
|
|
@@ -54,7 +54,7 @@ A claim delivers no comments: that turn, `dispatch issue-update --route session:
|
|
|
54
54
|
|
|
55
55
|
## Structure over stream
|
|
56
56
|
|
|
57
|
-
- One issue per deliverable, its content the issue's document. Decisions are asks.
|
|
57
|
+
- One issue per deliverable, its content the issue's document. Decisions are asks.
|
|
58
58
|
- A message replies to a person or tells them what they must know now.
|
|
59
59
|
- Text a person must read to decide belongs in the spec. An artifact is a real file.
|
|
60
60
|
|
|
@@ -27,7 +27,7 @@ dispatch search --query 'reviewer threads OR review comments'
|
|
|
27
27
|
- **Work already tracked:** put the finding on that issue. File a new issue only when no hit covers the work, and cite the nearest one you ruled out (`dispatch://KEY`).
|
|
28
28
|
- **Question already decided:** the answered ask is the record. Cite it (`dispatch://KEY/ask/<id>`). Do not ask again.
|
|
29
29
|
- **Duplicate found:** keep the issue with the spec, copy to it what only the duplicate has, and close the duplicate (`--status done --reason 'Duplicate of dispatch://KEY.'`). When it has the `legion` label or another holder's claim, comment the kept issue's name on it instead.
|
|
30
|
-
- **Each ask and message stands alone:** the reader sees only that text.
|
|
30
|
+
- **Each ask and message stands alone:** the reader sees only that text. Name the concrete case (which machines, files, people, numbers), ask the choice in its terms, and recommend.
|
|
31
31
|
- In Legion, file no finding outside your issue (`skill://legion-worker/references/findings.md`).
|
|
32
32
|
|
|
33
33
|
## Reach a person only through Dispatch
|
|
@@ -42,6 +42,6 @@ A person does not watch your chat. Reach them through an ask, an ask block or an
|
|
|
42
42
|
| Before you | Read |
|
|
43
43
|
| --- | --- |
|
|
44
44
|
| run your first `dispatch` command in this session | `skill://dispatch` |
|
|
45
|
-
| write or change a spec, or write an ask, comment or message a person reads | `skill://dispatch-writing-specs`
|
|
45
|
+
| write or change a spec, or write an ask, comment or message a person reads | `skill://dispatch-writing-specs` |
|
|
46
46
|
| plan work whose spec a person approved | superpowers' `writing-plans`, stored as the issue's `plan.md` (`skill://dispatch-writing-specs`, "The plan") |
|
|
47
47
|
| write a Legion architect's own spec | `skill://legion-architect` too |
|
|
@@ -7,7 +7,7 @@ description: "Use in a session with Dispatch before you write or change a spec,
|
|
|
7
7
|
|
|
8
8
|
## The aim
|
|
9
9
|
|
|
10
|
-
Reach shared understanding with the person at the least cost of their time. A Legion phase worker writes no spec
|
|
10
|
+
Reach shared understanding with the person at the least cost of their time. A Legion phase worker writes no spec (`skill://legion-worker`).
|
|
11
11
|
|
|
12
12
|
## The outline
|
|
13
13
|
|
|
@@ -32,19 +32,19 @@ For each spec, ask, comment and message:
|
|
|
32
32
|
- Write in `skill://asd-ste100`'s strict mode.
|
|
33
33
|
- State the current design, never how people reached it.
|
|
34
34
|
- Link each source where the person wrote it: `dispatch://KEY/comment/<id>`, `/ask/<id>`, `/message/<id>`, or a Slack URL. With no link, state the design.
|
|
35
|
-
- Write about the design, never the person. Never quote people
|
|
35
|
+
- Write about the design, never the person. Never quote people or upload their words.
|
|
36
36
|
- Name your session only if a reader must reach it.
|
|
37
37
|
- Keep only text that helps a reader understand, decide, build, check.
|
|
38
|
-
- Explain each name or term a new reader may not know. Name an issue by its `dispatch://` link, and say in a clause what it does for this reader.
|
|
38
|
+
- Explain each name or term a new reader may not know. Name an issue by its `dispatch://` link, and say in a clause what it does for this reader.
|
|
39
39
|
- In an ask, ask block, comment or message, name a requirement or check by what it is, never its number.
|
|
40
40
|
|
|
41
41
|
## Questions
|
|
42
42
|
|
|
43
|
+
- Name the concrete case first: which machines, files, sessions or people, and the numbers. Then ask the choice in those terms, never "Which option?": a reader cannot work back from a general question to the case.
|
|
43
44
|
- Propose an answer to each point, numbers included, with a reason.
|
|
44
45
|
- A choice inside what the person asked for, or one their messages favour, is settled: decide it.
|
|
45
46
|
- Ask only for the person's authority, taste or risk appetite, when options differ on what they care about.
|
|
46
|
-
- Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks)
|
|
47
|
-
- Chat reaches nobody: use an ask or approval request.
|
|
47
|
+
- Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks): 2 to 4 options with costs, your recommendation, answerable on a phone.
|
|
48
48
|
|
|
49
49
|
## Each version
|
|
50
50
|
|
|
@@ -27,10 +27,18 @@ child waits in your tree until Legion starts it.
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
dispatch issue --project <project> --parent <root issue> --title '<child outcome>' --spec-file - <<'EOF'
|
|
30
|
-
<
|
|
30
|
+
<the child's spec, written as skill://dispatch-writing-specs says, scaled to the child>
|
|
31
31
|
EOF
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
- Write each child's spec as `skill://dispatch-writing-specs` says, scaled to the child: its
|
|
35
|
+
outline (`Summary` through `Acceptance`, a few sentences a part for a small child), a proposed
|
|
36
|
+
answer to each point, each term a new reader may not know explained, no item number from another
|
|
37
|
+
document (name a requirement of the root by what it says), and no text copied from the root that
|
|
38
|
+
does not apply to this child. The child's workers read only this spec.
|
|
39
|
+
- Before `dispatch issue` creates each child, paste its whole spec into a fresh
|
|
40
|
+
`task(agent="plan-gap-analyst")` to check it against `skill://dispatch-writing-specs`, and fix
|
|
41
|
+
what it flags: your own reread misses the terms and item numbers you already know.
|
|
34
42
|
- `--project` is the issue key's prefix before `-<n>` (`LEGSMOKE-3` → `LEGSMOKE`).
|
|
35
43
|
- In a root session `$LEGION_ISSUE` is the root (it equals `$LEGION_TREE`): pass it as `--parent`.
|
|
36
44
|
The daemon makes the sub-issue link from `--parent`.
|
|
@@ -82,7 +82,7 @@ missing proof goes back as step 1 says. The Dispatch message (step 7) is for a f
|
|
|
82
82
|
Dispatch's message limit, and ends with your attribution footer:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
dispatch message --issue
|
|
85
|
+
dispatch message --issue '<KEY>' --body-file - <<'EOF'
|
|
86
86
|
## Retro Complete
|
|
87
87
|
|
|
88
88
|
**Learnings documented in:** docs/solutions/<path>.md, or none: <why no point qualified>.
|
|
@@ -57,7 +57,8 @@ says which), its first line exactly `Clear defect from <your role token>`. It pr
|
|
|
57
57
|
`expects_reply: none`. It holds:
|
|
58
58
|
|
|
59
59
|
- your role token, from your `Legion addressing` line
|
|
60
|
-
- the defect,
|
|
60
|
+
- the defect: what went wrong, where and to whom, with the numbers, and the issue it came from
|
|
61
|
+
(`dispatch://<KEY>`)
|
|
61
62
|
- where the fix belongs: the repository and the component
|
|
62
63
|
- the fix
|
|
63
64
|
- the evidence comment, `dispatch://<REPORT KEY>/comment/<id>`
|
|
@@ -132,39 +133,42 @@ check's `Production:` line then names the finding as sent to the controller, or
|
|
|
132
133
|
|
|
133
134
|
## What the ask says
|
|
134
135
|
|
|
135
|
-
The question stands alone, since the ask view shows no comment. It holds at most
|
|
136
|
+
The question stands alone, since the ask view shows no comment. It holds at most 2,000 characters,
|
|
136
137
|
the `Ref: <reference>` line `--ref` appends included (about 75 characters for a comment's
|
|
137
138
|
reference). Its first line names who asks: `Clear defect from <your role token>` for a clear
|
|
138
139
|
defect no controller took, else `Finding from <your role token>`. The architect's acceptance and the
|
|
139
|
-
controller's catch-up find a finding ask by that line. Then it
|
|
140
|
+
controller's catch-up find a finding ask by that line. Then it names the concrete case before any
|
|
141
|
+
general statement of it:
|
|
140
142
|
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
+
- what went wrong, where and to whom: the issue it came from (`dispatch://<KEY>`), the machine,
|
|
144
|
+
file, command or session, and the numbers;
|
|
145
|
+
- where the fix would belong: the repository and component, and a plain statement that it is not
|
|
143
146
|
Legion's when it is not. A problem is not Legion's because you work in Legion: name the
|
|
144
147
|
component that misbehaved;
|
|
145
|
-
- the decision a person must make,
|
|
146
|
-
controller took carries the fix instead, and its
|
|
147
|
-
`Hand it to the owning tree` first and recommended.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
comment <id>`, and cite that comment with `--ref`, the one reference an ask
|
|
148
|
+
- the decision a person must make, what happens to whom under each option, and your
|
|
149
|
+
recommendation and its reason. A clear defect no controller took carries the fix instead, and its
|
|
150
|
+
options ask where the work goes, with `Hand it to the owning tree` first and recommended.
|
|
151
|
+
|
|
152
|
+
Evidence the decision does not need (full command output, logs, every file and line, the pull
|
|
153
|
+
request) goes in a comment. Post it first as a `dispatch comment` on the issue the ask goes on,
|
|
154
|
+
which prints `Posted comment <id>`, and cite that comment with `--ref`, the one reference an ask
|
|
155
|
+
takes. That issue,
|
|
152
156
|
`<ASK KEY>` below, is the report issue, except as [When no controller takes
|
|
153
157
|
it](#when-no-controller-takes-it) says:
|
|
154
158
|
|
|
155
159
|
```bash
|
|
156
|
-
dispatch comment --issue <ASK KEY> --body-file - <<'EOF'
|
|
160
|
+
dispatch comment --issue '<ASK KEY>' --body-file - <<'EOF'
|
|
157
161
|
<the evidence: commands, output with its time, file:line, links>
|
|
158
162
|
EOF
|
|
159
163
|
# Keep `File it for Legion` only when your Legion addressing line lists the repository where the
|
|
160
164
|
# fix belongs. For a clear defect no controller took, replace the `File an issue` option below with
|
|
161
165
|
# 'Hand it to the owning tree: <the tree, when you know it>', the first option and recommended.
|
|
162
|
-
dispatch ask --issue <ASK KEY> --ref 'dispatch://<ASK KEY>/comment/<id>' --question-file - \
|
|
166
|
+
dispatch ask --issue '<ASK KEY>' --ref 'dispatch://<ASK KEY>/comment/<id>' --question-file - \
|
|
163
167
|
--option 'File an issue: <what it would track, and who would own it>' \
|
|
164
168
|
--option 'File it for Legion: Legion works it once it is filed' \
|
|
165
169
|
--option 'Do not file: <what stays as it is>' <<'EOF'
|
|
166
170
|
Finding from <your role token>
|
|
167
|
-
<
|
|
171
|
+
<what went wrong, where and to whom, with dispatch://<KEY> and the numbers; where the fix belongs, and that it is not Legion's when it is not; what each option does to whom; your recommendation and why>
|
|
168
172
|
EOF
|
|
169
173
|
```
|
|
170
174
|
|