@cairnkeep/cli 2.15.3 → 2.15.4

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 CHANGED
@@ -5,6 +5,22 @@ All notable user-facing changes are documented here. This project follows
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.15.4] - 2026-08-19
9
+
10
+ ### Changed
11
+
12
+ - Make the managed project-memory retrieval contract explicit that retrieval
13
+ is the first tool or command, including before `pwd`, `ls`, inventory, or
14
+ search commands.
15
+ - Put the bounded complexity, familiarity, and risk values directly in the
16
+ managed playbook commands so agents do not need to guess them.
17
+
18
+ ### Fixed
19
+
20
+ - Support event-scoped playbook help such as
21
+ `cairn playbook check start --help` while continuing to reject ambiguous or
22
+ unknown help forms.
23
+
8
24
  ## [2.15.3] - 2026-08-18
9
25
 
10
26
  ### Changed
package/README.md CHANGED
@@ -51,10 +51,11 @@ launchers, including native Windows, without capturing prompts or replacing Git.
51
51
  Version 2.15 adds bounded project playbooks that help agents select existing
52
52
  recall, planning, verification, review, security, documentation, and learning
53
53
  steps without becoming an agent runtime or granting approval.
54
- Version 2.15.3 tightens the generic durable-context protocol so compatible
55
- agents derive one project-memory query before repository inventory or search,
56
- verify its repository provenance, and receive executable playbook receipt
57
- syntax with command-scoped help.
54
+ Version 2.15.4 makes the generic durable-context retrieval the first tool or
55
+ command for compatible agents, puts bounded playbook signal values inline,
56
+ and supports command- and event-scoped playbook help. Agents still verify
57
+ repository provenance, and instruction presence remains distinct from runtime
58
+ evidence that a tool was called.
58
59
 
59
60
  ## Compatibility
60
61
 
@@ -28,9 +28,10 @@ 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
29
  Codex receives a project-local MCP entry, launcher, and portable durable-context
30
30
  and playbook instructions, but not Cairnkeep-specific commands, hooks, agents,
31
- or automatic skill activation. The durable-context protocol places its
32
- task-derived search before repository inventory or search, and the playbook
33
- instructions provide executable receipt syntax plus command-scoped help.
31
+ or automatic skill activation. The durable-context protocol makes its
32
+ task-derived search the first tool or command, and the playbook instructions
33
+ provide bounded signal values, executable receipt syntax, and command- or
34
+ event-scoped help.
34
35
  Harness behavior remains probabilistic; instruction presence must not be
35
36
  reported as a tool invocation without runtime evidence.
36
37
 
@@ -1,7 +1,7 @@
1
1
  # Curriculum Coverage Map
2
2
 
3
- **Baseline:** Cairnkeep 2.15.3
4
- **Last reviewed:** 2026-08-18
3
+ **Baseline:** Cairnkeep 2.15.4
4
+ **Last reviewed:** 2026-08-19
5
5
 
6
6
  This map prevents the course from drifting behind the product. It assigns each
7
7
  user-facing surface to a lesson and records whether the lesson is complete or
@@ -1,6 +1,6 @@
1
1
  # Cairnkeep feature guide
2
2
 
3
- **Baseline:** Cairnkeep 2.15.3
3
+ **Baseline:** Cairnkeep 2.15.4
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
@@ -20,10 +20,10 @@ deterministic links, and reviewed OKF 0.2 export; see
20
20
  [L24](lessons/L24-okf-exchange.md).
21
21
  Version 2.15 adds local bounded playbooks and private outcome receipts; see
22
22
  [L25](lessons/L25-playbooks.md).
23
- Version 2.15.3 makes generic task-derived, project-scoped retrieval precede
24
- repository inventory or search and adds executable playbook receipt guidance
25
- with command-scoped help. Retrieval remains a locator and actual tool
26
- invocation must be verified from runtime evidence.
23
+ Version 2.15.4 makes generic task-derived, project-scoped retrieval the first
24
+ tool or command, puts bounded playbook signal values inline, and adds
25
+ event-scoped check help to executable receipt guidance. Retrieval remains a
26
+ locator and actual tool invocation must be verified from runtime evidence.
27
27
 
