@cairnkeep/cli 2.15.4 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CONTRIBUTING.md +12 -0
  3. package/README.md +84 -590
  4. package/docs/README.md +79 -0
  5. package/docs/agents.md +173 -0
  6. package/docs/ecosystem.md +23 -0
  7. package/docs/learning/CURRICULUM-MAP.md +1 -1
  8. package/docs/learning/FEATURE-GUIDE.md +2 -2
  9. package/docs/learning/README.md +3 -0
  10. package/docs/learning/lessons/L00-why-cairnkeep.md +3 -1
  11. package/docs/learning/lessons/L01-safe-trial.md +3 -3
  12. package/docs/learning/lessons/L02-installation.md +2 -2
  13. package/docs/learning/lessons/L03-first-project.md +9 -10
  14. package/docs/learning/lessons/L19-validated-skill-improvement.md +1 -1
  15. package/docs/learning/lessons/L20-mcp-tool-profiles.md +1 -1
  16. package/docs/learning/lessons/L21-context-packs.md +1 -1
  17. package/docs/learning/lessons/L22-native-windows.md +2 -2
  18. package/docs/learning/lessons/L23-guided-setup.md +18 -5
  19. package/docs/learning/lessons/L24-okf-exchange.md +1 -1
  20. package/docs/learning/lessons/L25-playbooks.md +1 -1
  21. package/docs/native-windows.md +5 -0
  22. package/docs/operating.md +21 -3
  23. package/docs/quickstart.md +12 -4
  24. package/docs/releasing.md +27 -19
  25. package/examples/eval/bundled-fake.json +1 -1
  26. package/package.json +1 -1
  27. package/scripts/cairn-cli.mjs +1 -0
  28. package/scripts/setup.mjs +92 -13
  29. package/scripts/terminal-prompts.mjs +172 -0
  30. package/scripts/test-docs-navigation.sh +63 -0
  31. package/scripts/test-phase17-artifact-lifecycle.sh +1 -1
  32. package/scripts/test-release-sbom.sh +41 -16
  33. package/scripts/test-setup-preflight.mjs +130 -0
  34. package/scripts/verify-docs-parity.sh +28 -28
