Commit graph

58 commits

Author SHA1 Message Date
0d80bb161d docs: format tokenomics trifecta v2
Run Prettier on the PR #15 tokenomics doc after the clawdie scope and model-name fixes.\n\nChecks: npx --yes prettier@3 --check docs/COLIBRI-TOKENOMICS-TRIFECTA.md; cargo fmt --check; git diff --check.
2026-06-02 17:43:10 +02:00
1d52ad1078 docs: add clawdie scope exclusion + fix example model name
Per Claude review: the tokenomics doc implied cost-modes/metering as
universal Colibri behaviour, but the clawdie lane deliberately strips
all of it. Added explicit scope block referencing CLAWDIE-AGENT-WIKI.md.
Also aligned example model name deepseek-v4-flash with harness docs.
2026-06-02 15:52:42 +02:00
7c82a89881 docs: Colibri Tokenomics — trifecta framework (performance/speed/cost)
Strategic vision integrating Indie Devdan's agent trifecta concept into
the Colibri roadmap. 'More useful tokens > fewer useful tokens' mapped
onto existing T1.4 cache-first architecture.

Trifecta = Performance (task success) + Speed (cache-hit/latency) +
Cost (dollars per result). Token arbitrage as the golden line:
maximize cache-hit surface, spend on useful context, trim waste.

Validates Colibri's 3-region prompt + CostMode + cache warming are
already trifecta-aligned. Adds T1.5 (dashboard) and T2.x (model
selection arbitrage, VSpec support) to roadmap.
2026-06-02 15:19:32 +02:00
Sam & Claude
25c7f16600 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	Cargo.toml
2026-06-02 09:26:46 +02:00
Sam & Claude
aea2fbe60e feat: add clawdie — simplified operator agent in one small binary (Sam & Claude)
New `clawdie` crate: the operator-friendly face of Colibri. One small Rust
binary that reuses the proven control-plane core (glasspane supervision +
Herdr Unix-socket API + coordination loop — the "split brain") and puts a
DeepSeek-backed Telegram bot in front of it. That is the entire out-of-the-box
surface.

Deliberately lifted vs. the full control plane: cost modes, quota accounting,
context budgets, multi-provider fallback (OpenRouter/Anthropic), per-user
limits. One DeepSeek key serves both the chat lane and the daemon routing.

- crates/clawdie: main (core + bridge wiring), telegram (long-poll bridge),
  deepseek (minimal one-key chat), build.rs (bakes CLAWDIE_TG_TOKEN +
  CLAWDIE_DEEPSEEK_KEY build flags; runtime env overrides).
- packaging/freebsd/clawdie.in: rc.d service, daemon(8)-supervised, restart on
  crash, dedicated clawdie user — starts as a service like Clawdie-AI.
- release profile strips symbols (binary ~7.6 MB stripped).
- docs/CLAWDIE-AGENT-WIKI.md (mindmap), docs/CLAWDIE-BUILD.md (build + ISO +
  next-build XFCE USB fixes), README workspace table.

Build/clippy/fmt green; headless start smoke-tested (socket + sessions bind).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:31:59 +02:00
b06d244e85 feat: cache warming on daemon startup + periodic re-warm (T1.4 PR3b)
Disabled by default. Enables DeepSeek prefix cache warming:
- Fire-and-forget probe on daemon startup
- Optional periodic re-warming (COLIBRI_CACHE_WARMING_INTERVAL_HOURS)
- Cache warming metrics exposed in daemon status
- Fix: Box<dyn Error> -> Box<dyn Error + Send + Sync> in deepseek crate

Config: COLIBRI_CACHE_WARMING=0|1, COLIBRI_CACHE_WARMING_INTERVAL_HOURS=N
Status: cache_warming.enabled, .last_warm_at, .last_warm_cache_hit,
        .last_warm_hit_tokens

Build: pass | Tests: workspace green | Fmt: clean
2026-05-31 17:33:53 +02:00
69c61cb189 docs: record OSA real Pi binary proof (Sam & Codex)
Validation: real pi 0.76.0 executed via colibri-daemon spawn-local wrapper; glasspane reached done with pi_session_id.
2026-05-31 17:10:55 +02:00
3235f8c00e feat: ISO service hardening — rc.d + log rotation + layout docs
Hardens the FreeBSD service for production readiness:

