@staix/agent-hub 0.52.0 → 0.54.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.
Files changed (196) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +4 -3
  3. package/docs/addons/open-code-review.md +3 -6
  4. package/docs/agent-notes/README.md +1 -1
  5. package/docs/agent-notes/adapters.md +5 -4
  6. package/docs/agent-notes/budget.md +2 -2
  7. package/docs/agent-notes/bus.md +1 -0
  8. package/docs/agent-notes/daemon.md +6 -5
  9. package/docs/agent-notes/models.md +1 -1
  10. package/docs/agent-notes/tasks.md +3 -3
  11. package/docs/agent-notes/tests.md +4 -4
  12. package/docs/contracts/companion-cli-v2.json +90 -0
  13. package/docs/contracts/companion-cli-v3.json +348 -0
  14. package/docs/design/adapters.md +1 -1
  15. package/docs/design/agent-hub-architecture.md +8 -5
  16. package/docs/design/bus.md +1 -1
  17. package/docs/design/cli-output-inventory.md +4 -2
  18. package/docs/design/execution-reference.md +1 -1
  19. package/docs/design/guidance-experiments.md +1 -0
  20. package/docs/design/guidance-probes.md +1 -0
  21. package/docs/design/model-routes.md +20 -5
  22. package/docs/design/roadmap.md +6 -4
  23. package/docs/design/task-board.md +21 -2
  24. package/docs/dogfood.md +13 -6
  25. package/docs/events.md +1 -1
  26. package/docs/memory.md +2 -2
  27. package/docs/operations.md +158 -50
  28. package/docs/quickstart.md +14 -2
  29. package/docs/security.md +17 -9
  30. package/docs/specs/2026-09-19-agent-hub-design.md +5 -3
  31. package/docs/specs/2026-09-19-multi-project-design.md +1 -1
  32. package/docs/specs/2026-09-20-upgrade-recovery-design.md +24 -0
  33. package/docs/specs/2026-12-04-arev-adoption-design.md +84 -0
  34. package/docs/specs/mcp-endpoint.md +15 -4
  35. package/docs/specs/relay-contract.md +38 -0
  36. package/docs/verification/2026-12-04-host-shared-receipts.md +43 -0
  37. package/docs/verification/2026-12-05-0.53.0.md +101 -0
  38. package/docs/verification/2026-12-05-agy-1.5.24.md +55 -0
  39. package/docs/verification/2026-12-05-claude-implementer-2.1.337.md +43 -0
  40. package/docs/verification/2026-12-06-0.54.0.md +76 -0
  41. package/docs/verification/2026-12-06-codex-0174-reviewer-isolation.md +43 -0
  42. package/docs/verification/2026-12-06-codex-0174-reviewer-tool-call.md +34 -0
  43. package/docs/verification/2026-12-06-compat-codex-capabilities-0.174.0.md +25 -0
  44. package/docs/verification/2026-12-06-compat-pi-1.8.0.md +23 -0
  45. package/docs/verified.json +38 -29
  46. package/package.json +9 -3
  47. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  48. package/plugins/agent-hub/.mcp.json +1 -1
  49. package/plugins/agent-hub/compat.json +9 -5
  50. package/plugins/agent-hub/kimi-hook.js +892 -874
  51. package/plugins/agent-hub/relay-launcher.js +24 -0
  52. package/plugins/agent-hub/server.js +27271 -25146
  53. package/src/adapters/acp-session-model.ts +1 -1
  54. package/src/adapters/acp.ts +5 -4
  55. package/src/adapters/agy/definition.ts +1 -1
  56. package/src/adapters/agy/hooks.ts +1 -1
  57. package/src/adapters/channel-peer.ts +3 -1
  58. package/src/adapters/claude-channel-evidence.ts +26 -1
  59. package/src/adapters/claude-channel.ts +27 -30
  60. package/src/adapters/claude-connection-policy.ts +62 -0
  61. package/src/adapters/claude-relay.ts +255 -0
  62. package/src/adapters/codex-review-isolation.ts +1 -2
  63. package/src/adapters/compat.ts +28 -18
  64. package/src/adapters/definitions/native-cli-preview-pi.ts +2 -1
  65. package/src/adapters/definitions/native-config-defaults.ts +1 -1
  66. package/src/adapters/definitions/native-context.ts +1 -2
  67. package/src/adapters/definitions/native-factories.ts +4 -1
  68. package/src/adapters/definitions/native-quota.ts +1 -1
  69. package/src/adapters/definitions/native-recovery.ts +3 -1
  70. package/src/adapters/external-modules.ts +2 -2
  71. package/src/adapters/kimi-review.ts +1 -1
  72. package/src/adapters/kimi-tui-facts.ts +1 -1
  73. package/src/adapters/local-worker.ts +3 -3
  74. package/src/adapters/native-capabilities.ts +1 -1
  75. package/src/adapters/pi.ts +26 -7
  76. package/src/adapters/registry-types.ts +2 -0
  77. package/src/adapters/relay-launcher.ts +27 -0
  78. package/src/adapters/reviewer-mcp.ts +1 -1
  79. package/src/cli/agents.ts +20 -8
  80. package/src/cli/agy-mcp.ts +1 -1
  81. package/src/cli/claude-profile-hook.ts +1 -1
  82. package/src/cli/command-table.ts +1 -0
  83. package/src/cli/commands/agents.ts +18 -1
  84. package/src/cli/commands/doctor.ts +18 -4
  85. package/src/cli/commands/launch-line.ts +32 -0
  86. package/src/cli/commands/status.ts +14 -3
  87. package/src/cli/help.ts +7 -4
  88. package/src/cli/identity.ts +1 -1
  89. package/src/cli/init-roles.ts +1 -1
  90. package/src/cli/init-settings.ts +1 -1
  91. package/src/cli/launch-line-plan.ts +82 -0
  92. package/src/cli/launch-line-project.ts +13 -0
  93. package/src/cli/main.ts +10 -9
  94. package/src/cli/pi-steps-warning.ts +14 -0
  95. package/src/cli/recovery-package.ts +60 -6
  96. package/src/cli/reset.ts +1 -1
  97. package/src/cli/shell-quote.ts +1 -3
  98. package/src/cli/upgrade-interactive.ts +7 -2
  99. package/src/cli/upgrade-keep-plan.ts +47 -0
  100. package/src/cli/upgrade-restore-state.ts +1 -1
  101. package/src/cli/upgrade-runtime.ts +119 -18
  102. package/src/cli/upgrade.ts +17 -2
  103. package/src/hub/accounts.ts +8 -4
  104. package/src/hub/action-class.ts +1 -3
  105. package/src/hub/adec-triage.ts +105 -0
  106. package/src/hub/autonomy.ts +1 -1
  107. package/src/hub/board.ts +3 -27
  108. package/src/hub/bus.ts +39 -6
  109. package/src/hub/capabilities.ts +1 -1
  110. package/src/hub/channel-project-base.ts +46 -0
  111. package/src/hub/channel-project.ts +21 -46
  112. package/src/hub/config-apply.ts +1 -1
  113. package/src/hub/config-edit.ts +1 -1
  114. package/src/hub/config-tier.ts +1 -1
  115. package/src/hub/config.ts +2 -2
  116. package/src/hub/confirmation-matrix.ts +1 -1
  117. package/src/hub/control/board-messages.ts +415 -0
  118. package/src/hub/control/dashboard-messages.ts +221 -0
  119. package/src/hub/control/delivery-messages.ts +356 -0
  120. package/src/hub/control/dispatch.ts +114 -0
  121. package/src/hub/control/hub-tool-helpers.ts +243 -0
  122. package/src/hub/control/hub-tools.ts +147 -0
  123. package/src/hub/control/native-messages.ts +665 -0
  124. package/src/hub/control/operations-messages.ts +269 -0
  125. package/src/hub/control/peer-messages.ts +126 -0
  126. package/src/hub/control/recovery-messages.ts +391 -0
  127. package/src/hub/control/recovery-operation.ts +480 -0
  128. package/src/hub/control/scope.ts +460 -0
  129. package/src/hub/control/sdlc-messages.ts +373 -0
  130. package/src/hub/control/task-ops-more.ts +245 -0
  131. package/src/hub/control/task-ops.ts +553 -0
  132. package/src/hub/control/ui-actions.ts +241 -0
  133. package/src/hub/control-write-trace.ts +1 -4
  134. package/src/hub/daemon.ts +485 -4324
  135. package/src/hub/delivery-hints.ts +2 -0
  136. package/src/hub/delivery-journal.ts +17 -6
  137. package/src/hub/events.ts +2 -1
  138. package/src/hub/execution-reference.ts +1 -1
  139. package/src/hub/host.ts +41 -9
  140. package/src/hub/hub-tools.ts +3 -4
  141. package/src/hub/invocations.ts +1 -1
  142. package/src/hub/lifecycle.ts +4 -3
  143. package/src/hub/mcp-endpoint-serve.ts +4 -3
  144. package/src/hub/mcp-endpoint.ts +15 -6
  145. package/src/hub/memory-profile-check.ts +1 -1
  146. package/src/hub/no-writes.ts +1 -1
  147. package/src/hub/peers.ts +2 -0
  148. package/src/hub/pi-exit-policy.ts +27 -0
  149. package/src/hub/progress.ts +1 -1
  150. package/src/hub/project-runtime-state.ts +17 -4
  151. package/src/hub/project-runtime.ts +3 -1
  152. package/src/hub/protocol-window.ts +1 -1
  153. package/src/hub/recovery-continuity.ts +3 -3
  154. package/src/hub/recovery-kept-roster.ts +50 -0
  155. package/src/hub/review-anchor.ts +13 -181
  156. package/src/hub/review-brief.ts +78 -28
  157. package/src/hub/review-findings.ts +15 -193
  158. package/src/hub/review-ledger.ts +162 -0
  159. package/src/hub/review-material.ts +3 -3
  160. package/src/hub/reviewer-pool.ts +4 -2
  161. package/src/hub/roadmap-issue-states.ts +65 -14
  162. package/src/hub/roadmap-sync.ts +39 -14
  163. package/src/hub/routing.ts +9 -0
  164. package/src/hub/runtime-capture-prune.ts +8 -2
  165. package/src/hub/runtime-package-assets.ts +3 -0
  166. package/src/hub/sdlc-release-policy.ts +1 -2
  167. package/src/hub/settings.ts +1 -1
  168. package/src/hub/spec-ack-tool.ts +4 -0
  169. package/src/hub/spec-report-history.ts +36 -0
  170. package/src/hub/specs.ts +1 -4
  171. package/src/hub/supervision.ts +33 -6
  172. package/src/hub/tasks-audit.ts +390 -0
  173. package/src/hub/tasks-backlog.ts +522 -0
  174. package/src/hub/tasks-handoff.ts +208 -0
  175. package/src/hub/tasks-release.ts +257 -0
  176. package/src/hub/tasks-roadmap.ts +17 -3
  177. package/src/hub/tasks-specs.ts +672 -0
  178. package/src/hub/tasks-types.ts +334 -0
  179. package/src/hub/tasks.ts +286 -1961
  180. package/src/hub/upgrade-session-contract.ts +11 -0
  181. package/src/local/probe-sandbox.ts +1 -2
  182. package/src/local/probe-workspace.ts +1 -1
  183. package/src/models/route/config.ts +4 -4
  184. package/src/models/route/decision.ts +18 -10
  185. package/src/models/route/observation-signals.ts +1 -2
  186. package/src/models/route/runtime.ts +8 -5
  187. package/src/npm-artifact.ts +76 -0
  188. package/src/omniroute/client.ts +6 -0
  189. package/src/pi/extension.ts +5 -2
  190. package/src/pi/install.ts +77 -0
  191. package/src/pi/pin.ts +49 -0
  192. package/src/primitives.ts +14 -0
  193. package/src/version.ts +2 -0
  194. package/templates/adec/README.md +10 -6
  195. package/templates/config.json +1 -1
  196. package/templates/specs.block.md +1 -0
