@staix/agent-hub 0.35.0 → 0.37.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 (165) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +25 -4
  3. package/THIRD_PARTY_NOTICES.md +0 -18
  4. package/docs/agent-notes/README.md +71 -1
  5. package/docs/agent-notes/adapters.md +5 -2
  6. package/docs/agent-notes/bus.md +1 -0
  7. package/docs/agent-notes/daemon.md +7 -6
  8. package/docs/agent-notes/local-worker.md +1 -0
  9. package/docs/agent-notes/models.md +5 -3
  10. package/docs/agent-notes/tasks.md +9 -2
  11. package/docs/agent-notes/tests.md +1 -1
  12. package/docs/contracts/companion-cli-v1.json +70 -0
  13. package/docs/design/adapters.md +115 -2
  14. package/docs/design/agent-hub-architecture.md +10 -2
  15. package/docs/design/bus.md +8 -0
  16. package/docs/design/execution-reference.md +171 -11
  17. package/docs/design/guidance-experiments.md +438 -0
  18. package/docs/design/guidance-probes.md +802 -0
  19. package/docs/design/model-routes.md +1053 -0
  20. package/docs/design/supervision.md +121 -0
  21. package/docs/design/task-board.md +111 -0
  22. package/docs/dogfood.md +24 -15
  23. package/docs/events.md +20 -1
  24. package/docs/memory.md +3 -3
  25. package/docs/operations.md +366 -133
  26. package/docs/profiles.md +2 -2
  27. package/docs/quickstart.md +114 -3
  28. package/docs/research.md +5 -3
  29. package/docs/sdlc.md +113 -7
  30. package/docs/security.md +88 -6
  31. package/docs/specs/2026-09-19-agent-hub-design.md +14 -11
  32. package/docs/specs/2026-10-04-switchyard-source-port-design.md +3 -1
  33. package/docs/verification/2026-10-25-qwen-dual-output-t0.md +22 -0
  34. package/docs/verification/2026-11-08-qwen-0269-model-setter-1317.md +25 -11
  35. package/docs/verification/2026-11-09-qwen-0270-acp.md +181 -0
  36. package/docs/verification/2026-11-09-qwen-0270-model-setter-1317.md +61 -0
  37. package/docs/verification/2026-11-10-0.36.0.md +59 -0
  38. package/docs/verification/2026-11-10-claude-implementer-2.1.322.md +59 -0
  39. package/docs/verification/2026-11-10-qwen-0270-dual-output.md +367 -0
  40. package/docs/verification/2026-11-10-qwen-0271-dual-output.md +101 -0
  41. package/docs/verification/2026-11-11-0.37.0.md +40 -0
  42. package/docs/verification/2026-11-11-guidance-probe-t2-1226.md +153 -0
  43. package/docs/verification/2026-11-11-qwen-setter-suggestions-off.md +167 -0
  44. package/docs/verification/claude-shell-wrapper-native.py +1 -1
  45. package/docs/verified.json +27 -27
  46. package/package.json +3 -4
  47. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  48. package/plugins/agent-hub/kimi-hook.js +3570 -1800
  49. package/plugins/agent-hub/server.js +4112 -1913
  50. package/src/adapters/channel-peer.ts +7 -1
  51. package/src/adapters/claude-channel.ts +7 -4
  52. package/src/adapters/compat.ts +10 -10
  53. package/src/adapters/local-probe.ts +174 -0
  54. package/src/adapters/local-worker.ts +233 -22
  55. package/src/adapters/qwen-dual.ts +324 -44
  56. package/src/cli/console-state.ts +25 -6
  57. package/src/cli/console-versions.ts +99 -0
  58. package/src/cli/console.ts +13 -1
  59. package/src/cli/guidance.ts +67 -0
  60. package/src/cli/help.ts +12 -4
  61. package/src/cli/identity.ts +10 -3
  62. package/src/cli/init-prompt.ts +15 -2
  63. package/src/cli/init-required-checks.ts +122 -0
  64. package/src/cli/init-settings.ts +10 -4
  65. package/src/cli/init.ts +39 -3
  66. package/src/cli/install-paths.ts +7 -2
  67. package/src/cli/lineage.ts +78 -0
  68. package/src/cli/main.ts +171 -14
  69. package/src/cli/runtime-version-warning.ts +2 -2
  70. package/src/cli/sdlc-output.ts +9 -5
  71. package/src/cli/setup-research.ts +10 -0
  72. package/src/hub/autonomy-defaults.ts +20 -9
  73. package/src/hub/board.ts +346 -4
  74. package/src/hub/build-entry.ts +11 -0
  75. package/src/hub/bus.ts +12 -0
  76. package/src/hub/ci-watch.ts +4 -4
  77. package/src/hub/config-apply.ts +6 -3
  78. package/src/hub/config-trust.ts +7 -1
  79. package/src/hub/control-client.ts +5 -2
  80. package/src/hub/daemon.ts +508 -26
  81. package/src/hub/delivery-hints.ts +4 -2
  82. package/src/hub/delivery-journal.ts +50 -2
  83. package/src/hub/delivery-public.ts +51 -0
  84. package/src/hub/dogfood-profile.ts +8 -4
  85. package/src/hub/events.ts +3 -2
  86. package/src/hub/execution-lineage-owner.ts +272 -0
  87. package/src/hub/execution-lineage.ts +52 -8
  88. package/src/hub/execution-links.ts +85 -0
  89. package/src/hub/guidance-probe-store.ts +713 -0
  90. package/src/hub/guidance-probes.ts +358 -0
  91. package/src/hub/guidance-variants.ts +398 -0
  92. package/src/hub/handoff.ts +1 -0
  93. package/src/hub/hub-tools.ts +43 -2
  94. package/src/hub/inference.ts +18 -5
  95. package/src/hub/manager.ts +44 -2
  96. package/src/hub/memory-policy.ts +2 -2
  97. package/src/hub/operational-authority.ts +13 -1
  98. package/src/hub/peers.ts +6 -1
  99. package/src/hub/planning.ts +1 -1
  100. package/src/hub/ports.ts +1 -1
  101. package/src/hub/progress.ts +47 -23
  102. package/src/hub/report.ts +2 -0
  103. package/src/hub/research.ts +1 -0
  104. package/src/hub/restart.ts +20 -0
  105. package/src/hub/roles.ts +26 -0
  106. package/src/hub/routing.ts +4 -1
  107. package/src/hub/sdlc-merge.ts +39 -1
  108. package/src/hub/sdlc-release-authorization.ts +139 -17
  109. package/src/hub/sdlc-release-policy.ts +100 -0
  110. package/src/hub/sdlc-release.ts +60 -8
  111. package/src/hub/sdlc.ts +62 -11
  112. package/src/hub/settings.ts +2 -0
  113. package/src/hub/supervision-proposals.ts +405 -0
  114. package/src/hub/supervision-rules.ts +388 -0
  115. package/src/hub/supervision.ts +2 -0
  116. package/src/hub/task-approval.ts +2 -2
  117. package/src/hub/task-repository.ts +5 -0
  118. package/src/hub/tasks.ts +917 -53
  119. package/src/local/probe-errors.ts +28 -0
  120. package/src/local/probe-sandbox.ts +224 -0
  121. package/src/local/probe-types.ts +108 -0
  122. package/src/local/probe-workspace.ts +237 -0
  123. package/src/local/sandbox.ts +71 -2
  124. package/src/local/tools.ts +135 -9
  125. package/src/memory/capture.ts +2 -2
  126. package/src/models/relay.ts +9 -2
  127. package/src/models/route/advisor-trigger.ts +88 -0
  128. package/src/models/route/config.ts +39 -8
  129. package/src/models/route/conversation-view.ts +179 -0
  130. package/src/models/route/decision-evidence.ts +1 -1
  131. package/src/models/route/decision.ts +193 -26
  132. package/src/models/route/escalation-control.ts +30 -0
  133. package/src/models/route/hub-prompts.ts +97 -0
  134. package/src/models/route/judge-choice.ts +155 -0
  135. package/src/models/route/judge-replies.ts +102 -0
  136. package/src/models/route/labels.ts +14 -70
  137. package/src/models/route/observation-signals.ts +250 -0
  138. package/src/models/route/plan-execute-choice.ts +27 -0
  139. package/src/models/route/relay-selector.ts +10 -9
  140. package/src/models/route/runtime.ts +129 -60
  141. package/src/models/route/stage-diagnostics.ts +22 -0
  142. package/src/models/route/stage-evidence.ts +55 -0
  143. package/src/models/route/stage-fallback.ts +58 -0
  144. package/src/models/route/stage-input.ts +155 -0
  145. package/src/models/route/stage.ts +5 -147
  146. package/src/models/route/turn-state.ts +77 -0
  147. package/src/omniroute/client.ts +3 -0
  148. package/src/ui/guidance-panel.ts +156 -0
  149. package/src/ui/guidance-view.ts +43 -0
  150. package/src/ui/lineage-view.ts +34 -0
  151. package/src/ui/plugin.ts +141 -27
  152. package/src/version.ts +4 -0
  153. package/templates/adec/README.md +32 -0
  154. package/templates/adec/ahub.plan-execute.json +23 -0
  155. package/templates/adec/ahub.stage.json +23 -0
  156. package/LICENSES/Apache-2.0.txt +0 -204
  157. package/src/models/route/advisor.ts +0 -102
  158. package/src/models/route/escalation.ts +0 -82
  159. package/src/models/route/judge.ts +0 -23
  160. package/src/models/route/normalize.ts +0 -103
  161. package/src/models/route/plan-execute.ts +0 -52
  162. package/src/models/route/prompts.ts +0 -8
  163. package/src/models/route/signals.ts +0 -247
  164. package/src/models/route/state.ts +0 -54
  165. package/src/models/route/text.ts +0 -61
