diff --git a/CLAUDE.md b/CLAUDE.md index 0982738d..802312f7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -374,7 +374,6 @@ docs/ terminal-rendering.md per-agent terminal row taxonomy (as built) boundary.md operator/agent trust model rationale agent-hierarchy.md tree-shape topology design + manager-privilege audit - damocles-migration.md future migration plan for damocles → hyperhive gateway.md nginx vhost map, matrix discovery flow, firewall posture, HIVE_FORGE_URL loopback rationale forge.md per-agent forge accounts + agent-configs mirror; diff --git a/docs/damocles-migration.md b/docs/damocles-migration.md deleted file mode 100644 index 7dfc71f9..00000000 --- a/docs/damocles-migration.md +++ /dev/null @@ -1,73 +0,0 @@ -# Migrating damocles onto hyperhive - -The plan calls out damocles → hyperhive as a future migration. This doc lays -out the options + recommended path. Not yet executed. - -## Current state (separate from hyperhive) - -`damocles` is a declarative nixos-container on `muede-lpt2`: - -- Declared in `nixosConfigurations/muede-lpt2/containers.nix` -- Built from `nixosConfigurations/damocles/` (claude-container.nix + extras) -- Bind-mounts (RO unless noted): - - `/etc/nix/distributed-build-key` - - `/persist/damocles-ssh` - - `/persist/damocles-lab` (RW — persistent work dir) -- `privateNetwork = false` -- Has its own systemd-services override (`TimeoutStopSec = 60s`, `RestartSec = 5s`) -- Hosts the user's primary day-job Claude Code session, not part of the swarm - -## Options - -### A. Sub-agent under hive-c0re -Make damocles a `hive-agent-damocles` (or whatever short name fits the 9-char cap). -hive-c0re owns its lifecycle; its config flake is the manager-editable -`/var/lib/hyperhive/agents/damocles/config/`. - -Pros: uniform — message broker, dashboard, approval flow apply to damocles too. -Cons: a lot of damocles-specific state (bind-mounts, ssh keys, build keys) has to -be modeled as per-agent config. Today's `agent.nix` schema doesn't support -declaring bind-mounts; would need to extend. And the user's day-job session -becoming subject to hive-c0re lifecycle (restarts on rebuild) is invasive. - -### B. Peer container (broker-integrated, lifecycle-independent) -Keep damocles declarative; have its harness install `hive-ag3nt` and connect to -the broker via a bind-mounted socket. damocles can send/recv messages with -other sub-agents but is not managed by hive-c0re. - -Pros: low blast radius. damocles keeps its bind-mounts + its own restart policy. -Manager can route messages to it (it's just another inbox key on the broker). -Cons: two lifecycle mechanisms coexist forever; "damocles" doesn't appear in the -dashboard's container list (it filters `hive-` and `root`). - -### C. Don't migrate -damocles stays out of hyperhive. The two systems coexist; the user's day-job -Claude and the swarm are deliberately separate. - -Pros: zero work; aligns with the actual usage pattern (day-job vs. experiment). -Cons: no message routing between damocles and the swarm. - -## Recommended - -**C for now, B once cross-pollination is wanted.** Hyperhive's invariants -(11-char container names, manager-driven lifecycle, sealed `applied/` config) -fit poorly with damocles's role as the user's working Claude. Wait until there's -a concrete reason to wire them together (e.g. "I want to ask root from inside -damocles") and then do B — extend the broker socket bind into damocles and -install `hive-ag3nt` there. No need to subsume damocles under hive-c0re. - -If/when option B is taken: - -1. Add `${hyperhive.packages.${system}.default}/bin/hive-ag3nt` (or just - `pkgs.hyperhive`) to `nixosConfigurations/damocles/claude-container.nix`. -2. Bind-mount `/run/hyperhive/agents/damocles/` into damocles at `/run/hive/`. - On the host, this is just another dir hive-c0re needs to know about — - maybe expose a "peer agents" registration mechanism in the broker. -3. Run `hive-ag3nt serve` as a systemd unit inside damocles (separate from - the user's interactive claude session — broker peer, not turn-loop). -4. Optionally: add a `hive-c0re register-peer damocles` admin verb so the - container appears in `list()` and the dashboard. (Or just hard-list it.) - -A is on the table only if the user's workflow shifts toward "the swarm IS the -day-job environment" — at which point damocles dissolves into a `hive-agent-*` -naturally.