@cairnkeep/cli 2.4.0 → 2.5.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 (41) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +12 -1
  3. package/docs/building-an-overlay.md +4 -3
  4. package/docs/harness-compatibility.md +117 -0
  5. package/docs/learning/CURRICULUM-MAP.md +91 -0
  6. package/docs/learning/FEATURE-GUIDE.md +86 -0
  7. package/docs/learning/PRODUCTION-PLAN.md +45 -14
  8. package/docs/learning/README.md +20 -1
  9. package/docs/learning/instructor-guide.md +6 -0
  10. package/docs/learning/lessons/L00-why-cairnkeep.md +20 -8
  11. package/docs/learning/lessons/L01-safe-trial.md +3 -3
  12. package/docs/learning/lessons/L02-installation.md +23 -5
  13. package/docs/learning/lessons/L03-first-project.md +7 -2
  14. package/docs/learning/lessons/L04-memory-fundamentals.md +4 -0
  15. package/docs/learning/lessons/L05-daily-workflow.md +4 -0
  16. package/docs/learning/lessons/L07-privacy-and-storage.md +3 -0
  17. package/docs/learning/lessons/L10-context-exploration.md +4 -2
  18. package/docs/learning/lessons/L12-managed-overlays.md +2 -0
  19. package/docs/learning/lessons/L13-session-evidence.md +71 -0
  20. package/docs/learning/lessons/L14-typed-memory.md +51 -0
  21. package/docs/learning/lessons/L15-capability-governance.md +56 -0
  22. package/docs/learning/lessons/L16-evaluation.md +67 -0
  23. package/docs/learning/lessons/L17-agent-boundary.md +55 -0
  24. package/docs/learning/templates/lesson-template.md +4 -1
  25. package/docs/learning/tracks/evidence-and-evaluation.md +20 -0
  26. package/docs/learning/tracks/operator.md +8 -2
  27. package/docs/learning/tracks/practitioner.md +6 -1
  28. package/docs/learning/tracks/quickstart.md +3 -0
  29. package/docs/learning/video-scripts/L00-why-cairnkeep.md +21 -17
  30. package/docs/learning/video-scripts/L02-installation.md +9 -2
  31. package/docs/learning/video-scripts/L03-first-project.md +3 -0
  32. package/docs/operating.md +38 -5
  33. package/examples/eval/bundled-fake.json +1 -1
  34. package/package.json +1 -1
  35. package/scripts/bootstrap.sh +2 -0
  36. package/scripts/test-bootstrap-untracked.sh +2 -1
  37. package/scripts/test-launcher-hooks.sh +29 -1
  38. package/scripts/test-learning-docs.sh +20 -4
  39. package/scripts/test-package-install.sh +3 -0
  40. package/scripts/uninstall.sh +1 -0
  41. package/templates/start-kimi.sh.template +39 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable user-facing changes are documented here. This project follows
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.5.0] - 2026-07-29
9
+
10
+ ### Added
11
+
12
+ - Add Kimi Code as a supported memory client with a generated project launcher,
13
+ local stdio guidance, and tested authenticated remote HTTP configuration.
14
+ - Add an explicit harness compatibility matrix and a documented validation
15
+ process for future MCP clients.
16
+
17
+ ### Fixed
18
+
19
+ - Document that Kimi requires a literal MCP URL and a token reference through
20
+ `bearerTokenEnvVar`, preventing invalid `${VAR}` URL configurations without
21
+ writing bearer-token values to project files.
22
+
8
23
  ## [2.4.0] - 2026-07-29
9
24
 
10
25
  ### Added
@@ -196,7 +211,8 @@ stored memories.
196
211
  - Preserve executable permissions and Bash 3.2 portability on macOS.
197
212
  - Add backup-first uninstall and SQLite-safe memory export/import guidance.
198
213
 