package/docs/profiles.md CHANGED
@@ -139,11 +139,11 @@ The existing ahub report --dogfood command adds a profile section when the selec
139
139
 
140
140
  Rows include profile totals and class-alias groups with the stored base class. A task keeps its recorded profile across later configuration changes. Public custom aliases remain bounded identifiers; private custom aliases are withheld. Task titles, paths, notes, checklist prose and model text are not exported. Private pii/pii_path tasks are counted by id and number.
141
141
 
142
- A missing, incomplete or unsupported source produces JSON null, rendered as unknown in the readable report. A complete source can prove zero recorded events; it cannot prove zero events for a category that has no recorder. Source completeness and flow scope distinguish history-backed totals from recorded-window observations. Profile bindings, including event-only fallback, are capped at 500; a capped window reports incomplete/unknown totals rather than extrapolating. Automatic approvals are flow transitions, not reviewer rounds or first-pass review samples.
142
+ A missing, incomplete or unsupported source produces JSON null, rendered as unknown in the readable report. A complete source can prove zero recorded events; it cannot prove zero events for a category that has no recorder. Source completeness and flow scope distinguish history-backed totals from recorded-window observations. Profile bindings, including event-only fallback, are capped at 500; a capped window reports incomplete/unknown totals rather than extrapolating. Automatic approvals and merge adoptions (`merged outside the hub`, #1348) are flow transitions, not reviewer rounds or first-pass review samples.
143
143
 
144
144
  | Row group | Existing evidence | Unmeasured ceiling |
145
145
  | --- | --- | --- |
146
- | Flow | Bound task history and complete task-event windows; observed automatic approvals | Undated approvals, incomplete history and first-pass review without history remain unknown |
146
+ | Flow | Bound task history and complete task-event windows; observed automatic approvals and merge adoptions | Undated approvals, incomplete history and first-pass review without history remain unknown |
147
147
  | Review | Explicit verdicts and structured public unmet-criteria ids | Profile checklist prose has no item-id recorder; private criterion ids are withheld |
148
148
  | Overlap | Recorded path/section notices and later matching pair/path edit facts | Observed path-edit pairs imply no authorship or causation; section edit confirmation remains unknown |
149
149
  | Deliverables | Deduplicated ids in recorded deliverable histories | No new file reads; changed-since-approval and current unknown states remain unknown |
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
18
18
 
19
19
  <!-- facts:install-tag -->
20
20
  ```bash
21
- bun add -g github:STAIxBWLB/agent-hub#v0.35.0
21
+ bun add -g github:STAIxBWLB/agent-hub#v0.37.0
22
22
  ahub setup
23
23
  ```
24
24
  <!-- /facts:install-tag -->
@@ -48,6 +48,18 @@ terminal in that project: it reviews the plan with you, applies it and follows
48
48
  it; other projects keep their version. It then names the `bun add -g` and
49
49
  `ahub setup` step when your global CLI or plugin is older than the new daemon.
50
50
 
51
+ ## Upgrading to 0.37.0
52
+
53
+ The `@staix/agent-mem` pin moves to 0.24.0, whose storage formats equal 0.23.1's (#1396). Raise a shared home's curated format floor to 0.24.0 only after every hub sharing that home runs 0.37.0. The Orca, Herdr and Claude Code companions are no longer in this package: install them from STAIxBWLB/ahub-orca, STAIxBWLB/ahub-herdr and STAIxBWLB/ahub-claude, which read ahub only through the companion CLI contract v1 (#1387, #1392). The replaced routing modules and their Apache notice are gone; routes, `stage` compatibility and route events behave as before (#1393). `ahub console` now shows the daemon, console, global CLI and Claude plugin versions, and an AHUB column per peer (#1386). Nothing else changes until you use it: `ahub sdlc authorize-release` can read a committed version source for a project without `package.json` (#1383), and `ahub guidance probe register|start|show|cancel` records a private probe declaration whose lifecycle runs only with test fixtures; production has no probe runner (#1391, #1395). N-1 is published 0.36.0 and control remains 16 through 17.
54
+
55
+ `ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.37.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
56
+
57
+ ## Upgrading to 0.36.0
58
+
59
+ The `@staix/agent-mem` pin stays at 0.23.1. In SDLC `advise` or `enforce`, a repository other than `STAIxBWLB/agent-hub` with no configured required checks now reports `required checks unknown` for review readiness and CI watches instead of assuming the native `seeded guards` floor (#1344): set `required_checks` in `.agenthub/sdlc.toml` (`ahub settings edit sdlc.toml`) and restart the hub ([required checks](sdlc.md#required-checks-at-initialization)). After a hub deny, Qwen's dual-output TUI keeps later input fenced until a new personal turn completes in the Qwen terminal or a verified fresh generation starts, and reports offline after 30 s ([Qwen TUI](operations.md#qwens-own-tui-driven-through-dual-output-286-part-3), #1371). `hub_inbox` can also show an agent its own held messages as a read-only view that settles nothing (#1359). Newly verified agent versions: Claude Code 2.1.322 as the headless implementer (#1377), the Qwen dual-output TUI on 0.27.0 and 0.27.1 (#1364, #1378) and Qwen basic ACP on 0.27.0 (#1355); the headless `qwen` ACP entry still refuses 0.27.1. Before saving a machine research default with `ahub setup --research` or `--no-research` (#1347), upgrade every hub and CLI on the machine: a version before 0.36 treats the whole `~/.agenthub/defaults.json` as untrusted, so its machine autonomy preset falls back to off ([research records](operations.md#research-records)). Nothing else changes until you use it: `supervision.mode` (machine-local, off by default) stores bounded supervision proposals in `shadow` and also shows them in the console inbox in `advisory`, where only an explicit accept or dismiss acts ([supervision proposals](operations.md#supervision-proposals), #1362, #1368); `ahub guidance create|list|show|withdraw` records advisory role variants on a task (#1363, #1367, #1376); `ahub lineage show|link` reads bounded execution lineage and admits declared references ([execution lineage](operations.md#execution-lineage-1220-t2), #1341, #1358); a `stage` route with `classifier = "decision"` asks adec only inside its ambiguity band, off or shadow only (#1370, #1373); `ahub sdlc adopt-merge <task> --pr <n>` settles a task whose PR was merged outside the hub (#1348); `ahub init` in `advise` or `enforce` proposes the repository's required checks (#1344) and takes `--research`/`--no-research` (#1347); an explicitly superseding task can carry unchanged spec consent (#1361); and the optional Claude Code companion stays fixture-only with manual session-only placement (#1349, #1365, #1369). N-1 is published 0.35.0 and control remains 16 through 17.
60
+
61
+ `ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.36.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
62
+
51
63
  ## Upgrading to 0.35.0
52
64
 
53
65
  The hub now exact-pins `@staix/agent-mem` 0.23.1 (0.34.x pinned 0.22.1), and managed headless peers (Codex, headless Kimi, Qwen, Jcode, Pi, `local`) start saving compact `amem:` Record lines from their final answers; the hub strips those lines from shared replies (#1320). Upgrade every hub, global `amem` CLI and native amem hook that shares a memory home together: a 0.22.1 hook drain silently discards Record format-3 spool entries, and 0.22.1 refuses the `records` key even when false. To turn Records off, set `records: false` in the amem configuration only after every install is upgraded ([agent-authored records](operations.md#agent-authored-records)). Machine memory sync now supplies amem's placement attestation on every pass (#1173); a refused writer shows as cause `writer` in `ahub status` and the dashboard, with the next step. The budget gate default is 0.99 instead of 0.9 (#1292), but a project whose tracked `.agenthub/config.json` has `"gate": 0.9` from an older `ahub init` keeps 0.9 until you remove that key or run `ahub settings set budget.gate <value>`. On Kimi 2.5.2, `ahub kimi` installs a launch-scoped plugin so turns you start in its TUI leave results (#1282), and `ahub agy` turns off agy's self-update for the run (#1286). Nothing else changes until you use it: `ahub model set|clear|list` (person only) selects a supported peer's next-turn model (#1321), peers can post bounded visuals with `hub_visual` (#1315), and `ahub research export --dataset <dir>` writes per-project research datasets (#1290). N-1 is published 0.34.1 and control remains 16 through 17.
@@ -208,7 +220,7 @@ Restart Claude sessions after upgrading: each keeps the plugin server it started
208
220
 
209
221
  `ahub jcode` opens its TUI again; on 0.12.39 it stopped after the first hub turn (#564). A busy Jcode now takes an `important` message into its running turn (#572), and `ahub doctor` lists the extra MCP servers the hub-owned Jcode loads from its config files. See [Jcode operations](operations.md#optional-jcode-peer).
210
222
 
211
- The Switchyard sidecar is retired (#553). An existing `routing.toml` keeps working: its `[targets]` and `[routes]` tables are ignored and reported as retired settings, and a route without the `hub/` prefix (such as `sy/coding`) uses the fixed model with one warning. Migrate with the table in [in-process model routes](operations.md#in-process-model-routes); the hub never rewrites the file.
223
+ Model routing runs in process through the hub-owned route implementation, with optional adec model/effort choices. An existing `routing.toml` keeps working: its `[targets]` and `[routes]` tables are ignored and reported as retired settings, and a route without the `hub/` prefix (such as `sy/coding`) uses the fixed model with one warning. Migrate with the table in [in-process model routes](operations.md#in-process-model-routes); the hub never rewrites the file.
212
224
 
213
225
  Run `ahub init` once per project to refresh the hub block in `AGENTS.md`: it adds the line that tells agents to report a pushed PR with `hub_task_done` and end the turn instead of waiting for CI (#572). Finishing a task now also says when the project root checkout is on a branch other than its default.
214
226
 
@@ -278,6 +290,105 @@ ahub say "Each of you: reply with your name." # broadcast
278
290
  ahub say @kimi "run the tests and report" # one peer
279
291
  ```
280
292
 
293
+ ## A new project with SDLC advise or enforce
294
+
295
+ This flow uses the default lifecycle in a new Git repository. `advise` reports
296
+ lifecycle gaps; `enforce` blocks the corresponding transitions until their
297
+ evidence is current. Ownership, privacy and WIP rules still apply in both modes.
298
+ SDLC defaults to off, and guarded merge has its own opt-in policy.
299
+
300
+ Run bare `ahub init` from the person's terminal in the new repository to get the
301
+ guided prompt. Choose `advise` or `enforce` when asked. Init proposes required checks
302
+ from this repository's latest completed default-branch CI run, falling back to
303
+ literal workflow job names, and the person confirms or edits the names. For an
304
+ unattended choice, `ahub init --sdlc enforce --yes` takes the discovered names.
305
+ If discovery cannot determine them, give the exact names explicitly, for example
306
+ with `--required-checks 'unit,lint'` after replacing `unit,lint` with this
307
+ repository's required jobs. Enforce without known names refuses before writing.
308
+ The mode and check names are written to `.agenthub/sdlc.toml`.
309
+ See [required checks](sdlc.md#required-checks-at-initialization) for discovery
310
+ limits and repository-specific configuration.
311
+
312
+ Research recording is another init choice: `--research` or `--no-research` sets
313
+ `research.enabled` in this project's untracked `.agenthub/config.local.json`. A new project otherwise uses the trusted
314
+ machine choice saved by an explicit `ahub setup --research` or
315
+ `ahub setup --no-research`, else off. Init reads that default, never writes it.
316
+ Before saving a shared machine default, follow the
317
+ [upgrade-all-hubs caveat](operations.md#research-records). Setting flags select
318
+ values directly. `--yes` skips questions; `--dry-run` previews without questions or
319
+ writes.
320
+
321
+ Review `git status --short` and `git diff`, then commit `AGENTS.md`,
322
+ `.agenthub/config.json`, `.agenthub/routing.toml`, `.agenthub/sdlc.toml` and other
323
+ shared init changes such as `.gitignore` as applicable. Keep
324
+ `.agenthub/config.local.json`, `.agenthub/routing.local.toml` and runtime state
325
+ untracked. Start through `ahub up` or the dedicated launchers such as
326
+ `ahub claude` and `ahub codex`, as in [First session](#first-session), so the
327
+ managed session receives its hub integration. Pull-only surfaces use `hub_inbox`.
328
+
329
+ Use actual task/issue ids and the full lowercase commit SHA for `<head>` below.
330
+ The normal lifecycle is:
331
+
332
+ 1. **Planner:** propose the work with `hub_task_propose`, including the intended
333
+ plan and repository. Proposal/route guidance identifies the snapshot's next
334
+ missing step; live admission rechecks currentness.
335
+ 2. **Owner or task planner:** record the spec issue with `hub_sdlc_record`.
336
+ The planner's stage-identity record contains only `stage`, `repo` and `issue`
337
+ in its receipt, with a planner or owner/planner stage (`spec` in the default
338
+ lifecycle). See [lifecycle commands](sdlc.md#initial-commands).
339
+ 3. **Person:** read the linked issue, then run
340
+ `ahub sdlc accept <task> --issue <n>` (add `--repo owner/repo` if needed).
341
+ This is a person-only command, not an agent-shell or live-test delegation.
342
+ An eligible replacement may reuse existing consent as described below.
343
+ 4. **Planner:** read `hub_planner_groom`, then record `hub_plan_review` with the
344
+ `revision` equal to the current `planningRevision`, a reason and appropriate
345
+ review/CI scopes. The [plan-review contract](sdlc.md#planner-plan-review-481-s9)
346
+ defines currentness
347
+ and planner independence.
348
+ 5. **Owner:** accept with `hub_task_accept` and the reviewed plan, then implement
349
+ and run the project's required local checks. Acceptance re-reads spec and
350
+ plan evidence; an offer alone is not acceptance.
351
+ 6. **Owner:** commit and push, open the PR, record its identity with
352
+ `hub_sdlc_record` (`receipt.pr`), and obtain the configured required checks
353
+ green on that exact head. `ahub sdlc explain <task>` names missing, pending and failed checks.
354
+ 7. **Owner:** call `hub_task_done` while the PR is still open, with its full
355
+ commit in `refs.commit`, the summary and check evidence. Follow any queued
356
+ check or readiness result before asking for a verdict.
357
+ 8. **Assigned reviewer:** review that head and record the verdict with
358
+ `hub_review`. The person's equivalent is
359
+ `ahub review <task> approved --head <head>` or a changes-requested verdict.
360
+ 9. **Person or current configured conductor:** preview with
361
+ `ahub sdlc merge <task> --dry-run`. Actual guarded merge requires an explicit
362
+ `auto_merge = "on"` policy for the repository (default off). After applying
363
+ that file change with a hub restart, use `ahub sdlc merge <task>`. If the policy
364
+ was already enabled when the reviewer approved, the automatic path can merge
365
+ after that verdict. See
366
+ [guarded merge](sdlc.md#guarded-merge-786) for every evidence gate.
367
+
368
+ The [entry-gate order and exact diagnostics](sdlc.md#named-ci-and-build-entry-diagnostics-1328-t2)
369
+ identify who repairs a missing prerequisite. A plan-review hold is separate from
370
+ peer eligibility, and an owner offer can precede person spec acceptance.
371
+
372
+ Recovery uses the existing evidence boundaries:
373
+
374
+ - **PR already merged:** the person or current configured conductor uses
375
+ `ahub sdlc adopt-merge <task> --pr <n>`. It needs the task's recorded full head,
376
+ matching merged PR and green required checks, with clean finding/review
377
+ coverage. Eligible states are `in_progress`, `in_review` and
378
+ `changes_requested`; see [merge adoption](sdlc.md#adopting-a-pr-merged-outside-the-hub-1328-t3).
379
+ - **Known plan departure:** amend the plan through the owner/planner flow, or
380
+ the person can run `ahub sdlc accept-departure <task> <head> <reason...>` for a
381
+ currently known, complete departure on that head. Repair unknown coverage before
382
+ departure consent; see [plan conformance](sdlc.md#plan-conformance-481-s2).
383
+ - **Obsolete work:** create the newer replacement and record the same repository
384
+ and issue first. The person can then cancel the old task with an explicit local
385
+ reference, for example `ahub task cancel 12 --reason "superseded work" --superseded-by "#13"`
386
+ when task 13 replaces task 12. At the replacement's build admission, the host
387
+ may carry the original consent only for an unchanged issue body and current
388
+ public source/destination context. Carry does not copy plan review or head/CI
389
+ evidence. Cancellation is not approval and releases no dependent tasks; see
390
+ [spec acceptance](sdlc.md#spec-acceptance-481-s1).
391
+
281
392
  ## The local worker
282
393
 
283
394
  `local` needs an OpenAI-compatible gateway. Put yours in `.agenthub/config.local.json`
@@ -316,7 +427,7 @@ More: `ahub help`. How it is built and why: [`docs/specs/2026-09-19-agent-hub-de
316
427
 
317
428
  ## Shared memory
318
429
 
319
- The hub exact-pins the first-party `@staix/agent-mem` <!-- facts:agent-mem-pin -->0.23.1<!-- /facts:agent-mem-pin --> core, including deterministic capture; no claude-mem worker is needed. Existing shared-v1 memory remains the default; upgrading does not migrate it. Managed agents use screened `hub_memory_search`, `hub_memory_show` and `hub_memory_graph` tools, or propose a correction with `hub_memory_correct`; only a person accepts candidates through the supported `amem review` path. Since agent-mem 0.7.0, `amem review` also accepts candidates on a selected generation.
430
+ The hub exact-pins the first-party `@staix/agent-mem` <!-- facts:agent-mem-pin -->0.24.0<!-- /facts:agent-mem-pin --> core, including deterministic capture; no claude-mem worker is needed. Existing shared-v1 memory remains the default; upgrading does not migrate it. Managed agents use screened `hub_memory_search`, `hub_memory_show` and `hub_memory_graph` tools, or propose a correction with `hub_memory_correct`; only a person accepts candidates through the supported `amem review` path. Since agent-mem 0.7.0, `amem review` also accepts candidates on a selected generation.
320
431
 
321
432
  Before any real generation migration, upgrade every hub sharing that memory home to 0.12.30 or later and check its authenticated binding with `ahub memory profile-check` in each custom registry. Ready bindings prove compatibility, not an atomic live cutover: quiesce consumers and close their handles before migrating, then reopen through the supported session-preserving lifecycle. Invalid or changed profiles disable native memory without falling back to legacy writes; the bus and board continue. See [memory operations](operations.md#hub-memory) for the remaining rollout gates.
322
433
 
package/docs/research.md CHANGED
@@ -14,7 +14,9 @@ In a project's `.agenthub/config.json`:
14
14
  ```
15
15
 
16
16
  Off by default; anything but `true` is off. While it is off the hub writes nothing and creates no file. The setting is
17
- applied live: a config reload takes it without a restart.
17
+ applied live: a config reload takes it without a restart. `ahub init --research` or `--no-research` writes it to the untracked
18
+ `.agenthub/config.local.json` instead; a new project takes the machine default a person saved with `ahub setup --research`
19
+ or `--no-research`, else off (#1347).
18
20
 
19
21
  ## Where they go
20
22
 
@@ -24,7 +26,7 @@ directory, so `ahub research --all` can compare them. `ahub reset --all` does no
24
26
 
25
27
  ## When a record is written
26
28
 
27
- When a task reaches a terminal board state (a review approves it, its owner reports a task without a reviewer done, or it is cancelled), the hub waits
29
+ When a task reaches a terminal board state (a review approves it, its owner reports a task without a reviewer done, `ahub sdlc adopt-merge` adopts its PR merged outside the hub (#1348), or it is cancelled), the hub waits
28
30
  until no open turn is attributed to the task (the turn that approved it ends after the approval, and its usage arrives
29
31
  later still), checking every 10 s for at most 30 minutes, then appends one task record built from that project's
30
32
  events and the board. A hub that stops first writes it once its peers have stopped. A terminal state is final on the
@@ -66,7 +68,7 @@ Schema v2 is additive: a v1 file still loads (a v1 row reads as `outcome: "appro
66
68
  | `tokens` | attributed tokens: `total`, `byPeer`, and `byAttribution` (`delivery`, `single_open`, the #200 rules); unattributed tokens are in no record |
67
69
  | `usage` | provider usage per peer: `input`, `output`, `cacheRead`, `total` (null when never reported) |
68
70
  | `usageByModel` | provider-reported total tokens per served (else requested) model |
69
- | `models` | model routes and served models of the attributed requests |
71
+ | `models` | model routes and served models of the attributed requests; a judge model-choice observation (a `route` event with `decisionTarget: "judge"`, #1389) is skipped before any accumulation, so it adds no route, peer or attribution |
70
72
  | `writer` | the release and `live` or `backfill` |
71
73
  | `tooling` | #248: for each peer that worked on the task (owner, reviewer, a peer with attributed turns or tokens), the add-ons from the `tooling` event of the attachment it last worked in (an attachment runs from a `state` event that brings the peer online to the next `offline`; detection may settle after the work started): `{ name, version }` from the closed list `claude-mem`, `ponytail`, `ripwire`, `open-code-review`, `codex-plugin`, `dot-admit`; version null when unknown. A peer missing here is unknown; records built from events written before #248 have no field |
72
74
  | `briefs` | #258: task briefs handed over for the task (`delivered`) and how many carried a hub-memory fail note (`withFail`), from `memory_brief` events; absent when none was recorded |
package/docs/sdlc.md CHANGED
@@ -1,8 +1,40 @@
1
1
  # Playbook lifecycle for agent-hub (#257, #481)
2
2
 
3
+ ## Required checks at initialization
4
+
5
+ For the complete new-project sequence, see [the quickstart guide](quickstart.md#a-new-project-with-sdlc-advise-or-enforce).
6
+
7
+ `ahub init --sdlc advise|enforce` proposes the repository's required check names.
8
+ Discovery is one bounded operation: at most three capped GitHub reads (the default
9
+ branch, the latest completed default-branch run with limit 1, then that run's jobs
10
+ with a 100-job cap), with a 5-second bound per read and a 20-second overall deadline.
11
+ A local `origin/HEAD` avoids the default-branch read. A missing tool, failed read,
12
+ timeout or truncated job inventory falls back to `.github/workflows/*.yml`.
13
+ Fallback accepts complete literal block-style job names (the job id when `name`
14
+ is absent). Matrices, expressions, aliases and reusable workflows require an
15
+ explicit `--required-checks <a,b,...>` override; the fallback does not guess expanded
16
+ names. Workflow reads refuse links and bound files and bytes. Names follow the
17
+ existing SDLC limit of 32 distinct checks, each at most 120 characters.
18
+
19
+ The guided prompt shows the found names after choosing advise/enforce and lets
20
+ the person confirm or edit them. `--yes` accepts discovery; `--required-checks`
21
+ skips discovery. Existing configured names, including the matching `[repos]` table, are retained
22
+ unless explicitly replaced. Enforce with no known names refuses before any initialization write.
23
+
24
+ Only `STAIxBWLB/agent-hub` retains the native three-check fallback including
25
+ `seeded guards`. Other repositories without configured checks report
26
+ `required checks unknown: set required_checks in .agenthub/sdlc.toml`, including
27
+ cached review admission; their CI watcher cannot report success from an empty set.
28
+ Repository-specific `[repos]` checks are included in review admission and CI watches.
29
+
30
+ `ahub settings get sdlc.mode` and `ahub settings get sdlc.required_checks` show the
31
+ running and file values (`--json` exposes `value` and `fileValue`). A file that
32
+ cannot load is unknown. These reads grant no settings write capability; edit the
33
+ file through `ahub settings edit sdlc.toml` and restart to apply it.
34
+
3
35
  ## Authority and evidence
4
36
 
5
- The issue remains the specification, Tasks remains the sole task mutation boundary, and GitHub remains authoritative for PR heads, required checks, merge commits and releases. The hub stores artifact identities and bounded structured readbacks, never issue/PR bodies. Off is the default. Advise exposes blockers without changing task transitions. Enforce blocks only the review/approval transitions listed below; it never releases, edits GitHub or gives a peer additional capabilities. The one GitHub write is the guarded merge of an approved task (#786, below), off by default.
37
+ The issue remains the specification, Tasks remains the sole task mutation boundary, and GitHub remains authoritative for PR heads, required checks, merge commits and releases. The hub stores artifact identities and bounded structured readbacks, never issue/PR bodies. Off is the default. Advise exposes blockers without changing task transitions. Enforce blocks the build-entry and review/approval transitions listed below; it never releases, edits GitHub or gives a peer additional capabilities. The one GitHub write is the guarded merge of an approved task (#786, below), off by default.
6
38
 
7
39
  A reviewed head is a full lowercase 40-character SHA observed through a successful readback, not an implementer-supplied statement. A check is evidence only for that same head. Unknown/missing required checks, unavailable GitHub, pending reviews or unresolved threads remain blockers in enforce and visible unknowns in advise. A newer head invalidates the derived review and approval readiness. Historical task approval is retained as history, not presented as approval of the new commit. Revalidate after asynchronous readbacks immediately before any board write.
8
40
 
@@ -68,7 +100,7 @@ Head-bound review/approval gates, bounded custom definitions, read-only merge/re
68
100
 
69
101
  ## Initial commands
70
102
 
71
- A per-project `.agenthub/sdlc.toml` may set `mode = "advise"` and `required_checks = ["check (ubuntu-latest)", "check (macos-latest)", "seeded guards"]`; the optional `eval_check` and `config_paths` are described under the eval gate below. Omit the file for off. A missing/empty check set is unknown, never a green approval gate. The built-in stage order follows the table above; changing the file applies at the next hub start.
103
+ For `STAIxBWLB/agent-hub`, a per-project `.agenthub/sdlc.toml` may set `mode = "advise"` and `required_checks = ["check (ubuntu-latest)", "check (macos-latest)", "seeded guards"]`; other repositories use their own check names from [initialization](#required-checks-at-initialization). The optional `eval_check` and `config_paths` are described under the eval gate below. Omit the file for off. A missing/empty check set is unknown, never a green approval gate. The built-in stage order follows the table above; changing the file applies at the next hub start.
72
104
 
73
105
  A person records ids and a claimed local receipt with `ahub sdlc record 12 '{"repo":"owner/repo","issue":109,"pr":325,"localHead":"<full SHA>","localResult":"passed","stage":"build"}'`. Owners/reviewers have the bounded `hub_sdlc_record` tool; it accepts no remote bodies or external-check results. Only the assigned reviewer or person records a reviewed head. `ahub review 12 approved --head <full SHA>` rechecks current evidence before approval. Changes requested does not require green CI.
74
106
 
@@ -77,7 +109,10 @@ A person records ids and a claimed local receipt with `ahub sdlc record 12 '{"re
77
109
  # Spec acceptance (#481 S1)
78
110
 
79
111
  - The person accepts a task's spec issue with `ahub sdlc accept <task> --issue <n> [--repo owner/repository]` (the repository defaults to the task's receipt). Agent shells and live tests are refused. The hub reads the issue's `lastEditedAt` and `updatedAt` through a fixed GraphQL query and stores them with the issue identity and the time of acceptance; it never reads or stores the body. `hub_sdlc_record` cannot write an acceptance, and relinking the receipt to another repository or issue drops it.
80
- - Build entry is the `implement` or `bulk_edit` task's acceptance (`hub_task_accept`), or a recorded stage change into a build stage by anyone but the person. In enforce, build entry needs a current acceptance: the hub rereads the issue and refuses with `spec acceptance missing`, `spec changed after acceptance` (the body was edited; comments only move `updatedAt` and do not count), `spec edit time unknown` (the readback failed) or `spec issue unknown` (the receipt names no issue). Advise posts the same text as a notice and lets the work start; off reads nothing.
112
+ - Build entry is the `implement` or `bulk_edit` task's acceptance (`hub_task_accept`), or a recorded stage change into a build stage by anyone but the person. Enforce names missing issue/acceptance prerequisites in the [entry-gate order below](#named-ci-and-build-entry-diagnostics-1328-t2), then re-reads the body edit time: `spec changed after acceptance` means a body edit (comments only move `updatedAt`), and `spec edit time unknown` means the readback could not establish it. Advise reports lifecycle gaps as notices without blocking them; off performs no lifecycle read.
113
+ - At build entry, a replacement may carry existing person consent from an older cancelled task only when its entire local `supersededBy` is `task #N`, `#N` or `N` for this destination, both tasks name the same canonical repository and issue, and a fresh host GitHub read proves the same `lastEditedAt`. Explicit `null` means no body edit; missing or unavailable edit metadata is unknown. Caller timestamps and comments-only `updatedAt` changes cannot grant or revoke this carry. A different issue/repository or edited body requires the person to accept again.
114
+ - Carry reads metadata for at most 32 matching older cancelled sources (a 33rd row makes the result unknown), with each raw JSON field capped at 64 KiB and the total projection at 256 KiB. Unknown, malformed or truncated metadata, cold repository scope, private source/destination/context or changed actor/policy, source cancellation revision/consent metadata or destination flow/identity during readback leaves consent absent. Source history is not read, and unrelated historical note changes are not compared. Whole local references exclude prose, qualified projects and URLs; older-only sources exclude cycles. No source body, detail, plan or history is scanned.
115
+ - Spec validation itself is read-only. After the existing outer admission succeeds, the host atomically preserves the original person's `acceptedAt` and records a `spec acceptance carried` HUB history entry with the source task and cancellation revision alongside that outer event. A refused plan/stage/completion admission or a failed atomic consent/outer-event transaction retains the original task and history. Only the acceptance identity/edit fields move; the destination keeps its own plan review, artifact/head and lifecycle evidence. A repeated gate does not append another carry entry. Manual acceptance stays person-only and receipts cannot supply consent.
81
116
  - `ahub sdlc status <task>` and `explain` show `spec: {issue, state}` (`missing`, `current`, `changed` or `unknown`) when the lifecycle is enabled and the receipt names an issue. The spec state is not a merge-readiness blocker: its gate is build entry.
82
117
 
83
118
  # Acceptance-criteria checklist
@@ -174,6 +209,50 @@ Two triggers, neither blocking: an approving `hub_review` at the PR's current he
174
209
 
175
210
  `on` runs exactly `gh pr merge <pr> --repo <repo> --squash --match-head-commit <head>` (a closed argv shape checked right before the call) and reads the PR back: only GitHub reporting `MERGED` is a merge, whatever the exit code. Never `--admin`, never a ref update used to perform the merge, and no `--auto` while the repository does not allow auto-merge (a person's repository setting). `dry-run` reports the same decision and the argv it would run and runs nothing; `off` reads nothing. Logs and notices name the task number and gates only. The verdict mirror is described in the next section.
176
211
 
212
+ ## Adopting a PR merged outside the hub (#1328 T3)
213
+
214
+ If a PR was merged before its task could finish the normal review flow, the
215
+ person or the current configured conductor runs:
216
+
217
+ ```sh
218
+ ahub sdlc adopt-merge <task> --pr <n>
219
+ ```
220
+
221
+ The task must already establish its repository. `--pr` can bind a missing PR
222
+ link; a conflicting recorded PR or repository refuses. The hub reads that
223
+ repository and PR and requires it merged at the task's last recorded full head,
224
+ with every configured required check green at that head and no open Important
225
+ finding. Unresolved or unknown review threads, pending or unknown review
226
+ requests, and an explicit change request refuse too. A GitHub approval is not
227
+ required when review coverage is complete and clean. The hub observes one
228
+ bounded GraphQL snapshot with checks bound to its head commit. Missing, pending,
229
+ failed or unknown checks refuse with their names and
230
+ a next step. A missing artifact, missing full head, changed task or policy,
231
+ stale actor/session or a held hub also refuses without changing the task.
232
+
233
+ Eligible task states are exactly `in_progress`, `in_review` and
234
+ `changes_requested`, with all Important findings dispositioned. `proposed` and
235
+ `backlog` tasks must be assigned and accepted first. `approved` and `cancelled`
236
+ are already closed. Each refusal names the state and the next step. The Board
237
+ transition is host-only and requires the current flow revision; the generic
238
+ state transition table is unchanged.
239
+
240
+ A successful adoption records `merged outside the hub` as the actual person's
241
+ or conductor's action, moves the task to `approved`, and releases dependents as
242
+ an ordinary approval does. It does not invent a reviewer verdict or reviewed
243
+ head, run `gh pr merge`, post a review, or remove a branch or worktree. A task
244
+ already approved or cancelled is not adopted again.
245
+ Observed `sdlc.head` follows the proven PR head; older local/reviewed metadata
246
+ remain unchanged and noncurrent. Normal settlement observers receive the
247
+ approval (origin follow-back, supervision, research recording and release/profile
248
+ timing), without adding a review verdict or automatic-done count. Release timing
249
+ never counts an adoption that occurred after the release.
250
+
251
+ Private tasks and private
252
+ turns refuse for every actor before GitHub reads; use the person's local review
253
+ workflow for private work. `--live-test` cannot delegate this approval as the
254
+ person.
255
+
177
256
  ## Merge result and cleanup (#786 T2)
178
257
 
179
258
  Post-run reads make at most three attempts within a shared six-second budget. Only a GitHub MERGED observation with its merge commit permits cleanup; the CLI exit is recorded separately, including a nonzero exit when GitHub confirms the merge. Non-merged, missing or unreadable evidence records the bounded result and leaves branches alone. Off and dry-run create no merge record or cleanup effects.
@@ -296,7 +375,7 @@ At plan review, batch small related fixes into one area branch and PR; keep rele
296
375
 
297
376
  The planner can provide scope with `hub_plan_review`; the person can run `ahub sdlc plan-review <task> <revision> <reason...> --review full --reviewers 1 --ci full`. Tasks records the explicit scope on the plan and its revision-bound receipt. A file-list update retains omitted cost fields; an explicit scope change cannot replace a reviewed scope during enforce acceptance. Old plans and receipts remain unspecified and are never filled by guessing. Advise reports missing scope. In enforce, every newly recorded receipt needs both scopes; an existing scope-less receipt remains valid until a non-release planning revision changes, with the same complete-history exception under S11. Enforce acceptance cannot add owner-supplied cost keys to that legacy receipt; the planner must record an explicit scope first.
298
377
 
299
- A review request is premature if its task head does not match the PR head, configured required checks are not green, or a pending bot thread is unanswered. A resolved thread is settled; an unresolved one needs a user reply after its last bot comment. The hub reads identity, timestamps, authorship type and resolution only, never comment bodies. Without explicit required checks the native floor is both OS checks plus `seeded guards`. Advise reports the gap; enforce refuses before the requesting done/cohort writes. If only quiet task-history events arrive during an advise readback, the evidence is discarded and review continues with unknown readiness, without another external read. A reviewer change is allowed because the reviewer is re-derived before the write; it is not an authority or readiness receipt. Mode, owner, privacy, receipt, authority and other history drift still refuse; enforce remains unchanged. A private turn may finish its own PII task in advise with a generic unknown-readiness notice and no remote metadata read; the private-turn refusal for ordinary work remains. Delayed checks revalidate before completing; a refused completion sends a private-aware notice to call `hub_task_done` again only while the task is still in progress with the owner that started the check. Otherwise only the console notice is recorded. Background roster/quota role changes remain fact, but enforce holds a new review envelope without an admission readback; refresh it through a manual reviewer assignment after CI and replies are ready. The brief and verdict coverage belong to #520, separate from this admission.
378
+ A review request is premature if its task head does not match the PR head, configured required checks are not green, or a pending bot thread is unanswered. A resolved thread is settled; an unresolved one needs a user reply after its last bot comment. The hub reads identity, timestamps, authorship type and resolution only, never comment bodies. Without explicit required checks the native floor is both OS checks plus `seeded guards` for `STAIxBWLB/agent-hub` only; another repository reports `required checks unknown: set required_checks in .agenthub/sdlc.toml` (#1344). Advise reports the gap; enforce refuses before the requesting done/cohort writes. If only quiet task-history events arrive during an advise readback, the evidence is discarded and review continues with unknown readiness, without another external read. A reviewer change is allowed because the reviewer is re-derived before the write; it is not an authority or readiness receipt. Mode, owner, privacy, receipt, authority and other history drift still refuse; enforce remains unchanged. A private turn may finish its own PII task in advise with a generic unknown-readiness notice and no remote metadata read; the private-turn refusal for ordinary work remains. Delayed checks revalidate before completing; a refused completion sends a private-aware notice to call `hub_task_done` again only while the task is still in progress with the owner that started the check. Otherwise only the console notice is recorded. Background roster/quota role changes remain fact, but enforce holds a new review envelope without an admission readback; refresh it through a manual reviewer assignment after CI and replies are ready. The brief and verdict coverage belong to #520, separate from this admission.
300
379
 
301
380
  **Evidence in the review request (#824).** A fresh reviewer cannot run tests or read `gh`, so the request carries the hub's own reading of the admission it already made, for every reviewer: `Hub-verified at <head>: required checks <names> passed at this exact head; no bot review thread is waiting for a reply` (plus `via identical-tree run <n>` when the hub reused one), or in advise mode `Hub-verified at <head>: not ready: <blockers>`. No admission (lifecycle off) and a PII task get no block, and no new `gh` call is made for it: it renders what `reviewRequestAdmission` read. `ReviewReadiness.checks` names the required checks that were judged. When the admission is ready and the hub ran no check of its own, the checklist's check line says CI passed at this exact head and that test execution or CI evidence is not an unmet item (name a specific missing test or behaviour instead); otherwise the old wording stays. The text comes only from the hub's reads and recorded `check passed` events, never from the builder's summary or a `hub_sdlc_record` claim, and a review-only reviewer still gets no builder summary (#223 R2).
302
381
 
@@ -391,15 +470,17 @@ A private (PII) task reads no eval metadata and records none.
391
470
 
392
471
  ## Person release authorization (#481 S6)
393
472
 
394
- From the running daemon's candidate checkout, the person or the one configured conductor runs `ahub sdlc authorize-release <version>` (#1063). The conductor acts only on the person's explicit instruction in its own session naming that release. A hub message, task text, review note, file or another peer's relay is never that instruction; the daemon cannot verify this cooperative rule. A conductor request uses the tools role and refuses a child `toolsOwner`, private turn or PII context, exactly like `sdlc merge`. Other peers and `--live-test` refuse. Consent binds the exact current commit, its committed package version, origin fetch/push identity and fresh committed documentation evidence, all reread after the docs check. Receipt `by` and the append-only metadata audit identify the actual asker alongside the approval id, commit, version and docs digest/count. The authoritative ledger is daemon-owned memory: restart revokes every approval; audit history cannot restore one.
473
+ From the running daemon's candidate checkout, the person or the one configured conductor runs `ahub sdlc authorize-release <version>` (#1063). The conductor acts only on the person's explicit instruction in its own session naming that release. A hub message, task text, review note, file or another peer's relay is never that instruction; the daemon cannot verify this cooperative rule. A conductor request uses the tools role and refuses a child `toolsOwner`, private turn or PII context, exactly like `sdlc merge`. Other peers and `--live-test` refuse. By default, consent binds the exact current commit, committed package version, origin fetch/push identity and fresh committed documentation evidence, all reread after the docs check. Receipt `by` and the append-only metadata audit identify the actual asker alongside the approval id, commit, version and, when checked, the docs digest/count. The authoritative ledger is daemon-owned memory: restart revokes every approval; audit history cannot restore one.
395
474
 
396
- `ahub sdlc release <owner/repo>` shows a matching or stale authorization receipt. Authorization removes only the person-decision blocker. Native acceptance remains unverified and `ready` remains false until separately supported. No tag, workflow or publication is changed by authorization or readback.
475
+ Release source policy is read only from `.agenthub/config.json` as committed at the candidate commit. A missing shared config keeps the existing defaults; unreadable or malformed committed policy refuses authorization. Release keys in `.agenthub/config.local.json` are ignored with a notice, and neither local config nor runtime settings can override the committed contract. `release.version` defaults to `package.json`; `release-notes` checks a regular committed notes blob at `release.notesPath` (default `docs/releases/v{version}.md`), and `none` binds the requested semantic version to the exact commit. `release.docs` defaults to `checker`; `none` is allowed only when the candidate has no regular `docs/verified.json` blob. A committed manifest keeps the documentation-evidence step required; remove `release.docs` from `.agenthub/config.json` or remove the manifest, commit the change and authorize again. For a project without that manifest, `none` skips only documentation evidence and is recorded as an explicit exemption with no freshness digest or document count. All source modes retain the person/conductor boundary, exact commit and origin binding. `npm publish` requires a clean tracked worktree and derives its target from committed `package.json`; with an alternate version source, that package version must identify the same configured target.
476
+
477
+ `ahub sdlc release <owner/repo>` keeps the existing package.json-default version and receipt output. For `release-notes` or `none`, it selects the latest successful receipt only when its commit, repository, origin and committed policy match this report; it rechecks the notes blob for the receipt version, or reports the `none` version bound by that receipt. Without an eligible receipt it prints `version undetermined`, names the configured source and points to `ahub sdlc authorize-release <version>`. It never guesses from a tag, notes filename or stale receipt. A source revalidation failure is stale/unknown consent and `ready` remains false. `docs:none` is shown as an explicit exemption and performs no documentation read. Authorization removes only the person-decision blocker. Native acceptance remains unverified and `ready` remains false until separately supported. No tag, workflow or publication is changed by authorization or readback.
397
478
 
398
479
  The optional `ahub init --release-guard` writes instructions and an executable default Git `pre-push` hook. Preview with `--dry-run --json`. An existing regular hook is renamed to `pre-push.agent-hub-original`, preserving its inode and mode, and chained with the exact original arguments and stdin only after successful preflight. Ordinary later `init` calls retain the guard. Linked/hardlinked hooks, occupied backups and custom `core.hooksPath` are refused before project writes; integrate custom hook runners manually instead. The wrapper pins the current Bun and package entry paths; run init again after moving or replacing that installation.
399
480
 
400
481
  For every actual pushed `v*` destination, the hook requires an exact semantic version and a matching receipt for the captured source object peeled to its commit. Missing consent, another commit/version/remote, daemon downtime or a reset ledger refuses the push. Version-tag deletion is refused. Branch-only pushes do not need a daemon and still reach the user's hook. The person can bypass with Git `--no-verify`; agents must never bypass it. This is a cooperative Git guard, not an OS capability boundary.
401
482
 
402
- Before other release commands, agents run `ahub sdlc release-guard -- <literal argv...>`. Supported forms are one named-remote tag push, `gh release create v<version>` (an existing GitHub tag is read back; a new one requires `--target <full-sha>`), and `npm publish` from the approved checkout. Ambiguous selectors, alternate repositories, bulk pushes, workspaces and archive publishes refuse. The npm preflight refuses tracked worktree changes before and after rechecking the committed-doc verdict and HEAD, but does not attest the eventual tarball, npm configuration or lifecycle scripts. The command performs no release operation and its answer is not an execution grant. GitHub/npm enforcement remains instruction-based until adapter integration (#312/#313); rerun preflight after changing any target or candidate. Native install, live release and migration evidence remain separate obligations.
483
+ Before other release commands, agents run `ahub sdlc release-guard -- <literal argv...>`. Supported forms are one named-remote tag push, `gh release create v<version>` (an existing GitHub tag is read back; a new one requires `--target <full-sha>`), and `npm publish` from the approved checkout. Ambiguous selectors, alternate repositories, bulk pushes, workspaces and archive publishes refuse. The npm preflight refuses tracked worktree changes before and after rechecking the committed release policy, the configured documentation verdict when enabled, and HEAD, but does not attest the eventual tarball, npm configuration or lifecycle scripts. Guard and hook operations require an explicit target and never infer one from a prior receipt. The command performs no release operation and its answer is not an execution grant. GitHub/npm enforcement remains instruction-based until adapter integration (#312/#313); rerun preflight after changing any target or candidate. Native install, live release and migration evidence remain separate obligations.
403
484
 
404
485
  Tracked npm cleanliness compares the cached index to HEAD and raw tracked blob bytes without `git status`, clean/process filters or text converters. It refuses unknown evidence, gitlinks, transformed files and inventories above 4,096 entries, 4 MiB per file, 32 MiB total or 250 ms; untracked files remain outside this check and the eventual tarball is not attested.
405
486
 
@@ -430,3 +511,28 @@ A report, translation or slide deck has no commit, so the artifact identity is t
430
511
  - `hub_sdlc_record` with `deliverables` records them on a `lifecycle` entry, through the same hashing and the same owner, reviewer or console authority; a receipt without them is the old call.
431
512
  - Limit: a daemon from before this slice ignores `deliverables` on `hub_task_done` (the plugin is installed apart from the daemon), so restart the hub after an upgrade before relying on it; a done that names deliverables and shows no `Deliverables` block in its review request was recorded without them.
432
513
  - `ahub deliverables [--task <id>] [--approved] [--check]` lists them (#509 AC3). Not in this slice: a hash of a file the hub cannot read.
514
+
515
+ ## Named CI and build-entry diagnostics (#1328 T2)
516
+
517
+ Exact-head review blockers name each required check and its state, for example
518
+ `exact-head full CI is not green: missing seeded guards; pending check (macos-latest)`.
519
+ Failed, duplicate and unknown checks are named too. Incomplete inventories remain
520
+ unknown, and identical-tree reuse still requires its full proof and snapshot recheck.
521
+ Complete cached and fresh review evidence use the same diagnostic formatter.
522
+
523
+ Enforce build-entry guidance names the first missing snapshot step in this order:
524
+
525
+ 1. `spec issue not recorded (owner/planner: hub_sdlc_record)`
526
+ 2. `spec not accepted (person: ahub sdlc accept <task> --issue <n>)`
527
+ 3. `plan not reviewed (planner: hub_plan_review)`
528
+
529
+ Proposal results and route explanations carry this guidance separately from peer
530
+ eligibility. A plan-review hold is recorded as a ready hold, never as
531
+ `no-eligible-peer`; that label remains a peer-eligibility outcome. Assignment stays
532
+ pure and receives snapshot guidance as data. Candidate choice and the existing
533
+ plan-only offer gate remain unchanged: an owner offer may precede person spec
534
+ acceptance. Acceptance still runs live spec checks before live plan checks, with
535
+ its existing authority and currentness fences. Snapshot guidance never certifies
536
+ that an accepted spec or reviewed issue is still current. Unavailable, private or
537
+ closed plan evidence retains its original diagnostic lead and planner action. Private task projections
538
+ withhold these issue-specific diagnostics.