@cairnkeep/cli 2.11.0 → 2.12.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 (43) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/README.md +31 -6
  3. package/docs/building-an-overlay.md +1 -1
  4. package/docs/harness-compatibility.md +34 -1
  5. package/docs/learning/CURRICULUM-MAP.md +8 -7
  6. package/docs/learning/FEATURE-GUIDE.md +9 -4
  7. package/docs/learning/README.md +3 -2
  8. package/docs/learning/lessons/L00-why-cairnkeep.md +1 -1
  9. package/docs/learning/lessons/L01-safe-trial.md +3 -3
  10. package/docs/learning/lessons/L02-installation.md +16 -9
  11. package/docs/learning/lessons/L03-first-project.md +34 -15
  12. package/docs/learning/lessons/L19-validated-skill-improvement.md +1 -1
  13. package/docs/learning/lessons/L20-mcp-tool-profiles.md +1 -1
  14. package/docs/learning/lessons/L21-context-packs.md +1 -1
  15. package/docs/learning/lessons/L22-native-windows.md +9 -9
  16. package/docs/learning/lessons/L23-guided-setup.md +6 -2
  17. package/docs/learning/tracks/quickstart.md +5 -4
  18. package/docs/native-windows.md +14 -0
  19. package/docs/operating.md +26 -5
  20. package/docs/privacy-and-data-flow.md +8 -1
  21. package/docs/quickstart.md +86 -0
  22. package/examples/eval/bundled-fake.json +1 -1
  23. package/package.json +2 -1
  24. package/schemas/cairnkeep-setup-policy.schema.json +3 -3
  25. package/schemas/cairnkeep-setup.schema.json +2 -2
  26. package/scripts/bootstrap.sh +7 -15
  27. package/scripts/completion.sh +8 -6
  28. package/scripts/doctor.sh +5 -4
  29. package/scripts/harness-registry.mjs +126 -0
  30. package/scripts/setup-core.mjs +4 -2
  31. package/scripts/setup-reconcile.mjs +3 -2
  32. package/scripts/setup.mjs +41 -5
  33. package/scripts/test-bootstrap-untracked.sh +2 -1
  34. package/scripts/test-completion.sh +2 -0
  35. package/scripts/test-harness-registry.sh +94 -0
  36. package/scripts/test-package-install.sh +5 -0
  37. package/scripts/test-phase19-eval-lifecycle.sh +12 -2
  38. package/scripts/test-setup-compatibility.mjs +5 -4
  39. package/scripts/test-windows-native.mjs +24 -1
  40. package/scripts/uninstall.sh +7 -3
  41. package/scripts/windows-platform.mjs +13 -5
  42. package/templates/codex-config.toml.template +5 -0
  43. package/templates/start-codex.sh.template +30 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable user-facing changes are documented here. This project follows
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.12.0] - 2026-08-13
9
+
10
+ ### Added
11
+
12
+ - Add one declarative harness registry for setup choices, project assets,
13
+ launcher generation, diagnostics, native Windows, and lifecycle tooling.
14
+ - Add first-class Codex CLI setup with a project-scoped local stdio MCP entry,
15
+ POSIX and native Windows launchers, explicit project-trust guidance, and a
16
+ memory-off path that creates no MCP configuration.
17
+ - Add a five-minute quickstart and Codex route to the public learning path.
18
+
19
+ ### Changed
20
+
21
+ - Derive guided setup policy validation and required-asset diagnosis from the
22
+ shared harness catalog. Codex/Qwen-only setup now reports that no machine
23
+ sync is required instead of suggesting unrelated operating assets.
24
+ - Extend bootstrap contributor mode, backup-first uninstall, schema validation,
25
+ package checks, and native Windows coverage to Codex-owned project files.
26
+
8
27
  ## [2.11.0] - 2026-08-12
9
28
 
10
29
  ### Added
@@ -317,7 +336,8 @@ stored memories.
317
336
  - Preserve executable permissions and Bash 3.2 portability on macOS.
318
337
  - Add backup-first uninstall and SQLite-safe memory export/import guidance.
319
338
 