package/docs/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # Cairnkeep documentation
2
+
3
+ This is the versioned documentation index for Cairnkeep. Start with the path
4
+ that matches what you are trying to do; detailed configuration belongs in the
5
+ linked guides rather than the project landing page.
6
+
7
+ ## Start here
8
+
9
+ | Goal | Guide |
10
+ |---|---|
11
+ | Install Cairnkeep and configure a first project | [Quickstart](quickstart.md) |
12
+ | Understand how coding agents should use Cairnkeep | [Cairnkeep for coding agents](agents.md) |
13
+ | Compare Claude Code, OpenCode, Codex, Kimi, Qwen, Pi, and generic MCP support | [Harness compatibility](harness-compatibility.md) |
14
+ | Follow the complete operator reference | [Operating Cairnkeep](operating.md) |
15
+ | Learn Cairnkeep progressively or produce the video series | [Learning paths and video scripts](learning/README.md) |
16
+
17
+ ## Agents and harnesses
18
+
19
+ - [Cairnkeep for coding agents](agents.md) explains retrieval-first behavior,
20
+ memory authority, playbooks, approvals, and graceful fallback.
21
+ - [Harness compatibility](harness-compatibility.md) records the exact commands,
22
+ hooks, plugins, launchers, skills, and MCP surfaces available in each client.
23
+ - [MCP tool annotations and least-authority profiles](mcp-tool-profiles.md)
24
+ explains observation/action metadata and project tool allowlists.
25
+ - [Immutable context packs](context-packs.md) covers approved external documents
26
+ and skills that remain read-only context rather than executable harness assets.
27
+ - [Validated skill improvement](skill-improvement.md) describes the reviewed,
28
+ measured, reversible path for changing a live skill.
29
+
30
+ ## Operations, storage, and privacy
31
+
32
+ - [Operating Cairnkeep](operating.md) is the full CLI and configuration
33
+ reference.
34
+ - [Memory storage and deployment](storage.md) documents local and remote stores,
35
+ retention, backup, migration, and uninstall behavior.
36
+ - [Privacy and data flow](privacy-and-data-flow.md) maps what each opt-in feature
37
+ reads, stores, and may send over the network.
38
+ - [Git-linked work evidence](work-evidence.md) covers bounded local session-to-Git
39
+ provenance without prompt or reasoning capture.
40
+ - [Optional document knowledge](domain-knowledge.md) covers the separately
41
+ configured document-RAG integration.
42
+
43
+ ## Deployment and platforms
44
+
45
+ - [Containers](containers.md) covers rootless Podman, OCI images, authenticated
46
+ HTTP, and persistent storage.
47
+ - [Native Windows](native-windows.md) covers x64 setup, launchers, ACLs,
48
+ scheduling, process cleanup, and recovery.
49
+ - [Git providers](git-providers.md) describes provider-neutral Git-linked
50
+ workflows.
51
+
52
+ ## Exchange and ecosystem
53
+
54
+ - [Open Knowledge Format exchange](open-knowledge-format.md) covers importing
55
+ and exporting portable knowledge bundles.
56
+ - [Companion tools and related projects](ecosystem.md) lists optional tools that
57
+ complement Cairnkeep without becoming runtime dependencies.
58
+
59
+ ## Overlays and teams
60
+
61
+ - [Building an overlay](building-an-overlay.md) explains how to add private
62
+ provider or organization policy without forking the core.
63
+ - [Managed overlay distributions](overlay-distributions.md) covers wrapper CLIs,
64
+ policy locks, private registries, and rollback.
65
+ - [Team-mode design](design/team-mode.md) records the current team workflow
66
+ boundary and deferred multi-user concerns.
67
+ - [Meta-agent design](design/meta-agent.md) records the bounded workflow design
68
+ behind Cairnkeep playbooks.
69
+
70
+ ## Contributing and releases
71
+
72
+ - [Contributing](../CONTRIBUTING.md)
73
+ - [Release process](releasing.md)
74
+ - [Support](../SUPPORT.md)
75
+ - [Security policy](../SECURITY.md)
76
+
77
+ These files ship with the repository and npm package, so documentation stays
78
+ reviewable and version-aligned with the code. A website or GitHub Wiki may
79
+ mirror them later, but should not become a second source of truth.
package/docs/agents.md ADDED
@@ -0,0 +1,173 @@
1
+ # Cairnkeep for coding agents
2
+
3
+ Cairnkeep gives a coding agent durable project context and bounded workflow
4
+ guidance. It does not replace repository inspection, decide what is true, or
5
+ turn a harness into an autonomous Cairnkeep runtime.
6
+
7
+ This guide is for both agents and the people configuring them.
8
+
9
+ ## The agent contract
10
+
11
+ For a nontrivial task that may depend on previous decisions, conventions,
12
+ constraints, recurring failures, or prior work:
13
+
14
+ 1. Derive one short query directly from the user's task.
15
+ 2. If `memory_search` is available, make that project-scoped search the first
16
+ tool or command. Do not inspect the repository first merely to formulate the
17
+ query.
18
+ 3. Treat every result as a locator. Read and verify the maintained repository
19
+ sources it references before using it to make a change.
20
+ 4. If the tool is unavailable or the result is irrelevant, continue with
21
+ ordinary repository inspection. Do not repeat or broaden searches simply to
22
+ force a memory hit.
23
+ 5. Do not call `memory_write`, supersede a record, approve content, or promote
24
+ durable knowledge unless the user or an applicable reviewed workflow
25
+ explicitly requests capture.
26
+
27
+ This protocol improves continuity without allowing stale memory to outrank
28
+ code, tests, current documentation, or the user's request.
29
+
30
+ ## What setup installs
31
+
32
+ `cairn setup` reconciles a delimited Cairnkeep block in the project's
33
+ `AGENTS.md` while preserving surrounding user content and file mode. The block
34
+ contains the durable-context contract above and bounded playbook instructions.
35
+ It can be removed independently with:
36
+
37
+ ```bash
38
+ cairn playbook instructions remove
39
+ ```
40
+
41
+ The selected harness determines which project assets setup creates. Setup
42
+ reports but never performs machine-level sync. Claude Code and OpenCode receive
43
+ the complete operating layer only after the operator runs the reported
44
+ `cairn sync --apply` command; Codex, Qwen, Kimi, and Pi have narrower
45
+ integrations. See [Harness compatibility](harness-compatibility.md) for the
46
+ exact tested surface. Instruction presence is not evidence that an agent
47
+ actually invoked a tool.
48
+
49
+ ## Memory scopes and authority
50
+
51
+ Use `scope: project` for task-specific decisions and conventions. Broader
52
+ scopes may be configured, but an agent should not widen a search merely to find
53
+ an answer. The read-only virtual `all` scope is useful only when the task truly
54
+ crosses configured scopes.
55
+
56
+ Memory remains a secondary source:
57
+
58
+ ```text
59
+ user request + maintained repository sources
60
+ ↓ verify
61
+ durable memory locator
62
+ ↓ apply
63
+ implementation decision
64
+ ```
65
+
66
+ If a memory record conflicts with current code, tests, policy, or explicit user
67
+ direction, follow the current authoritative source and report the conflict.
68
+ Correct or supersede the durable record only through an explicitly approved
69
+ workflow.
70
+
71
+ ## Bounded playbooks
72
+
73
+ The project policy in `.ai/playbooks.json` helps an agent decide which existing
74
+ recall, planning, verification, review, security, documentation, and learning
75
+ steps apply. Check it at task boundaries:
76
+
77
+ ```bash
78
+ cairn playbook check start \
79
+ --session SESSION \
80
+ --complexity standard \
81
+ --familiarity mixed
82
+
83
+ cairn playbook check check
84
+
85
+ cairn playbook check finish \
86
+ --session SESSION \
87
+ --changed PATH... \
88
+ --risk normal \
89
+ --completed ACTION... \
90
+ --skipped ACTION=REASON... \
91
+ --enforce
92
+ ```
93
+
94
+ Complexity accepts `trivial`, `standard`, or `complex`; familiarity accepts
95
+ `known`, `mixed`, or `unfamiliar`; risk accepts `low`, `normal`, `high`, or
96
+ `security`. Follow every applicable `must` action, apply `should` actions unless
97
+ there is a concrete reason to skip them, and use judgment for `may` actions.
98
+ Re-check when scope, familiarity, complexity, or risk changes materially. Exit
99
+ 3 means enforced `must` evidence is missing; exit 2 means invalid input or a
100
+ policy diagnostic. Neither is permission to relabel failed work as complete.
101
+
102
+ A playbook result selects existing actions only. It cannot:
103
+
104
+ - execute a command or workflow;
105
+ - enable a disabled feature or capability;
106
+ - activate a context-pack skill;
107
+ - grant approval or authorize destructive work;
108
+ - write or promote durable memory automatically; or
109
+ - prove that an agent followed the recommendation.
110
+
111
+ After a successful finish check, material outcomes can be recorded with the
112
+ exact policy and decision digests returned by the check. Run
113
+ `cairn playbook record --help` for the bounded values. Actor identity is a
114
+ caller-supplied local label, not authenticated identity.
115
+
116
+ ## Tool authority
117
+
118
+ Every Cairnkeep MCP tool has explicit read-only, destructive, idempotent, and
119
+ open-world annotations. Operators can restrict discovery with a `read-only` or
120
+ exact custom profile:
121
+
122
+ ```bash
123
+ cairn mcp-tools status
124
+ cairn mcp-tools set read-only
125
+ cairn mcp-tools set custom --tool memory_read --tool memory_search
126
+ ```
127
+
128
+ Effective discovery is the intersection of available feature gates, the
129
+ capability contract, and the MCP tool profile. A profile can remove tools but
130
+ cannot enable a disabled feature. An annotation describes a tool; it does not
131
+ grant permission or replace the harness's approval policy. See
132
+ [MCP tool profiles](mcp-tool-profiles.md).
133
+
134
+ ## Documents and skills from context packs
135
+
136
+ Enabled context-pack documents are read-only external context. Skill files are
137
+ invisible until an operator approves their exact project, pack digest, path,
138
+ and file digest. Even then, they are discoverable text through MCP—not copied
139
+ into a harness, automatically activated, or executed. A pack update invalidates
140
+ the old approval. See [Immutable context packs](context-packs.md).
141
+
142
+ ## Graceful fallback
143
+
144
+ Cairnkeep should never block ordinary engineering merely because optional
145
+ context is unavailable:
146
+
147
+ - No memory tool: inspect the repository and state the limitation.
148
+ - No relevant memory: continue after the single bounded search.
149
+ - No playbook CLI or capability: follow the documented policy intent manually;
150
+ never invent a successful check or receipt.
151
+ - Embedding endpoint failure: supported searches fall back to deterministic
152
+ local substring matching.
153
+ - Disabled tool or feature: do not work around the operator's authority
154
+ boundary.
155
+
156
+ Run `cairn doctor` when the project is expected to have Cairnkeep wiring but a
157
+ tool, launcher, or managed asset is missing.
158
+
159
+ ## Operator checklist
160
+
161
+ Before expecting an agent to use Cairnkeep:
162
+
163
+ 1. Configure the project with `cairn setup` for the intended harness.
164
+ 2. Run `cairn doctor` and review any operator-owned files reported as skipped.
165
+ 3. Inspect the managed `AGENTS.md` block and `.ai/playbooks.json` policy.
166
+ 4. Review the effective catalog with `cairn mcp-tools status`.
167
+ 5. Keep durable memory concise and point it at maintained sources whenever
168
+ possible.
169
+ 6. Treat runtime evidence—not instruction presence—as proof of tool use.
170
+
171
+ Continue with the [quickstart](quickstart.md), the
172
+ [operating guide](operating.md), and the
173
+ [privacy and data-flow reference](privacy-and-data-flow.md).
@@ -0,0 +1,23 @@
1
+ # Companion tools and related projects
2
+
3
+ Cairnkeep's core memory server, project setup, wiki, and review assets run
4
+ without any of the tools below. Optional delegated exploration, routing, and
5
+ graph workflows have their own explicit companion requirements.
6
+
7
+ ## Related project
8
+
9
+ - [token-miser](https://github.com/cairnkeep/token-miser) owns context
10
+ exploration and request routing. Cairnkeep's optional `context_explore` and
11
+ `route_check` MCP tools are thin, environment-gated delegates to it.
12
+
13
+ ## Optional companion tools
14
+
15
+ | Tool | What it adds | Integration |
16
+ |---|---|---|
17
+ | [lean-ctx](https://github.com/yvgude/lean-ctx) | Compressed file reads, searches, shell output, and directory maps | Register it as an MCP server in the chosen harness |
18
+ | [token-miser](https://github.com/cairnkeep/token-miser) | Model routing and compact codebase exploration | Configure `CAIRN_ROUTE_ENDPOINT` and/or `CAIRN_EXPLORE_BINARY` |
19
+ | [rtk](https://github.com/rtk-ai/rtk) | Token-reduced output for common Git, npm, and Cargo commands | Install as a shell-level proxy; Cairnkeep wiring is not required |
20
+
21
+ These integrations are accelerators, not part of Cairnkeep's trust boundary or
22
+ runtime dependency set. Review each project's installation and data-flow
23
+ documentation independently before enabling it.
@@ -1,6 +1,6 @@
1
1
  # Curriculum Coverage Map
2
2
 
3
- **Baseline:** Cairnkeep 2.15.4
3
+ **Baseline:** Cairnkeep 2.16.0
4
4
  **Last reviewed:** 2026-08-19
5
5
 
6
6
  This map prevents the course from drifting behind the product. It assigns each
@@ -1,6 +1,6 @@
1
1
  # Cairnkeep feature guide
2
2
 
3
- **Baseline:** Cairnkeep 2.15.4
3
+ **Baseline:** Cairnkeep 2.16.0
4
4
 
5
5
  This is the step-back map for choosing and operating Cairnkeep features. The
6
6
  [course labs](https://github.com/cairnkeep/cairnkeep-course-labs) provide one
@@ -67,7 +67,7 @@ prerequisites for ordinary memory.
67
67
  | Wiki and alignment | `/wiki-ingest`, `/wiki-query`, `/wiki-lint`, alignment files | Written only when invoked; reviewable `.planning/` artifacts | Re-run lint, inspect source citations, revert tracked changes normally | `course-02-memory` |
68
68
  | Local code graph | `cairn graph build|query|status|diff|explain|path`; `/graphify` delegates | Default off; optional isolated `graphify` executable; incremental work under `graphify-out/`, published view under `.planning/graphs/` | Ignore both derived locations; check status and source before trusting a result; use `--force` only after intentional deletion; uninstall adapters separately | `course-08-graph` |
69
69
  | Repository quality | `/repo-review`, `/security-audit` | On-demand workflow; findings are hypotheses until reproduced | Require file/line evidence and regression tests | `course-03-quality` |
70
- | Guided project setup | `cairn setup PATH --git init\|existing\|none --harness LIST --memory local\|none --yes` | Reconciles only selected project assets from one harness registry; private `.ai/cairnkeep.json`; machine sync is never automatic | Repeat deterministically, run doctor, or replay its recovery command; Git-less mode remains limited | `course-12-guided-setup` |
70
+ | Guided project setup | `cairn setup [PATH]` selectors; deterministic `--git`, `--harness`, `--memory`, and `--yes` flags | Arrow-key Git/memory choices and harness checkboxes in capable terminals; text fallback otherwise; reconciles only selected assets; private `.ai/cairnkeep.json`; machine sync is never automatic | Repeat deterministically, run doctor, or replay its recovery command; Git-less mode remains limited | `course-12-guided-setup` |
71
71
  | Codex project memory | Select `--harness codex --memory local` | Writes `.codex/config.toml` plus POSIX/native Windows launchers; local stdio; user-wide configuration and trust remain untouched | Review the MCP table, accept Codex project trust, run doctor, and relaunch; uninstall is backup-first | `course-01-bootstrap` |
72
72
  | Workflow playbooks and durable-context guidance | `cairn playbook check start|check|finish`; project `minimal`, `balanced`, or `strict` policy; managed `AGENTS.md` retrieval protocol | Balanced by default; private `.ai/playbooks.json`; one task-derived project search when applicable; optional receipts in `.agentfs/playbooks/`; checks are offline and execute nothing | Verify the actual memory tool event and maintained source, inspect status/digests, enforce truthful `must` evidence, inspect receipts, reset overrides, remove only the managed `AGENTS.md` block | `course-13-playbooks` |
73
73
 
@@ -19,6 +19,9 @@ Choose the shortest track that matches your goal:
19
19
 
20
20
  For a single view of every released surface, its default, storage boundary,
21
21
  restart requirement, and rollback path, use the [feature guide](FEATURE-GUIDE.md).
22
+ The public [coding-agent guide](../agents.md) is the concise normative reference
23
+ for retrieval-first behavior, memory authority, playbooks, and graceful
24
+ fallback used throughout the lessons.
22
25
  The public [course labs](https://github.com/cairnkeep/cairnkeep-course-labs)
23
26
  provide one synthetic project with tagged checkpoints shared by lessons,
24
27
  articles, workshops, and videos.
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 10 minutes
6
- **Tested with:** Cairnkeep 2.15.4
6
+ **Tested with:** Cairnkeep 2.16.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -92,4 +92,6 @@ configuration and are taught later.
92
92
  - Derived knowledge remains subordinate to canonical sources.
93
93
  - Optional services are not prerequisites.
94
94
 
95
+ Reference: [Cairnkeep for coding agents](../../agents.md).
96
+
95
97
  Next: [L01 - Try it safely](L01-safe-trial.md).
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 15 minutes
6
- **Tested with:** Cairnkeep 2.15.4
6
+ **Tested with:** Cairnkeep 2.16.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -26,7 +26,7 @@ ephemeral; the named course volume is persistent.
26
26
  1. Pull the public image:
27
27
 
28
28
  ```bash
29
- podman pull ghcr.io/cairnkeep/cairnkeep:2.14.0
29
+ podman pull ghcr.io/cairnkeep/cairnkeep:2.16.0
30
30
  ```
31
31
 
32
32
  2. Start the stdio server with a read-only root filesystem and no Linux
@@ -38,7 +38,7 @@ ephemeral; the named course volume is persistent.
38
38
  --read-only --cap-drop=all --security-opt=no-new-privileges \
39
39
  --tmpfs=/tmp:rw,noexec,nosuid,size=64m,mode=1777 \
40
40
  --volume cairnkeep-course-data:/data:Z,U \
41
- ghcr.io/cairnkeep/cairnkeep:2.14.0 stdio
41
+ ghcr.io/cairnkeep/cairnkeep:2.16.0 stdio
42
42
  ```
43
43
 
44
44
  3. The process waits quietly for MCP input. Press `Ctrl-C` after confirming it
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 25 minutes
6
- **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.16.0 and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
@@ -47,7 +47,7 @@ sync. Codex project trust remains an explicit operator decision.
47
47
  2. Install Cairnkeep:
48
48
 
49
49
  ```bash
50
- npm install --global @cairnkeep/cli@2.14.0
50
+ npm install --global @cairnkeep/cli@2.16.0
51
51
  cairn --version
52
52
  ```
53
53
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 25 minutes
6
- **Tested with:** Cairnkeep 2.15.4
6
+ **Tested with:** Cairnkeep 2.16.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -26,20 +26,19 @@ recall it from a new session.
26
26
  cd "$HOME/cairnkeep-course/first-project"
27
27
  ```
28
28
 
29
- 2. Choose one harness and run the deterministic form of guided setup. The
30
- explicit flags make the
31
- exercise reproducible while exercising the same preflight as interactive
32
- `cairn setup`:
29
+ 2. Run the interactive setup and choose a harness. Use Up/Down and Enter for
30
+ Git and memory choices; use Space to tick Claude Code or Codex CLI in the
31
+ harness checklist. Review the plan before selecting **Yes, apply the plan**:
33
32
 
34
33
  ```bash
35
- # Full operating-layer route from L02:
36
- cairn setup "$PWD" --git init --harness claude --memory local --yes
37
-
38
- # Or the self-contained Codex memory route:
39
- # cairn setup "$PWD" --git init --harness codex --memory local --yes
34
+ cairn setup "$PWD"
40
35
  cp .ai/env.example .ai/.env
41
36
  ```
42
37
 
38
+ For a reproducible non-interactive exercise, the equivalent Claude Code
39
+ command is `cairn setup "$PWD" --git init --harness claude --memory local
40
+ --yes`; replace `claude` with `codex` for the self-contained Codex route.
41
+
43
42
  Setup must create the Git repository, generate only the selected harness
44
43
  assets, and write the private `.ai/cairnkeep.json` setup record. Codex also
45
44
  receives `.codex/config.toml`; review it and accept Codex's project-trust
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Evidence and Evaluation
5
5
  **Time:** 50 minutes
6
- **Tested with:** Cairnkeep 2.15.4
6
+ **Tested with:** Cairnkeep 2.16.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -1,7 +1,7 @@
1
1
  # L20 - Least-authority MCP tool profiles
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.16.0 and Node.js 22 or newer
5
5
  **Time:** 25 minutes
6
6
 
7
7
  ## Outcome
@@ -1,7 +1,7 @@
1
1
  # L21 - Immutable context packs and skill approval
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.16.0 and Node.js 22 or newer
5
5
  **Time:** 40 minutes
6
6
 
7
7
  ## Outcome
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Operator
5
5
  **Time:** 30 minutes
6
- **Tested with:** Cairnkeep 2.15.4, Windows x64, and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.16.0, Windows x64, and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
@@ -16,7 +16,7 @@ perform a reversible uninstall without relying on WSL or Git Bash.
16
16
  From PowerShell:
17
17
 
18
18
  ```powershell
19
- npm install --global @cairnkeep/cli@2.14.0
19
+ npm install --global @cairnkeep/cli@2.16.0
20
20
  cairn version
21
21
 
22
22
  $Lab = Join-Path $env:TEMP 'Cairnkeep Windows Lab'
@@ -3,13 +3,14 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart and Operator
5
5
  **Time:** 35 minutes
6
- **Tested with:** Cairnkeep 2.15.4; Pi 0.84.1; Node.js 22, 24, and 26
6
+ **Tested with:** Cairnkeep 2.16.0; Pi 0.84.1; Node.js 22, 24, and 26
7
7
 
8
8
  ## Outcome
9
9
 
10
- You can classify a missing or empty target, replay setup without a TTY, explain
11
- the limitations of Git-less mode, verify Pi's local stdio memory bridge, and
12
- recover or uninstall every managed asset without hidden machine changes.
10
+ You can use the guided terminal selectors, classify a missing or empty target,
11
+ replay setup without a TTY, explain the limitations of Git-less mode, verify
12
+ Pi's local stdio memory bridge, and recover or uninstall every managed asset
13
+ without hidden machine changes.
13
14
 
14
15
  The selected harnesses come from Cairnkeep's declarative registry. Codex is a
15
16
  supported selection: it receives `.codex/config.toml` and a launcher, while Pi
@@ -24,6 +25,18 @@ continues to require its separate explicit machine sync.
24
25
 
25
26
  ## Exercise
26
27
 
28
+ First experience the interactive path:
29
+
30
+ ```bash
31
+ cairn setup /tmp/cairnkeep-guided-selector-lab
32
+ ```
33
+
34
+ Choose Git with Up/Down and Enter, tick Pi with Space in the harness checklist,
35
+ keep local memory, then inspect the plan before confirming. Pressing Escape or
36
+ Ctrl-C cancels; redirected and limited terminals use the documented text-input
37
+ fallback. Remove that disposable selector lab before continuing if you applied
38
+ the plan.
39
+
27
40
  Start with a missing target. The explicit flags make this deterministic and
28
41
  safe to replay from a non-interactive or non-TTY process:
29
42
 
@@ -112,7 +125,7 @@ and context packs remain unless their separate purge flags are supplied.
112
125
 
113
126
  | Symptom | Cause | Recovery |
114
127
  |---|---|---|
115
- | Setup refuses a missing target | The non-interactive command omitted an explicit choice or `--yes` | Supply the target, `--git`, `--harness`, `--memory`, and `--yes` together |
128
+ | Setup refuses a missing target | The non-interactive command omitted an explicit choice or `--yes` | Run `cairn setup PATH` in a terminal, or supply the target, `--git`, `--harness`, `--memory`, and `--yes` together |
116
129
  | Setup refuses `--git existing` | The target is not inside a Git work tree | Choose an existing repository, or explicitly authorize `--git init`; use `--git none` only when limited mode is intended |
117
130
  | Doctor reports missing or drifted Pi assets | Project setup selected Pi but machine sync is incomplete | Run `cairn sync-pi --apply`, then `cairn sync-pi --check` and `cairn doctor` |
118
131
  | A cancelled call ends the session | The Pi/bridge version does not satisfy the per-call cancellation contract | Preserve sanitized diagnostics, close the session, and do not claim release readiness |
@@ -1,7 +1,7 @@
1
1
  # L24 - Reviewed knowledge exchange
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.16.0 and Node.js 22 or newer
5
5
  **Time:** 35 minutes
6
6
 
7
7
  ## Outcome
@@ -1,7 +1,7 @@
1
1
  # L25 - Bounded workflow playbooks
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.16.0 and Node.js 22 or newer
5
5
  **Time:** 35 minutes
6
6
 
7
7
  ## Outcome
@@ -13,6 +13,11 @@ and `--untracked` bootstrap. Explicit `--git none` provides the same documented
13
13
  limited mode as POSIX setup.
14
14
  The optional `sqlite3.exe` command enables WAL-safe `cairn memory export`.
15
15
 
16
+ From an interactive PowerShell or Command Prompt, `cairn setup $Project`
17
+ presents native arrow-key Git and memory selectors plus a Space-toggle harness
18
+ checklist. The explicit form below remains preferable for scripts and fleet
19
+ automation:
20
+
16
21
  ```powershell
17
22
  npm install --global @cairnkeep/cli
18
23
  cairn version
package/docs/operating.md CHANGED
@@ -24,6 +24,9 @@ sync command but never runs it automatically. This guide covers all three.
24
24
  memory MCP, launcher, and opt-in graph Skill; Qwen Code receives the memory
25
25
  MCP and launcher. Pi receives a maintained local stdio MCP extension, native
26
26
  trajectory adapter, graph prompt, and launcher after explicit machine sync.
27
+ - Cairnkeep 1.x remains the legacy line for older Node.js runtimes. New
28
+ installations should use the supported Cairnkeep 2.x and Node.js 22-or-newer
29
+ matrix.
27
30
  - Optional: the `sqlite3` CLI for `cairn memory export`. Runtime memory and
28
31
  `cairn memory import` do not require it.
29
32
  - Optional: an OpenAI-compatible LLM endpoint for memory extraction and
@@ -61,9 +64,11 @@ Invoke-Expression (& cairn completion powershell | Out-String)
61
64
 
62
65
  ## Guided project setup
63
66
 
64
- Interactive terminals may run `cairn setup` and answer the target, Git,
65
- harness, memory, and confirmation questions. Automation must make every choice
66
- explicit:
67
+ Interactive terminals may run `cairn setup [PATH]`. Use Up/Down and Enter for
68
+ Git and memory, Space to tick one or more harness checkboxes, `a` to toggle all
69
+ harnesses, and the final selectable confirmation before anything is written.
70
+ If the terminal cannot provide raw keyboard input, Cairnkeep falls back to the
71
+ original text questions. Automation must make every choice explicit:
67
72
 
68
73
  ```bash
69
74
  cairn setup /path/to/project --git init --harness claude,pi --memory local --yes
@@ -890,6 +895,19 @@ Inspect receipts with `cairn playbook receipts list|show`; validate state with
890
895
  v2.15 does not authenticate them and does not provide team ACLs. See
891
896
  [team mode](design/team-mode.md) for the future admission contract.
892
897
 
898
+ The corresponding process overrides are optional:
899
+
900
+ | Variable | Default | Purpose |
901
+ |---|---|---|
902
+ | `CAIRN_PLAYBOOK_PROFILE` | project policy, then `balanced` | Select `minimal`, `balanced`, or `strict` without changing the project file |
903
+ | `CAIRN_PLAYBOOK_ACTOR` | `local-agent` | Supply the unauthenticated local actor label used by checks and receipts |
904
+ | `CAIRN_PLAYBOOK_ACTOR_KIND` | `agent` | Classify the local actor as `user`, `agent`, or `service` |
905
+ | `CAIRN_PLAYBOOK_SESSION` | `local-<process-id>` | Supply the bounded local session label used by decisions and receipts |
906
+
907
+ Command-line `--actor`, `--actor-kind`, and `--session` values take precedence
908
+ over these process defaults. None of these labels establish identity or grant
909
+ authority.
910
+
893
911
  The managed instruction lifecycle is explicit and ownership-safe:
894
912
 
895
913
  ```bash
@@ -7,18 +7,19 @@ the default store stays on this computer.
7
7
  ## Codex CLI
8
8
 
9
9
  Install Cairnkeep, then let guided setup initialize an empty project and write
10
- Codex's project-scoped MCP entry:
10
+ Codex's project-scoped MCP entry. Select **Initialize a Git repository**,
11
+ tick **Codex CLI** with Space, keep local memory, review the plan, and apply it:
11
12
 
12
13
  ```bash
13
14
  npm install --global @cairnkeep/cli
14
- cairn setup /path/to/project --git init --harness codex --memory local --yes
15
+ cairn setup /path/to/project
15
16
  cd /path/to/project
16
17
  cairn doctor
17
18
  ./.ai/start-codex.sh
18
19
  ```
19
20
 
20
- Use `--git existing` instead when the target is already a Git work tree. On
21
- native Windows, launch with `.\.ai\start-codex.cmd`.
21
+ The wizard recommends the existing repository mode when the target is already
22
+ a Git work tree. On native Windows, launch with `.\.ai\start-codex.cmd`.
22
23
 
23
24
  Before the first session, review `.codex/config.toml` and accept Codex's project
24
25
  trust prompt. The generated entry runs `cairn memory-server` locally. Setup
@@ -53,6 +54,13 @@ cairn doctor
53
54
  Setup reports machine-level commands but never executes them. This keeps
54
55
  project scaffolding separate from harness-wide changes.
55
56
 
57
+ For scripts, CI, or reproducible fleet setup, skip the selector and provide all
58
+ choices explicitly:
59
+
60
+ ```bash
61
+ cairn setup /path/to/project --git init --harness codex --memory local --yes
62
+ ```
63
+
56
64
  ## First memory cycle
57
65
 
58
66
  In a harness with Cairnkeep commands, remember one durable fact and recall it: