@sjawhar/opencode-legion-envoy 5.0.3 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/src/server.js",
@@ -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, not by what the system does. The
67
- engineering sentence names the change; the reader's sentence names who can do what today, what
68
- they will not be able to do after it, what still works, and what you cannot tell. It is a
69
- different sentence, not a shorter one — shortening keeps the nouns — and the test before
70
- sending is whether its first sentence has a human subject. Run it even on a sentence you have
71
- already simplified: a lead that names what a change does inside a system leaves the reader
72
- nothing to act on, and the same options and recommendation, led with who loses what, are
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 — and no slice or
255
- decision numbers, no coined nouns, no internal identifiers he has never used, no jargon you
256
- would have to define. If you cannot write it that way, you do not understand it well enough to ask.
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
- Never put file paths, line numbers, sequence numbers, document versions, or role tokens in the
294
- question; if the human needs that detail, anchor the ask to the document passage instead. Anchor a
295
- document question with `anchor: { artifact, quote, occurrence? }`; `occurrence`
296
- is zero-based and selects a repeated quote. A quote anchor is pinned to its lowest complete
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, and ask; the human's model comes out of those reactions, and so
42
- do corrections to it. Neither your model nor theirs is the starting truth.
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 human reads it.
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.