@staix/agent-hub 0.43.0 → 0.45.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 (118) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +3 -8
  3. package/docs/agent-notes/adapters.md +2 -2
  4. package/docs/agent-notes/daemon.md +4 -4
  5. package/docs/agent-notes/local-worker.md +2 -1
  6. package/docs/agent-notes/security-review.md +1 -1
  7. package/docs/agent-notes/tasks.md +5 -2
  8. package/docs/agent-notes/tests.md +4 -3
  9. package/docs/design/adapters.md +4 -2
  10. package/docs/design/agent-hub-architecture.md +2 -0
  11. package/docs/design/agent-hub.md +1 -1
  12. package/docs/design/roadmap.md +75 -2
  13. package/docs/design/supervision.md +34 -2
  14. package/docs/design/task-board.md +36 -2
  15. package/docs/dogfood.md +20 -5
  16. package/docs/events.md +9 -3
  17. package/docs/influences.md +7 -0
  18. package/docs/memory.md +4 -4
  19. package/docs/operations.md +84 -31
  20. package/docs/quickstart.md +14 -2
  21. package/docs/research.md +18 -0
  22. package/docs/roadmap.json +4 -0
  23. package/docs/roadmap.md +9 -0
  24. package/docs/sdlc.md +19 -4
  25. package/docs/security.md +4 -4
  26. package/docs/verification/2026-11-11-supervision-pilot-1221.md +864 -0
  27. package/docs/verification/2026-11-19-0.44.0.md +60 -0
  28. package/docs/verification/2026-11-19-claude-implementer-2.1.328.md +49 -0
  29. package/docs/verification/2026-11-20-claude-implementer-2.1.329.md +49 -0
  30. package/docs/verification/2026-11-20-sdlc-metrics-diagnosis.md +7 -0
  31. package/docs/verification/2026-11-21-0.45.0.md +69 -0
  32. package/docs/verification/2026-11-22-codex-0171-reviewer-isolation.md +47 -0
  33. package/docs/verified.json +32 -26
  34. package/package.json +2 -2
  35. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  36. package/plugins/agent-hub/kimi-hook.js +585 -264
  37. package/plugins/agent-hub/kimi-review-policy-worker.js +5 -5
  38. package/plugins/agent-hub/server.js +629 -293
  39. package/scripts/check-docs.mjs +9 -1
  40. package/src/adapters/acp.ts +11 -1
  41. package/src/adapters/compat.ts +3 -3
  42. package/src/adapters/definitions/builtin-metadata.ts +2 -2
  43. package/src/adapters/definitions/native-context.ts +10 -0
  44. package/src/adapters/jcode.ts +10 -0
  45. package/src/adapters/local-worker.ts +3 -2
  46. package/src/adapters/pi.ts +15 -4
  47. package/src/cli/console-state.ts +3 -1
  48. package/src/cli/help.ts +3 -1
  49. package/src/cli/identity.ts +2 -1
  50. package/src/cli/main.ts +12 -6
  51. package/src/cli/output.ts +2 -2
  52. package/src/cli/recovery-package.ts +16 -3
  53. package/src/cli/roadmap-write.ts +59 -0
  54. package/src/cli/roadmap.ts +81 -4
  55. package/src/cli/sdlc-output.ts +11 -1
  56. package/src/cli/upgrade-runtime.ts +10 -6
  57. package/src/cli/upgrade.ts +9 -3
  58. package/src/hub/agent-mem-range.ts +43 -0
  59. package/src/hub/board.ts +116 -2
  60. package/src/hub/bus.ts +4 -0
  61. package/src/hub/check-runner.ts +25 -1
  62. package/src/hub/claude-shell-wrapper.ts +2 -1
  63. package/src/hub/config-apply.ts +4 -2
  64. package/src/hub/config-trust.ts +1 -1
  65. package/src/hub/context-window.ts +1 -1
  66. package/src/hub/control-write-trace.ts +39 -2
  67. package/src/hub/cost-governance.ts +11 -7
  68. package/src/hub/daemon.ts +318 -53
  69. package/src/hub/dogfood-read.ts +4 -2
  70. package/src/hub/edit-guard.ts +100 -0
  71. package/src/hub/events.ts +79 -8
  72. package/src/hub/facts.ts +85 -2
  73. package/src/hub/hub-tools.ts +3 -1
  74. package/src/hub/lifecycle.ts +6 -1
  75. package/src/hub/log-rotation.ts +130 -0
  76. package/src/hub/memory-profile.ts +137 -21
  77. package/src/hub/no-writes.ts +1 -0
  78. package/src/hub/operational-authority.ts +3 -2
  79. package/src/hub/operational-settings.ts +2 -2
  80. package/src/hub/quota-events.ts +40 -0
  81. package/src/hub/recovery-store.ts +70 -24
  82. package/src/hub/report.ts +1 -1
  83. package/src/hub/research-experiments.ts +132 -0
  84. package/src/hub/research-quality.ts +13 -3
  85. package/src/hub/research-record.ts +38 -2
  86. package/src/hub/research.ts +128 -28
  87. package/src/hub/restart.ts +49 -2
  88. package/src/hub/roadmap-check.ts +65 -0
  89. package/src/hub/roadmap-decompose.ts +80 -0
  90. package/src/hub/roadmap-export.ts +27 -0
  91. package/src/hub/roadmap-sync.ts +97 -0
  92. package/src/hub/roadmap.ts +40 -0
  93. package/src/hub/runtime-capture-prune.ts +9 -1
  94. package/src/hub/runtime-prune-health.ts +5 -1
  95. package/src/hub/sdlc-branch-ci.ts +128 -0
  96. package/src/hub/sdlc-merge.ts +12 -5
  97. package/src/hub/sdlc-metrics.ts +33 -10
  98. package/src/hub/sdlc.ts +90 -10
  99. package/src/hub/settings.ts +1 -0
  100. package/src/hub/snapshots.ts +56 -1
  101. package/src/hub/startup-event-seeds.ts +21 -15
  102. package/src/hub/startup-timing.ts +3 -1
  103. package/src/hub/supervision-proposals.ts +10 -2
  104. package/src/hub/supervision-rules.ts +27 -4
  105. package/src/hub/supervision.ts +7 -0
  106. package/src/hub/task-pr.ts +47 -0
  107. package/src/hub/task-shell-command.ts +124 -0
  108. package/src/hub/task-worktree.ts +18 -11
  109. package/src/hub/tasks.ts +617 -45
  110. package/src/hub/usage-rollup.ts +35 -20
  111. package/src/hub/worktree-shelf.ts +2 -1
  112. package/src/local/sandbox.ts +2 -1
  113. package/src/local/shell-environment.ts +6 -0
  114. package/src/local/tools.ts +13 -1
  115. package/src/memory/brief.ts +10 -1
  116. package/src/memory/client.ts +3 -2
  117. package/src/pi/extension.ts +15 -3
  118. package/src/pi/tool-receipts.ts +26 -0
@@ -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,6 +22,7 @@ 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
21
26
  - src/cli/main.ts
22
27
  - src/cli/help.ts
23
28
  - src/cli/identity.ts
@@ -28,8 +33,16 @@ paths:
28
33
  - test/roadmap-recovery.test.ts
29
34
  - test/roadmap-unplaced.test.ts
30
35
  - test/roadmap-triage-tasks.test.ts
36
+ - test/roadmap-decompose.test.ts
31
37
  - test/roadmap-r3-cli.test.ts
32
38
  - test/roadmap-r3-daemon.test.ts
39
+ - test/roadmap-check.test.ts
40
+ - test/roadmap-sync.test.ts
41
+ - test/roadmap-export.test.ts
42
+ - test/roadmap-write.test.ts
43
+ - test/roadmap-r4-daemon.test.ts
44
+ - test/check-roadmap.test.ts
45
+ - scripts/check-roadmap.mjs
33
46
  ---
34
47
 
35
48
  # Roadmap milestones