28
28
  ## The three-layer model
29
29
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 10 minutes
6
- **Tested with:** Cairnkeep 2.15.3
6
+ **Tested with:** Cairnkeep 2.15.4
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 15 minutes
6
- **Tested with:** Cairnkeep 2.15.3
6
+ **Tested with:** Cairnkeep 2.15.4
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 25 minutes
6
- **Tested with:** Cairnkeep 2.15.3 and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart
5
5
  **Time:** 25 minutes
6
- **Tested with:** Cairnkeep 2.15.3
6
+ **Tested with:** Cairnkeep 2.15.4
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Evidence and Evaluation
5
5
  **Time:** 50 minutes
6
- **Tested with:** Cairnkeep 2.15.3
6
+ **Tested with:** Cairnkeep 2.15.4
7
7
 
8
8
  ## Outcome
9
9
 
@@ -1,7 +1,7 @@
1
1
  # L20 - Least-authority MCP tool profiles
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.3 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
5
5
  **Time:** 25 minutes
6
6
 
7
7
  ## Outcome
@@ -1,7 +1,7 @@
1
1
  # L21 - Immutable context packs and skill approval
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.3 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
5
5
  **Time:** 40 minutes
6
6
 
7
7
  ## Outcome
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Operator
5
5
  **Time:** 30 minutes
6
- **Tested with:** Cairnkeep 2.15.3, Windows x64, and Node.js 22 or newer
6
+ **Tested with:** Cairnkeep 2.15.4, Windows x64, and Node.js 22 or newer
7
7
 
8
8
  ## Outcome
9
9
 
@@ -3,7 +3,7 @@
3
3
  **Status:** Ready
4
4
  **Track:** Quickstart and Operator
5
5
  **Time:** 35 minutes
6
- **Tested with:** Cairnkeep 2.15.3; Pi 0.84.1; Node.js 22, 24, and 26
6
+ **Tested with:** Cairnkeep 2.15.4; Pi 0.84.1; Node.js 22, 24, and 26
7
7
 
8
8
  ## Outcome
9
9
 
@@ -1,7 +1,7 @@
1
1
  # L24 - Reviewed knowledge exchange
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.3 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
5
5
  **Time:** 35 minutes
6
6
 
7
7
  ## Outcome
@@ -1,7 +1,7 @@
1
1
  # L25 - Bounded workflow playbooks
2
2
 
3
3
  **Status:** Ready
4
- **Tested with:** Cairnkeep 2.15.3 and Node.js 22 or newer
4
+ **Tested with:** Cairnkeep 2.15.4 and Node.js 22 or newer
5
5
  **Time:** 35 minutes
6
6
 
7
7
  ## Outcome
@@ -91,7 +91,7 @@ cairn playbook set balanced
91
91
  ## Privacy and trust boundary
92
92
 
93
93
  The managed `AGENTS.md` block also gives compatible agents a bounded durable
94
- context protocol: derive one short project query before repository inventory or search,
94
+ context protocol: derive one short project query as the first tool or command,
95
95
  treat memory as a locator, and verify the maintained source. It does not
96
96
  contain a task-specific query or authorize an automatic memory write. When
97
97
  evaluating the protocol, inspect the actual `memory_search` event rather than
@@ -10,7 +10,7 @@
10
10
  2. Run guided setup in a synthetic project. Show `.ai/playbooks.json` mode and
11
11
  the delimited Cairnkeep block inside an `AGENTS.md` that already has user
12
12
  content. Point out the generic durable-context protocol: it derives a query
13
- from the task before repository inventory or search, treats memory as a
13
+ from the task as the first tool or command, treats memory as a
14
14
  locator, and never writes automatically.
