@cairnkeep/cli 2.5.0 → 2.7.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 (62) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +33 -12
  3. package/bin/cairn +15 -3
  4. package/claude/commands/graphify.md +46 -55
  5. package/docs/building-an-overlay.md +2 -2
  6. package/docs/harness-compatibility.md +95 -9
  7. package/docs/learning/CURRICULUM-MAP.md +3 -1
  8. package/docs/learning/FEATURE-GUIDE.md +3 -2
  9. package/docs/learning/README.md +12 -12
  10. package/docs/learning/lessons/L00-why-cairnkeep.md +1 -5
  11. package/docs/learning/lessons/L01-safe-trial.md +3 -7
  12. package/docs/learning/lessons/L02-installation.md +15 -9
  13. package/docs/learning/lessons/L03-first-project.md +1 -5
  14. package/docs/learning/lessons/L04-memory-fundamentals.md +0 -6
  15. package/docs/learning/lessons/L05-daily-workflow.md +0 -5
  16. package/docs/learning/lessons/L06-repository-quality.md +0 -6
  17. package/docs/learning/lessons/L07-privacy-and-storage.md +0 -5
  18. package/docs/learning/lessons/L08-multiple-machines.md +0 -5
  19. package/docs/learning/lessons/L09-domain-knowledge.md +0 -5
  20. package/docs/learning/lessons/L10-context-exploration.md +0 -5
  21. package/docs/learning/lessons/L11-containers.md +0 -5
  22. package/docs/learning/lessons/L12-managed-overlays.md +0 -6
  23. package/docs/learning/lessons/L13-session-evidence.md +0 -6
  24. package/docs/learning/lessons/L14-typed-memory.md +0 -6
  25. package/docs/learning/lessons/L15-capability-governance.md +0 -6
  26. package/docs/learning/lessons/L16-evaluation.md +0 -7
  27. package/docs/learning/lessons/L17-agent-boundary.md +0 -6
  28. package/docs/learning/templates/lesson-template.md +0 -4
  29. package/docs/operating.md +111 -9
  30. package/docs/privacy-and-data-flow.md +1 -0
  31. package/examples/eval/bundled-fake.json +1 -1
  32. package/kimi/skills/graphify/SKILL.md +33 -0
  33. package/mcp-memory-server/dist/capability-registry.js +2 -2
  34. package/mcp-memory-server/dist/graph-cli.js +386 -0
  35. package/mcp-memory-server/package.json +2 -1
  36. package/opencode/command/graphify.md +48 -58
  37. package/package.json +4 -2
  38. package/pi/prompts/graphify.md +32 -0
  39. package/scripts/bootstrap.sh +4 -1
  40. package/scripts/completion.sh +17 -6
  41. package/scripts/smoke-bash32.sh +1 -0
  42. package/scripts/sync-kimi-assets.sh +77 -0
  43. package/scripts/sync-pi-assets.sh +52 -31
  44. package/scripts/test-bootstrap-untracked.sh +23 -1
  45. package/scripts/test-cli-dispatch.sh +4 -0
  46. package/scripts/test-completion.sh +5 -0
  47. package/scripts/test-graph-harness-adapters.sh +46 -0
  48. package/scripts/test-launcher-hooks.sh +33 -3
  49. package/scripts/test-learning-docs.sh +2 -9
  50. package/scripts/test-package-install.sh +9 -0
  51. package/scripts/test-trajectory-hooks.sh +5 -1
  52. package/scripts/test-uninstall.sh +12 -2
  53. package/scripts/uninstall.sh +12 -4
  54. package/templates/graph-policy.md.template +23 -4
  55. package/templates/start-qwen.sh.template +32 -0
  56. package/docs/learning/PRODUCTION-PLAN.md +0 -153
  57. package/docs/learning/instructor-guide.md +0 -66
  58. package/docs/learning/templates/video-script-template.md +0 -50
  59. package/docs/learning/video-scripts/L00-why-cairnkeep.md +0 -80
  60. package/docs/learning/video-scripts/L01-safe-trial.md +0 -78
  61. package/docs/learning/video-scripts/L02-installation.md +0 -97
  62. package/docs/learning/video-scripts/L03-first-project.md +0 -99
