akm-cli 0.9.26 → 0.9.27-alpha.2
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 +237 -0
- package/LICENSE +3 -4
- package/dist/assets/prompts/consolidate-system.md +2 -2
- package/dist/assets/prompts/distill-lesson-system.md +29 -7
- package/dist/assets/prompts/extract-session.md +2 -2
- package/dist/commands/improve/consolidate/coverage.js +71 -17
- package/dist/commands/improve/consolidate/pair-pass.js +12 -9
- package/dist/commands/improve/consolidate.js +77 -5
- package/dist/commands/improve/distill-guards.js +9 -10
- package/dist/commands/improve/distill.js +70 -22
- package/dist/commands/improve/extract-prompt.js +61 -39
- package/dist/commands/improve/extract.js +2 -1
- package/dist/commands/improve/preparation.js +14 -1
- package/dist/commands/improve/reflect.js +36 -4
- package/dist/commands/improve/retrieval-gate.js +1 -1
- package/dist/commands/improve/session-asset.js +3 -2
- package/dist/commands/improve/stage.js +35 -53
- package/dist/commands/proposal/drain.js +85 -21
- package/dist/commands/proposal/proposal-types.js +1 -1
- package/dist/core/config/schema/improve-processes.js +3 -3
- package/dist/core/paths.js +0 -9
- package/dist/indexer/indexer.js +35 -19
- package/dist/integrations/harnesses/codex/agent-builder.js +23 -15
- package/dist/llm/client.js +44 -14
- package/dist/llm/memory-infer.js +1 -1
- package/dist/scripts/akm-migrate-node.js +25 -20
- package/dist/scripts/akm-migrate.js +25 -20
- package/dist/storage/repositories/improve-ledger-repository.js +4 -1
- package/dist/storage/repositories/index-entry-schema.js +20 -4
- package/dist/storage/repositories/index-fts-repository.js +44 -3
- package/dist/storage/repositories/index-schema.js +14 -8
- package/docs/README.md +1 -2
- package/docs/integration/bundling-akm.md +1 -1
- package/docs/migration/v0.8-to-v0.9.md +3 -1
- package/docs/reference/README.md +1 -1
- package/docs/reference/cli.md +8 -4
- package/docs/reference/configuration.md +5 -2
- package/docs/reference/data-and-telemetry.md +1 -1
- package/package.json +1 -1
|
@@ -266,7 +266,7 @@ rather than rely on `$HOME`-derived defaults (names verified against
|
|
|
266
266
|
| `AKM_CONFIG_DIR` | `config.json`'s directory. |
|
|
267
267
|
| `AKM_DATA_DIR` | Durable, non-regenerable data: **`index.db` and `state.db` live here.** This is the directory a migration snapshot's safety copy sits beside. |
|
|
268
268
|
| `AKM_CACHE_DIR` | Regenerable cache: registry downloads, config backups, task logs. Safe to discard between image builds (not between boots of the same running install). |
|
|
269
|
-
| `AKM_STATE_DIR` | **Not** where `state.db` lives, despite the name — this is the XDG "state" directory. Holds scheduled-task invocation context, companion-plugin hook state (Claude Code / OpenCode hook logs), and, per stash, `akm improve`'s
|
|
269
|
+
| `AKM_STATE_DIR` | **Not** where `state.db` lives, despite the name — this is the XDG "state" directory. Holds scheduled-task invocation context, companion-plugin hook state (Claude Code / OpenCode hook logs), and, per stash, `akm improve`'s whole-run lock (`locks/`) — see [Storage locations](https://github.com/itlackey/akm/blob/main/docs/architecture/internals/storage-locations.md). Set it anyway if you schedule akm tasks inside the image, so that context is captured consistently rather than falling back to `$HOME/.local/state/akm`. |
|
|
270
270
|
|
|
271
271
|
Set all five to paths that persist across container restarts (a mounted
|
|
272
272
|
volume), or `akm migrate apply` will see an empty `state.db` on every boot
|
|
@@ -144,7 +144,9 @@ step is idempotent — a second run reports nothing pending. 0.9.17-alpha.4
|
|
|
144
144
|
removed that step: `akm migrate` no longer relocates these files, and one left
|
|
145
145
|
at an old path is inert (nothing reads it). Two of the five writers no longer
|
|
146
146
|
exist either — the improve ledger replaced `distill-rejected/`, and the
|
|
147
|
-
write-only `eval-cases/` path was removed.
|
|
147
|
+
write-only `eval-cases/` path was removed. A third, `measurement/verdicts/`, went
|
|
148
|
+
with the `scripts/akm-eval` toolkit that wrote it, which has since left this
|
|
149
|
+
repository ([akm-eval](https://github.com/itlackey/akm/blob/main/docs/maintainers/eval.md)).
|
|
148
150
|
`$STASH/.akm/memory-cleanup/` did not move; it is the one confirmed exception
|
|
149
151
|
to the rule (see Storage locations, above).
|
|
150
152
|
|
package/docs/reference/README.md
CHANGED
|
@@ -17,4 +17,4 @@ Authoritative reference documentation for the akm CLI and its data.
|
|
|
17
17
|
- [Website Sources](https://github.com/itlackey/akm/blob/main/docs/reference/website-sources.md) -- The pluggable fetcher API behind `akm import <url>` and other URL-based knowledge reads
|
|
18
18
|
- [Data & Telemetry](data-and-telemetry.md) -- Exactly what akm reads and writes on your machine (no remote telemetry)
|
|
19
19
|
|
|
20
|
-
See also: [akm-eval](https://github.com/itlackey/akm
|
|
20
|
+
See also: [akm-eval](https://github.com/itlackey/akm-eval) -- the evals and benchmarks for measuring whether `akm improve` is working, and the repo-root [Roadmap](https://github.com/itlackey/akm/blob/main/ROADMAP.md) -- high-level focus for upcoming releases.
|
package/docs/reference/cli.md
CHANGED
|
@@ -2492,16 +2492,19 @@ day; an asset a stage looked at and left unchanged is revisited after 7 days,
|
|
|
2492
2492
|
or as soon as new feedback (or, for consolidation, an edit) arrives.
|
|
2493
2493
|
|
|
2494
2494
|
Consolidation's promotion of a memory into `knowledge/` is the exception to the
|
|
2495
|
-
7-day rule: once a promotion is accepted or rejected,
|
|
2496
|
-
|
|
2495
|
+
7-day rule: once a promotion is accepted or rejected, or the model judged the
|
|
2496
|
+
memory and proposed nothing, the memory is not offered to the model again until
|
|
2497
|
+
its body changes, however long that takes. The ledger
|
|
2497
2498
|
records the body hash the promotion was decided against and compares it with
|
|
2498
2499
|
the memory's current body (frontmatter edits do not count), the same
|
|
2499
2500
|
content-driven rule the consolidate pair pass uses. A promotion decided by an
|
|
2500
|
-
older release, which recorded no hash, keeps the old windows.
|
|
2501
|
+
older release, which recorded no hash, keeps the old windows. A memory whose
|
|
2502
|
+
body equals that of a consolidate promotion rejected on or after 2026-09-29 is
|
|
2503
|
+
held the same way, under whatever name it has. Consolidation
|
|
2501
2504
|
also does not promote a memory that `knowledge/` already covers: before it
|
|
2502
2505
|
queues a promotion it compares the memory with the 20 `knowledge/` docs in its
|
|
2503
2506
|
bundle nearest to it by stored vector, and skips the memory when one of them
|
|
2504
|
-
holds at least
|
|
2507
|
+
holds at least 30% of its distinct 5-word shingles (skip reason
|
|
2505
2508
|
`dedup_covered_by_knowledge` in the result's `consolidation.skipReasons`). A
|
|
2506
2509
|
covering doc that ranks lower than the 20th nearest goes unseen. With no stored
|
|
2507
2510
|
vector (semantic search off, or the memory not indexed yet) that check does
|
|
@@ -2780,6 +2783,7 @@ harvest" branch on `skipReasons`, `warnings`, or `sessionsProcessed` /
|
|
|
2780
2783
|
| `engineKind` | `"llm"`, `"sdk"`, or `"agent"` — the kind of runner `engine` resolved to. Same absence condition as `engine`. |
|
|
2781
2784
|
| `skipReasons` | Per-`skipReason` count across `sessions[]` (e.g. `{ "llm_unavailable": 25 }`). Present only when `sessionsSkipped > 0`. |
|
|
2782
2785
|
| `warnings` | Includes one aggregate line per infrastructure skip reason that fired (`llm_unavailable`, `read_failed`, `exception`, `locked_concurrent`) — e.g. `25 of 25 sessions skipped: llm_unavailable (engine "default")` — so an engine outage is visible without inspecting `sessions[]`. Session-content skips (`already_extracted`, `too_short`, `triaged_out`) are counted in `skipReasons` but never produce a warning line. |
|
|
2786
|
+
| `sessions[].warnings` | One line per candidate the model wrote that the output contract refuses, as `<type>:<name> dropped: <reason>` — a lesson without a `when_to_use` of 15 characters, a description under 20, a name that is not a kebab-case slug — and one per candidate held back by the improve ledger. A session whose every candidate was dropped has `candidateCount: 0` and no `rationaleIfEmpty`, so this is where the loss shows. |
|
|
2783
2787
|
|
|
2784
2788
|
#### proposal new
|
|
2785
2789
|
|
|
@@ -110,8 +110,11 @@ distill quality-gate judges do too unless the judge's engine sets
|
|
|
110
110
|
`reasoning_effort` when set. Backend support: llama.cpp direct honors both forms
|
|
111
111
|
(`reasoning_effort` from build ≥ b10644); vLLM honors
|
|
112
112
|
`chat_template_kwargs`; Bifrost drops `chat_template_kwargs` and passes
|
|
113
|
-
`reasoning_effort` through, so also set `reasoningEffort: "none"` behind it
|
|
114
|
-
strict hosted API
|
|
113
|
+
`reasoning_effort` through, so also set `reasoningEffort: "none"` behind it. A
|
|
114
|
+
strict hosted API that rejects the two fields (OpenAI answers 400 `Unknown
|
|
115
|
+
parameter: 'chat_template_kwargs'`) gets one retry without both, and AKM stops
|
|
116
|
+
sending them to that endpoint and model for the rest of the process, as it
|
|
117
|
+
does for `response_format` below. Both fields are AKM-owned, not
|
|
115
118
|
settable via `extraParams`. A response with reasoning tokens despite
|
|
116
119
|
`enableThinking: false` triggers a runtime warning and the `akm health`
|
|
117
120
|
`thinking-control` advisory.
|
|
@@ -195,7 +195,7 @@ the set of types the code actually emits at HEAD (verified against every
|
|
|
195
195
|
| `reflect_completed` | Reflect phase produced a proposal | `ref` |
|
|
196
196
|
| `improve_reflect_outcome` | Per-asset reflect result | `ref`, `ok`, `durationMs`, `reason` |
|
|
197
197
|
| `propose_invoked` | `akm proposal new` | `ref` |
|
|
198
|
-
| `distill_invoked` | Distill phase inside the `akm improve`/`akm proposal new` pipeline. **`akm distill` is not a CLI command** — there is no standalone verb by that name | `ref`, outcome (`queued`, `skipped` with a `skipReason` such as `lesson_exists` or `conflict_noop`, `llm_failed`, `validation_failed`, `quality_rejected`, `review_needed`) |
|
|
198
|
+
| `distill_invoked` | Distill phase inside the `akm improve`/`akm proposal new` pipeline. **`akm distill` is not a CLI command** — there is no standalone verb by that name | `ref`, outcome (`queued`, `skipped` with a `skipReason` such as `lesson_exists`, `nothing_reusable` or `conflict_noop`, `llm_failed`, `validation_failed`, `quality_rejected`, `review_needed`) |
|
|
199
199
|
| `extract_invoked` | `akm proposal extract --type <harness>` / `--auto`, or improve-stage session extraction | `outcome`, `sessionId`, `harness` |
|
|
200
200
|
| `extract_triaged` | The pre-LLM extract triage gate evaluated at least one session | `evaluated`, `passed`, `triagedOut`, `sourceRun` (aggregated) |
|
|
201
201
|
| `schema_repair_invoked` | The schema-repair pass inside `akm improve` (`runSchemaRepairPass`) attempts to patch missing frontmatter on an asset that failed schema validation. **There is no `akm lint --repair` flag** — `lint` has `--fix`/`--auto-fix`, unrelated to this event | `ref`, outcome |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.27-alpha.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|