@staix/agent-hub 0.37.0 → 0.39.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.
- package/CHANGELOG.md +55 -0
- package/README.md +17 -7
- package/docs/adding-an-ai-tool.md +6 -4
- package/docs/agent-notes/README.md +16 -0
- package/docs/agent-notes/adapters.md +4 -2
- package/docs/agent-notes/budget.md +8 -0
- package/docs/agent-notes/daemon.md +15 -8
- package/docs/agent-notes/local-worker.md +1 -1
- package/docs/agent-notes/security-review.md +55 -0
- package/docs/agent-notes/tasks.md +15 -4
- package/docs/agent-notes/tests.md +3 -2
- package/docs/design/adapters.md +51 -0
- package/docs/design/agent-hub-architecture.md +29 -1
- package/docs/design/guidance-probes.md +365 -0
- package/docs/design/task-board.md +151 -5
- package/docs/dogfood.md +22 -7
- package/docs/events.md +3 -3
- package/docs/memory.md +5 -5
- package/docs/operations.md +189 -32
- package/docs/profiles.md +101 -9
- package/docs/quickstart.md +38 -4
- package/docs/research.md +6 -3
- package/docs/roles.md +52 -0
- package/docs/sdlc.md +187 -1
- package/docs/security.md +56 -13
- package/docs/text-projection.md +1 -0
- package/docs/verification/2026-11-11-0.38.0.md +41 -0
- package/docs/verification/2026-11-11-guidance-probe-t3-1226.md +85 -0
- package/docs/verification/2026-11-11-guidance-probe-t4-1226.md +65 -0
- package/docs/verification/2026-11-13-claude-implementer-2.1.323.md +59 -0
- package/docs/verification/2026-11-13-codex-01672-reviewer-isolation.md +69 -0
- package/docs/verification/2026-11-14-0.39.0.md +51 -0
- package/docs/verified.json +48 -25
- package/package.json +3 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +1989 -474
- package/plugins/agent-hub/server.js +2056 -512
- package/src/adapters/acp-model-policy.ts +1 -1
- package/src/adapters/acp-session-model.ts +35 -0
- package/src/adapters/acp.ts +14 -0
- package/src/adapters/agy/definition.ts +1 -1
- package/src/adapters/agy/hooks.ts +7 -0
- package/src/adapters/claude-channel.ts +3 -2
- package/src/adapters/claude-implementer.ts +8 -0
- package/src/adapters/claude-print-child.ts +26 -2
- package/src/adapters/claude-print.ts +4 -0
- package/src/adapters/codex-appserver.ts +90 -16
- package/src/adapters/codex-review-isolation.ts +2 -0
- package/src/adapters/compat.ts +4 -4
- package/src/adapters/conformance/fakes/acp-server.ts +11 -2
- package/src/adapters/conformance/fakes/app-server.ts +5 -1
- package/src/adapters/conformance/fakes/pi-rpc.ts +1 -1
- package/src/adapters/definitions/builtin-metadata.ts +6 -6
- package/src/adapters/definitions/native-cli-jcode-mcp.ts +18 -3
- package/src/adapters/definitions/native-quota.ts +122 -0
- package/src/adapters/definitions/native-recovery.ts +3 -0
- package/src/adapters/definitions/qwen.ts +1 -1
- package/src/adapters/kimi-review.ts +23 -0
- package/src/adapters/kimi-wire-usage.ts +39 -16
- package/src/adapters/local-probe.ts +65 -6
- package/src/adapters/local-worker.ts +6 -3
- package/src/adapters/pi-state-model.ts +12 -0
- package/src/adapters/pi.ts +22 -0
- package/src/adapters/print-result-model.ts +24 -0
- package/src/adapters/registry-types.ts +10 -1
- package/src/adapters/registry.ts +19 -2
- package/src/adapters/reviewer-print.ts +130 -15
- package/src/adapters/role-eligibility.ts +99 -0
- package/src/adapters/same-directory.ts +16 -0
- package/src/cli/agy-mcp.ts +18 -7
- package/src/cli/console-state.ts +3 -1
- package/src/cli/free-text.ts +20 -0
- package/src/cli/handoff-args.ts +1 -1
- package/src/cli/help.ts +61 -6
- package/src/cli/identity.ts +10 -4
- package/src/cli/init-prompt.ts +31 -2
- package/src/cli/init-roles.ts +156 -0
- package/src/cli/init-settings.ts +24 -2
- package/src/cli/init.ts +141 -17
- package/src/cli/main.ts +216 -56
- package/src/cli/model.ts +1 -1
- package/src/cli/output.ts +64 -5
- package/src/cli/preview.ts +1 -1
- package/src/cli/recovery-launch.ts +114 -0
- package/src/cli/recovery-package.ts +14 -7
- package/src/cli/recovery-version-preflight.ts +104 -0
- package/src/cli/role-doctor.ts +39 -0
- package/src/cli/sdlc-output.ts +66 -1
- package/src/cli/study-output.ts +54 -0
- package/src/cli/study.ts +14 -1
- package/src/cli/terminal-recovery.ts +14 -0
- package/src/cli/upgrade-presentation.ts +4 -0
- package/src/cli/upgrade-restore-state.ts +12 -3
- package/src/cli/upgrade-runtime.ts +41 -3
- package/src/cli/upgrade.ts +8 -4
- package/src/hub/advisor-survey.ts +139 -0
- package/src/hub/audit-source.ts +66 -0
- package/src/hub/board.ts +479 -14
- package/src/hub/budget.ts +54 -4
- package/src/hub/bus.ts +2 -2
- package/src/hub/conductor.ts +14 -8
- package/src/hub/config-apply.ts +2 -1
- package/src/hub/config-edit-host.ts +77 -5
- package/src/hub/considered-findings.ts +47 -0
- package/src/hub/control-client.ts +1 -1
- package/src/hub/daemon.ts +373 -66
- package/src/hub/deliverable-files.ts +17 -1
- package/src/hub/dogfood-profile.ts +3 -2
- package/src/hub/envelope.ts +6 -1
- package/src/hub/events.ts +23 -2
- package/src/hub/folder-trigger.ts +11 -4
- package/src/hub/guidance-probe-store.ts +345 -14
- package/src/hub/guidance-probes.ts +338 -4
- package/src/hub/hub-tools.ts +88 -16
- package/src/hub/kimi-usage.ts +34 -2
- package/src/hub/lifecycle-schema.ts +3 -3
- package/src/hub/manager.ts +24 -1
- package/src/hub/memory-profile.ts +9 -1
- package/src/hub/memory-sync-state.ts +1 -0
- package/src/hub/model-overrides.ts +2 -1
- package/src/hub/no-writes.ts +2 -0
- package/src/hub/operational-authority.ts +8 -2
- package/src/hub/operational-view.ts +5 -1
- package/src/hub/peers.ts +2 -0
- package/src/hub/person-command.ts +25 -0
- package/src/hub/plan-conformance.ts +20 -2
- package/src/hub/quota-account.ts +34 -0
- package/src/hub/recovery-policy.ts +18 -4
- package/src/hub/research-evidence.ts +51 -3
- package/src/hub/research.ts +77 -13
- package/src/hub/restart.ts +14 -0
- package/src/hub/review-budget.ts +88 -0
- package/src/hub/review-findings.ts +93 -12
- package/src/hub/reviewer-pool-config.ts +6 -2
- package/src/hub/reviewer-pool.ts +39 -6
- package/src/hub/routing.ts +7 -3
- package/src/hub/sdlc-merge.ts +1 -1
- package/src/hub/sdlc-queue.ts +14 -4
- package/src/hub/sdlc-release.ts +1 -1
- package/src/hub/sdlc.ts +10 -6
- package/src/hub/security-audit.ts +178 -0
- package/src/hub/security-pass.ts +115 -0
- package/src/hub/settings.ts +11 -5
- package/src/hub/source-read.ts +80 -2
- package/src/hub/sources.ts +57 -9
- package/src/hub/startup-event-seeds.ts +5 -3
- package/src/hub/startup-timing.ts +1 -0
- package/src/hub/supervision.ts +3 -2
- package/src/hub/synthesis-readiness.ts +279 -0
- package/src/hub/tasks.ts +1131 -72
- package/src/hub/text-projection.ts +11 -1
- package/src/local/probe-types.ts +2 -0
- package/src/local/probe-workspace.ts +191 -2
- package/src/memory/capture.ts +2 -1
- package/src/ui/guidance-panel.ts +34 -2
- package/src/ui/guidance-view.ts +33 -0
- package/src/ui/index.html +3 -0
- package/src/ui/office-model.ts +11 -3
- package/src/ui/office-space.ts +50 -30
- package/src/ui/plugin.ts +31 -14
- package/templates/AGENTS.block.md +14 -14
- package/templates/profiles/general.json +1 -1
- package/templates/profiles/research.json +1 -1
- package/templates/profiles/writing.json +1 -1
package/docs/profiles.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- Experiment attempts recorded on a study unit are read with `ahub study experiments --campaign <id>` (or `--attempt`, or `--plan` with `--baseline` and `--variant`) and `hub_experiment_show`. Each value shows its source: `declared` is the agent's own word, and only `host-observed`, `runner-attested` or `person-attested` rows are evidence, none of which proves the science. A rerun by a person attaches through an existing check, a hashed output file or a registered runner's signed receipt, as the checklist in `docs/operations.md` ("Experiment readback") says; without one the experiment stays declared and its sealing unverified. The synthetic CPU-only fixture is `test/research-experiments-fixture.test.ts`; no account, GPU or native model has run an experiment here.
|
|
26
26
|
- The deterministic three-source, two-peer example (`test/study-daemon.test.ts`, "three-source, two-peer example"): one contract names sources S0, S1 and S2 and two discovery units, `alpha` (S0 and S1, owned by codex) and `beta` (S2, an independent check, owned by kimi). After `ahub study approve` both units read `none` and `0/2 covered`, `0/1 covered`. A handoff for S0 only moves `alpha` to `incomplete` with `1/2 covered`. A handoff for both S0 and S1, and one for S2, make both `complete` and the discovery round complete. Another peer's handoff for `alpha` is refused. This runs with fake peers: it shows the hub's rules, not that a native model follows the guidance.
|
|
27
27
|
|
|
28
|
-
# Claim evidence links (#931 T1)
|
|
28
|
+
# Claim evidence links and synthesis readiness (#931 T1-T3)
|
|
29
29
|
|
|
30
30
|
An active owner of an in-progress research-profile task can record
|
|
31
31
|
`hub_evidence_record`. The task need not belong to a campaign. Researcher role
|
|
@@ -52,13 +52,105 @@ an identical replay writes nothing, while a changed link names its ID and next
|
|
|
52
52
|
revision. Revisions remain append-only. The public receipt contains only link ID,
|
|
53
53
|
revision and task ID; arguments and results are excluded from memory capture.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
half-open scalar-value range of at most 4096.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
Recording checks registered source identity/raw hash and stores a proposed
|
|
56
|
+
zero-based, half-open Unicode scalar-value range of at most 4096. It stores no
|
|
57
|
+
claim text, excerpt, origin/path or invented page coordinates. Relation labels
|
|
58
|
+
remain proposals, not entailment or source-quality judgments.
|
|
59
|
+
|
|
60
|
+
`hub_evidence_read {id, revision?}` resolves the latest link by default, or a named
|
|
61
|
+
immutable revision, under the existing task-show authority. Dev-profile tool
|
|
62
|
+
publication remains unchanged. Each read rechecks the current claim list,
|
|
63
|
+
registered source, full screened projection and privacy after asynchronous work.
|
|
64
|
+
The result is `resolved`, `stale`, `unavailable` or `private`; only `resolved`
|
|
65
|
+
returns the declared link and a sanitized excerpt of at most 4096 UTF-8 bytes.
|
|
66
|
+
The other states carry link/revision/task IDs only. A later private upgrade
|
|
67
|
+
withholds the source ID, hashes, locator, excerpt, origin/path and derived text,
|
|
68
|
+
including from a formerly public link. No excerpt is cached or captured to memory.
|
|
69
|
+
|
|
70
|
+
Offsets count Unicode scalar values, not UTF-8 bytes, UTF-16 units or sanitized
|
|
71
|
+
presentation characters. The source-read range already counts code points;
|
|
72
|
+
conversion validates scalar boundaries explicitly against the complete immutable
|
|
73
|
+
text, never against its bounded public `[cut]` presentation. Missing, truncated
|
|
74
|
+
or changed projections cannot resolve a link. A converter-backed registration
|
|
75
|
+
binds its actual configured converter fingerprint and full output hash. Plain
|
|
76
|
+
UTF-8 uses a named decoder algorithm. Legacy sources without that receipt remain
|
|
77
|
+
unavailable until an explicit re-registration can bind the same stored bytes and
|
|
78
|
+
text; reads never invent a converter version or page coordinates. An already bound receipt and its stored text remain immutable: re-registering identical bytes does not refresh a changed converter fingerprint. Use the retained matching converter or a genuinely new input snapshot; versioned projection retention is the later upgrade path.
|
|
79
|
+
|
|
80
|
+
`origins` reports connected groups of overlapping registered origins through
|
|
81
|
+
opaque IDs. Private, unknown or over-bound inventories, or an inventory that
|
|
82
|
+
changed during the read, make that result unknown; damaged evidence storage still fails.
|
|
83
|
+
Repeated copies or a shared origin do not supply another group. These are
|
|
84
|
+
provenance groups, not proof of independent corroboration, semantic support or
|
|
85
|
+
truth. Source revalidation is offline and performs no download. A matching
|
|
86
|
+
citation key, resolved passage or evidence relation never creates a #901 person verdict.
|
|
87
|
+
|
|
88
|
+
Use `ahub study evidence <ev-id> [--revision <n>]` to re-read a link through
|
|
89
|
+
current task/source privacy and projection checks. The person can run
|
|
90
|
+
`ahub study evidence --task <task>` for authoring bindings: task incarnation,
|
|
91
|
+
claim identities/revisions, complete-inventory hashes, evidence IDs/revisions
|
|
92
|
+
and registered deliverable IDs/hashes. This view includes no claim prose,
|
|
93
|
+
document, path or origin.
|
|
94
|
+
|
|
95
|
+
`ahub study check <task> <manifest.json>` explicitly checks a bounded version-1
|
|
96
|
+
manifest naming the task incarnation, registered Markdown and BibTeX
|
|
97
|
+
deliverable IDs/hashes, each current claim's revision and complete latest-link
|
|
98
|
+
inventory revision/hash, and selected evidence IDs/revisions with citation
|
|
99
|
+
keys. It reads local snapshots and guarded artifacts without fetching documents
|
|
100
|
+
or running a semantic judge. It may invoke the existing configured privacy
|
|
101
|
+
screen, including its model: that is privacy policy, not source retrieval.
|
|
102
|
+
Unavailable or unknown screening makes provenance unavailable and never ready;
|
|
103
|
+
the observational check does not upgrade or downgrade source privacy because
|
|
104
|
+
screening did not clear.
|
|
105
|
+
|
|
106
|
+
The result separately reports citation resolution, source/locator provenance,
|
|
107
|
+
person judgment, open contradictions and unchanged artifacts. `ready` means
|
|
108
|
+
structural/provenance readiness for the complete declared claim list, not
|
|
109
|
+
truth, entailment, source quality or independent corroboration. Changing a
|
|
110
|
+
claim, artifact, projection/converter or any inventory link invalidates the
|
|
111
|
+
earlier binding, including unselected counterevidence. Missing, private,
|
|
112
|
+
truncated or unavailable inputs cannot produce ready. Non-ready exits 1.
|
|
113
|
+
The report shows the person verdict class (`supported`, `unsupported`,
|
|
114
|
+
`unclear`) separately. All count as a recorded assessment; ready does not mean
|
|
115
|
+
supported. JSON and text report the same statuses. This check runs only on explicit
|
|
116
|
+
invocation. The existing `scripts/check-citations.ts` mode is unchanged.
|
|
117
|
+
The manifest is capped at 64 KiB, 50 claims, 128 selected links total and
|
|
118
|
+
128 ASCII characters per citation key. Existing latest-inventory reads use a
|
|
119
|
+
128-row task window; overflow is incomplete, never a truncated success.
|
|
120
|
+
Guarded Markdown/BibTeX reads retain 256 KiB/4 MiB caps. Active registered raw
|
|
121
|
+
inputs have a 64 MiB aggregate ceiling for one check.
|
|
122
|
+
|
|
123
|
+
To withdraw a link, its owner or the console person records the next revision with the same link ID
|
|
124
|
+
and `status: "withdrawn"` through `hub_evidence_record`. Omitting status means
|
|
125
|
+
active; an explicit `active` normalizes to omission. Prior revisions remain
|
|
126
|
+
retained. Latest readback names withdrawal without returning a passage. A
|
|
127
|
+
withdrawal remains part of the complete inventory hash.
|
|
128
|
+
A former `contradicts` link stays a `withdrawn` contradiction after withdrawal
|
|
129
|
+
or reclassification. An earlier plain verdict cannot clear it: a person must
|
|
130
|
+
resolve or qualify the current manifest. History is verified within 1,024 rows
|
|
131
|
+
per claim; incomplete or unavailable history cannot establish ready. Historical
|
|
132
|
+
source privacy is rechecked too. History across claim versions of the same
|
|
133
|
+
claimId is committed into the inventory hash; restoring an older claim list
|
|
134
|
+
cannot hide counterevidence moved to another version.
|
|
135
|
+
The task must still be in progress and public, including for a person. A closed
|
|
136
|
+
task's evidence stays final; open a follow-up research task for corrections and
|
|
137
|
+
create its own manifest instead of reusing the earlier task's binding.
|
|
138
|
+
|
|
139
|
+
For an adjudicated or explicitly qualified conclusion with open counterevidence,
|
|
140
|
+
the person uses the existing verdict record:
|
|
141
|
+
`ahub task claim <task> <slot> <supported|unsupported|unclear> --manifest <manifest.json> --disposition <resolved|qualified>`.
|
|
142
|
+
The CLI computes the file's canonical SHA-256; the hub independently refreshes
|
|
143
|
+
current claim, link/inventory and guarded artifact bindings before recording
|
|
144
|
+
the verdict. A mismatch refuses before writing and names the current
|
|
145
|
+
`manifestSha256`. The descriptor is never stored, and a later inventory change
|
|
146
|
+
never silently re-binds the person's earlier disposition. Both flags are
|
|
147
|
+
required together, only on a research task/profile. This is the person's assessment of
|
|
148
|
+
that exact manifest, not an agent's permission to certify truth. Any changed
|
|
149
|
+
manifest binding requires a new disposition. The existing #901 verdict and its
|
|
150
|
+
claim-list revision remain the only judgment record.
|
|
151
|
+
These new forms require the running hub's authenticated `research_synthesis`
|
|
152
|
+
capability. Upgrade and restart an older hub first; the CLI refuses before
|
|
153
|
+
sending a manifest-bound verdict that an older hub could silently downgrade.
|
|
62
154
|
|
|
63
155
|
# General project example
|
|
64
156
|
|
|
@@ -95,7 +187,7 @@ nor an evidence relation creates a person verdict or proves entailment.
|
|
|
95
187
|
- Classes may add or remap profile aliases to existing base classes. Existing base names keep their meanings; class maps are bounded to 32 override entries. Task storage and route explanations preserve the alias, including a dev custom alias, while routing/budgets/checks use its base. Other tasks under custom dev data retain the selected profile semantics too, so document sections do not become whole-path overlaps. Unmodified dev rows retain their old shape.
|
|
96
188
|
- `plan_keys` selects distinct existing plan fields, not new board fields. Task proposals and their schemas use the selection. Accept schemas retain legacy fields for already existing tasks/profile changes.
|
|
97
189
|
- `role_text` is bounded guidance for existing flow roles (2000 characters each); it grants no authority. `catalog_roles` supplies bounded compatible guidance ids; the existing explicit catalog selections take precedence. Actual flow maps remain in `roles` and retain their existing validation.
|
|
98
|
-
- `agents`
|
|
190
|
+
- A shipped profile's `agents` is its own paragraph, appended to the shared `templates/AGENTS.block.md` inside the managed block (#1399). A project's `profile_overrides.agents` still replaces the whole managed block (16000 characters maximum); surrounding instructions remain either way. Init previews contain paths/actions only. `example_checks` is at most 16 display strings of 2000 characters, shown as advisory examples by init and never selected as executable checks. `review_checklist` is at most 16 non-empty strings of 500 characters, customizing the checklist items in review requests with `{target}` and `{check}` interpolations. Existing `checks` trust remains authoritative.
|
|
99
191
|
- No override mutates shipped profile data or another project. Unknown fields, base remapping and invalid/oversized data are refused. Headers are quoted. Daemon/MCP restart is required for config changes; no native model consumption or research measurement is claimed.
|
|
100
192
|
|
|
101
193
|
# Domain packs (#513a)
|
package/docs/quickstart.md
CHANGED
|
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
|
|
|
18
18
|
|
|
19
19
|
<!-- facts:install-tag -->
|
|
20
20
|
```bash
|
|
21
|
-
bun add -g github:STAIxBWLB/agent-hub#v0.
|
|
21
|
+
bun add -g github:STAIxBWLB/agent-hub#v0.39.0
|
|
22
22
|
ahub setup
|
|
23
23
|
```
|
|
24
24
|
<!-- /facts:install-tag -->
|
|
@@ -41,6 +41,8 @@ If the dotfiles CLI manages ahub (`dot ai family install ahub`), `ahub` runs fro
|
|
|
41
41
|
|
|
42
42
|
`ahub doctor` tells you what is installed, running and configured. Rows you do not need can stay red: the hub works with any subset of the peers.
|
|
43
43
|
|
|
44
|
+
Who conducts, plans and reviews is yours to choose, including with no commercial agent at all: see [choosing who conducts, plans and reviews](roles.md#choosing-who-conducts-plans-and-reviews).
|
|
45
|
+
|
|
44
46
|
For managed launchers, two-agent task/review work, approvals, graceful shutdown,
|
|
45
47
|
and upgrade or crash recovery, see the [operations guide](operations.md). To
|
|
46
48
|
move a running project to a newer release later, run `ahub upgrade` in a
|
|
@@ -48,6 +50,18 @@ terminal in that project: it reviews the plan with you, applies it and follows
|
|
|
48
50
|
it; other projects keep their version. It then names the `bun add -g` and
|
|
49
51
|
`ahub setup` step when your global CLI or plugin is older than the new daemon.
|
|
50
52
|
|
|
53
|
+
## Upgrading to 0.39.0
|
|
54
|
+
|
|
55
|
+
Reviewers are now admitted by quota: `review.gate` defaults to 0.8 and `review.unknown_quota` to `skip`, so a reviewer whose account usage is at or above 80%, or unknown, is skipped and the task takes the existing fallback, and `review.max_minutes` (default 20) caps each native review. To admit unknown readings run `ahub settings set review.unknown_quota pass`, or turn the floor off with `ahub settings set review.gate off`, from a person terminal ([reviewer quota admission](operations.md#reviewer-quota-admission-and-review-caps-1446), #1446, #1467). The conductor must run interactively: a project whose `roles` give `conductor` to kimi, qwen, local or agy, or to a peer that starts headless, loses that role on upgrade with a notice naming the fix, and the person conducts from `ahub console` meanwhile; `ahub doctor` gains a `roles` row and a `shared config` row, which warns with the fixing command when `.agenthub/config.json` is not committed although the AGENTS.md block points at it (#1408, #1411). The `@staix/agent-mem` pin moves from 0.24.0 to 0.26.0: the curated index moves to `index-v4.db` and non-Claude Records spool as `hook-v4-`, which a 0.38.0 hub sharing the home leaves pending, so upgrade every hub and `amem` CLI sharing a home together, and raise its curated format floor to 0.25.0 (needed only for `preference` notes) after that. Nothing else changes until you use it: `ahub init --conductor|--planner|--reviewer` and `--track-config`, `ahub roles`, `ahub sdlc audit`, `[security]` paths in `sdlc.toml` and `ahub sdlc configure` ([roles](roles.md#choosing-who-conducts-plans-and-reviews), [lifecycle](sdlc.md)). N-1 is published 0.38.0 and control remains 16 through 17.
|
|
56
|
+
|
|
57
|
+
`ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.39.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
|
|
58
|
+
|
|
59
|
+
## Upgrading to 0.38.0
|
|
60
|
+
|
|
61
|
+
After the upgrade, a command the hub prints for you (a held delivery in `ahub status`, `ahub queue show`, the hold notice) runs as printed, with the project directory, revision, action and reason filled in. `ahub doctor` shows a `hub instructions` warning when the project's AGENTS.md block is older than this release: run `ahub init --dry-run` to preview and `ahub init --yes` to refresh it, then commit AGENTS.md. Guidance probe receipts (`ahub guidance probe receipts`) change nothing until you use them.
|
|
62
|
+
|
|
63
|
+
`ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.38.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
|
|
64
|
+
|
|
51
65
|
## Upgrading to 0.37.0
|
|
52
66
|
|
|
53
67
|
The `@staix/agent-mem` pin moves to 0.24.0, whose storage formats equal 0.23.1's (#1396). Raise a shared home's curated format floor to 0.24.0 only after every hub sharing that home runs 0.37.0. The Orca, Herdr and Claude Code companions are no longer in this package: install them from STAIxBWLB/ahub-orca, STAIxBWLB/ahub-herdr and STAIxBWLB/ahub-claude, which read ahub only through the companion CLI contract v1 (#1387, #1392). The replaced routing modules and their Apache notice are gone; routes, `stage` compatibility and route events behave as before (#1393). `ahub console` now shows the daemon, console, global CLI and Claude plugin versions, and an AHUB column per peer (#1386). Nothing else changes until you use it: `ahub sdlc authorize-release` can read a committed version source for a project without `package.json` (#1383), and `ahub guidance probe register|start|show|cancel` records a private probe declaration whose lifecycle runs only with test fixtures; production has no probe runner (#1391, #1395). N-1 is published 0.36.0 and control remains 16 through 17.
|
|
@@ -274,7 +288,7 @@ ahub console # use in another terminal if up used --no-console; Tab opens
|
|
|
274
288
|
ahub kimi # Kimi in its own pull-only TUI; --mode headless for the hub-driven peer
|
|
275
289
|
```
|
|
276
290
|
|
|
277
|
-
On a new project at a terminal, `ahub init` first asks each main setting (profile, agents, specs, SDLC mode, coordination, memory, snapshots and the rest) with its default in brackets. Enter keeps a default, and nothing is written until you answer y to the plan. `ahub init --yes` takes every default without asking.
|
|
291
|
+
On a new project at a terminal, `ahub init` first asks each main setting (profile, agents, who conducts, plans and reviews, whether to commit the shared hub config, specs, SDLC mode, coordination, memory, snapshots and the rest) with its default in brackets. Enter keeps a default, and nothing is written until you answer y to the plan. `ahub init --yes` takes every default without asking.
|
|
278
292
|
|
|
279
293
|
`ahub up` also starts a default set of agents, `claude` and `codex` unless you choose others, each in a terminal the hub opens (`terminal.open`, or Orca). It prints one line per agent, and an agent it cannot open is named with the command to run yourself (`ahub claude`, `ahub codex`). Choose the set once with `ahub setup --agents kimi,codex` (or answer the question in `ahub setup`), change one project with `ahub settings set start.agents <a,b>`, and skip it for a run with `ahub up --no-agents`. Without a terminal provider nothing is opened and the hub keeps running; start them by hand:
|
|
280
294
|
|
|
@@ -309,6 +323,23 @@ The mode and check names are written to `.agenthub/sdlc.toml`.
|
|
|
309
323
|
See [required checks](sdlc.md#required-checks-at-initialization) for discovery
|
|
310
324
|
limits and repository-specific configuration.
|
|
311
325
|
|
|
326
|
+
Initialization and `enforce` remain person-only. Once the project is initialized
|
|
327
|
+
and its hub is running, the person may directly instruct the uniquely configured
|
|
328
|
+
conductor in its own session to stage a later off/advise configuration:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
ahub sdlc configure --mode advise --required-checks 'unit,lint'
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Replace the example names with this project's checks. The command makes an
|
|
335
|
+
explicit, cooperative own-session instruction claim, records its actor and audit
|
|
336
|
+
intent, uses loader validation and a backup, and applies at the next hub start.
|
|
337
|
+
A task, file or peer relay is not that instruction, and `--live-test` cannot
|
|
338
|
+
delegate it to a person. Generic settings editing, `[security]`, `eval_check`,
|
|
339
|
+
`config_paths`, custom stages and any change while the running or file mode is
|
|
340
|
+
`enforce` stay with the person. This grants no release consent. See the
|
|
341
|
+
[narrow configuration contract](sdlc.md#instructed-conductor-configuration-1432).
|
|
342
|
+
|
|
312
343
|
Research recording is another init choice: `--research` or `--no-research` sets
|
|
313
344
|
`research.enabled` in this project's untracked `.agenthub/config.local.json`. A new project otherwise uses the trusted
|
|
314
345
|
machine choice saved by an explicit `ahub setup --research` or
|
|
@@ -320,7 +351,9 @@ writes.
|
|
|
320
351
|
|
|
321
352
|
Review `git status --short` and `git diff`, then commit `AGENTS.md`,
|
|
322
353
|
`.agenthub/config.json`, `.agenthub/routing.toml`, `.agenthub/sdlc.toml` and other
|
|
323
|
-
shared init changes such as `.gitignore` as applicable.
|
|
354
|
+
shared init changes such as `.gitignore` as applicable. With `--no-track-config`
|
|
355
|
+
(or answering off) the three `.agenthub` files stay ignored instead, and each
|
|
356
|
+
checkout holds its own roles; `ahub roles` prints them. Keep
|
|
324
357
|
`.agenthub/config.local.json`, `.agenthub/routing.local.toml` and runtime state
|
|
325
358
|
untracked. Start through `ahub up` or the dedicated launchers such as
|
|
326
359
|
`ahub claude` and `ahub codex`, as in [First session](#first-session), so the
|
|
@@ -408,6 +441,7 @@ or set `OMNIROUTE_API_KEY`. The `.agenthub/routing.toml` that `ahub init` writes
|
|
|
408
441
|
| `ahub task propose [--class <c>] <title>` | put work on the board; the hub picks an owner and a reviewer, and the class if you name none |
|
|
409
442
|
| `ahub board` | who has what, one line per task at a terminal width; `--full` for whole titles and SDLC advice, `ahub task show <id>` for one task |
|
|
410
443
|
| `ahub task cancel <id> --reason <text>` | close obsolete work without approving it or stopping a native turn |
|
|
444
|
+
| `ahub roles` | who conducts, plans, implements, verifies and reviews, as the running hub settled them, and who reviews when no reviewer can run |
|
|
411
445
|
| `ahub settings set planner <peer>[,<peer>...]` | pin up to eight planners; status reports whether they came from settings, roles or the automatic choice |
|
|
412
446
|
| `ahub settings reload` | apply edited config files without a restart; guarded values wait for your `y` in this terminal, and restart-only keys stay pending |
|
|
413
447
|
| `ahub settings edit <file> set <path> <json>` | change an instance, the review block or the `sdlc.toml` lifecycle with a validated diff and a backup; `ahub settings backups` lists the backups |
|
|
@@ -427,7 +461,7 @@ More: `ahub help`. How it is built and why: [`docs/specs/2026-09-19-agent-hub-de
|
|
|
427
461
|
|
|
428
462
|
## Shared memory
|
|
429
463
|
|
|
430
|
-
The hub exact-pins the first-party `@staix/agent-mem` <!-- facts:agent-mem-pin -->0.
|
|
464
|
+
The hub exact-pins the first-party `@staix/agent-mem` <!-- facts:agent-mem-pin -->0.26.0<!-- /facts:agent-mem-pin --> core, including deterministic capture; no claude-mem worker is needed. Existing shared-v1 memory remains the default; upgrading does not migrate it. Managed agents use screened `hub_memory_search`, `hub_memory_show` and `hub_memory_graph` tools, or propose a correction with `hub_memory_correct`; only a person accepts candidates through the supported `amem review` path. Since agent-mem 0.7.0, `amem review` also accepts candidates on a selected generation.
|
|
431
465
|
|
|
432
466
|
Before any real generation migration, upgrade every hub sharing that memory home to 0.12.30 or later and check its authenticated binding with `ahub memory profile-check` in each custom registry. Ready bindings prove compatibility, not an atomic live cutover: quiesce consumers and close their handles before migrating, then reopen through the supported session-preserving lifecycle. Invalid or changed profiles disable native memory without falling back to legacy writes; the bus and board continue. See [memory operations](operations.md#hub-memory) for the remaining rollout gates.
|
|
433
467
|
|
package/docs/research.md
CHANGED
|
@@ -30,9 +30,10 @@ When a task reaches a terminal board state (a review approves it, its owner repo
|
|
|
30
30
|
until no open turn is attributed to the task (the turn that approved it ends after the approval, and its usage arrives
|
|
31
31
|
later still), checking every 10 s for at most 30 minutes, then appends one task record built from that project's
|
|
32
32
|
events and the board. A hub that stops first writes it once its peers have stopped. A terminal state is final on the
|
|
33
|
-
board, so each task has one record, and the first record written for a task is final with
|
|
33
|
+
board, so each task has one record, and the first record written for a task is final with two exceptions: the guarded merge
|
|
34
34
|
writes its receipt after the approval, so a later pass appends the same task once more when it brings merge figures the
|
|
35
|
-
held record lacked
|
|
35
|
+
held record lacked, and a held v2 row written before `ownerModels` existed (#1402) is appended again when a later pass or
|
|
36
|
+
`ahub research backfill` can prove an owner model from the surviving events (readers keep the latest row of a task). A v2 row also replaces a held v1 row of the same task. A failing write is one `hub.log` line per hub run and
|
|
36
37
|
never changes the task flow.
|
|
37
38
|
|
|
38
39
|
`ahub research backfill` builds the same records from a project's existing `events.jsonl` (marked
|
|
@@ -69,6 +70,7 @@ Schema v2 is additive: a v1 file still loads (a v1 row reads as `outcome: "appro
|
|
|
69
70
|
| `usage` | provider usage per peer: `input`, `output`, `cacheRead`, `total` (null when never reported) |
|
|
70
71
|
| `usageByModel` | provider-reported total tokens per served (else requested) model |
|
|
71
72
|
| `models` | model routes and served models of the attributed requests; a judge model-choice observation (a `route` event with `decisionTarget: "judge"`, #1389) is skipped before any accumulation, so it adds no route, peer or attribution |
|
|
73
|
+
| `ownerModels` | #1402 (every surface reports its model from T2 to T4; the share of tasks with a `served` or `session` one is printed by `ahub research`, and `ahub status` shows the last observed model): `[{ model, evidence }]`, the models of the turns attributed to the task's owners: the owner's own `turn_end` `model`, then the `servedModel` (`served`) or `requestedModel` (`configured`) of its `usage` events, with the strongest grade seen per model (`served`, `session`, `configured`). A reviewer's model is never in it. `[]` when nothing was observed, and a record written before #1402 has no field: both read as `unknown` |
|
|
72
74
|
| `writer` | the release and `live` or `backfill` |
|
|
73
75
|
| `tooling` | #248: for each peer that worked on the task (owner, reviewer, a peer with attributed turns or tokens), the add-ons from the `tooling` event of the attachment it last worked in (an attachment runs from a `state` event that brings the peer online to the next `offline`; detection may settle after the work started): `{ name, version }` from the closed list `claude-mem`, `ponytail`, `ripwire`, `open-code-review`, `codex-plugin`, `dot-admit`; version null when unknown. A peer missing here is unknown; records built from events written before #248 have no field |
|
|
74
76
|
| `briefs` | #258: task briefs handed over for the task (`delivered`) and how many carried a hub-memory fail note (`withFail`), from `memory_brief` events; absent when none was recorded |
|
|
@@ -150,12 +152,13 @@ names the agent (empty for the person).
|
|
|
150
152
|
- tokens and wall time per approved task, median and p90 (linear interpolation between ranks);
|
|
151
153
|
- by memory brief (#258): the same measures for tasks whose brief carried a hub-memory fail note, a brief without one,
|
|
152
154
|
and no brief recorded (shown once any record has a brief).
|
|
155
|
+
- by model (#1402): grouped on `ownerModels`, so a Codex task reviewed by Claude counts under the Codex model only, and a task whose owner used two models counts under each. A row is labelled with the weakest grade behind it when that is not `served` (`gpt-5.5 (session)`); tasks with no owner model are the `unknown` row, and the report prints one line saying how many and why they cannot be filled in (events written before #1402 carry no model, and a native surface that reports none stays unknown). `models` stays the union over every peer, for compatibility.
|
|
153
156
|
|
|
154
157
|
They are computed each time from the records; nothing derived is stored. `ahub research export [--format jsonl|csv]
|
|
155
158
|
[--since] [--all]` writes the records for outside analysis (`--dataset <dir>` writes the per-project dataset below); the CSV columns are, in order: project, task, class, pii,
|
|
156
159
|
outcome, createdAt, startedAt, approvedAt, wallMs, activeMs, owners, reviewer, reviewRounds, changesRequested, checkPassed,
|
|
157
160
|
checkFailed, dones, reassignments, firstPass, stuck, overlaps, conflicts, testsPass, testsFail, tokens, turns,
|
|
158
|
-
filesChanged, models, label, labelBy, writerVersion, writerSource. The CSV is a flat subset; JSONL carries every field.
|
|
161
|
+
filesChanged, models, label, labelBy, writerVersion, writerSource, ownerModels (`model:evidence`, space separated; added last, #1402). The CSV is a flat subset; JSONL carries every field.
|
|
159
162
|
Another project's measures: `ahub --project <dir> research`.
|
|
160
163
|
|
|
161
164
|
## Add-ons (#248)
|
package/docs/roles.md
CHANGED
|
@@ -4,6 +4,58 @@
|
|
|
4
4
|
- Reviewer completion (#784, this repository): the reviewer that approves a PR at its head merges it once exact-head CI is green, no review thread is unresolved and no change request is pending, then removes the branch and worktree, or names the open gate. A release PR waits for the person's release consent. This is this repository's convention (its `AGENTS.md`, outside the managed block), not a shipped default: the AGENTS block template, the catalog roles and the flow role contracts are unchanged, so another project keeps merge with the person unless its own AGENTS.md delegates it.
|
|
5
5
|
- Default catalog assignments are absent. Existing flow contracts are byte-identical to main d83cb8dd when no catalog role is selected.
|
|
6
6
|
|
|
7
|
+
# Who may hold a flow role (hub task 899, #1408 R1, R2)
|
|
8
|
+
|
|
9
|
+
- Eligibility is data on each adapter definition, next to `plannerEligible`: `conductorEligible` is true only for a kind with an interactive form that receives hub pushes and holds a writable tools connection (today claude, codex, jcode and pi), and `reviewerEligible` is true for every kind that can receive `hub_review` (all but agy). A kind not yet proven is listed false. `roleEligibility(peer, role, startMode)` in `src/adapters/role-eligibility.ts` answers yes or no with a reason and a fix, and the loader, `ahub doctor` and the docs all read it.
|
|
10
|
+
- The loader ignores a `conductor` entry on a peer whose kind is not `conductorEligible`, or whose effective start mode is headless (`peers.<peer>.start_mode`, `config.local.json` winning over the shared file), with a notice that names the reason and the fix. Nobody else gains the role: the project then has no conductor and the person conducts from `ahub console`. A conductor that is ignored never holds the role after a reload or a recovery either.
|
|
11
|
+
- Setting the conductor's `start_mode` to `headless` is refused: "<peer> holds the conductor role, which needs an interactive session; move the role first". Move the role in `roles` first, then change the mode.
|
|
12
|
+
- `ahub doctor` has a `roles` row: who holds conductor, planner and reviewer as the hub settled them, with a warning when a conductor is ignored, when no rostered planner is eligible, or when no reviewer can run and reviews fall to the person.
|
|
13
|
+
- `ahub init --conductor <peer>|none`, `--planner <a,b,...>` and `--reviewer <a,b,...>|person` (hub task 900, #1408 T2) choose the three roles at init, each on its own, judged by the same `roleEligibility` the loader and doctor use. Only the named role moves: each peer whose roles change is written to the shared `roles` as an explicit list (the one that loses a role too), implementer and verifier stay, and a refused choice names the reason, the fix and the eligible peers before any write. No flag changes nothing. See [operations](operations.md).
|
|
14
|
+
|
|
15
|
+
# Choosing who conducts, plans and reviews
|
|
16
|
+
|
|
17
|
+
Hub task 901 (#1408 R4). Three roles are chosen separately, at `ahub init` (`--conductor`, `--planner`, `--reviewer`, see [operations](operations.md)) or in the `roles` block of `.agenthub/config.json`. A project with no conductor is valid: you conduct from `ahub console`. `ahub doctor` shows who holds each role as the hub settled them. The shipped default is `claude` as planner and reviewer: it comes from the `roles` block of `templates/config.json`, which `ahub init` copies into `.agenthub/config.json` for a new project. Change it for a new project with `ahub init --planner <peer>` (and `--reviewer`), or for any project by editing `roles` in `.agenthub/config.json` (or `config.local.json`, which wins per peer), or pin the planner with `ahub settings set planner <peer>`, which outranks `roles`.
|
|
18
|
+
|
|
19
|
+
## Who may hold what
|
|
20
|
+
|
|
21
|
+
The table is generated from `roleEligibility` (`src/adapters/role-eligibility.ts`), the one function init, the loader and doctor read, and `test/roles-doc.test.ts` fails when it differs from the registry. A conductor is judged in each start form: it needs an interactive session that receives hub pushes and holds a writable tools connection, so a headless form never conducts.
|
|
22
|
+
|
|
23
|
+
<!-- eligibility-table:begin -->
|
|
24
|
+
| Kind | Start forms | Conductor | Planner | Reviewer |
|
|
25
|
+
| --- | --- | --- | --- | --- |
|
|
26
|
+
| claude | tui | tui | yes | yes |
|
|
27
|
+
| codex | tui, headless | tui | yes | yes |
|
|
28
|
+
| kimi | tui, headless | no | yes | yes |
|
|
29
|
+
| pi | tui, headless | tui | no | yes |
|
|
30
|
+
| local | headless | no | no | yes |
|
|
31
|
+
| qwen | headless | no | yes | yes |
|
|
32
|
+
| jcode | tui, headless | tui | yes | yes |
|
|
33
|
+
| agy | tui | no | no | no |
|
|
34
|
+
<!-- eligibility-table:end -->
|
|
35
|
+
|
|
36
|
+
- **Conductor**: claude, codex, jcode and pi, in their interactive (`tui`) form only. kimi's tui is pull-only (no pushes), qwen's tui has no case that drives it as a conductor yet, local is headless only and agy is pull-only; a kind stays `no` until a case proves it. claude has no headless form at all.
|
|
37
|
+
- **Planner**: a kind with `plannerEligible`. **pi stays implementer-only**: its tool bridge carries the planner tools (`hub_backlog_*`, `hub_plan_review`), so tool admission is not the gap; the gap is a receipt that a Pi model plans a backlog, which no fixture can give. `plannerEligible` is not flipped without a live receipt (T5).
|
|
38
|
+
- **Reviewer**: any kind that can receive `hub_review` (all but agy), or the person (`--reviewer person`). A reviewer from the review pool (`review.pool`, by default the native claude, codex and kimi reviewers) is also admitted by quota: it is skipped while its known usage is at or above `review.gate` (default 0.8) or its quota is unknown (`review.unknown_quota`, default `skip`), and the task takes the existing fallback ([reviewer quota admission](operations.md#reviewer-quota-admission-and-review-caps-1446)).
|
|
39
|
+
|
|
40
|
+
## Evidence grades
|
|
41
|
+
|
|
42
|
+
- **fixture-proven**: the hub's side of the contract is exercised on the existing fakes (a real daemon, the fake native transports, no model and no account). It proves roles, refusals and delivery, never a model's behavior.
|
|
43
|
+
- **live-proven**: a person ran it on real local models and recorded it under `docs/verification/`. None of the combinations below is live-proven yet.
|
|
44
|
+
|
|
45
|
+
`test/conformance/conductor.test.ts` is the conformance for the conductor column. For each kind the table lists it starts a real daemon whose project config names the kind the conductor, connects as that kind and checks, in the interactive form, that the conductor feed (the hub's supervision envelopes) reaches it and that `hub_status`, `hub_task_assign` and the hold tools (`hub_peer_hold`, `hub_peer_release`) are accepted. In the headless form the loader ignores the role (with the fix), every one of those calls is refused and no feed is sent. A kind the table marks `no` is checked to be refused the same way.
|
|
46
|
+
|
|
47
|
+
## Combinations without a commercial service
|
|
48
|
+
|
|
49
|
+
Every role is filled by open-source tooling on local or self-hosted models; none needs a commercial agent. Each row below is settled through the real loader and the doctor row by `test/roles-doc.test.ts`, so the roles are the roles the hub keeps.
|
|
50
|
+
|
|
51
|
+
| Combination | Conductor | Planner | Reviewer | Implementer and verifier | Evidence |
|
|
52
|
+
| --- | --- | --- | --- | --- | --- |
|
|
53
|
+
| open, agent-led | jcode (tui, on an OpenAI-compatible self-hosted gateway) | jcode | qwen, local | pi, local | fixture-proven: roles, conductor conformance and doctor row. The live leg on local models is manual and needs the person's approval (T5). |
|
|
54
|
+
| open, qwen-led | none: qwen has no conductor case yet, so the loader ignores it | qwen | jcode, local | pi, local | fixture-proven for planner and reviewer; **no agent conducts**, so you conduct from `ahub console` until a qwen conductor case exists. |
|
|
55
|
+
| person-led | none (you, `ahub console`) | none (you, `ahub backlog` and `ahub task`) | the person | pi, local | fixture-proven: the hub settles no conductor, planner or reviewer, and the doctor row warns that reviews go to the person and that no planner is rostered, which is this combination's intent. |
|
|
56
|
+
|
|
57
|
+
To write the first row with init: `ahub init --conductor jcode --planner jcode --reviewer qwen,local`, after turning the peers on in the roster (`ahub roster add <peer>`).
|
|
58
|
+
|
|
7
59
|
# Definitions and layers
|
|
8
60
|
|
|
9
61
|
- Shipped definitions live at `templates/roles/<group>/<id>.md`: six dev and five research roles, plus four writing and two ops roles that the domain packs use ([profiles](profiles.md)).
|
package/docs/sdlc.md
CHANGED
|
@@ -76,6 +76,80 @@ S0/S8 establish vocabulary and checklist compatibility only. Later slices must r
|
|
|
76
76
|
|
|
77
77
|
The repository uses feature branches and PRs. Release PRs require merge commits because documentation stamps name release-branch ancestors. Do not describe squash as a universal release practice. Worktree/branch cleanup follows confirmed merge; installation and native readback are separate live receipts. A successful source gate cannot certify those receipts.
|
|
78
78
|
|
|
79
|
+
## Moving from GSD
|
|
80
|
+
|
|
81
|
+
This is a migration from the GSD planning tool and its `.planning/` artifacts.
|
|
82
|
+
The retired `gsd-lite` setting below is a different compatibility path. The hub
|
|
83
|
+
uses the issue as the spec and the board as the current work record.
|
|
84
|
+
|
|
85
|
+
| GSD artifact | Hub destination |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| Milestone | Release line and release train |
|
|
88
|
+
| Phase and plan | Board task with a file/symbol plan and dependencies |
|
|
89
|
+
| Requirements and acceptance | Spec issue acceptance criteria and a head-bound `criteria` receipt |
|
|
90
|
+
| `.planning/STATE.md` | Task board and `ahub sdlc status` |
|
|
91
|
+
| CONTEXT decisions, `D-xx` and `GATE-xx` | The spec issue's Decisions section, retaining the IDs; `hub_remember` for a public operational decision |
|
|
92
|
+
|
|
93
|
+
Archive `.planning/`; do not delete it. First find scripts and tests that read
|
|
94
|
+
its plans, receipts, decisions or gates, then preserve those paths or update
|
|
95
|
+
readers in a reviewed change before relocating anything. Keep the original
|
|
96
|
+
artifacts and their references in version control. Archiving marks them historical;
|
|
97
|
+
it does not make their evidence disposable. Move current scope and acceptance
|
|
98
|
+
criteria into spec issues and board tasks without inventing completed gates.
|
|
99
|
+
|
|
100
|
+
Review the project's AGENTS.md and README in the same migration: replace GSD
|
|
101
|
+
execution instructions and milestone-based version rules with the project's
|
|
102
|
+
current task, review and release rules. Preserve historical decision references.
|
|
103
|
+
The init notice only points here; it never imports or edits `.planning/`.
|
|
104
|
+
|
|
105
|
+
Set the release policy in committed `.agenthub/config.json` before requesting
|
|
106
|
+
release authorization. For a project with `package.json` and no
|
|
107
|
+
`docs/verified.json`, the relevant fragment is:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"release": {
|
|
112
|
+
"version": "package.json",
|
|
113
|
+
"docs": "none"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`release.version` may instead be `release-notes` with `release.notesPath`
|
|
119
|
+
(default `docs/releases/v{version}.md`), or `none` for an exact-commit version
|
|
120
|
+
binding. Use `release.docs: "checker"` when retaining `docs/verified.json`.
|
|
121
|
+
`none` is refused while that manifest exists; local config does not override
|
|
122
|
+
committed release policy. This exemption skips documentation checking only,
|
|
123
|
+
without supplying release consent, a tag or publication.
|
|
124
|
+
|
|
125
|
+
Initialization and person-only setup steps below run from a separate person-owned terminal.
|
|
126
|
+
An agent or delegated live test cannot impersonate that person. Command forms
|
|
127
|
+
are the ones printed by `ahub help`; placeholders name values to choose.
|
|
128
|
+
|
|
129
|
+
1. Enable `advise` first with `ahub init --sdlc advise`, then review its shared
|
|
130
|
+
changes. To edit existing lifecycle settings, use the help form
|
|
131
|
+
`ahub settings edit <config.local.json|sdlc.toml> (set <path> <json> | remove <path>)... [--reason <text>] [--preview] [--yes] | backups [--json]`.
|
|
132
|
+
For example, `ahub settings edit sdlc.toml set mode '"advise"'`.
|
|
133
|
+
For an already initialized project with a running hub, the person may instead
|
|
134
|
+
directly instruct its uniquely configured conductor, in that conductor's own
|
|
135
|
+
session, to run `ahub sdlc configure --mode advise --required-checks 'unit,lint'`.
|
|
136
|
+
This optional subsequent step stages only off/advise and check names for the
|
|
137
|
+
next start; it cannot initialize the project or enable enforce. The
|
|
138
|
+
[instruction and audit rules](#instructed-conductor-configuration-1432) apply.
|
|
139
|
+
2. Record the long-term goal with
|
|
140
|
+
`ahub goal new <title> [--milestone <text>]... [--depends <id>]... [--shared]`.
|
|
141
|
+
3. Create its release line with `ahub release new <name> <goal> <order>`.
|
|
142
|
+
The goal argument describes what this release aims to deliver. Creating a
|
|
143
|
+
release line records planning intent only; it does not ship anything.
|
|
144
|
+
4. Have the planner file the spec issues and board tasks, retaining the old
|
|
145
|
+
decision IDs and acceptance evidence. Inspect `ahub sdlc status`; the person
|
|
146
|
+
accepts each spec with `ahub sdlc accept <task> --issue <n>`.
|
|
147
|
+
5. After required CI checks and the new task flow have been checked, the person
|
|
148
|
+
may select `ahub init --sdlc enforce --required-checks <a,b,...>`.
|
|
149
|
+
Release authorization remains a separate decision with
|
|
150
|
+
`ahub sdlc authorize-release <version>` after committing the release policy
|
|
151
|
+
and preparing the release candidate.
|
|
152
|
+
|
|
79
153
|
## Configuration and persistence contract
|
|
80
154
|
|
|
81
155
|
.agenthub/sdlc.toml contains mode off|advise|enforce and a bounded ordered stage list, using the built-in stages above by default. The loader validates built-in mappings and bounded custom stage/gate/actor definitions; custom guidance does not grant authority. Unknown stages/gates, duplicate stages, cycles, unbounded lists and unknown keys are refused with a field-level reason. A project file may define guidance/gates, but it does not expand capabilities or permissions.
|
|
@@ -417,12 +491,25 @@ Train history retains at most 256 events. Configuration no-ops retain the revisi
|
|
|
417
491
|
|
|
418
492
|
Verdict history retains each report and its reviewed head. Within a task, the semantic id remains the finding identity when its pass is reclassified; a disposition for that id settles the same finding across passes. Open Important findings carry forward across heads until a reviewer explicitly sets fixed or false_positive, or the person sets accepted with a rationale. Omitting an id never settles it; nits stay on their original head. Review requests list carried public ids, pass, severity and optional path; private finding details stay withheld. Head selection uses the first valid full SHA from the PR head, reviewed head, local head, then commit metadata; unresolved non-empty reports refuse in enforce. A supplied head must match the resolved task head when one exists, and that resolution is rechecked after asynchronous screening. Status and the merge queue show counts for the current head. In enforce, approval refuses while any Important finding remains open; advise exposes the count without blocking. Existing verdicts without structured findings stay compatible.
|
|
419
493
|
|
|
420
|
-
|
|
494
|
+
With the lifecycle on (`advise` or `enforce`; #1403 A1, B4), an item may also carry these fields, and `off` refuses them as unknown fields and advertises none of them:
|
|
495
|
+
|
|
496
|
+
- `state` (`confirmed` or `needs_validation`) and `boundary` (`principal`, `control`, `resource`, `result`: the lower-trust actor, the control that was meant to hold, the resource affected and the result observed, each at most 512 bytes and sanitized like `rationale`). An open `important` finding with `pass: "security"` must carry both, and the refusal names the four boundary fields; nits, other passes and settled findings need neither, and the fields are refused on them.
|
|
497
|
+
- `blocker` (the missing fact), required with `needs_validation` and refused with `confirmed`. A `needs_validation` finding is a source-grounded hypothesis: it does not block approval in any mode and is counted apart (`needsValidation` in the findings tally), and on approval the hub files one read-only `triage` backlog card that names the blocker.
|
|
498
|
+
- `origin` (`introduced` or `pre_existing`; omitted means `introduced`, so existing reports behave exactly as before). A `pre_existing` important finding does not block approval and does not carry to a later head (it is counted as `preExisting`); on approval the hub files one `plan` backlog card for it. A later `open` report of an id that still blocks cannot lower it with `pre_existing` or `needs_validation`: only an explicit disposition settles it.
|
|
499
|
+
|
|
500
|
+
Each follow-up card carries a `Finding follow-up key:` marker (task, pass, id, kind) so an approval repeated by another verdict never files a second one. A card names the task, the finding id and pass and, for a hypothesis, its blocker; never the boundary text or the path, which stay in the task's review history under the privacy boundary below. The hub opens no GitHub issue for a security finding. PII and private-turn tasks, withheld reports and findings whose text the privacy gate refuses get no card.
|
|
501
|
+
|
|
502
|
+
Finding text passes through the task privacy boundary. PII tasks remain stubs; withheld reports expose only counts on ordinary tasks. When the same public, non-withheld semantic pass/id pair appears on a second distinct task, Tasks proposes one durable, marker-deduplicated backlog plan (excluding false positives) to amend AGENTS.md or an area note. A positional id (a single letter or a label word such as `nit` followed by digits, optionally after a pass prefix: `N1`, `F5`, `nit-1`, `bugs:3`) is local to one review and never counts toward that card; only a semantic id recurs. Only hub-proposed plan cards supply dedupe markers. The proposal grants no editing or acceptance authority.
|
|
421
503
|
|
|
422
504
|
## Plan conformance (#481 S2)
|
|
423
505
|
|
|
424
506
|
Plans accept optional `proof` (test paths or check names) and `risks`, each at most 32 strings of 512 characters. They share the task-text privacy screen; enabled SDLC schemas advertise them while ordinary off-mode schemas stay unchanged. File coverage compares repository-relative identities for literal file or directory prefixes in `plan.paths`, with no glob expansion. Repository-root entries (including normalized `.` or `./`) never cover the inventory and leave conformance unknown. Absolute entries map only through verified same-repository aliases; an unverified mapping remains unknown. Symbols, proof and risks do not cover files. A planned path left untouched is advice; a changed path outside the plan is a departure. Missing plans, unsafe or unmappable paths, truncated inventories, renamed/copied files without both path identities, and failed metadata reads remain unknown.
|
|
425
507
|
|
|
508
|
+
|
|
509
|
+
With the lifecycle enabled, a plan also accepts `base` (the full lowercase 40-character commit it was written against), `out_of_scope` (excluded literal paths), `stop_if` (conditions to stop and report), and ordered `steps` with a required `description` and optional `verify` text containing the command and expected result. Each list holds at most 32 items; each exclusion, condition, description and verification text is at most 512 characters. These fields share the task privacy screen and stored plan revision. Verification text is never executed by the hub. A changed file under `out_of_scope` is a departure even when a broader `paths` prefix includes it; review/status and merge queue use the same exclusions.
|
|
510
|
+
|
|
511
|
+
`hub_task_accept` and `hub_task_done` report `drift: none`, `drift: changed (<paths>)` or `drift: unknown` when the plan has a base. At accept, this compares only `plan.paths` from the exact base to the local remote-tracking default-branch tip, resolved through `refs/remotes/origin/HEAD`; no task head is required. At done, the endpoint is the unique merge-base of the recorded task head (`refs.commit`, otherwise its recorded lifecycle head) and that default tip, so task-owned commits are excluded. The base must be an ancestor of the selected upstream endpoint; reversed or unrelated lineage stays unknown. The bounded local Git source validates commit objects, rechecks the default tip and lists changed names without fetch, network, lazy object fetch or patch reads. Missing default refs, missing done heads, shallow/missing/ambiguous history, foreign scope, incomplete or unsafe inventory, and failed reads stay unknown. The checkout HEAD and a guessed `main` branch are never substituted. The tip is the local tracking ref, not a claim of freshness from a remote server. Private tasks/turns disclose no drift. Drift is advice in both advise and enforce and never blocks acceptance, completion or approval. Drift includes changes under an excluded path when it lies inside `plan.paths`: the exclusion makes the change a conformance departure rather than hiding it from base drift. Drift is separate from PR conformance and its existing approval gate. Off-mode tools advertise none of these new fields, ignore them on input, and add no drift read or readback.
|
|
512
|
+
|
|
426
513
|
Review/status use the same bounded PR file metadata reader as the merge queue; no patch or body is fetched. In enforce, approval requires known coverage of every changed path or a current person acceptance of the departure. Request changes, amend the plan through `hub_task_accept`, and call done again before approval. Off adds no conformance gate; advise reports departures without blocking.
|
|
427
514
|
|
|
428
515
|
The person may instead run `ahub sdlc accept-departure <task> <head> <reason...>`. Acceptance requires a currently known departure, never unknown or already covered conformance. The hub reads and captures the complete current repo/PR/head inventory, verified task repository scope and the plan fingerprint/revision; changing the plan, repository refs/scope, link, head or inventory invalidates that acceptance. Departure consent also expires on hub restart: amend the plan or accept again in the new host lifetime. This fail-closed ceiling prevents a rejected, unpersisted readback from reviving old consent; a durable host observation journal is the upgrade path. The reason is bounded to 2048 characters, sanitized and privacy-screened. There is no peer tool or live-test delegation for this person-only operation. Private PR inventories are unavailable to this remote readback; amend the private plan instead. Public private-task projections show only whether a departure acceptance exists.
|
|
@@ -468,6 +555,71 @@ The guarded merge reads the eval check run before its final PR read and judges t
|
|
|
468
555
|
|
|
469
556
|
A private (PII) task reads no eval metadata and records none.
|
|
470
557
|
|
|
558
|
+
## Security pass for sensitive paths (hub task 895, #1403 A2)
|
|
559
|
+
|
|
560
|
+
`.agenthub/sdlc.toml` may name the paths whose change needs a recorded security pass:
|
|
561
|
+
|
|
562
|
+
```toml
|
|
563
|
+
[security]
|
|
564
|
+
paths = ["src/local/**", ".github/workflows/**", "scripts/release-*"]
|
|
565
|
+
companions = ["agents", "local-ipc"]
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
- `paths` uses the `config_paths` pattern language (literal names, `*` and `?` inside a segment, a whole-segment `**`; a trailing slash or a bare prefix is refused at load with the language spelled out). `companions` is optional, a unique list from `agents`, `supply-chain`, `local-ipc` and `data-isolation`; it names which parts of `docs/agent-notes/security-review.md` the reviewer reads. No `[security]` table, or `mode = "off"`, changes nothing and `hub_review` does not advertise `security_pass`.
|
|
569
|
+
- The decision uses the PR's complete file inventory, the one plan conformance reads (metadata, never patches). `securityPass` reads `required` (a changed path matches and no pass names the PR's current head), `recorded`, `not_required` (the complete inventory matches nothing) or `unknown`. An incomplete or unreadable inventory is `unknown`, never `not_required`. The readback carries a count of matching paths and the companions, never the path names.
|
|
570
|
+
- A reviewer records the pass on the verdict: `hub_review` `security_pass: {covered: [...], not_covered: [...]}` or `ahub review <id> approved --security-pass '{"covered":["local runner"],"not_covered":[]}'`. It names at least one unit (up to 32, 120 bytes each, no unit in both lists), so a partial pass says what it did not read, and it binds to the head the verdict reviewed: a later head needs a new pass. A pass on a PR that needs none is stored and harmless.
|
|
571
|
+
- `advise` records an approval without a pass and adds the requirement to the advice. `enforce` refuses the approval (before any board effect) and blocks the merge queue row and the merge gate, for `required` and for `unknown`. The review request tells the reviewer a pass is required, or that applicability is unknown, and points to the checklist. PII tasks carry no pass.
|
|
572
|
+
- `ahub sdlc status` and the merge queue show a `security pass` line; the queue shows the strictest state when a PR has several holders.
|
|
573
|
+
|
|
574
|
+
## Security audit with a coverage ledger (hub task 896, #1403 A4, A5)
|
|
575
|
+
|
|
576
|
+
A recurring, read-only read of the security-sensitive surfaces, on request. It needs the lifecycle on (`advise` or `enforce`) and the `[security]` table above.
|
|
577
|
+
|
|
578
|
+
- `ahub sdlc audit start [--profile quick|standard] [--since <ref>]` (the person, or the one configured conductor) files one `review`-class task and seeds the ledger in `hub.db`: one unit per `[security] paths` surface and companion, `planned`. `standard` reads each surface against each configured companion; `quick` reads each surface once against the general checklist. `--since <ref>` keeps only the surfaces with a changed path since that ref. One audit is open at a time. A refusal (wrong caller, lifecycle off, no table, an unreadable head or change list) writes nothing.
|
|
579
|
+
- Only the hub writes the ledger. The assigned auditor (the task's owner, while it is in progress) reports through `hub_audit_report`, advertised only with the lifecycle on: `units` (`covered`, `deferred` with a reason of at most 200 bytes, or `out_of_scope`, never `planned`) and `findings` in the `hub_review` shape with `pass: security` and the boundary contract of the findings section. A report is one transaction, and a unit or finding that fails validation changes nothing.
|
|
580
|
+
- A `confirmed` important security finding is a `candidate` until a different reviewer-role peer (or the person) sends `verify: [{finding, verdict: verified|rejected}]`. The finder cannot verify its own finding, and a decided finding is not rewritten by a later report: the result lists such a re-filed finding in `notUpdated`, so the auditor sees it. A report is one transaction, so a verification that loses a race rolls back the units, findings and other verifications of that call. A verified open important finding is settled with `settle: [{finding, disposition: fixed|false_positive}]` by a reviewer-role peer other than the finder, or by the person, in a call of its own (never in the call that verifies it, so the verifier's decision is read first). Only a verified, not rejected, not yet settled finding is settled, once; a candidate is refused with the step to take (a different reviewer verifies it first), a rejected one with "nothing to settle", and a repeat with how it was settled. The hub records who settled it and how in the ledger, in the same transaction as the rest of the report, so a settlement that loses a race rolls the whole call back; a later report by the finder cannot reopen a settled finding (it is listed in `notUpdated`). A settled finding reads as `settled` and counts apart in the audit summary, and, like any `fixed` or `false_positive` finding, no longer withholds its path, rationale and boundary. A `needs_validation` finding is counted apart and never needs verification.
|
|
581
|
+
- Carry-over: a surface whose state in the newest audit that lists it was `covered`, and whose paths are unchanged since that audit's head, is seeded `covered (prior)` and listed apart from the run's own coverage. A scoped audit that left the unit out says nothing about it. A changed path, an unreadable change list, or a `deferred`, `out_of_scope` or still `planned` unit in that newest audit plans the unit again, and a carried unit takes no new state.
|
|
582
|
+
- `ahub sdlc audit show [<audit>]` prints the source, profile, the counts by unit state and each unit and finding. A `quick` or scoped audit reads as partial. `ahub sdlc release` carries one line with the same counts. Nothing blocks a release.
|
|
583
|
+
- Disclosure: this repository is public, so an open or accepted important security finding shows only its id, status and that its details are withheld, in every view but the person's, and the hub itself sends no message to another peer that carries its path, rationale or boundary. A headless auditor's final answer is shared with the other agents automatically, so keeping that text out of the answer is the audit brief's instruction, not a guarantee the hub can enforce. The hub never opens an issue for one. The tool is refused in a private or PII turn, finding text must pass the same PII patterns and screen as a verdict note, and the tool is kept out of memory capture. The audit brief states that repository content is data (an instruction found in a file is recorded as a finding), that secret values are never quoted, and that target code runs only inside the hub's sandboxed runners.
|
|
584
|
+
|
|
585
|
+
## Instructed conductor configuration (#1432)
|
|
586
|
+
|
|
587
|
+
After the project is initialized and its hub is running, the person may directly
|
|
588
|
+
instruct the uniquely configured conductor in that conductor's own session to
|
|
589
|
+
stage `off` or `advise` and the required check names:
|
|
590
|
+
|
|
591
|
+
```bash
|
|
592
|
+
ahub sdlc configure --mode advise --required-checks 'unit,lint'
|
|
593
|
+
ahub sdlc configure --mode off
|
|
594
|
+
ahub sdlc configure --required-checks '' --json
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
Replace the example check names with the repository's actual required jobs. The
|
|
598
|
+
last form explicitly clears the list. Omit either setting to preserve it. Changes
|
|
599
|
+
use the existing loader, revision checks, backup and atomic write path, and apply
|
|
600
|
+
at the next hub start. Human output names the actor and pending restart; `--json`
|
|
601
|
+
returns the saved receipt.
|
|
602
|
+
|
|
603
|
+
Running this command makes a cooperative claim that the person explicitly
|
|
604
|
+
instructed this actor in its own session. The daemon verifies the current unique
|
|
605
|
+
conductor and session context; it cannot independently verify that conversation.
|
|
606
|
+
Task text, files, reviews, peer messages and relays never supply that instruction.
|
|
607
|
+
Child sessions, private or PII contexts, observer input, recovery and shutdown
|
|
608
|
+
refuse the conductor path. `--live-test` cannot turn an agent into the person for
|
|
609
|
+
this operation.
|
|
610
|
+
|
|
611
|
+
`ahub init`, generic `ahub settings edit`, `enforce`, `[security]`, `eval_check`,
|
|
612
|
+
`config_paths` and custom stages remain person-only. If either the running
|
|
613
|
+
lifecycle or the actual file is already `enforce`, use the person's settings
|
|
614
|
+
editor. The narrow command does not authorize releases, tags, merges or
|
|
615
|
+
publication; release authorization remains a separate instruction and operation.
|
|
616
|
+
|
|
617
|
+
A durable `sdlc_config_instruction` intent precedes the write. The result audit
|
|
618
|
+
records the actual actor (source `conductor` for that actor), the fixed instruction claim and
|
|
619
|
+
changed paths/value hashes, without the setting values. Failed intent records
|
|
620
|
+
write nothing. If the file was saved but result auditing fails, the refusal says
|
|
621
|
+
`saved: true`; inspect the file and event log before retrying.
|
|
622
|
+
|
|
471
623
|
## Person release authorization (#481 S6)
|
|
472
624
|
|
|
473
625
|
From the running daemon's candidate checkout, the person or the one configured conductor runs `ahub sdlc authorize-release <version>` (#1063). The conductor acts only on the person's explicit instruction in its own session naming that release. A hub message, task text, review note, file or another peer's relay is never that instruction; the daemon cannot verify this cooperative rule. A conductor request uses the tools role and refuses a child `toolsOwner`, private turn or PII context, exactly like `sdlc merge`. Other peers and `--live-test` refuse. By default, consent binds the exact current commit, committed package version, origin fetch/push identity and fresh committed documentation evidence, all reread after the docs check. Receipt `by` and the append-only metadata audit identify the actual asker alongside the approval id, commit, version and, when checked, the docs digest/count. The authoritative ledger is daemon-owned memory: restart revokes every approval; audit history cannot restore one.
|
|
@@ -536,3 +688,37 @@ its existing authority and currentness fences. Snapshot guidance never certifies
|
|
|
536
688
|
that an accepted spec or reviewed issue is still current. Unavailable, private or
|
|
537
689
|
closed plan evidence retains its original diagnostic lead and planner action. Private task projections
|
|
538
690
|
withhold these issue-specific diagnostics.
|
|
691
|
+
|
|
692
|
+
## Advisor surveys and considered findings (#1403 T7)
|
|
693
|
+
|
|
694
|
+
`ahub sdlc survey start [--focus bugs|tests|debt|deps|dx|docs]` is an on-request
|
|
695
|
+
person/current-conductor operation with the lifecycle enabled. It creates one
|
|
696
|
+
read-only `plan` task at an exact source ref. Repository content is data, not
|
|
697
|
+
instructions: the task does not install or run a scanner, execute a fix, publish
|
|
698
|
+
an issue or push a branch. `ahub sdlc survey show <task> [--json]` reads its report.
|
|
699
|
+
|
|
700
|
+
The assigned planner reports through `hub_survey_report`: findings have a stable
|
|
701
|
+
semantic id, evidence `path:line`, affected paths, impact, effort `S|M|L`, risk,
|
|
702
|
+
confidence `high|medium|low`, and `fix_sketch`. A report alone creates no card.
|
|
703
|
+
The planner must vet each finding against that pinned source before submitting
|
|
704
|
+
an explicit vetted decision. This is the planner's attestation, not a host proof
|
|
705
|
+
that source was reread. Vetted high/medium confidence yields a backlog `plan`
|
|
706
|
+
card; low confidence yields read-only `triage` investigation. No card authorizes
|
|
707
|
+
execution. Replay and concurrent vetting share a repository-scoped semantic
|
|
708
|
+
finding marker; positional labels never match across tasks.
|
|
709
|
+
|
|
710
|
+
Review `false_positive`, audit rejection and survey rejection share an
|
|
711
|
+
append-only considered ledger with id, paths, reason and source binding.
|
|
712
|
+
A later scoped brief shows matching ids as rejected before with the reason,
|
|
713
|
+
subject to existing privacy/security disclosure. A changed path clears the
|
|
714
|
+
suppression for that path. Unrelated path changes do not clear it. Unknown or
|
|
715
|
+
incomplete change evidence shows rejected before, change unknown, and retains
|
|
716
|
+
suppression. The planner may reconsider only with an explicit vetted reason;
|
|
717
|
+
that creates a reconsideration entry and may create the card while preserving
|
|
718
|
+
the historical rejection. No rejection is deleted or silently rebound. Open host-created cards alone dedupe a matching marker. Approved or cancelled cards remain history: when the rejection no longer suppresses the finding, a new vetted card names the prior closed card as "hub task N" and the reason it reopened. Closing a card never clears an unchanged rejection.
|
|
719
|
+
|
|
720
|
+
Private turns, child contexts, recovery and ended role authority refuse writes.
|
|
721
|
+
Security finding text and paths remain in authorized private reports, not
|
|
722
|
+
public backlog cards, briefs or memory. Lifecycle off advertises no survey tool
|
|
723
|
+
or additional task readback. Live audit/survey dogfood (#1403 T8) still requires
|
|
724
|
+
the person's separate instruction; this feature adds no schedule or live run.
|