@cairnkeep/cli 2.14.0 → 2.15.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 +30 -1
- package/README.md +22 -2
- package/claude/commands/cairn-work.md +19 -0
- package/docs/design/team-mode.md +145 -0
- package/docs/harness-compatibility.md +11 -10
- package/docs/learning/CURRICULUM-MAP.md +4 -1
- package/docs/learning/FEATURE-GUIDE.md +8 -4
- package/docs/learning/README.md +2 -1
- package/docs/learning/lessons/L00-why-cairnkeep.md +1 -1
- package/docs/learning/lessons/L01-safe-trial.md +1 -1
- package/docs/learning/lessons/L02-installation.md +1 -1
- package/docs/learning/lessons/L03-first-project.md +1 -1
- package/docs/learning/lessons/L19-validated-skill-improvement.md +1 -1
- package/docs/learning/lessons/L20-mcp-tool-profiles.md +1 -1
- package/docs/learning/lessons/L21-context-packs.md +1 -1
- package/docs/learning/lessons/L22-native-windows.md +1 -1
- package/docs/learning/lessons/L23-guided-setup.md +1 -1
- package/docs/learning/lessons/L24-okf-exchange.md +1 -1
- package/docs/learning/lessons/L25-playbooks.md +114 -0
- package/docs/learning/tracks/operator.md +5 -2
- package/docs/learning/tracks/practitioner.md +5 -3
- package/docs/learning/video-scripts/V25-playbooks.md +38 -0
- package/docs/native-windows.md +12 -0
- package/docs/operating.md +54 -0
- package/docs/privacy-and-data-flow.md +23 -0
- package/docs/quickstart.md +17 -1
- package/docs/storage.md +22 -0
- package/examples/eval/bundled-fake.json +1 -1
- package/kimi/skills/cairn-work/SKILL.md +13 -0
- package/mcp-memory-server/dist/playbook-cli.js +321 -0
- package/mcp-memory-server/dist/playbook-receipt.js +245 -0
- package/mcp-memory-server/dist/playbook-schema.js +56 -0
- package/mcp-memory-server/dist/playbook.js +383 -0
- package/mcp-memory-server/package.json +2 -1
- package/opencode/command/cairn-work.md +13 -0
- package/package.json +1 -1
- package/pi/prompts/cairn-work.md +12 -0
- package/schemas/playbook.schema.json +29 -0
- package/scripts/bootstrap.sh +17 -0
- package/scripts/cairn-cli.mjs +2 -0
- package/scripts/completion.sh +23 -3
- package/scripts/doctor.sh +14 -1
- package/scripts/playbook-instructions.mjs +108 -0
- package/scripts/setup-core.mjs +1 -0
- package/scripts/setup.mjs +8 -0
- package/scripts/sync-kimi-assets.sh +3 -3
- package/scripts/sync-opencode-memory-assets.sh +2 -1
- package/scripts/sync-pi-assets.sh +2 -1
- package/scripts/test-cli-dispatch.sh +2 -0
- package/scripts/test-completion.sh +11 -2
- package/scripts/test-graph-harness-adapters.sh +9 -3
- package/scripts/test-harness-registry.sh +11 -0
- package/scripts/test-learning-docs.sh +23 -2
- package/scripts/test-package-install.sh +26 -0
- package/scripts/test-playbook-instructions.sh +60 -0
- package/scripts/test-windows-native.mjs +7 -0
- package/scripts/uninstall.sh +16 -1
- package/scripts/windows-platform.mjs +24 -3
- package/templates/playbook-agent-instructions.md.template +14 -0
- package/templates/playbooks.json.template +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable user-facing changes are documented here. This project follows
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [2.15.0] - 2026-08-17
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add strict local project playbooks with `minimal`, `balanced`, and `strict`
|
|
13
|
+
profiles, bounded canonical action overrides, deterministic start/check/finish
|
|
14
|
+
decisions, enforcement for missing `must` evidence, and stable policy and
|
|
15
|
+
decision digests.
|
|
16
|
+
- Add private project-bound outcome receipts with bounded unauthenticated actor
|
|
17
|
+
provenance, lifecycle inspection, and doctor validation without storing
|
|
18
|
+
prompts, source bodies, changed paths, diffs, credentials, or command output.
|
|
19
|
+
- Add ownership-safe managed `AGENTS.md` guidance plus thin Claude, OpenCode,
|
|
20
|
+
Pi, and Kimi `/cairn-work` adapters; Codex and Qwen use the portable project
|
|
21
|
+
instructions without automatic skill activation.
|
|
22
|
+
- Add an implementation-ready future team-mode contract covering authenticated
|
|
23
|
+
identity, scopes, ACLs, review queues, audit history, tenant isolation,
|
|
24
|
+
retention, migration, and release gates while keeping team operation deferred.
|
|
25
|
+
- Add a release-verified playbook lesson, course checkpoint, feature/curriculum
|
|
26
|
+
coverage, and companion video script.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Guided setup and tracked bootstrap now install the balanced policy and safely
|
|
31
|
+
reconcile the managed agent-instruction block. Untracked bootstrap leaves
|
|
32
|
+
shared `AGENTS.md` untouched.
|
|
33
|
+
- Extend completion, native Windows, package, doctor, and backup-first uninstall
|
|
34
|
+
coverage to the playbook lifecycle and harness adapters.
|
|
35
|
+
|
|
8
36
|
## [2.14.0] - 2026-08-17
|
|
9
37
|
|
|
10
38
|
### Added
|
|
@@ -370,7 +398,8 @@ stored memories.
|
|
|
370
398
|
- Preserve executable permissions and Bash 3.2 portability on macOS.
|
|
371
399
|
- Add backup-first uninstall and SQLite-safe memory export/import guidance.
|
|
372
400
|
|
|
373
|
-
[Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.
|
|
401
|
+
[Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.15.0...HEAD
|
|
402
|
+
[2.15.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.14.0...v2.15.0
|
|
374
403
|
[2.14.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.13.1...v2.14.0
|
|
375
404
|
[2.13.1]: https://github.com/cairnkeep/cairnkeep/compare/v2.13.0...v2.13.1
|
|
376
405
|
[2.13.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.12.0...v2.13.0
|
package/README.md
CHANGED
|
@@ -32,11 +32,11 @@ verification, and the first remember/recall cycle.
|
|
|
32
32
|
## Status
|
|
33
33
|
|
|
34
34
|
Shipped: the memory server, the `cairn` CLI (`setup`, `bootstrap`, `memory-server`, `sync`, `sync-pi`, `sync-kimi`,
|
|
35
|
-
`doctor`, `trajectory`, `artifact`, `evidence`, `mcp-tools`, `pack`, `notes`, `memory`, `eval`, `audit-timer`, `completion`, `uninstall`) installable via
|
|
35
|
+
`doctor`, `playbook`, `trajectory`, `artifact`, `evidence`, `mcp-tools`, `pack`, `notes`, `memory`, `eval`, `audit-timer`, `completion`, `uninstall`) installable via
|
|
36
36
|
`npm i -g @cairnkeep/cli`, and the
|
|
37
37
|
operating layer (commands,
|
|
38
38
|
agents, hooks) installed on Claude Code and OpenCode, plus the native Pi
|
|
39
|
-
trajectory extension and thin Pi/Kimi graph adapters. The generic launchers
|
|
39
|
+
trajectory extension and thin Pi/Kimi graph and playbook adapters. The generic launchers
|
|
40
40
|
expose wrapper seams (`.ai/pre-launch.sh`/`.ai/pre-launch.ps1`,
|
|
41
41
|
`CAIRN_EXTRA_SETTINGS`, `.ai/post-exit.sh`/`.ai/post-exit.ps1`) so an enterprise wrapper can add provider/credential setup
|
|
42
42
|
without forking them. Also shipped: context exploration (`/context-explore`) and
|
|
@@ -48,6 +48,9 @@ Version 2.12 adds a declarative harness registry, first-class Codex project
|
|
|
48
48
|
setup, and a shorter path from installation to verified recall.
|
|
49
49
|
Version 2.13 adds opt-in local Git-linked work evidence around generated harness
|
|
50
50
|
launchers, including native Windows, without capturing prompts or replacing Git.
|
|
51
|
+
Version 2.15 adds bounded project playbooks that help agents select existing
|
|
52
|
+
recall, planning, verification, review, security, documentation, and learning
|
|
53
|
+
steps without becoming an agent runtime or granting approval.
|
|
51
54
|
|
|
52
55
|
## Compatibility
|
|
53
56
|
|
|
@@ -199,6 +202,19 @@ patterns/transactional-migrations: Use transactional migrations for schema chang
|
|
|
199
202
|
The exact command rendering depends on the client. Any MCP client can call
|
|
200
203
|
`memory_write` and `memory_search` directly.
|
|
201
204
|
|
|
205
|
+
Setup also installs a balanced `.ai/playbooks.json` policy and an ownership-safe
|
|
206
|
+
managed block in `AGENTS.md`. Agents can evaluate it at task boundaries:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
cairn playbook check start --complexity standard --familiarity mixed
|
|
210
|
+
cairn playbook check finish --changed src/example.ts --completed verify.tests --enforce
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The result selects only existing Cairnkeep actions. It never runs them, enables
|
|
214
|
+
a disabled capability, grants approval, or promotes memory automatically. Use
|
|
215
|
+
`cairn playbook status`, `set minimal|balanced|strict`, and `enable|disable` to
|
|
216
|
+
inspect or customize the project policy.
|
|
217
|
+
|
|
202
218
|
For Codex CLI, `cairn setup --harness codex --memory local` writes the
|
|
203
219
|
project-scoped `.codex/config.toml` entry and both POSIX and native Windows
|
|
204
220
|
launchers. Review the configuration and trust the project before launching.
|
|
@@ -325,6 +341,10 @@ search):
|
|
|
325
341
|
| `CAIRN_CONTEXT_PACKS` | Opt in to local context-pack list/search/read/related tools (default off) |
|
|
326
342
|
| `CAIRN_CONTEXT_PACK_HTTP` | Separately consent to context-pack tools over authenticated HTTP (default off) |
|
|
327
343
|
| `CAIRN_PACK_BASE_DIR` | Immutable pack objects, source records, pointers, and retrieval cache (default `~/.cairnkeep/packs`) |
|
|
344
|
+
| `CAIRN_PLAYBOOK_PROFILE` | Process-only playbook profile override: `minimal`, `balanced`, or `strict` (project default: `balanced`) |
|
|
345
|
+
| `CAIRN_PLAYBOOK_ACTOR` | Optional local receipt label; caller-supplied and unauthenticated in v2.15 |
|
|
346
|
+
| `CAIRN_PLAYBOOK_ACTOR_KIND` | Optional local actor kind: `user`, `agent`, or `service` |
|
|
347
|
+
| `CAIRN_PLAYBOOK_SESSION` | Optional bounded session label used by playbook decisions and receipts |
|
|
328
348
|
| `CAIRN_TRAJECTORY_CAPTURE` | Opt in to local structured session capture (`1`, `true`, `yes`, or `on`; default off) |
|
|
329
349
|
| `CAIRN_TRAJECTORY_SESSION_MAX_BYTES` | Maximum serialized bytes per captured session (default `5242880`, 5 MiB) |
|
|
330
350
|
| `CAIRN_TRAJECTORY_STORE_MAX_BYTES` | Maximum logical bytes across local trajectories (default `268435456`, 256 MiB) |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Evaluate Cairnkeep's project playbook at task start, scope changes, or finish
|
|
3
|
+
argument-hint: "start|check|finish [cairn playbook check options]"
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- managed-by:cairnkeep -->
|
|
8
|
+
# Cairnkeep playbook check
|
|
9
|
+
|
|
10
|
+
Run exactly one local command:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
cairn playbook check $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Accept `start`, `check`, or `finish` followed only by check options documented by
|
|
17
|
+
`cairn playbook --help`. Safely quote every argument. Return the decision
|
|
18
|
+
and explain which `must`, `should`, and `may` actions you will follow. Never
|
|
19
|
+
claim that this command executed an action or granted approval.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Team mode design contract
|
|
2
|
+
|
|
3
|
+
**Status:** design only; not shipped in Cairnkeep 2.15
|
|
4
|
+
|
|
5
|
+
Cairnkeep 2.15 remains a local, single-operator product. Its playbook receipts
|
|
6
|
+
carry provider-neutral project and actor fields so a future authenticated team
|
|
7
|
+
service can preserve provenance, but those fields are caller assertions and
|
|
8
|
+
must not be used for authorization. This document defines the boundary a team
|
|
9
|
+
implementation must satisfy before that statement can change.
|
|
10
|
+
|
|
11
|
+
## Goal and non-goals
|
|
12
|
+
|
|
13
|
+
Team mode would let an organization share reviewed memory, context packs,
|
|
14
|
+
policies, decisions, and workflow evidence without turning private local
|
|
15
|
+
stores into a common bucket. It must retain local-first operation and explicit
|
|
16
|
+
promotion. It is not collaborative editing, an agent runtime, employee
|
|
17
|
+
monitoring, automatic message ingestion, or an implicit channel for prompts,
|
|
18
|
+
credentials, source trees, or session transcripts.
|
|
19
|
+
|
|
20
|
+
## Identity and project scope
|
|
21
|
+
|
|
22
|
+
The service must authenticate a human or workload before accepting a team
|
|
23
|
+
operation. Stable internal subject IDs, organization IDs, and canonical project
|
|
24
|
+
IDs are authoritative; display names, email addresses, Git usernames, and the
|
|
25
|
+
current 2.15 `--actor` value are labels only. Authentication adapters may use
|
|
26
|
+
OIDC/OAuth, mTLS workload identity, or a locally administered service token,
|
|
27
|
+
but normalized claims must include issuer, subject, audience, authentication
|
|
28
|
+
time, and credential class. Tokens and raw identity claims never enter memory
|
|
29
|
+
or receipts.
|
|
30
|
+
|
|
31
|
+
Every object has exactly one scope:
|
|
32
|
+
|
|
33
|
+
| Scope | Owner | Default visibility | Promotion |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| personal | authenticated subject | that subject | explicit review request |
|
|
36
|
+
| project | canonical project | authorized project members | project review policy |
|
|
37
|
+
| team | organization collection | named collection members | collection review policy |
|
|
38
|
+
|
|
39
|
+
Reads never fall through from one project or organization to another. A
|
|
40
|
+
personal object is not discoverable through project search until its selected,
|
|
41
|
+
redacted form has been approved and copied as a new immutable project object.
|
|
42
|
+
|
|
43
|
+
## Authorization
|
|
44
|
+
|
|
45
|
+
Authorization must be deny-by-default and evaluated server-side after
|
|
46
|
+
authentication. Minimum roles are `reader`, `contributor`, `reviewer`,
|
|
47
|
+
`maintainer`, and `auditor`. Roles map to explicit operations rather than broad
|
|
48
|
+
administrator shortcuts:
|
|
49
|
+
|
|
50
|
+
- readers may list and read approved project objects;
|
|
51
|
+
- contributors may create private proposals and submit review requests;
|
|
52
|
+
- reviewers may approve or reject proposals but cannot alter their bytes;
|
|
53
|
+
- maintainers may manage membership, retention, and project policy but cannot
|
|
54
|
+
approve their own content unless an explicit small-team exception is enabled
|
|
55
|
+
and audited;
|
|
56
|
+
- auditors may read append-only audit records, not content by default.
|
|
57
|
+
|
|
58
|
+
Capability contracts and MCP profiles remain an additional intersection. An
|
|
59
|
+
ACL cannot enable a disabled capability, broaden a tool profile, satisfy a
|
|
60
|
+
human confirmation, or make a destructive operation read-only.
|
|
61
|
+
|
|
62
|
+
## Review and conflict model
|
|
63
|
+
|
|
64
|
+
Shared durable memory and policies use immutable proposals. A proposal binds
|
|
65
|
+
the source scope, source object digest, redacted candidate bytes, base revision,
|
|
66
|
+
target scope, submitter identity, policy digest, and expiry. Approval creates a
|
|
67
|
+
new immutable revision and an audit event; it never mutates the proposal.
|
|
68
|
+
|
|
69
|
+
Concurrent proposals against the same base remain separate. The service may
|
|
70
|
+
compute a deterministic conflict report but must not select or merge a winner.
|
|
71
|
+
A reviewer resolves the conflict by accepting one proposal or submitting new
|
|
72
|
+
combined bytes. Playbook distribution follows the same review path and may not
|
|
73
|
+
silently replace a project override.
|
|
74
|
+
|
|
75
|
+
## Audit and receipts
|
|
76
|
+
|
|
77
|
+
Accepted operations append a canonical event containing organization,
|
|
78
|
+
project, subject, credential class, operation, object identity and digests,
|
|
79
|
+
authorization decision, policy revision, request ID, server time, and result.
|
|
80
|
+
Rejected privileged operations append a value-free denial event. Audit records
|
|
81
|
+
exclude prompt bodies, source content, secrets, tokens, full environment
|
|
82
|
+
snapshots, and unredacted personal data.
|
|
83
|
+
|
|
84
|
+
Audit history is append-only, hash-linked, bounded by an explicit retention
|
|
85
|
+
class, exportable by auditors, and covered by backup/restore verification.
|
|
86
|
+
Corrections append superseding events; they never rewrite history. A team
|
|
87
|
+
playbook receipt must distinguish the authenticated server subject from any
|
|
88
|
+
agent label supplied by a harness.
|
|
89
|
+
|
|
90
|
+
## Tenant isolation and storage
|
|
91
|
+
|
|
92
|
+
Organization and project identity must be part of every storage key and every
|
|
93
|
+
cache key. Database row policies or physically separate stores must be tested
|
|
94
|
+
with cross-tenant negative cases. Context-pack objects may be content-addressed
|
|
95
|
+
globally only when existence, metadata, timing, and deduplication cannot leak
|
|
96
|
+
across tenants; otherwise storage is tenant-local. Encryption keys, backup
|
|
97
|
+
namespaces, search indexes, embedding caches, temporary files, logs, and rate
|
|
98
|
+
limits observe the same boundary.
|
|
99
|
+
|
|
100
|
+
The HTTP deployment must retain authentication, Host and CORS validation,
|
|
101
|
+
request-size limits, timeouts, and explicit feature consent. No unauthenticated
|
|
102
|
+
compatibility mode may expose team data.
|
|
103
|
+
|
|
104
|
+
## Retention, deletion, and portability
|
|
105
|
+
|
|
106
|
+
Each scope declares retention for content, proposals, receipts, audit events,
|
|
107
|
+
indexes, and backups. Legal hold is an explicit audited state. Deletion first
|
|
108
|
+
revokes visibility, then schedules content and derived indexes for removal;
|
|
109
|
+
immutable audit tombstones retain only the minimum identifiers required by the
|
|
110
|
+
declared policy. An organization export uses open, versioned schemas with
|
|
111
|
+
digests and includes neither credentials nor another tenant's deduplicated
|
|
112
|
+
metadata.
|
|
113
|
+
|
|
114
|
+
## Migration and compatibility
|
|
115
|
+
|
|
116
|
+
Enabling team mode is an explicit deployment and project decision. Existing
|
|
117
|
+
local memory, packs, policies, and receipts remain local until individually
|
|
118
|
+
selected for a previewable import. The importer validates schemas and digests,
|
|
119
|
+
shows destination scope and redactions, and requires confirmation. There is no
|
|
120
|
+
automatic upload, background synchronization, or inference from local paths.
|
|
121
|
+
|
|
122
|
+
Offline local commands keep working when a team service is unavailable. Local
|
|
123
|
+
and server configuration use separate names and provenance so failover cannot
|
|
124
|
+
mistake an unverified local actor for an authenticated subject. Downgrade and
|
|
125
|
+
export paths must be documented before general availability.
|
|
126
|
+
|
|
127
|
+
## Admission gates
|
|
128
|
+
|
|
129
|
+
Team mode is not releasable until all of the following have evidence:
|
|
130
|
+
|
|
131
|
+
1. Threat model and independent security review covering authentication,
|
|
132
|
+
authorization, confused-deputy attacks, tenant isolation, and audit integrity.
|
|
133
|
+
2. Cross-tenant tests for every read, search, cache, export, backup, and error
|
|
134
|
+
path, plus concurrent proposal and stale-policy tests.
|
|
135
|
+
3. A privacy review with data inventory, retention/deletion exercises, and
|
|
136
|
+
proof that local projects never upload implicitly.
|
|
137
|
+
4. Restore and disaster-recovery rehearsal preserving scope, audit links, and
|
|
138
|
+
revision digests.
|
|
139
|
+
5. A migration pilot using synthetic data, followed by an explicitly approved
|
|
140
|
+
limited real-world pilot with rollback.
|
|
141
|
+
6. Operational ownership for identity-provider failures, revocation latency,
|
|
142
|
+
incident response, audit export, and key rotation.
|
|
143
|
+
|
|
144
|
+
Until these gates pass, Cairnkeep documentation and output must describe actor
|
|
145
|
+
identity as unverified and team support as deferred.
|
|
@@ -14,20 +14,21 @@ Cairnkeep commands, hooks or native trajectory capture.
|
|
|
14
14
|
|
|
15
15
|
| Harness | Supported surface | Runtime status |
|
|
16
16
|
|---|---|---|
|
|
17
|
-
| Claude Code | Memory MCP, commands, agents, hooks, launcher | Exercised by Cairnkeep tests |
|
|
18
|
-
| OpenCode | Memory MCP, commands, workflows, plugins, launcher | Exercised by Cairnkeep tests |
|
|
19
|
-
| Kimi Code | Memory MCP, `AGENTS.md`, launcher, opt-in graph
|
|
20
|
-
| Qwen Code | Memory MCP, launcher | Launcher tested; stdio and remote MCP tested with Qwen Code 0.21.1 |
|
|
21
|
-
| Pi | Memory MCP through maintained local stdio extension, native opt-in trajectory extension, launcher, and
|
|
22
|
-
| Codex CLI | Project-scoped memory MCP and
|
|
17
|
+
| Claude Code | Memory MCP, commands (including `/cairn-work`), agents, hooks, launcher | Exercised by Cairnkeep tests |
|
|
18
|
+
| OpenCode | Memory MCP, commands (including `/cairn-work`), workflows, plugins, launcher | Exercised by Cairnkeep tests |
|
|
19
|
+
| Kimi Code | Memory MCP, `AGENTS.md`, launcher, opt-in graph and cairn-work Skills | Launcher tested; remote MCP tested with Kimi Code 0.30.0; Skills contract-tested |
|
|
20
|
+
| Qwen Code | Memory MCP, launcher, project `AGENTS.md` playbook guidance | Launcher tested; stdio and remote MCP tested with Qwen Code 0.21.1 |
|
|
21
|
+
| Pi | Memory MCP through maintained local stdio extension, native opt-in trajectory extension, launcher, graph and cairn-work prompts | Pi 0.84.1 validated minimum; deterministic and real bridge/lifecycle tests |
|
|
22
|
+
| Codex CLI | Project-scoped memory MCP, launcher, and project `AGENTS.md` playbook guidance | Setup and launcher contract-tested on POSIX and simulated native Windows; project trust remains operator-controlled |
|
|
23
23
|
| Other MCP clients | Memory plus optional domain-knowledge and context-pack tools | Protocol-compatible; not automatically runtime-tested |
|
|
24
24
|
|
|
25
25
|
Only Claude Code and OpenCode currently receive the complete operating layer.
|
|
26
|
-
Kimi receives
|
|
26
|
+
Kimi receives narrow graph and playbook Skills, while Pi receives matching narrow prompts;
|
|
27
27
|
neither is equivalent to the full commands, agents, hooks, and plugins surface.
|
|
28
28
|
Qwen skills and hooks still require harness-specific adaptation and validation.
|
|
29
|
-
Codex receives a project-local MCP entry
|
|
30
|
-
commands, hooks, agents, or automatic
|
|
29
|
+
Codex receives a project-local MCP entry, launcher, and portable playbook
|
|
30
|
+
instructions, but not Cairnkeep-specific commands, hooks, agents, or automatic
|
|
31
|
+
skill activation.
|
|
31
32
|
|
|
32
33
|
Every MCP client receives complete tool annotations and may use a Cairnkeep
|
|
33
34
|
least-authority profile independent of harness assets. Context-pack tools are
|
|
@@ -48,7 +49,7 @@ extension; it does not expand the other support levels.
|
|
|
48
49
|
|
|
49
50
|
Run `cairn sync-pi --apply` explicitly to install
|
|
50
51
|
`extensions/cairnkeep-memory.ts`, `extensions/cairnkeep-trajectory.ts`, and
|
|
51
|
-
`prompts/graphify.md` under the Pi agent root. Use `--check` for drift and
|
|
52
|
+
`prompts/graphify.md`, and `prompts/cairn-work.md` under the Pi agent root. Use `--check` for drift and
|
|
52
53
|
`cairn doctor` from a project that selected Pi for setup-aware diagnosis. Setup
|
|
53
54
|
reports this machine command but never runs it automatically. Uninstall removes
|
|
54
55
|
only those owned paths, backup-first.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Curriculum Coverage Map
|
|
2
2
|
|
|
3
|
-
**Baseline:** Cairnkeep 2.
|
|
3
|
+
**Baseline:** Cairnkeep 2.15.0
|
|
4
4
|
**Last reviewed:** 2026-08-17
|
|
5
5
|
|
|
6
6
|
This map prevents the course from drifting behind the product. It assigns each
|
|
@@ -40,6 +40,7 @@ been rehearsed.
|
|
|
40
40
|
| Guided project setup, selected harness state, and Git-less limitations | L03 | L03 and L23 | Ready |
|
|
41
41
|
| Pi local stdio memory bridge, trusted annotation details, and explicit lifecycle | L23 | L23 | Ready; Pi 0.84.1 validated minimum |
|
|
42
42
|
| OKF 0.1/0.2 validation/import, provenance, links, regressions, and reviewed 0.2 export | L24 | L24 | Ready; local/offline by default |
|
|
43
|
+
| Bounded project playbooks, managed agent guidance, enforcement, and private receipts | L25 | L25 | Ready; balanced/local by default; actor identity unverified |
|
|
43
44
|
|
|
44
45
|
## Release Review
|
|
45
46
|
|
|
@@ -73,6 +74,7 @@ repository remains the canonical source for explanations and scripts.
|
|
|
73
74
|
| `course-10-trust-context` | L20-L21 and L24 | MCP authority profiles, offline context-pack lifecycle, and reviewed OKF exchange |
|
|
74
75
|
| `course-11-windows` | L22 | Native PowerShell lifecycle, ACL inspection, and reversible uninstall |
|
|
75
76
|
| `course-12-guided-setup` | L23 | Deterministic setup, Pi local stdio, recovery, and backup-first uninstall |
|
|
77
|
+
| `course-13-playbooks` | L25 | Policy profiles, lifecycle decisions, enforcement, receipts, and ownership-safe instructions |
|
|
76
78
|
|
|
77
79
|
## Command Ownership
|
|
78
80
|
|
|
@@ -88,6 +90,7 @@ against `cairn help` so a new command cannot bypass a curriculum decision.
|
|
|
88
90
|
| `cairn sync-pi` | L13 and L23 |
|
|
89
91
|
| `cairn sync-kimi` | L02 |
|
|
90
92
|
| `cairn doctor` | L03; advanced repair in L13-L14 |
|
|
93
|
+
| `cairn playbook` | L25 |
|
|
91
94
|
| `cairn trajectory` | L13 |
|
|
92
95
|
| `cairn artifact` | L13 |
|
|
93
96
|
| `cairn evidence` | L13 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cairnkeep feature guide
|
|
2
2
|
|
|
3
|
-
**Baseline:** Cairnkeep 2.
|
|
3
|
+
**Baseline:** Cairnkeep 2.15.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
|
|
@@ -18,6 +18,8 @@ retention contract.
|
|
|
18
18
|
Version 2.14 adds OKF 0.1/0.2 import, structured provenance,
|
|
19
19
|
deterministic links, and reviewed OKF 0.2 export; see
|
|
20
20
|
[L24](lessons/L24-okf-exchange.md).
|
|
21
|
+
Version 2.15 adds local bounded playbooks and private outcome receipts; see
|
|
22
|
+
[L25](lessons/L25-playbooks.md).
|
|
21
23
|
|
|
22
24
|
## The three-layer model
|
|
23
25
|
|
|
@@ -47,6 +49,7 @@ Run setup in that order, then confirm `cairn doctor`, `cairn sync --check`, and
|
|
|
47
49
|
| 8 | Validated skill improvement | Repeated resolved hindsight warrants a measured skill change |
|
|
48
50
|
| 9 | Least-authority MCP profiles | A client should receive fewer tools than the default catalog |
|
|
49
51
|
| 10 | Immutable context packs and OKF exchange | Reviewed external context should be pinned or exchanged without becoming memory |
|
|
52
|
+
| 11 | Bounded project playbooks | Agents should select proportional workflow checks under inspectable local policy |
|
|
50
53
|
|
|
51
54
|
Every stage is independently useful. Stages 4-8 are opt-in and are not
|
|
52
55
|
prerequisites for ordinary memory.
|
|
@@ -62,6 +65,7 @@ prerequisites for ordinary memory.
|
|
|
62
65
|
| Repository quality | `/repo-review`, `/security-audit` | On-demand workflow; findings are hypotheses until reproduced | Require file/line evidence and regression tests | `course-03-quality` |
|
|
63
66
|
| Guided project setup | `cairn setup PATH --git init\|existing\|none --harness LIST --memory local\|none --yes` | Reconciles only selected project assets from one harness registry; private `.ai/cairnkeep.json`; machine sync is never automatic | Repeat deterministically, run doctor, or replay its recovery command; Git-less mode remains limited | `course-12-guided-setup` |
|
|
64
67
|
| Codex project memory | Select `--harness codex --memory local` | Writes `.codex/config.toml` plus POSIX/native Windows launchers; local stdio; user-wide configuration and trust remain untouched | Review the MCP table, accept Codex project trust, run doctor, and relaunch; uninstall is backup-first | `course-01-bootstrap` |
|
|
68
|
+
| Workflow playbooks | `cairn playbook check start|check|finish`; project `minimal`, `balanced`, or `strict` policy | Balanced by default; private `.ai/playbooks.json`; optional receipts in `.agentfs/playbooks/`; checks are offline and execute nothing | Inspect status/digests, enforce truthful `must` evidence, inspect receipts, reset overrides, remove only the managed `AGENTS.md` block | `course-13-playbooks` |
|
|
65
69
|
|
|
66
70
|
## Storage and optional topology
|
|
67
71
|
|
|
@@ -93,7 +97,7 @@ prerequisites for ordinary memory.
|
|
|
93
97
|
| 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` |
|
|
94
98
|
| 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` |
|
|
95
99
|
| Validated skill improvement | Reviewed recurring hindsight; proposal adapter; `CAIRN_EVAL=1` for evaluation | No server restart; explicit subprocesses only | `cairn skill list|show`; exact-digest apply; concurrent-edit-safe rollback | `course-09-skill` |
|
|
96
|
-
| General meta-agent loop | Not shipped | Not applicable |
|
|
100
|
+
| General meta-agent loop | Not shipped | Not applicable | Playbooks select bounded existing actions; no generic configuration loop, command language, or scheduler | `course-07-evaluation` |
|
|
97
101
|
| Pack retrieval and skills | `CAIRN_CONTEXT_PACKS=1`; HTTP needs separate consent; skills need exact-digest approval | Restart MCP server | `cairn pack skills`; revoke approval or disable pack; no automatic execution | `course-10-trust-context` |
|
|
98
102
|
|
|
99
103
|
## Harness and maintenance checks
|
|
@@ -102,8 +106,8 @@ prerequisites for ordinary memory.
|
|
|
102
106
|
- For Codex, review `.codex/config.toml` and accept project trust; no machine
|
|
103
107
|
sync is required for the memory-only integration.
|
|
104
108
|
- Run `cairn sync --check` after every core upgrade; apply only reported drift.
|
|
105
|
-
- Run `cairn sync-pi --check` when the Pi memory/trajectory/graph assets are installed.
|
|
106
|
-
- Run `cairn sync-kimi --check` when the optional Kimi graph
|
|
109
|
+
- Run `cairn sync-pi --check` when the Pi memory/trajectory/graph/playbook assets are installed.
|
|
110
|
+
- Run `cairn sync-kimi --check` when the optional Kimi graph/playbook Skills are installed.
|
|
107
111
|
- Use `cairn doctor --repair` only after preserving the affected store and only
|
|
108
112
|
for repairable derived indexes/metadata.
|
|
109
113
|
- Use `cairn uninstall --dry-run` before uninstall; durable memory is retained
|
package/docs/learning/README.md
CHANGED
|
@@ -56,6 +56,7 @@ expanded only after their labs are executable.
|
|
|
56
56
|
| L22 | [Operate Cairnkeep on native Windows](lessons/L22-native-windows.md) | Ready | 30 min |
|
|
57
57
|
| L23 | [Guided setup and Pi memory](lessons/L23-guided-setup.md) | Ready | 35 min |
|
|
58
58
|
| L24 | [Reviewed knowledge exchange](lessons/L24-okf-exchange.md) | Ready | 35 min |
|
|
59
|
+
| L25 | [Bounded workflow playbooks](lessons/L25-playbooks.md) | Ready | 35 min |
|
|
59
60
|
|
|
60
61
|
The [curriculum coverage map](CURRICULUM-MAP.md) records where every public
|
|
61
62
|
feature is introduced, practised, and operated. It also marks design-only work
|
|
@@ -74,7 +75,7 @@ Every complete lesson contains:
|
|
|
74
75
|
|
|
75
76
|
The learner should never need optional infrastructure to complete L00-L06.
|
|
76
77
|
Remote memory, RAG, routing, containers, graph indexing, structured capture,
|
|
77
|
-
typed nodes, capability governance, evaluation, context packs,
|
|
78
|
+
typed nodes, capability governance, evaluation, context packs, OKF exchange, and playbooks are separate
|
|
78
79
|
opt-in modules. MCP profiles are restrictive and never activate an optional
|
|
79
80
|
feature.
|
|
80
81
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# L25 - Bounded workflow playbooks
|
|
2
|
+
|
|
3
|
+
**Status:** Ready
|
|
4
|
+
**Tested with:** Cairnkeep 2.15.0 and Node.js 22 or newer
|
|
5
|
+
**Time:** 35 minutes
|
|
6
|
+
|
|
7
|
+
## Outcome
|
|
8
|
+
|
|
9
|
+
Configure a project playbook, evaluate it at start and finish, satisfy a
|
|
10
|
+
deterministic `must` gate with honest evidence, and inspect one private receipt
|
|
11
|
+
without mistaking agent self-selection for authorization or execution.
|
|
12
|
+
|
|
13
|
+
## Exercise
|
|
14
|
+
|
|
15
|
+
Create a disposable project and a strict policy:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
lab=$(mktemp -d)
|
|
19
|
+
mkdir -p "$lab/project/.ai"
|
|
20
|
+
cd "$lab/project"
|
|
21
|
+
cairn playbook init strict
|
|
22
|
+
cairn playbook status
|
|
23
|
+
cairn playbook check start --session course-playbook \
|
|
24
|
+
--complexity complex --familiarity unfamiliar
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The start decision should select recall, focused exploration, and a bounded
|
|
28
|
+
plan. It displays existing Cairnkeep actions; it does not run them. In a real
|
|
29
|
+
task, perform the applicable actions through the harness and retain truthful
|
|
30
|
+
evidence.
|
|
31
|
+
|
|
32
|
+
Now model a security-sensitive public code-and-documentation change. First
|
|
33
|
+
observe the enforcement failure:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
set +e
|
|
37
|
+
cairn playbook check finish --session course-playbook \
|
|
38
|
+
--changed src/auth.ts docs/security.md --risk security --public-change \
|
|
39
|
+
--enforce --json >"$lab/missing.json"
|
|
40
|
+
test "$?" -eq 3
|
|
41
|
+
set -e
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Inspect `blocking_actions`; do not merely label them complete. After running
|
|
45
|
+
the relevant tests, repository review, security audit, and documentation
|
|
46
|
+
checks, provide the resulting evidence:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cairn playbook check finish --session course-playbook \
|
|
50
|
+
--changed src/auth.ts docs/security.md --risk security --public-change \
|
|
51
|
+
--completed verify.tests review.repository review.security docs.update \
|
|
52
|
+
--skipped learning.capture='no stable reusable learning' \
|
|
53
|
+
--enforce --json >"$lab/decision.json"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Record one material result with the exact returned digests:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
policy=$(node -p "require('$lab/decision.json').policy_digest")
|
|
60
|
+
decision=$(node -p "require('$lab/decision.json').decision_digest")
|
|
61
|
+
cairn playbook record --policy "$policy" --decision "$decision" \
|
|
62
|
+
--event finish --action verify.tests --outcome completed \
|
|
63
|
+
--session course-playbook --reason 'targeted synthetic tests passed'
|
|
64
|
+
cairn playbook receipts list
|
|
65
|
+
cairn playbook doctor
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Try a bounded customization, then restore the profile behavior:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
cairn playbook disable learning.capture
|
|
72
|
+
cairn playbook reset learning.capture
|
|
73
|
+
cairn playbook set balanced
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Common failures
|
|
77
|
+
|
|
78
|
+
- Exit 3 is missing required evidence, not a request to weaken the policy.
|
|
79
|
+
- `--skipped` and `--failed` require `ACTION=REASON`; they do not satisfy a
|
|
80
|
+
`must` action.
|
|
81
|
+
- Unknown actions, fields, modes, commands, URLs, path traversal, symlinks,
|
|
82
|
+
unsafe permissions, and oversized policy files fail closed.
|
|
83
|
+
- A changed policy makes an old policy digest stale for new receipts.
|
|
84
|
+
- `CAIRN_PLAYBOOK_PROFILE` overrides the project profile for that process; use
|
|
85
|
+
`cairn playbook status` to see the effective source.
|
|
86
|
+
|
|
87
|
+
## Privacy and trust boundary
|
|
88
|
+
|
|
89
|
+
Checks are offline and store nothing. Explicit receipts contain bounded
|
|
90
|
+
identifiers, digests, event/action/outcome/reason, and a timestamp, but no
|
|
91
|
+
prompt, file body, diff, command output, credential, or environment snapshot.
|
|
92
|
+
Changed-path labels affect the decision but are not stored in the receipt.
|
|
93
|
+
|
|
94
|
+
The v2.15 actor field is caller-supplied and unauthenticated. It is useful for
|
|
95
|
+
local provenance, not access control, employee monitoring, or non-repudiation.
|
|
96
|
+
Playbooks cannot enable capabilities, grant mutation approval, execute harness
|
|
97
|
+
commands, or promote a learning into durable memory. Team authentication,
|
|
98
|
+
ACLs, tenant isolation, and shared review queues remain design-only.
|
|
99
|
+
|
|
100
|
+
## Recovery and acceptance
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cairn playbook instructions remove --project "$lab/project"
|
|
104
|
+
cd /
|
|
105
|
+
rm -rf "$lab"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- Identical policy, signals, event, and evidence produce the same decision
|
|
109
|
+
digest.
|
|
110
|
+
- Missing applicable `must` evidence exits 3 under `--enforce`; completed
|
|
111
|
+
evidence clears the relevant block.
|
|
112
|
+
- The receipt is private, project-bound, bounded, and visible to `doctor`.
|
|
113
|
+
- Removing managed instructions preserves all surrounding `AGENTS.md` content.
|
|
114
|
+
- No check executes an action, contacts a network service, or grants approval.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Audience:** advanced users and platform maintainers
|
|
4
4
|
**Prerequisite:** Practitioner track; L13 before operating captured evidence
|
|
5
|
-
**Total time:** about 6 hours
|
|
5
|
+
**Total time:** about 6 hours 45 minutes
|
|
6
6
|
|
|
7
7
|
1. [L09 - Domain knowledge with RAG](../lessons/L09-domain-knowledge.md)
|
|
8
8
|
2. [L10 - Faster context exploration](../lessons/L10-context-exploration.md)
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
9. [L22 - Operate Cairnkeep on native Windows](../lessons/L22-native-windows.md)
|
|
16
16
|
10. [L23 - Guided setup and Pi memory](../lessons/L23-guided-setup.md)
|
|
17
17
|
11. [L24 - Reviewed knowledge exchange](../lessons/L24-okf-exchange.md)
|
|
18
|
+
12. [L25 - Bounded workflow playbooks](../lessons/L25-playbooks.md)
|
|
18
19
|
|
|
19
20
|
All modules are optional. The track is complete when the operator can add and
|
|
20
21
|
remove each integration without breaking the standalone local workflow and can
|
|
@@ -23,8 +24,10 @@ v2.11 setup/Pi lifecycle only after the earlier storage, governance, trust, and
|
|
|
23
24
|
native-platform boundaries.
|
|
24
25
|
L24 adds portable exchange only after the immutable-pack and privacy boundaries
|
|
25
26
|
are understood.
|
|
27
|
+
L25 adds policy enforcement and the unauthenticated local actor boundary before
|
|
28
|
+
any future team deployment.
|
|
26
29
|
|
|
27
30
|
Hands-on spine: `course-04-operation`, `course-06-governance`, and
|
|
28
31
|
`course-07-evaluation`, `course-10-trust-context`, and
|
|
29
|
-
`course-12-guided-setup` in the public
|
|
32
|
+
`course-12-guided-setup`, and `course-13-playbooks` in the public
|
|
30
33
|
[course labs](https://github.com/cairnkeep/cairnkeep-course-labs).
|