Force the cairn-direction question-asker / spec-tightener pipeline on the supplied prompt. Escape hatch when auto-invocation misses — e.g. the prompt is borderline conversational, or the operator wants to force tightening on a question-shaped message.
Adopt this project with Cairn — runs the one-time init pipeline inline.
Use when the operator opens Claude Code in a project that does not yet have a `.cairn/` directory and Cairn has not been declined for this project. Walks the operator through one-time adoption inline by driving the cairn_init_phase_* MCP tools as a state machine — each phase result is either a complete (advance) or needs_input (render AskUserQuestion, thread the answer back, re-invoke). Skip when `.cairn/` already exists, or when the operator has previously selected "never" for this project.
Use when the SessionStart context indicated `attention_count > 0` — pending DEC drafts in `_inbox/`, baseline sensor findings, or drift detected during the last GC sweep. Surfaces each item inline as A/B/C and resolves it through `cairn_resolve_attention`. Skip when the operator is in flight on a task; resume at the next idle moment.
Use when the SessionStart context flagged `bootstrap_required` for this clone — the project is cairn-adopted (`.cairn/config.yaml` present) but the local clone has not run the per-clone join step (no `core.hooksPath` set). Walks the operator through bootstrap inline by spawning the bundled `cli.mjs join` subprocess and surfacing the result. Skip when the SessionStart banner did not include the bootstrap warning.
Use when the operator's user message looks like a task — verbs like "build", "add", "fix", "refactor", "implement", "change", "rip out", "wire up" — and there is no active task already in flight for this session. Runs the question-asker / spec-tightener / dispatch pipeline: reads in-scope decisions and invariants, asks load-bearing questions if the prompt is ambiguous, writes a tightened spec, and dispatches one or more subagents via the Task tool. Skip for questions, read- only requests, conversational messages, and explicit one-shot operations the operator has already detailed.
Use when the operator asks to enable the cairn statusline badge (the `⬡ cairn …` summary in Claude Code's status row), or when the SessionStart context flags `statusline_unset`. Writes a user-level `~/.claude/settings.json` `statusLine` entry that resolves the active plugin bundle via a shim file the plugin's SessionStart hook keeps current. One-time setup; survives plugin upgrades because the shim file's path is stable.
Admin access level
Server config contains admin-level keywords
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Uses power tools
Uses Bash, Write, or Edit tools
Uses power tools
Uses Bash, Write, or Edit tools
Persistent ground truth for Claude Code. Stop AI agents from drifting.
/plugin marketplace add isaacriehm/cairn
/plugin install cairn@isaacriehm-cairn
/reload-plugins
Quick Start · Why · How It Works · Editor Extension · Multi-Dev · Docs
A cairn is a stack of stones marking a trail. This project stacks the decisions, invariants, and canonical references that define your codebase into a single queryable ground state — so every Claude Code session starts with the same map.
No more re-explaining the architecture. No more the agent picking the opposite of what you decided last week. No more "wait, where does X live?"
Inside Claude Code, in any project:
/plugin marketplace add isaacriehm/cairn
/plugin install cairn@isaacriehm-cairn
/reload-plugins
(First registers the GitHub repo as a marketplace; second installs the
plugin; third loads it. The plugin ships a self-contained bundle —
hooks, MCP server, and CLI all run from dist/cli.mjs inside the
plugin cache. No npx, no npm install -g, no PATH dependency.)
Open Claude Code in any project. The plugin auto-detects on session
start and offers [a] adopt now. Pick [a] once. Done.
If you want cairn directly on your shell PATH (for cairn doctor,
cairn attention, etc.):
npm install -g @isaacriehm/cairn
…but the plugin doesn't require it.
Adoption is a single visual pass — submodule init, repo walk, mapper, brand setup, doc ingestion, source-comment ingestion, rules merge, sensor sweep, multi-dev install. The plugin streams the output inline so you see what's happening. After it finishes, agents in your next session start with full ground state.
Outside Claude Code? Same thing via CLI:
npm install -g @isaacriehm/cairn
cairn init
I'm a solo developer. I let Claude Code drive most of my coding. The problem isn't that the model is bad — the problem is that every new session starts with no memory of what I decided yesterday. The agent picks an interpretation. Sometimes it's the one I wanted. Sometimes it re-debates a decision I already made and silently goes the wrong way.
The fix isn't a bigger context window. It's a structured, queryable ground state on disk that every session reads from + writes to. Cairn is that.
Three pillars:
You type a prompt
│
▼
┌───────────────────────────────────────────────┐
│ Plugin auto-invokes cairn-direction skill │
│ 1. Tier-0 classifier (Haiku) → ready? │
│ 2. If not ready → inline A/B/C questions │
│ 3. If ready → tightener (Sonnet) drafts spec│
│ 4. Spec dispatched to subagents │
└────────────────┬──────────────────────────────┘
▼
Subagents work in your repo with MCP access:
cairn_decisions_in_scope, cairn_invariant_get,
cairn_canonical_for_topic, cairn_search, …
│
▼
Reviewer subagent attests the diff,
extracts non-obvious decisions as drafts
│
▼
Stop hook surfaces inline:
"Review DEC-0099 draft? [a] accept [b] reject [c] edit"
│
▼
You commit → pre-commit hook runs sensors
→ CI gate verifies on PR
→ drift caught before merge
npx claudepluginhub isaacriehm/cairn --plugin cairnAccess thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
Feature development with code-architect/explorer/reviewer agents, CLAUDE.md audit and session learnings, and Agent Skills creation with eval benchmarking from Anthropic.
Production-grade engineering skills for AI coding agents — covering the full software development lifecycle from spec to ship.
Complete developer toolkit for Claude Code
Intelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.
Orchestrate multi-agent teams for parallel code review, hypothesis-driven debugging, and coordinated feature development using Claude Code's Agent Teams