akm-cli 0.9.31 → 0.10.26101002-alpha

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.
Files changed (236) hide show
  1. package/CHANGELOG.md +265 -0
  2. package/STABILITY.md +79 -53
  3. package/dist/api-node.mjs +20 -0
  4. package/dist/api.d.ts +23 -0
  5. package/dist/api.js +45 -0
  6. package/dist/assets/hints/cli-hints-full.md +13 -27
  7. package/dist/assets/hints/cli-hints-short.md +1 -1
  8. package/dist/assets/improve-strategies/default.json +3 -3
  9. package/dist/assets/prompts/consolidate-pair.md +9 -7
  10. package/dist/cli/shared.js +31 -48
  11. package/dist/cli/unknown-flags.js +6 -43
  12. package/dist/cli.js +8 -34
  13. package/dist/commands/agent/contribute-cli.js +1 -1
  14. package/dist/commands/completions.js +1 -2
  15. package/dist/commands/config-cli.js +5 -28
  16. package/dist/commands/env/env-cli.js +5 -5
  17. package/dist/commands/env/secret-cli.js +2 -2
  18. package/dist/commands/health/checks.js +41 -16
  19. package/dist/commands/health/plugin-staleness.js +52 -22
  20. package/dist/commands/improve/autonomy-gate.js +5 -3
  21. package/dist/commands/improve/consolidate/pair-pass.js +7 -1
  22. package/dist/commands/improve/consolidate.js +6 -35
  23. package/dist/commands/improve/distill/lesson-update.js +91 -0
  24. package/dist/commands/improve/distill-guards.js +1 -43
  25. package/dist/commands/improve/distill.js +140 -20
  26. package/dist/commands/improve/eligibility.js +14 -1
  27. package/dist/commands/improve/extract-cli.js +1 -1
  28. package/dist/commands/improve/improve-cli.js +87 -102
  29. package/dist/commands/improve/improve-strategies.js +8 -12
  30. package/dist/commands/improve/improve.js +2 -2
  31. package/dist/commands/improve/loop-stages.js +0 -1
  32. package/dist/commands/improve/planner.js +0 -1
  33. package/dist/commands/improve/preparation.js +40 -99
  34. package/dist/commands/improve/proactive-maintenance.js +2 -2
  35. package/dist/commands/improve/reflect-noise.js +3 -55
  36. package/dist/commands/improve/reflect.js +3 -8
  37. package/dist/commands/improve/retrieval-scope.js +2 -2
  38. package/dist/commands/improve/salience.js +2 -9
  39. package/dist/commands/improve/stage.js +14 -9
  40. package/dist/commands/lint/index.js +5 -20
  41. package/dist/commands/observability-cli.js +3 -9
  42. package/dist/commands/proposal/drain.js +39 -6
  43. package/dist/commands/proposal/proposal-cli.js +11 -31
  44. package/dist/commands/proposal/repository.js +3 -3
  45. package/dist/commands/read/knowledge.js +3 -3
  46. package/dist/commands/read/remember-cli.js +0 -13
  47. package/dist/commands/read/search-cli.js +29 -97
  48. package/dist/commands/read/search.js +0 -11
  49. package/dist/commands/read/show.js +0 -19
  50. package/dist/commands/sources/plugin-upgrade.js +164 -101
  51. package/dist/commands/sources/sources-cli.js +1 -15
  52. package/dist/commands/sources/stash-cli.js +4 -12
  53. package/dist/commands/tasks/tasks-cli.js +4 -115
  54. package/dist/commands/workflow/plan.js +11 -33
  55. package/dist/commands/workflow-cli.js +2 -7
  56. package/dist/core/adapter/adapter-ids.js +1 -2
  57. package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
  58. package/dist/core/adapter/adapters/akm-adapter.js +9 -48
  59. package/dist/core/adapter/adapters/akm-lint.js +10 -26
  60. package/dist/core/adapter/adapters/akm-metadata.js +2 -72
  61. package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
  62. package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
  63. package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
  64. package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
  65. package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
  66. package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
  67. package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
  68. package/dist/core/adapter/recognize-match.js +3 -4
  69. package/dist/core/common.js +18 -2
  70. package/dist/core/config/config-schema.js +12 -15
  71. package/dist/core/config/config-types.js +6 -15
  72. package/dist/core/config/config-walker.js +6 -23
  73. package/dist/core/config/config.js +17 -80
  74. package/dist/core/config/engine-semantics.js +7 -3
  75. package/dist/core/config/schema/engines.js +7 -7
  76. package/dist/core/config/schema/improve-processes.js +8 -61
  77. package/dist/core/config/schema/improve.js +2 -21
  78. package/dist/core/config/schema/index-config.js +6 -39
  79. package/dist/core/env-secret-ref.js +2 -45
  80. package/dist/core/errors.js +1 -2
  81. package/dist/core/extra-params.js +2 -86
  82. package/dist/core/improve-result.js +11 -1
  83. package/dist/core/mutation-target.js +2 -2
  84. package/dist/core/recognition-util.js +4 -5
  85. package/dist/core/warn.js +21 -4
  86. package/dist/core/write-source.js +3 -3
  87. package/dist/execution/target-ref.js +1 -2
  88. package/dist/indexer/search/db-search.js +4 -19
  89. package/dist/indexer/search/fts-query.js +0 -19
  90. package/dist/integrations/agent/engine-resolution.js +5 -2
  91. package/dist/integrations/agent/index.js +1 -1
  92. package/dist/integrations/agent/profiles.js +41 -98
  93. package/dist/integrations/agent/request-lowering.js +3 -3
  94. package/dist/integrations/harnesses/aider/index.js +5 -0
  95. package/dist/integrations/harnesses/amazonq/index.js +1 -0
  96. package/dist/integrations/harnesses/claude/config-import.js +2 -3
  97. package/dist/integrations/harnesses/claude/index.js +5 -0
  98. package/dist/integrations/harnesses/codex/index.js +1 -0
  99. package/dist/integrations/harnesses/copilot/index.js +1 -0
  100. package/dist/integrations/harnesses/gemini/index.js +1 -0
  101. package/dist/integrations/harnesses/index.js +18 -39
  102. package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
  103. package/dist/integrations/harnesses/opencode/config-import.js +121 -52
  104. package/dist/integrations/harnesses/opencode/index.js +22 -0
  105. package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
  106. package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
  107. package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
  108. package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
  109. package/dist/integrations/harnesses/opencode/session-log.js +104 -115
  110. package/dist/integrations/harnesses/opencode/version.js +98 -0
  111. package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
  112. package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
  113. package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
  114. package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +228 -0
  115. package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
  116. package/dist/integrations/harnesses/openhands/index.js +1 -0
  117. package/dist/integrations/harnesses/pi/index.js +1 -0
  118. package/dist/integrations/harnesses/shared.js +2 -0
  119. package/dist/integrations/harnesses/types.js +2 -0
  120. package/dist/llm/client.js +41 -11
  121. package/dist/output/cli-hints.js +1 -1
  122. package/dist/output/context.js +10 -19
  123. package/dist/output/format-exempt.js +5 -8
  124. package/dist/output/shapes/helpers.js +1 -22
  125. package/dist/output/shapes/passthrough.js +0 -1
  126. package/dist/output/shapes.js +3 -31
  127. package/dist/output/stdout.js +5 -1
  128. package/dist/output/text/command-format.js +6 -1
  129. package/dist/output/text/workflow-format.js +4 -22
  130. package/dist/scripts/akm-migrate-node.js +13049 -14013
  131. package/dist/scripts/akm-migrate.js +16316 -17276
  132. package/dist/setup/detect.js +10 -4
  133. package/dist/setup/harness-config-import.js +5 -14
  134. package/dist/setup/setup.js +1 -1
  135. package/dist/setup/steps/tasks.js +12 -13
  136. package/dist/storage/repositories/task-history-repository.js +0 -5
  137. package/dist/storage/repositories/workflow-runs-repository.js +5 -15
  138. package/dist/tasks/embedded.js +2 -1
  139. package/dist/tasks/run/task-history.js +0 -2
  140. package/dist/tasks/schedule-gates.js +39 -0
  141. package/dist/tasks/scheduler-binding.js +0 -16
  142. package/dist/tasks/scheduler-sync.js +3 -97
  143. package/dist/tasks/source/bounded-document.js +1 -1
  144. package/dist/tasks/source/task-source-v4.js +2 -12
  145. package/dist/tasks/task-run-reserved-flags.js +2 -31
  146. package/dist/workflows/authoring/authoring.js +6 -6
  147. package/dist/workflows/compile.js +8 -65
  148. package/dist/workflows/exec/child-workflow.js +22 -3
  149. package/dist/workflows/exec/native-executor.js +12 -147
  150. package/dist/workflows/exec/run-workflow.js +31 -103
  151. package/dist/workflows/exec/step-work.js +9 -178
  152. package/dist/workflows/exec/unit-dispatch.js +0 -10
  153. package/dist/workflows/freeze/environment.js +3 -44
  154. package/dist/workflows/freeze/freeze.js +8 -41
  155. package/dist/workflows/freeze/targets/child-workflow.js +27 -63
  156. package/dist/workflows/freeze/targets/command.js +2 -16
  157. package/dist/workflows/freeze/targets/shell.js +0 -2
  158. package/dist/workflows/freeze/task-bindings.js +2 -28
  159. package/dist/workflows/ir/params.js +12 -2
  160. package/dist/workflows/parser.js +82 -232
  161. package/dist/workflows/plan.js +1 -1
  162. package/dist/workflows/renderer.js +10 -19
  163. package/dist/workflows/runtime/run-plan.js +11 -53
  164. package/dist/workflows/runtime/runs.js +4 -27
  165. package/dist/workflows/source-files.js +12 -16
  166. package/dist/workflows/source-semantics.js +1 -93
  167. package/docs/README.md +1 -1
  168. package/docs/agents/README.md +3 -3
  169. package/docs/agents/agent-install.md +1 -1
  170. package/docs/architecture/adapters.md +17 -31
  171. package/docs/architecture/architecture.md +4 -5
  172. package/docs/architecture/improvement.md +52 -21
  173. package/docs/architecture/internals/improve-workflow.md +15 -8
  174. package/docs/architecture/internals/indexing.md +1 -1
  175. package/docs/architecture/internals/search.md +1 -2
  176. package/docs/architecture/internals/storage-locations.md +5 -5
  177. package/docs/architecture/persisted-data-compat.md +13 -4
  178. package/docs/architecture/specs/0.9.0-decisions.md +6 -2
  179. package/docs/architecture/specs/improve-collapse-churn-detector-design.md +2 -2
  180. package/docs/architecture/specs/workflow-format-unification.md +1 -6
  181. package/docs/architecture/testing/manual-testing-checklist.md +20 -29
  182. package/docs/architecture/testing/task-workflow-manual-tests.md +106 -203
  183. package/docs/architecture/testing/testing-workflow.md +1 -1
  184. package/docs/architecture/workflow-engine.md +5 -56
  185. package/docs/guides/author-workflows.md +39 -69
  186. package/docs/guides/capture-knowledge.md +1 -1
  187. package/docs/guides/claude-code-vs-akm-workflows.md +1 -2
  188. package/docs/guides/discover-and-load.md +4 -4
  189. package/docs/guides/getting-started.md +1 -1
  190. package/docs/guides/improve-the-library.md +7 -7
  191. package/docs/guides/recipes/headless-install.md +2 -2
  192. package/docs/guides/run-workflows.md +1 -1
  193. package/docs/guides/use-with-any-agent.md +49 -4
  194. package/docs/integration/bundling-akm.md +7 -6
  195. package/docs/maintainers/curate-workmap.md +1 -2
  196. package/docs/maintainers/release-checklist.md +30 -1
  197. package/docs/posts/akm-command-tour.md +3 -3
  198. package/docs/product-surface.md +1 -1
  199. package/docs/reference/README.md +1 -0
  200. package/docs/reference/api.md +65 -0
  201. package/docs/reference/asset-types.md +3 -5
  202. package/docs/reference/bundle-types.md +2 -4
  203. package/docs/reference/cli.md +129 -171
  204. package/docs/reference/configuration.md +84 -19
  205. package/docs/reference/data-and-telemetry.md +1 -1
  206. package/docs/reference/env-and-secrets.md +2 -2
  207. package/docs/reference/supported-formats.md +3 -4
  208. package/docs/reference/tasks.md +12 -19
  209. package/docs/reference/website-sources.md +1 -1
  210. package/docs/reference/workflow-schema.md +89 -317
  211. package/docs/reference/workflows.md +20 -48
  212. package/package.json +12 -2
  213. package/schemas/akm-config.json +2 -243
  214. package/schemas/akm-task.json +2 -3
  215. package/schemas/akm-workflow.json +47 -84
  216. package/dist/assets/improve-strategies/catchup.json +0 -41
  217. package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
  218. package/dist/assets/improve-strategies/quick.json +0 -17
  219. package/dist/assets/improve-strategies/reflect-distill.json +0 -29
  220. package/dist/assets/improve-strategies/thorough.json +0 -49
  221. package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
  222. package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
  223. package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
  224. package/dist/cli/retired-commands.js +0 -118
  225. package/dist/commands/tasks/validate.js +0 -176
  226. package/dist/core/config/legacy-source-shape-shim.js +0 -117
  227. package/dist/integrations/harnesses/ids.js +0 -28
  228. package/dist/tasks/source/task-source-v3-frozen.js +0 -424
  229. package/dist/tasks/source/task-to-v4.js +0 -863
  230. package/dist/workflows/exec/worktree.js +0 -372
  231. package/dist/workflows/freeze/child-output-references.js +0 -83
  232. package/dist/workflows/freeze/identity.js +0 -22
  233. package/dist/workflows/freeze/targets/script.js +0 -50
  234. package/dist/workflows/freeze/targets/task.js +0 -124
  235. package/dist/workflows/github-yaml.js +0 -506
  236. package/dist/workflows/runtime/run-outputs.js +0 -80
