Cocotte

AI co-coding agent-harness application.

๐Ÿ”’ Source code is private


Cocotte

A local-first desktop coding agent built on a Rust daemon. In development; not yet released.

Work happens in a Session; each substantive change runs as a Run with a goal, a budget, verification evidence and an explicit completion state. The model decides how to approach a task, while deterministic code handles authority, effects, persistence and recovery. A CLI and a Tauri desktop app talk to the daemon over one versioned protocol. Until the MVP, everything is tested hermetically against scripted model providers; the first real-model campaign is milestone M14.

Architecture

The code is split across four sibling repositories by charter. Only the cocotte-app composition links them all, and an assembly lock pins the exact tuple used by each build and qualification run. Design: architecture ยท ADRs ยท threat model ยท repository topology.

LayerResponsibility
Contracts (carte)Domain values, commands, queries and events; the versioned client protocol; generated JSON Schema and TypeScript bindings. No I/O
Core (cuisine)The daemon: event journal and reducers, context budgeting and provenance, policy and approvals, credential broker, egress mediation, model routing and the run driver
Execution (fourneau)A separate, digest-checked helper that runs file, process, PTY and git effects under Windows AppContainer or Linux Landlock containment
Product (salle, this repository)The cocotte CLI, the Tauri desktop app, the daemon composition, and passe/: the evaluation harness and qualification tooling
โ”Œโ”€ CLIENTS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  desktop: Tauri 2 shell ยท React UI ยท TypeScript core     โ”‚
โ”‚  cli: cocotte                                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚ local IPC ยท versioned protocol
        โ–ผ
โ”Œโ”€ DAEMON โ”€ cocotte-app โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  session/run supervisor ยท orchestrator ยท model plane     โ”‚
โ”‚  context plane ยท policy ยท credential broker ยท egress     โ”‚
โ”‚  event journal (SQLite) โ†’ reducers โ†’ projections         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚ private exec wire ยท digest-checked helper
        โ–ผ
โ”Œโ”€ HELPER โ”€ fourneau โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  file, process, PTY and git effects under containment    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Why this shape.

  • The journal is the truth. Projections, snapshots, crash recovery and client reloads are all replays of one append-only log.
  • Deterministic harness, small decision kernel. The model chooses the approach; code decides what it may do and whether the work is verified.
  • Effects cross a process boundary. Policy decides in the daemon; containment enforces in the helper. Secrets reach effects only as opaque handles.
  • One contract for every surface. The CLI and desktop use the same generated bindings, so no client carries its own agent logic.
  • Milestones close on evidence. Each closes on an immutable, re-verifiable qualification run, and its critical gates are mutation-tested.

Tech stack

  • Runtime: Rust ยท Tokio ยท SQLite (rusqlite) ยท serde ยท reqwest + rustls ยท ChaCha20-Poly1305 ยท BLAKE3 / SHA-256
  • Execution: portable-pty ยท git2 (libgit2) ยท Windows AppContainer ยท Linux Landlock
  • Contracts: schemars (JSON Schema) ยท ts-rs (TypeScript)
  • Desktop: Tauri 2 (WebView2) ยท React 19 ยท react-aria-components ยท CodeMirror 6 ยท Vite ยท TypeScript
  • Quality: cargo test / clippy ยท Vitest with real-WebView journeys ยท Docker for the Linux lane ยท xtask

Roadmap

The development plan has the full ladder.

MilestoneCapabilityStatus
M0 - Walking skeletonCLI โ†’ daemon โ†’ journal, with a local assembled pass (plan)โœ… Done
M1 - Deterministic coreReducer, journal, snapshots, crash recovery and digest-checked replay (plan)โœ… Done
M2 - Authority and effectsPolicy, containment, egress mediation, credential broker and built-in tools (plan)โœ… Done
M3 - Model planeGemini, OpenAI-compatible local and Codex delegate providers, tested hermetically (plan)โœ… Done
M4 - Context planeContext budgets, provenance, freshness, handoffs and verifier-backed completion (plan)โœ… Done
M5 - SessionsSteering, questions, approvals, fork/resume, continuation, child runs and workers (plan)โœ… Done
M6 - Protocol and baselineProtocol v1 with version negotiation, generated bindings, the assembly lock and a CLI baseline on Windows and Linux (exit review)โœ… Done
M7 - Desktop and Plan modeThe desktop work loop: Plan mode, steering, review of changes and evidence, checkpoint restore (plan)Implemented; qualification pending
M8 - Context inspectionInspecting what the model saw, bounded context controls, trust and rule editing (plan)Planned
M9โ€“M13 - MVP capabilitiesParallel worktrees, extensions (skills, hooks, MCP), code intelligence, workflow orchestratorsPlanned
M14 - Live modelsFirst real-model acceptance campaign; the MVPPlanned
M15โ€“M22 - Beyond the MVPSelf-use evidence and UX, packaging and release, then evidence-gated research featuresPlanned

Keywords

  • Languages: Rust ยท TypeScript ยท SQL
  • Architecture: Event Sourcing ยท Deterministic Replay ยท Daemon + Thin Clients ยท Versioned Protocol ยท Generated Bindings ยท Multi-Repository
  • Agent runtime: Context Budgeting ยท Verifier-Backed Completion ยท Plan Mode ยท Steering and Approvals ยท Checkpoint and Restore
  • Security: Capability Policy ยท Platform Containment ยท Deny-by-Default Egress ยท OS Keychain
  • Quality: Hermetic Testing ยท Mutation Testing ยท Reproducible Evidence ยท Real-WebView Journeys