field guidemain · attested greentoolchain pins ↗shippeddirectionproposed
06 Frames

One hive of work. Many ways to host it.

Separate the identity that owns a machine from the seat that performs an action. Then scale compute around hives, with the current lease rules kept visible.

shippedcurrent seam / intended shapeprovisioning draft
HOST LEASEOne primary per hiveLOCAL DISPATCHImplementedFLEET SCHEDULERNot shipped

01 / TWO IDENTITY LAYERS

Host role is not an agent seat.

A host role governs lease tenure and machine participation. A seat scopes the authority for one action.

HOST ROLECURRENT

Who may own execution?

executorLong-lived host that owns a hive leasecurrent
transientTask-shaped host; releases its lease on exitcurrent
viewerReads and files; never claims, submits, or mergescurrent

The lease is per hive and fenced through HQ. A viewer stays useful for reading and filing without becoming the write primary.

INFERENCE SEATWORKFLOW IDENTITY

What may this session do now?

plannerFrames an idea into a gated moleculePlanning
dispatcherStarts a molecule and routes ready beadsDevelopment
developerImplements one bead in its worktreeDevelopment
reviewerReviews submitted work and may request changesDevelopment · review
mergerLands cleared work into the integration lineDevelopment

A session may hold different seats over time, but each bh action is stamped as one seat. The RBAC matrix marks Control, Planning, and Integration operational; its least-privilege reconciliation and some naming changes remain work in progress.

02 / THE DISPATCHER LOOPS

A hive picker starts molecule loops.

Two loops run at different scopes. Neither is a cross-hive scheduler.

A

Per-hive picker

implemented

bh host dispatch run --hive H checks the host lease, reaps finished children, then starts kicked-off epics from bd ready order when capacity is available.

DEFAULT CAP3 epic loopsPOLL10 secondsSUPERVISORsystemd user unit
one child per molecule
B

Per-molecule loop

implemented

bh work loop <epic> checks gates, reclaims stale work, renews the host lease while active, heartbeats claims, harvests seats, claims the next bead safely, and spawns the role binary.

SEAT CAPConfigured per epicRECOVERYRe-derive from beadsPROCESS SAFETYOwn process group

RUNTIME SEAM

One config key.
Uneven implementation.

work.runtime
claudeTask-tool fanout from a human or headless Claude dispatcher session.Documented behavior · harness-bound
localPoll loop + subprocess supervision. Harness-agnostic default; no extra server.Implemented · bh work loop
temporalWorkers polling task queues for multi-machine operation.Not implemented

Lifecycle state stays in Beads: gates, claims, heartbeats, and merge slots. The per-hive picker deliberately does no cross-hive arbitration or budget reasoning. systemd is the only installed dispatch supervisor today; launchd and container backends are named but unimplemented.

03 / COMPUTE SHAPES

Start local. Add frames when reach requires it.

The desktop/cloud/cluster view below follows the new Frame draft. It replaces the old onboarding topology picture.

01Current small shape

One person · laptop

One local Beadhive host and one or more hive repos. Keep HQ local until backup or a second host matters. The local runtime can plan, dispatch, review, and merge on that machine.

02Needs validation

Two people · shared desktop

A shared always-on host could be the single executor and lease holder, with separate human/seat identities for the two people. The product docs do not yet define OS-user isolation, shared checkout ownership, or credential boundaries for this setup.

03Host today · Frame adapter proposed

One cloud VPS

The current Linux host-provision path configures executor/transient/viewer roles; `bh host lease adopt` establishes the primary lease for a selected hive. A provider-specific VPS Bead Frame adapter is planned: pinned NixOS image or slower nixos-anywhere path, enrollment, secret bootstrap, admission, then dispatch.

04Admission and routing are proposals

Several Frames · many repos

Attach Frames to one or more hives. The draft allows one active Frame per hive; other Frames are drained or parked for failover. A Frame can serve multiple hives, but there is no shipped cross-hive capacity scheduler or same-hive parallel execution.

HQ / REGISTRYmany repos
many hives
versioned config + lease coordination
FRAME A · ACTIVEHive: repo-alphaexecutor · eligible
FRAME B · ACTIVEHive: repo-betaexecutor · eligible
FRAME C · DRAINEDHive: repo-alphafailover capacity · not running work

Different hives may run on different active Frames. A second Frame attached to the same hive is standby/failover under the proposal, not parallel same-hive capacity.