@@ -0,0 +1,348 @@
1
+ {
2
+ "contract": "companion-cli",
3
+ "version": 3,
4
+ "since": "0.54.0",
5
+ "about": "Extends companion CLI v2 with launch-line launch options, an executable choice and a daemon-version refusal. Every v2 path is unchanged.",
6
+ "types": {
7
+ "semver": "string matching MAJOR.MINOR.PATCH with an optional -pre or +build suffix",
8
+ "string": "non-empty string",
9
+ "absolute-path": "string starting with /",
10
+ "count": "non-negative safe integer",
11
+ "nullable-fraction": "null or a finite number from 0 to 1 inclusive",
12
+ "count-map": "object whose keys are in values and whose values are counts",
13
+ "enum": "string in values",
14
+ "true": "the boolean true",
15
+ "false": "the boolean false",
16
+ "prefixed": "string equal to one of values or starting with one of prefixes",
17
+ "object": "plain object"
18
+ },
19
+ "commands": [
20
+ {
21
+ "argv": [
22
+ "status",
23
+ "--json"
24
+ ],
25
+ "reads": "status"
26
+ },
27
+ {
28
+ "argv": [
29
+ "--project",
30
+ "<id|root>",
31
+ "status",
32
+ "--json"
33
+ ],
34
+ "reads": "status"
35
+ },
36
+ {
37
+ "argv": [
38
+ "projects",
39
+ "--json"
40
+ ],
41
+ "reads": "projects"
42
+ },
43
+ {
44
+ "argv": [
45
+ "ui"
46
+ ]
47
+ },
48
+ {
49
+ "argv": [
50
+ "--project",
51
+ "<id|root>",
52
+ "ui"
53
+ ]
54
+ },
55
+ {
56
+ "argv": [
57
+ "console"
58
+ ]
59
+ },
60
+ {
61
+ "argv": [
62
+ "--project",
63
+ "<id|root>",
64
+ "console"
65
+ ]
66
+ },
67
+ {
68
+ "bin": "acon",
69
+ "argv": [
70
+ "ui"
71
+ ]
72
+ },
73
+ {
74
+ "argv": [
75
+ "launch-line",
76
+ "<kind>",
77
+ "--json",
78
+ "[--exec",
79
+ "<absolute-path|self>]",
80
+ "[--",
81
+ "<launch",
82
+ "arguments>]"
83
+ ],
84
+ "reads": "launchLine"
85
+ }
86
+ ],
87
+ "noHub": {
88
+ "exitCode": 1,
89
+ "stderrPrefix": "ahub: no hub running for "
90
+ },
91
+ "status": {
92
+ "version": {
93
+ "type": "semver",
94
+ "presence": "always"
95
+ },
96
+ "projectId": {
97
+ "type": "string",
98
+ "presence": "always"
99
+ },
100
+ "cwd": {
101
+ "type": "absolute-path",
102
+ "presence": "always"
103
+ },
104
+ "tasks": {
105
+ "type": "count-map",
106
+ "presence": "always",
107
+ "values": [
108
+ "backlog",
109
+ "proposed",
110
+ "in_progress",
111
+ "in_review",
112
+ "approved",
113
+ "changes_requested",
114
+ "cancelled"
115
+ ]
116
+ },
117
+ "peers": {
118
+ "type": "object",
119
+ "presence": "always"
120
+ },
121
+ "peers.<id>.state": {
122
+ "type": "enum",
123
+ "presence": "always",
124
+ "values": [
125
+ "idle",
126
+ "busy",
127
+ "paused",
128
+ "offline"
129
+ ]
130
+ },
131
+ "peers.<id>.queued": {
132
+ "type": "count",
133
+ "presence": "always"
134
+ },
135
+ "peers.<id>.accountLabel": {
136
+ "type": "string",
137
+ "presence": "person-console status when a named account is bound to the peer; absent otherwise"
138
+ },
139
+ "peers.<id>.orcaPaneKey": {
140
+ "type": "string",
141
+ "presence": "person-console status for an online peer with a live, project- and instance-bound Orca launch record; absent otherwise"
142
+ },
143
+ "peers.<id>.context": {
144
+ "type": "object",
145
+ "presence": "when a context reading is available; absent otherwise"
146
+ },
147
+ "peers.<id>.context.used": {
148
+ "type": "nullable-fraction",
149
+ "presence": "with peers.<id>.context"
150
+ },
151
+ "peers.<id>.context.freshness": {
152
+ "type": "enum",
153
+ "presence": "with peers.<id>.context",
154
+ "values": [
155
+ "fresh",
156
+ "stale",
157
+ "unknown"
158
+ ]
159
+ },
160
+ "peers.<id>.attached": {
161
+ "type": "false",
162
+ "presence": "when the peer has no adapter attached; absent otherwise"
163
+ },
164
+ "peers.<id>.needsReview": {
165
+ "type": "count",
166
+ "presence": "when nonzero; absent when zero"
167
+ },
168
+ "peers.<id>.pullOnly": {
169
+ "type": "true",
170
+ "presence": "when the peer reads messages only through hub_inbox; absent otherwise"
171
+ },
172
+ "peers.<id>.paused": {
173
+ "type": "prefixed",
174
+ "presence": "when paused; absent otherwise",
175
+ "values": [
176
+ "manual"
177
+ ],
178
+ "prefixes": [
179
+ "budget: "
180
+ ]
181
+ },
182
+ "peers.<id>.detached": {
183
+ "type": "object",
184
+ "presence": "when a server the hub did not start serves that peer's socket; absent otherwise"
185
+ },
186
+ "peers.<id>.detached.cause": {
187
+ "type": "string",
188
+ "presence": "with peers.<id>.detached"
189
+ },
190
+ "peers.<id>.detached.command": {
191
+ "type": "string",
192
+ "presence": "with peers.<id>.detached; the exact command that puts the peer back under the hub"
193
+ },
194
+ "needs": {
195
+ "type": "object",
196
+ "presence": "always"
197
+ },
198
+ "needs.act": {
199
+ "type": "count",
200
+ "presence": "always"
201
+ },
202
+ "needs.watch": {
203
+ "type": "count",
204
+ "presence": "always"
205
+ },
206
+ "needs.state": {
207
+ "type": "string",
208
+ "presence": "always"
209
+ },
210
+ "needs.first": {
211
+ "type": "object",
212
+ "presence": "when any item needs the person; absent otherwise"
213
+ },
214
+ "needs.first.kind": {
215
+ "type": "string",
216
+ "presence": "with needs.first; \"approval\" is a pending permission request"
217
+ },
218
+ "needs.first.level": {
219
+ "type": "enum",
220
+ "presence": "with needs.first",
221
+ "values": [
222
+ "act",
223
+ "watch"
224
+ ]
225
+ },
226
+ "needs.first.until": {
227
+ "type": "count",
228
+ "presence": "when the item expires (milliseconds since the epoch)"
229
+ },
230
+ "needs.first.peer": {
231
+ "type": "string",
232
+ "presence": "when the item belongs to a peer"
233
+ }
234
+ },
235
+ "launchLine": {
236
+ "kinds": [
237
+ "claude",
238
+ "codex"
239
+ ],
240
+ "startsProcess": false,
241
+ "response": {
242
+ "command": {
243
+ "type": "string",
244
+ "presence": "always; never empty or blank; the shell command to run in the terminal"
245
+ },
246
+ "env": {
247
+ "type": "object",
248
+ "presence": "always; overlay these bindings on the terminal environment"
249
+ },
250
+ "env.AGENTHUB_PROJECT_DIR": {
251
+ "type": "absolute-path",
252
+ "presence": "always"
253
+ },
254
+ "env.AGENTHUB_STATE_DIR": {
255
+ "type": "absolute-path",
256
+ "presence": "always"
257
+ }
258
+ },
259
+ "input": {
260
+ "--exec": {
261
+ "presence": "optional",
262
+ "values": "an absolute path to a runnable file, or the word self",
263
+ "effect": "the printed command starts with that path; self prints this ahub's runtime and entry file, which run without ahub on PATH; without it the command starts with ahub"
264
+ },
265
+ "--": {
266
+ "presence": "optional",
267
+ "effect": "every argument after it is the launch's own options (model, effort, resume and the like); each is kept, in order, after the kind, shell-quoted when it needs it"
268
+ }
269
+ },
270
+ "minDaemon": "0.53.0",
271
+ "refusals": {
272
+ "exit": 1,
273
+ "stdout": "empty for every refusal",
274
+ "reasons": [
275
+ "launch options cannot be kept: an argument contains a control character",
276
+ "launch options cannot be kept: <flag> is owned by ahub; remove it from the launch (--as, --project, --live-test, --print-command, --dry-run, and the flags the claude or codex launcher owns, such as --dangerously-skip-permissions or --remote)",
277
+ "--exec must be an absolute path or self",
278
+ "--exec <path> is not a file",
279
+ "--exec <path> is not runnable",
280
+ "running hub is older than <minDaemon> or does not report its version; run ahub upgrade, then retry"
281
+ ]
282
+ }
283
+ },
284
+ "projects": {
285
+ "[]": {
286
+ "type": "object",
287
+ "presence": "one per registered project"
288
+ },
289
+ "[].id": {
290
+ "type": "string",
291
+ "presence": "always"
292
+ },
293
+ "[].root": {
294
+ "type": "absolute-path",
295
+ "presence": "always"
296
+ },
297
+ "[].state": {
298
+ "type": "string",
299
+ "presence": "always; readers recognise running and stopped, any other value reads as unknown"
300
+ }
301
+ },
302
+ "shellQuote": [
303
+ {
304
+ "in": "it's $(x)",
305
+ "out": "'it'\\''s $(x)'"
306
+ },
307
+ {
308
+ "in": "",
309
+ "out": "''"
310
+ },
311
+ {
312
+ "in": "a b",
313
+ "out": "'a b'"
314
+ },
315
+ {
316
+ "in": "'",
317
+ "out": "''\\'''"
318
+ },
319
+ {
320
+ "in": "''",
321
+ "out": "''\\'''\\'''"
322
+ },
323
+ {
324
+ "in": "$(x)",
325
+ "out": "'$(x)'"
326
+ },
327
+ {
328
+ "in": "`x`",
329
+ "out": "'`x`'"
330
+ },
331
+ {
332
+ "in": "a\nb",
333
+ "out": "'a\nb'"
334
+ },
335
+ {
336
+ "in": "é",
337
+ "out": "'é'"
338
+ },
339
+ {
340
+ "in": "\\",
341
+ "out": "'\\'"
342
+ },
343
+ {
344
+ "in": "a;b&c|d",
345
+ "out": "'a;b&c|d'"
346
+ }
347
+ ]
348
+ }
@@ -252,7 +252,7 @@ tool is available. The daemon wires the adapter only for the exact content ID se
252
252
 
