@sjawhar/pi-envoy 17.31.1 → 17.31.3

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/envoy.js CHANGED
@@ -47722,7 +47722,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
47722
47722
 
47723
47723
  // package.json
47724
47724
  var name = "@sjawhar/pi-envoy";
47725
- var version2 = "17.31.1";
47725
+ var version2 = "17.31.3";
47726
47726
  var package_default = {
47727
47727
  name,
47728
47728
  version: version2,
@@ -62,8 +62,7 @@ agent-secrets LEGION_SLACK_BOT_TOKEN -- \
62
62
  ```
63
63
 
64
64
  Your own shell expands `$LEGION_SLACK_BOT_TOKEN` before `agent-secrets` runs, and in your shell that
65
- name is empty. Measured on 2026-11-04 from a Legion issue pod: Slack answered
66
- `{"ok":false,"error":"not_authed"}`. What the client hands over — the value, or the placeholder of
65
+ name is empty. Slack then answers `{"ok":false,"error":"not_authed"}`. What the client hands over — the value, or the placeholder of
67
66
  a secret behind the airlock — exists only in the environment of the command the client starts, so
68
67
  that command must read it itself. Put the command in single quotes, inside
69
68
  `sh -c`, where the quotes keep the expansion for the child, and give `curl` the header on standard
@@ -75,12 +74,6 @@ agent-secrets LEGION_SLACK_BOT_TOKEN -- \
75
74
  sh -c 'printf "Authorization: Bearer %s" "$LEGION_SLACK_BOT_TOKEN" | curl -sS -H @- https://slack.com/api/auth.test'
76
75
  ```
77
76
 
78
- The repository uses the same form for a GitHub App token in `docs/deployment.md`:
79
-
80
- ```sh
81
- agent-secrets LEGION_IMPLEMENT_APP --reason=… -- sh -c 'printf %s "$LEGION_IMPLEMENT_APP"'
82
- ```
83
-
84
77
  ## A secret behind the airlock
85
78
 
86
79
  Your deployment can hold a secret's value back and give your command a stand-in. You see it in the
@@ -131,13 +124,42 @@ Your transcript keeps everything a command prints.
131
124
 
132
125
  - Never echo or print the value, and never run `curl -v`, `curl --trace` or a shell with `set -x`
133
126
  around it: each of those writes the header, and so the value, to your output.
134
- - Check a value's shape by its length and its prefix alone. For a secret behind the airlock, that
135
- reads the placeholder's shape and not the value's:
127
+ - Check a plain value's shape by its length and its prefix alone:
136
128
 
137
129
  ```sh
138
130
  agent-secrets NAME --reason 'check the shape of this credential' -- sh -c 'echo "${#NAME}"; case "$NAME" in ghp_*) echo prefix-ok;; *) echo prefix-no;; esac'
139
131
  ```
140
132
 
133
+ - A value may be a JSON document, with the credential one level down or deeper: a GitHub App
134
+ secret asked for without `--github-token` is the JSON object of installations, and its tokens
135
+ are inside it. Check a JSON value's shape by its key paths and the length of each leaf, and
136
+ never by printing a leaf. A probe that masks one key prints every other key's value, the
137
+ nested ones too, so print no value at all, masked or not. These print the key paths, then each
138
+ leaf's path with its length. For a value that is not JSON, jq exits 5 and writes
139
+ `jq: error (at <unknown>): the value is not JSON` to stderr (jaq writes
140
+ `Error: "the value is not JSON"`), and nothing of the value: `try … catch` keeps jq's own parse
141
+ error out, which quotes the text (`… (while parsing '<the value>')`):
142
+
143
+ ```sh
144
+ agent-secrets NAME --reason 'check the shape of this credential' -- \
145
+ jq -n 'env.NAME | try fromjson catch error("the value is not JSON") | [paths(type != "object" and type != "array") | join(".")]'
146
+ agent-secrets NAME --reason 'check the shape of this credential' -- \
147
+ jq -n 'env.NAME | try fromjson catch error("the value is not JSON") | [paths(type != "object" and type != "array") as $p | {path: ($p | join(".")), length: (getpath($p) | tostring | length)}]'
148
+ ```
149
+
150
+ - Take a credential out of a JSON value inside the command, and pass it on there without
151
+ printing it. `jq -e` exits 1 when the path holds nothing, so the command stops rather than
152
+ sending an empty credential:
153
+
154
+ ```sh
155
+ agent-secrets NAME --reason '…' -- sh -c '
156
+ token=$(printf %s "$NAME" | jq -er ".path.to.token" 2>/dev/null) || { echo "no token at .path.to.token" >&2; exit 1; }
157
+ curl -sS -H "Authorization: Bearer $token" https://api.example.com/'
158
+ ```
159
+
160
+ For a GitHub App secret, `--github-owner <account> --github-token` hands the command that one
161
+ account's token under the secret's name, with no JSON to take apart.
162
+ - For a secret behind the airlock, every one of these reads the placeholder and not the value.
141
163
  - Compare two values only as equal or not equal. Never print, slice or diff their characters.
142
164
 
143
165
  ## Read the answer, not the status alone
@@ -236,8 +258,7 @@ A session on a person's own development box is not a pod, and `agent-secrets ide
236
258
  for two reasons:
237
259
 
238
260
  - **The machine is not logged in.** `agent-secrets machine login-status` prints `issued` only while
239
- the machine holds its credential. The person logs the machine in; step 4b of `docs/joining.md` in
240
- theorem-labs/agent-infra, "Log the VM in to the secrets broker", is that step.
261
+ the machine holds its credential. The person logs the machine in, as `/legion/broker/guides/log-a-machine-in/` in the documentation site shows.
241
262
  - **The agent is not a broker session.** The helper knows only the process tree it registered. The
242
263
  person restarts the agent as one:
243
264
  `agent-secrets register --wait 10 --exec -- <the agent's command>`.
@@ -269,8 +290,7 @@ agent-secrets LEGION_SLACK_BOT_TOKEN --reason 'read the thread of a Slack mentio
269
290
  --data-urlencode limit=200'
270
291
  ```
271
292
 
272
- Measured on 2026-11-04 from a Legion issue pod: it exited 0 and answered `"ok": true` with the 12
273
- messages of the thread. A `ts` that names no message answers
293
+ It exits 0 and answers `"ok": true` with the messages of the thread. A `ts` that names no message answers
274
294
  `{"ok":false,"error":"thread_not_found"}`, also at exit 0, which is why the body decides and not the
275
295
  status. A thread read needs the app's `channels:history` scope in a public channel and
276
296
  `groups:history` in a private one; without them Slack answers `missing_scope`, which only a person
@@ -8,13 +8,11 @@ description: "Use when you are asked to judge an approval request: a Dispatch re
8
8
  An approval request names one or more documents at a version and asks whether that version may
9
9
  stand. Your verdict is a prediction about a person: would the person whose approval requests this
10
10
  deployment serves approve this version, or ask for changes? It is not a judgement of your own about
11
- how good the document is. A document you would have written differently is one that person approves
12
- most weeks. A document you find complete is one they send back in a sentence.
11
+ how good the document is. A document you would have written differently may be one that person
12
+ approves. A document you find complete may be one they send back.
13
13
 
14
14
  Two things follow. Judge the document against what that person decides, not against your taste. And
15
- read the measurement below before you tell anybody what one of your verdicts is worth: the round
16
- that measured this work found no recipe that beats approving everything, so nothing here lets you
17
- decide an approval for anybody.
15
+ nothing here lets you decide an approval for anybody.
18
16
 
19
17
  ## What you never decide
20
18
 
@@ -50,149 +48,10 @@ is no rule. The reference's one question is what keeps the two costs apart.
50
48
  where the words barely moved. Where the version you can read is not the version named, say so and
51
49
  decide nothing.
52
50
 
53
- ## What was measured, and what it means
54
-
55
- One round, on 2026-11-12: 27,540 judgements over 459 cases and 12 arms, each arm one model and one
56
- information recipe, every arm over the same cases. The cases are drawn from that person's own
57
- answered decisions, from a corpus pinned at event 396,268 and cut at 2026-11-05; the scored cases
58
- were answered at or after that cut, so no recipe was built from them. The numbers below are the 250
59
- approval cases of the report slice, five judgements per case, the modal verdict counted.
60
-
61
- The baseline is approving everything: on those 250 cases that agrees with the person 0.792 of the
62
- time (198 of 250). Each arm is paired against it over the same cases.
63
-
64
- **Every interval in this file is two-sided at 90 per cent unless the line quoting it names another
65
- level, and the level is said here, before the first table, because one run's verdict turns on
66
- it.** The arms table below and the six runs further down state exact McNemar intervals, one arm or
67
- one run each; the pooled figures state bootstrap intervals. The three upper bounds under "No arm
68
- reached the rate the person set" are one-sided, and say so where they are quoted.
69
-
70
- | arm | agreement | against the baseline |
71
- | --- | --- | --- |
72
- | many-shot-fable-5-1 | 0.780 (195 of 250) | −0.012 in [−0.037, +0.017], McNemar p 0.607 |
73
- | many-shot-opus-5-5 | 0.772 (193) | −0.020 in [−0.049, +0.014], p 0.383 |
74
- | both-opus-5-5 | 0.736 (184) | −0.056 in [−0.095, −0.011], p 0.038 |
75
- | bare-opus-5-5 | 0.656 (164) | −0.136 in [−0.165, −0.093], p 0.000 |
76
- | distilled-opus-5-5 | 0.492 (123) | −0.300 in [−0.362, −0.228], p 0.000 |
77
- | distilled-jev | 0.280 (70) | −0.512 in [−0.592, −0.422], p 0.000 |
78
-
79
- Read in order, that says four things.
80
-
81
- **No arm beat approving everything.** The two best are indistinguishable from it; every other arm is
82
- worse than it, and most by a wide margin.
83
-
84
- **No arm reached the rate the person set.** The rate is one disagreement in twenty. No arm of the
85
- twelve fitted a threshold that holds it: the lowest bound any confidence band of any arm reaches is
86
- 0.279, and coverage at that rate is zero for all twelve. Nor does any shortcut reach it. No stratum
87
- of the person's own decisions holds a request-changes rate under 5 percent — the lowest bound is
88
- 0.130, over 8.6 percent of the volume — and no consensus across model families reaches it either:
89
- the best is many-shot with all three models agreeing, coverage 0.824 at a bound of 0.229, where
90
- approving everything on those same cases disagrees at 0.184. Those three bounds — 0.279, 0.130
91
- and 0.229 — are one-sided Clopper-Pearson upper bounds at 90 per cent, not two-sided intervals:
92
- each says the rate is at most that number and says nothing about how low it is.
93
-
94
- **Retrieval is the one thing that helped, and the measurement that says so is of stateless calls
95
- rather than of an agent.** The many-shot recipe, which puts the nearest past decisions in front of
96
- the model, is worth 0.116 more agreement than the bare recipe on the same model: 0.772 against
97
- 0.656. Both of those arms are one model call with no tools, so what the number supports is the
98
- information and not a way of working. The step below is how you get it.
99
-
100
- **The written distillation made agreement worse, and the error it adds has one direction.** The
101
- errors of the two distilled arms are lopsided: `distilled-opus-5-5` made 105 false requests for
102
- changes against 22 false approvals, and `distilled-jev` 177 against 3. A written distillation of
103
- what makes a person ask for changes reads, to a model given it as instructions, as a list of reasons
104
- to ask for changes, so the model asks for changes.
105
-
106
- So this skill does not tell you that you may decide an approval for anyone. It tells you what to
107
- read, what never to decide, and what the measurement supports. Where a deployment wants verdicts
108
- decided without a person, the number it must beat is 0.792 on these cases, and nothing measured here
109
- beats it.
110
-
111
- One rule was validated: the never-decide rule above held 60 of 60 cases of a set written blind and
112
- met once, against 15 of 60 for the pattern-matching version it replaced, and it decided every
113
- ordinary document rather than holding them too.
114
-
115
- **What this text is worth depends on whether the agent reading it can retrieve, and one run of
116
- that comparison cannot tell you.** A fresh agent was given this skill and nothing else and judged
117
- 250 of the person's approval decisions; the same agent with no skill at all judged the same 250,
118
- on `claude-opus-5-5`, one judgement per case. The comparison was run **six times**, nothing
119
- changed between the runs of one build, and this is what the six printed:
120
-
121
- | run | skill arm | control | paired difference | what the program called it | the skill it read |
122
- | --- | --- | --- | --- | --- | --- |
123
- | 1 | 0.668 (167) | 0.588 (147) | +0.080 in [+0.040, +0.109] | passes | `586bb99f` |
124
- | 2 | 0.644 (161) | 0.620 (155) | +0.024 in [−0.018, +0.063] | fails | `19029752` |
125
- | 3 | 0.688 (172) | 0.640 (160) | +0.048 in [+0.007, +0.082] | passes | `19029752` |
126
- | 4 | 0.700 (175) | 0.636 (159) | +0.064 in [+0.019, +0.101] | passes | `19029752` |
127
- | 5 | 0.652 (163) | 0.644 (161) | +0.008 in [−0.034, +0.048] | fails | `19029752` |
128
- | 6 | 0.676 (169) | 0.628 (157) | +0.048 in [+0.008, +0.080] | passes | `abcffa20` |
129
-
130
- **Four passes and two failures over the same 250 cases, the same two arms and the same model.**
131
- The six runs read three builds of this text, which differ in this section and nowhere else, and
132
- the four runs of one build, `19029752`, are themselves two passes and two failures. The runs
133
- differ by 0.072, which is about the width of one run's own interval, so no single run of this
134
- comparison carries a number worth recording. Both arms move together, because the noise is the
135
- model's own run and is shared by them; what survives it is the paired difference, and it survives
136
- only when each case is averaged over the runs.
137
-
138
- **So the number this skill records is the pooled one: +0.036 in [+0.010, +0.063], over the four
139
- runs of build `19029752`, the only build of this text more than one run read.** Each of the 250
140
- cases carries the mean of its outcome over those four runs, the estimate is the mean of the 250
141
- case-level differences, and the interval is a paired bootstrap of 20,000 resamples of those
142
- differences under seed 7, **two-sided at 90 per cent**. The bootstrap holds the runs fixed, so it
143
- carries none of the 0.056 those four runs spread over. Quote it with that spread or not at all.
144
-
145
- **The number this skill records is the same at either level**: read at 95 per cent off the same
146
- draw it is +0.036 in [+0.005, +0.068], which still excludes zero. Of the six runs, two hold zero
147
- at both levels — runs 2 and 5, the two the program already called failures at 90 — and
148
- **run 3 holds zero at 95 per cent and not at 90**: its interval is [+0.007, +0.082] at 90 and
149
- [−0.00002, +0.087] at 95, so at the stricter level the table would read three passes and three
150
- failures. Read that margin before you quote it: run 3 does not clear zero at 95 per cent by any
151
- distance a reader should weigh, it touches it, and "three and three" is a fact about the fourth
152
- decimal of one run. Which is the argument for the sentence above rather than against it — no
153
- single run's verdict is the finding, the recorded number is the pooled one, and it does not move.
154
- A paired bootstrap over the same six runs agrees with these intervals on every row but that one,
155
- which is the row sitting on the line rather than two instruments that disagree.
156
- `pool-runs.ts` prints both levels at every reading, drawn from one set of resamples under one
157
- seed, so the two differ by the level and by nothing else.
158
-
159
- **The other three numbers in the table, and what each of them is.** `586bb99f` and `abcffa20`
160
- were read by one run each, +0.080 in [+0.040, +0.109] and +0.048 in [+0.008, +0.080]. Those are
161
- single runs' own numbers, which the paragraph above says are not worth recording, and they are
162
- here because they are all those two builds have. Over all six runs the reading is +0.045 in
163
- [+0.022, +0.070], which is a number of no build at all, since a number pooled over runs of three
164
- builds is a number of none of them; it is worth having as the wider evidence that the three agree,
165
- and it is not a number to quote on its own.
166
-
167
- **The last column is the build each run read, and no run of this comparison can ever be of the
168
- bytes you are reading**, because writing a measured number into a file changes the file. That is
169
- why the figures are read per build at all. The three builds differ in this section and nowhere
170
- else. Leaving out the two runs of the other builds lowers the number from +0.045 to +0.036, which
171
- is the direction that costs this text rather than flatters it.
172
- `scripts/approval-eval/pool-runs.ts` reads each run's own copy of this file, groups the runs by
173
- its hash and prints all of that, so nothing above is a hash or a direction anybody typed.
174
-
175
- **And the second shape, which measures something else.** With the nearest past decisions placed in
176
- a file beside each case and both arms told of it, both reached 0.784 (196 of 250), a difference of
177
- +0.000 in [−0.024, +0.024]. The agent without this skill read that file unprompted in every case
178
- it was watched on, so both arms performed the retrieval recipe: that comparison is of this text on
179
- top of behaviour the model already has.
180
-
181
- Neither shape measures the 0.116 above: the first gives the recipe to neither arm and the second
182
- to both, and no agent on that machine could retrieve live. What the pair says is that this text is
183
- worth a few points of agreement to an agent that cannot retrieve, and nothing measurable to one
184
- already doing what the text describes.
185
-
186
- Read the numbers together before you quote any of them. The never-decide rule has its own evidence
187
- and it is strong. The retrieval recipe's 0.116 is real and is of stateless calls. This text's own
188
- gain against nothing is +0.036 in [+0.010, +0.063], over the four runs of the one build of it that
189
- more than one run read, and those four runs spread over 0.056; it is zero against an agent already
190
- retrieving.
191
-
192
51
  ## The retrieval step
193
52
 
194
- This is the many-shot recipe as a method, with the `dispatch` command and nothing else. It is the
195
- part the measurement supports.
53
+ This is the many-shot method: it puts the nearest past decisions of the person in front of you, with
54
+ the `dispatch` command and nothing else.
196
55
 
197
56
  1. Write the case in a sentence or two of its own words: what the document asks for, in the terms it
198
57
  uses. That is your query.
@@ -206,8 +65,8 @@ part the measurement supports.
206
65
  4. Judge the case with those decisions in front of you, and say how many you found. A case with two
207
66
  neighbours is not a case with eight.
208
67
 
209
- Two filters make the number honest, and dropping either turns the method into a way of reading the
210
- answer off the board:
68
+ Two filters keep the method honest, and dropping either turns it into a way of reading the answer
69
+ off the board:
211
70
 
212
71
  - **Only decisions the person answered before the case you are judging.** A later decision is
213
72
  information you would not have had, and a method that uses one cannot be run live.
@@ -216,26 +75,10 @@ answer off the board:
216
75
  That is the label, not a neighbour. Drop every hit on the judged document or issue, however near,
217
76
  and count how many you dropped.
218
77
 
219
- In the round, retrieval dropped 1,920 neighbours for sitting on the judged case's own ground, and no
220
- scored row carried a neighbour naming the judged case's own document at any version.
221
-
222
- ## The distillation
223
-
224
- `skill://approval-review/references/reviewer-principles.md` is the written distillation: what makes
225
- that person approve, what makes them ask for changes, what they always want said, and the tone they
226
- refuse. It quotes the person and keeps their wording, so leave its text as it stands rather than
227
- correcting its words to this repository's house style.
228
-
229
- Read it as evidence about what that person decides on, which is what it is good for, and which is
230
- useful to a person learning the same ground. Do not treat it as a checklist to run a document
231
- against. Given to a model as its instructions it made agreement fall — 0.492 against the bare
232
- recipe's 0.656 on the same model, and 0.280 on the model that took it hardest — and it made the
233
- model ask for changes far more often than the person does. The numbers are in the section above.
234
-
235
78
  ## The share that still reaches the person
236
79
 
237
80
  If a deployment ever turns deciding on, a share of what the agent would decide goes to the person
238
- anyway. That share is the measurement that never stops, so it has to look like every other request:
81
+ anyway. That share is a measurement that never stops, so it has to look like every other request:
239
82
 
240
83
  - The sampled requests are unmarked. Nothing in a request, its wording, its order or its timing says
241
84
  that this one was sampled.
@@ -246,11 +89,3 @@ anyway. That share is the measurement that never stops, so it has to look like e
246
89
 
247
90
  Until a deployment turns deciding on, every request goes to the person and the agent's verdict is a
248
91
  record of what it would have answered.
249
-
250
- ## What this skill does not tell you
251
-
252
- That agreement measured on past decisions holds on next week's documents. Everything above is read
253
- off decisions the person had already made, over one corpus and one cut. A person's view moves, the
254
- documents put in front of them change, and the one thing no record holds is the spec nobody wrote
255
- because its author expected a refusal. Treat every number here as a reading of that round, and
256
- nothing more.
@@ -11,7 +11,7 @@ under and you hand it back to the person.
11
11
 
12
12
  **Does the document ask for the act, or does it only mention it?**
13
13
 
14
- A request of this corpus is a technical document, and a technical document is full of deletions,
14
+ A request is often a technical document, and a technical document is full of deletions,
15
15
  credentials, vendors and organization settings that it only describes. Describing is not asking.
16
16
  Ask yourself what follows from a person writing "approved" under this document as it stands:
17
17
 
@@ -104,7 +104,7 @@ Every topic starts with `notifications.`.
104
104
  Envoy also subscribes you to the lifecycle subject `pr.<n>`, which NATS `>` alone does not match, because `>` needs one or more trailing tokens.
105
105
 
106
106
  - Read the `warnings` that `envoy_subscribe` returns, and confirm the active topics with `envoy_list`.
107
- A warning names the spelling Envoy publishes, or a token that is not a GitHub topic kind; fix the topic it names.
107
+ A warning names the spelling Envoy publishes, a token that is not a GitHub topic kind, or a pull request's bare subject `pr.<n>` that no topic of yours extends to its reviews; fix the topic it names.
108
108
  "No GitHub event ... in the stream's retention window" means nothing came from that repository in the last 72 hours:
109
109
  check that the GitHub App that sends Envoy its webhooks is installed on that repository before you rely on a wake.
110
110
 
@@ -144,12 +144,7 @@ Every topic starts with `notifications.`.
144
144
  Neither a kept answer nor an error releases the role's claim: a holder whose `holder_state` is `unresponsive` keeps its role.
145
145
  `envoy_role_get(role=...)` finds the holder first.
146
146
  The forward is kept on the holder's inbox, so the holder's session gets it once from its own durable consumer, also after a restart, a reconnect, or while it was not running.
147
- From a shell with no tool device, read the holder with `envoy role <role>` where sjawhar/dotfiles' `scripts/envoy` is on the PATH, and in a Legion pod, which has no `envoy` command, with `curl -sS -H @<(printf 'Authorization: Bearer %s' "$(< "$ENVOY_TOKEN_FILE")") "$ENVOY_URL/v1/roles/<role>" | jq -r '.holder // .reason // .error'` in bash (the `<(...)` keeps the token out of `curl`'s arguments), which prints the holder's session id, `unclaimed` for a role nobody holds, or the error of a refused read, such as `unauthorized` for a bad token.
148
-
149
- - A message that must reach more than 4 role topics is the project controller's to send, not yours.
150
- Each publish wakes a session, and a woken session reads its whole context again, which the provider charges as uncached input: a mean of 576,083 tokens a wake, a median of 493,636 and a ninetieth percentile of 1,327,888.
151
- The controller is also the one session that can read whether a wave of wakes is already running, and a fan-out sent into a daemon restart or a pod roll is what puts an Anthropic organization over its per-minute uncached-input cap.
152
- Send the controller the topics and the text, and it sends them at its own rate (`skill://legion-controller`).
147
+ From a shell with no tool device, such as one in a Legion pod, read the holder with `curl -sS -H @<(printf 'Authorization: Bearer %s' "$(< "$ENVOY_TOKEN_FILE")") "$ENVOY_URL/v1/roles/<role>" | jq -r '.holder // .reason // .error'` in bash (the `<(...)` keeps the token out of `curl`'s arguments), which prints the holder's session id, `unclaimed` for a role nobody holds, or the error of a refused read, such as `unauthorized` for a bad token.
153
148
 
154
149
  - For a team, the group subscribes to `notifications.team.<name>.>`, and any member publishes to `notifications.team.<name>.all`.
155
150
  Envoy's stream keeps a team topic, so a publish returns once it is stored and every session that follows the topic gets it once from its own consumer
@@ -6,8 +6,6 @@ description: "Use before any text reaches a person outside the company: a commen
6
6
  # A message to someone outside the company
7
7
 
8
8
  The operator approves every message that leaves the company, and four steps come before you ask.
9
- The rules below are the operator's own, from the answers that set them; this skill is where they
10
- are written down.
11
9
 
12
10
  ## The exclusions
13
11
 
@@ -19,8 +17,7 @@ answer names such a project, and your stream's brief is where that answer reache
19
17
  answer for the project in front of you, there is no exclusion.
20
18
 
21
19
  **A pull request to a project that has already enrolled**, with its description and its comments to
22
- that project's maintainers. The operator does not want to be asked for approval every time for an
23
- enrolled project, and ceremony around a pull request must not stop the work. The four steps still
20
+ that project's maintainers. The four steps still
24
21
  apply. The approval ask does not. The work does not wait for the pull request either: prepare and
25
22
  sign the changes locally, and send them when the work they belong to ends.
26
23
 
@@ -54,8 +51,7 @@ reputation for low-quality or careless submissions.
54
51
  do: a reader of the same model as the writer is the weaker check, though no measurement here
55
52
  separates the two.
56
53
 
57
- **Step 4 ends with a list of what it removed, and that list goes in the ask.** An instruction alone
58
- does not make the cut happen, so the list is what proves it did: three lines naming what came out,
54
+ **Step 4 ends with a list of what it removed, and that list goes in the ask.** The list is what proves the cut happened: three lines naming what came out,
59
55
  or the sentence "the reviewer removed nothing", which is itself an answer.
60
56
 
61
57
  **The text the operator approves is the text the reviewer cut, byte for byte.** Any edit after the
@@ -74,8 +70,7 @@ cover how the text reads.
74
70
  ## Then the ask
75
71
 
76
72
  **Put the full message text in the ask itself.** Not a link to a document holding it, not a summary
77
- of it, not "the draft is at …". The operator has to open another document to read the message in
78
- almost every one of these asks, and cannot judge the message from the ask.
73
+ of it, not "the draft is at …". A link makes the operator open another document, and the operator cannot judge the message from the ask.
79
74
 
80
75
  An ask for an outside message has, in this order:
81
76
 
@@ -5,8 +5,7 @@ description: "Use before you send or publish any text a person reads: an ask, a
5
5
 
6
6
  # Say the literal thing
7
7
 
8
- The operator made this a rule: delete the empty verb phrases agents keep using, and say the literal
9
- thing instead.
8
+ Delete the empty verb phrases agents keep using, and say the literal thing instead.
10
9
 
11
10
  Run this over your text before you send it. It takes a minute and it is not optional.
12
11
 
@@ -23,8 +22,7 @@ Run this over your text before you send it. It takes a minute and it is not opti
23
22
 
24
23
  A fresh session that has only what the reader has removes what the reader does not need, and lists
25
24
  every term it cannot define. Fix each listed term. A reviewer that reads only to approve has not
26
- done this step, and an instruction alone did not make it happen, so the two lists are what show it
27
- ran. The check runs on the text going to the reader, never on the instructions you give that
25
+ done this step, so the two lists are what show it ran. The check runs on the text going to the reader, never on the instructions you give that
28
26
  session or on what it sends back, which would never end.
29
27
 
30
28
  ## The test
@@ -32,7 +30,7 @@ session or on what it sends back, which would never end.
32
30
  Take the verb phrase out and ask: **what literally happens?** Write that. If you cannot say what
33
31
  happens, you did not know, and the phrase hid it from you as well as from the reader.
34
32
 
35
- ## The phrases, commonest first
33
+ ## The phrases
36
34
 
37
35
  | Never | What to write |
38
36
  |---|---|
@@ -43,12 +41,12 @@ happens, you did not know, and the phrase hid it from you as well as from the re
43
41
  | carry it to X, carry the finding | tell X; send it to X; put it on the issue |
44
42
  | this shows the gap, the number shows | the gap is 12 of 30; the number is 1.17 |
45
43
 
46
- The rows are in the order agents write them, so look for the first row first: you reach for "land"
44
+ You reach for "land"
47
45
  when you cannot say whether the thing merged, released or deployed. If you can say which, say it.
48
46
  If you cannot, that is the sentence — "it is approved and not merged" — and it is more useful than
49
47
  any verb.
50
48
 
51
- On the "name the X" row an instruction alone does not work, so use the test: delete "name". If the
49
+ On the "name the X" row, use the test: delete "name". If the
52
50
  sentence then says what happens, keep it that way; if it says nothing, you had not decided the
53
51
  action, so decide it and write it.
54
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "17.31.1",
3
+ "version": "17.31.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {
@@ -1,54 +0,0 @@
1
- This file tells a judging agent how the reviewer decides, and it is drawn from his decisions made before 2026-11-05.
2
-
3
- ## What makes him approve
4
-
5
- 1. **Standard practice.** He approves designs that use the documented, widely used solution for the problem, and he rejects hand-rolled scripts, proxies and tunnels that do the same job. To a "which option" ask he answers "do the standard thing," and any deviation needs a stated reason.
6
- 2. **Root-cause fix at the right layer.** He approves changes that remove a guard, workaround, hack or polling sleep and fix the cause, even when the hack works today. Fork changes must go upstream, become an extension, or be dropped, never held in the fork.
7
- 3. **Obvious or already-settled fixes.** He approves a fix to a plain bug or a task he already assigned. He also complains that it reached him at all.
8
- 4. **Parallel work.** He approves running independent lines of work at once across the available agents. He removes any ordering, waves or agent caps that are not true dependencies.
9
- 5. **Staged and measured steps.** He approves doing the safe part now, measuring it, then extending, and he approves gathering real data to settle a choice that would otherwise be argued. A prototype or time-boxed test passes if it has a defined metric and takes nothing from committed work.
10
- 6. **Rejected part gone, scope narrowed.** He approves once the revision deletes what he objected to and narrows to what he asked for. A pure reversion should be framed as only that.
11
- 7. **Cleanup after reading.** He approves deleting unused resources, branches, machines and stale issues. Someone must first read the items and keep what is still useful.
12
- 8. **Better than the baseline.** He accepts output that differs from upstream behaviour when the difference is a fix. He does not demand bug-for-bug copies.
13
- 9. **Delegation to an independent review.** He approves a long or urgent spec without reading it if an independent adversarial red-team will check it. The author may then apply agreed changes without coming back.
14
-
15
- ## What makes him ask for changes
16
-
17
- 10. **Asks within the agent's authority.** He rejects asks for logins, credential grants, permissions, merges, restarts, approvals, disk space or reply drafting, and points to the broker or an agent on the dev box ("I am not the gate"). He acts at once, tersely, only on what a person alone can do, such as a console click, a login code or an app install.
18
- 11. **Invented rules or blockers.** He orders deleted any rule, limit, ban, embargo, approval gate or access restriction he never set, and any text that makes his words stricter. The agent must check its premise first.
19
- 12. **Unasked code, checks and work.** He rejects new merge checks, string-matching guards, scripts, gates, speculative fixes and absolute bans written into code that he did not ask for. For a behaviour problem, an instruction or short skill must be tried and shown to fail first, built so it is cheap to delete.
20
- 13. **Repeat asks.** He rejects re-asking an answered question, asking about something he already did, or asking to re-approve corrected text. He expects his earlier general criteria applied to new cases.
21
- 14. **Deferral and waiting.** He rejects "out of scope," follow-up issues that hide unfinished work, parked or half-built parts, and pauses until others act. Every supported runtime gets the same behaviour and proof now, work continues locally, and deferral is fine only when he offers it.
22
- 15. **Long text.** Asks, specs, descriptions and outside messages over a paragraph come back as too long. He wants one sentence or bullets, with reasoning in a linked document.
23
- 16. **Fragmented asks and decisions pushed to him.** He rejects asks split across issues or documents, duplicate issues, per-item choice lists, and requests that he pick thresholds or names the data should settle. He wants one plan in one place, built with peers, after looking at data and transcripts first.
24
- 17. **Weak method or shortcuts on integrity.** He rejects evals and experiments that cannot prove or refute the claim, such as those with missing controls, confounds, leaked answers, an easier proxy question, or only easy cases. He also rejects graders that credit work failing the spec, redefined goals, and caches that let stale output pass.
25
- 18. **Small or oversized targets.** He rejects easy trims while the largest waste remains, and modest goals when a far better one is obvious. He also rejects proof schemes far larger than needed, calling both sandbagging or waste.
26
- 19. **Wrong target, priority or audience.** He says drop or close work he judges unimportant now, and he redirects work aimed at the wrong audience or at other people's machines and habits when the problem is "ours." Designs decided without discussing them with him go back to the start.
27
- 20. **Unready or unchecked requests.** He rejects requests sent before revisions, own checks and every comment are done, and designs not checked against real users' workflows and delivered artifacts. A UI design needs a mock-up or a running stub he can try.
28
- 21. **Judgement in the orchestrator.** He rejects a central daemon that decides merges, reads CI, guards rules or routes requests. It should be a plain state machine that relays events, with judgement left to agents and policy left to repository settings.
29
-
30
- ## What he always wants said
31
-
32
- 22. **Outside text that passed the full process.** Outside text must show research into the audience's conventions, templates, history and style. It must also pass simplified English, anti-slop, cross-model red-team and fresh-reader passes, contain only tested code, and carry no codenames, internal process, empty verbs, unfinished-sounding wording or present-versus-future caveats.
33
- 23. **Measured numbers tied to the top metric.** He wants real figures, with unmeasured costs measured rather than flagged and speedups stated against total runtime. Each figure should show its effect on throughput of real output at controlled cost, and numbers the reader cannot use, such as prices, IDs and hashes, should be struck.
34
- 24. **What the problem is and why.** When he cannot follow a project he wants an explainer: what existed, what changed, the target, the distance left, and why act. The root cause must come from transcripts and logs by asking further whys, not from a restated symptom.
35
- 25. **Full eval write-ups, surfaced to him.** A report needs the question, design and controls, evidence for and against, a test that could refute each claim, graphs, code and data, red-team results, and a home people will find. He does not count a deliverable as done until it is shown to him.
36
- 26. **Configurable, modular parts.** He wants per-project settings where the right value is uncertain, and optional components not every deployment must carry. Deployment-specific logic is added separately, not built into a general tool's core.
37
- 27. **A recovery path.** He wants the least disruptive recovery tried first, a report only after it fails, and a break-glass path for emergency changes.
38
-
39
- ## What he never accepts
40
-
41
- 28. **A rejected option returning.** He refuses any option he already rejected, even when it is reworded.
42
- 29. **Personal, ad hoc or duplicated infrastructure.** He refuses personal logins, keys or machines used as workarounds, as well as hand-minted credentials, standalone tunnels, cron jobs or units on the dev box, and new repositories for small tools. He wants service accounts or federated identity with no shared passwords, one source of truth, and nothing public that could stay private.
43
- 30. **Restricted team access.** He refuses guards that keep engineers from shared data or secrets they should have, data pools split by model, and tools limited to his machines. Only root or seed credentials and new applications need his approval.
44
-
45
- ## How he writes and what tone he refuses
46
-
47
- - He writes short, blunt, often profane replies, often a single imperative such as "Drop this," "So fix it" or "Close this."
48
- - He also dictates long run-on passages that end in a principle, and he expects it applied everywhere, not turned into a narrow rule.
49
- - He quotes fragments of the text to aim at the exact sentence, and asks rhetorical questions such as "Why did this come to me?"
50
- - He thanks only for real progress or a useful sanity check, and he says plainly when he was wrong.
51
- - He refuses on tone alone any approval-seeking, hedged or soothing document with long caveats, option menus or repeated asks.
52
- - He refuses dense, padded, agent-styled prose that buries the decision, coins terms he cannot parse, or reads like private notes.
53
- - He refuses crisis framing of a non-issue, invented risks, and defensive excuses about scope, blockers or dependencies.
54
- - He accepts short documents that open with the decision, give numbers, and state what is unproven.