package/CHANGELOG.md CHANGED
@@ -5,6 +5,27 @@ All notable user-facing changes are documented here. This project follows
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.7.0] - 2026-08-02
9
+
10
+ ### Added
11
+
12
+ - Add a Cairnkeep-owned `cairn graph build|query|status|diff|explain|path`
13
+ workflow, matching Claude Code and OpenCode `/graphify` modes, shell
14
+ completion, local-only code indexing, atomic publication, and snapshot diffs
15
+ without installing Graphify-owned harness assets or re-indexing generated
16
+ graph artifacts; add thin Pi prompt and Kimi Skill adapters that expose
17
+ `/graphify` while delegating exclusively to `cairn graph`, with explicit sync,
18
+ uninstall, package, and shell-completion coverage.
19
+
20
+ ## [2.6.0] - 2026-07-29
21
+
22
+ ### Added
23
+
24
+ - Add Qwen Code as a supported memory client with a generated project launcher,
25
+ local stdio guidance, and tested authenticated remote HTTP configuration.
26
+ - Expand the harness comparison to cover current native plugin and MCP clients,
27
+ while keeping memory-only support separate from the full operating layer.
28
+
8
29
  ## [2.5.0] - 2026-07-29
9
30
 
10
31
  ### Added
@@ -211,7 +232,9 @@ stored memories.
211
232
  - Preserve executable permissions and Bash 3.2 portability on macOS.
212
233
  - Add backup-first uninstall and SQLite-safe memory export/import guidance.
213
234
 