253
253
  ## Model, account, and memory boundaries
254
254
 
255
- Subscription-based native CLIs keep their own account authentication; those credentials are not pooled through the hub. Hub-owned inference, including internal summaries and local-worker model calls, uses the in-process model route and OmniRoute provider boundary. Prompt text may inform configured routing, but it cannot grant credential access or replace host routing policy. The optional local-worker adec consumer (#554) releases only bounded host-screened evidence, after campus/privacy and observer admission; native account, TUI, reviewer and task-assignment authority are unchanged. Shadow preserves the gateway model/effort and conversation; enforcement is refused at configuration load and no pair is applied. An explicit live model override bypasses the decision service. Current board/turn privacy and observer authority fence the optional request across waits and its proposal before telemetry; an authority change refuses the stale turn, and the refusal is not converted into a fixed-model fallback. There is no new gateway or native turn/spawn effort path. This separates native subscription identity from hub service credentials ([#553](https://github.com/STAIxBWLB/agent-hub/issues/553)).
255
+ Subscription-based native CLIs keep their own account authentication; those credentials are not pooled through the hub. Hub-owned inference, including internal summaries and local-worker model calls, uses the in-process model route and OmniRoute provider boundary. Prompt text may inform configured routing, but it cannot grant credential access or replace host routing policy. The optional local-worker adec consumer (#554) releases only bounded host-screened evidence, after campus/privacy and observer admission; native account, TUI, reviewer and task-assignment authority are unchanged. The decision route defaults off. Shadow preserves the gateway model, effort and conversation. A person can enable enforce on a decision route in `.agenthub/routing.toml`. The hub sends a validated, non-abstaining alias and its `reasoning_effort` through the existing gateway. Abstention, timeout, failure or a pair outside the candidates uses `constraints.current`. An explicit live model override bypasses the decision service. Current board and turn privacy and observer authority fence the optional request across waits, the proposal before telemetry, and enforced execution before transport. The hub refuses a stale turn if authority changes. Native turn and spawn effort handling is unchanged. This separates native subscription identity from hub service credentials ([#553](https://github.com/STAIxBWLB/agent-hub/issues/553)).
256
256
 
257
257
  R2 uses that same separation for `plan_execute` phase and `advisor`/`escalation`
258
258
  judge model/effort suggestions. The hub retains phase transitions, judge
@@ -203,11 +203,14 @@ Long-term hub writes and core promotion callbacks use the configured standalone
203
203
  The adec backend (#554) is default-off and shadow-first. A shadow pick changes
204
204
  neither the heuristic model/effort nor the forwarded conversation. The service
205
205
  owns question assembly, hard rules, thresholds, pins and policy fallback; the hub
206
- owns allowed-pair validation, its default-off shadow switch, current turn and
207
- budget/campus admission, and original gateway execution. `enforce` is refused at configuration load and
208
- no pick is applied in this delivery. The bounded evidence
209
- builder runs only after admission and uses the host public-view screen; it never
210
- sends tool arguments, system instructions or full history. Sensitive turns are
206
+ owns allowed-pair validation, current turn and budget/campus admission, and
207
+ gateway execution. A person can enable `decision_mode = "enforce"` for a
208
+ `decision` route in `.agenthub/routing.toml`. The hub applies the validated
209
+ non-abstaining alias and sends its `reasoning_effort` to the gateway. On
210
+ abstention, timeout, failure or a pair outside the candidates, it uses
211
+ `constraints.current`. The bounded evidence builder runs only after admission
212
+ and uses the host public-view screen. It never sends tool arguments, system
213
+ instructions or full history. Sensitive turns are
211
214
  campus-gated before evidence and carry dimensions only plus privacy flags.
212
215
  Review-observer and remote inputs do not reach this optional observer. Route
213
216
  records retain closed metadata, not evidence or service error prose. Direct
@@ -76,7 +76,7 @@ abandoned preparation (#1447 T4).
76
76
 
77
77
  Pull-only peers catch up oldest-first under a byte budget, but the first envelope always goes even when it exceeds that budget so one oversized item cannot starve the queue; push peers use the digest batch limit. Pull records returned envelopes as completed at handout because the tool result is the readback, not a later native receipt. A busy Claude channel can also pull its own messages through `hub_inbox`; that avoids making a long-running turn an unbounded queue lock ([#493](https://github.com/STAIxBWLB/agent-hub/issues/493), [#713](https://github.com/STAIxBWLB/agent-hub/issues/713)).
78
78
 
79
- Delivery uncertainty normally holds the original and is never an automatic replay. The narrow exception is a hub-authored presence or workflow notice proven moot by current task evidence; mixed, unknown, or requested-stop rows remain held. This removes stale notices without treating arbitrary peer messages as seen ([#434](https://github.com/STAIxBWLB/agent-hub/issues/434)). Safe pre-acceptance failures may retry within a bounded attempt policy; uncertain results remain `needs_review` until an explicit resolution. A peer may retry only its own eligible row and only once per immutable retry lineage; an invocation uses its own ledger and is not replayed as an ordinary message retry ([#37](https://github.com/STAIxBWLB/agent-hub/issues/37), [#991](https://github.com/STAIxBWLB/agent-hub/issues/991)).
79
+ Delivery uncertainty normally holds the original and is never an automatic replay. A `needs_review` row left by the ACP adapter's own unrequested stop (the host-set, journaled `holdsSelf` mark, never the reason text, #1946) holds only itself: later queued work is delivered, the row stays listed in status for an explicit `completed`, `retry` or `discard`, and the next delivery to that peer carries one bounded, body-free held hint (ids, revisions, age, sender and kind sets). Every other local `needs_review` row (an invocation, an accepted-settle timeout, an aborted turn, an adapter failure, an unconfirmed reviewer fallback #804) keeps the peer-wide hold, and a room row holds the peer only with an invocation. Orphaned `dispatching` and `accepted` rows, storage errors, pause, recovery and lifecycle fences still hold the peer. The conductor notice for a self-held row names the `ahub queue resolve` command the conductor may run and repeats once after `bus.hold_notice_ms`. The narrow exception is a hub-authored presence or workflow notice proven moot by current task evidence; mixed, unknown, or requested-stop rows remain held. This removes stale notices without treating arbitrary peer messages as seen ([#434](https://github.com/STAIxBWLB/agent-hub/issues/434)). Safe pre-acceptance failures may retry within a bounded attempt policy; uncertain results remain `needs_review` until an explicit resolution. A peer may retry only its own eligible row and only once per immutable retry lineage; an invocation uses its own ledger and is not replayed as an ordinary message retry ([#37](https://github.com/STAIxBWLB/agent-hub/issues/37), [#991](https://github.com/STAIxBWLB/agent-hub/issues/991)).
80
80
 
81
81
  Failure diagnostics use the bounded, public-safe `failureCause` classes `peer
82
82
  offline`, `adapter refused`, `push error`, `turn aborted`, and `timeout`, never
@@ -5,7 +5,7 @@ Snapshot recorded 2026-11-25 for #1654 T1.
5
5
  Generated from the built-in dispatch table, adapter entries and HELP. Width is measured in terminal cells on color-off help at 80 columns.
6
6
  Overview summaries are recorded verbatim for the T2 grammar pass. Help-only entries include global forms.
7
7
 
8
- Overview width: 79 cells. Dispatch entries: 94. Help command words: 96.
8
+ Overview width: 79 cells. Dispatch entries: 95. Help command words: 97.
9
9
 
10
10
  | Command | Dispatch | Help width | Overview summary (cells) | Example | Flags | Observed help deviations |
11
11
  | --- | --- | ---: | --- | --- | --- | --- |
@@ -46,6 +46,7 @@ Overview width: 79 cells. Dispatch entries: 94. Help command words: 96.
46
46
  | jcode | adapter | 80 | Agents / start optional Jcode, in its TUI or headless (44) | Yes | --mode --model --provider-profile --session-id --print-command --as | Repeated forms |
47
47
  | kill | commands/kill.ts | 25 | Daemon and runtime / stop this project's hub (23) | Yes | - | Repeated forms |
48
48
  | kimi | adapter | 77 | Agents / start Kimi in its own TUI, or headless over ACP (47) | Yes | --print-command --mode --model --as | Repeated forms |
49
+ | launch-line | commands/launch-line.ts | 75 | Daemon and runtime / person: print a Claude or Codex terminal join command... (56) | Yes | --json --exec | Repeated forms |
49
50
  | learn | commands/learn.ts | 79 | Tasks and review / review recurring-criterion candidates (37) | Yes | --all --accepted --json --color | Repeated forms |
50
51
  | lineage | commands/lineage.ts | 78 | History and reports / execution metadata and evidence strengths (41) | Yes | --task --attempt --root --task-scope --task-created --cursor --nodes --edges --bytes --json --revision --ref --from | Repeated forms, Bracket wraps |
51
52
  | local | adapter | 73 | Agents / start the hub-native worker on self-hosted models (49) | Yes | --route --model --as | Repeated forms |
@@ -100,7 +101,7 @@ Overview width: 79 cells. Dispatch entries: 94. Help command words: 96.
100
101
  | ui | commands/ui.ts | 78 | Dashboard / open the local dashboard (24) | Yes | --no-open --json --settings --all --stop | Repeated forms |
101
102
  | undo | commands/undo.ts | 79 | History and reports / put back the files a turn changed (33) | Yes | --yes --context | Repeated forms |
102
103
  | up | commands/up.ts | 80 | Daemon and runtime / start the daemon and this project's default agents (50) | Yes | --unattended --no-console --no-agents --wait --json | Repeated forms |
103
- | upgrade | commands/upgrade.ts | 79 | Daemon and runtime / review and upgrade this project (31) | Yes | --project --all-stopped --to --dry-run --yes --json --verbose --color | Repeated forms |
104
+ | upgrade | commands/upgrade.ts | 79 | Daemon and runtime / review and upgrade this project (31) | Yes | --project --all-stopped --to --recreate --dry-run --yes --json --verbose --color | Repeated forms |
104
105
  | usage | commands/usage.ts | 79 | History and reports / tokens per group from the roll-up (33) | Yes | --since --by --json --color --peer --limit | Repeated forms |
105
106
  | version | commands/version.ts | 40 | Projects / print the installed version (27) | Yes | --version | Repeated forms |
106
107
  | watch | commands/watch.ts | 77 | Messages and approvals / watch a headless ACP peer's activity (36) | Yes | --no-thoughts --color | Repeated forms |
@@ -134,6 +135,7 @@ A delegated call needs its own renderer or a fixture before the human-view width
134
135
  | pet | fail (4), console.log (2), renderPet (1), process.stdout.write (1) |
135
136
  | roles | fail (1), console.log (1), printOutput (1), renderRoles (1) |
136
137
  | status | console.log (3), printOutput (1), renderStatus (1), renderStatusDefault (1), renderPet (1) |
138
+ | launch-line | fail (8), console.log (1) |
137
139
  | logs | console.log (3), fail (1) |
138
140
  | export | fail (1), console.log (2) |
139
141
  | bench | console.log (7), formatBenchReport (2), formatRuns (2), fail (5), formatCompare (1), process.stdout.write (1) |
@@ -45,7 +45,7 @@ It names evidence; it does not attest to it or grant access to it.
45
45
  | Field | Rule |
46
46
  | --- | --- |
47
47
  | `v` | Exactly the integer 1 |
48
- | `tool` | Known producer id: `ahub`, `ares`, `amem`, `vmem`, `atex` |
48
+ | `tool` | Known producer id: `ahub`, `ares`, `amem`, `vmem`, `atex`, `arev` |
49
49
  | `projectKey` | Opaque producer project identity, nonempty, at most 256 UTF-8 bytes |
50
50
  | `kind` | Producer-namespaced by `(tool, kind)`, lowercase token matching `[a-z][a-z0-9._-]*`, at most 64 bytes |
51
51
  | `id` | Opaque source identity, nonempty, at most 256 UTF-8 bytes |
@@ -12,6 +12,7 @@ tags: [agent-hub]
12
12
  paths:
13
13
  - src/hub/roles.ts
14
14
  - src/hub/guidance-variants.ts
15
+ - src/hub/tasks-guidance.ts
15
16
  - test/guidance-variants.test.ts
16
17
  - test/fixtures/guidance-variant-v1.json
17
18
  - test/guidance-variants-lifecycle.test.ts
@@ -13,6 +13,7 @@ paths:
13
13
  - src/hub/guidance-probes.ts
14
14
  - src/hub/guidance-probe-store.ts
15
15
  - src/hub/tasks.ts
16
+ - src/hub/tasks-guidance.ts
16
17
  - src/hub/operational-authority.ts
17
18
  - src/hub/daemon.ts
18
19
  - src/hub/control-client.ts
@@ -77,9 +77,24 @@ behavior, configuration grammar or generic decision-evidence v1 payload.
77
77
  | Whether a turn may execute, use a tool, cross a privacy boundary or spend budget | Current host admission | A route score or service proposal grants no authority |
78
78
 
79
79
  The active `decision` configuration supports `decision_backend = "adec"` and
80
- `decision_mode = "off" | "shadow"`, default off. `enforce` remains a load-time
81
- refusal naming the #554 follow-up. Shadow preserves the exact fallback model,
82
- effort and forwarded conversation. This is separate from `stay_switch`, whose
80
+ `decision_mode = "off" | "shadow" | "enforce"`, default off. The person sets
81
+ `enforce` in `.agenthub/routing.toml`.
82
+
83
+ Evidence for the shadow gate (#1936): every adec route request carries
84
+ `constraints.current`, the pair the heuristic picked for that call (the picked
85
+ tier's alias with its configured effort; the efficient alias, else the first
86
+ offered pair, when none matches). It is never adec's own proposal. Tags are not
87
+ sent on `/v1/route`: adec accepts `tags` (the closed word `ko` for Hangul) only
88
+ on `/v1/systemone`, which the triage question `ahub.triage.v1` uses
89
+ (`inference.triage_adec`, off by default, set only by a person in routing.toml;
90
+ shadow records adec's class or `abstain` beside the hub's own in the task
91
+ history, enforce uses a non-abstaining answer and falls open otherwise).
92
+ With `decision_mode = "enforce"`, a `decision` route executes the eligible
93
+ alias and sends its `reasoning_effort` to the gateway. An abstention, timeout,
94
+ failure or ineligible pair uses the same pair sent as `constraints.current`.
95
+ The hub never flips this switch or reads `adec shadow gate` to make that
96
+ decision. Shadow preserves the exact fallback model, effort and forwarded
97
+ conversation. This is separate from `stay_switch`, whose
83
98
  existing off/shadow/enforce behavior remains supported. R1 adds no service-call
84
99
  path, classifier option, gateway effort application, service launch or credential
85
100
  reader. #554 S2 adds the opt-in stage classifier option and its ambiguity band
@@ -521,8 +536,8 @@ route with a valid optional service binding asks the phase-model question; an
521
536
  `advisor` or `escalation` route with a valid binding asks the judge-model question.
522
537
  An ordinary route without that binding keeps its host policy. No `judge_choice`
523
538
  block or other TOML key is introduced. Service fields that are present must form
524
- a valid binding rather than being silently ignored. Every supported choice path
525
- defaults off, accepts shadow and refuses enforce at load with the #554 follow-up.
539
+ a valid binding rather than being silently ignored. Phase and judge model choices default off and accept shadow.
540
+ The enforce switch applies to the separate `decision` route.
526
541
 
527
542
  One common service validator checks the existing backend/mode, bounded policy
528
543
  identifier, numeric-loopback `/v1/route` endpoint, timeout and alias/effort options.
@@ -19,6 +19,8 @@ paths:
19
19
  - src/hub/specs-task.ts
20
20
  - src/hub/board.ts
21
21
  - src/hub/tasks.ts
22
+ - src/hub/tasks-roadmap.ts
23
+ - src/hub/tasks-roadmap-plan.ts
22
24
  - src/hub/hub-tools.ts
23
25
  - src/hub/daemon.ts
24
26
  - src/hub/restart.ts
@@ -298,19 +300,19 @@ triaged again and an import mark only prevents a duplicate, so neither changes t
298
300
 
299
301
  ## Drift, mirror and export (R4)
300
302
 
301
- `hub_roadmap_check` and `ahub roadmap check` report the eight rules in #1482. Issue state is fresh bounded GitHub metadata, never inferred from a task verdict. At most 100 issue reads share a 20-second deadline; unreadable or unvisited evidence remains unknown. A merged issue is reported open only after 24 hours, so GitHub's closing lag does not become a false finding. A public `feat:` or `feat(...)` task with no recorded spec issue is a feature finding. Missing issue identity is a separate finding. The result has at most 100 findings and says `truncated` when more exist.
303
+ `hub_roadmap_check` and `ahub roadmap check` report the eight rules in #1482. Issue state is fresh bounded GitHub metadata, never inferred from a task verdict. Up to 1,000 unique linked issues are read in batched GraphQL queries of at most 50 issues per repository, sharing a 20-second deadline; unreadable or unvisited evidence remains unknown. A merged issue is reported open only after 24 hours, so GitHub's closing lag does not become a false finding. A public `feat:` or `feat(...)` task with no recorded spec issue is a feature finding. Missing issue identity is a separate finding. The result has at most 100 findings and says `truncated` when more exist.
302
304
 
303
305
  Rule 5 reports covering specs left unchanged without a recorded owner
304
306
  acknowledgement in the complete report for the merged head. Missing or
305
307
  unusable report evidence keeps the rule unknown for that task.
306
308
 
307
- `roadmap.github_mirror` defaults to false and `roadmap.github_write` to `off`; both are machine-local. The only other write value is `conductor`. `ahub roadmap sync` reads complete bounded all-state GitHub milestone and issue metadata, without issue bodies, and previews fixed `gh api` argument arrays. `--apply --confirm <fingerprint>` re-reads and rechecks the exact plan. The person may apply; the current rostered unique conductor may apply only with `github_write: "conductor"`. The operational audit and current caller, task, configuration, privacy and recovery fences remain in force. Incomplete pages, conflicting identity or withheld milestone membership refuse a plan. GitHub writes never delete a milestone, and a write whose effect cannot be confirmed is reported as uncertain rather than a safe retry.
309
+ `roadmap.github_mirror` defaults to false and `roadmap.github_write` to `off`; both are machine-local. The only other write value is `conductor`. `ahub roadmap sync` reads complete bounded all-state GitHub milestone metadata, the all-state member issues of each bound or marker-recovered milestone (pull requests excluded) and batched GraphQL metadata for the remaining desired issues, without issue bodies, and previews fixed `gh api` argument arrays. `--apply --confirm <fingerprint>` re-reads and rechecks the exact plan. The person may apply; the current rostered unique conductor may apply only with `github_write: "conductor"`. The operational audit and current caller, task, configuration, privacy and recovery fences remain in force. Incomplete pages, conflicting identity or withheld milestone membership refuse a plan. GitHub writes never delete a milestone, and a write whose effect cannot be confirmed is reported as uncertain rather than a safe retry.
308
310
 
309
- The current full issue inventory has a ceiling of 1000 rows including pull requests. At or above that ceiling it fails closed, so mirror sync is unavailable and drift rule 7 stays unknown. A future scoped read of each bound milestone's members and desired issues removes this ceiling.
311
+ The scoped read never lists every repository issue. Each target milestone may hold fewer than 1000 all-state rows and at most 1,000 desired issues are resolved in chunks of 50 (#1850). A full last page, a failed page or chunk, a duplicate, a URL mismatch, or a desired number that resolves to a pull request or nothing fails closed, so the plan refuses with an incomplete membership snapshot and drift rule 7 stays unknown.
310
312
 
311
313
  A local milestone has at most one remote number per repository. R3's `milestone_imports` marks are the durable binding, including for an imported milestone. A creation includes `<!-- ahub-roadmap:<project>:<local milestone id> -->` in its description; the response must confirm the number, repository URL, title, state and marker before binding. After a lost response, exactly one marked milestone is offered as a local binding in a new confirmed preview. Duplicate markers or a title match without the marker are refused for inspection. A new milestone's first preview creates only the milestone; a later preview binds its server-assigned number and plans issue membership. Moving an issue directly to another known milestone never follows the move with a stale unassignment.
312
314
 
313
- `ahub roadmap check` and `ahub roadmap export` share one live issue-state resolver over screened roadmap references. It reads at most 100 unique refs with at most four requests in flight, a 20-second shared deadline and a 10-second limit per call. Unreadable, unattempted and late results stay `unknown`. The export uses only those live states and derives its issue totals from them. Plan-review evidence remains available to its existing readers. `ahub roadmap export` renders deterministic JSON and Markdown from the screened snapshot and these live states. `--write` writes only `docs/roadmap.md` and `docs/roadmap.json` in the caller's Git worktree after proving it shares the selected repository, enforcing its current deny, read-only and PII path policy and refusing symlinks or hardlinks. A partially completed two-file write is reported. `--issue <n> --apply --confirm <fingerprint>` updates that issue body only after a matching preview, under the same person/conductor policy. The fingerprint binds repository, issue and rendered body.
315
+ `ahub roadmap check` and `ahub roadmap export` share one live issue-state resolver over screened roadmap references. It reads at most 1,000 unique refs in chunks of 50 issues per repository with at most four requests in flight, a 20-second shared deadline and a 10-second limit per call. Unreadable, unattempted and late results stay `unknown`. The export uses only those live states and derives its issue totals from them. Plan-review evidence remains available to its existing readers. `ahub roadmap export` renders deterministic JSON and Markdown from the screened snapshot and these live states. `--write` writes only `docs/roadmap.md` and `docs/roadmap.json` in the caller's Git worktree after proving it shares the selected repository, enforcing its current deny, read-only and PII path policy and refusing symlinks or hardlinks. A partially completed two-file write is reported. `--issue <n> --apply --confirm <fingerprint>` updates that issue body only after a matching preview, under the same person/conductor policy. The fingerprint binds repository, issue and rendered body.
314
316
 
315
317
  Task state and merge changes schedule affected public milestones for an ids-only supervision notice. The existing five-minute merge-readback sweep rechecks unresolved findings, including the close-lag boundary. The hub's own pass reuses one working-tree spec check for up to 60 s across its milestone reads (#1738), so spec freshness in a finding can be up to a minute old. Reads by the person and peers check again, once per read: a roadmap check keeps the one spec check it started with across all of its issue reads. A durable marker suppresses a finding already delivered; an unavailable feed or evidence is retried on a later change or sweep. Private tasks are never named. `scripts/check-roadmap.mjs` is a standalone Node validator: it checks the generated JSON's schema, linked spec IDs and tracked spec paths, and compares every issue state with GitHub when a token is available. A ref recorded as `unknown` differs if GitHub resolves it to `open` or `closed`. CI blocks live drift in PRs that change either generated export. Other PRs and pushes to main use `--warn-drift`, which annotates drift and unreadable issue states. Structural errors fail in both modes, with or without a token. `scripts/check.sh` and the hosted decision job run the validator. The Node-only release docs checker exempts three records from its stamp manifest: `docs/roadmap.md`, `docs/smoke.md` and `docs/gsd-collaboration-analysis.md`. The roadmap validator covers the generated roadmap page.
316
318
 
@@ -12,6 +12,17 @@ tags: [agent-hub, dogfood]
12
12
  paths:
13
13
  - src/hub/review-budget.ts
14
14
  - src/hub/tasks.ts
15
+ - src/hub/tasks-audit.ts
16
+ - src/hub/tasks-backlog.ts
17
+ - src/hub/tasks-experiment.ts
18
+ - src/hub/tasks-handoff.ts
19
+ - src/hub/tasks-release.ts
20
+ - src/hub/tasks-specs.ts
21
+ - src/hub/spec-report-history.ts
22
+ - src/hub/spec-ack-tool.ts
23
+ - src/hub/tasks-study.ts
24
+ - src/hub/tasks-survey.ts
25
+ - src/hub/tasks-types.ts
15
26
  - src/hub/sdlc.ts
16
27
  - src/hub/build-entry.ts
17
28
  - src/hub/sdlc-metrics.ts
@@ -168,12 +179,16 @@ A task may carry one `reason` for why a planner split or handed it off, from the
168
179
 
169
180
  Completion binds the submitted full head and any verified deliverable records. It may run a configured check before requesting review. A review records a verdict against that evidence; it does not itself merge a PR. An approval records what the checkout the reviewer read held for the files its review brief lists, as that checkout's head plus the reviewed paths that differ from the reviewed commit or are untracked, with which checkout it was: the reviewing session's own when the hub knows it, and otherwise the project checkout, said as such. A known checkout that cannot be read records no evidence rather than a clean one, so the stored verdict never claims a checkout nobody read, and a later count can tell a reviewer that read other bytes from a hub that looked at the root ([#1646](https://github.com/STAIxBWLB/agent-hub/issues/1646)). An unmerged approved task can receive a new owner submission, superseding the earlier review binding rather than treating old approval as authority for changed code ([#1047](https://github.com/STAIxBWLB/agent-hub/issues/1047)). A re-file cannot silently inherit an old head after the linked PR moves, and an approval with no supplied head refuses known-stale evidence. Refusals name the recorded and supplied or read heads and direct the owner to re-file `hub_task_done` with the new full SHA in `refs.commit`; summary text is not head evidence. This prevents stale approval from being presented as review of changed code ([#1121](https://github.com/STAIxBWLB/agent-hub/issues/1121)).
170
181
 
182
+ The review brief takes its file list, exclusions (AREV's reason names: generated, binary, too large; denied is withheld) and per-file rule groups from the AREV packet of the same head and merge base (`@staix/agent-review/core`, #1874), and `coverageGap` is the core's. The hub keeps what only it knows: the spec report, plan conformance, code symbols, the checklist, the hub-verified CI line, the old name of a moved file, and the hub privacy policy, which withholds a path before it is named. A private or `[pii]` task builds no packet: it keeps the hub-local classification (and its own "lockfile" and "generated (linguist-generated)" labels) and writes nothing under the review home.
183
+
171
184
  With the lifecycle enabled, a reviewer may reopen a finding last marked
172
185
  `false_positive` or person-`accepted` with a screened `reopen_reason` in the
173
186
  new verdict. Advise reports missing reasons and saves the verdict. Enforce
174
187
  requires a reason before a verdict can save. A reasoned reopening after
175
188
  person acceptance produces a person notice (#1657).
176
189
 
190
+ A verdict bound to a head is recorded in the AREV ledger (`src/hub/review-ledger.ts`, through the core's `recordReview` and `resolveFinding`): reviewer and model family, implementer, findings as filed, coverage (a unit the verdict did not account for is recorded as skipped), `compliance:unmet-<slug>` blocking findings for unmet items and `compliance:changes-requested` for a rejection with neither. A later disposition of a recorded finding is an AREV resolution. A private task, a private turn, a withheld verdict and a subject with a withheld path write nothing. `hub_task_show` says `arev gate` will not pass the head for a private task, and a subject with a withheld path is a skip with one notice, never retried. An approval at a head the hub rejected before resolves that rejection's blocking findings the approval no longer carries. A failed write leaves the verdict on the board, prints one notice with the cause and is retried, once, by the task's next verdict.
191
+
177
192
  A verdict also enforces the review minimum the change's risk tier owes, beside the security-pass gate and before any board write. The tier is the one recorded at filing, for that one head and no other: a `high` change owes a reviewer plus a verifier card, a `test`-class card on the same repository and branch whose `refs.commit` is the filed head and whose approved owner is a peer other than the implementer, matched by repository and head when the filing recorded no branch, so the card is identified from fields the board already holds and no card shape, column or verifier field is added. In `enforce` an approving verdict without it is refused with the card to propose, `advise` records the same line and allows the approval, and a plan whose own `review` scope asks for fewer reviewers than the floor is reported at plan review and refused at the merge gate, where a tier exists. A card for an older head does not count and a tier recorded for another head is never read, so a moved head makes no tier claim, and a project with no `[risk]` table keeps today's verdicts, plan reviews and merge gates ([#1645](https://github.com/STAIxBWLB/agent-hub/issues/1645)).
178
193
 
179
194
  Review independence and declared scope are different controls. Selection excludes conflicts using current implementation history; a `code` reviewer supplies code findings, while full test/CI proof belongs to the merger's gate. Evidence-only inability to run tests is not a code defect. This keeps valuable sandboxed review without inventing CI evidence or accepting self-review ([#744](https://github.com/STAIxBWLB/agent-hub/issues/744), [#852](https://github.com/STAIxBWLB/agent-hub/issues/852)).
@@ -443,7 +458,7 @@ Lifecycle policy can be off, advisory or enforced; this is separate from always-
443
458
 
444
459
  Enabled lifecycle plans may retain a full base commit, excluded literal paths, stop conditions and ordered steps with verification text. Exclusions override broader includes in PR conformance, including the merge queue. Accept drift compares the base with the local remote-tracking default tip resolved through `refs/remotes/origin/HEAD`, without requiring a task head. Done drift compares the base with the unique merge-base of the recorded task head and that default tip, excluding own commits. Require the base to be an ancestor of the selected endpoint, recheck the default tip, and keep missing, shallow, ambiguous, reversed, foreign or incomplete evidence unknown. Use bounded hardened local-only Git and privacy-screened names; never fetch, use checkout HEAD or guess a default branch. Drift is advisory in every lifecycle mode, independent of the existing PR conformance approval gate. Verification text grants no execution authority. Off exposes no new plan schema or drift readback ([#1403](https://github.com/STAIxBWLB/agent-hub/issues/1403)).
445
460
 
446
- When the specs policy is enabled, covering design specs participate in proposal/accept notices and completion/review reports. Report mode informs; require mode needs an updated spec or a recorded acknowledgement for each applicable unchanged spec. Commitless and verified no-change work remains quiet, and private evidence is withheld rather than exposed to satisfy a report. These modes preserve owner choice while making design drift visible ([#1064](https://github.com/STAIxBWLB/agent-hub/issues/1064)).
461
+ When the specs policy is enabled, covering design specs participate in proposal/accept notices and completion/review reports. Report mode informs; require mode needs an updated spec or a recorded acknowledgement for each applicable unchanged spec. Commitless and verified no-change work remains quiet, and private evidence is withheld rather than exposed to satisfy a report. These modes preserve owner choice while making design drift visible ([#1064](https://github.com/STAIxBWLB/agent-hub/issues/1064)). The owner or configured conductor can add missing acknowledgements with `hub_spec_ack` at the filed head of an in-review or approved task, including after merge. It uses the same public-reason screening as completion, appends an ids-only history entry and preserves the current review and approval bindings.
447
462
 
448
463
  ## Worktree shelf (#1057)
449
464
 
@@ -455,7 +470,7 @@ A worktree whose activity could not be read is live and never settled. The shelf
455
470
 
456
471
  ## Anchored review packages (#1056)
457
472
 
458
- `ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.2.0 DOM-free `./contract` entry through type-only imports. The generated declaration bridge is removed. `test/acon-review-contract.test.ts` checks the unchanged shared fixtures against both the published acon conformance functions and the hub validator; the project retains its Bun-only TypeScript libraries. Contract conformance and hub writes are separate: hub writes allow 1-4 selectors, 512 UTF-8 bytes for an exact quote, 64 each for prefix and suffix, 256 for a hunk header, 2048 for a comment body and 64 comments per task. The hub additionally caps paths at 4096 bytes, projection name/version and structural scheme at 128 each, structural ref at 512 and verified author identity at 512. These bounds keep each stored thread within its fixed read bound. Quote selector text remains exact in storage; `sanitize()` applies when it is rendered beside hub headers. The hub limits count UTF-8 bytes, independently of acon's character limits: 171 Hangul syllables exceed the 512-byte exact-quote cap. Refusals identify the field, bound and next step. Unknown fields and selectors refuse before effects. A finding path, when present, must equal its anchor path. Findings without anchors retain the existing head buckets and Important carry-over rule.
473
+ `ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.2.0 DOM-free `./contract` entry through type-only imports. The generated declaration bridge is removed. The anchor adapter re-exports AREV core contract 1.0.0. Anchor admission checks the trimmed path against the deny list as well as applying the core repository-relative path rules. Finding disposition uses the AREV 0.17.1 core, which preserves the hub's settled finding behavior for the queried head (agent-review#150). `test/acon-review-contract.test.ts` checks the published AREV fixture against both the published acon conformance functions and the hub validator; the project retains its Bun-only TypeScript libraries. Contract conformance and hub writes are separate: hub writes allow 1-4 selectors, 512 UTF-8 bytes for an exact quote, 64 each for prefix and suffix, 256 for a hunk header, 2048 for a comment body and 64 comments per task. The hub additionally caps paths at 4096 bytes, projection name/version and structural scheme at 128 each, structural ref at 512 and verified author identity at 512. These bounds keep each stored thread within its fixed read bound. Quote selector text remains exact in storage; `sanitize()` applies when it is rendered beside hub headers. The hub limits count UTF-8 bytes, independently of acon's character limits: 171 Hangul syllables exceed the 512-byte exact-quote cap. Refusals identify the field, bound and next step. Unknown fields and selectors refuse before effects. A finding path, when present, must equal its anchor path. Findings without anchors retain the existing head buckets and Important carry-over rule.
459
474
 
460
475
  All person comment writes go through `Tasks`. The console can put or delete a draft without a peer envelope. An explicit send binds the selected immutable anchors and bodies to one package, changes their lifecycle to sent, appends one count-only task history entry and attempts one review envelope. A failed or uncertain notification never retries automatically. Its receipt distinguishes queued from unconfirmed delivery; neither means the owner read it. The saved package retains its immutable body, envelope identity, original visibility binding and versioned publication-evidence contract. Its serialized record must fit 32768 UTF-8 bytes before any sent write. A previously unpublished package is admitted only while every selected comment remains sent and its originally visible text remains public under current policy; a missing binding, dismissal or privacy change refuses without rewriting or publishing the old body. An explicit confirmed Send with `packageId` recovers only that saved package. Durable queue or delivery evidence makes this idempotent, including after restart; failed or discarded deliveries refuse with their actual state and `ahub queue` inspection guidance rather than reporting queued or replaying the effect. Unknown evidence and legacy packages refuse with inspection guidance. Person-package terminal receipts are retained alongside the package rather than pruned with ordinary delivery history. Quote-bearing reviewer requests use a distinct `reviewer-request-` marker and their terminal rows follow ordinary pruning. This retains a full receipt per package; package archival with an IDs-only tombstone is the upgrade path. Deleting a sent comment dismisses it without rewriting its anchor. Only a final successful owner completion may claim resolved comment IDs; a queued or failed check leaves them sent. That claim is not person verification or a review verdict.
461
476
 
@@ -538,6 +553,10 @@ deferral: [SDLC readbacks](../sdlc.md#readbacks-and-presentation) specifies the
538
553
  exact-head job-step proof and the review blockers deferred until merge. It never
539
554
  counts as a full-gate success or relaxes guarded merge or identical-tree reuse.
540
555
 
556
+ ## Reviewer selection (#1874)
557
+
558
+ Reviewer pool rotation comes from AREV's `chooseHost`. Use the PR number, or the task id when no PR is filed. The scheduler maps each declared reviewer instance to its configured adapter kind for rotation, then applies continuity, availability, quota and same-family policy to the instances. A configured kind with no declaration has no slot. A declared but blocked kind retains its slot, and an implementer-family reviewer is eligible only as a last resort when the family policy permits it.
559
+
541
560
  ## Reviewer quota waits (#1446)
542
561
 
543
562
  Automatic reviewer selection shares `review.gate` (default 0.8) across routing and explain using canonical-account projected headroom. Unknown/no-source readings skip by default (`review.unknown_quota = "skip"`). Explicit `pass` admits unknown readings but preserves the known numeric floor; an admitted unknown never participates in a quota wait. `review.gate = "off"` disables floor checks, unknown checks and every quota wait. Actual Budget/manual pauses and all other routing constraints remain binding. With a numeric gate, a quota-only exhausted pool may wait only when every declared candidate is actually paused or at the known floor and each has a known reset; other blockers prevent waiting. Persist task incarnation, opaque head/repo binding, first start and deadline in ordinary role history. The first `task_sweep.review_min` deadline is the sole hard cap; reset timestamps only wake a recheck (including Budget's existing reset plus 60-second grace), and later signals/restarts cannot extend the cap. Expiry or unknown under the skip policy returns to existing fallback. Head/private/close/stop changes cancel timers. Quota does not join the permanent per-head failure set. `review.max_minutes` defaults to 20; a child-specific generation fence and existing owned teardown produce a typed timeout without closing the task.