320
- [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.11.0...HEAD
339
+ [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.12.0...HEAD
340
+ [2.12.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.11.0...v2.12.0
321
341
  [2.11.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.9.0...v2.11.0
322
342
  [2.9.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.8.0...v2.9.0
323
343
  [2.8.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.7.0...v2.8.0
package/README.md CHANGED
@@ -9,8 +9,25 @@
9
9
  A *cairn* is a stack of stones left as a trail marker for whoever follows; a
10
10
  *keep* is where you store what matters. **Cairnkeep** is where coding agents
11
11
  stack durable memory — decisions, pitfalls, patterns — and follow the trail
12
- across sessions, projects, and harnesses (Claude Code, OpenCode, Kimi Code,
13
- Qwen Code, Pi, and other MCP clients).
12
+ across sessions, projects, and harnesses (Claude Code, Codex CLI, OpenCode,
13
+ Kimi Code, Qwen Code, Pi, and other MCP clients).
14
+
15
+ ## Five-minute start
16
+
17
+ For Codex CLI, Cairnkeep can install the complete project-local memory wiring
18
+ in one command:
19
+
20
+ ```bash
21
+ npm install --global @cairnkeep/cli
22
+ cairn setup /path/to/project --git init --harness codex --memory local --yes
23
+ cd /path/to/project
24
+ ./.ai/start-codex.sh # Windows: .\.ai\start-codex.cmd
25
+ ```
26
+
27
+ Review `.codex/config.toml` and accept Codex's project-trust prompt on first
28
+ use. No separate MCP registration or machine-level asset sync is needed. See
29
+ the **[quickstart](docs/quickstart.md)** for existing repositories, Claude Code,
30
+ verification, and the first remember/recall cycle.
14
31
 
15
32
  ## Status
16
33
 
@@ -27,8 +44,8 @@ a thin routing seam (`route_check`), both of which delegate to
27
44
  [token-miser](https://github.com/cairnkeep/token-miser), a public
28
45
  cairnkeep-org sibling project.
29
46
 
30
- Version 2.11 adds guided `cairn setup`, the maintained Pi local stdio memory
31
- extension, and the native Windows operating layer.
47
+ Version 2.12 adds a declarative harness registry, first-class Codex project
48
+ setup, and a shorter path from installation to verified recall.
32
49
 
33
50
  ## Compatibility
34
51
 
@@ -43,7 +60,7 @@ and 20 are end-of-life upstream.
43
60
  | Kimi Code on Linux/macOS | Memory MCP server, project launcher, and opt-in `/graphify` Skill |
44
61
  | Qwen Code on Linux/macOS | Memory MCP server plus project launcher; no Cairnkeep operating-layer assets yet |
45
62
  | Pi on Linux/macOS | Memory MCP through a maintained local stdio extension; native opt-in trajectory extension, launcher, and `/graphify` prompt; Pi 0.84.1 minimum for the bridge |
46
- | Codex CLI | Memory MCP server; no Cairnkeep operating-layer assets |
63
+ | Codex CLI on Linux/macOS | Project-scoped memory MCP configuration and launcher; no Cairnkeep-specific commands or hooks |
47
64
  | Other MCP clients | Memory plus optional domain-knowledge and context-pack MCP tools |
48
65
  | Native Windows x64 | Node-native CLI, guided setup, memory server, bootstrap compatibility, PowerShell/Command Prompt launchers, sync, hooks, doctor, storage lifecycle, Task Scheduler, completion, and uninstall |
49
66
  | Windows ARM64 | Supported through Windows x64 emulation only; a native database binding is not currently shipped |
@@ -60,7 +77,7 @@ installation, and clean Node 22/24/26 runtime checks are exercised in CI. See
60
77
  ACL, scheduling, process-tree, and recovery details.
61
78
 
62
79
  See [Harness compatibility](docs/harness-compatibility.md) for exact support
63
- levels, Kimi and Qwen configuration, and candidates that are not yet runtime-tested.
80
+ levels, trust boundaries, and candidates that are not yet runtime-tested.
64
81
 
65
82
  ## Try with Podman
66
83
 
@@ -140,6 +157,7 @@ operating layer installed into your harness, and a configured project. `cairn
140
157
  setup` is the recommended guided entry point; `cairn bootstrap` remains the
141
158
  deterministic compatibility primitive for established scripts. Project setup
142
159
  reports but never performs machine-level sync. The full ordered walkthrough is
160
+ in **[the quickstart](docs/quickstart.md)**; the complete operator reference is
143
161
  in **[docs/operating.md](docs/operating.md)**.
144
162
 
145
163
  This setup is local by default: the registered stdio server stores memory on
@@ -179,6 +197,13 @@ patterns/transactional-migrations: Use transactional migrations for schema chang
179
197
  The exact command rendering depends on the client. Any MCP client can call
180
198
  `memory_write` and `memory_search` directly.
181
199
 
200
+ For Codex CLI, `cairn setup --harness codex --memory local` writes the
201
+ project-scoped `.codex/config.toml` entry and both POSIX and native Windows
202
+ launchers. Review the configuration and trust the project before launching.
203
+ Existing operator-owned `.codex/config.toml` files are never overwritten; a
204
+ reported `skipped` file must be merged by the operator and checked with
205
+ `cairn doctor`.
206
+
182
207
  For Kimi Code, bootstrap supplies a launcher and Kimi reads the repository's
183
208
  MCP configuration. A local stdio entry uses `cairn memory-server`. Remote Kimi
184
209
  configuration requires a literal URL and supports a token reference through
@@ -28,7 +28,7 @@ manifest, profile-lock, private-registry, and rollback contract.
28
28
  ## The launcher seams
29
29
 
30
30
  The generic launchers (`.ai/start-claude.sh`, `.ai/start-opencode.sh`,
31
- `.ai/start-kimi.sh`, `.ai/start-qwen.sh`, and `.ai/start-pi.sh`, scaffolded by `cairn bootstrap`) run
31
+ `.ai/start-kimi.sh`, `.ai/start-qwen.sh`, `.ai/start-codex.sh`, and `.ai/start-pi.sh`, scaffolded by `cairn bootstrap`) run
32
32
  optional hooks, each a no-op when absent:
33
33
 
34
34
  | Seam | When | Use it for |
@@ -13,13 +13,15 @@ commands, hooks, plugins, or trajectory adapters.
13
13
  | Kimi Code | Memory MCP, `AGENTS.md`, launcher, opt-in graph Skill | Launcher tested; remote MCP tested with Kimi Code 0.30.0; graph Skill contract-tested |
14
14
  | Qwen Code | Memory MCP, launcher | Launcher tested; stdio and remote MCP tested with Qwen Code 0.21.1 |
15
15
  | Pi | Memory MCP through maintained local stdio extension, native opt-in trajectory extension, launcher, and graph prompt | Pi 0.84.1 validated minimum; deterministic and real bridge/lifecycle tests |
16
- | Codex CLI | Memory MCP | Configuration supported; no Cairnkeep operating-layer assets or launcher |
16
+ | Codex CLI | Project-scoped memory MCP and launcher | Setup and launcher contract-tested on POSIX and simulated native Windows; project trust remains operator-controlled |
17
17
  | Other MCP clients | Memory plus optional domain-knowledge and context-pack tools | Protocol-compatible; not automatically runtime-tested |
18
18
 
19
19
  Only Claude Code and OpenCode currently receive the complete operating layer.
20
20
  Kimi receives one narrow graph Skill, while Pi receives one narrow graph prompt;
21
21
  neither is equivalent to the full commands, agents, hooks, and plugins surface.
22
22
  Qwen skills and hooks still require harness-specific adaptation and validation.
23
+ Codex receives a project-local MCP entry and launcher, but not Cairnkeep-specific
24
+ commands, hooks, agents, or automatic skill activation.
23
25
 
24
26
  Every MCP client receives complete tool annotations and may use a Cairnkeep
25
27
  least-authority profile independent of harness assets. Context-pack tools are
@@ -200,6 +202,37 @@ Git, and leave secret values as environment references.
200
202
  Qwen MCP configuration is documented at
201
203
  [Qwen Code MCP](https://qwenlm.github.io/qwen-code-docs/en/users/features/mcp/).
202
204
 
205
+ ## Codex CLI
206
+
207
+ Select Codex during setup to create a project-scoped local stdio entry and
208
+ launcher:
209
+
210
+ ```bash
211
+ cairn setup /path/to/project --git init --harness codex --memory local --yes
212
+ cd /path/to/project
213
+ ./.ai/start-codex.sh
214
+ ```
215
+
216
+ Native Windows uses `.\.ai\start-codex.cmd`. The generated
217
+ `.codex/config.toml` contains only:
218
+
219
+ ```toml
220
+ [mcp_servers.cairn-memory]
221
+ command = "cairn"
222
+ args = ["memory-server"]
223
+ ```
224
+
225
+ Review this file before accepting Codex's project-trust prompt. Cairnkeep does
226
+ not grant trust, edit the user-wide Codex configuration, or start Codex during
227
+ setup. If an operator-owned `.codex/config.toml` already differs, setup reports
228
+ `skipped` and leaves it unchanged; merge the table manually and run `cairn
229
+ doctor` to verify the effective entry. Uninstall never removes an
230
+ operator-owned configuration file.
231
+
232
+ The launcher loads `.ai/.env`, runs optional pre/post hooks, changes to the
233
+ project root, and passes all arguments to `codex`. It does not install native
234
+ Codex Skills or instructions and does not activate approved context-pack skills.
235
+
203
236
  ## Candidate memory clients
204
237
 
205
238
  The following clients have documented MCP support and are reasonable adapter
@@ -1,7 +1,7 @@
1
1
  # Curriculum Coverage Map
2
2
 
3
- **Baseline:** Cairnkeep 2.11.0
4
- **Last reviewed:** 2026-08-12
3
+ **Baseline:** Cairnkeep 2.12.0
4
+ **Last reviewed:** 2026-08-13
5
5
 
6
6
  This map prevents the course from drifting behind the product. It assigns each
7
7
  user-facing surface to a lesson and records whether the lesson is complete or
@@ -14,7 +14,8 @@ been rehearsed.
14
14
  | Product surface | Introduced | Practised or operated | Learning status |
15
15
  |---|---|---|---|
16
16
  | Local stdio memory and MCP registration | L00-L02 | L03-L04 | L00-L03 Ready; L04 Brief |
17
- | Project bootstrap, launchers, and contributor mode | L02-L03 | L05 | L02-L03 Ready; L05 Brief |
17
+ | Guided project setup, launchers, and bootstrap compatibility/contributor mode | L02-L03 | L05 and L23 | L02-L03 and L23 Ready; L05 Brief |
18
+ | Declarative harness registry and Codex project-scoped MCP setup | L03 | L03 and L23 | Ready; project trust remains explicit |
18
19
  | Memory scopes, keys, search, supersession, and history | L04 | L04-L05 | Brief |
19
20
  | Wiki, alignment, and repository quality workflows | L05-L06 | L05-L06 | Brief |
20
21
  | Optional local code graph, graph inspection, and harness delegates | L18 | L18 | Brief; default off |
@@ -35,7 +36,7 @@ been rehearsed.
35
36
  | Complete MCP annotations and least-authority tool profiles | L20 | L20 | Ready; default profile remains full |
36
37
  | Immutable context packs and exact-digest skill approval | L21 | L21 | Ready; default off |
37
38
  | Native Windows x64 CLI, hooks, ACLs, scheduling, and recovery | L22 | L22 | Ready; PowerShell-native |
38
- | Guided project setup, selected harness state, and Git-less limitations | L23 | L23 | Ready |
39
+ | Guided project setup, selected harness state, and Git-less limitations | L03 | L03 and L23 | Ready |
39
40
  | Pi local stdio memory bridge, trusted annotation details, and explicit lifecycle | L23 | L23 | Ready; Pi 0.84.1 validated minimum |
40
41
 
41
42
  ## Release Review
@@ -58,7 +59,7 @@ repository remains the canonical source for explanations and scripts.
58
59
  | Checkpoint | Lessons | Purpose |
59
60
  |---|---|---|
60
61
  | `course-00-app` | L00-L02 | Plain synthetic application before Cairnkeep |
61
- | `course-01-bootstrap` | L03 | Neutral bootstrap and isolated environment |
62
+ | `course-01-bootstrap` | L03 | Guided local setup, Codex project configuration, and isolated environment |
62
63
  | `course-02-memory` | L04-L05 | Memory lifecycle and derived knowledge |
63
64
  | `course-03-quality` | L06 | Repository review and deliberately vulnerable fixture |
64
65
  | `course-04-operation` | L07-L12 | Storage, routing, integrations, containers, overlays |
@@ -78,8 +79,8 @@ against `cairn help` so a new command cannot bypass a curriculum decision.
78
79
 
79
80
  | Command | Primary lesson |
80
81
  |---|---|
81
- | `cairn bootstrap` | L03 |
82
- | `cairn setup` | L23 |
82
+ | `cairn bootstrap` | L03 compatibility challenge |
83
+ | `cairn setup` | L03 for Claude/Codex; advanced Pi lifecycle in L23 |
83
84
  | `cairn memory-server` | L02 |
84
85
  | `cairn sync` | L02 |
85
86
  | `cairn sync-pi` | L13 and L23 |
@@ -1,6 +1,6 @@
1
1
  # Cairnkeep feature guide
2
2
 
3
- **Baseline:** Cairnkeep 2.11.0
3
+ **Baseline:** Cairnkeep 2.12.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
@@ -8,8 +8,10 @@ synthetic Trail Ledger project with tagged states from a plain application to
8
8
  offline evaluation. Detailed contracts remain in the linked operating,
9
9
  storage, privacy, and lesson documents.
10
10
 
11
- Guided setup and the maintained Pi memory extension ship in v2.11. See
12
- [L23](lessons/L23-guided-setup.md) for the tested boundary.
11
+ Guided setup and the maintained Pi memory extension shipped in v2.11. The v2.12
12
+ harness registry adds first-class Codex project setup without granting project
13
+ trust. See [L03](lessons/L03-first-project.md) and
14
+ [L23](lessons/L23-guided-setup.md) for the tested boundaries.
13
15
 
14
16
  ## The three-layer model
15
17
 
@@ -52,7 +54,8 @@ prerequisites for ordinary memory.
52
54
  | 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` |
53
55
  | 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` |
54
56
  | Repository quality | `/repo-review`, `/security-audit` | On-demand workflow; findings are hypotheses until reproduced | Require file/line evidence and regression tests | `course-03-quality` |
55
- | Guided project setup | `cairn setup PATH --git init\|existing\|none --harness LIST --memory local\|none --yes` | Reconciles only selected project 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` |
57
+ | 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` |
58
+ | 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` |
56
59
 
57
60
  ## Storage and optional topology
58
61
 
@@ -88,6 +91,8 @@ prerequisites for ordinary memory.
88
91
  ## Harness and maintenance checks
89
92
 
90
93
  - Use a generated launcher so project environment and hooks are repeatable.
94
+ - For Codex, review `.codex/config.toml` and accept project trust; no machine
95
+ sync is required for the memory-only integration.
91
96
  - Run `cairn sync --check` after every core upgrade; apply only reported drift.
92
97
  - Run `cairn sync-pi --check` when the Pi memory/trajectory/graph assets are installed.
93
98
  - Run `cairn sync-kimi --check` when the optional Kimi graph Skill is installed.
@@ -8,7 +8,8 @@ publication material.
8
8
 
9
9
  Choose the shortest track that matches your goal:
10
10
 
11
- - [Quickstart](tracks/quickstart.md) - prove the core value in about 75 minutes.
11
+ - [Quickstart](tracks/quickstart.md) - prove the core value, including the
12
+ one-command Codex project path and the explicit Pi lifecycle, in about 110 minutes.
12
13
  - [Practitioner](tracks/practitioner.md) - adopt Cairnkeep in daily project work.
13
14
  - [Evidence and evaluation](tracks/evidence-and-evaluation.md) - inspect optional
14
15
  session evidence, govern capabilities, and measure changes without overstating
@@ -33,7 +34,7 @@ expanded only after their labs are executable.
33
34
  | L00 | [Why Cairnkeep?](lessons/L00-why-cairnkeep.md) | Ready | 10 min |
34
35
  | L01 | [Try it safely](lessons/L01-safe-trial.md) | Ready | 15 min |
35
36
  | L02 | [Install the local workflow](lessons/L02-installation.md) | Ready | 25 min |
36
- | L03 | [Bootstrap the first project](lessons/L03-first-project.md) | Ready | 25 min |
37
+ | L03 | [Set up the first project](lessons/L03-first-project.md) | Ready | 25 min |
37
38
  | L04 | [Memory fundamentals](lessons/L04-memory-fundamentals.md) | Brief | 35 min |
38
39
  | L05 | [The daily workflow](lessons/L05-daily-workflow.md) | Brief | 40 min |
39
40
  | L06 | [Repository review and security](lessons/L06-repository-quality.md) | Brief | 45 min |
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 10 minutes
6
- **Tested with:** Cairnkeep 2.11.0
6
+ **Tested with:** Cairnkeep 2.12.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 15 minutes
6
- **Tested with:** Cairnkeep 2.11.0
6
+ **Tested with:** Cairnkeep 2.12.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.11.0
29
+ podman pull ghcr.io/cairnkeep/cairnkeep:2.12.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.11.0 stdio
41
+ ghcr.io/cairnkeep/cairnkeep:2.12.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.11.0 and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.12.0 and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
@@ -13,7 +13,8 @@ layer, and distinguish a complete installation from a partial one.
13
13
  ## Prerequisites
14
14
 
15
15
  - Node.js 22 or newer and npm.
16
- - Claude Code installed for the commands below. OpenCode, Kimi Code, and Qwen Code users
16
+ - Claude Code installed for the full operating-layer commands below. Codex CLI
17
+ users can take the project-scoped path in L03. OpenCode, Kimi Code, and Qwen Code users
17
18
  should follow the equivalent setup in
18
19
  [the operating guide](../../operating.md).
19
20
  - Permission to install an npm package globally for your user.
@@ -26,8 +27,13 @@ A complete setup has three independent parts:
26
27
  2. the MCP registration used by the harness;
27
28
  3. the operating layer containing commands, agents, hooks, and templates.
28
29
 
29
- `cairn bootstrap` configures a project later; it does not perform the first two
30
- machine-level steps.
30
+ `cairn setup` configures a project later; it does not perform the first two
31
+ machine-level steps. `cairn bootstrap` remains the compatibility primitive for
32
+ scripts and overlays that already own their setup policy.
33
+
34
+ Codex is the simpler memory-only exception: L03 writes its project-scoped MCP
35
+ entry and launcher, so it needs no user-wide MCP registration or machine-level
36
+ sync. Codex project trust remains an explicit operator decision.
31
37
 
32
38
  ## Exercise
33
39
 
@@ -41,7 +47,7 @@ machine-level steps.
41
47
  2. Install Cairnkeep:
42
48
 
43
49
  ```bash
44
- npm install --global @cairnkeep/cli@2.11.0
50
+ npm install --global @cairnkeep/cli@2.12.0
45
51
  cairn --version
46
52
  ```
47
53
 
@@ -78,7 +84,7 @@ machine-level steps.
78
84
  Invoke-Expression (& cairn completion powershell | Out-String)
79
85
  ```
80
86
 
81
- Bootstrap emits `.cmd` launchers on Windows; use
87
+ Project setup emits `.cmd` launchers on Windows; use
82
88
  `.\.ai\start-claude.cmd` instead of the Unix `.sh` launcher.
83
89
 
84
90
  ## Verify
@@ -108,8 +114,9 @@ installation.
108
114
  This registration starts `cairn memory-server` locally as a stdio child. It
109
115
  does not discover a server, send memory to a remote host, configure embeddings,
110
116
  enable session capture, or enable an optional document-RAG integration. Pi uses
111
- the separate `cairn sync-pi` trajectory and graph-prompt adapter and still needs
112
- a user-selected bridge if Pi should expose MCP memory tools.
117
+ the separate, explicit `cairn sync-pi --apply` command to install Cairnkeep's
118
+ maintained local stdio memory extension, trajectory extension, and graph prompt.
119
+ Project setup records the Pi selection but never changes machine-level Pi assets.
113
120
 
114
121
  Kimi Code can use the same memory server through its generated
115
122
  `.ai/start-kimi.sh` launcher, but its HTTP MCP configuration requires a literal
@@ -145,4 +152,4 @@ Do not delete memory stores as part of a course cleanup.
145
152
  - `sync --check` is the non-writing drift check.
146
153
  - Default stdio memory is local.
147
154
 
148
- Next: [L03 - Bootstrap the first project](L03-first-project.md).
155
+ Next: [L03 - Set up the first project](L03-first-project.md).
@@ -1,14 +1,15 @@
1
- # L03 - Bootstrap the first project
1
+ # L03 - Set up the first project
2
2
 
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 25 minutes
6
- **Tested with:** Cairnkeep 2.11.0
6
+ **Tested with:** Cairnkeep 2.12.0
7
7
 
8
8
  ## Outcome
9
9
 
10
- You can bootstrap a disposable project, verify its wiring, store one accepted
11
- fact, and recall it from a new harness session.
10
+ You can use the guided setup contract on an empty directory, choose Claude Code
11
+ or Codex CLI, verify its Git and harness wiring, store one accepted fact, and
12
+ recall it from a new session.
12
13
 
13
14
  ## Prerequisites
14
15
 
@@ -18,22 +19,32 @@ fact, and recall it from a new harness session.
18
19
 
19
20
  ## Exercise
20
21
 
21
- 1. Create a disposable repository:
22
+ 1. Create an empty disposable project directory:
22
23
 
23
24
  ```bash
24
25
  mkdir -p "$HOME/cairnkeep-course/first-project"
25
26
  cd "$HOME/cairnkeep-course/first-project"
26
- git init
27
- printf '# Cairnkeep course project\n' > README.md
28
27
  ```
29
28
 
30
- 2. Bootstrap the project:
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`:
31
33
 
32
34
  ```bash
33
- cairn bootstrap "$PWD"
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
40
  cp .ai/env.example .ai/.env
35
41
  ```
36
42
 
43
+ Setup must create the Git repository, generate only the selected harness
44
+ assets, and write the private `.ai/cairnkeep.json` setup record. Codex also
45
+ receives `.codex/config.toml`; review it and accept Codex's project-trust
46
+ prompt before launching.
47
+
37
48
  3. Keep optional endpoint and model values unset for this local exercise. Run
38
49
  diagnostics:
39
50
 
@@ -45,10 +56,11 @@ fact, and recall it from a new harness session.
45
56
  and evaluation flags unset. The quickstart proves core memory without
46
57
  silently changing the amount of retained data.
47
58
 
48
- 4. Launch Claude Code through the generated project launcher:
59
+ 4. Launch the selected harness through its generated project launcher:
49
60
 
50
61
  ```bash
51
62
  ./.ai/start-claude.sh
63
+ # Codex route: ./.ai/start-codex.sh
52
64
  ```
53
65
 
54
66
  5. In the harness, store a deliberately synthetic convention:
@@ -79,9 +91,11 @@ The lesson is complete only if:
79
91
 
80
92
  | Symptom | Cause | Recovery |
81
93
  |---|---|---|
82
- | Launcher is missing | A different directory was bootstrapped | Run `pwd`, then bootstrap that exact path |
94
+ | Setup refuses the target | The directory is non-empty or its Git state conflicts with `--git init` | Preserve the directory, inspect it, then select `--git existing` or use a genuinely empty disposable path |
95
+ | Launcher is missing | A different directory was configured or Claude was not selected | Run `pwd`, inspect `.ai/cairnkeep.json`, then replay the recovery command from `cairn doctor` |
83
96
  | `.ai/.env` is missing | Only the example is generated | Copy `.ai/env.example` to `.ai/.env` |
84
- | `cairn-memory` is unavailable | L02 MCP registration is absent or stale | Run `claude mcp get cairn-memory`, repair it, then restart Claude Code |
97
+ | `cairn-memory` is unavailable in Claude | L02 MCP registration is absent or stale | Run `claude mcp get cairn-memory`, repair it, then restart Claude Code |
98
+ | `cairn-memory` is unavailable in Codex | Project configuration was skipped or the project is not trusted | Review/merge `.codex/config.toml`, rerun setup, then accept project trust and relaunch |
85
99
  | Slash commands are unknown | Operating assets were not loaded | Run `cairn sync --check`, apply if needed, then restart the harness |
86
100
  | Recall works only in the first session | Sessions used different storage routing | Compare launchers and environment, then inspect `cairn memory path` |
87
101
 
@@ -105,13 +119,18 @@ synthetic memory through the normal memory review/delete workflow if required.
105
119
 
106
120
  ## Optional challenge
107
121
 
108
- Repeat bootstrap with `--untracked` in another disposable Git repository, then
109
- inspect `.git/info/exclude` to see how contributor mode avoids shared changes.
122
+ Create another disposable Git repository and run `cairn bootstrap --untracked`
123
+ there. Inspect `.git/info/exclude` to see how the compatibility primitive keeps
124
+ contributor-mode scaffolding out of shared changes.
110
125
 
111
126
  ## Recap
112
127
 
113
- - Bootstrap is project-specific and follows machine setup.
128
+ - Guided setup owns target preflight, Git choice, harness selection, and a
129
+ private reconciliation record.
130
+ - Bootstrap remains available for compatibility and contributor workflows.
114
131
  - The generated launcher establishes a repeatable project environment.
132
+ - Codex memory setup is project-scoped and does not silently grant trust or
133
+ modify the user-wide Codex configuration.
115
134
  - Persistence is proven only after a new session recalls the accepted fact.
116
135
 
117
136
  Next: [L04 - Memory fundamentals](L04-memory-fundamentals.md).
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Evidence and Evaluation
5
5
  **Time:** 50 minutes
6
- **Tested with:** Cairnkeep 2.11.0
6
+ **Tested with:** Cairnkeep 2.12.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.11.0 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.12.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.11.0 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.12.0 and Node.js 22 or newer
5
5
  **Time:** 40 minutes
6
6
 
7
7
  ## Outcome
@@ -3,25 +3,25 @@
3
3
  **Status:** Ready
4
4
  **Track:** Operator
5
5
  **Time:** 30 minutes
6
- **Tested with:** Cairnkeep 2.11.0, Windows x64, and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.12.0, Windows x64, and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
10
- You can prove that Cairnkeep is running natively from PowerShell, bootstrap a
11
- path containing spaces, inspect its security boundary, and perform a reversible
12
- uninstall without relying on WSL or Git Bash.
10
+ You can prove that Cairnkeep is running natively from PowerShell, run guided
11
+ setup on an empty path containing spaces, inspect its security boundary, and
12
+ perform a reversible uninstall without relying on WSL or Git Bash.
13
13
 
14
14
  ## Exercise
15
15
 
16
16
  From PowerShell:
17
17
 
18
18
  ```powershell
19
- npm install --global @cairnkeep/cli@2.11.0
19
+ npm install --global @cairnkeep/cli@2.12.0
20
20
  cairn version
21
21
 
22
22
  $Lab = Join-Path $env:TEMP 'Cairnkeep Windows Lab'
23
23
  New-Item -ItemType Directory -Force -Path $Lab | Out-Null
24
- cairn bootstrap $Lab
24
+ cairn setup $Lab --git init --harness claude --memory local --yes
25
25
  cairn sync --apply --live-root (Join-Path $Lab '.claude-test')
26
26
  cairn sync --check --live-root (Join-Path $Lab '.claude-test')
27
27
  Push-Location $Lab
@@ -29,9 +29,9 @@ cairn doctor
29
29
  Pop-Location
30
30
  ```
31
31
 
32
- Verify that `.ai/start-claude.cmd`, `.ai/start-harness.ps1`, and the managed
33
- Claude assets exist. `cairn doctor` must identify native Windows x64 and complete
34
- an MCP stdio handshake.
32
+ Verify that `.git`, `.ai/cairnkeep.json`, `.ai/start-claude.cmd`,
33
+ `.ai/start-harness.ps1`, and the managed Claude assets exist. `cairn doctor`
34
+ must identify native Windows x64 and complete an MCP stdio handshake.
35
35
 
36
36
  ## Permission check
37
37
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart and Operator
5
5
  **Time:** 35 minutes
6
- **Tested with:** Cairnkeep 2.11.0; Pi 0.84.1; Node.js 22, 24, and 26
6
+ **Tested with:** Cairnkeep 2.12.0; Pi 0.84.1; Node.js 22, 24, and 26
7
7
 
8
8
  ## Outcome
9
9
 
@@ -11,6 +11,10 @@ You can classify a missing or empty target, replay setup without a TTY, explain
11
11
  the limitations of Git-less mode, verify Pi's local stdio memory bridge, and
12
12
  recover or uninstall every managed asset without hidden machine changes.
13
13
 
14
+ The selected harnesses come from Cairnkeep's declarative registry. Codex is a
15
+ supported selection: it receives `.codex/config.toml` and a launcher, while Pi
16
+ continues to require its separate explicit machine sync.
17
+
14
18
  ## Prerequisites
15
19
 
16
20
  - Node.js 22 or newer, npm, and Git for the main exercise.
@@ -130,7 +134,7 @@ prompts, approve skills, create an autonomous loop, or add remote access.
130
134
 
131
135
  ## Release boundary
132
136
 
133
- Ready means this lesson and its deterministic contracts pass against v2.11.0.
137
+ Ready means this lesson and its deterministic contracts pass against v2.12.0.
134
138
  Release readiness requires a non-skipping acceptance run
135
139
  against separate Pi 0.84.1 minimum and explicitly versioned registry-current
136
140
  installations, plus the documented Node.js, Bash 3.2, and native Windows matrix.
@@ -7,14 +7,15 @@
7
7
  1. [L00 - Why Cairnkeep?](../lessons/L00-why-cairnkeep.md)
8
8
  2. [L01 - Try it safely](../lessons/L01-safe-trial.md)
9
9
  3. [L02 - Install the local workflow](../lessons/L02-installation.md)
10
- 4. [L03 - Bootstrap the first project](../lessons/L03-first-project.md)
10
+ 4. [L03 - Set up the first project](../lessons/L03-first-project.md)
11
11
  5. [L23 - Guided setup and Pi memory](../lessons/L23-guided-setup.md)
12
12
 
13
13
  The track is complete when a learner can start a new harness session, retrieve
14
14
  a previously accepted fact, and explain that default stdio memory is stored on
15
- the local machine rather than a discovered remote service. L23 then shows how
16
- the recommended guided entry point preserves deterministic automation and keeps
17
- Pi machine sync explicit. This guided surface ships in v2.11.
15
+ the local machine rather than a discovered remote service. L03 uses the
16
+ recommended guided entry point and offers Codex's project-scoped path without a
17
+ separate machine sync; L23 extends that contract to Pi's maintained local stdio
18
+ bridge while keeping its machine sync explicit.
18
19
 
19
20
  Hands-on spine: `course-00-app` through `course-01-bootstrap`, followed by
20
21
  `course-12-guided-setup`, in the public