FRAMES — ONE PRIMARY HOST PER HIVE · SIGNED HEARTBEATS · ELIGIBILITY RE-CHECKED AT EVERY CLAIMframe-builder-01active · executorlease: github/acme/apiruns seats for apiown SSH key · own derived hubframe-builder-02active · executorlease: github/acme/webruns seats for webown SSH key · own derived hubframe-builder-03drained · standbyattached to api, no leasefailover, not parallel capacityown SSH key · own derived hublaptopviewerno lease — reads and filesbh hub bd ready · bh reportown SSH key · own derived hubHIVE REPOS — EACH ON ITS OWN GIT REMOTEgithub/acme/apibranches · refs/dolt/data · nothing hostedgithub/acme/webbranches · refs/dolt/data · nothing hosteda frame pushes wt/ branches and refs/dolt/data for the hive it leases;bh sync hydrates every registered hive into each host's disposable hub (read side)HQ — hq.mode SELECTS THE CONFIG CARRIERhq.mode: git — shipped defaultHQ repository · <owner>/beadhive-hqmainfleet.yaml (signed config carrier v2) · workspace.toml · hosts/<host>.yamlrefs/dolt/dataHQ-origin beads (hq- prefix): escalations, leases, policyframes: bh hq clone → read fleet config · publish manifests, heartbeats andlease CAS as signed commits · director / custodian write via bh hq pushbh hq push never force-pushes; a three-level backup precedes the first wireclone · pushleaseone primary executor per hive,compare-and-swap in HQ; viewersnever claim. A second host waitsout the TTL or adopts explicitly.bh host lease adopt | releasebh host list --lease-hive <hive>heartbeat → admissionsigned, bounded record: frame id,host incarnation, key fingerprint,sequence, release, capacity.TTL exclusive, ≤ 900 s; three freshbeats before an operator may admit.bh host admit plan | apply | checkhq.mode: dolt-server — proposed bindingno cutover recordedcentral Dolt SQL server · one database for membershipconfig tablescommitted snapshot, one publisher, explicit authoritative revisionframe_leases · frame_reportslive working set · dolt_ignore · never committedframes: per-incarnation SQL principal, table grants only — SQL auth never makesa lease authoritative; every envelope still carries the frame's SSH signaturetrusted observer verifies signatures and replay receipts before anything countsSQL + signed envelopes · no HQ checkoutreadiness is three checksCONFIG_READYrevision + HQ identityBEADS_READYstore or recoverable originAUTHORITY_READYsigned authority verifiesthen ADMITTED by an operator, thenELIGIBLE per hive. One true, othersfalse, is a normal state.fails closeda configured SQL failure isunavailable: new intake denied,no fallback to git, no stalecached authority. Incumbentleases keep renewing under theoriginal CAS and expiry rules.In both modes HQ's own beads replicate as one Dolt database on one remote path, and every host rebuilds its hub locally — neither moves when the config carrier does.
frame ↔ HQframe ↔ hive remoteproposed / standby
Three stores, three jobs, and only one of them changes shape withhq.mode. Each hive keeps its issue history on its own remote; each host keeps a disposable hub it rebuilds with bh sync; HQ alone is authoritative for fleet membership, leases and HQ-origin beads. In git mode the fleet configuration travels as signed commits in an HQ repository every frame clones. In dolt-server mode the same configuration is a committed snapshot in a central SQL store, the live lease and heartbeat tables are deliberately never committed, and a frame needs no HQ checkout at all — but SQL credentials are never trusted on their own: the frame's SSH signature on every envelope is what makes a lease or heartbeat count, exactly as in git mode. A drained frame attached to a leased hive is standby for failover, not a second worker on the same hive.
VM / ProxmoxCloud VM / EC2 · VPSComposeKubernetes PodManaged sandboxExisting Linux host

Frame shapes are proposed adapters, not a shipping support matrix. The draft chooses NixOS for VM/cloud VM shapes, OCI images from the same flake for container/pod/sandbox shapes, and Debian + Nix via System Manager with Ansible fallback for host convergence.

04 / FRAME PROVISIONING

Allocate, enroll, prove, admit.

Dispatch stays off until the frame is trusted, healthy, and the product eligibility gates exist.

  1. 01Plan + applyAllocate VM, pod, or sandbox; pin the release digest.
  2. 02Inject enrollmentStrict non-secret contract plus bootstrap credential reference.
  3. 03Resolve secretsfnox maps logical names to the chosen vault; secrets enter tmpfs.
  4. 04Register pendingbh host provision then HQ push; report health and signed heartbeat.
  5. 05Attest + admitCheck identity, release, capabilities, conformance, and three verified beats.
  6. 06Enable dispatchOnly an admitted, eligible frame may claim for its hive.

IDENTITY ATTESTATION

Prove the frame before it runs.

The draft defaults to manual operator admission. It defines operator, cloud instance identity, Kubernetes service-account, and sandbox API attestors. A frame's SSH key is reused for HQ/hive Git access and commit/heartbeat signing; it is a separate concept from test attest keys.

SAFE SHUTDOWN

Drain to remote before parking.

Stop taking claims, let seats finish to a deadline, push branches and bead state, release leases, and record a clean checkpoint. Live session suspend/resume remains blocked on a gateway contract; a provider memory snapshot does not count as a work checkpoint.

05 / TOOLCHAIN + DELIVERY

Pin the tools. Deliver an immutable frame.

Beads and Dolt are part of the runtime chain; a standalone central Dolt service is optional.

WHERE THE PINS LIVE
$ bh setup check
bd · dolt · gh · git-workspace

flake.nix → pinned versions ↗

Current Beadhive install: the managed Nix route pins the driver toolchain, then uv tool install --force 'beadhive[otel]' installs the Python bh CLI; bh setup check verifies the tools it drives. The PyPI/uv route installs bh only and leaves bd, Dolt, GitHub CLI, and git-workspace to the operator.

Beads provides the per-hive bead store and the optional bd serve API. A hive's data lives on one shared local Dolt SQL server per host that bd starts for you; the managed toolchain and the Frame draft pin the same Dolt release, and the pin is deliberately not the newest Dolt. The older per-hive embedded mode is legacy and has its own documented minimum Dolt version for the bd dolt pull hang — "any Dolt 2.x" is too broad. The exact pins live in the repo's flake and INSTALL.md, never here.

bh dolt up starts a separate, optional central Dolt service; it is not required for ordinary local operation. The Frame proposal's future dolt-server HQ mode is another distinct fleet control-plane option.

pinned source + lock→builder signs closure / image→artifact store by digest→frame activates

Implementation gap: Beadhive's current flake is toolchain-only. It has no NixOS module, OCI outputs, or Nix-built bh; the Nix-built bh package is the first hard blocker for a proper NixOS frame.

SOURCE NOTES

Draft status stays visible.

The September 29 homelab document is WIP revision 5. Its D1–D16 decisions await review; the frame and homelab rollout work has not been filed or applied. Use it as the updated topology source, not the older onboarding diagrams.