@staix/agent-hub 0.44.0 → 0.46.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 (168) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +12 -11
  3. package/docs/adding-an-ai-tool.md +1 -0
  4. package/docs/agent-notes/adapters.md +35 -6
  5. package/docs/agent-notes/budget.md +2 -1
  6. package/docs/agent-notes/daemon.md +5 -1
  7. package/docs/agent-notes/local-worker.md +1 -1
  8. package/docs/agent-notes/security-review.md +3 -2
  9. package/docs/agent-notes/tasks.md +6 -2
  10. package/docs/agent-notes/tests.md +4 -3
  11. package/docs/design/adapters.md +20 -2
  12. package/docs/design/agent-hub-architecture.md +12 -0
  13. package/docs/design/agent-hub.md +1 -1
  14. package/docs/design/cli-output.md +2 -0
  15. package/docs/design/roadmap.md +158 -4
  16. package/docs/design/supervision.md +21 -1
  17. package/docs/design/task-board.md +32 -4
  18. package/docs/dogfood.md +28 -4
  19. package/docs/events.md +7 -3
  20. package/docs/influences.md +7 -0
  21. package/docs/memory.md +4 -4
  22. package/docs/operations.md +151 -36
  23. package/docs/quickstart.md +16 -4
  24. package/docs/research.md +16 -0
  25. package/docs/roadmap.json +4 -0
  26. package/docs/roadmap.md +9 -0
  27. package/docs/sdlc.md +15 -3
  28. package/docs/security.md +9 -7
  29. package/docs/smoke.md +1 -1
  30. package/docs/verification/2026-11-05-hardcoded-values-classification-rules.md +28 -0
  31. package/docs/verification/2026-11-19-claude-implementer-2.1.328.md +49 -0
  32. package/docs/verification/2026-11-20-claude-implementer-2.1.329.md +49 -0
  33. package/docs/verification/2026-11-20-sdlc-metrics-diagnosis.md +7 -0
  34. package/docs/verification/2026-11-21-0.45.0.md +69 -0
  35. package/docs/verification/2026-11-22-agy-1.5.14.md +27 -0
  36. package/docs/verification/2026-11-22-claude-instruction-hook.md +35 -0
  37. package/docs/verification/2026-11-22-codex-0171-reviewer-isolation.md +47 -0
  38. package/docs/verification/2026-11-22-instructed-ipc.md +9 -0
  39. package/docs/verification/2026-11-22-jcode-1.0.3.md +71 -0
  40. package/docs/verification/2026-11-22-jcode-separate-home.md +14 -0
  41. package/docs/verification/2026-11-22-qwen-0283-acp.md +28 -0
  42. package/docs/verification/2026-11-22-qwen-0283-dual-output.md +33 -0
  43. package/docs/verification/2026-11-22-roadmap-r5-view-receipt.md +63 -0
  44. package/docs/verification/2026-11-23-0.46.0.md +44 -0
  45. package/docs/verification/assets/1483-r5-detail-1440-light.png +0 -0
  46. package/docs/verification/assets/1483-r5-detail-390-light.png +0 -0
  47. package/docs/verification/assets/1483-r5-view-1440-dark.png +0 -0
  48. package/docs/verification/assets/1483-r5-view-1440-light.png +0 -0
  49. package/docs/verification/assets/1483-r5-view-390-dark.png +0 -0
  50. package/docs/verification/assets/1483-r5-view-390-light.png +0 -0
  51. package/docs/verification/assets/1483-r5-view-820-dark.png +0 -0
  52. package/docs/verification/assets/1483-r5-view-820-light.png +0 -0
  53. package/docs/verified.json +33 -27
  54. package/package.json +3 -2
  55. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  56. package/plugins/agent-hub/kimi-hook.js +4743 -4048
  57. package/plugins/agent-hub/kimi-review-policy-worker.js +5 -5
  58. package/plugins/agent-hub/server.js +1641 -1265
  59. package/plugins/agent-hub/skills/ahub/SKILL.md +17 -0
  60. package/plugins/agent-hub/skills/ahub-manage/SKILL.md +37 -0
  61. package/plugins/agent-hub/skills/ahub-status/SKILL.md +14 -0
  62. package/plugins/agent-hub/skills/ahub-use/SKILL.md +12 -0
  63. package/scripts/check-docs.mjs +9 -1
  64. package/src/adapters/acp.ts +11 -1
  65. package/src/adapters/claude-channel.ts +2 -1
  66. package/src/adapters/compat.ts +15 -14
  67. package/src/adapters/definitions/builtin-metadata.ts +2 -2
  68. package/src/adapters/definitions/native-cli-claude-setup.ts +9 -1
  69. package/src/adapters/definitions/native-cli-doctor.ts +8 -5
  70. package/src/adapters/definitions/native-cli-jcode-home-init.ts +158 -0
  71. package/src/adapters/definitions/native-cli-jcode-home.ts +72 -0
  72. package/src/adapters/definitions/native-cli-jcode-mcp.ts +20 -0
  73. package/src/adapters/definitions/native-cli-skills.ts +29 -0
  74. package/src/adapters/definitions/native-context.ts +10 -0
  75. package/src/adapters/jcode.ts +10 -0
  76. package/src/adapters/local-worker.ts +3 -2
  77. package/src/adapters/pi.ts +15 -4
  78. package/src/cli/claude-profile-hook.ts +40 -3
  79. package/src/cli/console-state.ts +58 -27
  80. package/src/cli/console-usage.ts +5 -3
  81. package/src/cli/console.ts +35 -4
  82. package/src/cli/help.ts +17 -10
  83. package/src/cli/identity.ts +4 -2
  84. package/src/cli/instruction-hook.ts +28 -0
  85. package/src/cli/jcode-mcp.ts +2 -1
  86. package/src/cli/main.js +8 -0
  87. package/src/cli/main.ts +149 -23
  88. package/src/cli/output-standard.ts +3 -55
  89. package/src/cli/output.ts +8 -2
  90. package/src/cli/recovery-package.ts +62 -13
  91. package/src/cli/roadmap-write.ts +59 -0
  92. package/src/cli/roadmap.ts +115 -4
  93. package/src/cli/sdlc-output.ts +4 -0
  94. package/src/cli/setup-homes.ts +1 -0
  95. package/src/cli/setup.ts +1 -1
  96. package/src/cli/skills-install.ts +463 -0
  97. package/src/cli/task-output.ts +1 -1
  98. package/src/cli/upgrade-presentation-flags.ts +1 -1
  99. package/src/cli/upgrade-runtime.ts +10 -6
  100. package/src/hub/agent-mem-range.ts +43 -0
  101. package/src/hub/board.ts +144 -5
  102. package/src/hub/budget-projection.ts +99 -0
  103. package/src/hub/check-runner.ts +25 -1
  104. package/src/hub/claude-launch-proof.ts +5 -1
  105. package/src/hub/conductor.ts +8 -3
  106. package/src/hub/config-apply.ts +6 -3
  107. package/src/hub/config-tier.ts +1 -1
  108. package/src/hub/config-trust.ts +1 -1
  109. package/src/hub/context-window.ts +1 -1
  110. package/src/hub/control-client.ts +9 -2
  111. package/src/hub/cost-governance.ts +11 -7
  112. package/src/hub/daemon.ts +707 -53
  113. package/src/hub/dogfood-read.ts +4 -2
  114. package/src/hub/edit-guard.ts +100 -0
  115. package/src/hub/events.ts +80 -9
  116. package/src/hub/execution-budget.ts +29 -8
  117. package/src/hub/facts.ts +57 -4
  118. package/src/hub/hub-tools.ts +3 -1
  119. package/src/hub/inference.ts +1 -1
  120. package/src/hub/instances.ts +10 -1
  121. package/src/hub/instructed-exact.ts +95 -0
  122. package/src/hub/instructed-intent.ts +64 -0
  123. package/src/hub/instructed-ipc.ts +33 -0
  124. package/src/hub/instructed-runtime.ts +19 -0
  125. package/src/hub/instruction-receipt.ts +218 -0
  126. package/src/hub/lifecycle.ts +6 -1
  127. package/src/hub/log-rotation.ts +130 -0
  128. package/src/hub/manager.ts +46 -3
  129. package/src/hub/memory-profile.ts +137 -21
  130. package/src/hub/no-writes.ts +1 -0
  131. package/src/hub/operational-authority.ts +3 -2
  132. package/src/hub/operational-settings.ts +2 -2
  133. package/src/hub/recovery-store.ts +49 -21
  134. package/src/hub/registry.ts +1 -1
  135. package/src/hub/research-experiments.ts +132 -0
  136. package/src/hub/research-quality.ts +8 -2
  137. package/src/hub/research-record.ts +35 -0
  138. package/src/hub/research.ts +128 -28
  139. package/src/hub/roadmap-check.ts +65 -0
  140. package/src/hub/roadmap-decompose.ts +139 -0
  141. package/src/hub/roadmap-export.ts +27 -0
  142. package/src/hub/roadmap-sync.ts +97 -0
  143. package/src/hub/roadmap.ts +59 -1
  144. package/src/hub/routing.ts +18 -1
  145. package/src/hub/runtime-capture-prune.ts +2 -1
  146. package/src/hub/sdlc-branch-ci.ts +128 -0
  147. package/src/hub/sdlc-merge.ts +6 -3
  148. package/src/hub/sdlc-metrics.ts +19 -5
  149. package/src/hub/sdlc.ts +73 -5
  150. package/src/hub/settings.ts +3 -1
  151. package/src/hub/snapshots.ts +13 -1
  152. package/src/hub/startup-event-seeds.ts +21 -15
  153. package/src/hub/startup-timing.ts +3 -1
  154. package/src/hub/supervision-proposals.ts +10 -2
  155. package/src/hub/supervision-rules.ts +26 -3
  156. package/src/hub/supervision.ts +7 -0
  157. package/src/hub/task-pr.ts +47 -0
  158. package/src/hub/task-worktree.ts +18 -11
  159. package/src/hub/tasks.ts +694 -44
  160. package/src/hub/ui.ts +6 -2
  161. package/src/hub/usage-rollup.ts +77 -22
  162. package/src/local/tools.ts +13 -1
  163. package/src/memory/client.ts +3 -2
  164. package/src/pi/extension.ts +15 -3
  165. package/src/pi/tool-receipts.ts +26 -0
  166. package/src/ui/index.html +342 -8
  167. package/src/ui/plugin.ts +6 -2
  168. package/src/ui/roadmap-model.ts +70 -0
