@sjawhar/pi-envoy 9.0.0 → 9.1.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 CHANGED
@@ -17300,10 +17300,7 @@ async function refuseOpenDecisionBlocks(client, tool, resolved) {
17300
17300
  const asks = new Map(documentAsks.map((ask) => [ask.block_id, ask]));
17301
17301
  const lines = version2.markdown.split(`
17302
17302
  `);
17303
- const stillOpen = (named, state) => {
17304
- const next = state === "answered" ? "fold the answer into the text" : "write the decision into the text";
17305
- return `${named}, ${state} but still open in version ${latest}: ${next} with dispatch doc-edit, which writes a version that carries it`;
17306
- };
17303
+ const stillOpen = (named, state) => state === "answered" ? `${named}, answered but still open in version ${latest}: it settles into a version on its own in about two seconds; wait, then request again` : `${named}, ${state} but still open in version ${latest}: write the decision into the text with dispatch doc-edit, which writes a version that carries it`;
17307
17304
  const open = blocks.flatMap((block) => {
17308
17305
  const ask = asks.get(block.id);
17309
17306
  const openers = lines.filter((line) => line.includes(`ask{#${block.id} `) || line.includes(`ask{#${block.id}}`));
@@ -17332,7 +17329,7 @@ async function refuseOpenDecisionBlocks(client, tool, resolved) {
17332
17329
  throw new Error([
17333
17330
  `dispatch ${commandName(tool)} was not called: ${artifact.name} (version ${latest}) has ${count}. Answering one writes a new version, which would move this request to that version and leave it waiting on you.`,
17334
17331
  ...open.map((line) => `- ${line}`),
17335
- "Do not request approval over an open block, even when a human asked for it. Tell the human which block is open and ask them to answer it or to waive it. Once it is answered, fold the answer into the text with dispatch doc-edit. If they waive it, close the block with dispatch resolve-ask (--kind resolved, their words as the --reason) and write their decision into the text with dispatch doc-edit. Then request approval again once the human has agreed to every point in the new version: the call opens the request, or hands an open one back to the human."
17332
+ "Do not request approval over an open block, even when a human asked for it. Tell the human which block is open and ask them to answer it or to waive it. Once it is answered, it settles into a version on its own in about two seconds; wait, then request again. Edit the document only where the answer changes design text outside the block, never to restate it. If they waive it, close the block with dispatch resolve-ask (--kind resolved, their words as the --reason) and write their decision into the text with dispatch doc-edit. Then request approval again once the human has agreed to every point in the new version: the call opens the request, or hands an open one back to the human."
17336
17333
  ].join(`
17337
17334
  `));
17338
17335
  }
@@ -82,20 +82,23 @@ a new version that keeps the human's own text, never a second "spec" artifact be
82
82
 
83
83
  - **Each open question is a decision block**, shaped and placed as [Decision blocks](#decision-blocks)
84
84
  says. Because it is an ask, it reaches the human's Inbox, and the answer lands next to its context.
85
- - **A settled point records the person's own words and the date**, quoted, so no reader mistakes
86
- it for your inference; an answer that is only a chosen option is recorded in the form
87
- `<name> chose "Commit author" on the question below (<date>)`, naming them from `dispatch whoami`
88
- or the conversation, or "the person" when the token names no owner — never a name you were not
89
- given. A point you inferred says so, with the reasoning — a security concern, a restriction, or
90
- a cost nobody measured is exactly this, not a settled constraint; during a live brainstorming
91
- conversation, `skill://dispatch-brainstorming` is stricter and keeps an inference out of the spec
92
- until the human has agreed to it. One carried in from another document keeps its provenance: an
93
- agent's inference there is marked one here, or stays out until the human raises it.
85
+ - **An answered decision block is itself the record of the decision.** It already renders the
86
+ person's chosen option and their own words, with who answered it and when; never add text
87
+ restating it. A point you inferred says so, with the reasoning — a security concern, a
88
+ restriction, or a cost nobody measured is exactly this, not a settled constraint; during a live
89
+ brainstorming conversation, `skill://dispatch-brainstorming` is stricter and keeps an inference
90
+ out of the spec until the human has agreed to it. One carried in from another document keeps its
91
+ provenance: an agent's inference there is marked one here, or stays out until the human raises
92
+ it.
93
+ - **A decision that arrives another way carries no rendered record.** A comment that answers a
94
+ question, a conversation, or a waiver is written into the text in the person's own words and the
95
+ date, quoted, naming them from `dispatch whoami` or the conversation, or "the person" when the
96
+ token names no owner — never a name you were not given.
94
97
  - **Sections follow the topic.** No heading is required and none has a fixed place; name each
95
98
  section for what it discusses.
96
- - **A changed point is rewritten, not appended to.** When an answer or a new fact changes the
97
- design, rewrite the text it changes and fold the answered decision into it; the document's
98
- versions keep the history.
99
+ - **A changed point is rewritten, not appended to.** When an answer or a new fact changes design
100
+ text outside its decision block, rewrite that text; the block stays where it is as the record of
101
+ the answer. The document's versions keep the history.
99
102
  - **No placeholders.** No TBD, TODO, or hedging ("might", "could consider"): an open item is a
100
103
  decision block, a technical decision your lane makes where the work happens, outside the spec,
101
104
  or, for a contract between two lanes, a question you settle with the other lane over Envoy (see
@@ -367,7 +370,7 @@ version, the way a pull-request review approves a commit, and any later version
367
370
  approval stale. A later version also moves an open request to that version and leaves it waiting
368
371
  on you until you request again, which hands the same request back to the human. Answering a
369
372
  decision block writes a new version, so request approval only when all three hold: every decision
370
- block is settled, which means answered and folded into the text, or waived as the next paragraph
373
+ block is settled, which means answered or waived as the next paragraph
371
374
  says; the human has agreed to every point in the spec; and the current version has not been
372
375
  approved. A Legion root spec under an armed design gate always goes to approval once all three
373
376
  hold (`skill://legion-architect`).
@@ -209,9 +209,10 @@ The command opens an approval ask with the options `Approve` and `Request change
209
209
  "Approve spec.md (version N)?" followed by the summary, where N is the document's latest version. It
210
210
  is refused, with nothing sent, while that version holds a decision block open, and the refusal
211
211
  names each block and its ask. An answer or a `dispatch resolve-ask` closes the ask at once but
212
- reaches a version only when the document settles, about two seconds later, or with your next
213
- `dispatch doc-edit`: fold the answer into the text (or, for a waiver, write the human's decision
214
- in) before you request. A block written in the last few seconds counts as open before Dispatch has
212
+ reaches a version only when the document settles, about two seconds later. An answered block
213
+ already carries its own record, so wait for that version rather than editing just to force one; a
214
+ waiver carries none, so write the human's decision into the text with your next `dispatch doc-edit`
215
+ before you request. A block written in the last few seconds counts as open before Dispatch has
215
216
  opened its ask. A document holds one open request. A new version moves it to that version, keeping
216
217
  its thread and summary, and leaves it waiting on you, as a human's reply in its thread does; a move
217
218
  your own edit made sends you no event, and `dispatch read` and `dispatch doc-read` show it as
@@ -72,17 +72,18 @@ are ones you checked.
72
72
  revise or hand back, reply with `--reply-to-ask <ask id> --turn agent` instead: a `--reply-to`
73
73
  reply takes the default turn, which hands the request back to the human unchanged, and a call
74
74
  with a corrected `--summary` is refused while it waits on them.
75
- 3. **Each next version folds the answers in and adds what they open.** Keep each answered
76
- decision block where it is, fold its answer into the surrounding text in the human's words with
77
- the date, recording the person as `skill://dispatch`'s "Writing a spec" says for a settled
78
- point. Then add the next sections, each with its question. Every question that is ready goes out
75
+ 3. **Each next version keeps answers in place and adds what they open.** An answered decision
76
+ block already carries its own record, as `skill://dispatch`'s "Writing a spec" says; leave it
77
+ where it is. Where an answer changes design text elsewhere in the spec, rewrite that text. Then
78
+ add the next sections, each with its question. Every question that is ready goes out
79
79
  at once, each as a decision block at the end of the section that sets it up; a question waits
80
80
  only when it depends on an answer still open.
81
- 4. **A comment that answers a question settles it** as surely as the block does. Fold it into the
82
- text at once, and close the block with `dispatch resolve-ask` if the human has not.
81
+ 4. **A comment that answers a question settles it** as surely as the block does. It carries no
82
+ rendered record, so write it into the text at once, recording the person as `skill://dispatch`'s
83
+ "Writing a spec" says, and close the block with `dispatch resolve-ask` if the human has not.
83
84
  5. **Request approval at the end, not after each section.** Once nothing in the spec is new to the
84
85
  human, request it exactly when "Approval of a spec" in `skill://dispatch` says: every decision
85
- block settled and folded in, the human has agreed to every point in the spec, and the current
86
+ block settled, the human has agreed to every point in the spec, and the current
86
87
  version is not yet approved (or waived, as that section's next paragraph covers). The request
87
88
  carries nothing new, as that section also says.
88
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {