@cairnkeep/cli 2.7.0 → 2.8.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 +22 -1
- package/README.md +23 -0
- package/bin/cairn +6 -0
- package/docs/design/meta-agent.md +39 -35
- package/docs/learning/CURRICULUM-MAP.md +9 -4
- package/docs/learning/FEATURE-GUIDE.md +6 -4
- package/docs/learning/README.md +4 -2
- package/docs/learning/lessons/L00-why-cairnkeep.md +1 -1
- package/docs/learning/lessons/L01-safe-trial.md +3 -3
- package/docs/learning/lessons/L02-installation.md +2 -2
- package/docs/learning/lessons/L03-first-project.md +1 -1
- package/docs/learning/lessons/L17-agent-boundary.md +12 -8
- package/docs/learning/lessons/L18-local-code-graph.md +97 -0
- package/docs/learning/lessons/L19-validated-skill-improvement.md +87 -0
- package/docs/learning/tracks/evidence-and-evaluation.md +5 -3
- package/docs/learning/tracks/practitioner.md +5 -4
- package/docs/operating.md +23 -0
- package/docs/privacy-and-data-flow.md +42 -1
- package/docs/skill-improvement.md +124 -0
- package/docs/storage.md +25 -0
- package/examples/eval/bundled-fake.json +1 -1
- package/mcp-memory-server/dist/eval-plan.js +22 -5
- package/mcp-memory-server/dist/eval-process.js +31 -0
- package/mcp-memory-server/dist/eval-runner.js +10 -4
- package/mcp-memory-server/dist/eval-schema.js +1 -1
- package/mcp-memory-server/dist/eval-workspace.js +50 -1
- package/mcp-memory-server/dist/skill-cli.js +236 -0
- package/mcp-memory-server/dist/skill-evaluation.js +244 -0
- package/mcp-memory-server/dist/skill-schema.js +164 -0
- package/mcp-memory-server/dist/skill-store.js +583 -0
- package/mcp-memory-server/package.json +2 -1
- package/package.json +1 -1
- package/schemas/eval-report.schema.json +1 -1
- package/schemas/skill-adapter.schema.json +39 -0
- package/schemas/skill-proposal-protocol.schema.json +97 -0
- package/scripts/completion.sh +41 -3
- package/scripts/test-completion.sh +11 -0
- package/scripts/test-learning-docs.sh +11 -2
- package/scripts/test-package-install.sh +18 -0
- package/scripts/test-skill-cli.sh +30 -0
- package/templates/graph-policy.md.template +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable user-facing changes are documented here. This project follows
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [2.8.0] - 2026-08-03
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add `cairn skill harvest|list|show|review|propose|evaluate|apply|rollback`
|
|
13
|
+
for turning recurring hindsight evidence into explicitly reviewed, bounded,
|
|
14
|
+
independently evaluated, reversible skill-file improvements.
|
|
15
|
+
- Add strict proposal-adapter schemas and environment allowlisting, immutable
|
|
16
|
+
baseline/candidate worktree overlays, disjoint exploration and confirmation
|
|
17
|
+
gates, exact-digest application, private backups, and concurrent-edit-safe
|
|
18
|
+
rollback.
|
|
19
|
+
- Add installed-style CLI and shell-completion coverage, an end-to-end Git
|
|
20
|
+
worktree evaluation fixture, and documentation for consent, storage,
|
|
21
|
+
inference ownership, evaluation limits, and recovery.
|
|
22
|
+
|
|
23
|
+
The lifecycle is local and operator-controlled. It performs no proposal call
|
|
24
|
+
before evidence approval, evaluation remains disabled unless `CAIRN_EVAL=1`,
|
|
25
|
+
and no candidate is applied automatically. Existing MCP tools, memory storage,
|
|
26
|
+
remote HTTP clients, and project launchers are unchanged.
|
|
27
|
+
|
|
8
28
|
## [2.7.0] - 2026-08-02
|
|
9
29
|
|
|
10
30
|
### Added
|
|
@@ -232,7 +252,8 @@ stored memories.
|
|
|
232
252
|
- Preserve executable permissions and Bash 3.2 portability on macOS.
|
|
233
253
|
- Add backup-first uninstall and SQLite-safe memory export/import guidance.
|
|
234
254
|
|
|
235
|
-
[Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.
|
|
255
|
+
[Unreleased]: https://github.com/cairnkeep/cairnkeep/compare/v2.8.0...HEAD
|
|
256
|
+
[2.8.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.7.0...v2.8.0
|
|
236
257
|
[2.7.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.6.0...v2.7.0
|
|
237
258
|
[2.6.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.5.0...v2.6.0
|
|
238
259
|
[2.5.0]: https://github.com/cairnkeep/cairnkeep/compare/v2.4.0...v2.5.0
|
package/README.md
CHANGED
|
@@ -84,6 +84,9 @@ storage paths, secrets, and private derived images, see
|
|
|
84
84
|
`cairn artifact list|show|delete|prune` manages opt-in local artifacts;
|
|
85
85
|
`cairn eval validate|run|ablate|report|prune|delete` coordinates explicit
|
|
86
86
|
local two-pass and one-capability-at-a-time measurements;
|
|
87
|
+
`cairn skill harvest|list|show|review|propose|evaluate|apply|rollback`
|
|
88
|
+
turns recurring hindsight evidence into reviewed, measured, reversible
|
|
89
|
+
skill-file improvements;
|
|
87
90
|
`cairn graph build|query|status|diff|explain|path` owns the local Graphify
|
|
88
91
|
workflow from any project shell without installing Graphify-owned harness
|
|
89
92
|
assets; Claude Code, OpenCode, Pi, and Kimi add thin `/graphify` wrappers;
|
|
@@ -391,6 +394,25 @@ descendant-process-tree termination is not guaranteed. See the
|
|
|
391
394
|
[storage contract](docs/storage.md#evaluation-report-and-note-snapshot-storage),
|
|
392
395
|
and [privacy flow](docs/privacy-and-data-flow.md#evaluation-adapter-and-report-flow).
|
|
393
396
|
|
|
397
|
+
### Validated skill improvement (opt-in)
|
|
398
|
+
|
|
399
|
+
`cairn skill` promotes repeated, resolved hindsight evidence through a guarded
|
|
400
|
+
lifecycle: local harvest, explicit evidence review, bounded proposal generation,
|
|
401
|
+
separate exploration and confirmation evaluations, exact-digest application,
|
|
402
|
+
and backup-first rollback. Cairnkeep never rewrites a live skill during proposal
|
|
403
|
+
or evaluation, never sends evidence to the proposal adapter before approval,
|
|
404
|
+
and never applies a candidate automatically.
|
|
405
|
+
|
|
406
|
+
Proposal generation uses an explicit strict adapter configuration with an
|
|
407
|
+
environment allowlist. Evaluation remains disabled unless `CAIRN_EVAL=1`, uses
|
|
408
|
+
the existing isolated worktree runner and independent verifier, and requires
|
|
409
|
+
disjoint committed task sets bound to one immutable source revision. A
|
|
410
|
+
candidate is eligible only when both stages meet the configured improvement
|
|
411
|
+
floor with no regression or unknown pair. See the
|
|
412
|
+
[validated skill guide](docs/skill-improvement.md),
|
|
413
|
+
[storage contract](docs/storage.md#validated-skill-storage), and
|
|
414
|
+
[privacy flow](docs/privacy-and-data-flow.md#validated-skill-improvement-flow).
|
|
415
|
+
|
|
394
416
|
### Typed memory nodes and structured import (opt-in)
|
|
395
417
|
|
|
396
418
|
`CAIRN_TYPED_MEMORY_NODES=1` adds schema-v1 `node_type`, canonical `tags`,
|
|
@@ -460,6 +482,7 @@ exposes trajectory data. See the [operating guide](docs/operating.md#compaction-
|
|
|
460
482
|
- **Memory storage and deployment** — [docs/storage.md](docs/storage.md)
|
|
461
483
|
- **Podman and OCI containers** — [docs/containers.md](docs/containers.md)
|
|
462
484
|
- **Privacy and data flow** — [docs/privacy-and-data-flow.md](docs/privacy-and-data-flow.md)
|
|
485
|
+
- **Validated skill improvement** — [docs/skill-improvement.md](docs/skill-improvement.md)
|
|
463
486
|
- **Git providers** — [docs/git-providers.md](docs/git-providers.md)
|
|
464
487
|
- **Support** — [SUPPORT.md](SUPPORT.md)
|
|
465
488
|
- **Contributing** — [CONTRIBUTING.md](CONTRIBUTING.md)
|
package/bin/cairn
CHANGED
|
@@ -59,6 +59,9 @@ Usage:
|
|
|
59
59
|
cairn eval <validate|run|ablate|report|prune|delete>
|
|
60
60
|
Validate or run default-off local evaluations, inspect
|
|
61
61
|
reports, and manage retained experiment results.
|
|
62
|
+
cairn skill <harvest|list|show|review|propose|evaluate|apply|rollback>
|
|
63
|
+
Turn recurring hindsight evidence into reviewed,
|
|
64
|
+
evaluated, reversible skill-file improvements.
|
|
62
65
|
cairn graph <build|query|status|diff|explain|path>
|
|
63
66
|
Build the local code graph, inspect freshness and
|
|
64
67
|
changes, or query exact symbols and paths.
|
|
@@ -116,6 +119,9 @@ case "$cmd" in
|
|
|
116
119
|
eval)
|
|
117
120
|
exec node "$CAIRN_ROOT/mcp-memory-server/dist/eval-cli.js" "$@"
|
|
118
121
|
;;
|
|
122
|
+
skill)
|
|
123
|
+
exec node "$CAIRN_ROOT/mcp-memory-server/dist/skill-cli.js" "$@"
|
|
124
|
+
;;
|
|
119
125
|
graph)
|
|
120
126
|
exec node "$CAIRN_ROOT/mcp-memory-server/dist/graph-cli.js" "$@"
|
|
121
127
|
;;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# Meta-agent design contract
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
>
|
|
5
|
-
>
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
3
|
+
> **General-loop design status.** Cairnkeep 2.8.0 ships a narrower validated
|
|
4
|
+
> lifecycle for one existing `SKILL.md`; see
|
|
5
|
+
> [Validated skill improvement](../skill-improvement.md). It does not ship the
|
|
6
|
+
> general natural-language configuration compiler, autonomous search loop,
|
|
7
|
+
> arbitrary target policy, or capability optimizer specified here. Requirements
|
|
8
|
+
> in this document remain future work except where a paragraph explicitly names
|
|
9
|
+
> the 2.8.0 skill-file lifecycle as current behavior.
|
|
9
10
|
|
|
10
11
|
## Status and normative language
|
|
11
12
|
|
|
12
|
-
This document specifies a future, bounded build-test-improve
|
|
13
|
-
loop. It
|
|
14
|
-
|
|
13
|
+
This document specifies a future, general bounded build-test-improve
|
|
14
|
+
configuration loop. It is not the executable interface for `cairn skill`; the
|
|
15
|
+
skill schemas and operating guide are authoritative for that narrower surface.
|
|
16
|
+
In future requirements, **MUST**, **MUST NOT**, **REQUIRED**, and **SHALL** are normative;
|
|
15
17
|
**SHOULD** and **MAY** describe constrained choices. Statements explicitly
|
|
16
18
|
labelled current describe accepted Phase 18 or Phase 19 behavior rather than
|
|
17
19
|
new behavior.
|
|
@@ -24,11 +26,12 @@ authority.
|
|
|
24
26
|
## Paper concept and Cairnkeep boundary
|
|
25
27
|
|
|
26
28
|
The paper's build-test-improve concept motivates a future bounded configuration
|
|
27
|
-
loop, but does not redefine Cairnkeep's ownership.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
It must not own a harness
|
|
31
|
-
the authority over
|
|
29
|
+
loop, but does not redefine Cairnkeep's ownership. The shipped skill lifecycle
|
|
30
|
+
can propose one bounded `SKILL.md` candidate through an operator-configured
|
|
31
|
+
adapter. Cairnkeep may eventually compile a broader operator objective into a
|
|
32
|
+
reviewable form and coordinate general candidates. It must not own a harness
|
|
33
|
+
inference loop. Existing repository contracts remain the authority over
|
|
34
|
+
external design inspiration.
|
|
32
35
|
|
|
33
36
|
Natural-language objectives are untrusted proposal data. They never authorize
|
|
34
37
|
repository reads, writes, commands, network use, evaluation, or application.
|
|
@@ -159,9 +162,12 @@ untrusted objective
|
|
|
159
162
|
-> accept | inconclusive | no_eligible_candidate | rollback
|
|
160
163
|
```
|
|
161
164
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
+
For the future general loop, there is no direct inference edge from a
|
|
166
|
+
Cairnkeep-owned generator, selector, applier, or rollback operation. The shipped
|
|
167
|
+
skill lifecycle has one explicit exception: its operator-configured proposal
|
|
168
|
+
adapter may perform candidate-generation inference through a strict bounded
|
|
169
|
+
process contract. Evaluation still uses the Phase 19 coordinator and external
|
|
170
|
+
adapter; Cairnkeep owns neither inference loop.
|
|
165
171
|
|
|
166
172
|
| Actor or component | May do | Must not do | Required authority |
|
|
167
173
|
|---|---|---|---|
|
|
@@ -189,12 +195,12 @@ diagnostics or model output.
|
|
|
189
195
|
| Concern | Current accepted Phase 18/19 behavior | Missing future contract; not shipped by Phase 20 |
|
|
190
196
|
|---|---|---|
|
|
191
197
|
| Capability identity | `expected_capability_digest` and `observed_capability_digest` bind the complete Phase 18 effective state. | Candidate-overlay identity and expected/observed candidate digests for arbitrary prompt/config candidates. |
|
|
192
|
-
| Adapter identity | `adapter_config_digest` binds the operator adapter configuration.
|
|
193
|
-
| Request surface | Phase 19 sends experiment/task identity, arm, repetition, pass, isolated paths, fixed input, limits, seed, expected capability digest, and output path. | Phase 19 has no arbitrary
|
|
198
|
+
| Adapter identity | `adapter_config_digest` binds the operator adapter configuration. The 2.8.0 skill lifecycle additionally binds proposal and evaluation adapter executable digests. | These identities grant no general selection or apply authority. |
|
|
199
|
+
| Request surface | Phase 19 sends experiment/task identity, arm, repetition, pass, isolated paths, fixed input, limits, seed, expected capability digest, and output path. The skill lifecycle overlays exact baseline/candidate `SKILL.md` bytes before invocation. | Phase 19 has no public arbitrary configuration-overlay protocol or adapter-selected target. |
|
|
194
200
|
| Result surface | Strict results may report bounded metrics, identities, references, and `observed_capability_digest`. | There is no observed candidate-overlay digest, and no candidate pass/approval field. |
|
|
195
201
|
| Ablation | `runCapabilityAblation()` compares an all-enabled baseline with exactly one disabled capability and requires four invocations per task/repetition: two passes in each of two arms. | It is not generic prompt search, arbitrary configuration injection, or a multi-capability candidate arm. |
|
|
196
|
-
| Scheduling | Deterministic, serial, immutable, paired schedules and fresh isolated workspaces are current.
|
|
197
|
-
| Report | Canonical reports preserve observations, aggregates, condition levels, eligible pairs, missingness, warnings, intervals, evidence scope, and provenance. |
|
|
202
|
+
| Scheduling | Deterministic, serial, immutable, paired schedules and fresh isolated workspaces are current. The skill lifecycle coordinates separate disjoint exploration and confirmation sets. | Adaptive general candidate generation and search remain absent. |
|
|
203
|
+
| Report | Canonical reports preserve observations, aggregates, condition levels, eligible pairs, missingness, warnings, intervals, evidence scope, and provenance. A separate skill evaluation artifact applies the narrow no-regression gate. | Evaluation reports themselves do not authorize application or general configuration selection. |
|
|
198
204
|
|
|
199
205
|
Exploration and held-out confirmation task sets MUST be separate, committed,
|
|
200
206
|
immutable, non-overlapping, and digest-bound. Exploration results may inform the
|
|
@@ -357,14 +363,14 @@ not backlog rows.
|
|
|
357
363
|
Each row is future work requiring separate approval. The list is exactly nine
|
|
358
364
|
items; Phase 20 delivers none of them.
|
|
359
365
|
|
|
360
|
-
| # |
|
|
366
|
+
| # | General-loop capability | Accepted substrate it may reuse | Delivery status |
|
|
361
367
|
|---|---|---|---|
|
|
362
368
|
| 1 | Natural-language-to-form compiler and validator | Strict versioning, canonical digests, and path validation patterns | Future work requiring separate approval; not delivered by Phase 20 |
|
|
363
|
-
| 2 | Bounded candidate generator | Phase 18 typed capability identities and retained evidence |
|
|
364
|
-
| 3 | Candidate-config injection contract for external adapters | Phase 19 adapter seam and Phase 18 capability digests
|
|
365
|
-
| 4 | Scoped proposal/artifact schema | Existing strict versioned local artifacts and canonical reports |
|
|
366
|
-
| 5 | Backup-first patch applier and rollback ledger | Existing backup-first uninstall/revert and atomic single-file write precedents |
|
|
367
|
-
| 6 | Exploration and held-out committed task sets | Current committed task-set schema, exact revisions, and verifier |
|
|
369
|
+
| 2 | Bounded candidate generator | Phase 18 typed capability identities and retained evidence | Narrow skill proposer shipped; general objective compiler and candidate search remain future work |
|
|
370
|
+
| 3 | Candidate-config injection contract for external adapters | Phase 19 adapter seam and Phase 18 capability digests | Exact coordinator-owned `SKILL.md` overlays shipped; arbitrary configuration overlays remain future work |
|
|
371
|
+
| 4 | Scoped proposal/artifact schema | Existing strict versioned local artifacts and canonical reports | Narrow candidate/proposal/evaluation/application artifacts shipped; general proposal bundles remain future work |
|
|
372
|
+
| 5 | Backup-first patch applier and rollback ledger | Existing backup-first uninstall/revert and atomic single-file write precedents | One-file exact-digest skill apply/rollback shipped; arbitrary patches remain future work |
|
|
373
|
+
| 6 | Exploration and held-out committed task sets | Current committed task-set schema, exact revisions, and verifier | Shipped for the skill lifecycle; general campaigns remain future work |
|
|
368
374
|
| 7 | Selection policy accounting for uncertainty and repeated comparisons | Phase 19 condition levels, paired estimates, missingness, warnings, and intervals | Future work requiring separate approval; not delivered by Phase 20 |
|
|
369
375
|
| 8 | Sufficient live baseline evidence | Validator-checked evidence scope and exact-source runtime provenance; existing offline evidence is framework-only | Future work requiring separate approval; not delivered by Phase 20 |
|
|
370
376
|
| 9 | Dedicated privacy/security threat review | Current local privacy, bounded storage, secret exclusion, and public hygiene guards | Future work requiring separate approval; not delivered by Phase 20 |
|
|
@@ -377,12 +383,10 @@ items; Phase 20 delivers none of them.
|
|
|
377
383
|
- Architect-style in-loop compression is outside this design and Phase 20.
|
|
378
384
|
- Trace UI is outside this design and Phase 20.
|
|
379
385
|
- Eval UI is outside this design and Phase 20.
|
|
380
|
-
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
- Phase 20 adds no symbol, command, flag, package, dependency, test source,
|
|
385
|
-
executable interface, release, publication, or automatic product claim.
|
|
386
|
+
- Cairnkeep 2.8.0 implements only the reviewed `SKILL.md` lifecycle documented
|
|
387
|
+
separately. It adds no general objective compiler, autonomous scheduler,
|
|
388
|
+
capability optimizer, arbitrary patch surface, UI, or automatic product
|
|
389
|
+
claim.
|
|
386
390
|
|
|
387
391
|
All excluded implementation work requires a new plan, threat review, approval,
|
|
388
392
|
tests, and evidence. Naming a future contract here does not reserve a public
|
|
@@ -394,12 +398,12 @@ interface or represent it as delivered.
|
|
|
394
398
|
|---|---|---|
|
|
395
399
|
| META-01 | Natural-language specification → strict form | Untrusted prose can become only a complete, versioned, fail-closed future form. |
|
|
396
400
|
| META-02 | Ownership; evaluation; proposal; state machine | Candidates are bounded, measured only through Phase 19/adapters, and separately approved for application. |
|
|
397
|
-
| META-03 | Prerequisites; explicit exclusions |
|
|
401
|
+
| META-03 | Prerequisites; explicit exclusions | Narrow skill delivery is separated from remaining general-loop prerequisites and prohibited ownership/UI behavior. |
|
|
398
402
|
| D-01 | Natural-language specification → strict form | Natural language is untrusted proposal data, never executable control. |
|
|
399
403
|
| D-02 | Required configuration fields | Scope, revisions, paths, resources, safety, capabilities, tasks, evaluation, selection, mutation, and authority are required. |
|
|
400
404
|
| D-03 | Admission is fail closed | Omissions, unknowns, unsafe paths, unresolved revisions, non-finite resources, and inferred defaults invalidate. |
|
|
401
405
|
| D-04 | Admission; privacy invariants | Only value-free operator-owned references are allowed; secret/endpoint/environment values are forbidden. |
|
|
402
|
-
| D-05 | Status and normative language | The artifact is design-only; examples are non-normative;
|
|
406
|
+
| D-05 | Status and normative language | The general-loop artifact is design-only; examples are non-normative; the separate narrow skill schema and CLI do not imply broader delivery. |
|
|
403
407
|
| D-06 | Ownership and authority | Phase 19 is the sole execution/measurement seam and the external adapter owns inference. |
|
|
404
408
|
| D-07 | Candidate evaluation | Source, tasks, verifier, adapter identity, schedule, limits, seeds, and digests are frozen and comparable. |
|
|
405
409
|
| D-08 | Candidate evaluation | Canonical terminal/pass states, condition levels, missingness, uncertainty, and evidence scope remain authoritative. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Curriculum Coverage Map
|
|
2
2
|
|
|
3
|
-
**Baseline:** Cairnkeep 2.
|
|
4
|
-
**Last reviewed:** 2026-
|
|
3
|
+
**Baseline:** Cairnkeep 2.8.0
|
|
4
|
+
**Last reviewed:** 2026-08-03
|
|
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
|
|
@@ -16,7 +16,8 @@ been rehearsed.
|
|
|
16
16
|
| Local stdio memory and MCP registration | L00-L02 | L03-L04 | L00-L03 Ready; L04 Brief |
|
|
17
17
|
| Project bootstrap, launchers, and contributor mode | L02-L03 | L05 | L02-L03 Ready; L05 Brief |
|
|
18
18
|
| Memory scopes, keys, search, supersession, and history | L04 | L04-L05 | Brief |
|
|
19
|
-
| Wiki, alignment,
|
|
19
|
+
| Wiki, alignment, and repository quality workflows | L05-L06 | L05-L06 | Brief |
|
|
20
|
+
| Optional local code graph, graph inspection, and harness delegates | L18 | L18 | Brief; default off |
|
|
20
21
|
| Storage placement, export/import, and authenticated remote memory | L07 | L07-L08 | Brief |
|
|
21
22
|
| Document RAG | L00 | L09 | Brief; optional |
|
|
22
23
|
| token-miser exploration and routing | L00 | L10 | Brief; optional |
|
|
@@ -30,6 +31,7 @@ been rehearsed.
|
|
|
30
31
|
| Deterministic two-pass evaluation and one-capability ablation | L16 | L16 | Brief; default off |
|
|
31
32
|
| Shell completion | L02 | L02 | Ready; optional convenience |
|
|
32
33
|
| Bounded meta-agent configuration loop | L17 | None | Design-only; not shipped |
|
|
34
|
+
| Reviewed, evaluated, reversible skill-file improvement | L19 | L19 | Brief; explicit and default off |
|
|
33
35
|
|
|
34
36
|
## Release Review
|
|
35
37
|
|
|
@@ -58,6 +60,8 @@ repository remains the canonical source for explanations and scripts.
|
|
|
58
60
|
| `course-05-evidence` | L13-L14 | Evidence lifecycle and typed memory |
|
|
59
61
|
| `course-06-governance` | L15 | Capability precedence and restart boundaries |
|
|
60
62
|
| `course-07-evaluation` | L16-L17 | Package-owned offline fixture and design boundary |
|
|
63
|
+
| `course-08-graph` | L18 | Optional local structural graph workflow |
|
|
64
|
+
| Planned: `course-09-skill` | L19 | Validated skill improvement after a disposable lab exists |
|
|
61
65
|
|
|
62
66
|
## Command Ownership
|
|
63
67
|
|
|
@@ -77,7 +81,8 @@ against `cairn help` so a new command cannot bypass a curriculum decision.
|
|
|
77
81
|
| `cairn capabilities` | L15 |
|
|
78
82
|
| `cairn notes` | L13 |
|
|
79
83
|
| `cairn eval` | L16 |
|
|
80
|
-
| `cairn
|
|
84
|
+
| `cairn skill` | L19 |
|
|
85
|
+
| `cairn graph` | L18 |
|
|
81
86
|
| `cairn memory` | L07-L08 |
|
|
82
87
|
| `cairn audit-timer` | L05 and L13 |
|
|
83
88
|
| `cairn uninstall` | L02 and L11-L12 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cairnkeep feature guide
|
|
2
2
|
|
|
3
|
-
**Baseline:** Cairnkeep 2.
|
|
3
|
+
**Baseline:** Cairnkeep 2.8.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
|
|
@@ -32,8 +32,9 @@ Run setup in that order, then confirm `cairn doctor`, `cairn sync --check`, and
|
|
|
32
32
|
| 5 | Trajectories, notes, compaction, artifacts | Local session evidence has an explicit retention purpose |
|
|
33
33
|
| 6 | Typed nodes and capability governance | Filtering and centrally inspectable feature state are needed |
|
|
34
34
|
| 7 | Evaluation and ablation | A concrete change needs bounded measurement |
|
|
35
|
+
| 8 | Validated skill improvement | Repeated resolved hindsight warrants a measured skill change |
|
|
35
36
|
|
|
36
|
-
Every stage is independently useful. Stages 4-
|
|
37
|
+
Every stage is independently useful. Stages 4-8 are opt-in and are not
|
|
37
38
|
prerequisites for ordinary memory.
|
|
38
39
|
|
|
39
40
|
## Core and derived knowledge
|
|
@@ -43,7 +44,7 @@ prerequisites for ordinary memory.
|
|
|
43
44
|
| Scoped memory | `/remember`, `/recall`, MCP memory tools | Available after MCP registration; named/global DBs under `CAIRN_AGENTFS_BASE_DIR`, project DB under `<server-cwd>/.agentfs/` | Recall in a new session; use reviewed delete/supersession rather than filesystem removal | `course-02-memory` |
|
|
44
45
|
| Memory lifecycle | `/memory-review`, `memory_supersede`, `memory_history`, reviewed apply/invalidate tools | Durable history; no automatic promotion | Inspect key history and provenance | `course-02-memory` |
|
|
45
46
|
| Wiki and alignment | `/wiki-ingest`, `/wiki-query`, `/wiki-lint`, alignment files | Written only when invoked; reviewable `.planning/` artifacts | Re-run lint, inspect source citations, revert tracked changes normally | `course-02-memory` |
|
|
46
|
-
|
|
|
47
|
+
| Local code graph | `cairn graph build|query|status|diff|explain|path`; `/graphify` delegates | Default off; optional isolated `graphify` executable; incremental work under `graphify-out/`, published view under `.planning/graphs/` | Ignore both derived locations; check status and source before trusting a result; use `--force` only after intentional deletion; uninstall adapters separately | `course-08-graph` |
|
|
47
48
|
| Repository quality | `/repo-review`, `/security-audit` | On-demand workflow; findings are hypotheses until reproduced | Require file/line evidence and regression tests | `course-03-quality` |
|
|
48
49
|
|
|
49
50
|
## Storage and optional topology
|
|
@@ -70,7 +71,8 @@ prerequisites for ordinary memory.
|
|
|
70
71
|
| Typed nodes/import | `CAIRN_TYPED_MEMORY_NODES=1` | Restart MCP server; tool schema changes | Hard-filter search; dry-run, replay-safe import; `cairn doctor --repair` only for derived state | `course-05-evidence` |
|
|
71
72
|
| Capability contract | `CAIRN_CAPABILITY_CONTRACT=1` | MCP changes require restart; operating changes apply next invocation | `cairn capabilities list|status|enable|disable|reset|logging`; digest identifies state only | `course-06-governance` |
|
|
72
73
|
| Evaluation | `CAIRN_EVAL=1` for the coordinator process | No harness chosen by Cairnkeep | `validate` before `run`; inspect report, missingness and evidence scope; dry-run prune/delete | `course-07-evaluation` |
|
|
73
|
-
|
|
|
74
|
+
| 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 | Planned: `course-09-skill` |
|
|
75
|
+
| General meta-agent loop | Not shipped | Not applicable | Skill-file lifecycle only; no generic configuration loop or scheduler | `course-07-evaluation` |
|
|
74
76
|
|
|
75
77
|
## Harness and maintenance checks
|
|
76
78
|
|
package/docs/learning/README.md
CHANGED
|
@@ -48,6 +48,8 @@ expanded only after their labs are executable.
|
|
|
48
48
|
| L15 | [Capability governance](lessons/L15-capability-governance.md) | Brief | 35 min |
|
|
49
49
|
| L16 | [Evaluation and ablation](lessons/L16-evaluation.md) | Brief | 50 min |
|
|
50
50
|
| L17 | [The agent boundary](lessons/L17-agent-boundary.md) | Brief | 25 min |
|
|
51
|
+
| L18 | [Local code graph](lessons/L18-local-code-graph.md) | Brief | 35 min |
|
|
52
|
+
| L19 | [Validated skill improvement](lessons/L19-validated-skill-improvement.md) | Brief | 50 min |
|
|
51
53
|
|
|
52
54
|
The [curriculum coverage map](CURRICULUM-MAP.md) records where every public
|
|
53
55
|
feature is introduced, practised, and operated. It also marks design-only work
|
|
@@ -65,8 +67,8 @@ Every complete lesson contains:
|
|
|
65
67
|
6. Release compatibility metadata for completed exercises.
|
|
66
68
|
|
|
67
69
|
The learner should never need optional infrastructure to complete L00-L06.
|
|
68
|
-
Remote memory, RAG, routing, containers,
|
|
69
|
-
capability governance, and evaluation are separate opt-in modules.
|
|
70
|
+
Remote memory, RAG, routing, containers, graph indexing, structured capture,
|
|
71
|
+
typed nodes, capability governance, and evaluation are separate opt-in modules.
|
|
70
72
|
|
|
71
73
|
## For contributors
|
|
72
74
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Status:** Ready
|
|
4
4
|
**Track:** Quickstart
|
|
5
5
|
**Time:** 15 minutes
|
|
6
|
-
**Tested with:** Cairnkeep 2.
|
|
6
|
+
**Tested with:** Cairnkeep 2.8.0
|
|
7
7
|
|
|
8
8
|
## Outcome
|
|
9
9
|
|
|
@@ -26,7 +26,7 @@ ephemeral; the named course volume is persistent.
|
|
|
26
26
|
1. Pull the public image:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
podman pull ghcr.io/cairnkeep/cairnkeep:2.
|
|
29
|
+
podman pull ghcr.io/cairnkeep/cairnkeep:2.8.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
2. Start the stdio server with a read-only root filesystem and no Linux
|
|
@@ -38,7 +38,7 @@ ephemeral; the named course volume is persistent.
|
|
|
38
38
|
--read-only --cap-drop=all --security-opt=no-new-privileges \
|
|
39
39
|
--tmpfs=/tmp:rw,noexec,nosuid,size=64m,mode=1777 \
|
|
40
40
|
--volume cairnkeep-course-data:/data:Z,U \
|
|
41
|
-
ghcr.io/cairnkeep/cairnkeep:2.
|
|
41
|
+
ghcr.io/cairnkeep/cairnkeep:2.8.0 stdio
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
3. The process waits quietly for MCP input. Press `Ctrl-C` after confirming it
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Status:** Ready
|
|
4
4
|
**Track:** Quickstart
|
|
5
5
|
**Time:** 25 minutes
|
|
6
|
-
**Tested with:** Cairnkeep 2.
|
|
6
|
+
**Tested with:** Cairnkeep 2.8.0 and Node.js 22 or newer
|
|
7
7
|
|
|
8
8
|
## Outcome
|
|
9
9
|
|
|
@@ -41,7 +41,7 @@ machine-level steps.
|
|
|
41
41
|
2. Install Cairnkeep:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
npm install --global @cairnkeep/cli@2.
|
|
44
|
+
npm install --global @cairnkeep/cli@2.8.0
|
|
45
45
|
cairn --version
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -6,23 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
## Outcome
|
|
8
8
|
|
|
9
|
-
Separate Cairnkeep's shipped evidence
|
|
10
|
-
design-only
|
|
11
|
-
remains with the operator and external harness.
|
|
9
|
+
Separate Cairnkeep's shipped evidence, evaluation, and narrow skill-file
|
|
10
|
+
lifecycle from the design-only general meta-agent proposal, and identify which
|
|
11
|
+
authority always remains with the operator and external harness.
|
|
12
12
|
|
|
13
13
|
## Planned lesson
|
|
14
14
|
|
|
15
15
|
- Current facts: typed capability state, local evidence, immutable evaluation
|
|
16
16
|
inputs, isolated schedules, independent verification, and canonical reports.
|
|
17
|
-
-
|
|
18
|
-
candidate
|
|
19
|
-
rollback ledgers.
|
|
17
|
+
- Shipped in 2.8.0: reviewed hindsight candidates, bounded edits to one existing
|
|
18
|
+
`SKILL.md`, isolated baseline/candidate comparison, held-out confirmation,
|
|
19
|
+
exact-digest application, and rollback ledgers.
|
|
20
|
+
- Design only: general natural-language configuration compilation, arbitrary
|
|
21
|
+
target types, autonomous scheduling, and an owner inference loop.
|
|
20
22
|
- Cairnkeep coordinates evidence; it does not own a harness inference loop.
|
|
21
23
|
- Natural language is untrusted proposal data, not executable authorization.
|
|
22
24
|
- Separate human gates for form, evaluation, application, confirmation, and
|
|
23
25
|
rollback.
|
|
24
|
-
- Why
|
|
25
|
-
proposed meta-agent loop.
|
|
26
|
+
- Why the shipped `cairn skill` command does not authorize or imply the broader
|
|
27
|
+
proposed meta-agent loop or a product quality claim.
|
|
26
28
|
|
|
27
29
|
## Hands-on lab
|
|
28
30
|
|
|
@@ -36,6 +38,8 @@ be required before any future implementation could act.
|
|
|
36
38
|
|
|
37
39
|
- No learner attempts to invoke a meta-agent command or treats an illustrative
|
|
38
40
|
block as a supported schema.
|
|
41
|
+
- The learner can distinguish supported `cairn skill` operations from the
|
|
42
|
+
broader design-only proposal.
|
|
39
43
|
- Every inference execution remains owned by an operator-configured adapter.
|
|
40
44
|
- A capability digest is not treated as approval, identity proof, or evidence
|
|
41
45
|
of improvement.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# L18 - Local code graph
|
|
2
|
+
|
|
3
|
+
**Status:** Brief
|
|
4
|
+
**Track:** Practitioner
|
|
5
|
+
**Planned time:** 35 minutes
|
|
6
|
+
**Introduced in:** Cairnkeep 2.7.0
|
|
7
|
+
|
|
8
|
+
## Outcome
|
|
9
|
+
|
|
10
|
+
Build and inspect an optional local structural graph without confusing derived
|
|
11
|
+
graph data with canonical source code or granting an external tool ownership of
|
|
12
|
+
the Cairnkeep operating layer.
|
|
13
|
+
|
|
14
|
+
## Planned lesson
|
|
15
|
+
|
|
16
|
+
- When a structural graph answers a code-navigation question better than
|
|
17
|
+
durable memory, the wiki, or broad text search.
|
|
18
|
+
- Why the graph capability is disabled unless the managed capability contract
|
|
19
|
+
enables `graph` or the compatibility setting `graphify.enabled` is true.
|
|
20
|
+
- How to install only the isolated `graphify` executable with `uv tool install
|
|
21
|
+
graphifyy` or `pipx install graphifyy`. Do not run `graphify install` because
|
|
22
|
+
Cairnkeep owns the harness commands, policies, and lifecycle.
|
|
23
|
+
- How `cairn graph build`, `cairn graph status`, `cairn graph query`,
|
|
24
|
+
`cairn graph explain`, `cairn graph path`, and `cairn graph diff` share one
|
|
25
|
+
portable owner across harnesses and the shell.
|
|
26
|
+
- Why builds index local code only, use a reduced subprocess environment, avoid
|
|
27
|
+
provider credentials and semantic document extraction, and publish validated
|
|
28
|
+
artifacts atomically under `.planning/graphs/` while Graphify maintains its
|
|
29
|
+
separate incremental work directory under `graphify-out/`.
|
|
30
|
+
- How the previous successful graph snapshot supports `diff`, and why `--force`
|
|
31
|
+
is appropriate only when an intentional code deletion reduces the graph.
|
|
32
|
+
- Why exact symbols and narrow terms are more reliable than broad prose, and
|
|
33
|
+
why every graph result must be checked against canonical source files.
|
|
34
|
+
- How Claude Code and OpenCode receive managed `/graphify` wrappers while
|
|
35
|
+
`cairn sync-kimi --apply` and `cairn sync-pi --apply` install thin delegates
|
|
36
|
+
that call only `cairn graph`.
|
|
37
|
+
|
|
38
|
+
## Hands-on lab
|
|
39
|
+
|
|
40
|
+
Use the synthetic course repository at checkpoint `course-08-graph` in a
|
|
41
|
+
disposable clone. Confirm that a disabled graph fails before Graphify or graph
|
|
42
|
+
artifacts are accessed. Install only the isolated executable, enable the graph
|
|
43
|
+
through one documented capability path, and then run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cairn graph build
|
|
47
|
+
cairn graph status
|
|
48
|
+
cairn graph query addItem
|
|
49
|
+
cairn graph explain addItem
|
|
50
|
+
cairn graph path addItem writeLedger
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Make one reversible change to the synthetic ledger, rebuild, and inspect
|
|
54
|
+
`cairn graph diff`. Revert the source change, rebuild again, and verify the
|
|
55
|
+
status. Inspect `.planning/graphs/` and `graphify-out/` without adding either
|
|
56
|
+
derived location to Git.
|
|
57
|
+
|
|
58
|
+
## Acceptance criteria
|
|
59
|
+
|
|
60
|
+
- The disabled-path check creates or changes no graph artifact.
|
|
61
|
+
- `status` identifies whether the published graph is present and current.
|
|
62
|
+
- `query`, `explain`, and `path` return structural discovery evidence that the
|
|
63
|
+
learner verifies against `src/trail-ledger.mjs`.
|
|
64
|
+
- A second successful build produces a snapshot-backed diff.
|
|
65
|
+
- The learner can explain why `--force` is not a generic retry flag.
|
|
66
|
+
- The repository contains no Graphify-owned harness assets and neither
|
|
67
|
+
`graphify-out/` nor a published graph artifact is staged for commit.
|
|
68
|
+
- The learner can distinguish graph storage and subprocess data flow from
|
|
69
|
+
Cairnkeep memory storage and optional embedding traffic.
|
|
70
|
+
|
|
71
|
+
## Common failures
|
|
72
|
+
|
|
73
|
+
- If `graphify` is missing, install the isolated CLI and verify it is on
|
|
74
|
+
`PATH`; do not run its harness installer.
|
|
75
|
+
- If the capability is disabled, enable it through the managed contract or the
|
|
76
|
+
compatibility setting rather than bypassing the owner.
|
|
77
|
+
- If no previous snapshot exists, make a successful build after a real code
|
|
78
|
+
change before requesting `diff`.
|
|
79
|
+
- If a path or explanation is empty, retry with exact symbol names and verify
|
|
80
|
+
the source directly instead of treating a broad query as proof.
|
|
81
|
+
|
|
82
|
+
## Privacy and trust boundary
|
|
83
|
+
|
|
84
|
+
The managed build passes the repository path to a local Graphify subprocess and
|
|
85
|
+
publishes a validated view locally. Its reduced environment excludes provider
|
|
86
|
+
credentials, and the managed workflow does not perform semantic document
|
|
87
|
+
extraction. Graphify's incremental `graphify-out/` workspace and Cairnkeep's
|
|
88
|
+
published `.planning/graphs/` view can both contain sensitive structural data.
|
|
89
|
+
Keep both local by default, review ignore rules, and never present the graph as
|
|
90
|
+
canonical evidence.
|
|
91
|
+
|
|
92
|
+
## Source material
|
|
93
|
+
|
|
94
|
+
- [Operating guide](../../operating.md#optional-graphify-workflow)
|
|
95
|
+
- [Harness compatibility](../../harness-compatibility.md)
|
|
96
|
+
- [Privacy and data flow](../../privacy-and-data-flow.md)
|
|
97
|
+
- [L15 - Capability governance](L15-capability-governance.md)
|