@@ -9,7 +9,7 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
9
9
  - A fixture that walks a policy table (a `COMPAT` entry list, a registry) derives its per-entry values from the table, never a fixed list of keys or versions a planned entry is not in: the compat watch test builds every served version and the ahead/unknown row from `COMPAT[id]`, so an added entry (`pi`, #843 AC2) is covered without editing the test.
10
10
  - Tests that are not about batching build the bus with `batchMs: 0`; with the default 15 s window a lone status envelope looks like a lost message.
11
11
  - A test that writes an executable shim and then times a product call through it (a `git` wrapper on `PATH`, as `test/memory-code-head-684.test.ts` does) runs the shim once by absolute path first, outside the measured region: the first exec of a newly written executable costs about 250 ms on macOS (#519). Never widen the product's bound or weaken the assertion for it.
12
- - A test timeout that fires while `Bun.spawnSync` runs can start the next test inside spawnSync's own event loop (Bun 1.3.14 and 1.4.2; not rechecked on 1.4.4; background: README). `scripts/check.sh` runs tests with a 20 s timeout and under `scripts/hang-watch.sh`; a test that spawns and reads the process table gets a timeout of its own, never above 20 s: an explicit larger timeout overrides the gate's `--timeout 20000`, so shorten the scenario instead.
12
+ - A test timeout that fires while `Bun.spawnSync` runs can start the next test inside spawnSync's own event loop (Bun 1.3.14 and 1.4.2; not rechecked on 1.4.4; background: README). `scripts/check.sh` runs tests with a 20 s timeout and under `scripts/hang-watch.sh`; a test that spawns and reads the process table gets a timeout of its own, never above 20 s: an explicit larger timeout overrides the gate's `--timeout 20000`, so shorten the scenario instead. Narrow exception (person's ruling 2026-11-20, #1577): a test that must keep a real multi-second process may set its own timeout above 20 s only when its body has a deadline, every cleanup wait is bounded, and the body deadline plus the cleanup bounds stay below the test timeout, so the timeout can never fire inside a `spawnSync`. The instances are `test/conductor-recovery-process.test.ts` (60 s: 30 s body deadline, post-receipt waits of 6 s each, cleanup waits of 3 s each) and `test/staged-project-isolation.test.ts` (90 s: 45 s body deadline, cleanup waits of 6 s each; its body keeps two real daemons and a real upgrade CLI child and took 14.7 s in a green macOS shard run, so the gate's 20 s left no room for a slower one).
13
13
  - Sandboxed commands and the MLX server get a fixed environment (`PATH`, `HOME` and their own keys), so test knobs for their fakes travel in a wrapper script or argv, not in `process.env`. Daemon-owned peer children use `peerChildEnv`, which drops `ORCA_*` and replaces agent identity markers; a person-owned native launch preserves only its own pane's `ORCA_*` context while dropping inherited agent identity.
14
14
  - Bind agent identity markers explicitly in native/CLI fixture children. The full gate starts the test runner without inherited agent markers (including `AGENTHUB_DELIVERY_ONLY`) and without an `ahub claude` session's hub variables (`AGENTHUB_PROJECT_DIR`, `AGENTHUB_STATE_DIR`, `AGENTHUB_INSTANCE_ID`, `AGENTHUB_LAUNCH_ID`); a new variable a native session exports and a fixture child reads joins that `env -u` list in `scripts/check.sh`. Never weaken production marker detection to make them pass.
15
15
  - A fixture that spawns the real channel plugin (`src/adapters/claude-channel.ts` or `plugins/agent-hub/server.js`) to act as a peer runs it with `cwd` at the hub's project root, made with `realPath` (the macOS temp dir is a symlink). The plugin chooses its hub through `channelProject` (rule: `daemon.md`), so from another cwd it joins the wrong hub, joins as a distinct session or connects nowhere. Only tools mode with both `AGENTHUB_STATE_DIR` and `AGENTHUB_PROJECT_DIR` set skips that check. A fixture whose plugin must push as a channel (not fall back to tools mode) injects the parent row with `syntheticClaudeParentEvidenceSetup()` (`test/fakes/claude-channel-parent.ts`, #1171), which replaces only `claudeParentCommandPort.read`; the production marker and classifier still run, so never stub `classifyClaudeParentCommand` or skip the evidence check. For an unchanged published bundle with an inlined observer port, use the published-leg raw port-fact injection in `test/published-protocol-compat.test.ts`: bootstrap its import with Bun's built-in `mock.module` only for `child_process` and `node:child_process`, export the real functions and replace only `spawnSync` for `/bin/ps -ww -p <direct-parent-pid> -o command=`. Return `SYNTHETIC_CLAUDE_PARENT_COMMAND` from the same fixture helper and delegate every other call. Preserve the bundle bytes, classifier, inherited marker, parent-identity check, assertions and timeouts. This synthetic host observation is not native-launch acceptance. A second opted-in session attached while a fixture owner holds the peer stays a standby (#1174): close the owner and wait for offline before attaching the session under test (`test/channel-inbox-daemon.test.ts`).
@@ -39,6 +39,7 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
39
39
 
40
40
  - `scripts/check.sh` pins the test environment (#610): `GIT_CONFIG_GLOBAL=/dev/null`, `NO_COLOR` unset, `TERM=xterm-256color`, temp root under the OS per-user temp dir, agent markers cleared. A test that needs a person's git config or color settings sets them itself. `--changed` selects tests with `scripts/changed-tests.mjs`: changed tests (nested suites included) plus every test that names a changed file directly; docs need none; any other changed file no test names, and any gate, package or shared-fixture change, runs everything.
41
41
  - `scripts/check.sh` holds the repo's heavy-job slot (`<git common dir>/ahub-heavy.lock`, #398) for the whole run, so a test never runs the real gate; `test/check-lock.test.ts` runs a copy in a scratch repo.
42
+ - A red gate names its step (#1577 entry 3): `scripts/check.sh` wraps each once-only step in `step NAME CMD...` and prints `check: FAILED step '<name>' (exit N)` through `failed_line` (plus a `::error` annotation under GitHub Actions); after `bun test` it adds the failing-test count, the first `(fail)` line and the last test file header, read from the summary file `scripts/progress-tee.sh FILE SUMMARY` writes, or says the runner exited or was signalled with no `(fail)` line, and names the leak scan. That count is distinct `(fail)` rows: bun prints every failing test again in its `N tests failed:` recap after the last file, byte for byte, and the recap carries no file header, so the last header is still the file that was running. A new step in the gate goes through `step`, and `test/check-failure-names.test.ts` runs the real script against a fake `bun` to prove each path. It changes no exit status and adds no retry.
42
43
  - The whole-suite watchdog is `scripts/hang-watch.sh PID SECONDS [PROGRESS_FILE QUIET_SECONDS]` (#115, #516). `scripts/check.sh` sends bun's stderr (where it prints results) through a fifo to `scripts/progress-tee.sh FILE`, which forwards every line unchanged and appends one byte to FILE per `(pass)`, `(fail)`, `(skip)` or `(todo)` line and per test file header (under mawk only with `-W interactive`: mawk reads a pipe in blocks, so without it nothing counts until the input ends, #883); the watchdog stops the suite when FILE has not grown for `AHUB_CHECK_QUIET_S` (default 300, set in `.github/workflows/check.yml`, above the 120 s of the longest explicit test timeout). That is the hang detector, so a slow suite that keeps passing tests is never cut, and a test that logs without finishing is not progress. `AHUB_CHECK_HANG_S` (default in `scripts/check.sh`, 2700 s since #1564: healthy full runs exceeded the earlier 2250 s backstop while still reporting passing tests; hosted values for both OSes in `.github/workflows/check.yml`; #378, #593) is only the backstop for a run that keeps printing results while hung: raise it, with the job's `timeout-minutes` (room above it for setup), only when a healthy run nears it, never for a hung test, and keep the per-test 20 s timeout. The two-argument form (no file) is the old total-time bound, still used by the CI timing job and `scripts/seeded-check.ts`. A fifo and a filter of its own, never a pipe (`$!` must stay bun's pid) and never a process substitution (it cannot be waited on with a bound); `scripts/progress-tee.sh` is in the `--changed` FULL list. `test/hang-watch.test.ts` covers the watchdog, the filter and the fifo wiring.
43
44
  - A seed's named test must run on Linux, where the seeded job runs: a darwin-only test reports no result there and fails the job (#382). Cover a macOS-only protection with its regression test instead.
44
45
 
@@ -49,8 +50,8 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
49
50
  - A daemon test that writes a config file and then calls `settings_reload` passes `configWatch: false` (`DaemonOptions`, #546), unless the watcher is what it tests. The daemon's file watcher (100 ms poll, 100 ms debounce) publishes the same bytes, so whichever of the two runs second reports `applied: []`, and a watcher pass between a preview and its confirm replaces the confirmation token. Never lengthen a sleep or loosen `applied` for it; the watcher has its own tests in `test/settings-reload-daemon.test.ts`.
50
51
  - A daemon test of a tool that reaches a public host passes the host-only transport seam (`DaemonOptions.webFetchTransport`, #553) and asserts what the daemon handed the tool, never a real round trip or a longer wait. The tool, the proxy URL and the allowlist stay the daemon's own; only the request is replaced. The proxy's own behaviour has its tests in `test/proxy.test.ts` and the web-proxy block of `test/web-fetch.test.ts`.
51
52
  - The preload leaves `HOME` unchanged and clears inherited `CLAUDE_CONFIG_DIR` and `CODEX_HOME`; tests that need fixture selectors set them after preload. A test that spawns `ahub setup`, `ahub autonomy` or `ahub init` under machine defaults, or reaches `discoverClaudeHomes` or the profile hook, sets `HOME`, `CLAUDE_CONFIG_DIR`, `AGENTHUB_HOME` and `AMEM_HOME` to temp directories, as `test/autonomy-machine-cli.test.ts` does; unit tests pass `{ home, env }` instead of `process.env`. A test that runs `ahub doctor` through the CLI also sets `CODEX_HOME` to a temp directory and puts a fake `amem` first on PATH, because doctor runs `amem setup <tool> --json` (#1025, `test/doctor-memory-capture.test.ts`).
52
- - Raising the `@staix/agent-mem` exact pin moves its version literal in `test/memory.test.ts`, `test/memory-profile.test.ts`, `test/memory-profile-daemon.test.ts` and `test/doctor-model-aliases.test.ts` in the same PR. Any other test edit in a pin raise adapts a fixture to a changed package contract (an index file name, a transport read before screening) with a comment naming the package version; never weaken an assertion to pass a raise. A test that names a package file reads the name from what the store creates (`indexFileOf` in `test/memory-store.test.ts`), never a fixed `index.db`.
53
- - `test/fixtures/release-n-1` and `test/fixtures/protocol-v16` are separately exact-locked published packages (own `bun.lock`, installed by `scripts/check.sh`), never root dependencies, and `PUBLISHED_FIXTURES` in `test/published-protocol-compat.test.ts` pins their versions and compatibility metadata. In a minor release PR, retarget release N-1 to the latest stable patch of the preceding minor together with the version bump; update its package manifest, lockfile and `PUBLISHED_FIXTURES` row, including the exact amem dependency and protocol read from the published package (AGENTS.md Releasing step 1, procedure in `docs/operations.md` #1164). The guard requires the fixture minor to be the package minor minus one. protocol-v16 stays at its version while protocol 16 is promised (#1168).
53
+ - The `@staix/agent-mem` dependency is a declared range (`>=X.Y.Z <M.0.0`), so tests read the installed release (`import.meta.resolve` plus its `package.json`) instead of a literal: `test/memory.test.ts`, `test/memory-profile.test.ts`, `test/memory-profile-daemon.test.ts`, `test/doctor-model-aliases.test.ts` and the recovery-package fixtures derive their expected version that way, and a range raise moves only `package.json` and `bun.lock`. Any other test edit in a range raise adapts a fixture to a changed package contract (an index file name, a transport read before screening) with a comment naming the package version; never weaken an assertion to pass a raise. A test that names a package file reads the name from what the store creates (`indexFileOf` in `test/memory-store.test.ts`), never a fixed `index.db`.
54
+ - `test/fixtures/release-n-1` and `test/fixtures/protocol-v16` are separately exact-locked published packages (own `bun.lock`, installed by `scripts/check.sh`), never root dependencies, and `PUBLISHED_FIXTURES` in `test/published-protocol-compat.test.ts` pins their versions and compatibility metadata. In a minor release PR, retarget release N-1 to the latest stable patch of the preceding minor together with the version bump; update its package manifest (an `overrides` entry pins amem to an exact version when the published package declares a range), lockfile and `PUBLISHED_FIXTURES` row, with `memoryRange` as the published package declares it, `memoryVersion` as the fixture lock resolves it, and the protocol read from the published package (AGENTS.md Releasing step 1, procedure in `docs/operations.md` #1164). The guard requires the fixture minor to be the package minor minus one. protocol-v16 stays at its version while protocol 16 is promised (#1168).
54
55
  - Keep CI's Bun version sourced from `.bun-version` through the pinned setup-bun action; update the version file rather than adding per-job version literals.
55
56
  - Release verification requires both OS checks and the aggregate `seeded guards` success for an identical tree, a tag matching `package.json` on `origin/main`, and fresh ancestor-bound documentation stamps. Preserve the separate npm OIDC publish job and GitHub Release write job; neither job gets the other's credential authority.
56
57
  - `test/conformance/` runs real adapters against fake transports. The shared kit and the transport fakes live in `src/adapters/conformance/` (public `@staix/agent-hub/conformance`); `test/conformance/kit.ts` and the matching `test/fakes/*.ts` only re-export them, so change the packaged file, and `--changed` runs everything for it; `test/conformance/enrollment.ts` enrolls every `ADAPTERS` definition, each `:reviewer` variant and each `:implementer` (`headlessVariant`) variant. Record a case that does not apply in its `UNSUPPORTED` or `UNSUPPORTED_LEGS` map with a concrete reason naming the dedicated coverage, never `test.skip` or synthetic success, and never change native production behavior to satisfy a generic case.
@@ -50,6 +50,22 @@ Optional ports have explicit meaning: absent keeps the generic path, while prese
50
50
 
51
51
  Adapters translate different interaction surfaces without changing the peer's task identity. Claude's plugin channel connects through MCP and the hub control service; Codex is proxied through app-server; ACP peers share an ACP transport; Pi uses its extension bridge. Kimi defaults to a pull-only TUI, with headless ACP as a separate selected form under the same peer id. The TUI does not inherit headless push, session, or recovery behavior. Keeping forms distinct lets the hub preserve the native user interaction model while enforcing one role and delivery policy ([#316](https://github.com/STAIxBWLB/agent-hub/issues/316), [#625](https://github.com/STAIxBWLB/agent-hub/issues/625)).
52
52
 
53
+ ## Exact instructed CLI authority
54
+
55
+ A managed Claude session may request one exact command from a confirmed instruction receipt. The daemon derives the command from the session transcript, never from the tools client's request. It admits only explicitly classified console or conductor forms outside the closed trust, permission, machine-local path, irreversible deletion, release, identity and PII classes. Unknown forms stay closed. Exact mode consumes the receipt before execution; Stop, expiry, a session replacement, privacy changes or loss of managed-launch proof revoke an in-flight operation.
56
+
57
+ The exact list includes a no-manifest task claim verdict with a task id, slot and closed verdict value. The confirmed command supplies all three; the child cannot substitute any of them. File-backed claim verdicts and extra model metadata remain closed.
58
+
59
+ Exact backlog creation accepts only the title typed by the person in the confirmed command. Exact study approval names an existing campaign and revision; its created content comes from the public board contract. The daemon screens the instruction, operands and any study contract before the effect and rechecks the receipt and referenced state. The screen is not declassification: agent-authored public text remains closed.
60
+
61
+ Exact `backlog pin` and `pull-ready` use the person-typed reason after screening the confirmed instruction and operands. The board rechecks instruction authority after its own asynchronous screen and records the receipt in planning history. Exact `title` is restricted to a named hub-local session: the confirmed command, operands and previous title are screened, the receipt and previous title are checked at the local write, and the result supplies the person-run undo. Unnamed sessions and native Pi title writes stay closed; their undo or revocation fence is not proven. `backlog plan` stays closed because its JSON fields require quotes refused by the exact tokenizer.
62
+
63
+ In intent mode the tools client selects a command, and the daemon admits only the closed intent forms against that session's confirmed receipt. The receipt admits at most ten operations; a person verdict also requires its literal item id in the person's confirmed prompt, and a task claim verdict requires both task id and slot. Person verdicts are an explicit exception to reversibility and have no undo. An operation is reserved before execution and Stop, expiry, session replacement, privacy changes or loss of launch proof revoke its in-flight authority. Spending settings and the same dangerous classes remain closed. Fresh mode witnesses default to intent; retained off and exact witnesses keep their values.
64
+
65
+ Intent does not admit role settings, which are trust settings, or file-backed claim verdicts. Intent task creation, splitting, study approval and free-text forms remain deferred pending a person-approved declassification design. Exact backlog split remains closed because the exact tokenizer rejects the quotes required by its JSON operand. Cross-project handoff is closed in both instructed modes because the destination cannot check receipt revocation at its write. Roadmap settlement is admitted for `roadmap state <id> done|dropped` only (#1622 family 4): the milestone id must be written literally in the person's prompt, exact mode admits the same form, and the history entry records the instructed provenance (`docs/design/roadmap.md`). Other roadmap states stay with the person.
66
+
67
+ The daemon starts its own captured installed CLI using Bun IPC and routes that child's messages through the existing control handler with host-owned receipt and peer provenance. The child never opens a WebSocket. A runtime in any checkout, project root or peer write root is refused. Same-user debugging, socket duplication, or modification of the installed package remains outside this proof.
68
+
53
69
  ## Qwen deny input fence (#888)
54
70
 
55
71
  A successfully appended `allowed: false` has a known delivery disposition, but
@@ -528,12 +544,14 @@ When a quote-bearing review reaches a peer without a stable native session ID, t
528
544
 
529
545
  The local worker binds review observer exclusion to its actual input envelopes before awaiting model or tool work. An anchored `hub_review` submission latches that exclusion for the rest of the batch/turn, including sibling and later tool calls. While latched, `hub_remember` and `hub_task_propose` are refused before reaching the host task tools; the caller can retry them in a later ordinary turn. Such turns do not call capture, commit review messages into later model history, or put provider error text and partial model text in failure logs. A later ordinary local turn resumes ordinary history and capture without inheriting the review payload. This is distinct from the PII policy: a public review package retains ordinary task authority and does not acquire an on-campus-only model route. Vendor-native histories remain owned by their adapters; the hub's current-turn and named-parent observer provenance is described in [the bus contract](bus.md#review-observer-provenance-1056).
530
546
 
531
- ## Headless Record boundaries (#1320)
547
+ ## Owned Record boundaries (#1320, #1549)
532
548
 
533
- Only a host-owned getter supplies the imported agent-mem instruction at an admitted headless turn boundary, after owned input and busy state exist and before the native prompt/model request. Multi-call local turns keep one fixed prompt. Native-client prompts, steer, Claude hooks and isolated reviewers keep their separate surfaces. A getter failure omits optional Record guidance and does not change ordinary routing. The production getter reads the public `recordsEnabled(activeHome, executionCwd)` accessor from the exact-pinned amem package; either machine or repository false disables the optional Record path. Its boolean revision is not a privacy-policy fingerprint: current package and hub screens are rechecked separately before effects.
549
+ Only a host-owned getter supplies the imported agent-mem instruction at an admitted headless turn boundary or a verified Pi TUI hub-delivered turn boundary, after owned input and busy state exist and before the native prompt/model request. Pi TUI binding requires a current verified process and session, and keeps the same turn, owner, privacy and policy fences as headless. Multi-call local turns keep one fixed prompt. Native-client prompts, steer, Claude hooks and isolated reviewers keep their separate surfaces. A getter failure omits optional Record guidance and does not change ordinary routing. The production getter reads the public `recordsEnabled(activeHome, executionCwd)` accessor from the exact-pinned amem package; either machine or repository false disables the optional Record path. Its boolean revision is not a privacy-policy fingerprint: current package and hub screens are rechecked separately before effects.
534
550
 
535
551
  Model final output uses a host-only final-answer callback distinct from explicit send tools and diagnostic messages. Only normal completion can append Record rows; partial output is stripped for sharing without certifying a settled record. Capture binds immutable owner, turn, session/generation, execution cwd, profile and policy identity. Replacement, exclusion or unsafe steering revokes the frame before any later append. This grants no task, permission, native consumption or model acceptance authority.
536
552
 
553
+ Pi context occupancy is the last assistant prompt's input plus cache read and cache write counters against the current native model's context window, never cumulative consumption. The extension reports model and occupancy through the authenticated owner bridge; the adapter admits readings only for the current verified session and turn. Missing or invalid components remain unknown. The verified TUI session's native model is session evidence, while a configured choice without native observation remains configured evidence.
554
+
537
555
 
538
556
  ## Restoration launch diagnostics (#1426)
539
557
 
@@ -45,6 +45,18 @@ External adapter modules are opt-in, pinned at startup, and limited to the accep
45
45
 
46
46
  The control WebSocket binds to loopback, requires a per-run token and rejects browser-origin requests. That token is not an OS security boundary against a same-user process that can read it. The agent-session identity path classifies CLI calls as the acting peer rather than the person, so received text cannot grant the person's authority. This keeps caller identity honest without claiming a hostile-process boundary ([#193](https://github.com/STAIxBWLB/agent-hub/issues/193)).
47
47
 
48
+ The Claude instruction hook records only bounded pending evidence and grants no authority. Exact mode may consume one confirmed receipt to execute a closed, classified command through a daemon-owned installed CLI over inherited IPC; the control request supplies no command or arguments. Confirmation is host-only: it binds a fresh prompt ID and canonical hash to an unused human command record in the daemon's own peer/session transcript under a setup-managed Claude home and current private managed launch. Stop, expiry and an operation limit close the evidence. A same-user process able to alter the session transcript or its environment is outside this provenance boundary.
49
+
50
+ Exact task claim verdicts admit only the no-manifest task id, slot and verdict form. These operands come from the confirmed transcript, and the one-use receipt is consumed before recording the verdict; no file-backed or model-metadata variant is admitted.
51
+
52
+ Exact backlog creation and study approval screen the confirmed instruction and the command operands before any effect. Only text the person typed in the exact command is declassified; screening does not declassify agent-authored text. Study approval is limited to an existing public campaign and its screened, unchanged board content. Unknown or private screening results fail closed.
53
+
54
+ Exact backlog pinning and planned pulls screen the person-typed reason and recheck receipt authority after asynchronous admission, immediately before the board write. A named hub-local session title can be changed only after screening the old and new title and fencing the old title and receipt at the synchronous local write; the previous title is returned for a person-run undo. Unnamed and native Pi sessions remain closed for instructed title writes. JSON-backed backlog planning remains closed under the exact tokenizer.
55
+
56
+ Intent mode accepts a command selected by the tools client only from its explicit list and revalidates the confirmed session evidence for each use. Reversible forms are limited to ids, peer names and enums; explicitly listed person verdicts are the exception and have no undo. A verdict requires the literal item id in the confirmed prompt; a task claim requires both the task id and slot. Ten operations, Stop or expiry close the receipt. Spending settings, other closed classes, PII and private turns do not gain authority. The agent must perform only the person's requested work. User-origin history and audit retain the instructed peer and receipt, never the prompt text.
57
+
58
+ An absent mode witness means the current default intent without writing a row; only off and exact display copies seed a witness, and an unreadable copy seeds off. An explicit intent witness or raw intent config requires a recovery target with `instructed_intent`. An older target may recover a project with only the implicit default, using its narrower exact default; it cannot parse an explicit intent value.
59
+
48
60
  Authority is role-scoped: the person retains decisions requiring judgment or consent; one configured conductor may perform audited operations within its project; ordinary peers receive role- and task-bound operations. Release consent remains person-originated: the person may record it, or the conductor may record it only on the person's explicit instruction in that session. That provenance is cooperative, not daemon-verifiable; model text, tasks, reviews, files, and peer relays do not count. This prevents task content from silently becoming authorization ([#812](https://github.com/STAIxBWLB/agent-hub/issues/812), [#481](https://github.com/STAIxBWLB/agent-hub/issues/481), [#787](https://github.com/STAIxBWLB/agent-hub/issues/787), [#1063](https://github.com/STAIxBWLB/agent-hub/issues/1063)).
49
61
 
50
62
  Native tools keep their vendor permission and execution boundaries. The local worker applies path and permission checks to its tools, and runs command execution through a host-supported sandbox; the hub does not sandbox vendor-native tools or claim all ACP commands are isolated. This avoids confusing a hub permission mode with execution confinement ([#39](https://github.com/STAIxBWLB/agent-hub/issues/39), [#270](https://github.com/STAIxBWLB/agent-hub/issues/270)).
@@ -50,7 +50,7 @@ and the CLI, preserving unknown evidence and count-only private membership
50
50
  | Messages have durable delivery evidence, and uncertain attempts are distinct from task completion. | A restart, failed notification or retry must not silently repeat work or approve a task ([#37](https://github.com/STAIxBWLB/agent-hub/issues/37), [#1079](https://github.com/STAIxBWLB/agent-hub/issues/1079)). |
51
51
  | Hub-owned traffic uses in-process model routes and OmniRoute; native subscription traffic keeps its native authentication. | This separates peer policy, per-call model selection and provider credentials without a second routing sidecar ([#553](https://github.com/STAIxBWLB/agent-hub/issues/553)). |
52
52
  | Host policy screens private task and turn text before shared projection, memory or model use, with positive campus admission where PII-sensitive inference requires it. | A missing network fact or a model-selected destination is not privacy authorization ([#198](https://github.com/STAIxBWLB/agent-hub/issues/198), [#230](https://github.com/STAIxBWLB/agent-hub/issues/230)). |
53
- | Portable memory comes from exact-pinned first-party amem; the hub keeps caller and privacy policy. Legacy claude-mem is import-only. | One storage core avoids competing memory implementations and dependence on an external worker for runtime recall and capture ([#752](https://github.com/STAIxBWLB/agent-hub/issues/752)). |
53
+ | Portable memory comes from first-party amem on a declared range below the next major, gated by its host API range; the hub keeps caller and privacy policy. Legacy claude-mem is import-only. | One storage core avoids competing memory implementations and dependence on an external worker for runtime recall and capture ([#752](https://github.com/STAIxBWLB/agent-hub/issues/752)). |
54
54
  | Code review, automated checks, hosted CI and native/live verification remain distinct evidence. | A code-only reviewer or a passing fixture cannot certify a real account, sandbox or provider interaction ([#852](https://github.com/STAIxBWLB/agent-hub/issues/852)). |
55
55
  | Ordinary peer, configured conductor and person authority are different; release consent originates in the person's explicit decision. | Model output and relayed peer messages cannot grant privileged operational or release authority ([#812](https://github.com/STAIxBWLB/agent-hub/issues/812), [#1063](https://github.com/STAIxBWLB/agent-hub/issues/1063)). |
56
56
 
@@ -16,6 +16,8 @@ paths:
16
16
 
17
17
  # CLI output standard v1
18
18
 
19
+ The canonical standard is the first-party package's [standard-v1.md](https://github.com/STAIxBWLB/cli-output/blob/v0.1.3/docs/standard-v1.md). The notes below describe the hub's implementation and compatibility boundaries. The hub uses shared Report primitives, paint and wrapping. A fallback preserves legacy code-point splitting and non-positive widths pending [cli-output issue 36](https://github.com/STAIxBWLB/cli-output/issues/36); the existing table stays local pending [issue 37](https://github.com/STAIxBWLB/cli-output/issues/37).
20
+
19
21
  Version 1. This is a contract for the `ahub` family and every CLI under development; a change to it bumps the version. It is committed under the design-spec vocabulary as `type: module` because `ahub specs check` accepts only goal, architecture, module and submodule (issue #1484 asked for `type: contract`; the validator's fixed vocabulary wins, and the `contract` tag marks the intent).
20
22
 
21
23
  ## Why
@@ -10,6 +10,10 @@ paths:
10
10
  - src/hub/roadmap-view.ts
11
11
  - src/hub/roadmap-unplaced.ts
12
12
  - src/hub/roadmap-triage.ts
13
+ - src/hub/roadmap-decompose.ts
14
+ - src/hub/roadmap-check.ts
15
+ - src/hub/roadmap-sync.ts
16
+ - src/hub/roadmap-export.ts
13
17
  - src/hub/github-import.ts
14
18
  - src/hub/specs-task.ts
15
19
  - src/hub/board.ts
@@ -18,9 +22,16 @@ paths:
18
22
  - src/hub/daemon.ts
19
23
  - src/hub/restart.ts
20
24
  - src/cli/roadmap.ts
25
+ - src/cli/roadmap-write.ts
26
+ - src/cli/console.ts
27
+ - src/cli/console-state.ts
21
28
  - src/cli/main.ts
22
29
  - src/cli/help.ts
23
30
  - src/cli/identity.ts
31
+ - src/hub/ui.ts
32
+ - src/hub/manager.ts
33
+ - src/ui/index.html
34
+ - src/ui/roadmap-model.ts
24
35
  - test/roadmap.test.ts
25
36
  - test/roadmap-board.test.ts
26
37
  - test/roadmap-daemon.test.ts
@@ -28,8 +39,19 @@ paths:
28
39
  - test/roadmap-recovery.test.ts
29
40
  - test/roadmap-unplaced.test.ts
30
41
  - test/roadmap-triage-tasks.test.ts
42
+ - test/roadmap-decompose.test.ts
31
43
  - test/roadmap-r3-cli.test.ts
32
44
  - test/roadmap-r3-daemon.test.ts
45
+ - test/roadmap-check.test.ts
46
+ - test/roadmap-sync.test.ts
47
+ - test/roadmap-export.test.ts
48
+ - test/roadmap-write.test.ts
49
+ - test/roadmap-r4-daemon.test.ts
50
+ - test/ui-roadmap.test.ts
51
+ - test/ui-roadmap-daemon.test.ts
52
+ - test/console-roadmap.test.ts
53
+ - test/check-roadmap.test.ts
54
+ - scripts/check-roadmap.mjs
33
55
  ---
34
56
 
35
57
  # Roadmap milestones
@@ -39,9 +61,12 @@ R1 implements [#1479](https://github.com/STAIxBWLB/agent-hub/issues/1479) of the
39
61
  the source of truth. R1 adds no GitHub writes, roadmap model calls, export,
40
62
  automatic task assignment, dashboard or console UI. R3 ([#1481](https://github.com/STAIxBWLB/agent-hub/issues/1481),
41
63
  "Bottom-up placement" below) adds the first roadmap model call and read-only GitHub
42
- reads, and still adds no GitHub write.
64
+ reads; R2 part 1 ([#1480](https://github.com/STAIxBWLB/agent-hub/issues/1480), "Decomposition" below)
65
+ adds a second model call over the same read-only path. Neither adds a GitHub write.
43
66
 
44
- R1 adds no generation, triage or decomposition call; those belong to R2 and R3.
67
+ R1 adds no generation, triage or decomposition call; those belong to R2 and R3. R2
68
+ part 1 is the read-only proposal only: nothing is intaken, linked or published, and
69
+ accepting a part or writing to GitHub is a later part.
45
70
  The existing mandatory privacy screen on planner-written text stays exactly as
46
71
  `Tasks.newRelease` applies it, including on milestone title and outcome. It fails
47
72
  closed where newRelease does and is never bypassed.
@@ -71,7 +96,14 @@ Edits require the revision returned by show. Every write uses a transactional
71
96
  revision compare-and-set. Link changes and their history/revision update commit
72
97
  together. An identical link/unlink replay changes nothing. History contains at
73
98
  most 256 metadata events: actor, time, event, field names and link kind, never
74
- task text or the linked task id. Ordinary mutations reserve the last event slot
99
+ task text or the linked task id. A `done` or `dropped` verdict the person typed
100
+ through an instructed session (#1622 family 4) also carries the three keys task
101
+ history uses, `instructed: true`, `instructedPeer` and `instructionReceipt`
102
+ (spread from `instructedHistory`, never a milestone-only shape). The parser
103
+ accepts them only together, only on a `state` entry whose fields are exactly
104
+ `["state"]`, with a lower-case peer id and a receipt UUID; the write path
105
+ (`Board.writeMilestone`) refuses them on any change that is not a settlement.
106
+ They carry no prompt text, session id or transcript path. Ordinary mutations reserve the last event slot
75
107
  for the person's done/dropped settlement, so reaching the ordinary-write ceiling
76
108
  cannot strand an active milestone. Duplicate link/unlink replays consume no slot.
77
109
 
@@ -134,10 +166,80 @@ person-only, and live-test delegation cannot write milestone content.
134
166
 
135
167
  Rows are preserved in the same hub database through restart. Retained milestone
136
168
  state requires the roadmap capability on a controlled recovery target and adds
137
- its ordered row/link digest to integrity. Empty databases retain the existing
169
+ its ordered row/link digest to integrity. A daemon that predates the instructed
170
+ keys throws when it parses a history row holding them, so a recovery target must
171
+ advertise `roadmap_instructed` while any milestone history holds one
172
+ (`Board.hasInstructedMilestoneHistory`); with none, the floor is unchanged and a
173
+ target without the feature is accepted. There is no rewrite on downgrade:
174
+ dropping the keys would erase the only record that the verdict was instructed. Empty databases retain the existing
138
175
  format floor and integrity shape; the additive tables do not advance the database
139
176
  format marker.
140
177
 
178
+ ## Decomposition (R2)
179
+
180
+ R2 turns a milestone into the parts of work that deliver it. Part 1 is the read-only proposal: nothing is intaken, linked,
181
+ proposed as a task or published, and it changes no board row except the saved model answer.
182
+
183
+ **Proposal.** `ahub roadmap decompose <id> [--json]` and `hub_roadmap_decompose {id}` (configured planner or unique conductor,
184
+ never during a PII or private turn) ask the hub's model how one milestone decomposes. The model sees that milestone's own title
185
+ and outcome and what the milestone already links: the summaries of its `goal` and `architecture` specs (or, when it links neither
186
+ type, of whatever spec types it links) and its linked issue refs with the titles from one bounded `readGitHubIssuePages` read.
187
+ Every spec id, title, path and issue title must pass `publicMetadataText` first: a spec that fails is not offered at all, an issue
188
+ title that fails or cannot be read is offered by its ref alone, and a milestone whose own title or outcome is withheld refuses
189
+ before any model call. The prompt asks for one JSON array of at most eight and at least one part in the `hub_backlog_split` parts
190
+ schema (`title`, `detail`, `class`) plus `needs_spec` (true: a feature or behaviour change that needs its own spec issue; false: a
191
+ mechanical chore that goes straight to a task) and `cites`.
192
+
193
+ **Reader and storage.** `parseDecomposition` (`src/hub/roadmap-decompose.ts`) keeps a part only when its title and detail are
194
+ bounded, its `class` is a `hub_task_propose` class, `needs_spec` is a boolean and at least one cite names an id the model was
195
+ shown; the answer is capped at eight parts and a repeated title is dropped. `intake` records the `needs_spec` decision as `spec`
196
+ or `task`. Each kept part is screened again at the write and stored as a pending row of `milestone_decompositions`, attributed to
197
+ `hub` as a model's answer. One pending row per milestone, so a newer run supersedes the older one in the same transaction, and
198
+ settled rows keep the newest 200. An answer that cites nothing it was shown saves nothing and is reported in `dropped`. No model,
199
+ a dead one, or a milestone that links nothing to decompose from reports `unavailable`, never a silent empty result.
200
+
201
+ **Held intake draft.** `ahub roadmap decompose <id> --accept <part>` and `hub_roadmap_decompose {id, accept}` (the same configured
202
+ planner or unique conductor, refused during a PII or private turn) accept one part of the pending answer, named by the 1-based
203
+ position the proposal printed. Accepting creates the existing intake hold rather than a new board state: a backlog task with
204
+ `draft`, so nothing offers, pulls or routes it, and the draft's text carries the part's `spec`/`task` kind and the milestone id a
205
+ person reads before releasing it. The draft is linked to the milestone as a `task` link, and every board write goes through
206
+ `Tasks`. `milestone_decomposition_accepts` keys each accepted part by its answer row and position, so accepting the same part
207
+ twice returns the draft the first accept made and the board gains no row; a superseded answer is not pending, so an accept cannot
208
+ land on it. An accept needs a pending answer and a part inside it, both refused before any write, and a milestone settled to
209
+ `done` or `dropped` while the answer waits refuses there too. One accept of a part runs at a time, so two concurrent accepts of
210
+ the same part make one draft and read the same task, and once the draft is saved the accept record, the link and the notice are
211
+ best-effort: the caller is never refused after a board write, and a retry records a link an interrupted tail lost. Release stays
212
+ the existing `ahub intake approve` by the person or the conductor acting for them, so no part reaches a peer before that approval
213
+ and this command grants no release authority of its own. The reply and its notice carry the draft's id and the part's kind only:
214
+ the result is a public view, so a part whose draft carries a PII signal reads `[withheld]` and no stored text is repeated.
215
+
216
+ **Publish.** `ahub roadmap decompose <id> --publish` and `hub_roadmap_decompose {id, publish}` (the same configured planner or
217
+ unique conductor, refused during a PII or private turn) preview what the milestone's held drafts would create on GitHub, and
218
+ write nothing: no `gh` call, no board row and no link. Only a held `spec` part creates an issue, because it is the one that needs
219
+ its own spec issue before implementation; a `task` part is already its own held draft, a draft the person already released is
220
+ skipped, and a private part is counted and never published. The plan is one `POST repos/<repo>/issues` per
221
+ held spec part, carrying the part's title, its detail, the ids it cites and a `<!-- ahub-roadmap-decompose:<project>:<milestone>:<task> -->`
222
+ marker, built by the pure `planPartPublish` (`src/hub/roadmap-decompose.ts`). The repository is the host-sampled origin
223
+ (`Tasks.roadmapRepository`), never an argument, and a part whose answer is no longer stored is counted instead of published.
224
+ The preview returns every planned `gh` argv and a fingerprint over the repository, the milestone, the GitHub milestone and those
225
+ calls. `--apply --confirm <fingerprint>` runs that exact plan and is admitted only through the existing `github_write` gate
226
+ (`Tasks.roadmapApplyAuthority`: the person, or the unique configured conductor with `roadmap.github_write = "conductor"`), the
227
+ same gate `ahub roadmap sync` uses. One apply runs per milestone at a time: a second apply that overlaps a running one (a tool
228
+ call that timed out and was retried with the same arguments) is refused with the cause and the next step, and each create
229
+ re-reads the publish record first, so a part an earlier attempt already recorded is never POSTed again. Each created issue is
230
+ recorded in `milestone_decomposition_publishes` and added to the
231
+ milestone as an `issue` link through R1's own `linkMilestone`, so `ahub roadmap sync` keeps it in the GitHub milestone
232
+ instead of detaching it. When the mirror has a binding for the milestone, the create itself carries the R4 membership field
233
+ (`milestoneMembershipField`, the one construction `planRoadmapMirror` also uses), so the issue joins the GitHub milestone in the
234
+ same call and no second link path exists; with the mirror off or no binding, the preview says the issue will join none. A `gh`
235
+ call that fails, or an answer that is not the issue it claims, refuses and names the failure: no publish row and no link are
236
+ written, the draft stays held, and the same preview applies again once GitHub answers.
237
+
238
+ `milestone_decompositions` is additive and outside the roadmap integrity digest like a suggestion: a lost answer is asked for
239
+ again, and no recovery format changes. `milestone_decomposition_accepts` is additive the same way: a lost accept row files the
240
+ part again as a second draft rather than breaking a read. `milestone_decomposition_publishes` is additive too, so a lost publish
241
+ row files the issue again; the issue's own marker names the draft it came from.
242
+
141
243
  ## Bottom-up placement (R3)
142
244
 
143
245
  R3 starts from the work that exists (open GitHub issues, open board tasks, `active` and `draft` specs) and places it on the
@@ -189,3 +291,55 @@ in `withheld`. Nothing is written to GitHub.
189
291
 
190
292
  `milestone_suggestions` and `milestone_imports` are additive tables outside the roadmap integrity digest: a lost suggestion is
191
293
  triaged again and an import mark only prevents a duplicate, so neither changes the recovery format.
294
+
295
+ ## Drift, mirror and export (R4)
296
+
297
+ `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.
298
+
299
+ `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.
300
+
301
+ 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.
302
+
303
+ 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.
304
+
305
+ `ahub roadmap export` renders deterministic JSON and Markdown from screened milestone views. `--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.
306
+
307
+ 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. 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 checks known issue states when a GitHub token is available. `scripts/check.sh` and the hosted docs step run it. Only `docs/roadmap.md` is exempt from the documentation stamp because this validation covers the generated page; the standalone release docs checker retains its Node-only contract.
308
+
309
+ ## Dashboard and console surfaces (R5)
310
+
311
+ R5 ([#1483](https://github.com/STAIxBWLB/agent-hub/issues/1483)) adds reading and managing milestones from the dashboard and the
312
+ console. It adds no hub op and no write path: every dashboard write is one of R1's console ops through `ui_action`, and every console
313
+ read is one of R1 to R4's hub tools.
314
+
315
+ **The dashboard view.** `src/ui/index.html` carries the Roadmap view at key 8, listed once in `DASHBOARD_VIEWS` (`src/hub/ui.ts`) whose
316
+ `indexOf` the page's own copy must equal: the page's list is what gates `switchView` and the digit keys, so a view missing there is
317
+ unreachable however the tab reads. Cardinality comes from `src/ui/roadmap-model.ts`, injected into the page as source
318
+ (`/* ROADMAP_MODEL */`), so the module's projection and the page's are the same function and a test runs the injected text in a VM to
319
+ compare them. Three lanes (now, next, later, a horizon outside them landing in later rather than disappearing) hold one card per
320
+ milestone: title, outcome, approval progress (unknown, never zero, with no members), spec freshness, linked issues and releases. Every
321
+ text node is `textContent`.
322
+
323
+ **Fenced writes.** A card carries the `revision` it rendered, and every write payload names it: edit, state, link, unlink and move. The
324
+ daemon compares it against the current milestone (`roadmapFresh`) and refuses a stale page by name ("roadmap changed since this page
325
+ loaded; reload the dashboard before editing") with nothing written. A lane move sends the horizon and the target order and is awaited
326
+ before the lane is renumbered, so the answer describes the move it made.
327
+
328
+ **Person-only affordances.** `block.person`, from the session's own authority, gates drag and drop, the ordered move buttons and the
329
+ `done` and `dropped` states; a person-only state is shown but not offered in any other session. A private task member is a count
330
+ (`withheld`), and the unplaced tray reports the number of private items it does not list. The tray's repaint signature includes the
331
+ read's state, so an empty answer ("Everything is placed.") replaces the first paint.
332
+
333
+ **Roadmap reads and the snapshot.** The roadmap block, and the hub's last drift check with it, are part of `uiSnapshot` only when the
334
+ page asks for the roadmap view. `roadmap check` and the unplaced read run under a longer request timeout: both are bounded GitHub
335
+ metadata passes, not instant page state. A page seeds its drift note from the snapshot, so a reload or a second tab shows the check the
336
+ hub already holds instead of asking for it again.
337
+
338
+ **The console panel.** `src/cli/console.ts` and `src/cli/console-state.ts` add Roadmap as panel 9, present only while the hub reports
339
+ the `roadmap` feature. Opening it reads `hub_roadmap_list` (5 s) and adds `hub_roadmap_check` (30 s) only when no drift is held or the
340
+ held one is older than five minutes. A row is id, horizon, state, approved/total, the withheld count and title, sorted by lane and then
341
+ by the milestone's own order; Enter opens the milestone through `hub_roadmap_show` into the labelled detail.
342
+
343
+ **`ahub ui --all`.** `projectConsole` gains an opt-in `roadmap: true` summary per project (`total`, `byHorizon`, `byState`, `drift`),
344
+ read at most once a minute per project with each read bounded. It is opt-in because the acon provider shares `projectConsole` with
345
+ fixture hubs, and only the manager passes it. A read that fails shows "roadmap unavailable" rather than a zero.
@@ -27,11 +27,12 @@ The module is `src/hub/supervision-rules.ts` for the reading and `src/hub/superv
27
27
 
28
28
  ## Facts the rules may read
29
29
 
30
- One evaluation takes three fact sets, all authored by the hub, never by a peer or a model:
30
+ One evaluation takes four fact sets, all authored by the hub, never by a peer or a model:
31
31
 
32
32
  - **task revisions**: an id, a state and the task's structured history (event name, time, check key, plan revision, `evidenceOnly`, `noWrites` and delivered record ids). A note, a withheld body, a review finding or a transcript is not in the fact type and cannot be reached from it.
33
33
  - **deliverable measurement**: the hub's own `deliverableStatus` reading per task: whether it measured the files, and which delivered ids it now reads as changed or missing. Ids and states, never a file body.
34
34
  - **declared overlap**: the hub's own `overlapHits` rows, one row per unordered pair.
35
+ - **edit evidence**: bounded in-memory counts for the current owner revision, without paths or content. Missing coverage stays unknown.
35
36
 
36
37
  Nothing is read from a private task, a cloud observer or a native transcript, and the module imports no board write, bus, daemon, peer or memory module. A source-string test in `test/supervision-rules.test.ts` fails if a clock, a timer, an emit path, `process.env` or one of those imports appears, so the purity is proven mechanically and not only asserted.
37
38
 
@@ -51,6 +52,10 @@ Each rule has an id, a version, one reason code and one suggested existing actio
51
52
 
52
53
  **`declared_overlap_without_integration` (version 1, reason `unintegrated_overlap`, action `request_integration`).** A declared pair whose both sides have accepted their current revision, with no integration request, landed integration or recorded integration failure after either acceptance, and with neither side closed. Persistence is record-based, never elapsed time. Trigger: `overlap:<low>:<high>`, bound to the pair's lower task id so naming the pair in either direction is the same observation; refs: the other task and both acceptance records.
53
54
 
55
+ **`unverified_shell_write` (version 1, action `recheck`).** At least two observed shell-route or blind/stale edits in the current owner revision. A shell command whose target or effect cannot be observed is counted separately as unknown and does not assert a write.
56
+
57
+ **`cascading_edit_after_failed_check` (version 1, action `recheck`).** At least two distinct observed files changed after a check failed, without an intervening observed full read or passing check. A full read is a conservative observable proxy for a diagnostic read; an unobservable read cannot clear the evidence.
58
+
54
59
  Ordinary progress triggers nothing: a passing check, an unequal pair of failures, a cleared streak, an evidence-only rejection, a closed task, a pair that recorded one integration attempt. Elapsed silence is never a trigger by itself: no rule reads a clock, and a record set read two days later reads identically.
55
60
 
56
61
  ## Unknown coverage is an output, never a zero
@@ -116,6 +121,21 @@ A role on the task is not the authority to run what the proposal names. Acceptin
116
121
  | `MAX_PROPOSAL_ROWS` | 400 | terminal rows kept for dedupe and history; past it the oldest terminal row goes and a pending row is never pruned |
117
122
  | `MAX_PROPOSAL_READ` | 50 | proposals one read returns, pending first |
118
123
 
124
+ ## Edit governance arms
125
+
126
+ `edit_governance.arm` is machine-local and defaults to `baseline`. The opt-in `route_guard`, `occ_guard` and `combined_guard` arms act only where the hub proves a pre-effect tool boundary. The hub-owned local and Pi tools are admitted while their current task, owner and native turn remain valid. Native Claude, Codex and ACP report `unavailable`: their paths do not provide a hub-owned pre-effect deny under the current security contract. These surfaces use existing exact-head PR, plan conformance and check evidence at done and review time. This is detection, not prevention; missing PR or matching-check evidence remains `unknown`. Uncommitted worktree state is outside this fallback.
127
+
128
+ | Surface | Enforcement | Reason |
129
+ | --- | --- | --- |
130
+ | Hub-owned local and Pi tools | `admitted` while current task and turn are verified | The hub owns the tool transaction |
131
+ | Native Claude | `unavailable` | The managed hook never denies |
132
+ | Codex and ACP native tools | `unavailable` | A pre-effect hub deny is not guaranteed |
133
+ | External tree-only peers | `unavailable` | No pre-effect tool stream |
134
+
135
+ Route enforcement refuses a shell command only when `classifyShellWrite` proves a write. `unknown` is observed but does not become a refusal. OCC checks the current hash immediately before an admitted write and refuses a blind or stale receipt at check time with the current SHA-256 and a re-read instruction. An absent target may be created; other read errors refuse with a bounded cause. The local tool and native hook are best-effort: another process can change the file after the check, so the check is not atomic against concurrent writers. The Design 1.2 0444 worktree and `ahub-edit` isolation is the upgrade path and is outside this change.
136
+
137
+ The edit observations bind to the task's current owner revision, retain only bounded counts and in-memory file identifiers, and never persist a per-read or per-edit event. Shadow mode does not send a worker turn; advisory mode uses the existing proposal path.
138
+
119
139
  ## Deliberately outside this contract
120
140
 
121
141
  Automatic pause, retry, cancel, reroute, approval or rollback, any automatic acceptance, any import of an external supervision runtime, and any resident worker or recurring timer. The queue proposes an existing action and runs it only when a present role says so. agent-research#63 builds on the reading and bounds above, not on an acceptance path here.
@@ -31,6 +31,7 @@ paths:
31
31
  - src/hub/main-checkout.ts
32
32
  - src/hub/checks.ts
33
33
  - src/hub/task-repository.ts
34
+ - src/hub/task-pr.ts
34
35
  - src/hub/no-writes.ts
35
36
  - src/hub/review-findings.ts
36
37
  - src/hub/review-anchor.ts
@@ -82,6 +83,26 @@ Inputs are the recorded reviewed Git base, never mutable task files; changed
82
83
  inputs or unsupported install settings/layouts remain unprepared. No new public
83
84
  task schema or local-worker preparation is added.
84
85
 
86
+ A current public owner with a hub-managed worktree may start an isolated check
87
+ before task completion (#1549 T1). After runner and request admission, the hub
88
+ commits and pushes using the same private index, path policy and recorded-tip
89
+ fence as the completion handoff. The task board records the resulting branch and
90
+ exact commit before the runner starts on that commit; an unchanged hub-committed
91
+ head is reused. Owner, session, capability, privacy and recovery authority are
92
+ rechecked across the awaited work, and a lost authority never starts a check.
93
+ Peers without a hub-managed worktree retain their existing check path.
94
+
95
+ On a public managed-worktree completion pushed to the trusted GitHub origin
96
+ (#1549 T2), the hub finds one open same-repository PR at the exact pushed head,
97
+ or creates it as a draft and makes it ready. It rechecks owner, session, task
98
+ revision, privacy, recovery and origin around the bounded GitHub calls. The
99
+ admitted done records the host-verified PR as `task.sdlc.pr`; `TaskRefs` has no PR
100
+ field. A lost create response is resolved by lookup on retry. A failure after a
101
+ commit or push reports the prior effect and directs the owner to inspect it.
102
+ The generated PR body contains only the task number and a `Refs` link to the
103
+ same-repository spec issue when known. Untrusted or absent origins do not grant
104
+ GitHub write authority.
105
+
85
106
  Pressure checkpoints remain peer/session operations, including for taskless peers.
86
107
  A host waiter additionally captures its owned-work task ids, creation identities
87
108
  and actual owner-history epochs (#1447 T4). Move, unassign, cancellation or a
@@ -107,7 +128,7 @@ Isolated check outcomes are distinct text-free task history events; matching-hea
107
128
 
108
129
  A commit-bound done records the requested review head independent of its cost plan. Historical metrics and research records fall back to the recorded cost head or bound spec-report head on done entries; missing evidence stays unknown (#1555 AC1).
109
130
 
110
- `Tasks` mediates task proposals, planning, owner/reviewer changes, acceptance, completion and review. `Board` persists the rows, history and typed evidence in SQLite; transport, CLI and UI layers do not independently apply task transitions. The issue remains the change spec and GitHub remains authority for PR/check/tag facts. Separating these authorities prevents a chat claim or adapter callback from bypassing task policy ([#481](https://github.com/STAIxBWLB/agent-hub/issues/481)).
131
+ `Tasks` mediates task proposals, planning, owner/reviewer changes, acceptance, completion and review. `Board` persists the rows, history and typed evidence in SQLite; transport, CLI and UI layers do not independently apply task transitions. The issue remains the change spec and GitHub remains authority for PR/check/tag facts. Separating these authorities prevents a chat claim or adapter callback from bypassing task policy ([#481](https://github.com/STAIxBWLB/agent-hub/issues/481)). When a screened exact instruction creates or plans a task, its existing history entry names the person and the instructed peer and receipt; the full prompt is not added to history. Exact pin and planned-pull reasons are the screened words the person typed, and their writes recheck instruction authority.
111
132
 
112
133
  A command is authorized against the current actor, role, task state and revision. An asynchronous operation can lose authority while preparing evidence, so write boundaries recheck current scope. Console actions bind the selected task ID and its observed flow revision, rather than an unstable list position. The reason is to keep an approved action attached to the row and state the person actually saw ([#424](https://github.com/STAIxBWLB/agent-hub/issues/424), [#525](https://github.com/STAIxBWLB/agent-hub/issues/525)).
113
134
 
@@ -121,7 +142,7 @@ Cross-project handoff catch-up treats a missing control descriptor or a descript
121
142
 
122
143
  Automatic offer and backlog paths respect `plannedStart`; a future card becomes eligible at its boundary through existing sweep/release passes. Explicit person/planner authority is separate. This avoids offering scheduled work early without taking away deliberate manual control ([#1076](https://github.com/STAIxBWLB/agent-hub/issues/1076)).
123
144
 
124
- When opt-in auto-pull is enabled, a reservation or eligibility change, dependency approval, or the reserved peer's first idle attachment can queue the same guarded planner pull as a freed WIP slot. The hub rechecks current policy, capacity, eligibility and planner authority before writing; the planner or person remains responsible for manual backlog pulls (Refs #1547).
145
+ When opt-in auto-pull is enabled, a reservation or eligibility change, dependency approval, or the reserved peer's first idle attachment can queue the same guarded planner pull as a freed WIP slot. The hub rechecks current policy, capacity, eligibility and planner authority before writing; the planner or person remains responsible for manual backlog pulls (Refs #1547). Every automatic owner choice also skips a peer at its WIP cap or with a held queue, and a peer that capacity-declined is skipped until its next idle state (Refs #1626). A capacity decline of a pulled card returns it to backlog with its reservation, and when no reserved card is ready an idle or freed peer is offered the first ready unowned task it is eligible for, one per trigger, through the ordinary routing gates. An explicit assignment by the person or the conductor is unchanged.
125
146
 
126
147
  A bounded wait (#1454) is the owner's way to say an `in_progress` task is legitimately idle until a dated event. It is a `wait recorded` history entry carrying `wait: {until, owner}` and the public reason as its note, written through `Tasks.wait` only (owner, the task's planner or the person; `until` in the future and at most 14 days ahead; the reason screened like any note). It is quiet (`QUIET_EVENTS`), so it moves nothing. `taskWait` (`src/hub/task-sweep.ts`) is the only reader: the wait is in force while the latest `wait recorded` entry names the current owner and no later entry is state-changing, so done, decline, return, reassignment and cancel end it with no extra write. `nextSweep` skips `idle-owner` while `now < until` and measures the ladder from `max(last activity, until)` afterwards; the other three kinds never read it. A wait past its `until` is listed by the planner groom view (`wait-passed`).
127
148
 
@@ -135,7 +156,7 @@ Untouched returns may atomically update `reserved` while moving eligible propose
135
156
 
136
157
  For a profile that supports `plan.sources`, `Tasks` validates every retained source ID against the source registry at proposal and acceptance, before board writes, admission effects or peer notices. Unknown IDs are refused with the ID and `ahub source list` guidance. Overlap notices compare the registry IDs; private task plans remain withheld by the shared public view.
137
158
 
138
- Natural-language intake from the CLI or dashboard enters the same `Tasks.intake` path and creates held draft Backlog cards, not offers. Dashboard task replies use the public view, and a ticket-bound live-test session cannot create these person-attributed drafts. Approval and discard retain their existing authority. Read-only source snapshots carry only ID, kind, byte size, hash prefix and registration time, with no content or origin paths ([#1144](https://github.com/STAIxBWLB/agent-hub/issues/1144)).
159
+ Natural-language intake from the CLI or dashboard enters the same `Tasks.intake` path and creates held draft Backlog cards, not offers. Dashboard task replies use the public view, and a ticket-bound live-test session cannot create these person-attributed drafts. A roadmap decomposition part accepted through `Tasks.roadmapDecomposePart` enters that same hold: a backlog draft attributed to the configured planner or the unique conductor that accepted it and linked to its milestone, offered to nobody until the person's `ahub intake approve` releases it ([#1480](https://github.com/STAIxBWLB/agent-hub/issues/1480)). Approval and discard retain their existing authority. Read-only source snapshots carry only ID, kind, byte size, hash prefix and registration time, with no content or origin paths ([#1144](https://github.com/STAIxBWLB/agent-hub/issues/1144)).
139
160
 
140
161
  ## Completion, review and evidence
141
162
 
@@ -178,7 +199,9 @@ state transition table is unchanged.
178
199
 
179
200
  The state becomes `approved` through Tasks, with the actual actor and the
180
201
  `merged outside the hub` history event. Ordinary dependent release runs after
181
- the saved approval. The host stores external merged-PR evidence as `mergeReadback`, separate from `merge` records produced by a guarded merge. A readback has no command exit, cleanup or owner-notice fields; unreadable cost stays absent. Artifact relinks discard both kinds of host evidence. A host-owned five-minute settlement pass reads at most three eligible public approved tasks sequentially, at most once per task every ten minutes and only for 24 hours after approval. Closed PRs stop the schedule; open or unreadable PRs retry within that window. The in-memory schedule is lost on restart.
202
+ the saved approval. The host stores external merged-PR evidence as `mergeReadback`, separate from `merge` records produced by a guarded merge. A readback has no command exit, cleanup or owner-notice fields; unreadable cost stays absent. Inline merge and adoption cost reads have an eight-second bound. Artifact relinks discard both kinds of host evidence. A host-owned five-minute settlement pass reads at most three eligible public approved tasks sequentially, at most once per task every ten minutes and only for 24 hours after approval or adoption. It also retries merged records with missing CI cost, using a 60-second bound and the same artifact and privacy fences. Closed PRs stop the schedule; open or unreadable PRs retry within that window. The in-memory schedule is lost on restart.
203
+
204
+ CI cost readback associates an explicitly linked PR run directly. If GitHub omits the association, it reads the PR branch's complete pull-request run inventory within the PR creation-to-merge interval, only for a same-repository head and a branch without another overlapping PR. Incomplete pagination, ambiguous branch ownership or failed reads keep costs unknown. Full-gate runs are split by their latest conclusion at merge, and macOS shard jobs count only non-skipped jobs with a positive GitHub `runner_id` from attempts completed before merge; zero and null are unassigned for cancelled or skipped jobs. Attempt `run_started_at` determines whether an attempt began after merge; an attempt straddling merge or sharing its timestamp leaves the evidence unknown. For first-pass CI without a hub check, use attempt 1 of the first eligible check run at the task's first submitted head. Cancelled and draft-deferred runs do not qualify. Draft state comes from complete `converted_to_draft` and `ready_for_review` timeline events compared with run `created_at`; equal timestamps or incomplete evidence stay unknown. Hub completion and isolated-check history retain precedence.
182
205
 
183
206
  Adoption creates no reviewer verdict, review metric,
184
207
  reviewed-head receipt, guarded-merge result, GitHub mutation or branch cleanup.
@@ -458,6 +481,11 @@ COMPLETED with conclusion SUCCESS; a StatusContext must have state SUCCESS.
458
481
  Common normalization cannot turn malformed fresh proof into admission. The shared
459
482
  parser and cached evidence schema retain their existing contracts.
460
483
 
484
+ The sole review and approval exception is this repository's proven draft macOS
485
+ deferral: [SDLC readbacks](../sdlc.md#readbacks-and-presentation) specifies the
486
+ exact-head job-step proof and the review blockers deferred until merge. It never
487
+ counts as a full-gate success or relaxes guarded merge or identical-tree reuse.
488
+
461
489
  ## Reviewer quota waits (#1446)
462
490
 
463
491
  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.