Architecture Decisions
The engineering decisions behind Hive's terminal, runtime, and persistence design.
Architecture decision records
Each ADR records one decision: the context, what was decided, and what it costs. ADRs are not rewritten after they are accepted: a later ADR supersedes an earlier one, and a factual correction is added as a dated amendment. New dependencies need an ADR (see CONTRIBUTING.md).
| ADR | Decision | Status |
|---|---|---|
| 0001 | Terminal emulation: charmbracelet/x/vt behind a Hive-owned port, with Hive-owned scrollback |
Accepted (with performance gate) |
| 0002 | Multiplexer rendering: draw cells through ultraviolet, not Bubble Tea string views | Accepted (amended in M1) |
| 0003 | M0 dependencies: cobra, go-toml v2, goleak, x/sys | Accepted |
| 0004 | One daemon per storage root, enforced by flock |
Accepted |
| 0005 | Recovery stops orphaned agents only when PID and start time match | Accepted |
| 0006 | Agents run under shims; protocol 2; screens travel as frames; events | Accepted |
| 0007 | Session snapshots, restore after a reboot by “lost” processes, resume from manifests; godbus for logind | Accepted |
| 0008 | Remote machines over the system’s ssh and hive proxy; install with consent; server-side pacing |
Accepted |
Spike code that produced the measurements lives in spikes/. Each
spike is its own Go module and is not part of the main build.