diff --git a/.hermes/plans/2026-05-27-colibri-cutover.md b/.hermes/plans/2026-05-27-colibri-cutover.md new file mode 100644 index 0000000..d2c709d --- /dev/null +++ b/.hermes/plans/2026-05-27-colibri-cutover.md @@ -0,0 +1,185 @@ +# Phase Plan: Colibri Cutover — Herdr → ISO → FreeBSD Service + +> **Orchestration plan covering Colibri, Clawdie, ISO, and Herdr repos.** +> **For Hermes:** Track lanes below, push commits, and create handoffs for FreeBSD validation. + +**Goal:** Progress Colibri toward replacing Clawdie as the FreeBSD system service, with Herdr compatibility confirmed and ISO build chain ready. + +**Status:** PLANNING — 27.maj.2026 + +--- + +## Current State Snapshot + +| Repo | Branch | Dirty? | Baseline | +|----------------|--------|--------|-------------------------------------| +| `colibri` | main | clean | `eb37784` — 62 tests, clippy-clean | +| `clawdie` | main | dirty | `a277a50` — pkg-lock mod, untracked | +| `clawdie-iso` | main | clean | `8494676` — Colibri dep section | +| `herdr` | main | clean | `ede2059` — FreeBSD 15 validated | + +### Colibri Status (Phases from COLIBRI-CONTROLPLANE-PLAN.md) + +| Phase | Status | Notes | +|-------|-------------|--------------------------------------------------------| +| 0 | ✅ Complete | Repo scaffold, crates, rust-toolchain | +| 1 | ✅ Complete | DeepSeek cache probe, contract manifests | +| 2 | ✅ Complete | Ingestion seams (watchdog socket, manifests, inventory)| +| 3 | ⚡ In progress| Glasspane TUI + client done; coordination core TODO | +| 4 | ⬜ Planned | Execution & scheduling (cron/interval, Pi engine) | +| 5 | ⬜ Planned | Cache-first prompt discipline (3-region assembler) | +| 6 | ⬜ Planned | Gated cutover — replace TS control-plane paths | + +### Clawdie Repo — Active Integration + +The `clawdie` repo already has `crates/colibri-daemon/` (Rust workspace) with: +- `event.rs` — Pi JSONL parsing +- `state.rs` — 5-state machine +- `ingestor.rs` — ingestion pipeline +- `snapshot.rs` — HTTP snapshot API (axum) +- `client.rs` — glasspane client + +--- + +## Lane 1: Colibri Core (Primary) + +**Owner:** Hermes (debby, Linux) → Claude (osa, FreeBSD validation) + +### T1.1 — Stabilize current baseline +- Run `cargo test --workspace && cargo clippy --workspace --all-targets -- -D warnings` +- Record exact test count and clippy status +- Commit any rustfmt/clippy fixes + +### T1.2 — Phase 3: Coordination core +- Task board with explicit lifecycle (queued→claimed→started→done/failed) +- Agents-as-teammates model +- Team skills catalog +- Postgres-backed (reuse Clawdie's `system_ops` DB) + +### T1.3 — Phase 4: Execution & scheduling +- cron/interval/one-time scheduler +- Pi engine integration via events parser +- Telegram intake compatibility + +### T1.4 — Phase 5: Cache-first prompt discipline +- Deterministic 3-region prompt assembler +- Cost modes (fast/smart/max) +- Visible escalation + +### T1.5 — Phase 6: Gated cutover +- Replace TS control-plane paths after proof gates pass +- Separate deprecation PRs per path + +### FreeBSD Validation (each step) +- Push to Codeberg +- Handoff to Claude on osa for `cargo test` on FreeBSD 15 +- Record `rustc --version`, `freebsd-version`, exact test output + +--- + +## Lane 2: Herdr Compatibility Verification + +**Owner:** Hermes (debby) + Claude (osa) + +Before next IMG deployment, confirm: + +### T2.1 — API compatibility +- Verify herdr's protocol works with Clawdie's control-plane API +- Check `src/protocol/wire.rs::PROTOCOL_VERSION` against Clawdie expectations +- Document any gaps + +### T2.2 — tmux integration +- Confirm herdr can manage tmux sessions that Clawdie's agent runners use +- Test `herdr --remote` over Tailscale (debby↔domedog already smoke-tested) +- Verify session targeting (`SESSION:WINDOW` convention) + +### T2.3 — Clawdie agent runner compatibility +- Verify herdr works as drop-in for Clawdie's tmux-based agent execution +- Test with Pi engine JSONL event output +- Document any breaking changes needed + +### T2.4 — Compatibility manifest +- Produce `herdr-clawdie-compat.v1` manifest +- List: protocol versions, tmux features, API endpoints, known gaps + +**Gate:** Herdr compatibility manifest signed → IMG deployment unblocked. + +--- + +## Lane 3: ISO Build Chain + +**Owner:** Hermes (coordination) → Codex (osa, FreeBSD build) + +### T3.1 — Assess current ISO state +- Review `PLAN-OPERATOR-USB-NEXT.md` for round-scope decisions +- Check Colibri dependency section (added in `8494676`) +- Identify what the ISO agent needs next + +### T3.2 — Colibri artifact integration +- Define what Colibri binary the ISO should bundle +- FreeBSD `rc.d` service script for Colibri daemon +- Firstboot integration (start Colibri alongside Clawdie during transition) + +### T3.3 — Build chain handoff +- Create ISO handoff doc for Codex builder +- Specify exact Colibri commit hash to bundle +- Document build flags, target triple, TLS config + +--- + +## Lane 4: Gradual Phase-Out (Clawdie → Colibri) + +**Owner:** Shared (Hermes + Claude + Sam) + +### T4.1 — Dual-run period +- Colibri daemon runs alongside Clawdie on FreeBSD +- Both consume Pi JSONL events (passive observation) +- Compare state snapshots between Clawdie and Colibri + +### T4.2 — State parity gates +- Task board state matches between TS and Rust +- Agent lifecycle transitions match +- Watchdog host-status ingestion matches + +### T4.3 — Read-only takeover +- Colibri serves snapshots; Clawdie's TS UI reads from Colibri API +- Prove the Rust daemon is the source of truth + +### T4.4 — Write takeover +- Colibri takes over scheduling, agent dispatch +- Clawdie TS reduced to Telegram intake only + +### T4.5 — Full cutover +- Clawdie TS stopped +- Colibri daemon is the sole control plane +- `rc.d` service for Colibri, Clawdie disabled + +--- + +## Dependency Graph + +``` +Lane 1 (Colibri Core) ──────────────────────────┐ + ├──→ Lane 4 (Phase-out) +Lane 2 (Herdr Compat) ──→ IMG unblocked ─────────┤ + │ +Lane 3 (ISO Build) ─────→ Colibri in ISO ────────┘ +``` + +--- + +## Commit Convention + +All repos use: +- `feat:` / `fix:` / `docs:` / `refactor:` / `test:` prefixes +- Attribution: `(Sam & Hermes)` for joint, `(Sam & Claude)` for FreeBSD +- Cross-repo references in commit body when relevant + +--- + +## Next Action + +1. Run Colibri baseline check (T1.1) +2. Clean up Clawdie repo (commit or discard dirty state) +3. Create ISO handoff doc (T3.3) +4. Push plan → commit to colibri