@cairnkeep/cli 2.6.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.
- package/CHANGELOG.md +14 -1
- package/README.md +22 -8
- package/bin/cairn +15 -3
- package/claude/commands/graphify.md +46 -55
- package/docs/harness-compatibility.md +13 -5
- package/docs/learning/CURRICULUM-MAP.md +3 -1
- package/docs/learning/FEATURE-GUIDE.md +3 -2
- package/docs/learning/README.md +12 -12
- package/docs/learning/lessons/L00-why-cairnkeep.md +1 -5
- package/docs/learning/lessons/L01-safe-trial.md +3 -7
- package/docs/learning/lessons/L02-installation.md +6 -8
- package/docs/learning/lessons/L03-first-project.md +1 -5
- package/docs/learning/lessons/L04-memory-fundamentals.md +0 -6
- package/docs/learning/lessons/L05-daily-workflow.md +0 -5
- package/docs/learning/lessons/L06-repository-quality.md +0 -6
- package/docs/learning/lessons/L07-privacy-and-storage.md +0 -5
- package/docs/learning/lessons/L08-multiple-machines.md +0 -5
- package/docs/learning/lessons/L09-domain-knowledge.md +0 -5
- package/docs/learning/lessons/L10-context-exploration.md +0 -5
- package/docs/learning/lessons/L11-containers.md +0 -5
- package/docs/learning/lessons/L12-managed-overlays.md +0 -6
- package/docs/learning/lessons/L13-session-evidence.md +0 -6
- package/docs/learning/lessons/L14-typed-memory.md +0 -6
- package/docs/learning/lessons/L15-capability-governance.md +0 -6
- package/docs/learning/lessons/L16-evaluation.md +0 -7
- package/docs/learning/lessons/L17-agent-boundary.md +0 -6
- package/docs/learning/templates/lesson-template.md +0 -4
- package/docs/operating.md +79 -9
- package/docs/privacy-and-data-flow.md +1 -0
- package/examples/eval/bundled-fake.json +1 -1
- package/kimi/skills/graphify/SKILL.md +33 -0
- package/mcp-memory-server/dist/capability-registry.js +2 -2
- package/mcp-memory-server/dist/graph-cli.js +386 -0
- package/mcp-memory-server/package.json +2 -1
- package/opencode/command/graphify.md +48 -58
- package/package.json +2 -1
- package/pi/prompts/graphify.md +32 -0
- package/scripts/bootstrap.sh +2 -1
- package/scripts/completion.sh +17 -6
- package/scripts/smoke-bash32.sh +1 -0
- package/scripts/sync-kimi-assets.sh +77 -0
- package/scripts/sync-pi-assets.sh +52 -31
- package/scripts/test-bootstrap-untracked.sh +21 -0
- package/scripts/test-cli-dispatch.sh +4 -0
- package/scripts/test-completion.sh +5 -0
- package/scripts/test-graph-harness-adapters.sh +46 -0
- package/scripts/test-launcher-hooks.sh +4 -2
- package/scripts/test-learning-docs.sh +2 -9
- package/scripts/test-package-install.sh +6 -0
- package/scripts/test-trajectory-hooks.sh +5 -1
- package/scripts/test-uninstall.sh +12 -2
- package/scripts/uninstall.sh +11 -4
- package/templates/graph-policy.md.template +23 -4
- package/docs/learning/PRODUCTION-PLAN.md +0 -153
- package/docs/learning/instructor-guide.md +0 -66
- package/docs/learning/templates/video-script-template.md +0 -50
- package/docs/learning/video-scripts/L00-why-cairnkeep.md +0 -80
- package/docs/learning/video-scripts/L01-safe-trial.md +0 -78
- package/docs/learning/video-scripts/L02-installation.md +0 -97
- package/docs/learning/video-scripts/L03-first-project.md +0 -99
|
@@ -33,11 +33,6 @@ invalidation. Disable the binary and verify standalone Cairnkeep remains usable.
|
|
|
33
33
|
- The learner distinguishes exploration output from durable memory.
|
|
34
34
|
- An unavailable explorer fails locally without breaking memory operations.
|
|
35
35
|
|
|
36
|
-
## Planned video
|
|
37
|
-
|
|
38
|
-
Compare a broad manual search with one cited exploration result. Target 10
|
|
39
|
-
minutes and keep routing as a separate optional chapter.
|
|
40
|
-
|
|
41
36
|
## Source material
|
|
42
37
|
|
|
43
38
|
- [Operating guide](../../operating.md#exploration-cache-context_explore-on-by-default)
|
|
@@ -32,11 +32,6 @@ only the course resources.
|
|
|
32
32
|
volume is deliberately removed.
|
|
33
33
|
- The learner can enumerate every mount and network boundary.
|
|
34
34
|
|
|
35
|
-
## Planned video
|
|
36
|
-
|
|
37
|
-
Use a diagram first, then replace a running container while retaining its
|
|
38
|
-
volume. Target 15 minutes.
|
|
39
|
-
|
|
40
35
|
## Source material
|
|
41
36
|
|
|
42
37
|
- [Containers](../../containers.md)
|
|
@@ -33,12 +33,6 @@ upgrades the pin, verifies fleet status, and rolls one project back.
|
|
|
33
33
|
- Effective storage and service destinations are explainable before launch.
|
|
34
34
|
- Upgrade and rollback preserve the disposable memory store.
|
|
35
35
|
|
|
36
|
-
## Planned video
|
|
37
|
-
|
|
38
|
-
Show the same project under public core and a generic managed overlay, then
|
|
39
|
-
explain the small delta. Target 15 minutes; keep registry administration in the
|
|
40
|
-
written operator lab.
|
|
41
|
-
|
|
42
36
|
## Source material
|
|
43
37
|
|
|
44
38
|
- [Building a private overlay](../../building-an-overlay.md)
|
|
@@ -57,12 +57,6 @@ cairn artifact list --json
|
|
|
57
57
|
memory by purpose, store, lifecycle, and trust level.
|
|
58
58
|
- Cleanup targets only the disposable course evidence.
|
|
59
59
|
|
|
60
|
-
## Planned video
|
|
61
|
-
|
|
62
|
-
Draw the evidence lifecycle, capture one synthetic session, inspect the redacted
|
|
63
|
-
record, and find the resulting failure note. Target 14 minutes. Treat compaction
|
|
64
|
-
and Pi as short boundary chapters rather than requiring three harness demos.
|
|
65
|
-
|
|
66
60
|
## Source material
|
|
67
61
|
|
|
68
62
|
- [Operating guide: structured trajectories](../../operating.md#structured-session-trajectories-opt-in)
|
|
@@ -38,12 +38,6 @@ import.
|
|
|
38
38
|
- Imported values never appear in command diagnostics or course screenshots.
|
|
39
39
|
- The learner does not present a logical note address as a host path.
|
|
40
40
|
|
|
41
|
-
## Planned video
|
|
42
|
-
|
|
43
|
-
Use a small type-and-tag diagram, then demonstrate filtered discovery and the
|
|
44
|
-
dry-run/replay sequence. Target 12 minutes. Keep the full import limits in the
|
|
45
|
-
written lesson rather than narrating a table of numbers.
|
|
46
|
-
|
|
47
41
|
## Source material
|
|
48
42
|
|
|
49
43
|
- [Operating guide: typed memory nodes](../../operating.md#typed-memory-nodes-and-note-address-spaces-opt-in)
|
|
@@ -43,12 +43,6 @@ CAIRN_CAPABILITY_CONTRACT=1 cairn capabilities logging enable
|
|
|
43
43
|
- No callback record contains prompts, tool arguments, results, or memory values.
|
|
44
44
|
- Disabling an optional capability does not break standalone memory.
|
|
45
45
|
|
|
46
|
-
## Planned video
|
|
47
|
-
|
|
48
|
-
Show precedence as three stacked layers, then perform one disable/reset cycle.
|
|
49
|
-
Target 11 minutes. Use JSON status for evidence and avoid presenting a digest as
|
|
50
|
-
a security signature or performance result.
|
|
51
|
-
|
|
52
46
|
## Source material
|
|
53
47
|
|
|
54
48
|
- [Operating guide: managed capability contract](../../operating.md#managed-capability-contract-opt-in)
|
|
@@ -52,13 +52,6 @@ after the lab is rehearsed from the packaged CLI rather than a source clone.
|
|
|
52
52
|
without claiming causality, significance, or product improvement.
|
|
53
53
|
- Course cleanup is limited to its temporary contained experiment root.
|
|
54
54
|
|
|
55
|
-
## Planned video
|
|
56
|
-
|
|
57
|
-
Start with the claim boundary, validate before running, inspect one two-pass
|
|
58
|
-
report, and close by marking the fixture `offline-framework`. Target 16 minutes.
|
|
59
|
-
Publish ablation as a second short video if the complete schedule obscures the
|
|
60
|
-
measurement concepts.
|
|
61
|
-
|
|
62
55
|
## Source material
|
|
63
56
|
|
|
64
57
|
- [Operating guide: evaluation harness](../../operating.md#evaluation-harness-opt-in)
|
|
@@ -43,12 +43,6 @@ be required before any future implementation could act.
|
|
|
43
43
|
- The learner can name at least one explicit future prerequisite and one
|
|
44
44
|
unconditional human stop point.
|
|
45
45
|
|
|
46
|
-
## Planned video
|
|
47
|
-
|
|
48
|
-
Use one ownership diagram and one fictional proposal. Target 9 minutes. Put a
|
|
49
|
-
persistent `DESIGN ONLY` label on every future component and end on the exact
|
|
50
|
-
current-versus-future boundary.
|
|
51
|
-
|
|
52
46
|
## Source material
|
|
53
47
|
|
|
54
48
|
- [Meta-agent design contract](../../design/meta-agent.md)
|
package/docs/operating.md
CHANGED
|
@@ -17,9 +17,10 @@ installs. This guide covers all three in order.
|
|
|
17
17
|
## Prerequisites
|
|
18
18
|
|
|
19
19
|
- Node.js 22 or newer (for the memory server) and a supported harness. Claude
|
|
20
|
-
Code and OpenCode receive the full operating layer. Kimi Code
|
|
21
|
-
|
|
22
|
-
adapter
|
|
20
|
+
Code and OpenCode receive the full operating layer. Kimi Code receives the
|
|
21
|
+
memory MCP, launcher, and opt-in graph Skill; Qwen Code receives the memory
|
|
22
|
+
MCP and launcher. Pi receives its native trajectory adapter, graph prompt,
|
|
23
|
+
and launcher.
|
|
23
24
|
- Optional: the `sqlite3` CLI for `cairn memory export`. Runtime memory and
|
|
24
25
|
`cairn memory import` do not require it.
|
|
25
26
|
- Optional: an OpenAI-compatible LLM endpoint for memory extraction and
|
|
@@ -159,10 +160,78 @@ Model selection stays operator-env-driven through the existing
|
|
|
159
160
|
variables (see "Configuration" below) — the harness commits no default model
|
|
160
161
|
and carries no known-good allowlist.
|
|
161
162
|
|
|
163
|
+
## Optional Graphify workflow
|
|
164
|
+
|
|
165
|
+
Graphify is an optional local structural index. Install only its isolated CLI:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
uv tool install graphifyy
|
|
169
|
+
# or: pipx install graphifyy
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Do not run `graphify install`: Cairnkeep owns the harness commands, policies,
|
|
173
|
+
and hooks, so Graphify-owned assets would duplicate that operating layer.
|
|
174
|
+
With the managed capability contract enabled, run
|
|
175
|
+
`cairn capabilities enable graph`; otherwise enable the compatibility setting
|
|
176
|
+
`graphify.enabled` in `.planning/config.json`. Then use the managed command
|
|
177
|
+
surface. Claude Code and OpenCode receive the native wrapper:
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
/graphify build
|
|
181
|
+
/graphify status
|
|
182
|
+
/graphify query putTrajectory
|
|
183
|
+
/graphify explain putTrajectory
|
|
184
|
+
/graphify path putTrajectory resolveCapabilityStatus
|
|
185
|
+
/graphify diff
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Install the equivalent thin adapters for Kimi Code and Pi:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
cairn sync-kimi --apply
|
|
192
|
+
cairn sync-pi --apply
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Kimi then exposes `/graphify` and `/skill:graphify`; Pi exposes `/graphify`.
|
|
196
|
+
Both adapters delegate exclusively to the same portable CLI, which also remains
|
|
197
|
+
available directly from their project shell:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
cairn graph build
|
|
201
|
+
cairn graph status
|
|
202
|
+
cairn graph query putTrajectory
|
|
203
|
+
cairn graph explain putTrajectory
|
|
204
|
+
cairn graph path putTrajectory resolveCapabilityStatus
|
|
205
|
+
cairn graph diff
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The same direct CLI works with Qwen Code, Codex, and other shell-capable
|
|
209
|
+
clients. This does not add a Pi MCP bridge or imply that those harnesses receive
|
|
210
|
+
the rest of Cairnkeep's operating layer.
|
|
211
|
+
|
|
212
|
+
All six modes delegate to `cairn graph`. Managed builds run Graphify's local
|
|
213
|
+
code-only `update` path with provider credentials removed from the subprocess
|
|
214
|
+
environment, then atomically publish validated artifacts under
|
|
215
|
+
`.planning/graphs/`. Previous published artifacts are isolated during the scan
|
|
216
|
+
so Graphify cannot re-index its own generated HTML/report/JSON. Managed builds
|
|
217
|
+
do not perform Graphify's optional semantic document extraction. Prefer exact
|
|
218
|
+
function, class, or file names; broad natural-language graph queries are less
|
|
219
|
+
precise. Cairnkeep does not install or update Graphify automatically.
|
|
220
|
+
|
|
162
221
|
## Setup order (Kimi Code)
|
|
163
222
|
|
|
164
|
-
Kimi Code can use the Cairnkeep memory MCP
|
|
165
|
-
|
|
223
|
+
Kimi Code can use the Cairnkeep memory MCP, generated project launcher, and one
|
|
224
|
+
thin graph Skill. Install the Skill into `$KIMI_CODE_HOME` (default
|
|
225
|
+
`~/.kimi-code`) with:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
cairn sync-kimi --apply
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Use `cairn sync-kimi --check` to detect drift or `--live-root DIR` for an
|
|
232
|
+
isolated Kimi root. The command owns only `skills/graphify/SKILL.md`; `cairn
|
|
233
|
+
uninstall --kimi-live-root DIR` removes it backup-first. It adds no hooks,
|
|
234
|
+
agents, plugins, or new data flow.
|
|
166
235
|
|
|
167
236
|
For local stdio memory, create `.kimi-code/mcp.json` in the project:
|
|
168
237
|
|
|
@@ -223,8 +292,8 @@ configuration, approval behavior, and overlay guidance.
|
|
|
223
292
|
|
|
224
293
|
## Setup order (Pi)
|
|
225
294
|
|
|
226
|
-
Pi trajectory capture uses the same project scaffold and store
|
|
227
|
-
|
|
295
|
+
Pi trajectory capture uses the same project scaffold and store. Its sync also
|
|
296
|
+
installs a thin `/graphify` prompt into Pi's agent root:
|
|
228
297
|
|
|
229
298
|
```bash
|
|
230
299
|
npm install -g @cairnkeep/cli
|
|
@@ -240,8 +309,9 @@ a user-chosen Pi extension/bridge separately.
|
|
|
240
309
|
|
|
241
310
|
Use `cairn sync-pi --check` to report drift without writing, or
|
|
242
311
|
`--live-root DIR` to target an isolated Pi agent root. The command owns exactly
|
|
243
|
-
`extensions/cairnkeep-trajectory.ts
|
|
244
|
-
removes
|
|
312
|
+
`extensions/cairnkeep-trajectory.ts` and `prompts/graphify.md`; `cairn
|
|
313
|
+
uninstall --pi-live-root DIR` removes those files backup-first and leaves every
|
|
314
|
+
other Pi asset untouched.
|
|
245
315
|
|
|
246
316
|
The extension listens for Pi's native `session_shutdown` event and reads only
|
|
247
317
|
the active branch from the read-only session manager. It returns before doing
|
|
@@ -16,6 +16,7 @@ request unless the corresponding endpoint and credential are configured.
|
|
|
16
16
|
| `domain_knowledge_sync` | Files selected by the sync configuration | `ANYTHINGLLM_BASE_URL` |
|
|
17
17
|
| `route_check` | A health request, with no memory or prompt content | `CAIRN_ROUTE_ENDPOINT` |
|
|
18
18
|
| `context_explore` | Repository path and query are passed to the configured local executable | `CAIRN_EXPLORE_BINARY`; any further data flow is controlled by that tool |
|
|
19
|
+
| Optional Graphify workflow | The repository path, exact query/symbol names, and local published graph path are passed to the operator-installed `graphify` executable | Local Graphify subprocess with a minimal environment and no provider credentials; managed build uses code-only `update`, never semantic document extraction |
|
|
19
20
|
| Remote HTTP memory | MCP requests and responses, including memory content | The explicitly registered Cairnkeep HTTP server |
|
|
20
21
|
| Opt-in trajectory capture | None | Local `<project>/.agentfs/trajectory.db` only; no model or HTTP path exists |
|
|
21
22
|
| Opt-in capability callback records | None | Payload-free final metadata in local `<project>/.agentfs/trajectory.db`; HTTP transport is always skipped |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"identifier":"cairn-offline-fake-v1","package_version":"2.
|
|
1
|
+
{"identifier":"cairn-offline-fake-v1","package_version":"2.7.0","schema_version":1,"task_set_digest":"13e95379f35839593047ec34521a65a8fa3ab92bd3993bca9dc8bf5c4a9ff36f"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: graphify
|
|
3
|
+
description: Build, query, and inspect the local project graph exclusively through Cairnkeep
|
|
4
|
+
type: flow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- managed-by:cairnkeep -->
|
|
8
|
+
# Cairnkeep graph
|
|
9
|
+
|
|
10
|
+
Handle this request through Cairnkeep's public graph owner. The invocation
|
|
11
|
+
arguments are:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
$ARGUMENTS
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Accept exactly one of these forms:
|
|
18
|
+
|
|
19
|
+
- `build`
|
|
20
|
+
- `build --force`
|
|
21
|
+
- `query <term>`
|
|
22
|
+
- `status`
|
|
23
|
+
- `diff`
|
|
24
|
+
- `explain <symbol>`
|
|
25
|
+
- `path <from> <to>`
|
|
26
|
+
|
|
27
|
+
Invoke the Bash tool exactly once with the corresponding `cairn graph ...`
|
|
28
|
+
command. Pass each term or symbol as one safely quoted argument. Return the
|
|
29
|
+
command output verbatim and stop.
|
|
30
|
+
|
|
31
|
+
If the arguments do not match a supported form, show the supported forms and
|
|
32
|
+
stop without invoking a tool. Do not call the Graphify executable, edit graph
|
|
33
|
+
artifacts, spawn another agent, or implement graph logic in this Skill.
|
|
@@ -6,7 +6,7 @@ const MAX_COMPATIBILITY_CONFIG_BYTES = 64 * 1024;
|
|
|
6
6
|
function environmentName(id) {
|
|
7
7
|
return `CAIRN_CAPABILITY_${id.toUpperCase().replaceAll(".", "_")}`;
|
|
8
8
|
}
|
|
9
|
-
async function
|
|
9
|
+
export async function isGraphCapabilityCompatible(projectRoot) {
|
|
10
10
|
const planningDirectory = join(projectRoot, ".planning");
|
|
11
11
|
const configPath = join(planningDirectory, "config.json");
|
|
12
12
|
try {
|
|
@@ -84,7 +84,7 @@ export const CAPABILITY_REGISTRY = [
|
|
|
84
84
|
compatibility_default: false,
|
|
85
85
|
restart_required: false,
|
|
86
86
|
logging_policy: "final-callback",
|
|
87
|
-
resolveCompatibility: ({ projectRoot, graphifyEnabled }) => graphifyEnabled ??
|
|
87
|
+
resolveCompatibility: ({ projectRoot, graphifyEnabled }) => graphifyEnabled ?? isGraphCapabilityCompatible(projectRoot),
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
id: "security.audit",
|