15
15
  3. Compare `minimal`, `balanced`, and `strict` with `cairn playbook status`.
16
16
  Customize one canonical action and show that an arbitrary command or unknown
package/docs/operating.md CHANGED
@@ -842,8 +842,9 @@ The same ownership-safe block contains a generic durable-context protocol. For
842
842
  nontrivial work that may depend on existing decisions, conventions,
843
843
  constraints, recurring failures, or prior work, compatible agents derive one
844
844
  short query directly from the task and call `memory_search` with
845
- `scope: project` before repository inventory or search commands such as
846
- `rg --files`, `find`, `tree`, or broad text search. A result is only a locator:
845
+ `scope: project` as their first tool or command, before `pwd`, `ls`, repository
846
+ inventory, or search commands such as `rg --files`, `find`, `tree`, or broad
847
+ text search. A result is only a locator:
847
848
  the maintained repository source must still be read and verified. Missing
848
849
  tools and zero results fall back to normal inspection, and the protocol never
849
850
  authorizes an automatic memory write, supersede, or approval.
@@ -72,8 +72,9 @@ result should survive the restart.
72
72
  `.planning`, and `.agentfs` scaffold. It also reconciles Cairnkeep's delimited
73
73
  instruction block in `AGENTS.md` while preserving every surrounding user byte
74
74
  and file mode. The block tells compatible agents when to make one
75
- task-derived, project-scoped memory search, to verify maintained repository
76
- sources, and never to promote memory automatically. It initializes Git only
75
+ task-derived, project-scoped memory search as their first tool or command, to
76
+ verify maintained repository sources, and never to promote memory
77
+ automatically. It initializes Git only
77
78
  with explicit
78
79
  `--git init`, preserves unrelated files, does not overwrite modified files it
79
80
  does not own, and records managed digests in private `.ai/cairnkeep.json`.
@@ -1 +1 @@
1
- {"identifier":"cairn-offline-fake-v1","package_version":"2.15.3","schema_version":1,"task_set_digest":"13e95379f35839593047ec34521a65a8fa3ab92bd3993bca9dc8bf5c4a9ff36f"}
1
+ {"identifier":"cairn-offline-fake-v1","package_version":"2.15.4","schema_version":1,"task_set_digest":"13e95379f35839593047ec34521a65a8fa3ab92bd3993bca9dc8bf5c4a9ff36f"}
@@ -245,11 +245,18 @@ async function main() {
245
245
  process.stdout.write(usage());
246
246
  return;
247
247
  }