@@ -39,9 +52,12 @@ R1 implements [#1479](https://github.com/STAIxBWLB/agent-hub/issues/1479) of the
39
52
  the source of truth. R1 adds no GitHub writes, roadmap model calls, export,
40
53
  automatic task assignment, dashboard or console UI. R3 ([#1481](https://github.com/STAIxBWLB/agent-hub/issues/1481),
41
54
  "Bottom-up placement" below) adds the first roadmap model call and read-only GitHub
42
- reads, and still adds no GitHub write.
55
+ reads; R2 part 1 ([#1480](https://github.com/STAIxBWLB/agent-hub/issues/1480), "Decomposition" below)
56
+ adds a second model call over the same read-only path. Neither adds a GitHub write.
43
57
 
44
- R1 adds no generation, triage or decomposition call; those belong to R2 and R3.
58
+ R1 adds no generation, triage or decomposition call; those belong to R2 and R3. R2
59
+ part 1 is the read-only proposal only: nothing is intaken, linked or published, and
60
+ accepting a part or writing to GitHub is a later part.
45
61
  The existing mandatory privacy screen on planner-written text stays exactly as
46
62
  `Tasks.newRelease` applies it, including on milestone title and outcome. It fails
47
63
  closed where newRelease does and is never bypassed.
@@ -138,6 +154,49 @@ its ordered row/link digest to integrity. Empty databases retain the existing
138
154
  format floor and integrity shape; the additive tables do not advance the database
139
155
  format marker.
140
156
 
157
+ ## Decomposition (R2)
158
+
159
+ R2 turns a milestone into the parts of work that deliver it. Part 1 is the read-only proposal: nothing is intaken, linked,
160
+ proposed as a task or published, and it changes no board row except the saved model answer.
161
+
162
+ **Proposal.** `ahub roadmap decompose <id> [--json]` and `hub_roadmap_decompose {id}` (configured planner or unique conductor,
163
+ never during a PII or private turn) ask the hub's model how one milestone decomposes. The model sees that milestone's own title
164
+ and outcome and what the milestone already links: the summaries of its `goal` and `architecture` specs (or, when it links neither
165
+ type, of whatever spec types it links) and its linked issue refs with the titles from one bounded `readGitHubIssuePages` read.
166
+ Every spec id, title, path and issue title must pass `publicMetadataText` first: a spec that fails is not offered at all, an issue
167
+ title that fails or cannot be read is offered by its ref alone, and a milestone whose own title or outcome is withheld refuses
168
+ 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
169
+ schema (`title`, `detail`, `class`) plus `needs_spec` (true: a feature or behaviour change that needs its own spec issue; false: a
170
+ mechanical chore that goes straight to a task) and `cites`.
171
+
172
+ **Reader and storage.** `parseDecomposition` (`src/hub/roadmap-decompose.ts`) keeps a part only when its title and detail are
173
+ 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
174
+ shown; the answer is capped at eight parts and a repeated title is dropped. `intake` records the `needs_spec` decision as `spec`
175
+ or `task`. Each kept part is screened again at the write and stored as a pending row of `milestone_decompositions`, attributed to
176
+ `hub` as a model's answer. One pending row per milestone, so a newer run supersedes the older one in the same transaction, and
177
+ settled rows keep the newest 200. An answer that cites nothing it was shown saves nothing and is reported in `dropped`. No model,
178
+ a dead one, or a milestone that links nothing to decompose from reports `unavailable`, never a silent empty result.
179
+
180
+ **Held intake draft.** `ahub roadmap decompose <id> --accept <part>` and `hub_roadmap_decompose {id, accept}` (the same configured
181
+ planner or unique conductor, refused during a PII or private turn) accept one part of the pending answer, named by the 1-based
182
+ position the proposal printed. Accepting creates the existing intake hold rather than a new board state: a backlog task with
183
+ `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
184
+ person reads before releasing it. The draft is linked to the milestone as a `task` link, and every board write goes through
185
+ `Tasks`. `milestone_decomposition_accepts` keys each accepted part by its answer row and position, so accepting the same part
186
+ twice returns the draft the first accept made and the board gains no row; a superseded answer is not pending, so an accept cannot
187
+ land on it. An accept needs a pending answer and a part inside it, both refused before any write, and a milestone settled to
188
+ `done` or `dropped` while the answer waits refuses there too. One accept of a part runs at a time, so two concurrent accepts of
189
+ 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
190
+ best-effort: the caller is never refused after a board write, and a retry records a link an interrupted tail lost. Release stays
191
+ the existing `ahub intake approve` by the person or the conductor acting for them, so no part reaches a peer before that approval
192
+ 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:
193
+ the result is a public view, so a part whose draft carries a PII signal reads `[withheld]` and no stored text is repeated. The
194
+ GitHub write is part 3.
195
+
196
+ `milestone_decompositions` is additive and outside the roadmap integrity digest like a suggestion: a lost answer is asked for
197
+ again, and no recovery format changes. `milestone_decomposition_accepts` is additive the same way: a lost accept row files the
198
+ part again as a second draft rather than breaking a read.
199
+
141
200
  ## Bottom-up placement (R3)
142
201
 
143
202
  R3 starts from the work that exists (open GitHub issues, open board tasks, `active` and `draft` specs) and places it on the
@@ -189,3 +248,17 @@ in `withheld`. Nothing is written to GitHub.
189
248
 
190
249
  `milestone_suggestions` and `milestone_imports` are additive tables outside the roadmap integrity digest: a lost suggestion is
191
250
  triaged again and an import mark only prevents a duplicate, so neither changes the recovery format.
251
+
252
+ ## Drift, mirror and export (R4)
253
+
254
+ `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.
255
+
256
+ `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.
257
+
258
+ 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.
259
+
260
+ 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.
261
+
262
+ `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.
263
+
264
+ 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.
@@ -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
 
@@ -47,10 +48,14 @@ Each rule has an id, a version, one reason code and one suggested existing actio
47
48
 
48
49
  **`repeated_failure` (version 1, reason `repeated_failure`, action `escalate`).** Two equal classified failures inside the current revision, with no clearing evidence between them. A failure is classified into a closed vocabulary: `check:<checkKey>`, `review:changes_requested`, `integration:unresolved`, `done:no-writes`. A code-scope rejection that names no finding (`evidenceOnly`) is not a defect of the work and is not classified. Clearing evidence is a recorded check pass, a landed integration or an approval; each resets the streak. One observation is made per class, so a revision failing two different checks reports both and only the per-revision bound can refuse one. Trigger: `failures:<class>`; refs: the two failure records.
49
50
 
50
- **`deliverable_invalidated_check` (version 1, reason `stale_check`, action `recheck`).** The revision recorded a check pass and delivered at least one record, and the hub's own measurement now reads one of those delivered ids as changed or missing. Trigger: `check:<ids>`; refs: the check record and the stale deliverable ids. A delivered id is the only thing that can be stale: a file the hub measured but that this revision never delivered is not evidence about it. If the hub did not measure the files, the rule cannot decide and reports the gap `no-deliverable-measurement` instead of a clean reading.
51
+ **`deliverable_invalidated_check` (version 2, reason `stale_check`, action `recheck`).** The revision recorded a completion check pass or an isolated `check run passed` and delivered at least one record, and the hub's own measurement now reads one of those delivered ids as changed or missing. Trigger: `check:<ids>`; refs: the check record and the stale deliverable ids. A delivered id is the only thing that can be stale: a file the hub measured but that this revision never delivered is not evidence about it. If the hub did not measure the files, the rule cannot decide and reports the gap `no-deliverable-measurement` instead of a clean reading.
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,33 @@ 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.
142
+
143
+ ## Observed limits (pilot)
144
+
145
+ The first pilot (2026-11-11 to 2026-11-18 KST, `shadow`, one task, receipt `docs/verification/2026-11-11-supervision-pilot-1221.md`) measured limits that belong to the reading and not to one deployment:
146
+
147
+ - The read page applies before the role filter. On a queue past 50 rows a caller's own rows can be missing from an unfiltered read, and narrowing by task is what recovers them, so a role-scoped total is a lower bound and not a queue count.
148
+ - The refusal counter belongs to a daemon lifetime and names no task, rule or bound. The pilot read 97 refusals in 7 h 24 m on a daemon started that morning and could attribute none of them; a total cannot be summed across restarts either, so a wave-wide figure is unknown rather than the sum of its lifetimes.
149
+ - The overlap rule is asked only while both sides' latest episode is an accepted one. Silence under a partner that is approved, filed, reassigned or closed is unknown coverage, never a clean non-trigger, and the pilot's last four days produced no row for that reason rather than because nothing overlapped.
150
+ - A pair leaves supervision before its integration can be recorded. Nine of the pilot's 18 rows closed within five seconds of a partner's review request (0.56 to 4.9 s), one at this task's idle-sweep reassignment, one when the revision moved, and the rest on the queue's own schedule, and no row named the merge that followed; an integration that lands with the merge is outside this reading.
151
+ - A declared overlap is usually file-level. Every pilot row named a pair that edited something other than the anchor row: one partner inserted 70 to 133 rows above it, another rewrote an existing row 13 to 40 rows away, one changed a different new file in the same directory, and one never touched `docs/dogfood.md` at all. A notice to request integration was therefore true of the plan and not of the work, and a later pilot should expect that rate rather than treat it as a defect.
152
+ - A reassignment closes and re-arms rows. An idle sweep closed three rows in one second and the re-accept wrote three more 338 ms later, so a row's lifetime can track task ownership rather than the condition it names.
153
+ - A rule version bump splits a pilot. `deliverable_invalidated_check` moved to version 2 on 2026-11-19 and every stored row names the version it was made under, so readings taken across a bump are not one measurement.
@@ -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
@@ -103,6 +124,8 @@ no-write detection. Ordinary shared tools and the local worker can publish where
103
124
  their role permits; isolated fresh-reviewer MCP keeps its exact two-tool contract.
104
125
 
105
126
 
127
+ Isolated check outcomes are distinct text-free task history events; matching-head metrics and deliverable supervision may read them without changing completion-check readers (#1555 AC3).
128
+
106
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).
107
130
 
108
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)).
@@ -119,6 +142,8 @@ Cross-project handoff catch-up treats a missing control descriptor or a descript
119
142
 
120
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)).
121
144
 
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).
146
+
122
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`).
123
148
 
124
149
  An open question set asked by the current owner on that task also suspends only `idle-owner` (#1550 AC1). Once all such sets have settled, its ladder starts again from their latest settlement, ignoring earlier idle steps. The sweep reads only the task, asker and timing, not question text. After the question desk prunes the settled row at seven days, the ladder falls back to its own retained history; an idle threshold above seven days is unsupported.
@@ -131,7 +156,7 @@ Untouched returns may atomically update `reserved` while moving eligible propose
131
156
 
132
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.
133
158
 
134
- 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)).
135
160
 
136
161
  ## Completion, review and evidence
137
162
 
@@ -174,7 +199,11 @@ state transition table is unchanged.
174
199
 
175
200
  The state becomes `approved` through Tasks, with the actual actor and the
176
201
  `merged outside the hub` history event. Ordinary dependent release runs after
177
- the saved approval. Adoption creates no reviewer verdict, review metric,
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.
205
+
206
+ Adoption creates no reviewer verdict, review metric,
178
207
  reviewed-head receipt, guarded-merge result, GitHub mutation or branch cleanup.
179
208
  A prior withdrawn reviewer approval remains historical and cannot become a
180
209
  current reviewer binding through adoption. Historical completion time is the first approval or adoption
@@ -452,6 +481,11 @@ COMPLETED with conclusion SUCCESS; a StatusContext must have state SUCCESS.
452
481
  Common normalization cannot turn malformed fresh proof into admission. The shared
453
482
  parser and cached evidence schema retain their existing contracts.
454
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
+
455
489
  ## Reviewer quota waits (#1446)
456
490
 
457
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.
package/docs/dogfood.md CHANGED
@@ -10,9 +10,17 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
10
10
 
11
11
  | Feature | State here | Measured by |
12
12
  | --- | --- | --- |
13
+ | Review draft before macOS (#1576) | source and fixture coverage; active after release and restart | compare macOS shard runs per merged PR before and after rollout; target close to one full set of shards per merged PR |
14
+ | Edit governance guards (#1556 T3) | off by default; fixture coverage, available after release and restart | inspect edit guard availability and text-free evidence counts; compare shadow and advisory proposals and check outcomes |
15
+ | Sandboxed package-manager caches (#1549 T3 partial) | source and isolated macOS fixture coverage; active after release and restart | offline Bun and npm installs use per-command writable caches and leave a temporary home untouched; caller overrides and host-wrapper parity are tested; sandboxed reader-lease identity remains open |
16
+ | External merge cost and scan diagnostics (#1555 AC2, #1579) | source and fixture coverage; branch-scoped CI cost readback is available here after release and restart, with live post-upgrade verification pending | compare known `first_pass_check`, CI-at-merge, full-gate and macOS-shard sample counts in `ahub sdlc metrics` after a merged PR; compare per-source unknown scan counts in `ahub sdlc status` |
17
+ | Quota event sampling (#1555 AC4) | source and fixture coverage; active here after release and restart | compare recorded quota row rate and research-quality gap duration across the upgrade |
18
+ | Routine snapshot cooldown (#1550 AC3) | source and fixture coverage; active here after release and restart | count cooldown-start diagnostics and turn-end events with unknown file evidence; compare boundary latency and verify a retry after ten minutes |
13
19
  | Marker-only no-reply guidance (#1550 AC4) | source and fake-agent coverage; available here after release and upgrade | compare status reply hops and queues after upgrade; fake ACP and Codex tests pin marker-only completion |
14
20
  | Roadmap milestones (#1479 R1) | source and isolated fixture coverage; not enabled in the installed hub until release/restart | computed public approved/total and cached issue/spec/train counts; unknown evidence stays unknown; private membership is count-only; real control/CLI, CAS, inheritance, privacy and conditional recovery tests |
21
+ | Roadmap decomposition (#1480 R2 part 1) | source and fake-model/fake-`gh` coverage; not enabled in the installed hub until release/restart; proposes only, so nothing is intaken, linked or published | the share of proposed parts kept (a part that cites a linked id) versus dropped as unsupported, and the share marked `needs_spec` against `task`; a repeat run that supersedes the pending answer instead of doubling it; private milestone text, spec text and issue titles never in the prompt |
15
22
  | Roadmap bottom-up placement (#1481 R3) | source and fake-`gh`/fake-model coverage; not enabled in the installed hub until release/restart; `import-github` is dry-run by default and is never run with `--apply` against this repository's GitHub in a test | `ahub roadmap unplaced` row counts with `partial`/`unavailable` shown; the share of triage suggestions accepted rather than rejected or dropped as unsupported; a second `import-github --apply` that changes nothing; private tasks only ever counted |
23
+ | Roadmap decomposition acceptance (#1480 R2 part 2) | source coverage with a fake model; the installed hub needs release/restart before a part can be accepted, and no part is released without `ahub intake approve` | drafts held against their milestone (`milestone_links` kind `task`); a repeated accept of one part that adds no row; the share of accepted parts released and completed; a part the screen refuses rendering `[pii]` in the reply |
16
24
  | Distinguishable sessions and sender provenance (#1036, `session_identity`) | on after release and upgrade: a connection that names a peer id but is not that peer's current session is a distinct `<peer>~<origin>` session that can send and read, holds none of the peer's roles and replaces nobody; the channel plugin binds to its own project; every envelope and attach event records the connection. Nothing is refused to a connection that worked before. The recovery label `session_identity` applies once an unsettled delivery holds a session's message | `grep '"session":true' .agenthub/state/events.jsonl` lists every message a foreign session sent, with its minted id and no path or text; a recipient's header shows `from "claude~<id>"` for it; test/identity-provenance.test.ts (AC1, AC3, AC4, recovery label) and test/identity-channel-project.test.ts (AC2, real plugin against a new and an old hub) hold it. Not authentication: a same-user process can always act as the user |
17
25
  | Claude channel attach evidence (#1171) | source and fixture coverage after merge and plugin/daemon upgrade; native Claude push proof remains unverified until a live `ahub claude` session | `ahub status` shows `channel` or `tools-only` with its evidence label; a marker-inheriting non-channel parent remains pull-only and its delivery is read by `hub_inbox` (`test/claude-channel-evidence.test.ts`, `test/daemon.test.ts`); inspect native TUI attaches separately, since fixtures use a synthetic parent row |
18
26
  | Accepted channel delivery settlement (#1172) | source and fixture coverage after merge and plugin/daemon upgrade; native channel handling and long-running-session behavior remain unverified | `bus.accepted_settle_ms` defaults to 10 minutes; explicit channel `hub_inbox` metadata shows accepted/held ids and revisions even when a pull is blocked; a timeout becomes `needs_review` without replay; an important/task/review timeout yields one ids-only status notice when the configured conductor feed is on, with `feed: off` remaining an opt-out; daemon and MCP fixtures cover timeout and opt-out; live accepted-to-completed/timeout behavior remains unverified |
@@ -70,6 +78,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
70
78
  | Named CI and build-entry diagnostics (#1328 T2) | Source and fixture coverage; installed runtime adoption here is unverified | `test/required-check-blockers.test.ts` and `test/task-entry-blockers.test.ts`: named status checks, ordered actor/command guidance, pure routing parity, real eligibility and private projection |
71
79
  | Repository required checks at init (#1328 T1) | This repository retains its native CI floor; discovery and empty enforce refusal run in isolated fixtures, never against the working configuration | `test/init-required-checks.test.ts`, init prompt/settings suites and settings read tests measure discovered names, bounded reads, zero-write refusal and running/file values |
72
80
  | Planner pull routing diagnostics (#1430) | source and isolated fixtures; no live planner pull performed for validation | unreserved refusals retain each owner routing reason alongside WIP/hold detail, omit task text, and name hub_backlog_plan fields.reserved then pull again; backlog assignment gives the same next step |
81
+ | Ready reserved backlog auto-pull (#1547) | source and fixture coverage; active here after release when `tasks.auto_pull` is enabled | backlog planning, dependency approval and peer attachment pull a ready reservation only with available WIP; board history records the planner and auto-pull reason |
73
82
  | GSD migration guidance (#1431) | isolated init fixtures; this repository has no live GSD migration | advise/enforce init adds one pointer only for GSD frontmatter; no-marker output is byte-identical and .planning artifacts retain their bytes and modification times; docs command forms match help |
74
83
  | Instructed conductor SDLC configuration (#1432) | off until a direct person instruction in the current conductor's own session; no live migration performed | `ahub sdlc configure` intent/result events record the actor and changed paths; measure saved off/advise/check-list edits, refusal reasons and pending restarts. Scoped host/control/CLI fixtures cover loader, audit, privacy, role/session and enforce boundaries; init and generic settings remain person-only |
75
84
  | Project autonomy preset (#999 T1) | off on this repository until released and explicitly enabled by the person; project scope only | focused person-only, retained-consent, metadata-independent off and authenticated/fallback preset undo tests; the preset writes `action_policy.floor` (#999 T3) and off removes it; status leads with a peer table separating current modes from desired defaults, groups identical floor verdicts and unknowns once with peer lists (#1137), and reads each floor class from the host verdict (`floorEnforcement`), naming the unverified guard where the hub does not see the call first; the Orca zero-prompt native task remains T4 |
@@ -125,7 +134,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
125
134
  | Planner board-changed notice (#758) | on here, with the lifecycle in `advise`: `claude` is the planner, so a card another peer proposes or re-plans reaches it once at task weight, and its own writes, state moves, reviews and assignments cost it no turn | per planner and week: `task`-kind hub envelopes whose body starts `The board changed` (target: one per planning change, none after the planner's own write), the same envelopes at `fyi` priority (recorded, no turn: at most one per 10 minutes), and the count still queued at once (target: at most one). Read from `ahub logs` and the event log; the 12 copies in 44 minutes seen on 2026-10-24 are the baseline |
126
135
  | Planner capacity and dependency notices (#785 P1a) | source/fixture coverage; active after release and hub upgrade | write-triggered `capacity_released` and `backlog_ready` lines in `Planner work ready:` task envelopes; at most one queued envelope per effective planner, peer/WIP/card ids only; no automatic pull |
127
136
  | Release preparation and guarded tag (#787 P3b) | scratch-repo fixtures with a local bare remote; the real history was dry-run in a disposable clone; release branches are prepared with it, and since #1273 it also renders the generated README facts blocks | `scripts/release-prepare.ts` run on a `release/<version>` branch and a release PR that carries the version, CHANGELOG, report and stamps; `scripts/release-tag.ts` refusing without the person's consent and pushing one tag after it; native version-named receipts retained while dated release reports are excluded (#1004 fixture) |
128
- | Opt-in auto pull (#785 P1c) | source/fixture coverage and a real daemon test; off by default, active only where a person sets `tasks.auto_pull` in `config.local.json` | `backlog pulled` history entries with `by: hub` and an `auto_pull:` note; at most one per capacity release; no pull with the setting off, for unreserved, PII, pinned, frozen or dependency-blocked cards |
137
+ | Opt-in auto pull (#785 P1c) | source/fixture coverage and a real daemon test; off by default, active only where a person sets `tasks.auto_pull` in `config.local.json` | `backlog pulled` history entries with `by: hub` and an `auto_pull:` note; at most one per trigger and peer; no pull with the setting off, for unreserved, PII, pinned, frozen or dependency-blocked cards |
129
138
  | Opt-in assignment queue backpressure (#800) | off by default; this change enables no live repository policy | `ahub route explain` and status queue-count/age/unknown reasons beside WIP; bounded summary reads, held-offer release, post-await offline/not-attached origin retention with plan-policy handoff, and role-scoped override regressions; no delivery disposition or routing-template change |
130
139
  | Per-head CI watcher and `ci_completed` (#785 P1b, #1490 AC5) | source/fixture coverage with a fake gh; active after release and hub upgrade | one `ci_completed:` task notice per head to owner and reviewer, a premature review re-offered once green; watchers started per `hub_task_done` head and gone at the result, deadline, newer head, verdict or shutdown; cancelled checks and the intentionally deferred macOS check on a draft PR stay pending, as does its older failure when a newer same-workflow macOS shard is queued or running; same-name rows collapse to a newest run only when workflow and start time make the ordering unique, otherwise duplicate evidence stays; `test/ci-watch.test.ts` covers the ready-run window and genuine failure; no gh read outside a watcher |
131
140
  | Plan conformance (#481 S2, #1403 T6) | advise | PRs with files outside the plan or under exclusions; accept base-to-local remote-tracking default tip (no task head needed); done base-to-unique merge-base of recorded task head/default tip, excluding own commits. Real temp Git graphs cover upstream/own/integrated/unrelated/shallow/ambiguous/missing refs and changed/none/unknown advice; default tip rechecked, no fetch or checkout-HEAD substitution, no live drift receipt yet |
@@ -137,19 +146,20 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
137
146
  | macOS shards deferred on stacked PRs (#1307) | on in CI for every PR after merge | macOS job-minutes per day and the longest macOS queue wait (57 runs, about 2,250 job-minutes and waits over an hour on 2026-11-07, before); `check (macos-latest)` deferral failures that were followed by a full macOS run on the same PR after it targeted `main` |
138
147
  | Seed anchor diagnostics (#684) | on in the seeded checker; exact-match failure remains mandatory | missing anchors report the base commit, enclosing symbol and current file/line or explicit unknown; `test/seeded-check.test.ts` |
139
148
  | Release authorization (#481 S6, #1063, #1120, #1381) | fixture coverage; delegated live consent awaits release and project upgrade | `test/sdlc-release-authorization.test.ts`, `test/sdlc-release-authorization-flow.test.ts` and `test/runtime-capture-checker.test.ts` retain candidate/docs/origin/restart bindings, actual user/conductor actors and checker capture behavior; `test/sdlc-release-configured-authorization.test.ts`, `test/sdlc-release-configured-policy.test.ts` and `test/sdlc-release-configured-report.test.ts` cover package defaults, release-notes and tag-only/requested-version sources, exact-report bindings, docs:none receipts, malformed or local policy, npm target refusal and unchanged actor/remote checks; no fixture authorizes a live release |
140
- | SDLC metrics and control bands (#481 S7) | `ahub sdlc metrics` on; bands off until `[bands]` is set in `.agenthub/sdlc.toml`, and they write cards only in advise or enforce (in off the report still shows tiers). Completion checks are off here, so `first_pass_check` and the PR-based figures read unknown | its own report; breach episodes per week by tier, and band cards the planner accepted rather than dropped |
149
+ | SDLC metrics and control bands (#481 S7) | `ahub sdlc metrics` on; bands off until `[bands]` is set in `.agenthub/sdlc.toml`, and they write cards only in advise or enforce (in off the report still shows tiers). Completion checks are off here; GitHub first-pass fallback is available after the #1579 change is released and the hub restarts | its own report, including known and unknown first-pass and PR-based samples after a new merged PR; breach episodes per week by tier, and band cards the planner accepted rather than dropped |
141
150
  | Fresh headless reviewers (#223, #519) | configured here (`codex-review`); per-tool approval correction and no-verdict diagnostics/re-offer (#783) take effect after release and upgrade | reviews by fresh sessions, findings they add; a per-review start failure names a closed cause class (#722): `ahub status` reviewer line and hub.log `[cause: ...]`, with the share of failures that are `unknown`; stale admission skips and current-policy `no_verdict` reroutes leave the reviewer available (#781); a real `hub_review` verdict per verified backend/version, beyond inventory-only proof; bounded refusal diagnostics, confirmed re-offers without queue holds, and uncertain fallback holds |
142
151
  | Optional Orca companion (#1198 O0-O4) | moved to [STAIxBWLB/ahub-orca](https://github.com/STAIxBWLB/ahub-orca) (#1387); nothing of it remains in this repository. Still off: not installed here, enabled by nothing, not in the package; fixture checks only, `fixture_only` on macOS and unsupported elsewhere, and the native receipts are **person-run** and **not run** | that repository's `support-matrix.json` and `receipts/`; it reads ahub only through `docs/contracts/companion-cli-v1.json`, which `test/companion-contract.test.ts` holds ahub to |
143
152
  | Kimi periodic review isolation (#1284) | source and isolated fixture coverage; running-hub/native-account behavior is unchanged until release and restart | max-input benchmark records historical inline blocking and worker control-response ordering separately from synchronous authority cost; fake-clock absolute cadence/no-overlap, complete filesystem tamper checks, source and plugin-only workers, and native/worker cleanup retry tests; no new native compatibility or model-quality claim |
144
153
  | Completion checks per class | off: the implementer already runs `scripts/check.sh`; a hub-run copy would double the heavy-slot use | time to verdict when on |
145
154
  | Supervision rules and proposals (#1221 T1, T2) | off here: `supervision.mode` is machine-local and defaults to off, so this project's board is not evaluated; with `shadow` a reading only fills a bounded queue, and with `advisory` a pending proposal appears in the console inbox where an explicit accept runs one existing action | the rule fixtures (19, including the exported snapshot shape, the evaluated coverage and its bound, about 0.2 s on one Mac, Bun 1.4.4) plus the queue and decision fixtures: `bun test test/supervision-rules.test.ts test/supervision-proposals.test.ts test/acon-supervision-inbox-1221.test.ts`, which cover the per-rule triggers and gaps, the zero-effect counts, dedupe by rule/task/revision/trigger, the 100/3/400/50 bounds with the refused total, every decision fence including the action's own authority before and after the facts read, the separate intent and receipt, the unknown outcome reconciled from the board's own record at the intent time and inside the proposal's revision, restart, and the advisory inbox row with its two verbs |
155
+ | Supervision pilot (#1221 T3, AC5) | shadow only, on one task for one week: 18 proposals, all one rule, all file-level or directory-level overlaps, every one expired and none classified; no advisory step and no action run; running cost unmeasured | `hub_supervision_list` on the piloted task, with the receipt's reading ledger and per-lifetime refusal counter: `docs/verification/2026-11-11-supervision-pilot-1221.md` |
146
156
 
147
157
  ## Memory and knowledge
148
158
 
149
159
  | Feature | State here | Measured by |
150
160
  | --- | --- | --- |
151
161
  | amem runtime integration (agent-mem#13 P4) | on after release; no claude-mem worker dependency; 0.27.1 search grouping and agent-shell attribution are fixture-tested, live rollout unverified | no-worker tripwire requests (must be 0), screened capture rows, profile refusals, all-author short-term recall, bounded-view truncation notices and curated-only ask citations; `test/memory-grouping.test.ts` checks grouped and ungrouped CLI search and the unchanged daemon tool; `test/memory-agent-shell.test.ts` reads agent-attributed writes and checks person-only refusals |
152
- | Shared memory through amem, briefs, recall preface | on; library intent briefs and plan guard (#436) take effect after release and hub upgrade; legacy index/timeline reads and worker notices retire in intent mode | notes saved per week, brief hits, fails that prevented a retry; the session preface's bytes and memory lines per session and how many were reordered by observed use (`preface` events, `events.preface` in `quality.json`, #1330; the cited share is the existing per-task `memory` block's `cited` over `rendered`, which covers briefs and prefaces together, not a preface-only per-session share); same-input hub/library brief equality, host privacy refusals and front-of-brief plan fails despite the library byte cap or standalone screen |
162
+ | Shared memory through amem, briefs, recall preface | on; library intent briefs and plan guard (#436) take effect after release and hub upgrade; legacy index/timeline reads and worker notices retire in intent mode | notes saved per week, brief hits, fails that prevented a retry; the session preface's bytes and memory lines per session and how many were reordered by observed use (`preface` events, `events.preface` in `quality.json`, #1330; the cited share is the existing per-task `memory` block's `cited` over `rendered`, which covers briefs and prefaces together, not a preface-only per-session share); same-input hub/library brief equality, host privacy refusals and front-of-brief plan fails despite the library byte cap or standalone screen; synthetic scan-limit loop delay and bounded host-state checks (#1545) |
153
163
  | `ahub ask` | on | answers with cited ids |
154
164
  | Source registry, `ahub source add\|list` (#508 AC1, AC2, AC5 CLI) | on after release; local (no daemon needed for the person); `add` is the person's or the configured conductor's (#933, admitted and audited by the hub); `hub_source_read` adds bounded, screened snapshots and private stubs; plan sources are registry-validated on proposal/acceptance, and the dashboard Plan sheet lists allowlisted source metadata (#1144) | `ahub source list` rows (id, size, private, origins); `sources/` under the hub state dir; a refusal in the CLI audit for an agent shell; unknown-plan-source refusals and metadata-only dashboard snapshot tests (#1144) |
155
165
  | Intake drafts, `ahub intake` (#511 AC1 CLI, AC2 to AC4) | on after release; person-only except `approve`, which the configured conductor may run too (#933); a draft is held until `ahub intake approve`, so nothing changes for work that does not use it; the dashboard Plan sheet stages the same held drafts and refuses delegated live-test intake (#1144) | drafts opened, approved and discarded in `ahub backlog list` and the board history (`draft approved`, `intake unsplit` with its reason); the share of drafts the planner or hub model split without a reason on file |
@@ -173,10 +183,11 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
173
183
  | Recovery and upgrade wait settings (#489 H4, task 445) | available after release; this PR does not change this hub's running configuration: the five `recovery.*` settings default to the waits they replace (managed attach 600 s, unmanaged reconnect 90 s, control request 30 s, shutdown 30 s, terminal idle 120 s) and nothing is set in this repository's config | every default equals its old constant (pinned with independent literals), every person-visible wait refuses a value below what shipped, a bad or unreadable file is the default and never an error inside a recovery, the coordinator reads both layers and the file at each wait, and inherit and undo go through the local file; the waits' use inside the real recovery driver (a configured value changing an actual attachment, shutdown or control wait) is covered only as far as the tests in this PR reach, and no real upgrade was run with a configured value |
174
184
  | Tasks and routing operational settings (#489 H2, task 441) | available after release; this PR does not change this hub's running configuration: the six `tasks.*` settings default to the constants they replace (demotion threshold 1.5, half-life, contradiction window, re-screen cap 10, split minimum 5 observations, split failure share 0.3), and nothing is set in this repository's `config.local.json` | each setting's default equals its old constant (pinned independently of the descriptor), each reader is called by the code that used the constant, `ahub settings set`, inherit and undo for `tasks.demote_at`, and a reload that reaches the next demotion, re-screen and split read; 29 hand-made mutants, none surviving; inherit and undo are not yet looped over all six keys, and no live `ahub settings set tasks.*` against a running hub |
175
185
  | Bus and delivery operational settings (#489 H3, task 444) | available after release; no running hub configuration is changed here; five defaults retain the previous retry/digest/pull/note/history constants | default pins, bounded H1 schema/UI/apply parity, next-operation runtime traces and real-daemon write/inherit/undo fixtures for all five keys; live native console/dashboard editing and production delivery performance remain unverified |
176
- | Adapter timing settings (#489 H5, task 446) | available after release; no running hub configuration is changed here; defaults remain ACP tool ceiling 30 min, activity batch 50 ms and Jcode steer 5 s | independent legacy pins, bounds/schema/UI/apply checks, fake-based watchdog/batching/absolute-deadline behavior and real-daemon next-launch snapshots/inherit/undo; native/account timing and live console/dashboard editing remain unverified |
186
+ | Adapter timing settings (#489 H5, task 446) | available after release; no running hub configuration is changed here; defaults remain ACP tool ceiling 30 min (60 min since #1601), activity batch 50 ms and Jcode steer 5 s | independent legacy pins, bounds/schema/UI/apply checks, fake-based watchdog/batching/absolute-deadline behavior and real-daemon next-launch snapshots/inherit/undo; native/account timing and live console/dashboard editing remain unverified |
177
187
  | Model relay and inference settings (#489 H6, task 447) | available after release; no running hub configuration changed here; legacy defaults retained and all seven rows require daemon restart | default pins, schema/UI/apply parity, fake-clock cooldown/backoff and local fake-server journal coverage; configured native/model calls and live console/dashboard editing remain unverified |
178
188
  | UI and console settings (#489 H7, task 448) | available after release; no running console or hub configuration changed here; defaults retained | independent default pins, bounds and config/inherit/undo, startup snapshot/fallback, poll seam, notice/history, cold-start counted trimming and permission/close handling; native interactive console editing remains unverified |
179
- | Context gate | off: `context.gate = 0` | context-pressure events |
189
+ | Context gate | off: `context.gate = 0`; Pi occupancy has source and fake-bridge coverage in headless and TUI modes after release, native live status remains unverified | context-pressure events; `ahub status` reports `pi_usage` and freshness for a verified current Pi session |
190
+ | Roadmap drift, mirror and export (#1482 R4) | source and fake-GitHub coverage; mirror off by default and live write not exercised; mirror inventory fails closed at 1000 issues and PRs | `ahub roadmap check` findings and unknown rules, preview fingerprints, generated roadmap validation and ids-only supervision notices |
180
191
  | Structured checkpoint fields (#1331, `hub_checkpoint`) | on after release and hub upgrade: the fields are optional, so a checkpoint that sends only `summary` behaves as before; quota checkpoints run here, context checkpoints only where `context.gate` is set (off here) | one `checkpoint` event per accepted checkpoint (peer, reason `quota` or `context`, the names of the fields it carried, never its text); `events.checkpoints` in `quality.json` (`total`, `byFieldCount`, `byField`) shows how many checkpoints used the fields and which; over-length refusals name the field and limit in the tool result, and the unit and daemon tests are `test/checkpoint-fields.test.ts` and `test/daemon-context.test.ts` |
181
192
  | Context headroom admission (#802) | off by default: `context.max_assignment_used = 0`; not enabled here by this PR | `ahub route explain` known/unknown context decisions and offered owners; pure/session-freshness, real Tasks/manual override and machine-local config regressions; native live admission remains unverified |
182
193
  | Always-ask action classes (#636) | on after release for managed Claude forms, hub-owned ACP in ask mode, local/Pi tools and received Codex command approvals; Codex native bypass stays not enforceable | classed permission requests (a `gh api graphql` query is a read, a mutation, `gh run` or `gh workflow` write and every command with a shell expansion in a classed position (`git push $B`, `rm -rf "$DIR"`) is asked about: #756, #762; `test/action-class.test.ts` holds the table), full local/Pi command visibility and denied effects for incomplete native views; actionPolicyInfo current-child enforceability, remaining class budgets and weakening attention; Codex native no-request and Kimi non-ask ceilings are explicit |
@@ -196,6 +207,8 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
196
207
  | Urgent accept takes back unaccepted offers; WIP refusal splits accepted from offered (#1080) | on after release and upgrade; fixture coverage only (`test/urgent-wip.test.ts`: a real `Tasks` over a real board, an owner at its limit with one accepted task and offers). A live urgent task for a busy owner is not recorded here | task history: `unassigned` by `hub` with a `displaced by urgent task` note; the planner notice `was taken back from`; any `planner WIP capacity` refusal that still reads as one undivided list of open tasks |
197
208
  | Declared needs keep work from a peer that cannot do it (#1081: `needs_network`, `needs_worktree`) | on after release and upgrade, for tasks proposed with `needs_network` or `needs_worktree` (or `--needs-network`, `--needs-worktree`); fixture coverage only (`test/routing-network-needs.test.ts` and `test/routing-worktree-needs.test.ts`: routing, `route explain`, explicit assignment, a reservation, accept with a rostered fake Pi and Codex, and a real git repo showing a refused accept creates no branch ref; `test/capabilities-network-worktree.test.ts`: a real daemon's per-peer capabilities). A real Pi or local worker offered flagged work is not recorded here. A hub-made worktree for a sandboxed peer (#1115) is covered by fixtures only (`test/task-worktree.test.ts`: real git, a bare origin, the hub's commit and push, a moved branch or HEAD refused, the path policy, decline and cancel cleanup; `test/task-worktree-sandbox.test.ts`: the real `sandbox-exec` profile, unchanged, with the peer editing and the hub's commit after (the peer's own commit failing is asserted in `test/sandbox-git-refs.test.ts`, #1123); `test/task-worktree-tasks.test.ts`: accept, refusal, decline, cancel and the done hand-off through `Tasks`), so it is on after release and upgrade, for flagged work offered to Pi or local in a git repository with a GitHub origin, and its metric is a Pi or local task whose branch was committed and pushed by the hub and reviewed, with no `.git` write attempt from the sandbox (expected: none) and no empty `task/*` refs left by a declined or cancelled one | `ahub route explain` lines `skipped, no network` and `skipped, no worktree` for Pi or local; Pi or local declines of work that needed the network or a worktree (expected: none once the task is flagged); empty branch refs left by a declined Pi or local task (expected: none for flagged tasks); unflagged tasks that were declined for a missing worktree or registry, which show the planner is not flagging them |
198
209
  | Sandbox refuses `.git` ref, HEAD and worktree writes (#1123) | on after release and upgrade for the local worker and Pi (hub sandbox); fixture coverage under the real `sandbox-exec` only (`test/sandbox-git-refs.test.ts`: the main checkout, a hub-made worktree, a worktree beside its project, a bare repository's worktree, a submodule, a nested one and a linked worktree's, folded names, projects below directories named like the rules; `test/sandbox.test.ts` and `test/tools.test.ts` rewritten where they asserted a sandboxed commit). It needs macOS, so the Linux gate skips it. A real Pi or local worker task is not recorded here; since #1129 a sandboxed task of a write class gets the hub's worktree and commit whether or not it is flagged | a Pi or local write-class task that ends with uncommitted edits in the main checkout (expected: none, the hub made it a worktree), the local `git` tool's `the sandbox does not let you move a branch` note in turn results, and any `Operation not permitted` on a `.git/refs`, `HEAD` or `worktrees` path from a command that should not need it |
210
+ | Managed worktree pre-handoff checks (#1549 T1) | source and fake Pi daemon fixtures only; active after release and upgrade, with live Pi execution unverified | count managed-owner `hub_check_start` runs whose runner ref matches the task's recorded commit, and later `hub_task_done` tip-fence refusals; `test/pi-daemon.test.ts` and `test/task-worktree-tasks.test.ts` cover exact-head admission, unchanged-head reuse, protected paths and later handoff |
211
+ | Managed worktree PR handoff (#1549 T2) | fake GitHub fixtures only; active after release and upgrade, with live Pi execution unverified | managed-owner completions whose `sdlc.pr` identifies the exact pushed head; creation, reuse, lost reply and authority-change refusals are covered by `test/task-pr.test.ts` and `test/task-worktree-tasks.test.ts` |
199
212
  | Hub worktree and commit for every write-class task of a hub-sandboxed owner (#1129) | on after release and upgrade, for `implement` and `bulk_edit` work offered to Pi or the local worker in a git repository, whether or not the task says `needs_worktree`; fixture coverage only (`test/task-worktree-tasks.test.ts`: an unflagged implement and bulk_edit task get the worktree at accept, the hub commits it at `hub_task_done`, decline and cancel clear it, read-only classes and PII tasks get none, a self-claim makes it; `test/routing-worktree-needs.test.ts`: write-class work is not offered where the hub cannot make a worktree and the trace names the cause, read-only classes are not refused; `test/pi-daemon.test.ts` runs a real Pi accept in a repository). A real Pi or local worker task through a whole accept, edit and done is not recorded here | write-class tasks owned by Pi or local whose `hub_task_done` carries a hub commit and branch (expected: all of them); `ahub route explain` lines `skipped, no worktree` for Pi or local on write-class work outside a git repository (expected there, with the cause), write-class tasks that stay with Claude or Codex because the hub could not make a worktree (the cost of this rule: watch whether it starves Pi), and empty `task/*` refs left by a declined or cancelled one (expected: none) |
200
213
  | Paged `hub_task_list` (#1083) | on after release and upgrade, for agents (an agent session's `ahub board` follows the pages); the person's console and `ahub board` from a terminal keep the bare array. Fixture coverage only (`test/task-list-page.test.ts`: a real daemon with 600 seeded tasks; `test/board-agent-paged.test.ts`: the real `ahub board` and `--columns` under an agent identity over a two-page board). A real conductor session reading the live board is not recorded here | the size of a conductor's `hub_task_list` result on the live board (expected: under 64 KB, a `next` cursor while more exist); a page walk that ends with no task repeated; `ahub board` run from an agent shell listing as many tasks as `ahub board` from a terminal; any peer or script that still fails parsing `hub_task_list` as a bare array |
201
214
  | `ahub init` guided prompt (#1065 T2) | on wherever a person runs `ahub init` at a terminal on a new project with no flag and no `--yes`; fixture coverage only (the real CLI under a scripted pty in a temporary HOME: `test/init-prompt.test.ts`). A person answering it on a real new project is not yet recorded and not run here | `ahub init` runs by a person that end with `wrote ...` after the plan, against runs that end `nothing was written` (N, Ctrl-C, Ctrl-D, three bad answers); no `Write this?` line in any log of a peer, live-test or piped run; the settings a person changes from the default, per question |
@@ -224,6 +237,8 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
224
237
  | Headless amem Records (#1320) | source and disposable fixtures only; off in the running hub until release/upgrade and coordinated shared-home upgrades; production source uses the exact 0.23.1 policy API; no native/provider-backed receipt | Record capture accepted/dropped counts, forwarded answer/digest bytes, injected brief/recall bytes; proven saved-ID/anchor overlap compaction, unchanged unrelated notes, privacy/owner/steering fences and restart fallback in `test/headless-record*.test.ts` |
225
238
  | Research record v2 and dataset export (#1277; person, memory and budget hand-off blocks #1278, #1279, task 802) | off here: `research.enabled` is not set in this repository's config; source and fixture coverage after merge (`test/research-record-v2.test.ts`, `test/research-quality.test.ts`, `test/research-dataset*.test.ts`: a real `hub.db` with hand-computed blocks, the privacy canary and the CLI over two registered projects); no live research pilot has run | `ahub research export --dataset <dir>` then `quality.json`: per-field `unknown` share (a share near 1 for a block means its source is not reaching the record), token attribution share, quota gaps |
226
239
  | Observed model per turn (#1402 T1 to T5) | source and fixture coverage after merge and release; the running hub reports it after upgrade and restart. Live per-agent ids are unrecorded (no model call was made for it), so each agent's source below is from its native schema or the repo's receipts | the share of approved tasks whose owner model is known at `served` or `session` grade: `ahub research` prints `owner model known (served or session): N of M tasks`, and `by model` stops reading `unknown` for them (a `configured` grade counts as a model but not toward that share). `ahub status` and `ahub model list` show the last observed model with its grade (`observed (served)` / `observed (session)`) in place of `not reported` when no override, instance, launch or native baseline model is known. Sources: Codex thread/start and `model/rerouted`, Claude print `modelUsage`, ACP `currentModelId`, Pi `get_state`, Antigravity hook `modelName`; records written before #1402 stay `unknown` until `ahub research backfill` |
240
+ | Edit-governance factorial analysis (#1556 T4) | fixture coverage; available after release, with no live arm selection | compare known and unknown edit-rate groups and 2x2 contrasts; `quality.json` reports cost per verified success unknown until component costs are measured |
241
+ | Edit governance counts (#1556 T2) | runs on this repository once `research.enabled` is on and the hub restarts; source and fixture coverage only until then | `quality.json` `fields["edits.editTool.total"]`: `n` records and how many are `unknown` (tree_only or no evidence); a read-only turn adds no `edits` field |
227
242
  | Dogfood scorecard (#687) | on after release; read-only weekly receipt | `ahub report --dogfood --since 7d --json`; bounded evidence and explicit unknowns |
228
243
  | Claim verdicts and fact_check provenance (#901) | source/fixture coverage; the live research pilot (a person entering verdicts with `ahub task claim`) remains unverified | `ahub report --dogfood` research rows: `claims.reachedPersonVerdict`, per-slot `personVerdict`/`modelLabel`/`agreement`, `factCheck.selection`/`passed`/`failed`/`missingKeysPerRun`; null until a verdict or a keyed check is recorded |
229
244
  | Claim evidence links and synthesis readiness (#931 T1-T3) | source/isolated fixtures after merge; this dev-profile repository publishes no evidence writer and has no live research evidence pilot | Unicode scalar offsets, complete/version-bound projections, duplicate-origin groups and private-upgrade readback; explicit offline manifests bind registered artifact hashes and the complete latest-link inventory; ready-then-new-counterevidence, changed claims/projections/artifacts, missing judgments, open/withdrawn historical contradictions, person disposition and privacy-race fixtures; separate citation/provenance/judgment statuses never certify truth; live research acceptance remains unverified |
package/docs/events.md CHANGED
@@ -6,6 +6,10 @@ file is for tools (`ahub export`, `ahub report`, research measurements). The
6
6
  version is bumped only when a field changes meaning or goes away; new fields and
7
7
  new event types do not bump it.
8
8
 
9
+ ## Rotation (#1546)
10
+
11
+ `events.jsonl` rotates by size: when the live file reaches 64 MiB the daemon renames it to `events.jsonl.<start>`, where `<start>` is the byte offset, in the one stream the segments and the live file make together, of the segment's first byte. Three rotated segments are kept. The oldest is dropped only when no open task could need it: it is kept while its last event is at or after the creation of the oldest open task, so the log may grow past three segments until that task closes, and `hub.log` says when it kept one. Readers (`ahub export`, `ahub report`, `ahub research backfill`, `ahub usage`, the startup seeds, `dogfood`) read the segments oldest first and then the live file, so they see the lines an unrotated file would have held; a byte offset is a position in that stream and survives a rotation. Dropped segments are gone: an offset below the oldest kept byte starts at the oldest kept segment, and a task whose first event was dropped is read from what the log still holds. `hub.log` rotates the same way at 16 MiB with two segments kept, by copy and truncate while the daemon runs (its stderr also appends to the file) and by rename at the next start.
12
+
9
13
  Every event has `v` (schema version), `at` (ISO time) and `type`. No event ever
10
14
  carries a message body or a task title or detail. Private (PII) envelopes are
11
15
  marked `private: true`, and PII tasks `pii: true`.
@@ -33,7 +37,7 @@ marked `private: true`, and PII tasks `pii: true`.
33
37
  | `native_turn_end` | `peer`, `id` (an opaque hash that names the completed turn): the end of a Claude turn, recorded once the hub finds the turn its Stop hook reported completed in the native transcript (Codex's is its `turn_end`), or the correlated final `turn.ended` of a Kimi TUI turn (#1282), or an agy terminal `Stop` of an active, fully idle turn, which carries no `id` and a closed `reason` (`user_canceled`, `error`, `max_invocations`, `max_forced_invocations`, `max_token_budget_exceeded`, `terminal_step_type`, `terminal_custom_hook`; #1280); quiescence evidence for an integration, never a hook payload, prompt or error |
34
38
  | `supervision_turn` | `peer`, `turn` (the hub turn a supervision notice was delivered into, or `supervision-<uuid>` when none was open), `tokens` (when the adapter reported any for it), `ms` (from that turn's start, or from the delivery when none was open, to its native end): a completed native turn that received supervision, which `ahub report` counts; a failed delivery or turn, a peer that went offline or a changed native session records none |
35
39
  | `conduct` | `peer` (the conductor, or `user` when the console releases a conductor hold), `action`, `task` (when the action names or creates one), `target` (the peer an assignment, start, hold or release names): one action of the conductor that ran, the structured twin of the console's `conductor` notice. `action` is a tool name without its `hub_` prefix: a conductor tool (`status`, `task_show`, `task_assign`, `task_escalate`, `peer_start`, `peer_hold`, `peer_release`), or one of the conductor peer's own task tools, which are not conductor tools (`task_propose`, `task_accept`, `task_decline`, `task_done`, `review`, `checkpoint`, `remember`). The role-free reads and redirects (a task's owner or reviewer with `hub_task_show`, its proposer with `hub_task_assign`) record none, and neither does `hub_task_list` |
36
- | `agent_cli` | `peer` (`unknown` when the agent markers were invalid), `command` (the command and, where it has one, its subcommand, from a closed list; `unknown` otherwise; never an argument), `refused` (the CLI refused it before connecting: a human-only command, or an invalid identity; a later refusal by the hub is not recorded here), optional `delegated: true` or `instructed: true` for the corresponding audited authority path: an `ahub` command run from an agent session. The hub reads these from the `cli-audit/` outbox, so `at` is when it read the record. From #1278 it also carries `task` and `attribution` (the `turn_end` rule) when the record is drained within 15 s of the command; an older record is `unattributed`, never matched to the task open at drain time |
40
+ | `agent_cli` | `peer` (`unknown` when the agent markers were invalid), `command` (the command and, where it has one, its subcommand, from a closed list; `unknown` otherwise; never an argument), `refused` (the CLI refused it before connecting: a human-only command, or an invalid identity; the daemon also writes this event for a conductor operation it admits or refuses on authority; for any other task command the CLI adds a second record with `refused: true` beside the up-front one only when the daemon's reply carries `authorityRefused: true`, which the daemon sets only for conductor operations, so any other failed task command, an unknown task or a role refusal by the hub included, adds none, #1547), optional `delegated: true` or `instructed: true` for the corresponding audited authority path: an `ahub` command run from an agent session. The hub reads these from the `cli-audit/` outbox, so `at` is when it read the record. From #1278 it also carries `task` and `attribution` (the `turn_end` rule) when the record is drained within 15 s of the command; an older record is `unattributed`, never matched to the task open at drain time |
37
41
  | `hook_stats` | `peer`, `n` (facts hook calls in the turn, its Stop included), `startupMs` and `maxStartupMs` (the hook processes' start-up and connect time, summed and the largest), `hubMs` (the hub's own time for them): at Claude's Stop (issue #108) |
38
42
  | `cohort` | `id`, `event` (`formed`, `joined`, `lifted`), `silent`, `tasks`, `owners`: owners of overlapping tasks formed a cohort, it changed membership, or it stopped being silent (issue #107). Recorded in every regime; only a turn-free project's cohorts can be silent |
39
43
  | `split` | `task`, `where` (`routing`: routing chose the first owner of a task overlapping another owner's task not started yet, not an escalation, relay or reassignment, the record calibration reads; `cohort`: an overlap formed or changed a cohort), `verdict` (`split`, `single`, `unknown`), `single` (the peer that would finish both units alone soonest), `splitS`, `singleS`, `reason` (for `unknown`), `trace` (the inputs and steps: peer names, their profiles of versions and coordination, and numbers only): a shadow split prediction; it never changes the assignment (issue #109) |
@@ -41,7 +45,7 @@ marked `private: true`, and PII tasks `pii: true`.
41
45
  | `visual` | `id`, `kind` (`mermaid`, `comparison`, `table`, `beforeAfter`), payload UTF-8 `bytes`, image `files` count, optional numeric `task`: a bounded public visual was stored (#1058). Never the title, source, comparison/table text, path or image bytes. Ordinary delivery records carry only the visual stub and id. |
42
46
  | `native_thread` | `peer` (`codex`), `thread` (its native thread id), `fresh` (`true` when the TUI started the thread, `false` when it resumed one): each thread the Codex adapter adopts, before any turn on it. The upgrade planner reads it: a thread with no rollout that the hub saw start, with no `turn_start` since, is planned as a fresh start (issue #215) |
43
47
  | `turn_start` | `peer`, `turn` (`<peer>#<hub run>.<n>`, unique across restarts). A turn follows the adapter: pausing a busy peer does not end it |
44
- | `turn_end` | `peer`, `turn`, `ms`, `tokens` (when the adapter reported any during the turn), `files` and `snapshotMs` (when snapshots are on: how many files the turn changed, and the time both snapshots took); optional numeric `task`, `attribution` (`delivery`, `single_open`, `unattributed`) frozen at turn start, `pii: true` for an attributed PII task; optional `model` and `modelEvidence`, both or neither (#1402): the model id the adapter observed for the turn, with how it was learned, strongest first: `served` (the provider or the native transcript named it for this turn's responses), `session` (the native session's current model id), `configured` (only the hub's own override or launch flag is known). An alias is recorded as the native surface reported it, never expanded; a label that fails the safe-label check is dropped with its evidence |
48
+ | `turn_end` | `peer`, `turn`, `ms`, `tokens` (when the adapter reported any during the turn), `files` and `snapshotMs` (when snapshots are on: how many files the turn changed, and the time both snapshots took); optional numeric `task`, `attribution` (`delivery`, `single_open`, `unattributed`) frozen at turn start, `pii: true` for an attributed PII task; optional `model` and `modelEvidence`, both or neither (#1402): the model id the adapter observed for the turn, with how it was learned, strongest first: `served` (the provider or the native transcript named it for this turn's responses), `session` (the native session's current model id), `configured` (only the hub's own override or launch flag is known). An alias is recorded as the native surface reported it, never expanded; a label that fails the safe-label check is dropped with its evidence; optional `edits` (#1556 T2, only with `research.enabled`, never for a private turn, absent on a read-only turn): closed counts `obs` (`hook`, `stream`, `tree`), `arm`, `e` (edit tool) and `s` (shell route) as five counts each (total, verified full read, partial read only, blind or stale, rejected or blocked), `u` (tree writes no hook attributed), `fe`, `rev`. Never a path, a command or text; the operational view does not export it |
45
49
  | `tokens` | `peer`, `n` (tokens added since the previous report), optional `source: kimi_wire` and opaque `id` (the native row, used to keep a partial-write retry exactly once), optional numeric `task`, `attribution` (`delivery`, `single_open`, `unattributed`), `pii: true` for an attributed PII task |
46
50
  | `usage` | `peer`, `source` (`omniroute`, `claude_transcript`, `claude_result`, `codex_appserver`, `kimi_wire`, `jcode_acp`, `agy_transcript`), opaque `id`, optional `measuredAt` (provider/source time), the `requestedModel`, `servedModel` and `provider` labels, and any provider-reported counters (`inputTokens`, `outputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `reasoningTokens`, `totalTokens`); optional numeric `task`, `attribution` (`delivery`, `single_open`, `unattributed`), `pii: true` for an attributed PII task. Missing counters stay unknown. |
47
51
  | `task` | `id`, `event` (the board history event, e.g. `proposed`, `assigned`, `done`, `check failed`, `blocked`, `ready`), `by`, `state`, `owner`, `reviewer`, `class`, `pii`, and `reason` when the board recorded a move reason (`manual`, `budget`, `offline`, `idle`, `rejections`, `declined`, `inference_failed`, `delivery_failed`, `step_limit`). The research record (docs/research.md, #1277) reads these for every terminal task, approved or cancelled; no new event type was added |
@@ -55,7 +59,7 @@ marked `private: true`, and PII tasks `pii: true`.
55
59
  | `pii_screen` | `task` (absent for a budget hand-off or a note not about a task), `item` (`task`, `summary`, `review note`, `handoff`, `note`), `label` (`pii`, `clear`), `source` (`regex`: a pattern matched and no call was made; `screen`; `unknown`: no verdict, handled as PII), `category` (`name`, `student_id`, `phone`, `address`, `grade`, `health`, `other`), `miss` (why there was no verdict: `too long`, `off campus`, `timeout`, `unreadable`, `failed`), `ms` (absent for `regex`): one PII screen verdict while `signals.pii_screen = "local"` (issue #198); never the text |
56
60
  | `checkpoint` | `peer`, `reason` (`quota`, `context`), `fields` (the names, from `done`, `in_progress`, `next`, `verified_by`, `traps`, of the structured fields the saved checkpoint carried; an empty list for a summary-only one): one per `hub_checkpoint` the hub accepted (#1331). Never the checkpoint text. |
57
61
  | `context_pressure` | `peer`, `source` (`claude_statusline`, `codex_token_usage`, `acp_usage_update`), `measuredAt` (epoch ms of the reading), `used` (the fraction of the context window in use, 0 to 1), `window` (its size in tokens, or null): a fresh reading of a peer's native context reached `context.gate`. Recorded once per crossing, until a reading below the gate or a new native session rearms it, and not while the peer is paused or offline or the hub is in recovery or stopping |
58
- | `quota` | `peer`, `windows` (`id`, `used`, `resetsAt`), `hard`, `measuredAt` (when the reading was taken, if not when it arrived: Claude's numbers come through a file) |
62
+ | `quota` | `peer`, `windows` (`id`, `used`, `resetsAt`), `hard`, `measuredAt` (when the reading was taken; older rows omit it when the reading was current) |
59
63
  | `budget_pause` | `peer` (the account), `reason` (the coordinator's own text: window id, percent and source), `window` (`5h`, `week`, `tokens` or `unknown`), `resetsAt` (epoch ms), `by` (`hub`). Written where the pause record is written (#683). |
60
64
  | `budget_resume` | the same fields; `reason` says why it ended and `by` is `hub` (the window reset, or usage fell back under the gate) or `person` (an `ahub budget resume` override). A pause replaced by a new one after its window reset gets a `budget_resume` first (reason `replaced by a new pause after its window reset`). `ahub reset` clears pauses without writing one, because it keeps `events.jsonl` untouched. |
61
65
  | `quota_reset` | `peer`, `window`, `cause` (`resets_at_moved`: the window's `resetsAt` moved forward by more than 15 minutes, since a provider's `resetsAt` wobbles by seconds inside one window; `used_dropped`: `used` fell by 0.5 or more inside one window id), `resetsAt`, `previousResetsAt`, `used`, `previousUsed`, optional `measuredAt`. Derived from two readings, one entry per peer, window and `resetsAt`, also across a restart. |
@@ -203,3 +207,5 @@ per-model-step tool observations, and Claude contributes tool inputs from turn-f
203
207
  a native turn id. Missing peers or intervals therefore mean unobserved, not zero activity. Escalation uses only known
204
208
  native turn ids; observations without one still contribute progress dimensions but cannot establish separate attempts
205
209
  or the eight-turn spinning threshold.
210
+
211
+ Quota rows record the first reading, material changes and a 15-minute heartbeat; pending last readings are flushed before a long silence or clean shutdown. `ahub report` counts recorded quota rows and hard rows, not provider polls. JSON retains `quota.readings` and `quota.hard`.
@@ -0,0 +1,7 @@
1
+ # Influences
2
+
3
+ agent-hub shares no code with these projects. Each informed a feature; the design and implementation are agent-hub's own.
4
+
5
+ - [agent-bridge](https://github.com/raysonmeng/agent-bridge): a bridge between Claude Code and Codex. Its forwarding of agent messages, marker tiers, busy guard and turn watchdog informed the bus.
6
+ - claude-mem: a memory service for coding agents. It was the hub's memory backend until 2026-10-17, when the first-party `@staix/agent-mem` replaced it; `ahub memory` can still import from it ([memory](memory.md)).
7
+ - [GSD](https://github.com/gsd-build/get-shit-done): a phased workflow for coding agents. Its acceptance-criteria checklist remains in the review's Compliance pass ([analysis](gsd-collaboration-analysis.md)).
package/docs/memory.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hub memory integration
2
2
 
3
- Agent-hub consumes the exact-pinned first-party [`@staix/agent-mem`](https://github.com/STAIxBWLB/agent-mem) library (the exact pin is in [package.json](../package.json); initial pin `0.1.1`). The package owns portable storage, tiers, graph, goals, sync, import and raw commands. Agent-hub owns caller authority, current project privacy policy, task lifecycle integration and presentation. Claude-mem is an optional, explicit import source only; runtime recall and capture make no worker HTTP requests.
3
+ Agent-hub consumes the first-party [`@staix/agent-mem`](https://github.com/STAIxBWLB/agent-mem) library through the declared range `>=X.Y.Z <M.0.0` in [package.json](../package.json) (X.Y.Z at or above 0.33.0, M the next major; the lockfile resolves a release inside it). A plain release inside the range is accepted without a hub release when the package's `HOST_API_MIN` and `HOST_API_VERSION` are positive integers, `MIN <= VERSION`, and their range intersects the host API range this hub supports (`[1, 1]`); a package without them, or with an incompatible host API, is refused with the cause and the next step. A new major is a reviewed raise. Format-floor note: a new minor may raise the on-disk format floor, and a store written by it is not readable by an older hub or amem, so roll the hub back only together with the store, and read agent-mem's release notes for the new floor before upgrading. The package owns portable storage, tiers, graph, goals, sync, import and raw commands. Agent-hub owns caller authority, current project privacy policy, task lifecycle integration and presentation. Claude-mem is an optional, explicit import source only; runtime recall and capture make no worker HTTP requests.
4
4
 
5
5
  ## Portable core and data directory
6
6
 
@@ -214,7 +214,7 @@ Write screening examines both the JSON representation and literal structured key
214
214
 
215
215
  ## Agent-authored records (#1320)
216
216
 
217
- Managed headless Codex, Kimi, Qwen, Jcode, Pi and local turns receive the package-owned Record instruction once per owned turn. Claude sessions keep their own amem hook path; isolated reviewers and person-owned TUI prompts receive no new instruction. The public `recordsEnabled` accessor from exact-pinned amem 0.29.0 applies the effective machine/repository `records: false` setting to instruction, capture and Record preference. An unavailable policy disables this optional path.
217
+ Managed headless Codex, Kimi, Qwen, Jcode, Pi and local turns receive the package-owned Record instruction once per owned turn. Claude sessions keep their own amem hook path; isolated reviewers and person-owned TUI prompts receive no new instruction. The public `recordsEnabled` accessor from agent-mem 0.32.1 applies the effective machine/repository `records: false` setting to instruction, capture and Record preference. An unavailable policy disables this optional path.
218
218
 
219
219
  The hub imports the instruction and parser from agent-mem. Valid final-answer records become `Record` capture rows with project and peer attribution, not curated notes or approved evidence. Complete text and anchors clear current secret, PII, private-path and deny policy before storage. Private, PII, review-scoped, remote, unbound and incomplete turns are excluded. Owner, turn, session, profile and policy must remain current; unsafe steering excludes the rest of that turn. No model or network call is added.
220
220
 
@@ -290,11 +290,11 @@ An unchanged failure emits one safe log line per episode. A complete bounded pol
290
290
 
291
291
  `ahub memory declined [--json]` is a read-only inspection that an agent shell may also run (#1522). It reports physical outbound row IDs and safe policy categories, never title, body, path nodes or literal private patterns. Reads defer promotions and recheck the profile binding. Forgotten originals still matter: `forget` changes materialized visibility but leaves the source row in append-only history. Do not use it as a promise to clear a sync refusal.
292
292
 
293
- The exact-pinned agent-mem 0.29.0 supplies bounded `inspectSyncPolicy` inspection for shared-v1 and generation profiles. A complete result lists the declined IDs and safe rule categories for the inspected physical outbound history, including originals hidden by a later forget. An incomplete `input-bound` result may now carry an optional `bound` receipt (`kind`, `limit`, `observed`, `nextStep`); `complete` and `reason` keep their shapes. An unavailable, stale or bounded-out inspection remains explicitly incomplete; it never proves that no declined rows exist. The hub uses the public SDK rather than private helpers, snapshots of full history or its own portable log reader.
293
+ The declared agent-mem floor (0.33.0) supplies bounded `inspectSyncPolicy` inspection for shared-v1 and generation profiles. A complete result lists the declined IDs and safe rule categories for the inspected physical outbound history, including originals hidden by a later forget. An incomplete `input-bound` result may now carry an optional `bound` receipt (`kind`, `limit`, `observed`, `nextStep`); `complete` and `reason` keep their shapes. An unavailable, stale or bounded-out inspection remains explicitly incomplete; it never proves that no declined rows exist. The hub uses the public SDK rather than private helpers, snapshots of full history or its own portable log reader.
294
294
 
295
295
  The package also owns per-row local placement. The hub adopts only the projection of a successful trusted SDK placement result: `ok` with its verified withheld/exported counts. Since agent-mem 0.23.0 the daemon passes `placementAttestation` on every `syncMemory` pass, built by the package's own `createPlacementAttestation` for the memory home (`hostPlacementAttestation`, `src/hub/memory-sync-attestation.ts`). A legacy or shared-v1 store ignores it. The hub supplies no writer facts of its own, never fabricates the proof and builds a new one per pass, so no measurement outlives it. A refusal (`PlacementWriterContextError`) is its own closed cause `writer` in status, the dashboard and the log: the category (`running CLI`, `host package`, `setup receipt`, `declared writer`, `active locator`, `home floor`, `writer renewal`, or `unknown` for an unrecognized SDK category), the cause class (`missing`, `changed`, `unavailable`) and the next step (repair the amem install and its host pin, then a person runs `amem migrate --sync-placement --dry-run`). The package's message, paths and versions never enter status or logs. It logs once per episode like every other cause. Count projection does not delete or rewrite notes, change policy or promote a declined row; transport failures remain failures.
296
296
 
297
- Legacy stores without active per-row placement still refuse a sync containing declined rows. The native amem CLI has person-only activation from 0.22.0 ([activation documentation](https://github.com/STAIxBWLB/agent-mem/blob/v0.24.0/README.md#initial-sync-placement-activation)). A person using a CLI upgraded with the hub's pin (0.29.0; a 0.22.1 install sharing the home drops Record entries, see [Agent-authored records](#agent-authored-records-1320)) can preview it with every local writer installation declared, including the CLI and hub library installs:
297
+ Legacy stores without active per-row placement still refuse a sync containing declined rows. The native amem CLI has person-only activation from 0.22.0 ([activation documentation](https://github.com/STAIxBWLB/agent-mem/blob/v0.24.0/README.md#initial-sync-placement-activation)). A person using a CLI upgraded with the hub's declared floor (0.32.1; a 0.22.1 install sharing the home drops Record entries, see [Agent-authored records](#agent-authored-records-1320)) can preview it with every local writer installation declared, including the CLI and hub library installs:
298
298
 
299
299
  ```sh
300
300
  amem migrate --sync-placement --dry-run --writer-root '<cli-install-root>' --writer-root '<host-amem-install-root>' --json