214
- [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.5.0...HEAD
235
+ [Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.7.0...HEAD
236
+ [2.7.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.6.0...v2.7.0
237
+ [2.6.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.5.0...v2.6.0
215
238
  [2.5.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.4.0...v2.5.0
216
239
  [2.4.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.3.1...v2.4.0
217
240
  [2.3.1]: https://github.com/cairnkeep/cairnkeep/compare/v2.3.0...v2.3.1
package/README.md CHANGED
@@ -10,16 +10,16 @@ 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
12
  across sessions, projects, and harnesses (Claude Code, OpenCode, Kimi Code,
13
- Pi, and other MCP clients).
13
+ Qwen Code, Pi, and other MCP clients).
14
14
 
15
15
  ## Status
16
16
 
17
- Shipped: the memory server, the `cairn` CLI (`bootstrap`, `memory-server`, `sync`, `sync-pi`,
17
+ Shipped: the memory server, the `cairn` CLI (`bootstrap`, `memory-server`, `sync`, `sync-pi`, `sync-kimi`,
18
18
  `doctor`, `trajectory`, `artifact`, `notes`, `memory`, `eval`, `audit-timer`, `completion`, `uninstall`) installable via
19
19
  `npm i -g @cairnkeep/cli`, and the
20
20
  operating layer (commands,
21
21
  agents, hooks) installed on Claude Code and OpenCode, plus a native Pi
22
- trajectory extension. The generic launchers
22
+ trajectory extension and thin Pi/Kimi graph adapters. The generic launchers
23
23
  expose wrapper seams (`.ai/pre-launch.sh`, `CAIRN_EXTRA_SETTINGS`,
24
24
  `.ai/post-exit.sh`) so an enterprise wrapper can add provider/credential setup
25
25
  without forking them. Also shipped: context exploration (`/context-explore`) and
@@ -37,17 +37,23 @@ and 20 are end-of-life upstream.
37
37
  |---|---|
38
38
  | Claude Code on Linux/macOS | Memory server plus commands, agents, hooks, and launchers |
39
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 |
41
- | Pi on Linux/macOS | Native opt-in trajectory extension and launcher; no bundled MCP bridge |
40
+ | Kimi Code on Linux/macOS | Memory MCP server, project launcher, and opt-in `/graphify` Skill |
41
+ | Qwen Code on Linux/macOS | Memory MCP server plus project launcher; no Cairnkeep operating-layer assets yet |
42
+ | Pi on Linux/macOS | Native opt-in trajectory extension, launcher, and `/graphify` prompt; no bundled MCP bridge |
42
43
  | Codex CLI | Memory MCP server; no Cairnkeep operating-layer assets |
43
44
  | Other MCP clients | Memory and optional domain-knowledge MCP tools |
44
45
  | Native Windows | Not supported by the Bash-based installer; use WSL (not yet CI-verified) |
45
46
 
47
+ The `cairn graph` CLI is harness-independent and can be run from a project
48
+ shell used by Kimi Code, Pi, Qwen Code, Codex, or another client. Claude Code,
49
+ OpenCode, Pi, and Kimi can receive thin `/graphify` adapters; those adapters do
50
+ not imply equivalent hooks, agents, or MCP support.
51
+
46
52
  Linux, macOS, Bash 3.2 portability, and clean Node 22/24/26 runtime checks
47
53
  are exercised in CI.
48
54
 
49
55
  See [Harness compatibility](docs/harness-compatibility.md) for exact support
50
- levels, Kimi configuration, and candidates that are not yet runtime-tested.
56
+ levels, Kimi and Qwen configuration, and candidates that are not yet runtime-tested.
51
57
 
52
58
  ## Try with Podman
53
59
 
@@ -78,13 +84,17 @@ storage paths, secrets, and private derived images, see
78
84
  `cairn artifact list|show|delete|prune` manages opt-in local artifacts;
79
85
  `cairn eval validate|run|ablate|report|prune|delete` coordinates explicit
80
86
  local two-pass and one-capability-at-a-time measurements;
87
+ `cairn graph build|query|status|diff|explain|path` owns the local Graphify
88
+ workflow from any project shell without installing Graphify-owned harness
89
+ assets; Claude Code, OpenCode, Pi, and Kimi add thin `/graphify` wrappers;
81
90
  `cairn notes distill|search-error|promote|doctor` compiles and searches
82
91
  default-off local hindsight notes outside the online agent path;
83
92
  `cairn memory export|import` relocates the durable store between machines
84
93
  (`export` requires the optional `sqlite3` CLI);
85
94
  `cairn audit-timer` installs the scheduled memory+wiki audit;
86
95
  `cairn completion bash|zsh|fish` generates shell completion definitions; and
87
- `cairn sync-pi` installs the native Pi trajectory extension;
96
+ `cairn sync-pi` installs the native Pi trajectory extension and graph prompt;
97
+ `cairn sync-kimi` installs the Kimi graph Skill;
88
98
  `cairn uninstall` reverses the install (backup-first, revertible).
89
99
  - **`templates/`** — project scaffolding (generic launchers, env) plus the
90
100
  derived-knowledge layer (wiki, alignment, graph, security, planning).
@@ -159,6 +169,16 @@ configuration requires a literal URL and supports a token reference through
159
169
  `bearerTokenEnvVar`; it does not expand `${VAR}` in the URL. See
160
170
  [Harness compatibility](docs/harness-compatibility.md#kimi-code).
161
171
 
172
+ Install Kimi's thin graph Skill separately with `cairn sync-kimi --apply`.
173
+ It registers `/graphify` (also `/skill:graphify`) and delegates every supported
174
+ operation exclusively to `cairn graph`.
175
+
176
+ For Qwen Code, use project `.qwen/settings.json`: local stdio launches
177
+ `cairn memory-server`, while remote HTTP uses `httpUrl` and environment-expanded
178
+ headers. Review and approve project MCP configuration with
179
+ `qwen mcp approve cairn-memory`, then launch with `./.ai/start-qwen.sh`. See
180
+ [Harness compatibility](docs/harness-compatibility.md#qwen-code).
181
+
162
182
  For Pi, install the local trajectory adapter and use the scaffolded launcher:
163
183
 
164
184
  ```bash
@@ -167,9 +187,10 @@ cairn bootstrap /path/to/project
167
187
  cd /path/to/project && ./.ai/start-pi.sh
168
188
  ```
169
189
 
170
- This installs trajectory capture only. Cairnkeep does not bundle or select a Pi
171
- MCP bridge; configure a user-chosen bridge separately if you also want the MCP
172
- memory tools inside Pi.
190
+ This installs trajectory capture plus the thin `/graphify` prompt. The prompt
191
+ delegates exclusively to `cairn graph`. Cairnkeep does not bundle or select a
192
+ Pi MCP bridge; configure a user-chosen bridge separately if you also want the
193
+ MCP memory tools inside Pi.
173
194
 
174
195
  Closed trajectories can be compiled into local hindsight notes without a model
175
196
  or embedding service. Capture and distillation are separate opt-ins:
@@ -208,8 +229,8 @@ unless a wrapper opts in:
208
229
  export env (e.g. a provider base URL) or abort the launch by returning
209
230
  non-zero. This is where credential refresh / connectivity setup lives.
210
231
  - **`CAIRN_EXTRA_SETTINGS`** — path to a settings file layered onto the harness
211
- (`--settings` for Claude Code, `OPENCODE_CONFIG` for OpenCode). Pi has no equivalent
212
- generic settings-file flag, so its launcher leaves this variable unused.
232
+ (`--settings` for Claude Code, `OPENCODE_CONFIG` for OpenCode). Kimi, Qwen,
233
+ and Pi do not interpret this variable in their generic launchers.
213
234
  Process env still wins, so an inline value beats the profile.
214
235
  - **`.ai/post-exit.sh`** — sourced after the harness exits, with
215
236
  `CAIRN_EXIT_STATUS` set to its exit code.
package/bin/cairn CHANGED
@@ -33,8 +33,11 @@ Usage:
33
33
  agents, hooks) into ~/.claude, or into DIR for a single
34
34
  project (--live-root <project>/.claude).
35
35
  cairn sync-pi [--apply] [--live-root DIR]
36
- Install/update the Pi trajectory extension into
37
- ~/.pi/agent, or into DIR for an isolated Pi root.
36
+ Install/update the Pi trajectory extension and thin
37
+ /graphify prompt into ~/.pi/agent or isolated DIR.
38
+ cairn sync-kimi [--apply] [--live-root DIR]
39
+ Install/update the thin Kimi /graphify Skill into
40
+ $KIMI_CODE_HOME, ~/.kimi-code, or isolated DIR.
38
41
  cairn doctor Health-check the memory server and configured LLM /
39
42
  embedding endpoints, git provider, and stores.
40
43
  Use --repair for derived trajectory/typed metadata,
@@ -56,6 +59,9 @@ Usage:
56
59
  cairn eval <validate|run|ablate|report|prune|delete>
57
60
  Validate or run default-off local evaluations, inspect
58
61
  reports, and manage retained experiment results.
62
+ cairn graph <build|query|status|diff|explain|path>
63
+ Build the local code graph, inspect freshness and
64
+ changes, or query exact symbols and paths.
59
65
  cairn memory <path|export|import>
60
66
  Relocate global-scope memory. `path` prints its location;
61
67
  `export <file.tgz>` takes a WAL-safe snapshot (requires
@@ -64,7 +70,7 @@ Usage:
64
70
  Install (opt-in) a systemd user timer that runs the
65
71
  memory+wiki audit on a schedule; prints a cron alternative.
66
72
  cairn uninstall [--dry-run] [--yes] [--purge-memory] [--live-root DIR]
67
- [--pi-live-root DIR] [PROJECT ...]
73
+ [--pi-live-root DIR] [--kimi-live-root DIR] [PROJECT ...]
68
74
  Reverse what cairnkeep installed/modified (operating
69
75
  layer, hook registrations, MCP registration, audit
70
76
  timer, and any given projects' bootstrap scaffold).
@@ -110,12 +116,18 @@ case "$cmd" in
110
116
  eval)
111
117
  exec node "$CAIRN_ROOT/mcp-memory-server/dist/eval-cli.js" "$@"
112
118
  ;;
119
+ graph)
120
+ exec node "$CAIRN_ROOT/mcp-memory-server/dist/graph-cli.js" "$@"
121
+ ;;
113
122
  sync)
114
123
  exec "$CAIRN_ROOT/scripts/sync-claude-assets.sh" "$@"
115
124
  ;;
116
125
  sync-pi)
117
126
  exec "$CAIRN_ROOT/scripts/sync-pi-assets.sh" "$@"
118
127
  ;;
128
+ sync-kimi)
129
+ exec "$CAIRN_ROOT/scripts/sync-kimi-assets.sh" "$@"
130
+ ;;
119
131
  audit-timer)
120
132
  exec "$CAIRN_ROOT/scripts/install-audit-timer.sh" "$@"
121
133
  ;;
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  description: "Build, rebuild, query, and inspect the project knowledge graph in .planning/graphs/"
3
- argument-hint: "[build [--force]|query <term>|status|diff]"
3
+ argument-hint: "[build [--force]|query <term>|explain <symbol>|path <from> <to>|status|diff]"
4
4
  allowed-tools: Read, Bash
5
5
  ---
6
6
 
7
7
  **STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's command system. Using the Read tool on this file wastes tokens. Begin executing Step 0 immediately.**
8
8
 
9
- **graphify CLI:** the `graphify` subcommand is exposed by `gsd-tools` (on PATH). Invoke as `gsd-tools graphify …` as documented in this command and in `docs/CLI-TOOLS.md`. Other GSD queries use `gsd-tools <subcmd>` where a handler exists.
9
+ **graph workflow:** Cairnkeep owns this surface through `cairn graph`. The
10
+ operator installs only the isolated `graphify` executable; do not invoke
11
+ Graphify's harness installer.
10
12
 
11
13
  ## Step 0 -- Banner
12
14
 
@@ -18,29 +20,13 @@ GRAPHIFY
18
20
 
19
21
  Then proceed to Step 1.
20
22
 
21
- ## Step 1 -- Config Gate
23
+ ## Step 1 -- Capability ownership
22
24
 
23
- Check if graphify is enabled by reading `.planning/config.json` directly using the Read tool.
24
-
25
- **DO NOT use the gsd-tools config get-value command** -- it hard-exits on missing keys.
26
-
27
- 1. Read `.planning/config.json` using the Read tool
28
- 2. If the file does not exist: display the disabled message below and **STOP**
29
- 3. Parse the JSON content. Check if `config.graphify && config.graphify.enabled === true`
30
- 4. If `graphify.enabled` is NOT explicitly `true`: display the disabled message below and **STOP**
31
- 5. If `graphify.enabled` is `true`: proceed to Step 2
32
-
33
- **Disabled message:**
34
-
35
- ```
36
- GRAPHIFY
37
-
38
- Knowledge graph is disabled. To activate:
39
-
40
- gsd-tools config-set graphify.enabled true
41
-
42
- Then run /graphify build to create the initial graph.
43
- ```
25
+ Do not implement a separate configuration gate in the prompt. Every
26
+ `cairn graph` operation enforces the typed `graph` capability and its legacy
27
+ `graphify.enabled` compatibility default before Graphify or graph-file I/O.
28
+ Proceed directly to Step 2; if the owner reports a disabled capability, display
29
+ its fixed remediation message and **STOP**.
44
30
 
45
31
  ---
46
32
 
@@ -52,6 +38,8 @@ Parse `$ARGUMENTS` to determine the operation mode:
52
38
  |----------|--------|
53
39
  | `build` or `build --force` | Run inline build (Step 3) |
54
40
  | `query <term>` | Run inline query (Step 2a) |
41
+ | `explain <symbol>` | Explain one exact symbol (Step 2d) |
42
+ | `path <from> <to>` | Find the shortest path between two exact symbols (Step 2e) |
55
43
  | `status` | Run inline status check (Step 2b) |
56
44
  | `diff` | Run inline diff check (Step 2c) |
57
45
  | No argument or unknown | Show usage message |
@@ -66,6 +54,8 @@ Usage: /graphify <mode>
66
54
  Modes:
67
55
  build [--force] Build or rebuild the knowledge graph
68
56
  query <term> Search the graph for a term
57
+ explain <symbol> Explain one exact symbol and its relationships
58
+ path <from> <to> Find the shortest path between two exact symbols
69
59
  status Show graph freshness and statistics
70
60
  diff Show changes since last build
71
61
  ```
@@ -75,28 +65,39 @@ Modes:
75
65
  Run:
76
66
 
77
67
  ```bash
78
- gsd-tools graphify query <term>
68
+ cairn graph query <term>
79
69
  ```
80
70
 
81
- Parse the JSON output and display results:
82
- - If the output contains `"disabled": true`, display the disabled message from Step 1 and **STOP**
83
- - If the output contains `"error"` field, display the error message and **STOP**
84
- - If no nodes found, display: `No graph matches for '<term>'. Try /graphify build to create or rebuild the graph.`
85
- - Otherwise, display matched nodes grouped by type, with edge relationships and confidence tiers (EXTRACTED/INFERRED/AMBIGUOUS)
71
+ Pass the parsed term as exactly one argument and display the result verbatim.
72
+ On failure, display the error without retrying or changing configuration.
86
73
 
87
74
  **STOP** after displaying results. Do not spawn an agent.
88
75
 
76
+ ### Step 2d -- Explain
77
+
78
+ Run `cairn graph explain <symbol>`, passing the parsed symbol as exactly one
79
+ argument. Display Graphify's explanation verbatim. On failure, display the
80
+ error and suggest `/graphify build` only when the published graph is missing.
81
+
82
+ **STOP** after displaying the result. Do not spawn an agent.
83
+
84
+ ### Step 2e -- Path
85
+
86
+ Run `cairn graph path <from> <to>`, passing each parsed symbol as exactly one
87
+ argument. Display Graphify's path result verbatim. On failure, display the
88
+ error and suggest `/graphify build` only when the published graph is missing.
89
+
90
+ **STOP** after displaying the result. Do not spawn an agent.
91
+
89
92
  ### Step 2b -- Status
90
93
 
91
94
  Run:
92
95
 
93
96
  ```bash
94
- gsd-tools graphify status
97
+ cairn graph status
95
98
  ```
96
99
 
97
- Parse the JSON output and display:
98
- - If `exists: false`, display the message field
99
- - Otherwise show last build time, node/edge/hyperedge counts, and STALE or FRESH indicator
100
+ Display the local node/edge counts and freshness result verbatim.
100
101
 
101
102
  **STOP** after displaying status. Do not spawn an agent.
102
103
 
@@ -105,14 +106,11 @@ Parse the JSON output and display:
105
106
  Run:
106
107
 
107
108
  ```bash
108
- gsd-tools graphify diff
109
+ cairn graph diff
109
110
  ```
110
111
 
111
- Parse the JSON output and display:
112
- - If `no_baseline: true`, display the message field
113
- - Otherwise show node and edge change counts (added/removed/changed)
114
-
115
- If no snapshot exists, suggest running `build` twice (first to create, second to generate a diff baseline).
112
+ Display the node and edge change counts verbatim. If no snapshot exists,
113
+ suggest rebuilding after the next code change.
116
114
 
117
115
  **STOP** after displaying diff. Do not spawn an agent.
118
116
 
@@ -123,20 +121,14 @@ If no snapshot exists, suggest running `build` twice (first to create, second to
123
121
  Run:
124
122
 
125
123
  ```bash
126
- gsd-tools graphify build [--force]
124
+ cairn graph build [--force]
127
125
  ```
128
126
 
129
- Parse the JSON output and display:
130
- - If the output contains `"disabled": true`, display the disabled message from Step 1 and **STOP**
131
- - If the output contains an `"error"` field, display the error and the `stage` field when present, then **STOP**
132
- - Otherwise display the build summary using `status.last_build`, `status.node_count`, `status.edge_count`, `status.hyperedge_count`, whether the snapshot was saved, and whether a forced clean rebuild was used
133
-
134
- This command now performs the full pipeline directly:
135
- - runs `graphify update .` with legacy fallback to `graphify . --update`
136
- - when `--force` is present, clears `graphify-out/`, published graph artifacts, and `.planning/graphs/.last-build-snapshot.json` first
137
- - validates `graphify-out/graph.json`
138
- - copies `graph.json`, `graph.html`, and `GRAPH_REPORT.md` into `.planning/graphs/`
139
- - writes `.planning/graphs/.last-build-snapshot.json`
127
+ Display the build summary verbatim. This managed path runs Graphify's local
128
+ code-only `update`, strips provider credentials from its subprocess
129
+ environment, validates the resulting graph, atomically publishes available
130
+ artifacts into `.planning/graphs/`, and snapshots the previous graph for diff.
131
+ `--force` permits a rebuilt graph with fewer nodes after code deletion.
140
132
 
141
133
  **STOP** after displaying the build result. Do not spawn an agent.
142
134
 
@@ -144,7 +136,6 @@ This command now performs the full pipeline directly:
144
136
 
145
137
  ## Anti-Patterns
146
138
 
147
- 1. DO NOT spawn an agent for graphify operations -- build/query/status/diff are handled directly
139
+ 1. DO NOT spawn an agent for graphify operations -- build/query/explain/path/status/diff are handled directly
148
140
  2. DO NOT modify graph files directly outside the graphify CLI path
149
- 3. DO NOT skip the config gate check
150
- 4. DO NOT use gsd-tools config get-value for the config gate -- it exits on missing keys
141
+ 3. DO NOT duplicate capability parsing in the prompt -- `cairn graph` owns it
@@ -28,13 +28,13 @@ 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`, and `.ai/start-pi.sh`, scaffolded by `cairn bootstrap`) run
31
+ `.ai/start-kimi.sh`, `.ai/start-qwen.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 |
35
35
  |---|---|---|
36
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 |
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
+ | `CAIRN_EXTRA_SETTINGS` | read just before launch | path to a settings file layered onto Claude Code (`--settings`) or OpenCode (`OPENCODE_CONFIG`); Kimi, Qwen, and Pi leave it available to hooks but do not interpret it |
38
38
  | `.ai/post-exit.sh` | sourced after the harness exits | teardown; `CAIRN_EXIT_STATUS` holds the exit code |
39
39
 
40
40
  **Typical overlay launcher** — a corporate wrapper needs a non-default provider
@@ -10,15 +10,24 @@ commands, hooks, plugins, or trajectory adapters.
10
10
  |---|---|---|
11
11
  | Claude Code | Memory MCP, commands, agents, hooks, launcher | Exercised by Cairnkeep tests |
12
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 |
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
+ | Qwen Code | Memory MCP, launcher | Launcher tested; stdio and remote MCP tested with Qwen Code 0.21.1 |
15
+ | Pi | Native opt-in trajectory extension, launcher, and graph prompt | Exercised by Cairnkeep tests; no bundled MCP bridge |
15
16
  | Codex CLI | Memory MCP | Configuration supported; no Cairnkeep operating-layer assets or launcher |
16
17
  | Other MCP clients | Memory and optional domain-knowledge tools | Protocol-compatible; not automatically runtime-tested |
17
18
 
18
19
  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.
20
+ Kimi receives one narrow graph Skill, while Pi receives one narrow graph prompt;
21
+ neither is equivalent to the full commands, agents, hooks, and plugins surface.
22
+ Qwen skills and hooks still require harness-specific adaptation and validation.
23
+
24
+ `cairn graph` is a separate, harness-independent project-shell CLI. Kimi Code,
25
+ Pi, Qwen Code, Codex, and other shell-capable clients can invoke
26
+ `cairn graph build|query|status|diff|explain|path` when `cairn` and the isolated
27
+ `graphify` executable are on `PATH`. `cairn sync-kimi --apply` registers a Kimi
28
+ Skill as `/graphify` (or `/skill:graphify`), and `cairn sync-pi --apply`
29
+ registers a Pi prompt template as `/graphify`; both delegate exclusively to
30
+ that CLI. Neither adds an MCP bridge to Pi or expands the other support levels.
22
31
 
23
32
  ## Kimi Code
24
33
 
@@ -91,6 +100,72 @@ token value in either file.
91
100
  Kimi MCP configuration is documented at
92
101
  [Kimi Code MCP](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/mcp.html).
93
102
 
103
+ ## Qwen Code
104
+
105
+ Qwen Code can read MCP definitions from user settings, project
106
+ `.qwen/settings.json`, and compatible repository `.mcp.json` files. Use the
107
+ Qwen-specific project settings file for remote HTTP so its `httpUrl` transport
108
+ and environment expansion are explicit.
109
+
110
+ ### Local stdio
111
+
112
+ Create `.qwen/settings.json` in a trusted project:
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "cairn-memory": {
118
+ "command": "cairn",
119
+ "args": ["memory-server"]
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ Project MCP definitions are approval-gated. Review the file, then run:
126
+
127
+ ```bash
128
+ qwen mcp approve cairn-memory
129
+ ./.ai/start-qwen.sh
130
+ ```
131
+
132
+ The server is a local child process. Its storage stays on this computer unless
133
+ the operator deliberately replaces this stdio definition with a remote one.
134
+
135
+ ### Remote HTTP
136
+
137
+ Qwen Code 0.21.1 was exercised with environment expansion in project settings:
138
+
139
+ ```json
140
+ {
141
+ "mcpServers": {
142
+ "cairn-memory": {
143
+ "httpUrl": "${CAIRN_MEMORY_REMOTE_URL}",
144
+ "headers": {
145
+ "Authorization": "Bearer ${CAIRN_MEMORY_HTTP_TOKEN}",
146
+ "X-Cairn-Project": "example-project",
147
+ "X-Cairn-Scopes": "identity,personal,project",
148
+ "X-Cairn-AnythingLLM-Workspaces": "example-workspace"
149
+ }
150
+ }
151
+ }
152
+ }
153
+ ```
154
+
155
+ Keep the endpoint and token in `.ai/.env` or a machine secret store. The
156
+ generated launcher exports `.ai/.env` before Qwen reads the settings. Re-run
157
+ `qwen mcp approve cairn-memory` after changing the project definition because
158
+ the approval is bound to the configuration digest.
159
+
160
+ The authenticated recipe above is validated for `.qwen/settings.json`.
161
+ Cairnkeep does not assume that a one-shot `--mcp-config` input performs the same
162
+ environment expansion. A private overlay should write the project settings
163
+ backup-first, preserve unrelated keys, exclude private routing metadata from
164
+ Git, and leave secret values as environment references.
165
+
166
+ Qwen MCP configuration is documented at
167
+ [Qwen Code MCP](https://qwenlm.github.io/qwen-code-docs/en/users/features/mcp/).
168
+
94
169
  ## Candidate memory clients
95
170
 
96
171
  The following clients have documented MCP support and are reasonable adapter
@@ -99,17 +174,28 @@ writers, operating assets, or runtime CI:
99
174
 
100
175
  | Client | Documented MCP surface | Cairnkeep status |
101
176
  |---|---|---|
102
- | Gemini CLI | `mcpServers` in `settings.json` | Candidate for stdio and HTTP memory tests |
177
+ | Antigravity CLI | Workspace `.agents/mcp_config.json` and plugins | Current successor candidate for memory plus native operating assets |
178
+ | Cursor | Project `.cursor/mcp.json`, plugins, and Agent CLI | Candidate for memory plus native operating assets |
103
179
  | 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 |
180
+ | Factory Droid | Native plugin marketplace | Candidate for reusing a compatible operating-layer package |
105
181
  | goose | MCP extensions and CLI session extension loading | Candidate for memory and recipe integration |
182
+ | Gemini CLI | `mcpServers` in `settings.json` | Legacy candidate for enterprise or API-key users only |
106
183
 
107
184
  Primary references:
108
185
 
109
- - [Gemini CLI MCP](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)
186
+ - [Antigravity MCP](https://antigravity.google/docs/mcp)
187
+ - [Cursor MCP](https://docs.cursor.com/context/model-context-protocol)
110
188
  - [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
189
  - [goose](https://github.com/aaif-goose/goose)
190
+ - [Gemini CLI transition announcement](https://github.com/google-gemini/gemini-cli/discussions/28017)
191
+ - [Superpowers harness integrations](https://github.com/obra/superpowers)
192
+
193
+ Superpowers is a useful comparison because it keeps shared behavior in one
194
+ source tree and ships thin native adapters through each harness's supported
195
+ plugin, extension, hook, or context mechanism. Cairnkeep follows the same
196
+ principle for future operating-layer ports: reuse common content, map real tool
197
+ names and lifecycle events per harness, and document degraded capabilities
198
+ instead of copying one harness's files into another.
113
199
 
114
200
  Support should be added one client at a time with a clean install, a local
115
201
  stdio handshake, an authenticated HTTP handshake, a real write/recall canary,
@@ -1,6 +1,6 @@
1
1
  # Curriculum Coverage Map
2
2
 
3
- **Baseline:** Cairnkeep 2.5.0
3
+ **Baseline:** Cairnkeep 2.7.0
4
4
  **Last reviewed:** 2026-07-29
5
5
 
6
6
  This map prevents the course from drifting behind the product. It assigns each
@@ -70,12 +70,14 @@ against `cairn help` so a new command cannot bypass a curriculum decision.
70
70
  | `cairn memory-server` | L02 |
71
71
  | `cairn sync` | L02 |
72
72
  | `cairn sync-pi` | L13 |
73
+ | `cairn sync-kimi` | L02 |
73
74
  | `cairn doctor` | L03; advanced repair in L13-L14 |
74
75
  | `cairn trajectory` | L13 |
75
76
  | `cairn artifact` | L13 |
76
77
  | `cairn capabilities` | L15 |
77
78
  | `cairn notes` | L13 |
78
79
  | `cairn eval` | L16 |
80
+ | `cairn graph` | L05-L06 |
79
81
  | `cairn memory` | L07-L08 |
80
82
  | `cairn audit-timer` | L05 and L13 |
81
83
  | `cairn uninstall` | L02 and L11-L12 |
@@ -1,6 +1,6 @@
1
1
  # Cairnkeep feature guide
2
2
 
3
- **Baseline:** Cairnkeep 2.5.0
3
+ **Baseline:** Cairnkeep 2.7.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
@@ -76,7 +76,8 @@ prerequisites for ordinary memory.
76
76
 
77
77
  - Use a generated launcher so project environment and hooks are repeatable.
78
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.
79
+ - Run `cairn sync-pi --check` when the optional Pi capture/graph adapter is installed.
80
+ - Run `cairn sync-kimi --check` when the optional Kimi graph Skill is installed.
80
81
  - Use `cairn doctor --repair` only after preserving the affected store and only
81
82
  for repairable derived indexes/metadata.
82
83
  - Use `cairn uninstall --dry-run` before uninstall; durable memory is retained
@@ -1,8 +1,8 @@
1
1
  # Learn Cairnkeep
2
2
 
3
- This learning path teaches Cairnkeep through small, verifiable outcomes. The
4
- canonical lesson is written once and can be reused as a guide, blog post,
5
- workshop handout, or video script.
3
+ This public learning path teaches Cairnkeep through small, verifiable outcomes.
4
+ It is the technical source for guides, workshops, and independently reviewed
5
+ publication material.
6
6
 
7
7
  ## Start here
8
8
 
@@ -22,9 +22,9 @@ The public [course labs](https://github.com/cairnkeep/cairnkeep-course-labs)
22
22
  provide one synthetic project with tagged checkpoints shared by lessons,
23
23
  articles, workshops, and videos.
24
24
 
25
- Lessons marked **Ready** include a complete exercise and presenter script.
26
- Lessons marked **Brief** define outcomes and acceptance criteria and will be
27
- expanded according to the [production plan](PRODUCTION-PLAN.md).
25
+ Lessons marked **Ready** include a complete, release-verified exercise. Lessons
26
+ marked **Brief** define public outcomes and acceptance criteria and will be
27
+ expanded only after their labs are executable.
28
28
 
29
29
  ## Curriculum
30
30
 
@@ -62,7 +62,7 @@ Every complete lesson contains:
62
62
  3. A hands-on exercise using non-sensitive sample data.
63
63
  4. Verification and recovery steps.
64
64
  5. A privacy or security boundary.
65
- 6. A presenter-ready video script.
65
+ 6. Release compatibility metadata for completed exercises.
66
66
 
67
67
  The learner should never need optional infrastructure to complete L00-L06.
68
68
  Remote memory, RAG, routing, containers, structured capture, typed nodes,
@@ -70,8 +70,8 @@ capability governance, and evaluation are separate opt-in modules.
70
70
 
71
71
  ## For contributors
72
72
 
73
- Use [the lesson template](templates/lesson-template.md) and
74
- [the video template](templates/video-script-template.md). The
75
- [instructor guide](instructor-guide.md) defines rehearsal, recording, and
76
- publication checks. Commands in finished lessons must be tested against the
77
- current release before publication.
73
+ Use [the lesson template](templates/lesson-template.md). Commands in finished
74
+ lessons must be tested against the current release before publication.
75
+ Unpublished editorial plans and recording scripts are intentionally maintained
76
+ outside the public product repository; stable video links or transcripts can
77
+ be added here after publication.
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 10 minutes
6
- **Tested with:** Cairnkeep 2.5.0
6
+ **Tested with:** Cairnkeep 2.7.0
7
7
 
8
8
  ## Outcome
9
9
 
@@ -93,7 +93,3 @@ configuration and are taught later.
93
93
  - Optional services are not prerequisites.
94
94
 
95
95
  Next: [L01 - Try it safely](L01-safe-trial.md).
96
-
97
- ## Video
98
-
99
- Use [the L00 presenter script](../video-scripts/L00-why-cairnkeep.md).