Converged work management for AI coding agents β one tool where deep planning, durable memory, tracker truth, and session continuity meet in a single deterministic engine. First-class as a Claude Code plugin; one-command installers wire the same server and verbs into seven other AI CLI harnesses (Grok Build, Copilot CLI, Codex, Gemini CLI, Cursor, OpenCode, Zed).
What makes it different β mechanism, not vocabulary:
| Server-validated lifecycle | Planβtracker drift is computed math, verify gates work goal-backward from the phase goal, and checkpoint markers are parsed by a real server β correctness is code, not prompt discipline. |
| Tracker-first | Eight write-through backends (GitHub, GitLab, Jira, Asana, Azure Boards, ClickUp, Linear, local files) hold the single source of truth for work, mirrored in plain language a non-engineer can read. |
| Cross-vendor adversarial review | peers seats codex, grok, antigravity, opencode, and copilot as reviewers β five seats, four labs β and their claims are verified against source before they count. (Install the CLIs you want seated.) |
| Memory with provenance | Git-committed memory cards record their source commit; recall serves a STALE flag when the code moved β and the cards feed plan, work, and verify. |
This repo is the cairn 2.0 rebuild; the earlier 1.x plugin lives in the claude-plugins marketplace repo. Full docs index: docs/README.md.
Cairn 2.0 is a Claude Code plugin backed by a real TypeScript MCP server. External work trackers are the single source of truth for work items, git owns all prose (plans, memory cards), and the server owns every mechanism with a wrong answer β state transitions, mirroring, drift math, staleness checks β while skills own judgment. No prompt-glue, no sync engine, no sidecar processes.
plugin (thin) commands + skills + hooks β policy and judgment
β typed MCP tools
cairn-server tracker/ Β· planning/ Β· memory/ Β· core/ (one process)
β
tracker API (work truth) Β· git repo (prose truth) Β· ~/.cairn/ (disposable cache)
The full code relationship map β verb layer, MCP server, and the three
subsystems underneath (sources in docs/diagrams/):
Tracker layer β eight adapters behind one normalized interface: GitHub, GitLab, Jira, Asana, Azure Boards, ClickUp, Linear (native issue links + dependency graph), and a zero-credential local backend that stores issues as plain files in your repo (links and graph included). Capability matrix per backend (declare, don't flatten), write-through with cached reads, shared HTTP core with retry/backoff, and a single contract test suite every adapter must pass β fixtures in CI, live sandboxes before release.
Docs connectors β publish repo documentation outward through the same
pluggable-adapter pattern: /cairn:docs publish mirrors README + docs/
into Confluence (per-project folder, landing page + child-page tree,
generated contents sections, space-wide title-conflict handling) or into a
local Docusaurus site checkout (markdown + _category_.json, native
sidebar, optional auto-commit β never push). Idempotent re-publish on both.
The SPI is product-neutral β Confluence and Docusaurus ship today, and new
targets slot in behind the same contract suite on demand, not roadmapped
ahead of need.
Planning engine β GSD-depth planning on native Claude Code muscles.
Git-owned artifacts (PROJECT.md, roadmap.md, per-phase
CONTEXT.md/RESEARCH.md/PLAN.md/VERIFICATION.md), tracker mirroring
(phase β milestone/epic/list, requirement β issue), a quick/standard/deep
depth dial, model routing for agent fan-out, and drift detection when plans
reference missing or unverified-closed issues.
Memory module β two tiers engineered against context rot. Tier 1: a
disposable SQLite FTS5 index outside the repo (bulk tool output, research
dumps β searchable, rebuildable, never in context wholesale). Tier 2:
git-committed memory cards, one fact each, with provenance + staleness
checking β recall diffs each card's source files against the recorded
commit and serves a STALE flag when the code moved. Memory can be wrong;
it can never silently lie.
Collaboration β the tracker's multi-user machinery, made lifecycle-aware:
unplanned-work surfacing (tracker issues no plan references), import
(reverse-mirror an existing epic/milestone/list into a cairn project),
assignee-aware claiming, and plans/cards that collaborate through ordinary
git PRs.
do docs draft fast help import map mark medic new
outlook peers plan probe profile recall remember resync
retro review route scout ship status summit survey thread
trace triage tune verify waypoint work β each a /cairn:<verb> command,
generated from the routing table.
The routing table is complete: the reserved verb set is now empty.
Server: 87 typed MCP tools, 3408 passing tests β counts move with each
tier and are measured in CI (env-gated live-backend
suites skip without creds) β four dependencies
(@modelcontextprotocol/client, @modelcontextprotocol/server,
better-sqlite3, zod). Fail loud, never
fake state.
Agents (2 live): the plugin's first agents/ dir β specialist roles
dispatched by existing verbs, zero new tools or verbs.
| Agent | Role | Dispatched by |
|---|---|---|
cairn-designer |
Turns a design question into a decided direction with artifacts β wireframes, design tokens (themes/default.css + tokens.json, always both), coded prototypes β inside a draft session, recording implements/decided-in map edges as it goes |
draft (non-trivial design questions) |
cairn-uat |
Proves shipped flows meet requirements, platform-aware β walks each flow as a user on a named viewport matrix, sweeps requirement traceability via map edges, hands fidelity divergence off to audit ui |
audit uat (acceptance walks), audit ui (fidelity checks) |
In Claude Code 2.1.275 or later, one step:
/plugin install cairn --marketplace eventually-consistent-code-org/cairn2
The marketplace entry pins a release tag, so the install (and claude plugin update) fetches a released tree, never main β see
Dev mode vs installed plugin.
Then the quickstart: credentials, cairn.json,
first phase.
Four prompts that exercise the core loop, in a repo with a cairn.json:
/cairn:new "my-service"β interview, roadmap, tracker milestones and issues for the first phase./cairn:plan 1then/cairn:work 1β research the phase, write PLAN.md, claim each issue, do the work, close on verified done./cairn:statusβ phases, issue states, planβtracker drift, unplanned commits, in one view./cairn:remember "the retry budget is 3 because the GitHub API throttles at 4"then/cairn:recall "retry budget"β a memory card with a source commit, and a recall that saysSTALEwhen that code moves.
The server speaks plain MCP over stdio and the verbs are markdown β cairn runs anywhere an MCP-capable harness does. One installer wires a project:
node setup/cairn-setup.mjs grok # Grok Build β reads .mcp.json + AGENTS.md directly
node setup/cairn-setup.mjs copilot # Copilot CLI β mcp-config.json, instructions, /cairn-* prompts
node setup/cairn-setup.mjs codex # Codex β config.toml merged, ~/.codex/prompts/cairn-* installed
node setup/cairn-setup.mjs gemini # Gemini CLI β settings.json + GEMINI.md + /cairn:* TOML commands
node setup/cairn-setup.mjs cursor # Cursor β .cursor/mcp.json + AGENTS.md + hooks port
node setup/cairn-setup.mjs opencode # OpenCode β opencode.json + /cairn-* commands
node setup/cairn-setup.mjs zed # Zed β .zed/settings.json context server + AGENTS.mdInstalls are stamped (.cairn-manifest.json: source version + date), and
node setup/cairn-setup.mjs <harness> --check compares every installed
surface against this clone's version β read-only, per-surface table,
non-zero exit when anything lags, so it can gate.
Every install gets the full 87-tool surface, the generated AGENTS.md verb
registry (from scripts/gen-agents.mjs, drift-checked in CI), and the verb
subroutines copied to .cairn/harness/ so any harness can execute them by
name ("run cairn status"). Honest capability table:
| Harness | Tools (87) | Verbs | Slash commands | Continuity/cost/observe hooks |
|---|---|---|---|---|
| Claude Code (plugin) | β | β | β
/cairn:* |
β |
| Grok Build | β | β by name | via its Claude-compat layer | untested β claims hook compat |
| Copilot CLI | β | β by name | β
/cairn-* prompt files |
β |
| Codex | β | β by name | β
/cairn-* prompts |
β |
| Gemini CLI | β | β by name | β
/cairn:* TOML commands |
β |
| Cursor | β | β by name | β | β continuity/leak-guard/observe (cost tracker Claude-only) |
| OpenCode | β | β by name | β
/cairn-* commands |
β |
| Zed | β | β by name | β | β |
The nearest substitutes are GSD/Buildomator-class planning flows, Superpowers, gstack, and claude-mem β file-based planning or memory layers for a single harness. Cairn covers the same ground with a server holding the mechanism and an external tracker holding work truth. Agent IDEs (Cursor, Copilot Workspace, Devin) are adjacent but do a different job β they are the coding environment; cairn is the work-management layer that rides along in it.
The full mechanism-by-mechanism table β with a last-verified date on every competitor claim β is maintained at docs/comparison.md. The evidence behind the review claims lives in the council case study.
GSD-class planning depth behind a per-verb /cairn:<verb> surface with a
trail-themed vocabulary β plus tracker truth and provenance-checked memory
the file-based flows can't hold, and the highest-value ideas from GSD's
community backlog and a five-competitor gap
analysis. See the
parity roadmap
and gap analysis
(both on the evals-archive branch, where the planning history lives).
| Stage | Scope | Status |
|---|---|---|
| P0βP4 | Server core: tracker, planning, memory, collaboration | β shipped |
| Tier 0 | Trailhead β /cairn entrypoint + routing skill |
β shipped |
| Tier A0 | Continuity β crash-proof auto-resume + recall index/timeline | β shipped |
| Tier A | Planning depth β scout auto fast resync route summit, TDD gates, stage-aware model routing |
β shipped |
| Tier B | mark waypoint retro distill brief tune, leak guard |
β shipped |
| Tier C1 | trace β persistent debugging sessions |
β shipped |
| Tier C2 | probe draft β spike/sketch sessions, session_landscape |
β shipped |
| Tier C3 | Audits & review governance β audit review, plan_check, audit_record |
β shipped |
| Tier D | triage β tracker-loop triage |
β shipped |
| Tier E | map thread profile medic backtrack, audit docs, status --stats |
β shipped |
| Tier F1 | basecamp β workspace awareness, focus switch, dispatch board |
β shipped |
| Tier F2 | peers β cross-AI review/plan convergence, adversarial judgment, outbound leak gate |
β shipped |
| Tier F3 | Frontend quality loop β cairn-designer + cairn-uat agents, design-token discipline, requirements traceability |
β shipped |
| P5β² | Dogfood gate β 1.x cutover β publish | β
shipped (2.0.0 β live dogfood + community-marketplace submission) |
| P5β³ | Per-verb surface β plugin cairn, 36 generated /cairn:<verb> shims, conformance check (f) |
β
shipped (2.0.0) |
| Fidelity | Tracker-mirror fidelity β inbound PM-delta ingest (plan_tracker_delta), outbound paper trail + Jira worklog (classic and scoped ATCTT tokens both auth cleanly β scoped tokens auto-route through Atlassian's cloud gateway, #49) |
β shipped |
| Eng. mode | user.mode vibe/engineer β work pairing, no-self-merge gate, decision surfacing |
β shipped |
P5β² status: the seven transition shims are gone, P5β³ replaced the
single /cairn2:cairn router with per-verb commands β the plugin is named
cairn and each live verb is a generated /cairn:<verb> shim
(scripts/gen-commands.mjs, enforced by check-surface) β and the
tracker-mirror fidelity + engineer-mode features are in (semi-live drill
records in VERIFICATION.md). Two gates remain, both owner actions:
(1) the live dogfood pass β a real session with the plugin installed,
running the Tier 0 drill (/cairn:new β plan β work β verify β ship,
/cairn:do, a typo'd verb, one waypoint resume) plus the fidelity and
engineer-mode checklists in VERIFICATION.md; (2) publish β swapping
cairn 1.x (and its /cairn:gsd passthrough) for cairn 2.0 in the plugin
marketplace. 2.0.0 follows both.
cd server
npm ci
npm test # unit + contract (no network)
npm run test:live # live contract vs a real backend (env-gated)
npm run buildAdapter live-status, tool reference, and artifact layout:
server/README.md. What the tests and guards
cannot check β what an agent actually does with a verb β lives in the
behavioral eval suite (claude plugin eval ., early access):
docs/EVALS.md.
Two ways to run cairn, deliberately different:
- Installed (released). The marketplace entry in
.claude-plugin/marketplace.jsonis a github source pinned to the release tag ("ref": "vX.Y.Z") β installs andclaude plugin updatefetch that released tree, never a mutable clone ofmain. The pin is the fourth surfacescripts/release.mjsbumps, andscripts/check-versions.mjsfails CI when it disagrees with the version files. Consequence: an installed plugin only moves when a release tag exists β installed = released, by design. - Dev (this repo).
.mcp.jsonlaunchesserver/dist/index.jsstraight from the working tree withserver/node_modulesfromnpm ciβ edits land on the next session restart, no release needed.
Why a root lockfile, not a bundle. Claude Code's plugin installer runs
npm install into the versioned plugin cache only when the plugin root
has package.json plus a lockfile β without one the cache gets no
node_modules and the MCP server dies at startup (ERR_MODULE_NOT_FOUND,
the 2026-08-13 incident). So the root package.json declares the server's
three runtime deps and package-lock.json pins them (~37 MB installed).
The bundle alternative was measured and rejected: esbuild collapses
server/dist (772 KB) to a single 881 KB file, but better-sqlite3 is a
native addon (better_sqlite3.node, ~12 MB) that can't be inlined β npm
install is required either way, so bundling buys complexity, not
self-containment. If you add a server runtime dep, mirror it in the root
package.json and refresh the root lockfile
(npm install --package-lock-only) β CI enforces the mirror.
server/ TypeScript MCP server (tracker adapters, planning, memory, core)
commands/ per-verb /cairn:<verb> shims β generated by scripts/gen-commands.mjs
skills/ cairn-planning, cairn-memory (policy; mechanism lives in the server)
templates/ cairn.json.example
docs/ quickstart, runbook, ADRs, architecture β see docs/README.md
(specs, plans, research and the eval suite: the evals-archive branch)
.mcp.json launches cairn-server for the plugin
The index is docs/README.md β architecture, ADRs, design
specs (umbrella design, parity roadmap, tier specs), implementation plans, and
competitive research. The spec/plan/research history and the
behavioral eval suite live on the orphan
evals-archive branch,
so the tree the marketplace ships is the plugin alone (#403).
Local-first: the server and hooks run on your machine, and data leaves it only to the tracker, docs connector, and peer CLIs you configure. No telemetry, no analytics, no account. What runs, what is stored where, what is sent, and how to remove it: PRIVACY.md.
- Error codes and fixes: runbook Β§11.
- Bugs and questions: GitHub issues.
- Security reports, privately: SECURITY.md.
MIT β same posture as 1.x: local-first, env-var-name-only secrets, data goes only to the tracker you configure.