- rc.d: post-start socket health check (waits up to 10s), post-stop
  socket cleanup, 'health' extra command that probes socket with
  a status command via nc.

- newsyslog: log rotation at 1MB, 7 compressed archives,
  colibri:colibri ownership.

- staging: copies newsyslog config into image root, updated
  staging report to list all installed files.

- docs/ISO-SERVICE-LAYOUT.md: filesystem layout, boot/shutdown
  behavior, startup validation commands, config knobs, secrets
  policy, log rotation details.

Shell syntax: sh -n clean on both scripts.
Workspace tests: all green.
2026-05-31 16:48:48 +02:00
040f56316d docs: record d360dde post-merge baseline
Linux + FreeBSD validation green. All 4 PRs merged.
Known caveats: OSA kernel p8 running / p9 pending reboot,
colibri-skills and zot harness are scaffold-only.
2026-05-31 16:18:59 +02:00
65e304a1e0 Merge pull request 'feat: scaffold colibri-skills crate — split-brain read consumer' (#2) from feat/colibri-skills-scaffold into main 2026-05-31 16:03:12 +02:00
7c1a9d886a feat: add PromptAssembly + CacheMetrics structs (T1.4 PR 1)
Structural only — no behavior change. Introduces:

- PromptAssembly: named 3-region wrapper around build_prompt_messages()
  with to_messages(), immutable_prefix, appendable_log, volatile_scratch,
  total_bytes, estimated_tokens.

- CacheMetrics: per-session cache-hit tracking with hit_rate() and
  record().

- Session::build_prompt_assembly() wraps existing build_prompt_messages()
  with no logic change.

- 5 golden tests: assembly structure, empty volatile, hit rate
  calculations, record accumulation.

- Linked T1.4-PROMPT-DISCIPLINE-PLAN.md from COLIBRI-CUTOVER-PLAN.md.

No trimming, no escalation, no scheduler changes — PR 2 and 3 follow.

Parked branches (colibri-skills, zot harness) untouched.

Build: pass | Tests: 41/41 green (+5 new) | Clippy: clean | Fmt: clean
2026-05-31 15:30:38 +02:00
39db0b661b docs: T1.4 cache-first prompt discipline plan
Inventory of current prompt/cache/session code across Colibri:
- cost.rs: CostMode (fast/smart/max), thresholds, escalation (present)
- session.rs: 3-region prompt assembly, compaction (present)
- colibri-deepseek: STABLE_SYSTEM_PREFIX, cache probe (present)
- config.rs: DaemonConfig with cost fields (present)

Plan adds 6 integration items across 3 PRs:
1. PromptAssembly + CacheMetrics structs
2. Cost-aware trimming + auto-escalation
3. Scheduler injection + cache warming

No changes to parked branches (colibri-skills, zot harness).

Build: N/A (docs-only) | Tests: N/A
2026-05-31 15:30:38 +02:00
8b419f79ed docs: align skills plan with scaffold (Sam & Codex)
Validation: cargo fmt --check; cargo clippy -p colibri-skills --all-targets -- -D warnings; cargo test -p colibri-skills; git diff --check.
2026-05-31 14:39:49 +02:00
56ffa8e596 docs: cut over Colibri remotes to Forgejo (Sam & Claude)
Validation: docs-only; git diff --check.
2026-05-29 09:03:59 +02:00
a69d0059b0 docs: consolidate ISO planning docs 2026-05-27 23:17:35 +02:00
4880502d18 docs: tighten Clawdie Studio Zed integration guardrails 2026-05-27 23:13:27 +02:00
aa15654ae2 docs: propose Clawdie Studio — integrated editor + control plane
Proposal for a unified Colibri + Zed experience where the operator
can edit docs/code while simultaneously running and observing agents,
tasks, and scheduler from one visual surface.

Three integration levels:

1. Near-term: Zed as visual shell over colibri-daemon socket
   (sidebar extension, one-app experience, not one binary)

2. Mid-term: colibri-mcp MCP bridge (highest leverage)
   - Zed already supports MCP natively
   - Reuses colibri-client crate directly
   - Editor-agnostic (works with any MCP-capable editor)
   - 7 Phase-1 tools defined (status, snapshot, tasks, intake, etc.)

3. Long-term: true single binary (not recommended now)
   - Colibri must run headless at boot even when editor is closed

Product shape:
  colibri-daemon (service) + colibri-mcp (bridge) + colibri-studio
  (launcher) + Zed extension. Two new thin binaries, no existing
  crates change.

Estimated: ~1 week of focused agent time for MCP Phase 1 + launcher.
2026-05-27 23:11:23 +02:00
f3a221330b docs: add ISO acceptance tracker and staging helper 2026-05-27 22:52:59 +02:00
2b01d8dad8 docs: add ISO integration plan 2026-05-27 22:43:51 +02:00
4c92a387ba docs: record colibri task CLI smoke 2026-05-27 22:24:41 +02:00
123kupola
12596d1a71 docs: mark T1.3b FreeBSD smoke done, next: Herdr attach or T1.4 (Sam & Hermes) 2026-05-27 22:20:11 +02:00
8d4bb3a916 refactor: rename colibri-ctl binary to colibri (Sam & Claude)
The operator CLI was already a subcommand dispatcher; drop the -ctl suffix so
it reads `colibri status` / `colibri snapshot` / `colibri spawn-local …` — one
`colibri` entrypoint (same single-binary-with-subcommands shape as just, but a
control plane). Renames the bin + its source file, updates usage strings, and
points the forward-looking docs at `colibri`. Dated session/handoff records
are left as historical. (Task-board subcommands intake/create/list are the
follow-up T1.3c slice.)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 21:50:36 +02:00
8199e23890 docs: record OSA intake scheduler re-smoke 2026-05-27 21:09:26 +02:00
61b008ac6a docs: record OSA FreeBSD daemon smoke finding 2026-05-27 20:13:46 +02:00
123kupola
db5737bcdb feat: add prototype rc.d service + fix plan wording (Sam & Hermes)
packaging/freebsd/colibri_daemon.in: FreeBSD rc.d service file
for review only, not installed. Uses /var/db/colibri,
/var/run/colibri, COLIBRI_DB_PATH. /tmp smoke test comes first.
2026-05-27 19:30:51 +02:00
123kupola
7687976583 docs: simplify T1.3b — prototype smoke test, not cautious deployment (Sam & Hermes) 2026-05-27 19:27:28 +02:00
123kupola
d6a3c81237 docs: next slice — FreeBSD daemon bring-up, defer Herdr attach (Sam & Hermes) 2026-05-27 19:24:14 +02:00
99de050514 docs: record scheduler FreeBSD store isolation finding 2026-05-27 19:15:05 +02:00
a48afa1c0a fix: harden scheduler tests and FreeBSD store isolation 2026-05-27 19:13:20 +02:00
123kupola
ceaeaee658 feat: add scheduler — cron/interval/one-shot execution (Sam & Hermes)
T1.3 Phase 4: execution & scheduling. New scheduler module with:
- Schedule types: Once (ISO timestamp), Interval (every N secs), Cron (5-field)
- 12 scheduler unit tests (cron matching, interval firing, leader/delegate)
- Leader/delegate: capability-match agent selection (pick_agent)
- Intake-task socket command for Telegram/remote task submission
- 4th daemon loop tick (scheduler_tick, every 30s)
- Plan baseline updated: ebc1b99, 72 tests, 8 crates
2026-05-27 19:05:20 +02:00
743aac19dc docs: storage ownership surface + escalation/failure-mode + Lane 2 non-blocking (Sam & Claude)
Flesh out Decision #1 (SQLite-first) with the operational surface and make
Lane 2 explicitly non-blocking for core correctness:

- Storage surface (proposed defaults): DB file path (FreeBSD /var/db/colibri,
  Linux XDG, COLIBRI_DB_PATH override); WAL + synchronous=NORMAL, local FS only;
  backup via VACUUM INTO + JSON contract export; authoritative (task/agent/
  scheduling) vs mirrored (Pi events, watchdog host-status, inventory).
- Postgres-escalation criterion: one concrete rule — only if Lane 4 dual-run
  parity proves SQLite insufficient for required cross-host shared state.
- Failure mode: DB corrupt/unavailable => fail safe, no takeover; watchdog/hostd
  and local FreeBSD safety stay authoritative.
- Lane 2: gates IMG deployment only, never Colibri core correctness.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:19:28 +02:00
0924b76a38 docs: clarify colibri-skills phase zero 2026-05-27 16:17:25 +02:00
4cefb25738 docs: record SQLite-first storage decision + relay to Hermes (Sam & Claude)
- COLIBRI-CUTOVER-PLAN.md: resolve Open Decision #1 — Colibri owns its own
  store, embedded SQLite first, Postgres adapter only if parity/integration
  proves the need (do not default to reusing clawdie-ai system_ops). Reaffirm
  the Herdr boundary. Update Lane 1 T1.2 + Next actions accordingly.
- .agent-handoff.md: relay to Hermes — 0925939 is the shared verified plan,
  the .hermes draft is superseded where it conflicts, storage decided. FYI,
  not a debate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:15:01 +02:00
09259394b9 docs: add corrected shared cutover plan (Sam & Claude)
Verified, shared version of the cutover orchestration plan in docs/,
correcting the .hermes/plans draft against the actual repos:

- Kill the fabricated clawdie-ai crates/colibri-daemon (no crates/ dir
  exists there; the real daemon is Unix-socket in the colibri repo, not
  axum/HTTP).
- Fix baseline to 160dd11 (65 tests pass/0 fail, clippy -D warnings clean);
  eb37784 was not clippy-clean.
- Reaffirm the Herdr boundary: Linux/macOS display/remote plane, no Herdr
  on FreeBSD; colibri-glasspane is the native answer (Lane 2 reframed).
- Correct ownership: Claude=domedog=Linux, Codex=osa=FreeBSD, Hermes=debby=Linux.
- Surface the Postgres coupling as an explicit open decision, not a given.
- Downgrade the overclaimed debby<->domedog herdr smoke test to "not yet done."

Leaves the .hermes draft untouched; marked DRAFT/PROPOSED pending ratification.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:06:40 +02:00
7a2224456c Docs: add Herdr hub runbook (domedog hub → debby → Colibri) (Sam & Claude)
Operator runbook for standing up domedog as the Herdr testing hub, attaching
debby as a remote client over Tailscale SSH, then layering Colibri supervision.
Records verified state: hub running (Herdr 0.6.2), pi integration installed,
debby's key already authorized + ssh config present, remaining gap = herdr
client not yet installed on debby. Includes the key-safety note (public keys
safe; never transit private keys) and the IPv6/Codeberg retry tip.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 15:16:53 +02:00
c2655d1d41 Document planned colibri-skills split-brain lane (Sam & Codex) 2026-05-27 14:00:44 +02:00
862204c205 Docs: park Herdr-FreeBSD, anchor status to commit (Sam & Claude)
Make the Herdr boundary explicit now that Herdr-Linux-remote and
Colibri-FreeBSD are validated as separate planes:

- Herdr FreeBSD port is parked, not a migration blocker. The exploratory
  FreeBSD build findings are kept for the record but framed as a parked
  experiment, not a pending task.
- Herdr stays a Linux/macOS display/remote plane behind the socket contract;
  colibri-glasspane is the native FreeBSD supervision answer.

Tighten stale status so it stops rotting:

- Replace the fixed "31 passed, 0 failed" count with "all gates green as of
  b325c38" plus the clippy clean note.
- Anchor the top-level status line to commit b325c38.

Doc-only; no code or test changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 12:54:26 +02:00
07d04efa8a Add Colibri operator smoke CLI helpers 2026-05-27 12:19:24 +02:00
504608bab1 feat: add multiagent workflow improvements
Add three improvements to streamline multiagent development:

1. Agent Handoff Protocol (.agent-handoff.md)
   - Standardized handoff template and checklist
   - Handoff history with timestamps
   - Proof gate status tracking
   - Platform matrix documentation

2. Proof Gate Tracker (tools/proof-gate-tracker.rs)
   - Automated validation of all 6 proof gates
   - Instant visibility into gate status
   - Exit codes for CI/CD integration
   - Prevents gate regressions

3. Platform Matrix Tests (tests/platform-matrix.rs)
   - Cross-platform smoke test suite
   - Validates FreeBSD and Linux parity
   - Cache economics consistency checks
   - Platform-specific test cases

Documentation: docs/MULTIAGENT-WORKFLOW-IMPROVEMENTS.md
Tools: tools/README.md

These improvements standardize handoffs, automate validation,
and ensure cross-platform consistency for the TypeScript → Rust
migration workflow.
2026-05-27 12:09:40 +02:00
047a90427d Record Colibri live daemon client smoke report 2026-05-27 09:14:44 +02:00
fbcb7e6ca4 Add live daemon client smoke with local fake agent 2026-05-27 09:12:02 +02:00
Sam & Hermes
f65fdc7ad1 Update migration inventory to reflect Phase 1-4 complete (Sam & Hermes)
7 crates, daemon scaffolded, Herdr validated (builds, 1450/1453 tests),
TS files retired (budget, aider, codex, tmux-screenshot), gate #6 closed.
2026-05-27 03:41:01 +02:00
20809cda1d Start Phase 4 typed daemon client 2026-05-27 03:02:42 +02:00
123kupola
0e35c1bc27 Add daemon-glasspane integration contract (Sam & Hermes)
532-line technical spec covering:
- Socket API wire protocol (7 HerdrCommand variants, JSON dialogs)
- Pane-to-session mapping (4 ID namespaces, creation sequence)
- State flow (daemon lifecycle → 5 AgentState transitions)
- Unified API vocabulary (supervise.*, daemon.*, provider.*)
- clawdie.glasspane.snapshot.v1 contract (producer/consumer)
- Boot sequence (daemon starts first, glasspane embedded)
2026-05-27 02:57:22 +02:00
9ffdde0579 Add glasspane pane reader loop 2026-05-27 02:30:33 +02:00
97439234a6 Start glasspane Phase 3 pane supervision 2026-05-27 02:20:54 +02:00
7ab7b6d343 Sync glasspane Pi events and clippy hygiene 2026-05-27 02:15:09 +02:00
2f282f593d colibri-glasspane Phase 2: ingest real Pi --mode json JSONL (Sam & Claude)
agent_state_from_jsonl / pi_event_type / pane_from_jsonl fold a live Pi --mode json stream through the AgentState machine and capture session id+cwd from the flat header. Lenient: blank/malformed/type-less lines are skipped. 8 tests pass (5 state model + 3 JSONL ingestion, incl. a verbatim pi 0.75.5 session header). Phase 1 unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 02:03:09 +02:00
dbf82c0753 Add colibri-glasspane: design doc + Phase-1 state model scaffold (Sam & Claude)
FreeBSD-native agent supervision reimplementing Herdr's glasspane (sessions/panes/agent-state) behind Colibri's unified API; Herdr stays an optional Linux display client (AGPL + Linux-only). Key bet: agent state is derived deterministically from Pi --mode json events (colibri-pi-events taxonomy), not terminal screen-scraping.

docs/COLIBRI-GLASSPANE-DESIGN.md: capability graph, 5-state model + event→state map, unified API, clawdie.glasspane.snapshot.v1 contract, FreeBSD impl notes, 5 phases. crates/colibri-glasspane: Phase-1 pure state model (AgentState, apply_pi_event/fold_pi_events, Pane, GlasspaneSnapshot) + 5 tests. PTY/socket server + orchestrator are later phases.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 01:22:52 +02:00
dc8371e6d5 Add caller inventory + retirement plan (gate #6 prerequisite) (Sam & Claude)
Read-only who-imports-what of the clawdie-ai TS drop candidates. Corrects the earlier drop list: agent-runner.ts (the Pi host runner, 4 callers) and jail-exec-runner.ts (jailPi load-bearing) are KEEP, not drops. Real safe drop set is narrow + contained in controlplane-heartbeat-executor.ts: the non-Pi backend branches (aider/codex, gated behind CONTROLPLANE_RUNNER) + tmux-screenshot-command (→ Herdr). Precondition: production CONTROLPLANE_RUNNER=pi. Plan only — execution is a separate gated PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:49:45 +02:00