248
- if (["check", "record"].includes(command) && raw.length === 1 && ["--help", "-h"].includes(raw[0])) {
249
- if (command === "check")
250
- process.stdout.write(checkUsage());
251
- else
252
- process.stdout.write(recordUsage());
248
+ if (command === "check" && raw.some((value) => ["--help", "-h"].includes(value))) {
249
+ const helpArguments = raw.filter((value) => !["--help", "-h"].includes(value));
250
+ if (raw.length !== helpArguments.length + 1
251
+ || helpArguments.length > 1
252
+ || (helpArguments.length === 1 && !["start", "check", "finish"].includes(helpArguments[0]))) {
253
+ throw new Error("check help accepts at most one event: start, check, or finish.");
254
+ }
255
+ process.stdout.write(checkUsage());
256
+ return;
257
+ }
258
+ if (command === "record" && raw.length === 1 && ["--help", "-h"].includes(raw[0])) {
259
+ process.stdout.write(recordUsage());
253
260
  return;
254
261
  }
255
262
  const parsed = parse(raw);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cairnkeep/cli",
3
- "version": "2.15.3",
3
+ "version": "2.15.4",
4
4
  "description": "A durable, harness-agnostic memory + context layer for coding agents and MCP clients.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -29,6 +29,10 @@ env -u CAIRN_NOTE_DISTILLATION "$cairn" notes --help >/dev/null 2>&1 || fail "ca
29
29
  "$cairn" evidence --help | grep -q "cairn evidence list" || fail "cairn evidence dispatch"
30
30
  "$cairn" playbook --help | grep -q "cairn playbook list" || fail "cairn playbook dispatch"
31
31
  "$cairn" playbook check --help | grep -q "check start|check|finish" || fail "cairn playbook check help"
32
+ "$cairn" playbook check start --help | grep -q "trivial|standard|complex" || fail "cairn playbook event help"
33
+ if "$cairn" playbook check start finish --help >/dev/null 2>&1; then
34
+ fail "playbook check help should reject multiple events"
35
+ fi
32
36
  "$cairn" playbook record --help >"$tmp/playbook-record-help" || fail "cairn playbook record help"
33
37
  grep -qF -- '--event start|check|finish' "$tmp/playbook-record-help" || fail "playbook record help missing events"
34
38
  grep -qF -- '--outcome completed|skipped|failed' "$tmp/playbook-record-help" || fail "playbook record help missing outcomes"
@@ -154,7 +154,7 @@ for phrase in \
154
154
  '--enforce' \
155
155
  'cairn playbook record' \
156
156
  'cairn playbook record --help' \
157
- 'before repository inventory or search' \
157
+ 'as the first tool or command' \
158
158
  'unauthenticated' \
159
159
  'does not run'; do
160
160
  grep -qF -- "$phrase" "$l25" || {
@@ -51,7 +51,7 @@ bootstrap_output=$(cairn bootstrap "$tmp/project")
51
51
  [[ -f "$tmp/project/.ai/playbooks.json" ]] || fail "bootstrap did not install the playbook policy"
52
52
  grep -qF '<!-- cairnkeep:playbook:v1:start -->' "$tmp/project/AGENTS.md" || fail "bootstrap did not install playbook agent guidance"
53
53
  grep -qF 'derive one short query from the task' "$tmp/project/AGENTS.md" || fail "bootstrap did not install generic memory retrieval guidance"
54
- grep -qF 'before running repository inventory or search' "$tmp/project/AGENTS.md" || fail "bootstrap did not install retrieval ordering guidance"
54
+ grep -qF 'make this retrieval the first tool or command' "$tmp/project/AGENTS.md" || fail "bootstrap did not install retrieval ordering guidance"
55
55
  grep -qF 'cairn playbook record --help' "$tmp/project/AGENTS.md" || fail "bootstrap did not install actionable receipt guidance"
56
56
  grep -qF 'Treat returned memory as a locator, not authority.' "$tmp/project/AGENTS.md" || fail "bootstrap did not install memory provenance guidance"
57
57
 
@@ -14,13 +14,15 @@ grep -qF 'Keep this line.' "$project/AGENTS.md"
14
14
  [[ $(grep -cF '<!-- cairnkeep:playbook:v1:start -->' "$project/AGENTS.md") -eq 1 ]]
15
15
  grep -qF 'derive one short query from the task' "$project/AGENTS.md"
16
16
  grep -qF 'search `scope: project` once' "$project/AGENTS.md"
17
- grep -qF 'before running repository inventory or search' "$project/AGENTS.md"
18
- grep -qF '`rg --files`, `find`, `tree`' "$project/AGENTS.md"
17
+ grep -qF 'make this retrieval the first tool or command' "$project/AGENTS.md"
18
+ grep -qF '`pwd`, `ls`, `rg --files`, `find`' "$project/AGENTS.md"
19
19
  grep -qF "do not inspect" "$project/AGENTS.md"
20
20
  grep -qF 'Treat returned memory as a locator, not authority.' "$project/AGENTS.md"
21
21
  grep -qF 'Do not write, supersede, or approve durable memory' "$project/AGENTS.md"
22
22
  grep -qF 'cairn playbook record --policy POLICY_DIGEST --decision DECISION_DIGEST' "$project/AGENTS.md"
23
23
  grep -qF 'cairn playbook record --help' "$project/AGENTS.md"
24
+ grep -qF -- '--complexity trivial|standard|complex --familiarity known|mixed|unfamiliar' "$project/AGENTS.md"
25
+ grep -qF -- '--risk low|normal|high|security' "$project/AGENTS.md"
24
26
  [[ $(stat -c '%a' "$project/AGENTS.md") == 640 ]]
25
27
  before=$(sha256sum "$project/AGENTS.md" | cut -d' ' -f1)
26
28
  node "$ROOT/scripts/playbook-instructions.mjs" "$project" >/dev/null
@@ -41,7 +41,7 @@ try {
41
41
  assert.match(launcherPowerShell(), /CAIRN_WORK_EVIDENCE/);
42
42
  assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /cairnkeep:playbook:v1:start/);
43
43
  assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /derive one short query from the task/);
44
- assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /before running repository inventory or search/);
44
+ assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /make this retrieval the first tool or command/);
45
45
  assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /cairn playbook record --help/);
