Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture & ADRs

Caliban captures every significant architectural decision in an Architecture Decision Record (ADR). Each ADR states the context, the decision, and its consequences — giving contributors (and curious operators) the rationale behind the design, not just the outcome.

ADRs live in the docs/adr/ directory of the repository. They use a lightweight MADR-lite format and carry a status:

  • accepted — currently in effect
  • superseded — replaced by a later ADR; kept for history
  • proposed — under discussion, not yet in effect
  • rejected — considered and explicitly declined

This is the contributor/internals layer

You do not need to read ADRs to use caliban. They exist for contributors and operators who want to understand why something works the way it does. For crate orientation, see Crate Map.


ADR index

Foundation

#TitleStatus
0000Record architecture decisions (MADR-lite under docs/adr/)accepted
0001Async runtime → tokioaccepted
0002Error model → thiserror for libs, anyhow for binaryaccepted
0003License → AGPL-3.0-onlyaccepted
0004Naming → caliban-* libraries, caliban binaryaccepted
0005Workspace layout → crates/ for libs, binaries at rootaccepted

Provider & message model

#TitleStatus
0006Message schema → provider-neutral IRaccepted
0007Schema/transport factoring via Transport traitaccepted
0008Role::System is positional (leading-only)accepted

Agent core

#TitleStatus
0009Agent-core design (stream-as-primitive, sequential tools, opt-in compaction)accepted (sequential-tools clause superseded by 0016)
0010WorkspaceRoot path resolution + opt-in restricted modeaccepted
0016Parallel tool dispatch (semaphore-bounded; supersedes 0009 sequential clause)accepted
0021Sub-agent primitive (AgentTool; synchronous in-process; allowlist-filtered registry)accepted

TUI & sessions

#TitleStatus
0011Sessions persisted to disk + interactive REPLaccepted
0012TUI via ratatui (replacing the rustyline REPL)accepted
0013TUI overlays + layout v2accepted
0014Default system prompt + TUI stall fixes + debug loggingaccepted
0015Context preservation + path conventions (~ expansion)accepted
0027TUI ergonomics (@file, !, Ctrl+G, Ask modal, transcript viewer)accepted
0041TUI redraw tick — close-out (resolves 0014 open question)accepted

Memory & checkpointing

#TitleStatus
0018Memory tier model (global / project / auto-memory; spliced into system prompt)accepted
0028Auto-checkpointing + /rewindaccepted
0035Auto-memory (model-written notes per project)accepted
0036CLAUDE.md ancestor walk + @-importsaccepted

Permissions & safety

#TitleStatus
0020Permission rules layered on Hooks (TOML rule sources; interactive Ask)accepted
0029Permission modes (acceptEdits / auto / dontAsk / bypassPermissions) + auto-mode classifieraccepted
0032OS-level sandbox (macOS Seatbelt + Linux bubblewrap)accepted
0045Permissions v2 — TOML-primary config + richer rule schemaaccepted

Configuration & settings

#TitleStatus
0026Unified settings hierarchy (managed > user > project > local)accepted
0043arc-swap as the read-mostly shared-state primitiveaccepted

Extensibility: hooks, skills, plugins, output styles

#TitleStatus
0019Skills loading & invocation (frontmatter + body; SkillTool on-demand load)accepted
0024Hook event taxonomy (expanded events + handler types)accepted
0030Plugin packaging (skills + hooks + agents + MCP + output-styles bundles)accepted
0031Output styles (Default / Proactive / Explanatory / Learning + custom)accepted
0040Slash command registry (extensible SlashCommand trait)accepted

MCP

#TitleStatus
0017MCP client architecture (stdio v1; tools surface as mcp__<server>__<tool>)accepted
0023MCP v2 — transports, OAuth, elicitation, resourcesaccepted
0044rmcp 1.7 version pin (dedicated-PR bumps)accepted
0046Two-stage tool surface — lazy MCP schema loading + ToolSearchaccepted

Model router & providers

#TitleStatus
0022Model routing architecture (Layer 3 caliban-model-router; router-impl-Provider)accepted
0034Bedrock + Vertex providersaccepted
0038Model router v2 (fallback / hedging / circuit breakers / capability filtering)accepted
0039Image / vision inputaccepted

Headless / CI & observability

#TitleStatus
0025Headless / print mode + JSON output protocolaccepted
0033OpenTelemetry export + cost accountingaccepted

Sub-agents & background fleet

#TitleStatus
0037Sub-agent worktree isolation + background fleetaccepted
0042caliband sibling-binary placement (under caliban-supervisor)accepted