199
- [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.4.0...HEAD
214
+ [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.5.0...HEAD
215
+ [2.5.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.4.0...v2.5.0
200
216
  [2.4.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.3.1...v2.4.0
201
217
  [2.3.1]: https://github.com/cairnkeep/cairnkeep/compare/v2.3.0...v2.3.1
202
218
  [2.3.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.2.1...v2.3.0
package/README.md CHANGED
@@ -9,7 +9,8 @@
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, Pi, …).
12
+ across sessions, projects, and harnesses (Claude Code, OpenCode, Kimi Code,
13
+ Pi, and other MCP clients).
13
14
 
14
15
  ## Status
15
16
 
@@ -36,6 +37,7 @@ and 20 are end-of-life upstream.
36
37
  |---|---|
37
38
  | Claude Code on Linux/macOS | Memory server plus commands, agents, hooks, and launchers |
38
39
  | OpenCode on Linux/macOS | Memory server plus commands, plugins, hooks, and launchers |
40
+ | Kimi Code on Linux/macOS | Memory MCP server plus project launcher; no Cairnkeep operating-layer assets yet |
39
41
  | Pi on Linux/macOS | Native opt-in trajectory extension and launcher; no bundled MCP bridge |
40
42
  | Codex CLI | Memory MCP server; no Cairnkeep operating-layer assets |
41
43
  | Other MCP clients | Memory and optional domain-knowledge MCP tools |
@@ -44,6 +46,9 @@ and 20 are end-of-life upstream.
44
46
  Linux, macOS, Bash 3.2 portability, and clean Node 22/24/26 runtime checks
45
47
  are exercised in CI.
46
48
 
49
+ See [Harness compatibility](docs/harness-compatibility.md) for exact support
50
+ levels, Kimi configuration, and candidates that are not yet runtime-tested.
51
+
47
52
  ## Try with Podman
48
53
 
49
54
  The minimal OCI image runs the memory server as an unprivileged user and keeps
@@ -148,6 +153,12 @@ patterns/transactional-migrations: Use transactional migrations for schema chang
148
153
  The exact command rendering depends on the client. Any MCP client can call
149
154
  `memory_write` and `memory_search` directly.
150
155
 
156
+ For Kimi Code, bootstrap supplies a launcher and Kimi reads the repository's
157
+ MCP configuration. A local stdio entry uses `cairn memory-server`. Remote Kimi
158
+ configuration requires a literal URL and supports a token reference through
159
+ `bearerTokenEnvVar`; it does not expand `${VAR}` in the URL. See
160
+ [Harness compatibility](docs/harness-compatibility.md#kimi-code).
161
+
151
162
  For Pi, install the local trajectory adapter and use the scaffolded launcher:
152
163
 
153
164
  ```bash
@@ -27,13 +27,14 @@ manifest, profile-lock, private-registry, and rollback contract.
27
27
 
28
28
  ## The launcher seams
29
29
 
30
- The generic launchers (`.ai/start-claude.sh`, `.ai/start-opencode.sh`, scaffolded
31
- by `cairn bootstrap`) run three optional hooks, each a no-op when absent:
30
+ The generic launchers (`.ai/start-claude.sh`, `.ai/start-opencode.sh`,
31
+ `.ai/start-kimi.sh`, and `.ai/start-pi.sh`, scaffolded by `cairn bootstrap`) run
32
+ optional hooks, each a no-op when absent:
32
33
 
33
34
  | Seam | When | Use it for |
34
35
  |---|---|---|
35
36
  | `.ai/pre-launch.sh` | sourced after `.env`, before launch | export a provider base URL / credentials, refresh a token, run a connectivity check, or **abort** the launch by returning non-zero |
36
- | `CAIRN_EXTRA_SETTINGS` | read just before launch | path to a settings file layered onto the harness (`--settings` for Claude Code, `OPENCODE_CONFIG` for OpenCode); process env still wins, so an inline value beats the file |
37
+ | `CAIRN_EXTRA_SETTINGS` | read just before launch | path to a settings file layered onto Claude Code (`--settings`) or OpenCode (`OPENCODE_CONFIG`); Kimi and Pi leave it available to hooks but do not interpret it |
37
38
  | `.ai/post-exit.sh` | sourced after the harness exits | teardown; `CAIRN_EXIT_STATUS` holds the exit code |
38
39
 
39
40
  **Typical overlay launcher** — a corporate wrapper needs a non-default provider
@@ -0,0 +1,117 @@
1
+ # Harness compatibility
2
+
3
+ Cairnkeep separates memory transport from harness-specific operating assets.
4
+ An MCP client can use the memory tools without also supporting Cairnkeep's
5
+ commands, hooks, plugins, or trajectory adapters.
6
+
7
+ ## Support levels
8
+
9
+ | Harness | Supported surface | Runtime status |
10
+ |---|---|---|
11
+ | Claude Code | Memory MCP, commands, agents, hooks, launcher | Exercised by Cairnkeep tests |
12
+ | OpenCode | Memory MCP, commands, workflows, plugins, launcher | Exercised by Cairnkeep tests |
13
+ | Kimi Code | Memory MCP, `AGENTS.md`, launcher | Launcher tested; remote MCP tested with Kimi Code 0.30.0 |
14
+ | Pi | Native opt-in trajectory extension and launcher | Exercised by Cairnkeep tests; no bundled MCP bridge |
15
+ | Codex CLI | Memory MCP | Configuration supported; no Cairnkeep operating-layer assets or launcher |
16
+ | Other MCP clients | Memory and optional domain-knowledge tools | Protocol-compatible; not automatically runtime-tested |
17
+
18
+ Only Claude Code and OpenCode currently receive the complete operating layer.
19
+ Kimi skills and hooks require harness-specific adaptation and validation before
20
+ they can be presented as equivalent. In Kimi, call MCP tools directly or use
21
+ ordinary prompts until that work is complete.
22
+
23
+ ## Kimi Code
24
+
25
+ Kimi Code reads three MCP files, in increasing precedence:
26
+
27
+ 1. `~/.kimi-code/mcp.json`;
28
+ 2. the repository-root `.mcp.json`, for Claude compatibility;
29
+ 3. `.kimi-code/mcp.json` in the working directory.
30
+
31
+ Each file must be valid before entries are merged. A later Kimi-specific entry
32
+ does not rescue an invalid repository-root entry.
33
+
34
+ ### Local stdio
35
+
36
+ Create `.kimi-code/mcp.json` in a trusted project:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "cairn-memory": {
42
+ "command": "cairn",
43
+ "args": ["memory-server"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ Then launch through the generated project launcher:
50
+
51
+ ```bash
52
+ ./.ai/start-kimi.sh
53
+ ```
54
+
55
+ The server is a local child process and writes to the storage selected by the
56
+ launcher's `.ai/.env`. Kimi warns that project MCP commands execute when a
57
+ session starts, so use this only in a repository you trust.
58
+
59
+ ### Remote HTTP
60
+
61
+ Kimi validates `url` as a literal URL and does not expand `${VAR}` there. Keep
62
+ the resolved URL in a private `.kimi-code/mcp.json`, reference the bearer token
63
+ by environment-variable name, and keep non-secret routing headers explicit:
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "cairn-memory": {
69
+ "url": "https://memory.example.com/mcp",
70
+ "bearerTokenEnvVar": "CAIRN_MEMORY_HTTP_TOKEN",
71
+ "headers": {
72
+ "X-Cairn-Project": "example-project",
73
+ "X-Cairn-Scopes": "identity,personal,project",
74
+ "X-Cairn-AnythingLLM-Workspaces": "example-workspace"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ Do not commit the private file when the endpoint or routing metadata is private.
82
+ Add it to `.git/info/exclude` or generate it through an overlay. The token value
83
+ stays in `.ai/.env` and is read at connection time.
84
+
85
+ If the repository-root `.mcp.json` contains
86
+ `"url": "${CAIRN_MEMORY_REMOTE_URL}"`, Kimi fails before launch with
87
+ `Invalid URL`. Replace that private file's URL with a resolved value, or remove
88
+ the entry when Kimi's private override is the intended owner. Do not place the
89
+ token value in either file.
90
+
91
+ Kimi MCP configuration is documented at
92
+ [Kimi Code MCP](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/mcp.html).
93
+
94
+ ## Candidate memory clients
95
+
96
+ The following clients have documented MCP support and are reasonable adapter
97
+ candidates, but Cairnkeep does not yet ship their launchers, configuration
98
+ writers, operating assets, or runtime CI:
99
+
100
+ | Client | Documented MCP surface | Cairnkeep status |
101
+ |---|---|---|
102
+ | Gemini CLI | `mcpServers` in `settings.json` | Candidate for stdio and HTTP memory tests |
103
+ | GitHub Copilot CLI | `copilot mcp` and `.mcp.json` | Candidate for memory plus shared skills |
104
+ | Qwen Code | `qwen mcp` and MCP configuration | Candidate for stdio and HTTP memory tests |
105
+ | goose | MCP extensions and CLI session extension loading | Candidate for memory and recipe integration |
106
+
107
+ Primary references:
108
+
109
+ - [Gemini CLI MCP](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)
110
+ - [GitHub Copilot CLI MCP](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers)
111
+ - [Qwen Code MCP](https://qwenlm.github.io/qwen-code-docs/en/users/features/mcp/)
112
+ - [goose](https://github.com/aaif-goose/goose)
113
+
114
+ Support should be added one client at a time with a clean install, a local
115
+ stdio handshake, an authenticated HTTP handshake, a real write/recall canary,
116
+ storage-path verification, and removal instructions. Documented MCP support by
117
+ itself is not enough to claim Cairnkeep support.
@@ -0,0 +1,91 @@
1
+ # Curriculum Coverage Map
2
+
3
+ **Baseline:** Cairnkeep 2.5.0
4
+ **Last reviewed:** 2026-07-29
5
+
6
+ This map prevents the course from drifting behind the product. It assigns each
7
+ user-facing surface to a lesson and records whether the lesson is complete or
8
+ still a production brief. A feature may be shipped while its lesson is still a
9
+ brief; the status must remain visible rather than implying that the exercise has
10
+ been rehearsed.
11
+
12
+ ## Coverage
13
+
14
+ | Product surface | Introduced | Practised or operated | Learning status |
15
+ |---|---|---|---|
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 |
18
+ | Memory scopes, keys, search, supersession, and history | L04 | L04-L05 | Brief |
19
+ | Wiki, alignment, graph, and repository quality workflows | L05-L06 | L05-L06 | Brief |
20
+ | Storage placement, export/import, and authenticated remote memory | L07 | L07-L08 | Brief |
21
+ | Document RAG | L00 | L09 | Brief; optional |
22
+ | token-miser exploration and routing | L00 | L10 | Brief; optional |
23
+ | Rootless containers and persistent service operation | L01 | L11 | L01 Ready; L11 Brief |
24
+ | Private managed distributions | L12 | L12 | Brief; optional |
25
+ | Structured trajectories and Pi capture adapter | L13 | L13 | Brief; default off |
26
+ | Hindsight-note distillation, lookup, enrichment, and promotion | L13 | L13-L14 | Brief; default off |
27
+ | Compaction continuity and immutable artifacts | L13 | L13 | Brief; default off |
28
+ | Typed memory nodes, filters, address spaces, and structured import | L14 | L14 | Brief; default off |
29
+ | Managed eight-capability contract and payload-free callbacks | L15 | L15-L16 | Brief; default off |
30
+ | Deterministic two-pass evaluation and one-capability ablation | L16 | L16 | Brief; default off |
31
+ | Shell completion | L02 | L02 | Ready; optional convenience |
32
+ | Bounded meta-agent configuration loop | L17 | None | Design-only; not shipped |
33
+
34
+ ## Release Review
35
+
36
+ For every minor release:
37
+
38
+ 1. Compare the changelog and `cairn help` with this table.
39
+ 2. Assign every new command, store, network flow, or runtime default to a
40
+ lesson before release.
41
+ 3. Re-run commands in every Ready lesson against the release candidate.
42
+ 4. Update `Tested with` only after those commands pass.
43
+ 5. Keep untested additions as Brief, even when the underlying feature ships.
44
+ 6. Re-record only scripts whose observable behavior or mental model changed.
45
+
46
+ ## Course Spine
47
+
48
+ The public `cairnkeep-course-labs` repository is the executable spine; this
49
+ repository remains the canonical source for explanations and scripts.
50
+
51
+ | Checkpoint | Lessons | Purpose |
52
+ |---|---|---|
53
+ | `course-00-app` | L00-L02 | Plain synthetic application before Cairnkeep |
54
+ | `course-01-bootstrap` | L03 | Neutral bootstrap and isolated environment |
55
+ | `course-02-memory` | L04-L05 | Memory lifecycle and derived knowledge |
56
+ | `course-03-quality` | L06 | Repository review and deliberately vulnerable fixture |
57
+ | `course-04-operation` | L07-L12 | Storage, routing, integrations, containers, overlays |
58
+ | `course-05-evidence` | L13-L14 | Evidence lifecycle and typed memory |
59
+ | `course-06-governance` | L15 | Capability precedence and restart boundaries |
60
+ | `course-07-evaluation` | L16-L17 | Package-owned offline fixture and design boundary |
61
+
62
+ ## Command Ownership
63
+
64
+ Every top-level CLI command has a teaching destination. This table is checked
65
+ against `cairn help` so a new command cannot bypass a curriculum decision.
66
+
67
+ | Command | Primary lesson |
68
+ |---|---|
69
+ | `cairn bootstrap` | L03 |
70
+ | `cairn memory-server` | L02 |
71
+ | `cairn sync` | L02 |
72
+ | `cairn sync-pi` | L13 |
73
+ | `cairn doctor` | L03; advanced repair in L13-L14 |
74
+ | `cairn trajectory` | L13 |
75
+ | `cairn artifact` | L13 |
76
+ | `cairn capabilities` | L15 |
77
+ | `cairn notes` | L13 |
78
+ | `cairn eval` | L16 |
79
+ | `cairn memory` | L07-L08 |
80
+ | `cairn audit-timer` | L05 and L13 |
81
+ | `cairn uninstall` | L02 and L11-L12 |
82
+ | `cairn completion` | L02 |
83
+ | `cairn version` | L02 |
84
+ | `cairn help` | L02 |
85
+
86
+ ## Claim Boundary
87
+
88
+ The bundled evaluation fixtures prove framework mechanics only. They do not
89
+ show that Cairnkeep improves quality, efficiency, cost, or latency. Course
90
+ material may teach how to design and inspect an experiment, but it must not make
91
+ a product-performance claim without separately validated live evidence.
@@ -0,0 +1,86 @@
1
+ # Cairnkeep feature guide
2
+
3
+ **Baseline:** Cairnkeep 2.5.0
4
+
5
+ This is the step-back map for choosing and operating Cairnkeep features. The
6
+ [course labs](https://github.com/cairnkeep/cairnkeep-course-labs) provide one
7
+ synthetic Trail Ledger project with tagged states from a plain application to
8
+ offline evaluation. Detailed contracts remain in the linked operating,
9
+ storage, privacy, and lesson documents.
10
+
11
+ ## The three-layer model
12
+
13
+ 1. **Memory server:** an MCP process that owns scoped durable storage. The
14
+ default stdio setup runs on the current machine; installation never
15
+ discovers or selects a remote host.
16
+ 2. **Project scaffold:** launchers, private environment, and `.planning/`
17
+ policy/derived-knowledge files created by `cairn bootstrap`.
18
+ 3. **Operating layer:** harness commands, agents, and hooks installed by
19
+ `cairn sync --apply` or the harness-specific equivalent.
20
+
21
+ Run setup in that order, then confirm `cairn doctor`, `cairn sync --check`, and
22
+ `cairn memory path` before trusting the installation.
23
+
24
+ ## Recommended adoption sequence
25
+
26
+ | Stage | Add | Stop here when |
27
+ |---|---|---|
28
+ | 1 | Local memory, review, recall, history | Durable project context is the only goal |
29
+ | 2 | Wiki, alignment, graph, repository/security review | Tracked derived knowledge and quality workflows are sufficient |
30
+ | 3 | Backup, migration, multiple-machine routing | Storage placement and recovery are predictable |
31
+ | 4 | Document RAG or context exploration | An optional external corpus or faster repository exploration is justified |
32
+ | 5 | Trajectories, notes, compaction, artifacts | Local session evidence has an explicit retention purpose |
33
+ | 6 | Typed nodes and capability governance | Filtering and centrally inspectable feature state are needed |
34
+ | 7 | Evaluation and ablation | A concrete change needs bounded measurement |
35
+
36
+ Every stage is independently useful. Stages 4-7 are opt-in and are not
37
+ prerequisites for ordinary memory.
38
+
39
+ ## Core and derived knowledge
40
+
41
+ | Surface | Interface | Default and storage | Verify or reverse | Course checkpoint |
42
+ |---|---|---|---|---|
43
+ | Scoped memory | `/remember`, `/recall`, MCP memory tools | Available after MCP registration; named/global DBs under `CAIRN_AGENTFS_BASE_DIR`, project DB under `<server-cwd>/.agentfs/` | Recall in a new session; use reviewed delete/supersession rather than filesystem removal | `course-02-memory` |
44
+ | Memory lifecycle | `/memory-review`, `memory_supersede`, `memory_history`, reviewed apply/invalidate tools | Durable history; no automatic promotion | Inspect key history and provenance | `course-02-memory` |
45
+ | 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` |
46
+ | Knowledge graph | `/graphify` and graph tools | Disabled until configured/invoked; derived graph files | Rebuild from canonical sources; never treat the graph as canonical | `course-02-memory` |
47
+ | Repository quality | `/repo-review`, `/security-audit` | On-demand workflow; findings are hypotheses until reproduced | Require file/line evidence and regression tests | `course-03-quality` |
48
+
49
+ ## Storage and optional topology
50
+
51
+ | Surface | Enable | Data/network boundary | Verify or reverse | Course checkpoint |
52
+ |---|---|---|---|---|
53
+ | Backup/restore | `cairn memory path|export|import` | Export is WAL-safe for named/global DBs and requires `sqlite3`; import backs up replaced DBs and is not a merge | Restore first into a disposable store, then run doctor/recall | `course-04-operation` |
54
+ | Remote memory | Explicit authenticated HTTP server plus explicit client URL/token | Storage belongs to the server host; project headers route but are not authorization | Inspect effective routing and run legacy/project canaries; revert client registration to stdio | `course-04-operation` |
55
+ | Multiple machines | Deliberate local-per-machine or shared-server policy | No automatic account, host, or endpoint discovery | Predict the server process and DB path from each launcher before use | `course-04-operation` |
56
+ | Document RAG | Configure the optional RAG endpoint/key and workspace | Selected documents may leave the repository for the configured service | Verify citations and sync status; unset configuration to return to standalone memory | `course-04-operation` |
57
+ | Context exploration | Configure an operator-owned exploration binary or route endpoint | Source/context goes only to the selected local or remote component | Check citations/cache; remove variables and relaunch | `course-04-operation` |
58
+ | Containers | Rootless memory or workspace launcher | Named volumes persist; shared checkout mode is read/write, sandbox mode copies into a volume | Inspect mounts/volumes; remove only explicitly named disposable resources | `course-04-operation` |
59
+ | Managed overlays | Separate distribution manifest, wrapper, profile lock, fleet and rollback gates | Policy and secrets belong in the private distribution/machine config, never core | `overlay info`, doctor, fleet dry run/current state, rollback | `course-04-operation` |
60
+
61
+ ## Evidence, governance, and measurement
62
+
63
+ | Surface | Explicit opt-in | Restart | Inspect and clean up | Course checkpoint |
64
+ |---|---|---|---|---|
65
+ | Trajectories | `CAIRN_TRAJECTORY_CAPTURE=1` | Relaunch harness | `cairn trajectory list|show|prune`; local, redacted, bounded, reasoning omitted | `course-05-evidence` |
66
+ | Hindsight notes | `CAIRN_NOTE_DISTILLATION=1` | No online callback; run job separately | `cairn notes distill|search-error|doctor|promote`; promotion requires corroboration/confirmation | `course-05-evidence` |
67
+ | Note enrichment | Distillation plus separate enrichment flag, endpoint, key, and model | No server restart for the offline job | Failure leaves deterministic note usable; unset enrichment flag | `course-05-evidence` |
68
+ | Compaction continuity | `CAIRN_COMPACTION_CAPTURE=1` | Sync assets and relaunch harness | Inspect provenance/age; remove retained local artifacts explicitly | `course-05-evidence` |
69
+ | Artifact tools | `CAIRN_ARTIFACT_STORE=1`; HTTP needs a second flag and existing HTTP auth | Restart MCP server when tool exposure changes | `cairn artifact list|show|delete|prune` with dry runs | `course-05-evidence` |
70
+ | Typed nodes/import | `CAIRN_TYPED_MEMORY_NODES=1` | Restart MCP server; tool schema changes | Hard-filter search; dry-run, replay-safe import; `cairn doctor --repair` only for derived state | `course-05-evidence` |
71
+ | Capability contract | `CAIRN_CAPABILITY_CONTRACT=1` | MCP changes require restart; operating changes apply next invocation | `cairn capabilities list|status|enable|disable|reset|logging`; digest identifies state only | `course-06-governance` |
72
+ | Evaluation | `CAIRN_EVAL=1` for the coordinator process | No harness chosen by Cairnkeep | `validate` before `run`; inspect report, missingness and evidence scope; dry-run prune/delete | `course-07-evaluation` |
73
+ | Meta-agent loop | Not shipped | Not applicable | Design contract only; never advertise as an available command | `course-07-evaluation` |
74
+
75
+ ## Harness and maintenance checks
76
+
77
+ - Use a generated launcher so project environment and hooks are repeatable.
78
+ - Run `cairn sync --check` after every core upgrade; apply only reported drift.
79
+ - Run `cairn sync-pi --check` when the optional Pi capture adapter is installed.
80
+ - Use `cairn doctor --repair` only after preserving the affected store and only
81
+ for repairable derived indexes/metadata.
82
+ - Use `cairn uninstall --dry-run` before uninstall; durable memory is retained
83
+ unless purge is explicitly requested.
84
+ - Revisit the [storage guide](../storage.md) and
85
+ [privacy/data-flow guide](../privacy-and-data-flow.md) before enabling a new
86
+ network or retention path.
@@ -13,16 +13,19 @@ state.
13
13
  - Use short videos that can be replaced independently after product changes.
14
14
  - Treat commands, expected output, and recovery instructions as tested product
15
15
  surfaces rather than informal prose.
16
+ - Keep default-off evidence and evaluation features out of the quickstart.
17
+ - Never convert framework-fixture results into product-performance claims.
16
18
 
17
19
  ## Wave 0 - Course foundation
18
20
 
19
21
  **Deliverables**
20
22
 
21
- - Stable lesson IDs L00-L12.
22
- - Quickstart, practitioner, and operator tracks.
23
+ - Stable lesson IDs L00-L17.
24
+ - Quickstart, practitioner, evidence-and-evaluation, and operator tracks.
23
25
  - Lesson, video, and instructor templates.
24
26
  - Complete L00-L03 lesson and recording scripts.
25
- - Briefs and acceptance criteria for L04-L12.
27
+ - Briefs and acceptance criteria for L04-L17.
28
+ - A release-reviewed feature-to-lesson coverage map.
26
29
 
27
30
  **Exit gate**
28
31
 
@@ -45,16 +48,21 @@ round trip and can explain where their memory is stored.
45
48
 
46
49
  ## Wave 2 - Daily practitioner value
47
50
 
48
- Expand L04-L06 in this order:
51
+ Expand L04-L06 and L13 in this order:
49
52
 
50
53
  1. L04 memory keys, scopes, search, history, and review.
51
54
  2. L05 wiki, alignment, session hooks, and derived-knowledge boundaries.
52
55
  3. L06 `/repo-review` and `/security-audit` against a deliberately vulnerable
53
56
  toy repository.
57
+ 4. L13 structured evidence, redaction, deterministic hindsight, compaction,
58
+ artifact inspection, and cleanup against synthetic sessions.
54
59
 
55
- Create the public `cairnkeep-course-labs` repository during this wave, not
56
- before. It must contain synthetic code only, prominent safety warnings, tagged
57
- starter states, and solution branches.
60
+ Use the public `cairnkeep-course-labs` repository created for this wave. Its
61
+ synthetic Trail Ledger project, prominent safety boundary, eight tagged
62
+ checkpoints, executable verification, offline evaluation route, and
63
+ `solutions/review-target` branch are the shared demo source. Expand lesson prose
64
+ and presenter scripts against those immutable starts rather than copying the
65
+ demo into this repository.
58
66
 
59
67
  **Exit gate:** a learner can complete all labs from a fresh clone, and CI resets
60
68
  and verifies every starter state.
@@ -84,7 +92,26 @@ optional component.
84
92
  **Exit gate:** disabling either integration returns the learner to a healthy
85
93
  standalone Cairnkeep workflow.
86
94
 
87
- ## Wave 5 - Operators and platform teams
95
+ ## Wave 5 - Evidence governance and measurement
96
+
97
+ Expand L14-L17 in dependency order:
98
+
99
+ 1. L14 typed nodes, hard filters, logical note addresses, and import replay.
100
+ 2. L15 capability precedence, omission, restart boundaries, and value-free
101
+ callbacks.
102
+ 3. L16 offline two-pass fixtures, one-capability ablation, report reading,
103
+ missingness, uncertainty, retention, and claim boundaries.
104
+ 4. L17 current-versus-design-only ownership and approval boundaries.
105
+
106
+ The first L16 lab must use only the committed deterministic fixture. A separate
107
+ live-evaluation course artifact may be introduced only after its provenance and
108
+ claim anchors pass the repository's runtime-evidence verifier.
109
+
110
+ **Exit gate:** the learner can inspect effective state and retained evidence,
111
+ execute the fixture safely, and state exactly why it does not prove a quality or
112
+ efficiency gain.
113
+
114
+ ## Wave 6 - Operators and platform teams
88
115
 
89
116
  Expand L11-L12:
90
117
 
@@ -95,13 +122,15 @@ Expand L11-L12:
95
122
  **Exit gate:** the operator can explain every host mount, network boundary,
96
123
  credential source, storage destination, and rollback action.
97
124
 
98
- ## Wave 6 - Publication and maintenance
125
+ ## Wave 7 - Publication and maintenance
99
126
 
100
- 1. Publish a landing article linking to the three tracks.
127
+ 1. Publish a landing article linking to the four tracks.
101
128
  2. Publish videos as a playlist with lesson IDs in every title.
102
129
  3. Add release compatibility metadata to each completed lesson.
103
130
  4. Run a command-verification pass for every Cairnkeep minor release.
104
- 5. Review learner feedback monthly during the pilot, then quarterly.
131
+ 5. Reconcile `cairn help`, the changelog, and the curriculum coverage map for
132
+ every minor release.
133
+ 6. Review learner feedback monthly during the pilot, then quarterly.
105
134
 
106
135
  ## How we will work together
107
136
 
@@ -117,6 +146,8 @@ For each lesson, follow this loop:
117
146
  8. **Pilot:** give the written lesson to a learner before publishing the video.
118
147
  9. **Improve:** incorporate observed failures and publish both formats together.
119
148
 
120
- The immediate next step after merging Wave 0 is the unrecorded L00-L03
121
- rehearsal. Use the checklist in the [instructor guide](instructor-guide.md) and
122
- record questions rather than polishing video production prematurely.
149
+ The immediate next step is an unrecorded L00-L03 rehearsal using
150
+ `course-00-app` and `course-01-bootstrap`. Then expand L04-L06 and L13 against
151
+ `course-02-memory`, `course-03-quality`, and `course-05-evidence`. Use the
152
+ checklist in the [instructor guide](instructor-guide.md) and record questions
153
+ rather than polishing video production prematurely.
@@ -10,9 +10,18 @@ Choose the shortest track that matches your goal:
10
10
 
11
11
  - [Quickstart](tracks/quickstart.md) - prove the core value in about 75 minutes.
12
12
  - [Practitioner](tracks/practitioner.md) - adopt Cairnkeep in daily project work.
13
+ - [Evidence and evaluation](tracks/evidence-and-evaluation.md) - inspect optional
14
+ session evidence, govern capabilities, and measure changes without overstating
15
+ results.
13
16
  - [Operator](tracks/operator.md) - storage, optional services, containers, and
14
17
  managed distributions.
15
18
 
19
+ For a single view of every released surface, its default, storage boundary,
20
+ restart requirement, and rollback path, use the [feature guide](FEATURE-GUIDE.md).
21
+ The public [course labs](https://github.com/cairnkeep/cairnkeep-course-labs)
22
+ provide one synthetic project with tagged checkpoints shared by lessons,
23
+ articles, workshops, and videos.
24
+
16
25
  Lessons marked **Ready** include a complete exercise and presenter script.
17
26
  Lessons marked **Brief** define outcomes and acceptance criteria and will be
18
27
  expanded according to the [production plan](PRODUCTION-PLAN.md).
@@ -34,6 +43,15 @@ expanded according to the [production plan](PRODUCTION-PLAN.md).
34
43
  | L10 | [Faster context exploration](lessons/L10-context-exploration.md) | Brief | 30 min |
35
44
  | L11 | [Containers and isolation](lessons/L11-containers.md) | Brief | 40 min |
36
45
  | L12 | [Managed overlays](lessons/L12-managed-overlays.md) | Brief | 45 min |
46
+ | L13 | [Session evidence and hindsight](lessons/L13-session-evidence.md) | Brief | 45 min |
47
+ | L14 | [Typed memory and controlled import](lessons/L14-typed-memory.md) | Brief | 40 min |
48
+ | L15 | [Capability governance](lessons/L15-capability-governance.md) | Brief | 35 min |
49
+ | L16 | [Evaluation and ablation](lessons/L16-evaluation.md) | Brief | 50 min |
50
+ | L17 | [The agent boundary](lessons/L17-agent-boundary.md) | Brief | 25 min |
51
+
52
+ The [curriculum coverage map](CURRICULUM-MAP.md) records where every public
53
+ feature is introduced, practised, and operated. It also marks design-only work
54
+ that must not be taught as a released capability.
37
55
 
38
56
  ## Teaching contract
39
57
 
@@ -47,7 +65,8 @@ Every complete lesson contains:
47
65
  6. A presenter-ready video script.
48
66
 
49
67
  The learner should never need optional infrastructure to complete L00-L06.
50
- Remote memory, RAG, routing, and containers are separate opt-in modules.
68
+ Remote memory, RAG, routing, containers, structured capture, typed nodes,
69
+ capability governance, and evaluation are separate opt-in modules.
51
70
 
52
71
  ## For contributors
53
72
 
@@ -10,6 +10,10 @@
10
10
  - Increase terminal font size and keep one command per visible line.
11
11
  - Prepare a clean start snapshot and a known-good completed snapshot.
12
12
  - Rehearse the failure-recovery section, not only the happy path.
13
+ - For L13-L16, prove every optional flag starts disabled and clean up only the
14
+ disposable evidence or experiment root created by the lesson.
15
+ - Label deterministic evaluation fixtures as framework evidence, never product
16
+ quality or efficiency evidence.
13
17
 
14
18
  ## Recommended recording format
15
19
 
@@ -58,3 +62,5 @@ A lesson is **Ready** only when:
58
62
  - storage and privacy implications are stated;
59
63
  - the video script matches the verified lesson;
60
64
  - a learner other than the author completed it without hidden instructions.
65
+ - the command surface and lesson assignment agree with the
66
+ [curriculum coverage map](CURRICULUM-MAP.md).
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 10 minutes
6
- **Tested with:** Cairnkeep 2.4.0
6
+ **Tested with:** Cairnkeep 2.5.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -18,22 +18,27 @@ entire transcript into the next prompt is expensive and preserves noise along
18
18
  with useful facts.
19
19
 
20
20
  Cairnkeep stores small, reviewed operational facts and retrieves them when they
21
- are relevant. It also provides a derived wiki and governed review workflows,
22
- without replacing source code, tests, issue trackers, or canonical documents.
21
+ are relevant. It also provides a derived wiki and governed review workflows.
22
+ Optional local evidence features can retain redacted session structure,
23
+ artifacts, and deterministic hindsight notes, but they remain distinct from
24
+ reviewed memory and are disabled by default. None of these layers replaces
25
+ source code, tests, issue trackers, or canonical documents.
23
26
 
24
27
  ## Mental model
25
28
 
26
- Keep four layers distinct:
29
+ Follow information through a trust ladder:
27
30
 
28
31
  | Layer | Example | Role |
29
32
  |---|---|---|
30
33
  | Harness history | The current conversation | Temporary working context |
34
+ | Captured evidence (optional) | A redacted tool result or compaction summary | Bounded local evidence, not trusted instruction |
35
+ | Hindsight note (optional) | A repeated failure signature and resolution | Deterministic derived knowledge, not automatically shared |
31
36
  | Cairnkeep memory | “Use transactional migrations” | Durable operational fact |
32
37
  | Project wiki | A cited architecture summary | Derived, reviewable knowledge |
33
38
  | Canonical source | Code, tests, ADR, issue | Authority when layers disagree |
34
39
 
35
- Document RAG is an optional fifth layer for retrieving larger documents. It is
36
- not required for Cairnkeep memory.
40
+ Document RAG and token-miser context exploration are optional retrieval paths,
41
+ not additional authorities. Neither is required for Cairnkeep memory.
37
42
 
38
43
  ## Exercise
39
44
 
@@ -43,6 +48,7 @@ For each statement, choose the appropriate destination:
43
48
  2. “Here is the complete API specification.”
44
49
  3. “The current debugging hypothesis is a race in the cache.”
45
50
  4. “Never run the production migration from a developer laptop.”
51
+ 5. “This synthetic stack trace appeared and was resolved twice.”
46
52
 
47
53
  Suggested answer:
48
54
 
@@ -51,6 +57,8 @@ Suggested answer:
51
57
  - 2 stays a canonical document and may optionally be indexed for RAG.
52
58
  - 3 remains session context until confirmed.
53
59
  - 4 is a durable constraint after it is verified against policy.
60
+ - 5 may become local session evidence and a hindsight note. It becomes reviewed
61
+ memory only through a separate explicit workflow.
54
62
 
55
63
  ## Verify
56
64
 
@@ -59,6 +67,7 @@ You are ready for L01 if you can answer these questions:
59
67
  - Does Cairnkeep replace the repository or its documentation? **No.**
60
68
  - Does the default installation discover a remote memory server? **No.**
61
69
  - Should every sentence in a session become durable memory? **No.**
70
+ - Does enabling one optional evidence feature enable the others? **No.**
62
71
 
63
72
  ## Common failures
64
73
 
@@ -66,17 +75,20 @@ You are ready for L01 if you can answer these questions:
66
75
  |---|---|
67
76
  | Memory is another transcript store | Store concise, durable facts rather than complete prompts |
68
77
  | RAG and memory are the same | RAG retrieves documents; memory preserves reviewed operational facts |
78
+ | Captured evidence is trusted memory | Evidence and notes remain derived until explicitly reviewed or promoted |
69
79
  | Derived knowledge is authoritative | Code, tests, policies, and canonical documents win conflicts |
70
80
 
71
81
  ## Privacy and trust boundary
72
82
 
73
83
  The default stdio topology stores memory on the local machine. Remote storage,
74
- model-backed extraction, embeddings, and document RAG require explicit
75
- configuration and are taught separately.
84
+ structured capture, note distillation/enrichment, artifacts, evaluation,
85
+ model-backed extraction, embeddings, and document RAG require separate explicit
86
+ configuration and are taught later.
76
87
 
77
88
  ## Recap
78
89
 
79
90
  - Memory is selective and durable.
91
+ - Optional evidence and notes are distinct from reviewed memory.
80
92
  - Derived knowledge remains subordinate to canonical sources.
81
93
  - Optional services are not prerequisites.
82
94