Skip to content

Architecture & ADRs

The agent is built around a graph state machine (LangGraph): each pipeline stage is a node, and a run is one traversal with checkpoints written to runs/<id>/.

observe ground design generate & validate judge & learn

Deep-dive documents live in the repository (canonical for contributors):

DocumentCovers
overviewThe big picture — how the pieces compose
state-machineGraph nodes, edges, checkpoints
browser-gatewayThe lib | cli browser backends (BROWSER_BACKEND)
data-contractsCase/report file formats
self-improvementKeep-best repair + learning across runs
module-mapSource layout
ADRDecision
0001Language & agent framework
0002LLM: Anthropic tiering
0003Browser gateway: hybrid
0004Prompts in Langfuse
0005Test output format
0006Observability: Langfuse v5 + OTel
0007Single package, not monorepo
0008Methodology port from qa-skills
0009TUI on Ink
0010Rename to Cairn
0011Per-role model routing
0012Relicense to Apache-2.0

Cairn is Apache-2.0 (relicensed from GPL-3.0 in v0.3.0 — see ADR 0012). Methodology prompts are ported from AZANIR/qa-skills (ADR 0008).