Full graph
793 nodes in 40 communities, drawn by the graph engine. Hover a dot for its name.
Budget (src/cairn/router.py)
BudgetExceeded (src/cairn/router.py)
check() (src/cairn/drift.py)
_finding() (src/cairn/drift.py)
semantic() (src/cairn/drift.py)
dumps() (src/cairn/engines/chronicle.py)
facts_matching() (src/cairn/engines/chronicle.py)
ingest() (src/cairn/engines/history.py)
_is_ancestor() (src/cairn/engines/history.py)
_parse() (src/cairn/engines/history.py)
risk_tags() (src/cairn/engines/history.py)
install_git_hooks() (src/cairn/hooks.py)
_line() (src/cairn/hooks.py)
session_start() (src/cairn/hooks.py)
build() (src/cairn/mcp_server.py)
main() (src/cairn/mcp_server.py)
.charge() (src/cairn/router.py)
.check() (src/cairn/router.py)
.remaining() (src/cairn/router.py)
estimate_tokens() (src/cairn/router.py)
RuntimeError ()
capture.py (src/cairn/capture.py)
core.py (src/cairn/core.py)
drift.py (src/cairn/drift.py)
chronicle.py (src/cairn/engines/chronicle.py)
history.py (src/cairn/engines/history.py)
engines/__init__.py (src/cairn/engines/__init__.py)
journal.py (src/cairn/engines/journal.py)
mapper.py (src/cairn/engines/mapper.py)
memory.py (src/cairn/engines/memory.py)
hooks.py (src/cairn/hooks.py)
cairn/__init__.py (src/cairn/__init__.py)
mcp_server.py (src/cairn/mcp_server.py)
project.py (src/cairn/project.py)
router.py (src/cairn/router.py)
server.py (src/cairn/server.py)
store.py (src/cairn/store.py)
sync.py (src/cairn/sync.py)
Session capture: what agents do in this repository, recorded by the agent's own… (src/cairn/capture.py)
The Cairn facade: one object every surface (CLI, MCP, HTTP) talks to. The… (src/cairn/core.py)
Drift: where reality (code, history) disagrees with intent (specs).… (src/cairn/drift.py)
Deep tier: judge whether recently-changed code still satisfies its requirements. (src/cairn/drift.py)
Timeline layer (deep tier): a temporal fact graph built from episodes. Episodes… (src/cairn/engines/chronicle.py)
Deterministic lookup over mirrored facts (no model call at query time). (src/cairn/engines/chronicle.py)
Timeline layer (deterministic part): git history → events, file stats, co-… (src/cairn/engines/history.py)
Read new commits since the cursor. Returns stats. (src/cairn/engines/history.py)
Sessions layer: what agents did here, built from Cairn's own capture store… (src/cairn/engines/journal.py)
Map layer: the structural graph of code, docs, schemas and rationale.… (src/cairn/engines/mapper.py)
Memory layer: durable knowledge — conventions, decisions, gotchas, preferences,… (src/cairn/engines/memory.py)
Git hooks and agent hook entry points (session-start briefing, status line). (src/cairn/hooks.py)
Claude Code SessionStart hook: inject a compact project brief as additional… (src/cairn/hooks.py)
MCP server: eight tools, terse descriptions (tool schemas cost tokens on every… (src/cairn/mcp_server.py)
Repository discovery, paths and configuration. Everything Cairn knows about a… (src/cairn/project.py)
Model router: the right model for each job, with prompt caching, budgets and a… (src/cairn/router.py)
HTTP API + single-page UI, served by the local daemon (127.0.0.1 only). (src/cairn/server.py)
The Brain: one SQLite read model that every surface (CLI, MCP, HTTP/UI) reads… (src/cairn/store.py)
Sync orchestrator: fans out every layer in parallel, then links, checks drift… (src/cairn/sync.py)
asyncio ()
collections ()
collections_abc ()
concurrent_futures ()
contextlib ()
dataclasses ()
datetime ()
fastapi_responses ()
functools ()
itertools ()
json ()
logging ()
os ()
pathlib ()
re ()
shutil ()
sqlite3 ()
stat ()
subprocess ()
sys ()
threading ()
time ()
tomllib ()
typing ()
uuid ()
tempfile ()
MemoryStore (src/cairn/engines/memory.py)
SemanticMemory (src/cairn/engines/memory.py)
Project (src/cairn/project.py)
Router (src/cairn/router.py)
main_cb() (src/cairn/cli.py)
.__init__() (src/cairn/core.py)
origins() (src/cairn/engines/history.py)
.about() (src/cairn/engines/memory.py)
.__init__() (src/cairn/engines/memory.py)
.recall() (src/cairn/engines/memory.py)
.remember() (src/cairn/engines/memory.py)
.add() (src/cairn/engines/memory.py)
._engine() (src/cairn/engines/memory.py)
.history() (src/cairn/engines/memory.py)
.__init__() (src/cairn/engines/memory.py)
.ready() (src/cairn/engines/memory.py)
.search() (src/cairn/engines/memory.py)
find_root() (src/cairn/project.py)
_merge() (src/cairn/project.py)
.cfg() (src/cairn/project.py)
.config_path() (src/cairn/project.py)
.db_path() (src/cairn/project.py)
.dir() (src/cairn/project.py)
.discover() (src/cairn/project.py)
.ensure_dir() (src/cairn/project.py)
.git() (src/cairn/project.py)
.id() (src/cairn/project.py)
.initialized() (src/cairn/project.py)
.is_git() (src/cairn/project.py)
.map_dir() (src/cairn/project.py)
.map_json() (src/cairn/project.py)
.rel() (src/cairn/project.py)
.reload() (src/cairn/project.py)
resolve_provider() (src/cairn/router.py)
._anthropic() (src/cairn/router.py)
.api_key() (src/cairn/router.py)
._claude_code() (src/cairn/router.py)
.complete() (src/cairn/router.py)
.deep_enabled() (src/cairn/router.py)
.__init__() (src/cairn/router.py)
.model() (src/cairn/router.py)
._openai() (src/cairn/router.py)
.table() (src/cairn/router.py)
.tier_for() (src/cairn/router.py)
test_installed_agents_reads_configs() (tests/test_surfaces.py)
test_uninstall_removes_only_ours() (tests/test_surfaces.py)
callback ()
Context ()
Any ()
Path ()
R3 Temporal fact graph (specs/001-cairn-core/research.md)
Commits that shaped a file (or a line range): who introduced it and who last… (src/cairn/engines/history.py)
Memories linked to (or mentioning) any of these symbols/files. (src/cairn/engines/memory.py)
Adapter around the semantic memory engine. Lazily constructed; failures never… (src/cairn/engines/memory.py)
Run git in the repo; return stdout ('' on failure). (src/cairn/project.py)
Return the git work-tree root containing ``start`` (or None). (src/cairn/project.py)
Stable project id used to namespace shared stores. (src/cairn/project.py)
Run one completion. ``cached_context`` is sent as a prompt-cached block (stable… (src/cairn/router.py)
One isolated, tool-less turn through the signed-in Claude Code CLI (the user's… (src/cairn/router.py)
`auto` picks, in order: an Anthropic key, an OpenAI-compatible key or endpoint,… (src/cairn/router.py)
Brain (src/cairn/store.py)
recent_for() (src/cairn/engines/history.py)
risky_for() (src/cairn/engines/history.py)
for_files() (src/cairn/engines/journal.py)
.add_events() (src/cairn/store.py)
.add_memory() (src/cairn/store.py)
.by_path() (src/cairn/store.py)
.close() (src/cairn/store.py)
.cochanged() (src/cairn/store.py)
.counts() (src/cairn/store.py)
.drop_source() (src/cairn/store.py)
.entities() (src/cairn/store.py)
.entity() (src/cairn/store.py)
.events() (src/cairn/store.py)
.filestat() (src/cairn/store.py)
.forget() (src/cairn/store.py)
.get_kv() (src/cairn/store.py)
.__init__() (src/cairn/store.py)
.ledger() (src/cairn/store.py)
.link() (src/cairn/store.py)
.links_from() (src/cairn/store.py)
.links_to() (src/cairn/store.py)
.log_call() (src/cairn/store.py)
.log_query() (src/cairn/store.py)
.memories() (src/cairn/store.py)
.memory() (src/cairn/store.py)
.one() (src/cairn/store.py)
.put_entities() (src/cairn/store.py)
.put_entity() (src/cairn/store.py)
.q() (src/cairn/store.py)
.queries() (src/cairn/store.py)
.query_totals() (src/cairn/store.py)
.search() (src/cairn/store.py)
.set_kv() (src/cairn/store.py)
.tx() (src/cairn/store.py)
_ent() (src/cairn/store.py)
fts_query() (src/cairn/store.py)
searchable() (src/cairn/store.py)
test_store_search_and_memory() (tests/test_core.py)
Connection ()
Any ()
Path ()
Row ()
Consequences (docs/adr/0001-unified-read-model.md)
http.md (specs/001-cairn-core/contracts/http.md)
HTTP contract (daemon, `127.0.0.1:4747`) (specs/001-cairn-core/contracts/http.md)
Canonical ids (specs/001-cairn-core/data-model.md)
Data Model: Cairn read model (`.cairn/brain.db`) (specs/001-cairn-core/data-model.md)
Link rules (linker) (specs/001-cairn-core/data-model.md)
State transitions (specs/001-cairn-core/data-model.md)
R7 Model routing & cost (specs/001-cairn-core/research.md)
Past fixes / reverts / incidents that touched these files — the 'historical… (src/cairn/engines/history.py)
Recent agent observations that read or modified these files. (src/cairn/engines/journal.py)
Upsert (id, kind, name, path, meta, source, searchable_body) rows in one… (src/cairn/store.py)
Remove what a sync source produced last time, so re-ingest is exact (no stale… (src/cairn/store.py)
Upsert (src, dst, rel, provenance, confidence, source) links. (src/cairn/store.py)
Record one context pack handed to a reader. ``source_tokens`` is the size of… (src/cairn/store.py)
Expand identifiers so 'processPayment' and 'process_payment' match 'process… (src/cairn/store.py)
Thread-safe facade over the read model. (src/cairn/store.py)
Edge (src/cairn/engines/mapper.py)
MapIndex (src/cairn/engines/mapper.py)
.map() (src/cairn/core.py)
.remember() (src/cairn/core.py)
build() (src/cairn/engines/mapper.py)
_components() (src/cairn/engines/mapper.py)
_engine() (src/cairn/engines/mapper.py)
engine_text() (src/cairn/engines/mapper.py)
ensure_ignores() (src/cairn/engines/mapper.py)
index() (src/cairn/engines/mapper.py)
key() (src/cairn/engines/mapper.py)
.area_graph() (src/cairn/engines/mapper.py)
.area_members() (src/cairn/engines/mapper.py)
.areas() (src/cairn/engines/mapper.py)
.degree() (src/cairn/engines/mapper.py)
.dependencies() (src/cairn/engines/mapper.py)
.dependents() (src/cairn/engines/mapper.py)
.describe() (src/cairn/engines/mapper.py)
.edge_count() (src/cairn/engines/mapper.py)
.file_graph() (src/cairn/engines/mapper.py)
.file_of() (src/cairn/engines/mapper.py)
.hubs() (src/cairn/engines/mapper.py)
.is_code() (src/cairn/engines/mapper.py)
.label() (src/cairn/engines/mapper.py)
.languages() (src/cairn/engines/mapper.py)
.__len__() (src/cairn/engines/mapper.py)
._line() (src/cairn/engines/mapper.py)
.load() (src/cairn/engines/mapper.py)
.members() (src/cairn/engines/mapper.py)
.rationale() (src/cairn/engines/mapper.py)
add() (src/cairn/engines/mapper.py)
.resolve() (src/cairn/engines/mapper.py)
._span() (src/cairn/engines/mapper.py)
ingest_map() (src/cairn/linker.py)
link_text() (src/cairn/linker.py)
mention_index() (src/cairn/linker.py)
relink_memories() (src/cairn/linker.py)
CompletedProcess ()
Path ()
linker.py (src/cairn/linker.py)
Map a user string (id, path, label, Class.method, partial) to node ids, best… (src/cairn/engines/mapper.py)
Symbols structurally inside a node (a file's classes/functions, a class's… (src/cairn/engines/mapper.py)
Reverse traversal: who breaks if ``targets`` change. BFS with depth and… (src/cairn/engines/mapper.py)
(file, first line, last line) of a symbol: up to the next symbol that starts… (src/cairn/engines/mapper.py)
`# WHY:`/`# NOTE:` comments, docstrings and design-doc refs attached to these… (src/cairn/engines/mapper.py)
Communities as nodes, aggregated cross-community dependency edges — the UI… (src/cairn/engines/mapper.py)
Normalise a label for lookup: '.send()' / 'send()' / 'Send' -> 'send'. (src/cairn/engines/mapper.py)
Code files (or their folders, past ``max_files``) and the cross-file… (src/cairn/engines/mapper.py)
Strongly connected components (iterative Tarjan). Component ids come out in… (src/cairn/engines/mapper.py)
Process-wide cached index; reloads only when the map file changes. (src/cairn/engines/mapper.py)
Incrementally (re)build the map. Deterministic, local, no model calls. (src/cairn/engines/mapper.py)
Run a read-only map query (path/explain/query) and return its text. (src/cairn/engines/mapper.py)
Linker: resolves the same thing across layers into one registry. Deterministic… (src/cairn/linker.py)
Mirror map files/symbols/rationale into the read model when the map changed. (src/cairn/linker.py)
Labels specific enough to link free text to code (≥4 chars, not generic, ≤3… (src/cairn/linker.py)
Link an entity (memory/fact) to files/symbols it mentions. (src/cairn/linker.py)
.available() (src/cairn/router.py)
spawn_background() (src/cairn/sync.py)
_hook() (tests/test_core.py)
test_brief_is_small() (tests/test_core.py)
test_budget_is_respected() (tests/test_core.py)
test_capture_groups_turns_and_finishes_them_on_the_next_sync() (tests/test_core.py)
test_capture_hook_is_light_and_never_fails() (tests/test_core.py)
test_capture_is_silent_outside_cairn_repos_and_when_disabled() (tests/test_core.py)
test_capture_records_prompts_files_and_commands() (tests/test_core.py)
test_context_infers_targets() (tests/test_core.py)
test_drift_ids_are_stable_across_processes() (tests/test_core.py)
test_drift_record_is_idempotent_and_keeps_first_seen() (tests/test_core.py)
test_file_graph_layers_and_cycles() (tests/test_core.py)
test_impact_has_dependents_warnings_and_owners() (tests/test_core.py)
test_memory_links_to_code() (tests/test_core.py)
test_only_packs_handed_out_are_logged() (tests/test_core.py)
test_pack_accounting_matches_render_and_logs_once() (tests/test_core.py)
test_risk_tags() (tests/test_core.py)
test_source_cost_counts_existing_files_once() (tests/test_core.py)
test_specs_parser_and_drift() (tests/test_core.py)
test_sync_builds_all_layers() (tests/test_core.py)
test_sync_links_summary_names_what_it_counts() (tests/test_core.py)
test_why_includes_rationale_and_origin() (tests/test_core.py)
test_wrapped_requirements_are_read_whole() (tests/test_core.py)
test_cli_json_is_counted_and_stays_lean() (tests/test_surfaces.py)
test_doctor_shows_bracketed_fixes_and_wired_agents() (tests/test_surfaces.py)
test_hooks_output() (tests/test_surfaces.py)
test_http_api() (tests/test_surfaces.py)
test_http_views_for_the_page() (tests/test_surfaces.py)
test_init_is_zero_prompt_and_idempotent() (tests/test_surfaces.py)
test_mcp_tool_calls_count_as_agent_context() (tests/test_surfaces.py)
test_mcp_tools() (tests/test_surfaces.py)
test_session_briefing_counts_as_cost() (tests/test_surfaces.py)
test_status_and_questions_via_cli() (tests/test_surfaces.py)
test_statusline_shows_spec_number() (tests/test_surfaces.py)
test_core.py (tests/test_core.py)
test_surfaces.py (tests/test_surfaces.py)
analysis.md (specs/001-cairn-core/analysis.md)
Analysis: 001-cairn-core (cross-artifact consistency) (specs/001-cairn-core/analysis.md)
Consistency findings (specs/001-cairn-core/analysis.md)
Measured (httpx, 101 source files, shallow 50 commits; sandbox CPU) (specs/001-cairn-core/analysis.md)
Requirement coverage (specs/001-cairn-core/analysis.md)
Fire-and-forget sync (used by git hooks). Never blocks the developer. (src/cairn/sync.py)
Store, history, specs, drift, memory, linker and the context assembler. (tests/test_core.py)
Runs on every tool call: standard library only, and bad input must not break… (tests/test_core.py)
Finding ids must not depend on PYTHONHASHSEED, or every sync re-records every… (tests/test_core.py)
CLI (zero-prompt, idempotent init), agents, hooks, HTTP API and MCP tools. (tests/test_surfaces.py)
typer_testing ()
Cairn (src/cairn/core.py)
Item (src/cairn/core.py)
Pack (src/cairn/core.py)
Target (src/cairn/core.py)
.active_spec() (src/cairn/core.py)
.agent_activity() (src/cairn/core.py)
.architecture() (src/cairn/core.py)
roll() (src/cairn/core.py)
.ask() (src/cairn/core.py)
.brief() (src/cairn/core.py)
.budget_default() (src/cairn/core.py)
._cited_files() (src/cairn/core.py)
.context() (src/cairn/core.py)
._facts() (src/cairn/core.py)
.impact() (src/cairn/core.py)
.infer_targets() (src/cairn/core.py)
._intent() (src/cairn/core.py)
._logger() (src/cairn/core.py)
log() (src/cairn/core.py)
._memories() (src/cairn/core.py)
.narrate() (src/cairn/core.py)
.overview() (src/cairn/core.py)
.resolve() (src/cairn/core.py)
.savings() (src/cairn/core.py)
.search() (src/cairn/core.py)
._sessions() (src/cairn/core.py)
.source_cost() (src/cairn/core.py)
.why() (src/cairn/core.py)
day() (src/cairn/core.py)
.line() (src/cairn/core.py)
.accounting() (src/cairn/core.py)
.mark_sent() (src/cairn/core.py)
.render() (src/cairn/core.py)
.sections() (src/cairn/core.py)
._select() (src/cairn/core.py)
_recency() (src/cairn/core.py)
.found() (src/cairn/core.py)
Constitution Check (specs/001-cairn-core/plan.md)
This pack reached a reader as ``tokens`` tokens. Only the first delivery is… (src/cairn/core.py)
What the budget kept and dropped, per section — the same selection `render`… (src/cairn/core.py)
Estimated tokens (bytes / 4, the same rule packs use) of the repo files behind… (src/cairn/core.py)
Spec documents behind intent citations (task -> tasks.md, requirement/story ->… (src/cairn/core.py)
Optional deep-tier summary on top of a deterministic pack. (src/cairn/core.py)
Compact, stable project briefing — used at agent session start and as a cached… (src/cairn/core.py)
The file graph, with what the other layers know about each file. (src/cairn/core.py)
What agents did here, from Cairn's own session capture. (src/cairn/core.py)
Every pack handed out, with the size of the source files it summarised. (src/cairn/core.py)
CONTRIBUTING.md (CONTRIBUTING.md)
Code map (CONTRIBUTING.md)
Contributing (CONTRIBUTING.md)
How we work (CONTRIBUTING.md)
Rules of thumb (CONTRIBUTING.md)
agents.md (docs/agents.md)
Agent integrations (docs/agents.md)
Session capture (docs/agents.md)
Sub-agents (Claude Code), tiered by model (docs/agents.md)
docs/cli.md (docs/cli.md)
CLI reference (docs/cli.md)
Map (docs/cli.md)
Memory, timeline, sessions (docs/cli.md)
Questions (docs/cli.md)
Servers and agents (docs/cli.md)
Setup and health (docs/cli.md)
Specs (docs/cli.md)
configuration.md (docs/configuration.md)
Configuration (docs/configuration.md)
docs/mcp.md (docs/mcp.md)
models-and-cost.md (docs/models-and-cost.md)
Keeping tokens down (docs/models-and-cost.md)
Ledger (docs/models-and-cost.md)
Models and cost (docs/models-and-cost.md)
Routing (docs/models-and-cost.md)
README.md (README.md)
And over time (README.md)
Cairn (README.md)
Commands (README.md)
Documentation (README.md)
Install options (README.md)
Licence (README.md)
The terminal (README.md)
What you get on day one (no API key) (README.md)
Why (README.md)
plan.md (specs/001-cairn-core/plan.md)
Complexity Tracking (specs/001-cairn-core/plan.md)
Documentation (this feature) (specs/001-cairn-core/plan.md)
Implementation Plan: Cairn Core (specs/001-cairn-core/plan.md)
Project Structure (specs/001-cairn-core/plan.md)
Source Code (repository root) (specs/001-cairn-core/plan.md)
Summary (specs/001-cairn-core/plan.md)
Technical Context (specs/001-cairn-core/plan.md)
spec.md (specs/001-cairn-core/spec.md)
command() (src/cairn/agents.py)
agents_install() (src/cairn/cli.py)
agents_list() (src/cairn/cli.py)
areas() (src/cairn/cli.py)
brief() (src/cairn/cli.py)
_cairn() (src/cairn/cli.py)
forget() (src/cairn/cli.py)
hook() (src/cairn/cli.py)
hubs() (src/cairn/cli.py)
memories() (src/cairn/cli.py)
prs() (src/cairn/cli.py)
remember() (src/cairn/cli.py)
serve() (src/cairn/cli.py)
spec_new() (src/cairn/cli.py)
statusline() (src/cairn/cli.py)
timeline() (src/cairn/cli.py)
trace_explain() (src/cairn/cli.py)
trace_path() (src/cairn/cli.py)
trace_query() (src/cairn/cli.py)
statusline() (src/cairn/hooks.py)
How agents launch the MCP server. Prefer the portable `cairn` on PATH. (src/cairn/agents.py)
The compact project briefing agents receive at session start. (src/cairn/cli.py)
Shortest path between two things in the map. (src/cairn/cli.py)
A node and its neighbourhood. (src/cairn/cli.py)
Scoped subgraph for a plain-language question. (src/cairn/cli.py)
The most-connected code: what everything flows through. (src/cairn/cli.py)
Subsystems detected in the map. (src/cairn/cli.py)
Open pull requests with their map impact (needs the GitHub CLI). (src/cairn/cli.py)
Create a new feature folder (then run /cairn.specify in your agent). (src/cairn/cli.py)
Teach every agent something durable. (src/cairn/cli.py)
Forget a memory (soft delete). (src/cairn/cli.py)
What happened: commits, spec progress, sessions, decisions, facts, drift. (src/cairn/cli.py)
Wire agents to Cairn (idempotent). (src/cairn/cli.py)
One line for the agent status bar: layers, active spec, drift, model. (src/cairn/hooks.py)
create_app() (src/cairn/server.py)
add_memory() (src/cairn/server.py)
agent_activity() (src/cairn/server.py)
architecture() (src/cairn/server.py)
ask() (src/cairn/server.py)
brief() (src/cairn/server.py)
broadcast() (src/cairn/server.py)
drift() (src/cairn/server.py)
entity() (src/cairn/server.py)
forget() (src/cairn/server.py)
health() (src/cairn/server.py)
impact() (src/cairn/server.py)
index() (src/cairn/server.py)
lifespan() (src/cairn/server.py)
map_() (src/cairn/server.py)
memories() (src/cairn/server.py)
models() (src/cairn/server.py)
overview() (src/cairn/server.py)
_pack() (src/cairn/server.py)
savings() (src/cairn/server.py)
search() (src/cairn/server.py)
sessions() (src/cairn/server.py)
specs() (src/cairn/server.py)
start_sync() (src/cairn/server.py)
work() (src/cairn/server.py)
stream() (src/cairn/server.py)
gen() (src/cairn/server.py)
timeline() (src/cairn/server.py)
why() (src/cairn/server.py)
serve() (src/cairn/server.py)
FastAPI ()
Chronicle (src/cairn/engines/chronicle.py)
._driver() (src/cairn/engines/chronicle.py)
.engine() (src/cairn/engines/chronicle.py)
.ingest() (src/cairn/engines/chronicle.py)
.__init__() (src/cairn/engines/chronicle.py)
._mirror() (src/cairn/engines/chronicle.py)
.pending_episodes() (src/cairn/engines/chronicle.py)
.search() (src/cairn/engines/chronicle.py)
_lexical_reranker() (src/cairn/engines/chronicle.py)
rank() (src/cairn/engines/chronicle.py)
_local_embedder() (src/cairn/engines/chronicle.py)
create() (src/cairn/engines/chronicle.py)
create_batch() (src/cairn/engines/chronicle.py)
__init__() (src/cairn/engines/chronicle.py)
.name() (src/cairn/project.py)
locked() (src/cairn/sync.py)
run() (src/cairn/sync.py)
do_deep() (src/cairn/sync.py)
do_drift() (src/cairn/sync.py)
do_map() (src/cairn/sync.py)
step() (src/cairn/sync.py)
_summary() (src/cairn/sync.py)
Progress ()
Deterministic episode construction from the read model since the cursor. (src/cairn/engines/chronicle.py)
_enabled() (src/cairn/capture.py)
events_for() (src/cairn/capture.py)
find_root() (src/cairn/capture.py)
main() (src/cairn/capture.py)
record() (src/cairn/capture.py)
redact() (src/cairn/capture.py)
mask() (src/cairn/capture.py)
_rel() (src/cairn/capture.py)
store_path() (src/cairn/capture.py)
available() (src/cairn/engines/journal.py)
ingest() (src/cairn/engines/journal.py)
_kind() (src/cairn/engines/journal.py)
_migrate() (src/cairn/engines/journal.py)
_turns() (src/cairn/engines/journal.py)
test_session_paths_keep_dotfolders() (tests/test_core.py)
Path ()
Row ()
Append the events for one hook call. Returns how many rows were written. (src/cairn/capture.py)
The repository Cairn is set up in: the nearest folder holding `.cairn/`. (src/cairn/capture.py)
Drop values that look like credentials before anything is stored. (src/cairn/capture.py)
One hook payload as store rows (ts, session, kind, tool, detail, path). (src/cairn/capture.py)
`[sessions] capture = false` in .cairn/config.toml turns capture off. (src/cairn/capture.py)
Something has been captured in this repository. (src/cairn/engines/journal.py)
Rows from the external capture tool used before 0.2 are replaced by Cairn's own. (src/cairn/engines/journal.py)
0001-unified-read-model.md (docs/adr/0001-unified-read-model.md)
ADR-0001: One read model for every surface (docs/adr/0001-unified-read-model.md)
Context (docs/adr/0001-unified-read-model.md)
Decision (docs/adr/0001-unified-read-model.md)
Options considered (docs/adr/0001-unified-read-model.md)
0002-deterministic-first.md (docs/adr/0002-deterministic-first.md)
ADR-0002: Deterministic first, models second (docs/adr/0002-deterministic-first.md)
Consequences (docs/adr/0002-deterministic-first.md)
Context (docs/adr/0002-deterministic-first.md)
Decision (docs/adr/0002-deterministic-first.md)
0005-invisible-engines.md (docs/adr/0005-invisible-engines.md)
ADR-0005: One product, invisible engines (docs/adr/0005-invisible-engines.md)
Context (docs/adr/0005-invisible-engines.md)
Decision (docs/adr/0005-invisible-engines.md)
Exceptions, stated honestly (docs/adr/0005-invisible-engines.md)
architecture.md (docs/architecture.md)
Architecture (docs/architecture.md)
Canonical ids (docs/architecture.md)
Data flow of a sync (docs/architecture.md)
Principles in code (docs/architecture.md)
Shape (docs/architecture.md)
The context assembler (docs/architecture.md)
data-model.md (specs/001-cairn-core/data-model.md)
.here() (src/cairn/core.py)
_cairn() (src/cairn/mcp_server.py)
cairn_recall() (src/cairn/mcp_server.py)
cairn_remember() (src/cairn/mcp_server.py)
cairn_search() (src/cairn/mcp_server.py)
cairn_specs() (src/cairn/mcp_server.py)
cairn_trace() (src/cairn/mcp_server.py)
Path ()
claude/commands/remember.md (src/cairn/templates/claude/commands/remember.md)
drift.md (src/cairn/templates/claude/commands/drift.md)
cairn-architect.md (src/cairn/templates/claude/agents/cairn-architect.md)
cairn-implementer.md (src/cairn/templates/claude/agents/cairn-implementer.md)
cairn-reviewer.md (src/cairn/templates/claude/agents/cairn-reviewer.md)
MCP tools (docs/mcp.md)
contracts/mcp.md (specs/001-cairn-core/contracts/mcp.md)
MCP contract (server name `cairn`, stdio) (specs/001-cairn-core/contracts/mcp.md)
Search across layers. kinds ⊆ symbol,file,spec,task,req,commit,memory,obs,fact. (src/cairn/mcp_server.py)
Explore the code map. mode: 'explain' (a node and its neighbours), 'path'… (src/cairn/mcp_server.py)
Spec board (features, stories, task progress, file trace) or, with drift=true,… (src/cairn/mcp_server.py)
Store a durable learning. kind: convention|decision|gotcha|preference|fact. One… (src/cairn/mcp_server.py)
Recall team memories (and related session learnings) about a topic. (src/cairn/mcp_server.py)
bootstrap() (src/cairn/engines/specs.py)
cli() (src/cairn/engines/specs.py)
constitution() (src/cairn/engines/specs.py)
features() (src/cairn/engines/specs.py)
ingest() (src/cairn/engines/specs.py)
initialized() (src/cairn/engines/specs.py)
install_extension() (src/cairn/engines/specs.py)
new_feature() (src/cairn/engines/specs.py)
parse_feature() (src/cairn/engines/specs.py)
paths_in() (src/cairn/engines/specs.py)
_read() (src/cairn/engines/specs.py)
_unwrap() (src/cairn/engines/specs.py)
specs.py (src/cairn/engines/specs.py)
Path ()
Specs layer: intent. Bootstraps the spec-driven workflow and parses its… (src/cairn/engines/specs.py)
Parse all features into the read model. Skips work when artifacts are unchanged. (src/cairn/engines/specs.py)
How to invoke the workflow CLI: installed binary, else uvx from source, else… (src/cairn/engines/specs.py)
Add the workflow to the repo without touching existing files. (src/cairn/engines/specs.py)
Register Cairn's hooks/commands inside the workflow (idempotent). (src/cairn/engines/specs.py)
Lines, with a list item's indented continuation lines joined back onto it. (src/cairn/engines/specs.py)
hashlib ()
brand() (src/cairn/cli.py)
init() (src/cairn/cli.py)
models() (src/cairn/cli.py)
run_init() (src/cairn/cli.py)
mark() (src/cairn/cli.py)
prog() (src/cairn/cli.py)
view() (src/cairn/cli.py)
status() (src/cairn/cli.py)
stones() (src/cairn/cli.py)
sync_cmd() (src/cairn/cli.py)
prog() (src/cairn/cli.py)
Table ()
Text ()
The five layers as a stacked cairn: filled stones are connected, sized by… (src/cairn/cli.py)
One-command setup for a new or existing repository. Idempotent. (src/cairn/cli.py)
Health of every layer, active spec, drift and the UI address. (src/cairn/cli.py)
Refresh every layer in parallel (incremental), link, check drift. (src/cairn/cli.py)
Which model does which job, and what it cost. (src/cairn/cli.py)
cairn_context() (src/cairn/mcp_server.py)
cairn_impact() (src/cairn/mcp_server.py)
cairn_why() (src/cairn/mcp_server.py)
why.md (src/cairn/templates/claude/commands/why.md)
impact.md (src/cairn/templates/claude/commands/impact.md)
ask.md (src/cairn/templates/claude/commands/ask.md)
cairn-scout.md (src/cairn/templates/claude/agents/cairn-scout.md)
AGENTS.md (AGENTS.md)
Cairn — project memory (AGENTS.md)
CLAUDE.md (CLAUDE.md)
Cairn — project memory (CLAUDE.md)
User Story 5 — Memory that compounds (Priority: P2) (specs/001-cairn-core/spec.md)
instructions.md (src/cairn/templates/instructions.md)
Cairn — project memory (src/cairn/templates/instructions.md)
Call first. Ranked, cited context for a task: dependents, co-change, past… (src/cairn/mcp_server.py)
What breaks if a file/symbol changes (e.g. 'src/pay.py', 'Client.send'): risk,… (src/cairn/mcp_server.py)
Why code is the way it is: rationale comments, origin commits, spec… (src/cairn/mcp_server.py)
_capture_cmd() (src/cairn/agents.py)
detect() (src/cairn/agents.py)
_hook_cmd() (src/cairn/agents.py)
install() (src/cairn/agents.py)
note() (src/cairn/agents.py)
settings() (src/cairn/agents.py)
installed() (src/cairn/agents.py)
merge_json() (src/cairn/agents.py)
remove_block() (src/cairn/agents.py)
uninstall() (src/cairn/agents.py)
clean() (src/cairn/agents.py)
upsert_block() (src/cairn/agents.py)
write_generated() (src/cairn/agents.py)
agents.py (src/cairn/agents.py)
Path ()
Agent integrations: one MCP server + generated instructions, per detected… (src/cairn/agents.py)
Agents whose config actually launches the Cairn MCP server (not merely… (src/cairn/agents.py)
Assumptions (specs/001-cairn-core/spec.md)
Clarifications (specs/001-cairn-core/spec.md)
Edge Cases (specs/001-cairn-core/spec.md)
Feature Specification: Cairn Core — the engineering brain (specs/001-cairn-core/spec.md)
Functional Requirements (specs/001-cairn-core/spec.md)
Key Entities (specs/001-cairn-core/spec.md)
Measurable Outcomes (specs/001-cairn-core/spec.md)
Requirements *(mandatory)* (specs/001-cairn-core/spec.md)
Session 2026-09-24 (specs/001-cairn-core/spec.md)
Success Criteria *(mandatory)* (specs/001-cairn-core/spec.md)
User Scenarios & Testing *(mandatory)* (specs/001-cairn-core/spec.md)
User Story 2 — "What breaks if I change this?" (Priority: P1) (specs/001-cairn-core/spec.md)
User Story 3 — "Why is this code like this?" (Priority: P2) (specs/001-cairn-core/spec.md)
User Story 4 — Spec-driven work with memory (Priority: P2) (specs/001-cairn-core/spec.md)
User Story 6 — One page to see everything (Priority: P2) (specs/001-cairn-core/spec.md)
User Story 7 — Premium agent experience everywhere (Priority: P3) (specs/001-cairn-core/spec.md)
User Story 8 — Deep tier when a key is present (Priority: P3) (specs/001-cairn-core/spec.md)
_ago() (src/cairn/cli.py)
main() (src/cairn/cli.py)
mcp() (src/cairn/cli.py)
ago() (src/cairn/core.py)
cli.py (src/cairn/cli.py)
__main__.py (src/cairn/__main__.py)
The terminal experience. `cairn` alone does the right thing: set up, or show… (src/cairn/cli.py)
Run the MCP server on stdio (agents launch this). (src/cairn/cli.py)
rich_console ()
rich_live ()
rich_panel ()
rich_table ()
rich_text ()
typer ()
webbrowser ()
tasks.md (specs/001-cairn-core/tasks.md)
Converge (remaining work, appended by T043) (specs/001-cairn-core/tasks.md)
Dependencies (specs/001-cairn-core/tasks.md)
Phase 10: US8 — Deep tier (P3) (specs/001-cairn-core/tasks.md)
Phase 11: Polish (specs/001-cairn-core/tasks.md)
Phase 1: Setup (specs/001-cairn-core/tasks.md)
Phase 2: Foundational (blocks all stories) (specs/001-cairn-core/tasks.md)
Phase 3: US1 — One command on an existing repo (P1) 🎯 MVP (specs/001-cairn-core/tasks.md)
Phase 4: US2 — Impact (P1) (specs/001-cairn-core/tasks.md)
Phase 5: US3 — Why (P2) (specs/001-cairn-core/tasks.md)
Phase 6: US4 — Spec-driven work with memory (P2) (specs/001-cairn-core/tasks.md)
Phase 7: US5 — Memory that compounds (P2) (specs/001-cairn-core/tasks.md)
Phase 8: US6 — One page (P2) (specs/001-cairn-core/tasks.md)
Phase 9: US7 — Premium agent experience (P3) (specs/001-cairn-core/tasks.md)
Tasks: Cairn Core (specs/001-cairn-core/tasks.md)
cairn() (tests/conftest.py)
commit() (tests/conftest.py)
git() (tests/conftest.py)
repo() (tests/conftest.py)
fixture ()
conftest.py (tests/conftest.py)
Path ()
contracts/cli.md (specs/001-cairn-core/contracts/cli.md)
CLI contract (specs/001-cairn-core/contracts/cli.md)
User Story 1 — One command on an existing repo (Priority: P1) (specs/001-cairn-core/spec.md)
Test harness: throwaway git repos with realistic history. No network, no model… (tests/conftest.py)
# WHY: the provider retries on timeout, so every call carries an idempotency… (tests/conftest.py)
pytest ()
ui() (src/cairn/cli.py)
up() (src/cairn/cli.py)
_free() (src/cairn/daemon.py)
_health() (src/cairn/daemon.py)
info() (src/cairn/daemon.py)
start() (src/cairn/daemon.py)
daemon.py (src/cairn/daemon.py)
Open the single-page UI (starts the local server if needed). (src/cairn/cli.py)
Start the local server in the background. (src/cairn/cli.py)
Background daemon lifecycle: one local server per repository, loopback only. (src/cairn/daemon.py)
signal ()
socket ()
urllib_request ()
0006-built-in-session-capture.md (docs/adr/0006-built-in-session-capture.md)
ADR-0006: Session capture is built in (docs/adr/0006-built-in-session-capture.md)
Consequences (docs/adr/0006-built-in-session-capture.md)
Context (docs/adr/0006-built-in-session-capture.md)
Decision (docs/adr/0006-built-in-session-capture.md)
research.md (specs/001-cairn-core/research.md)
R1 Code map engine output (specs/001-cairn-core/research.md)
R2 Spec workflow integration (specs/001-cairn-core/research.md)
R4 Semantic memory (specs/001-cairn-core/research.md)
R5 Session capture (specs/001-cairn-core/research.md)
R6 MCP SDK (specs/001-cairn-core/research.md)
R8 UI (specs/001-cairn-core/research.md)
Research: Cairn Core (specs/001-cairn-core/research.md)
ask() (src/cairn/cli.py)
_emit_pack() (src/cairn/cli.py)
impact() (src/cairn/cli.py)
_narrate() (src/cairn/cli.py)
_need_init() (src/cairn/cli.py)
render_pack() (src/cairn/cli.py)
why() (src/cairn/cli.py)
What breaks if this changes. (src/cairn/cli.py)
Why this code is the way it is. (src/cairn/cli.py)
Ask the project memory anything. Evidence first; a narrated answer when a key… (src/cairn/cli.py)
Render a context pack with hierarchy: title, risk badge, sections, dimmed… (src/cairn/cli.py)
drift() (src/cairn/cli.py)
_emit_json() (src/cairn/cli.py)
recall() (src/cairn/cli.py)
search() (src/cairn/cli.py)
specs() (src/cairn/cli.py)
record() (src/cairn/drift.py)
The spec board: features, stories, task progress and file trace. (src/cairn/cli.py)
Where the code disagrees with its specs. (src/cairn/cli.py)
Find what the team knows about a topic. (src/cairn/cli.py)
doctor() (src/cairn/cli.py)
row() (src/cairn/cli.py)
sessions() (src/cairn/cli.py)
installed() (src/cairn/engines/journal.py)
Every capability, its state, and the exact command to enable it. (src/cairn/cli.py)
What agents did in this repo. (src/cairn/cli.py)
Capture hooks are wired into an agent for this repository. (src/cairn/engines/journal.py)
context.md (src/cairn/workflow_extension/commands/context.md)
Ground the plan in the project's memory (src/cairn/workflow_extension/commands/context.md)
Step 1: Find the code this feature touches (src/cairn/workflow_extension/commands/context.md)
Step 2: Check each likely change point (src/cairn/workflow_extension/commands/context.md)
Step 3: Feed the plan (src/cairn/workflow_extension/commands/context.md)
Steps (src/cairn/workflow_extension/commands/context.md)
User Input (src/cairn/workflow_extension/commands/context.md)
down() (src/cairn/cli.py)
uninstall() (src/cairn/cli.py)
stop() (src/cairn/daemon.py)
remove_git_hooks() (src/cairn/hooks.py)
Stop the local server. (src/cairn/cli.py)
Remove Cairn's agent wiring and hooks (and state with --purge). (src/cairn/cli.py)
trace.md (src/cairn/workflow_extension/commands/trace.md)
Step 1: Refresh the memory (src/cairn/workflow_extension/commands/trace.md)
Step 2: Review risk per task (src/cairn/workflow_extension/commands/trace.md)
Step 3: Report (src/cairn/workflow_extension/commands/trace.md)
Steps (src/cairn/workflow_extension/commands/trace.md)
Trace tasks to code (src/cairn/workflow_extension/commands/trace.md)
verify.md (src/cairn/workflow_extension/commands/verify.md)
Step 1: Sync and check drift (src/cairn/workflow_extension/commands/verify.md)
Step 2: Resolve findings (src/cairn/workflow_extension/commands/verify.md)
Step 3: Capture learnings (src/cairn/workflow_extension/commands/verify.md)
Steps (src/cairn/workflow_extension/commands/verify.md)
Verify against the spec (src/cairn/workflow_extension/commands/verify.md)
0003-embedded-temporal-store.md (docs/adr/0003-embedded-temporal-store.md)
ADR-0003: Embedded temporal store by default (docs/adr/0003-embedded-temporal-store.md)
Consequences (docs/adr/0003-embedded-temporal-store.md)
Context (docs/adr/0003-embedded-temporal-store.md)
Decision (docs/adr/0003-embedded-temporal-store.md)
0004-model-routing.md (docs/adr/0004-model-routing.md)
ADR-0004: Task-tiered model routing (docs/adr/0004-model-routing.md)
Consequences (docs/adr/0004-model-routing.md)
Context (docs/adr/0004-model-routing.md)
Decision (docs/adr/0004-model-routing.md)
CHANGELOG.md (CHANGELOG.md)
0.1.0 — 2026-09-24 (CHANGELOG.md)
Changelog (CHANGELOG.md)
install.sh (install.sh)
say() (install.sh)
install.sh script (install.sh)
.mcp.json (.mcp.json)
/Users/shashanksaxena/Documents/Personal/Code/cairn/.venv/bin/python (.mcp.json)
cairn (.mcp.json)
workflow_extension/commands/remember.md (src/cairn/workflow_extension/commands/remember.md)
Save clarifications as decisions (src/cairn/workflow_extension/commands/remember.md)
Steps (src/cairn/workflow_extension/commands/remember.md)
quickstart.md (specs/001-cairn-core/quickstart.md)
Quickstart validation (specs/001-cairn-core/quickstart.md)
workflow_extension/README.md (src/cairn/workflow_extension/README.md)
Cairn extension for the spec workflow (src/cairn/workflow_extension/README.md)