# ADR-0001: Single Rust binary with routed compose services **Status:** Accepted (2026-08-08) ## Context The design doc's architecture diagram shows Rules, Memory, the Kanboard wrapper, and the Web Panel as separate boxes, which reads as four independent deployables communicating over HTTP. Bridle targets single-host, single-user deployment. Splitting hand-written components across processes at that scale buys nothing: it costs four ports, four health checks, four failure modes, and turns what would be function calls into network hops. ## Decision All hand-written components compile into **one Rust binary** with internal modules: `mcp` (server and session handling), `rules`, `memory`, `proxy`, `admin`, and the Web Panel's served assets. Module boundaries stay clean enough that any module could be split into its own service later without redesign. Third-party and off-the-shelf services remain **separate Docker Compose containers** — Qdrant, Kanboard, the embedding server, and the existing Gitea MCP server — with all agent traffic to them routed through the binary. ## Consequences - One deployable, one health check, one log stream, one thing to restart. - No Python sidecar: the memory module is Rust talking to Qdrant and to an OpenAI-compatible embeddings endpoint over HTTP. - Compose profiles for bundled-versus-external services are unaffected — see the deployment section of the design doc. - If Bridle ever outgrows single-host, the module boundaries are the seams to split along. This is a deliberate deferral, not an oversight.