46
46
  assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /Treat returned memory as a locator, not authority\./);
47
47
  assert.match(readFileSync(join(project, "AGENTS.md"), "utf8"), /Keep this line\./);
@@ -3,8 +3,9 @@
3
3
 
4
4
  At the start of a nontrivial task that may depend on existing project
5
5
  decisions, conventions, constraints, recurring failures, or prior work,
6
- perform this retrieval step before running repository inventory or search
7
- commands such as `rg --files`, `find`, `tree`, or broad text searches:
6
+ make this retrieval the first tool or command. Do not run repository location,
7
+ inventory, or search commands such as `pwd`, `ls`, `rg --files`, `find`,
8
+ `tree`, or broad text searches first:
8
9
 
9
10
  - If `memory_search` is available, derive one short query from the task and
10
11
  search `scope: project` once. Derive it from the user's task; do not inspect
@@ -22,9 +23,9 @@ commands such as `rg --files`, `find`, `tree`, or broad text searches:
22
23
  Use Cairnkeep's bounded playbook policy to select workflow steps. It advises or
23
24
  enforces existing capabilities; it does not execute a workflow for you.
24
25
 
25
- - At task start, run `cairn playbook check start --session SESSION --complexity LEVEL --familiarity LEVEL` and follow every applicable `must` action. Apply `should` actions unless there is a concrete reason to skip them; use judgment for `may` actions.
26
+ - At task start, run `cairn playbook check start --session SESSION --complexity trivial|standard|complex --familiarity known|mixed|unfamiliar` with one value from each bounded set, and follow every applicable `must` action. Apply `should` actions unless there is a concrete reason to skip them; use judgment for `may` actions.
26
27
  - Re-run `cairn playbook check check` when scope, familiarity, complexity, or risk changes materially.
27
- - Before claiming completion, run `cairn playbook check finish --session SESSION --changed PATH... --risk LEVEL --public-change --completed ACTION... --skipped ACTION=REASON... --enforce` with accurate signals and evidence.
28
+ - Before claiming completion, run `cairn playbook check finish --session SESSION --changed PATH... --risk low|normal|high|security --public-change --completed ACTION... --skipped ACTION=REASON... --enforce` with one bounded risk value and accurate signals and evidence.
28
29
  - A non-zero enforcement result means applicable `must` evidence is missing. Perform the action and check again; do not relabel a skipped or failed action as completed.
29
30
  - After a successful finish check, record only material outcomes with `cairn playbook record --policy POLICY_DIGEST --decision DECISION_DIGEST --event finish --action ACTION --outcome OUTCOME --session SESSION [--reason REASON]`, using one call per recorded action and the exact digests returned by the check. Run `cairn playbook record --help` for the bounded values. Actor identity is an unverified local assertion in this release.
30
31
  - Existing approval and capability boundaries still apply. A playbook cannot enable a disabled capability, grant approval, write durable memory automatically, run arbitrary commands, or authorize destructive work.