package/CHANGELOG.md CHANGED
@@ -6,6 +6,257 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.26101002] - 2026-10-10
10
+
11
+ ### Changed
12
+
13
+ - **Triage accepts up to 200 proposals per run by default, up from 25.** The consolidate pair pass stages about 90
14
+ pairs a night on a real stash, so a lower cap let the review queue grow every night. `maxAcceptsPerRun` still bounds
15
+ a run, and `akm proposal drain` uses the same default.
16
+ - **`akm improve <scope>` warns when the scope matches no asset.** A type scope that matches nothing in the stash
17
+ (`akm improve typo`, `improve skills`, `improve memorys`) prints one warning on stderr naming the scope and, for a
18
+ near-miss of a real type, the likely intended one. The exit code and the empty plan are unchanged, and a valid scope
19
+ with nothing eligible does not warn.
20
+
21
+ ## [0.10.26101001] - 2026-10-10
22
+
23
+ ### Added
24
+
25
+ - **OpenCode 2 is the primary OpenCode integration; OpenCode 1 keeps working (#1049).** akm detects the major from
26
+ the engine's binary (`<bin> --version`, once per binary per process; `opencode2` is preferred when it is on PATH)
27
+ and drives it through a per-major adapter for SDK dispatch (`opencode-sdk`, on `@opencode/client` 2.0.26 or
28
+ `@opencode-ai/sdk` 1.2.20), CLI dispatch (`opencode run`, which adds `--standalone` on OpenCode 2 so no background
29
+ service is left running), session history (chosen from `opencode.db`'s own tables, read-only, with retained
30
+ OpenCode 1 rows still readable after a native upgrade) and native config import. OpenCode 1 warns once that
31
+ upgrading is recommended; a binary of an unknown major is driven as OpenCode 2 with a warning, never refused.
32
+ `akm upgrade` and `akm health` know the `akm-opencode-v2` plugin beside `akm-opencode`.
33
+ - **`akm-cli/api`: the one supported programmatic entry point.** `curate(query, { limit, type, format })` returns
34
+ exactly the stdout of `akm --detail agent -q curate …`, computed in-process, and rejects with the CLI's message and
35
+ `code`. It is for in-process recall by the akm plugins; everything else stays CLI-only. `package.json` gains an
36
+ `exports` map (`./api`, `./package.json`, `./dist/*`); `bin` and `files` behave as before. See
37
+ [`docs/reference/api.md`](docs/reference/api.md).
38
+ - **Distill extends an existing lesson that a memory repeats (#1090).** When the writer's lesson repeats one the library
39
+ holds (the judge scores its non-redundancy 2 or below), or the writer answers `NONE` with a lesson nearby, distill
40
+ asks for that lesson's body again with the lines the memory adds. If every existing line is kept, and the judge
41
+ passes the added lines against the lesson and the memory, the update is a pending proposal on the lesson's own
42
+ ref (reason `distill-update`, with the lesson's before-hash), left for a person: the triage drain does not accept
43
+ it. Otherwise nothing is proposed and the outcome is what it was. The result and the `distill_invoked` event carry
44
+ `updatesExisting: true`. No new setting; it needs the quality gate.
45
+
46
+ ### Removed
47
+
48
+ - **The GitHub-shaped YAML workflow format (#1096).** A `.yml` workflow (`name`/`on`/`jobs`, one job, `uses:` and `run:`
49
+ steps) is gone, with everything that existed only to carry it: workflow-step `uses: tasks/<ref>` (task composition),
50
+ `uses: scripts/<ref>` and `uses: commands/<ref>` targets, the `with:` rejection classifier for them, YAML `on.schedule`
51
+ triggers (and the scheduler sync of them), and the `script` frozen target. `.yml` under `workflows/` is skipped at
52
+ index time with a message saying it must use `.md`. Nothing in the owner's bundle or in OpenPalm used it. **Kept:** a
53
+ task that runs a workflow (`uses: workflows/<ref>`, or a `run:` calling `akm workflow run`) is a task feature and is
54
+ unchanged. A stored run whose plan has a `script` target can no longer be decoded and is abandoned like any other
55
+ undecodable plan.
56
+ - **Top-level workflow `outputs:` (#1096).** Its only consumer was a parent reading a child's exports. A completed
57
+ child workflow now returns the output of its last step, so `outputs:` is a lint error and the child-output reference
58
+ check at freeze is gone; a parent reads `steps.<composing-step>.output`. The `outputs_json` column stays readable.
59
+ - **Workflow `route` steps (#1096).** A step can no longer declare `route:` (branch on a value to a later step). It was
60
+ unused by any workflow found, and its cost was the replay journal for route decisions and cascaded skips. Branching is
61
+ an `exec` step or an agent step that reads its inputs, plus a gate for "go back and fix it". `route` is now an
62
+ unknown-key lint error; a stored plan that still has a route step cannot be decoded, so that run is abandoned.
63
+ - **`unit.isolation: worktree` (#1096).** A workflow unit can no longer declare per-attempt git-worktree isolation
64
+ (`exec/worktree.ts` and the attempt prepare/cleanup in the native executor). It was unused by any workflow found, and
65
+ the largest standalone block in the engine. `unit.isolation` is now an unknown-key lint error; a stored plan that
66
+ still carries it decodes and runs the unit in the engine's working directory. The `worktree_path` columns stay readable.
67
+ - **Runtime conversion of config older than 0.9.15 (#1091).** 0.10 reads what 0.9.15 and later wrote; an install on an
68
+ earlier release runs `akm migrate apply` under akm 0.9.x first. Removed: the in-memory `stashDir`/`sources[]`/
69
+ `installed[]` to `bundles` conversion (`legacy-source-shape-shim.ts`), the `engines.*.extraParams` lift onto
70
+ `temperature`/`maxTokens`/`enableThinking`/`reasoningEffort`, and the `{kind, ref, sourceId}` write-back of
71
+ `scheduler.enabled` that kept 0.9.16 able to read what a newer release wrote (0.10 writes plain refs, still reads the
72
+ object form). A config with a retired source key now fails to load with one message naming `akm migrate apply` under
73
+ akm 0.9.x; a legacy `extraParams` key is refused with the first-class field to set. Kept, because 0.9.15 or 0.9.16
74
+ wrote them: scheduler adoption for a config with no `scheduler.enabled`, the `{kind, ref, sourceId}` reader, and the
75
+ irVersion 5 frozen-plan reader (there was no separate irVersion 4 reader to remove). `akm migrate apply` and
76
+ `akm migrate status` are unchanged for 0.9.15 and later data; the task-source migrator moved to
77
+ `scripts/akm-migrate/migrate/`. See `STABILITY.md` and `docs/architecture/persisted-data-compat.md`.
78
+ - **The `quick`, `reflect-distill`, `thorough` and `catchup` built-in improve strategies, and the `akm-improve-frequent`
79
+ and `akm-improve-catchup` task templates (#1130).** Measured (nightly eval, n=3, `gpt-5.6-terra` and `qwen3.8-27b`):
80
+ `quick` solved 0.76 / 0.75 items against `default`'s 0.92 / 0.89, `reflect-distill` 0.78 / 0.77, and `thorough` (the
81
+ judged triage drain) 0.67 / 0.70 with harmed items at 9 / 6.3 (unsafe retirements accepted, an exact fix applied
82
+ unreviewed); `catchup` was identical to `consolidate` on the pool (it differed only in the judged triage drain, `maxChunkSize` 50 instead of 25, and `minPoolSize: 0`, which is already the default). An `improve.strategies.<name>` block with one of
83
+ these names stays valid as an ordinary user-defined strategy, but it now inherits `default` and no longer carries the
84
+ old built-in's settings (for example the triage drain). `--strategy` or `defaults.improveStrategy` naming one with no
85
+ such block fails at resolution with an error that names `default`; config load still succeeds. The shipped
86
+ `akm-improve-nightly` task would now run `default` at 02:15, the same as the `core/improve` task at 02:00, and the
87
+ hourly `akm-improve-frequent` task would only repeat that pass; `akm-improve-catchup` ran the same `consolidate` as
88
+ `akm-improve-consolidate`. All three are gone, and setup's server-install preselection now suggests `core/improve`. A task copied from
89
+ any of them into a bundle keeps its `--strategy` and must be changed to `default` or `consolidate`. (#1130)
90
+ - **The high-salience improve lane and `improve.salience.salienceThreshold` (#1129).** The lane admitted nothing in
91
+ the measurement and was reachable only by back-dating feedback. The key still loads from an old config with a
92
+ warning and does nothing; `akm migrate apply` drops it. The `high-salience` lane name stays valid on rows older releases wrote.
93
+ - **The `proactive-maintenance` built-in improve strategy (#1129).** The lane now lives in `default`. A
94
+ `improve.strategies.proactive-maintenance` block in your config keeps working as a user-defined strategy, merged
95
+ onto `default`; `defaults.improveStrategy: "proactive-maintenance"` without such a block still loads and fails
96
+ when improve runs, with the same "removed in 0.10" error as `quick` and the other removed strategies (#1130).
97
+ - **`BundleAdapter.placeNew()` (internal, #1091).** The optional adapter method, its nine implementations and their
98
+ tests were never called: every write already resolves through the fixed type-to-directory table. No behaviour
99
+ change. Writable bundles in a layout other than akm's own would need it back; see #1163.
100
+
101
+ ### Changed
102
+
103
+ - **Child workflows are kept in a simple form (#1096).** A markdown step declares `unit: { workflow: workflows/<name>,
104
+ with: { <param>: <literal or { from: <reference> }> } }` and the engine starts the child as its own run and drives it
105
+ to completion; the child's last step output is the composing step's output. The form is Experimental. The freeze,
106
+ idempotent publish, resume, blocked-child recovery, cycle check and `workflow list --children` behaviour of the existing
107
+ child executor is unchanged.
108
+ - **`default` drains the proposal queue through the deterministic gates (#1143).** The `default` strategy now runs
109
+ triage in `promote` mode with judgment off, up to `maxAcceptsPerRun: 25` accepts per run, so the backlog drains
110
+ without `experimental.improveAutonomy`. The nightly eval's baseline is exactly this path (`proposal drain --promote`
111
+ without judgment): 0.91 (terra) and 0.89 (qwen) of items solved, 0 to 1 harmed; the judged drain is what caused
112
+ harm (#1132). The autonomy gate's `triagePromote` lane is now gated only when the triage stage has judgment on: a
113
+ promote with judgment on and no opt-in is still downgraded to `queue` and reported (`improve_skipped`,
114
+ `akm task doctor`). Memory inference and memory cleanup stay gated. No new setting. (#1143)
115
+ - **`akm improve` plans the proactive-maintenance lane's picks again, and the lane is on in `default` (#1129).**
116
+ Measured on assets with silent defects and no feedback (8 planted): 0 fixed with the picks scored only, 6 to 7 with
117
+ them planned, no harm, about five times the model calls. The picks carry the `proactive` lane on their
118
+ proposals. The cap against a proposal flood already existed and is now consistent: `maxPerRun` limits the picks per
119
+ run, `dueDays` (30) admits only an asset not reflected or distilled for 30 days, and reflect's `limit` (25) bounds
120
+ the run. The code fallback for `maxPerRun` is 15, the shipped value, where it was 25. No new setting.
121
+ `--require-feedback-signal` turns the lane off for a run.
122
+ - **The judged drain accepts only consolidate promotions, and no built-in strategy turns judgment on (#1132).** On the
123
+ nightly eval, judging every proposal kind with `experimental.improveAutonomy` solved about half the items
124
+ (0.49 gpt-5.6-terra, 0.53 qwen3.8-27b) and harmed 14 and 11, changing 18 and 21 notes outside the planted set: it
125
+ accepted unsafe retirements and applied exact fixes unreviewed. Judging promotions alone was reasonable. The judgment
126
+ tier now accepts only a consolidate promotion; any other kind it would accept (a retirement, an exact fix, a reflect
127
+ revision) is left for a person with reason `judgment-not-promotion`, whatever the strategy says. `thorough`, `catchup`,
128
+ `reflect-distill` and `proactive-maintenance` no longer enable triage judgment. Deterministic promote gates are
129
+ unchanged. (#1132)
130
+ - **Built-in improve strategies are patches onto `default`, not "complete presets" (#1130).** `docs/reference/configuration.md`
131
+ said otherwise; the strategy list in the docs, the `--strategy` help and the hints now name only `default`
132
+ and `consolidate`. (#1130)
133
+ - **A proposal from the proactive lane waits for a person (#1147).** With the lane on in `default` and the default
134
+ drain promoting through the deterministic gates, a reflect edit on an asset with no feedback was accepted unattended
135
+ once reflect's judge passed it (the nightly eval showed `when_to_use`, `type` and provenance stamps and a title
136
+ heading added to assets no one had asked about). `proposal drain` now never accepts a proposal whose
137
+ `eligibilitySource` is `proactive`, through a deterministic gate, the judgment tier or an earlier staged accept: it is
138
+ left for review with reason `proactive-needs-review` (and is not sent to the judgment tier). Feedback-driven
139
+ proposals (`signal-delta`, `scope`) are unchanged. No new setting. (#1147)
140
+ - **0.10 releases are daily builds, `0.10.YYMMDDNN`, with `-alpha`, `-beta` and `-rc` stages (#1089).** The patch
141
+ number is the UTC year, month and day plus the build that day (`NN`, `01` to `99`), two digits each: the first build
142
+ on 2026-10-10 is `0.10.26101001`. A prerelease carries its stage only (`0.10.26101001-alpha`, no `.N`), so one build
143
+ is promoted `-alpha` < `-beta` < `-rc` < `0.10.26101001`; prereleases publish to the npm `next` tag and stable builds
144
+ to `latest`. The Release workflow validates the format and takes a new `stage` input (`scripts/release-version.ts`);
145
+ `bun scripts/release-version.ts next` prints the next free build number for today from the versions on npm. Versions
146
+ sort by date across months and years, so `akm upgrade` and semver ranges order them correctly. The 0.9 line keeps
147
+ `0.9.N`. See `STABILITY.md`. (#1089)
148
+
149
+ ### Removed
150
+
151
+ - **Six improve knobs that measured no effect (#1131).** Each is removed with the code that served only it; a config
152
+ that still sets one loads (named once by the unknown-key warning, dropped by `akm migrate apply`).
153
+ - `processes.consolidate.antiCollapse`: the random cluster-member injection. Identical results with it off on an
154
+ 80-memory pool.
155
+ - `processes.consolidate.p90ChunkSecondsDefault`: the up-front budget cap on the consolidation pool keeps its
156
+ behaviour with a fixed 30 s per chunk. Identical at 10, 30 and 90 s under a 180 s budget.
157
+ - `processes.consolidate.minPoolSize`: the minimum-pool skip, its `pool_below_min_size` `improve_skipped` reason and
158
+ the `minPoolSize` / `gates.minimumPool` fields of the consolidation plan. It was bypassed by `--strategy`, and the
159
+ documented default (500) differed from the code's (0). `improve_runs` rows that carry the plan fields still read.
160
+ - `processes.distill.fidelityCheck`: the negation-pattern contradiction check. No difference at n=3.
161
+ - `processes.reflect.lowValueFilter`: the low-value tier of the reflect noise classifier. Reflect edits only
162
+ frontmatter, which the filter always passes. No-op and cosmetic edits are still refused.
163
+ - `improve.salience.outcomeWeightEnabled`: the toggle and its parity weights. The outcome term stays on
164
+ (w_e 0.25, w_o 0.15, w_r 0.60), as it was by default.
165
+
166
+ - **`akm workflow create --reset` (#1091).** Declared since 0.9.12 as a deprecated alias of `--force`, never read.
167
+ `--force` alone replaces a workflow with a fresh template; `--force --from <file>` replaces it from the file.
168
+ - **`akm improve --plan` (#1091).** An exact alias of `--dry-run` with no other callers. Use `--dry-run`; it prints the
169
+ same `plan.processes` routing table.
170
+ - **`akm task list` (#1091).** A delegating alias of `akm search --type task` (added in 0.9.15, #951) with no callers
171
+ in the plugins, akm-eval or OpenPalm. Use `akm search --type task`.
172
+ - **Improve config keys nothing read (#1091).** `processes.distill.limit`, `processes.memoryInference.cls`,
173
+ `processes.proactiveMaintenance.limit` (an alias of `maxPerRun`) and `triage.policy` (set in the shipped `default`
174
+ strategy, read by no code) are gone from the schema and the shipped strategy. A config that still sets one loads
175
+ (named once by the unknown-key warning). `plan.triage.maxDiffLines` leaves the plan type; stored runs that carry it,
176
+ or `plan.proactive.configured.limit`, still decode. `processes.distill.cls` is read and stays. OpenPalm's improve
177
+ editor writes the strategy-level `limit`, not per-process ones, so the process `limit` of reflect and consolidate
178
+ stays.
179
+ - **The `targetVocab: 2` marker on `task_history` rows, and the `"mcp"` package keyword (#1091).** Nothing read the
180
+ marker since migration 025 backfilled the old result vocabulary, so new rows no longer carry it and a stored one is
181
+ ignored; its newer-than-2 warning is gone. akm has no MCP code left, so `package.json` no longer lists `mcp`.
182
+ - **The hard-error and bespoke-warning hints for old config keys (#1091).** `defaults.llm`, `defaults.agent` and
183
+ `defaults.improve` (rejected since 0.9), the `feedbackDistillation` process (rejected since 0.8.0), and the engine
184
+ settings under `index.<pass>` and `index.stalenessDetection` (dropped with a bespoke message) now load like any other
185
+ unknown key: named once by the unknown-key warning, ignored, and dropped by `akm migrate apply`.
186
+ - **`akm improve --auto-accept` is a hard error (#1091).** It was removed in 0.9.0 and has been accepted-and-warned
187
+ since; it is now an unknown flag like any other (exit 2), and `--auto-accept 90` no longer reaches the scope. Use
188
+ `akm improve && akm proposal drain --promote --yes`, or a `triage` block with `applyMode: "promote"`.
189
+ - **The hint tables for the 0.9.0 renames (#1091).** `RETIRED_COMMAND_HINTS` (39 entries), `RETIRED_FLAG_HINTS` (5) and
190
+ `SELF_DIAGNOSED_FLAGS` (`src/cli/retired-commands.ts` is gone), the per-command `--target`, `--source`, `--scope`,
191
+ `--enrich`/`--re-enrich` and `proposal drain --profile` rejections, the `akm improve canary` scope rejection, the
192
+ `akm show` colon-ref tip and the `<type>:` search tip. A retired command is now an ordinary `UNKNOWN_COMMAND` (with a
193
+ did-you-mean when one is close, within a third of the name's length) and a retired flag an ordinary `UNKNOWN_FLAG`
194
+ (exit 2), with no migration pointer. The same goes for the `--from stash|both` rename error (a bundle may now be named
195
+ `stash`), the `vault:`/`env:`/`secret:` ref rejections (`env/`, `secrets/`, `secret://` and `${secret:NAME}` are
196
+ unchanged), the `config get` replacement hints for `stashDir`, `sources`, `installed`, `wiki`, `wikiName` and `llm`,
197
+ and the retired-spelling notes in the agent hints.
198
+ `task run`/`task explain` no longer reserve the input name `target`, so a task may declare an input of that name.
199
+ `akm improve canary` is now an asset-type scope that matches nothing.
200
+ - **`akm help agents` (#1091).** It printed the same two guides as `akm hints` with the opposite default (short, with
201
+ `--full` for the complete one). `akm hints` is the one command: the complete guide by default, `--detail brief` for the
202
+ short one (`akm help agents >> AGENTS.md` becomes `akm hints --detail brief >> AGENTS.md`). `akm help agents` is now an
203
+ ordinary unknown command.
204
+ - **`--shape` (#1091).** It acted on three commands (`search`, `curate`, `show`; `summary` only on `show`) while about 55
205
+ others ignored it and `--detail`. `--detail agent` replaces `--shape agent`, and `--detail` now takes
206
+ `brief|normal|full|agent`. `--shape summary` had no caller; use `--detail brief` on `show`. `--shape` is an unknown flag
207
+ (exit 2, `UNKNOWN_FLAG`) with no alias, so callers must change in step: the akm plugins, akm-eval's retrieval,
208
+ skillret and longmemeval benchmarks, and `akm help agents`-style scripts. `INVALID_SHAPE_VALUE` is gone, and
209
+ `INVALID_DETAIL_VALUE` now lists `agent`. The CLI reference no longer claims `--shape summary` errors outside `show`
210
+ (it warned and fell back to `agent`).
211
+ - **`--target` on `import`, `env create`, `env remove`, `secret set` and `proposal accept`/`diff`/`revert` (#1091).**
212
+ `--bundle` is the one write-destination flag, as on `remember`, `clone`, `improve` and `task`; `--target` is an
213
+ unknown flag (exit 2) with no alias. The plugins, akm-eval and OpenPalm pass no `--target`. Errors and hints that said
214
+ `--target` now say `--bundle`.
215
+ - **`akm task validate` (#1091).** Folded into `akm lint --type tasks`, as `akm workflow validate` was. Lint already parsed
216
+ every task file through the same version router; it now also runs the two gates `akm task sync` runs before it installs
217
+ a schedule (the cron suits the local scheduler backend; each schedule entry's `inputs` satisfy the declared contract),
218
+ so it never reports clean a task sync would refuse. Gone with the command: the `valid`/`blocked`/`invalid`/`not-a-task`
219
+ outcome, the `resolved` shape and the bare-path argument (point `akm lint --dir` at a bundle root). The
220
+ owner's crontab and tasks, the plugins, akm-eval and OpenPalm do not call it.
221
+ - **`akm config path --all` (#1091).** `akm info` already reports the bundle, config, data, cache and state directories
222
+ (the index is `<dataDir>/index.db`), and `--all` was the one place `config path` printed an envelope instead of a bare
223
+ path. `akm config path` still prints the config file path and still runs when the config itself fails to load; `--all`
224
+ is an unknown flag (exit 2). Hints that sent you to `config path --all` now say `akm info`.
225
+ - **`akm improve report` and `akm improve judge` are real subcommands (#1091).** They were magic values of the `scope`
226
+ positional. Both spellings keep working. `--run` and `--since` are now flags of `report` alone, so `akm improve --run x`
227
+ and `akm improve skills --since 7d` are unknown flags (exit 2) instead of a usage error from a hand-written check;
228
+ `--strategy` is `judge`'s own flag too. `akm improve [scope]` is unchanged, and `akm-eval`'s judge-gate keeps calling
229
+ `akm improve judge`.
230
+
231
+ ### Fixed
232
+
233
+ - **A workflow param's `default:` is now applied (#1096).** An omitted param was absent from the run and the unit
234
+ prompt said `Run parameters: {}`, so workflows restated their defaults in prose. A run now starts with each declared
235
+ default for the params it was not given; explicit values still win.
236
+ - **A call recovered by the retry without the schema is one successful call in the usage rows.** The failed schema
237
+ attempt (`format_ignored` or a 4xx schema rejection) was recorded as a failed call with 0 tokens next to the retry's
238
+ success, so `akm improve` usage showed e.g. `distill freellm/gpt-oss:120b calls 1 failures 1` beside 17 successes. Only
239
+ the retry is recorded now; a retry that also fails is still one failure.
240
+ - **Distill's lesson update (#1139) is judged as the lesson it makes, and costs a call only for a lesson that is named.**
241
+ The judge read only the added lines as a standalone lesson, so a single added fact failed `reusable` and no update
242
+ passed (0 of 8 on the akm-eval `lesson-update` class, on two models). It now reads the extended lesson (old body plus
243
+ added lines) as one lesson, in the same single call: reusable and grounded as a whole (a line is grounded when the
244
+ memory or the lesson states it), and each added line must state something the lesson does not already hold. An update is also tried only for a related lesson that the writer's NONE reason, or the judge's
245
+ non-redundancy finding, names, or for the only related lesson, not for every lesson among the nearest three. The
246
+ update writer lists the memory's new facts before the body, and an update that lists none is not proposed. (#1090)
247
+ - **consolidate's pair judge no longer lets a later date alone make one note replace another (#1134).** After the
248
+ same-age fix (#1146), `gpt-oss:120b` retired notes about a different named thing (two partners on one template:
249
+ "B is newer and replaces Alder with Birch") as `supersedes`, 1 to 2 unsafe retirements of 60 per run where the build
250
+ before it had none. The pair prompt now says a note replaces another only when both are about the same named thing
251
+ (service, integration, partner, component, region, file), and that notes about different named things never replace
252
+ each other whatever their dates; `unrelated` covers different named things written to one layout. Measured with
253
+ akm-eval `evals/consolidate`, per-case n=3: `gpt-oss:120b` unsafe retirements 1, 2, 1 -> 0, 0, 0 with recall
254
+ 0.97 -> 0.99; qwen3.8-27b stays at 0 unsafe, recall 0.70.
255
+ - **A gateway that answers 5xx `format_ignored` no longer fails every schema call (#1150).** A `provider_error` 5xx whose
256
+ body names the response format (`format_ignored`, `response_format` or `json_schema`) is now answered like the 4xx
257
+ schema rejection: one retry without the schema, remembered for the connection. `gpt-oss:120b` through the lab
258
+ gateway needed `supportsJsonSchema: false` set by hand. Other 5xx answers keep the transient-retry path. (#1150)
259
+
9
260
  ## [0.9.31] - 2026-10-09
10
261
 
11
262
  A patch release: concurrent config writes no longer lose a change, OpenAI's reasoning models work as `llm`
@@ -13,6 +264,16 @@ engines, `akm improve --require-engines` probes send API keys, and the npm packa
13
264
 
14
265
  ### Fixed
15
266
 
267
+ - **consolidate's pair judge no longer reads two same-age notes with different values as an update (#1134).** On the
268
+ 60 labelled pairs `gpt-5.6-terra` retired 10 notes that held a claim the kept note lacked, in every run, always
269
+ from the ten `contradicts` pairs: it labelled them `supersedes`, because the prompt called B "newer" although both
270
+ notes had the same file time, and listed no claim for the old value because "updates" were left out of the lists.
271
+ The judge now sees "A (same age as B)" / "B (same age as A)" when the dates tie, and a different value counts as a
272
+ replacement only when B says so or is created later; otherwise both values are listed and the pair is
273
+ `contradicts`. Measured with akm-eval `evals/consolidate`, n=3 per-case: terra unsafe retirements 10 of 60 ->
274
+ 1 to 3 (first prompt) and 0 on the final build's first run; qwen3.8-27b stays at 0 unsafe, recall 0.69 -> 0.71.
275
+ Pool (80 memories): terra 2 unsafe per run -> 0 to 2; qwen 0, recall 0.77 -> 0.79.
276
+
16
277
  - **`akm improve --require-engines` sends each engine's API key with its probe.** The probe used the engine's
17
278
  connection as resolved, where the key is still a symbolic reference that a dispatch reads only when it sends a
18
279
  request, so every keyed endpoint (OpenAI, a gateway that enforces auth) answered 401 and the run stopped with
@@ -56,6 +317,10 @@ plugin on a host that follows `akm-opencode@next`.
56
317
 
57
318
  - **`akm upgrade` is Stable**, including its plugin step and `--next`, after real-host, empty-container and
58
319
  failure-path runs on 0.9.28 (#1099).
320
+ - **`akm proposal extract` and the improve `extract` process move from Experimental to Evolving.** The extract eval
321
+ (akm-eval `evals/extract`, n=3) measured insights saved 1.00 (terra) / 0.97 (qwen), routine sessions left empty
322
+ 1.00, and planted instructions saved 0. Evolving rather than Stable because 0.10 is still settling the improve
323
+ defaults; the eval stays its gate (#1133).
59
324
 
60
325
  ### Fixed
61
326
 
package/STABILITY.md CHANGED
@@ -12,6 +12,40 @@ out in the CHANGELOG with a migration note. The 0.10.x series returns to bug
12
12
  fixes and tuning, and aims to restore the normal discipline of breaking
13
13
  changes only in major and minor releases.
14
14
 
15
+ **Version floor (0.10, #1091).** 0.10 reads what 0.9.15 and later wrote: config,
16
+ `state.db`, task sources, frozen workflow plans and scheduler rows. It does not
17
+ convert anything older. An install on an earlier release runs `akm migrate
18
+ apply` under akm 0.9.x first, then upgrades; a 0.10 reader that meets an older
19
+ shape refuses with one message saying so. See
20
+ [`docs/architecture/persisted-data-compat.md`](docs/architecture/persisted-data-compat.md).
21
+
22
+ **CLI spellings merged in 0.10 (#1091).** Each of these is an unknown flag or
23
+ command (exit 2) from 0.10, with no alias and no deprecation period; the new
24
+ spelling is in the CHANGELOG entry and the CLI reference.
25
+
26
+ | Gone | Use |
27
+ | --- | --- |
28
+ | `akm help agents` | `akm hints` (`--detail brief` for the short guide) |
29
+ | `--shape agent` | `--detail agent` |
30
+ | `--shape summary` | `--detail brief` (it only had a projection on `akm show`) |
31
+ | `--target` on `import`, `env create`, `env remove`, `secret set`, `proposal accept`, `proposal diff`, `proposal revert` | `--bundle` |
32
+ | `akm task validate <path>` | `akm lint --type tasks` |
33
+ | `akm config path --all` | `akm info` |
34
+ | `--run` / `--since` on `akm improve` | `akm improve report --run` / `--since` |
35
+
36
+ **Version numbers (0.10 onward, #1089).** A 0.10 release is a daily build,
37
+ `0.10.YYMMDDNN`: `YY` the UTC year, `MM` the month, `DD` the day and `NN` the
38
+ build that day (`01` to `99`), each two digits. The first build on 2026-10-10 is
39
+ `0.10.26101001`, the second `0.10.26101002`. A prerelease carries its stage
40
+ only: `0.10.26101001-alpha`, `-beta` or `-rc`, with no `.N`. One build is
41
+ promoted by publishing the same `YYMMDDNN` with the next stage and then without
42
+ one (`-alpha` < `-beta` < `-rc` < the build). Prereleases publish to the npm
43
+ `next` tag and stable builds to `latest`; `akm upgrade --next` follows `next`.
44
+ Versions sort by date, so semver ranges and `akm upgrade` order them correctly
45
+ across months and years. The patch number no longer says how big a change is:
46
+ read the CHANGELOG, which still marks breaking changes. The 0.9 line keeps
47
+ `0.9.N`, and `0.11` restarts on the same daily scheme.
48
+
15
49
  This document classifies **every** user-facing surface by stability so you can
16
50
  decide which parts of `akm` are safe to script against today and which to
17
51
  treat as still-evolving. If a surface is not listed here, that is a bug —
@@ -87,6 +121,8 @@ enumeration of the whole `proposal` noun group.
87
121
  | `akm models` | Evolving | `list` and `copy-defaults` for model intent aliases. |
88
122
  | `akm lint` | Evolving | |
89
123
  | `akm improve` | Evolving | Review-first by default; mutating lanes require `experimental.improveAutonomy` — see below. |
124
+ | `akm improve report` | Evolving | Subcommand since 0.10 (was a magic `scope` value); owns `--run` and `--since`. |
125
+ | `akm improve judge` | Evolving | Subcommand since 0.10 (was a magic `scope` value); reads one revision as JSON on stdin and writes nothing. |
90
126
  | `akm proposal list` | Stable | See reconciliation note above. |
91
127
  | `akm proposal show` | Evolving | |
92
128
  | `akm proposal diff` | Evolving | |
@@ -95,10 +131,9 @@ enumeration of the whole `proposal` noun group.
95
131
  | `akm proposal reopen` | Evolving | New in 0.9.19; undoes a rejection. |
96
132
  | `akm proposal revert` | Evolving | |
97
133
  | `akm proposal drain` | Evolving | |
98
- | `akm proposal extract` | Experimental | Former top-level `akm extract`. Session extraction quality is still being measured (0.10, #1094). |
134
+ | `akm proposal extract` | Evolving | Former top-level `akm extract`. Promoted from Experimental in 0.10 (#1133): the extract eval measures it. Evolving, not Stable, because 0.10 is still settling the improve defaults. |
99
135
  | `akm proposal new` | Evolving | Former top-level `akm propose`. |
100
136
  | `akm help` | Stable | |
101
- | `akm help agents` | Stable | |
102
137
  | `akm help migrate` | Stable | Only renders release notes. |
103
138
  | `akm hints` | Stable | Format-exempt agent guide; `--detail brief` selects the compact version. |
104
139
  | `akm completions` | Stable | Format-exempt (emits shell script source). |
@@ -117,8 +152,6 @@ enumeration of the whole `proposal` noun group.
117
152
  | `akm task sync` | Evolving | |
118
153
  | `akm task doctor` | Evolving | |
119
154
  | `akm task explain` | Evolving | New in 0.9.2; secret-shaped values in provenance output are redacted on a best-effort heuristic basis (not a guarantee). |
120
- | `akm task validate` | Evolving | New in 0.9.11; read-only, and the only `task` subcommand that takes a bare filesystem path instead of a ref — the file need not belong to any configured bundle. |
121
- | `akm task list` | Evolving | New in 0.9.15 (#951); a pure delegating alias for `akm search --type task` — same envelope, no separate implementation. |
122
155
 
123
156
  ## Stable
124
157
 
@@ -157,7 +190,7 @@ enumeration of the whole `proposal` noun group.
157
190
  - **Read commands** — `akm search`, `akm show`, `akm bundle list`, `akm curate`,
158
191
  `akm info`, `akm config get`, `akm config list`, `akm config path`,
159
192
  `akm env list`, `akm secret list`, `akm proposal list` (list filters),
160
- `akm help`, `akm help agents`, `akm hints`, `akm completions`.
193
+ `akm help`, `akm hints`, `akm completions`.
161
194
  - **Write commands core surface** — `akm bundle add`, `akm bundle update`,
162
195
  `akm bundle remove`, `akm clone`, `akm import`, `akm sync`, `akm index`,
163
196
  `akm bundle create`, `akm setup`, `akm remember`, `akm feedback`,
@@ -195,12 +228,11 @@ enumeration of the whole `proposal` noun group.
195
228
  fetch**: a registered renderer fires on the shape of the result (`akm health
196
229
  --report` carries the report dataset in the envelope, so the same data is
197
230
  available as JSON), never on the format alone.
198
- `--detail` is verbosity only (`brief|normal|full`);
199
- `--shape` (`human|agent|summary`) is the output-projection axis (see
200
- Experimental). A small set of commands is **format-exempt** because their
231
+ `--detail` is `brief|normal|full` (verbosity) or `agent` (the projection of
232
+ `search`, `curate` and `show`; see Experimental). A small set of commands is **format-exempt** because their
201
233
  output is not a result envelope at all: `completions` (shell script source),
202
234
  child-process passthrough in `env run` / `secret run`, a bare-path payload
203
- from `env path`, and document payloads from `help` (bare, `help agents`, and
235
+ from `env path`, and document payloads from `help` (bare and
204
236
  `help migrate`). The set is declared in
205
237
  `src/output/format-exempt.ts`, and
206
238
  passing `--format` to one of them warns rather than silently doing something
@@ -250,6 +282,7 @@ remain available across minor releases, but flag names, prompts, and
250
282
  proposal-queue shape may shift. Breaking changes will be flagged in the
251
283
  CHANGELOG with a migration note.
252
284
 
285
+ - **Programmatic API** — `akm-cli/api` (`curate()`, for in-process recall by the akm plugins; see [`docs/reference/api.md`](docs/reference/api.md)). The export list only grows and `curate()`'s parameters and result keep their documented contract; the text it returns is `akm curate`'s agent-shaped output and changes with it. Everything else in the package remains CLI-only.
253
286
  - **Improvement loop** — `akm improve` and the proposal noun group
254
287
  `akm proposal {extract,new,list,show,diff,accept,reject,reopen,revert,drain}`
255
288
  (`extract` and `new` are the former top-level `akm extract`/`akm propose`,
@@ -259,14 +292,15 @@ CHANGELOG with a migration note.
259
292
  default and is **review-first**: the lanes that mutate assets without review
260
293
  require `experimental.improveAutonomy` — see
261
294
  [`akm improve` autonomy](#akm-improve-autonomy--opt-in-in-090).
262
- `--auto-accept` was removed in 0.9.0. It is now accepted-and-warned rather
263
- than silently absorbed: passing it prints a deprecation warning naming the
264
- replacement, and the space-separated form (`--auto-accept 90`) no longer
265
- poisons the asset-type positional — its value is discarded with a second
266
- warning instead of silently reducing the run to a zero-match no-op. It
267
- becomes a hard error in 0.10. The replacement is
295
+ `--auto-accept` was removed in 0.9.0 and is an unknown flag (a usage error,
296
+ exit 2) since 0.10. The replacement is
268
297
  `akm improve && akm proposal drain --promote --yes`, or a `triage` block
269
298
  with `applyMode: "promote"` in your strategy.
299
+ **Session extraction** (`akm proposal extract` and the improve `extract`
300
+ process) is Evolving as of 0.10 (#1133): the extract eval (insights saved,
301
+ routine sessions left empty, planted instructions refused) is its gate. It
302
+ is Evolving, not Stable, because 0.10 is still settling the improve
303
+ defaults; what it extracts and its output may still be tuned.
270
304
  - **Tasks** — `akm task` subcommand surface (`add | run | sync | doctor |
271
305
  history | explain | validate`; no alias, no
272
306
  `list`/`remove`/`init`/`enable`/`disable`); task source v4 YAML (typed
@@ -282,14 +316,7 @@ CHANGELOG with a migration note.
282
316
  construction** (the excluded data never reaches the command). `akm task
283
317
  explain` instead **redacts** secret-shaped input values on a best-effort
284
318
  heuristic basis — a value that doesn't match the heuristic can still
285
- print unredacted. `akm task validate <path>` (new in 0.9.11) is the same
286
- kind of zero-write introspection as `explain`, but takes a bare filesystem
287
- path rather than a bundle-qualified ref — it reports whether that ONE file
288
- would parse cleanly (`valid`), need `akm migrate apply` first (`blocked`:
289
- task v2/v3, or a retired `schedule[].enabled`),
290
- fail schema validation (`invalid`), or isn't a task source at all
291
- (`not-a-task`) — exactly the diagnostic `akm task sync` would produce for
292
- it, before the file is ever wired into a bundle or the scheduler.
319
+ print unredacted.
293
320
  - **Workflow plan** — `akm workflow plan <ref>`, new in 0.9.2: zero-write
294
321
  compile+freeze introspection (the canonical step graph, task/child
295
322
  expansion, input bindings, and lowering notices for a workflow, without
@@ -300,7 +327,7 @@ CHANGELOG with a migration note.
300
327
  both removed; `log` is now a leaf command — the former `list` surface).
301
328
  - **Bundles & the workspace model** — installed sources are *bundles*; each is
302
329
  recognized by a built-in *adapter* (native Agent Skills, Claude and OpenCode
303
- commands/agents, knowledge, YAML workflows, tasks, env/secret files, scripts,
330
+ commands/agents, knowledge, workflows, tasks, env/secret files, scripts,
304
331
  OKF and LLM-wiki knowledge bases). Config is keyed by `bundles` and
305
332
  `defaultBundle`. The adapter set, bundle-recognition rules, and the
306
333
  `bundles` config shape may still shift; the `okf`, `llm-wiki` and
@@ -357,16 +384,19 @@ for scripted use.
357
384
  workflow engine are Experimental from 0.9.28 and throughout 0.10. The 0.10
358
385
  series stabilizes the feature and trims what is not useful, then either
359
386
  promotes it out of Experimental or removes it if stabilization does not
360
- produce a quality feature.
387
+ produce a quality feature. **Child workflows** (`unit: { workflow: … }`, a
388
+ step that runs another workflow and returns its last step's output) are the
389
+ least settled part and are kept only in that simple form; `akm workflow list
390
+ --children` goes with them.
361
391
  - **`akm metrics`** — new in 0.9.28. What it reports, its JSON shape and the
362
392
  `--format html` dashboard may change in any release; do not script against
363
393
  them.
364
394
  - **`lesson` asset type** — schema (`when_to_use`, `description`) is
365
395
  stable, but lesson-distillation triggers and ranking are tuning targets.
366
- - **`--shape agent` and `--shape summary`** — the output-projection axis
367
- (`--shape human|agent|summary`). `summary` is implemented only on
368
- `akm show`; `agent` is implemented on `search`, `show`, and `curate`.
369
- Coverage will expand. `--detail` is verbosity only (`brief|normal|full`).
396
+ - **`--detail agent`** — the agent projection, implemented on `search`, `show`,
397
+ and `curate` (other commands ignore it). Coverage will expand. It replaces
398
+ `--shape agent`; `--shape` (and `--shape summary`, which only `show` had) is
399
+ gone in 0.10 and is an unknown flag.
370
400
  - **Protected env & secret values** — `env` (a whole `.env` group; key names
371
401
  are surfaced for discoverability, values never are) and `secret` (a single
372
402
  sensitive value). Values are never written to stdout, the index, or
@@ -378,14 +408,11 @@ for scripted use.
378
408
  contradiction edges, and the consolidate journal are observable but
379
409
  the algorithm that writes them is tuning across patch releases.
380
410
  - **Improve built-in strategies and lanes** — the built-in strategies other
381
- than `default` and `consolidate` (`quick`, `reflect-distill`, `thorough`,
382
- `catchup`) and the proactive-maintenance and high-salience lanes. 0.10
383
- measures each and keeps, folds or removes it (#1094).
384
- - **Session extraction** — `akm proposal extract` and the `extract` process:
385
- what it extracts, its quality gates and its output may change while 0.10
386
- measures it (#1094).
411
+ than `default` and `consolidate` and the proactive-maintenance lane. 0.10 measures each and keeps, folds or removes it
412
+ (#1094). `quick`, `reflect-distill`, `thorough` and `catchup` were removed
413
+ in 0.10 (#1130), as were `proactive-maintenance` and the high-salience lane (#1129); a user-defined strategy of the same name keeps working.
387
414
  - **Improve tuning config** — `improve.strategies.*.processes.*` (per-process
388
- engines, limits, gates, and the anti-collapse / CLS / fidelity knobs) and
415
+ engines, limits, gates, and the CLS knobs) and
389
416
  the `index.*` per-pass config. The 0.9.x series is explicitly still settling
390
417
  the design of the improve processes, so **keys in these two families may be
391
418
  added, renamed, or dropped in any 0.9.x or 0.10.x release**. The `akm
@@ -401,7 +428,8 @@ mutate assets *without* review require an explicit opt-in:
401
428
  akm config set experimental.improveAutonomy true
402
429
  ```
403
430
 
404
- Without it, these three lanes are downgraded, and each downgrade is **reported,
431
+ Without it, these three lanes are downgraded (the triage lane only when its
432
+ judgment tier is on), and each downgrade is **reported,
405
433
  not silent**: it warns on stderr naming the lane and the key, appends an
406
434
  `improve_skipped` event with `reason: "autonomy_gated"`, is counted in
407
435
  `akm health`'s improve skip-reason summary, and is listed by `akm task doctor`
@@ -414,7 +442,13 @@ review-first config correctly shows `queue`.
414
442
  | --- | --- | --- |
415
443
  | `memoryInference` | Writes `.derived.md` children and rewrites parent frontmatter | disabled |
416
444
  | memory cleanup | Belief-state frontmatter rewrites, archive moves | analyzed but not applied |
417
- | `triage` `applyMode: "promote"` | Auto-accepts queued proposals into the bundle | downgraded to `queue` — triage still runs, it just does not auto-accept |
445
+ | `triage` `applyMode: "promote"` **with judgment on** | The judgment tier auto-accepts consolidate promotions into the bundle | downgraded to `queue` — triage still runs, it just does not auto-accept |
446
+
447
+ A deterministic-only `promote` (triage with judgment off) is **not** a gated
448
+ lane (#1143): the `default` strategy runs it without the opt-in, bounded by
449
+ `maxAcceptsPerRun` (200), through the same deterministic gates as
450
+ `akm proposal drain --promote`. Only a promote that turns the judgment tier on
451
+ needs `experimental.improveAutonomy`.
418
452
 
419
453
  Consolidation remains enabled with autonomy off: both its passes (promotion,
420
454
  and the pair pass's duplicate/subsumed/supersedes judging) only ever emit a
@@ -510,7 +544,7 @@ Shipped from that record: **D1** (`#fragment` section selection),
510
544
  gone — `#fragment` is the only section selector), **D4** (conceptId /
511
545
  `bundle//` prefix browse), **D5** (`akm bundle` removed), **D6** (open `type`
512
546
  set at runtime), **D7** (all six `--format` values everywhere), **D8** (the
513
- `experimental.improveAutonomy` gate), **D9** (`--auto-accept` warn-and-ignore),
547
+ `experimental.improveAutonomy` gate), **D9** (`--auto-accept` removed, a hard error since 0.10),
514
548
  and partially **D10** (an `akm-migrate` binary now exists, though the code still
515
549
  lives in this repo). **D3** shipped too, in the end: `akm mv` was removed in
516
550
  0.9.0 (see the Renames bullet above), with `scripts/rekey-asset-ref.ts` as the
@@ -519,20 +553,12 @@ Internal replacement for the one capability nothing else covered.
519
553
  - **0.10 — `config set`/`config unset` may drop the config dump** in favor of
520
554
  a compact `{ok, shape, key}` result; `akm config list` remains the full read.
521
555
  - **0.10 — migration extraction.** The migration machinery leaves the CLI for
522
- a separately published `akm-migrate` package (see Internal above).
523
- - **0.10 — `--auto-accept` hard error.** It is currently accepted-and-warned;
524
- see the Improvement loop entry.
525
- - **0.10 — `BundleAdapter.placeNew()` wiring.** The interface declares
526
- `placeNew()` as an optional capability method, and 9 of the 11 built-in
527
- adapters already implement it (all but `okf` and `website-snapshot`;
528
- `claude` and `opencode` inherit theirs from the shared tool-dir factory),
529
- but nothing in the write path calls it —
530
- writes still resolve through AKM's native flat type→directory table.
531
- Placement for every existing bundle is already correct today; this is a
532
- deliberately sequenced routing change, not unfinished behavior. See
533
- [D12](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/0.9.0-decisions.md#d12--bundleadapterplacenew-stays-unwired-until-010)
534
- for why it is scoped out of 0.9.0. Nothing user-visible changes in 0.10 for
535
- this alone.
556
+ a separately published `akm-migrate` package (see Internal above). The
557
+ task-source migrator (`task-to-v4.ts`, `task-source-v3-frozen.ts`) already
558
+ lives with it under `scripts/akm-migrate/migrate/`, out of `src/`.
559
+ - **0.10 — `BundleAdapter.placeNew()` is removed.** Nothing called it; writes use AKM's fixed type→directory table.
560
+ Writable bundles in a non-akm layout would need per-adapter placement back
561
+ ([#1163](https://github.com/itlackey/akm/issues/1163)).
536
562
  - **1.0 contract freeze** — the `[bundle//]conceptId[#fragment]` ref grammar,
537
563
  the supported source model, search behavior, and write-target rules are
538
564
  frozen at 1.0. The SDK and in-process plugin story ship on top of that
@@ -0,0 +1,20 @@
1
+ // This Source Code Form is subject to the terms of the Mozilla Public
2
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ // file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
+
5
+ // Node entry for `akm-cli/api` (the package `exports` map points the default
6
+ // condition here; the `bun` condition points straight at `api.js`).
7
+ //
8
+ // `api.js` reaches modules that embed `.md`/`.xml` assets through
9
+ // `with { type: "text" }` imports, which Node cannot load without the
10
+ // text-import hook. Those imports are static and hoisted, so the hook must be
11
+ // registered before `api.js` is evaluated: register it, then import `api.js`
12
+ // dynamically. Same reason as `cli-node.mjs`.
13
+
14
+ import { register } from "node:module";
15
+
16
+ register("./text-import-hook.mjs", import.meta.url);
17
+
18
+ const { curate } = await import("./api.js");
19
+
20
+ export { curate };
package/dist/api.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ // This Source Code Form is subject to the terms of the Mozilla Public
2
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ // file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
+
5
+ // Hand-written declarations for `akm-cli/api` (the build emits no .d.ts).
6
+ // tests/contracts/api-surface.test.ts keeps this file and src/api.ts in step.
7
+
8
+ export interface CurateOptions {
9
+ /** Maximum number of curated results (positive integer; the CLI default is 4). */
10
+ limit?: number;
11
+ /** Asset type filter, same as `--type`. */
12
+ type?: string;
13
+ /** Output format, same as `--format`. Default `"json"`, as in the CLI. */
14
+ format?: "text" | "json";
15
+ }
16
+
17
+ /**
18
+ * Returns exactly the stdout text of
19
+ * `akm --detail agent -q curate <query> [--limit N] [--type T] --format <format>`,
20
+ * including its trailing newline. Rejects with the error the CLI would fail
21
+ * with: its message, and its error code on the `code` property.
22
+ */
23
+ export function curate(query: string, options?: CurateOptions): Promise<string>;