docs: the handbook follows the three layers: swarm, hives, agents
The handbook's sections were agent-lifecycle, integrations, swarm, tools, trust-boundary and web-ui, which do not follow how the system is built, so a reader could not tell which layer a page is about. Its pages now sit in swarm/, hives/ and agents/, with the accounts an agent can hold outside the system in external-accounts/. - swarm/: forge, matrix and the knowledge repo join the swarm pages, and so does the swarmctl reference. - hives/: the dashboard, hivectl and its reference, and the operator/agent boundary, with a README that takes over the old web-ui and tools pages. - agents/: the roster, persistence, config changes, the agent's own web page (was web-ui/agent) and the security model, with a README. - external-accounts/: GitHub and GitLab. Pages are moved whole; none is split yet. Every reference follows: relative links in the docs, `docs/2-handbook/...` paths in code comments, the nix checks that regenerate the CLI references and the ignore list, and docs/README.md, whose handbook section is now by layer.
This commit is contained in:
parent
263b21021a
commit
0e84fe8bc4
2 changed files with 393 additions and 363 deletions
|
|
@ -433,7 +433,7 @@ into the `Swap` node, then runs `nixos-container update` + stop +
|
|||
start across the `StopForUpdate → Swap → RebuildBookkeeping`
|
||||
brace and the tail `Reconcile` node. `flake.nix` itself lives in the agent's
|
||||
`agent-configs/<name>` repo and rides along with its pinned commit (see
|
||||
`docs/2-handbook/agent-lifecycle/config-changes.md::Deploy markers per agent`).
|
||||
`docs/2-handbook/agents/config-changes.md::Deploy markers per agent`).
|
||||
|
||||
Anything that changes per-container state on the host should be
|
||||
re-applied here so a manual `↻ R3BU1LD` from the dashboard is
|
||||
|
|
@ -497,20 +497,20 @@ mara — don't add `#[allow]` speculatively. The gate is intentional.
|
|||
fmt / `cargo test` cover most gates, but `nix flake check` runs extra
|
||||
check derivations they don't:
|
||||
|
||||
- **`hivectl-docs`** regenerates `docs/2-handbook/tools/hivectl-cli.md` from
|
||||
- **`hivectl-docs`** regenerates `docs/2-handbook/hives/hivectl-cli.md` from
|
||||
hivectl's clap tree and **fails if the committed copy is stale**.
|
||||
**After any change to a hivectl verb or flag, regenerate it**:
|
||||
```sh
|
||||
nix develop -c cargo run --bin hivectl -- markdown-docs > docs/2-handbook/tools/hivectl-cli.md
|
||||
nix develop -c cargo run --bin hivectl -- markdown-docs > docs/2-handbook/hives/hivectl-cli.md
|
||||
```
|
||||
clippy / fmt / `cargo test` all pass *without* this — only the
|
||||
flake check catches the drift, and `ci-log` often can't show you
|
||||
why (it 500s on a fast failure), so you're left guessing "builder
|
||||
flake" when it's a stale doc.
|
||||
- **`swarmctl-docs`** is the same check for `swarmctl` /
|
||||
`docs/2-handbook/tools/swarmctl-cli.md`:
|
||||
`docs/2-handbook/swarm/swarmctl-cli.md`:
|
||||
```sh
|
||||
nix develop -c cargo run --bin swarmctl -- markdown-docs > docs/2-handbook/tools/swarmctl-cli.md
|
||||
nix develop -c cargo run --bin swarmctl -- markdown-docs > docs/2-handbook/swarm/swarmctl-cli.md
|
||||
```
|
||||
- there's also a flake `cargo-test` check and NixOS module
|
||||
evaluation in the set.
|
||||
|
|
@ -554,7 +554,7 @@ provisioning time:
|
|||
|
||||
(The matrix profile avatar is **not** a oneshot — `hive-matrix-daemon`
|
||||
sets it over its live authenticated Client; see
|
||||
`docs/2-handbook/agent-lifecycle/persistence.md::matrix avatar`.)
|
||||
`docs/2-handbook/agents/persistence.md::matrix avatar`.)
|
||||
|
||||
Shape contract — every one of these:
|
||||
|
||||
|
|
@ -575,7 +575,7 @@ Shape contract — every one of these:
|
|||
5. **Re-runnable**: a second invocation produces the same final
|
||||
state (idempotent uploads, idempotent config rewrites). Used
|
||||
by the `.path` watchers that re-fire on token appearance (see
|
||||
`docs/2-handbook/agent-lifecycle/persistence.md::Matrix per-agent daemon`).
|
||||
`docs/2-handbook/agents/persistence.md::Matrix per-agent daemon`).
|
||||
|
||||
The service stays root-owned so the bootstrap ordering doesn't need a
|
||||
user-existence check before each fire.
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ durable knowledge here (`notes.md`, anything else) — the harness's own
|
|||
internal files (`hyperhive-events.sqlite`, `hyperhive-turn-stats.sqlite`,
|
||||
`hyperhive-model`) live in the separate `harness` dir instead, so they
|
||||
don't clutter what claude sees as "my notes dir" (see
|
||||
[`docs/2-handbook/agent-lifecycle/persistence.md`](../../2-handbook/agent-lifecycle/persistence.md)). Survives `destroy`/recreate
|
||||
[`docs/2-handbook/agents/persistence.md`](../../2-handbook/agents/persistence.md)). Survives `destroy`/recreate
|
||||
alongside the claude dir.
|
||||
|
||||
### Persistent work dir per agent
|
||||
|
|
@ -336,7 +336,7 @@ nix develop -c cargo run -p hive-c0re --bin hivectl -- <args>
|
|||
```
|
||||
|
||||
This is also how you regenerate committed generated docs locally —
|
||||
for example `docs/2-handbook/tools/hivectl-cli.md` via the `hivectl markdown-docs`
|
||||
for example `docs/2-handbook/hives/hivectl-cli.md` via the `hivectl markdown-docs`
|
||||
subcommand (its `hivectl-docs` flake check otherwise only fails in
|
||||
CI on drift).
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ Never use raw `curl` for forge access.
|
|||
`nix/agent-modules/weston-vnc.nix` adds an optional Weston Wayland
|
||||
compositor with the `vnc-backend` plugin, surfaced as
|
||||
`services.hyperhive.agent.gui.enable = true` per-agent. The harness's
|
||||
`/screen/ws` WebSocket relay (`docs/2-handbook/web-ui/agent.md::Per-agent endpoints`)
|
||||
`/screen/ws` WebSocket relay (`docs/2-handbook/agents/web-page.md::Per-agent endpoints`)
|
||||
connects to the compositor at `127.0.0.1:<vnc_port>`.
|
||||
|
||||
- **Port allocation**: a **fixed** port (`services.hyperhive.agent.gui.vncPort`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue