Skip to main content

Architecture (ADRs)

Cairn's architecture is captured as Architecture Decision Records in MADR format. Each records one decision — the context, the options weighed, the choice, and its consequences — and they form a forward-only graph rooted at ADR-0001.

The house stack

LayerChoice
Backend & CLIGo — single static binary, self-hostable
APIREST/JSON for CRUD, SSE for live webhook & trajectory streams
MetadataPostgreSQL — artifacts, annotations, provenance, access, workspaces
BodiesS3-compatible object storage, content-addressed by SHA-256
Identifiersshort opaque base62 public ids
Webserver-rendered Go html/template + HTMX + Alpine.js
Agent surfacea Go MCP server, authorized via OAuth 2.1 (PKCE)

Decision records

ADRDecision
ADR-0001Cairn as an AI-native artifact store — product vision & domain model
ADR-0002Extensible share-type model with a viewer registry
ADR-0003Triple-surface parity — web, CLI, and MCP over one core service
ADR-0004MCP as a first-class surface with OAuth authorization
ADR-0005Short opaque identifiers and the URL scheme
ADR-0006Unified annotation layer — reactions & comments with typed anchors
ADR-0007Provenance, link-based access control, and default expiry
ADR-0008Storage & content model — blob bodies, metadata, content addressing
ADR-0009Trajectory capture and the OTel-inspired span model
ADR-0010Live webhook endpoints and real-time stream capture
ADR-0011Frontend architecture and the unified app shell
ADR-0012Backend platform and API shape

The ADRs are the source of truth; this page indexes them. Read them in the repo at docs/adrs/.