akm-cli 0.9.31 → 0.10.261001-beta

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 (270) hide show
  1. package/CHANGELOG.md +409 -0
  2. package/STABILITY.md +99 -57
  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 +15 -29
  7. package/dist/assets/hints/cli-hints-short.md +2 -2
  8. package/dist/assets/improve-strategies/default.json +3 -3
  9. package/dist/assets/prompts/consolidate-pair.md +9 -7
  10. package/dist/assets/stash-skeleton/README.md +1 -1
  11. package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
  12. package/dist/cli/shared.js +31 -48
  13. package/dist/cli/unknown-flags.js +6 -43
  14. package/dist/cli.js +8 -34
  15. package/dist/commands/agent/contribute-cli.js +1 -1
  16. package/dist/commands/completions.js +1 -2
  17. package/dist/commands/config-cli.js +5 -28
  18. package/dist/commands/env/env-cli.js +5 -5
  19. package/dist/commands/env/secret-cli.js +2 -2
  20. package/dist/commands/feedback-cli.js +75 -49
  21. package/dist/commands/health/checks.js +41 -16
  22. package/dist/commands/health/plugin-staleness.js +52 -22
  23. package/dist/commands/improve/autonomy-gate.js +5 -3
  24. package/dist/commands/improve/consolidate/chunking.js +3 -10
  25. package/dist/commands/improve/consolidate/continuity-check.js +4 -4
  26. package/dist/commands/improve/consolidate/pair-pass.js +29 -10
  27. package/dist/commands/improve/consolidate.js +10 -65
  28. package/dist/commands/improve/distill/lesson-update.js +91 -0
  29. package/dist/commands/improve/distill-guards.js +1 -43
  30. package/dist/commands/improve/distill.js +148 -21
  31. package/dist/commands/improve/eligibility.js +14 -1
  32. package/dist/commands/improve/extract-cli.js +1 -1
  33. package/dist/commands/improve/extract-prompt.js +17 -7
  34. package/dist/commands/improve/extract.js +5 -7
  35. package/dist/commands/improve/improve-cli.js +92 -106
  36. package/dist/commands/improve/improve-strategies.js +8 -12
  37. package/dist/commands/improve/improve.js +134 -52
  38. package/dist/commands/improve/loop-stages.js +18 -5
  39. package/dist/commands/improve/planner.js +0 -1
  40. package/dist/commands/improve/preparation.js +40 -99
  41. package/dist/commands/improve/proactive-maintenance.js +2 -2
  42. package/dist/commands/improve/reflect-noise.js +3 -55
  43. package/dist/commands/improve/reflect.js +29 -34
  44. package/dist/commands/improve/retrieval-queries.js +37 -0
  45. package/dist/commands/improve/retrieval-scope.js +2 -2
  46. package/dist/commands/improve/salience.js +2 -9
  47. package/dist/commands/improve/session-asset.js +4 -1
  48. package/dist/commands/improve/stage.js +23 -12
  49. package/dist/commands/lint/index.js +5 -20
  50. package/dist/commands/observability-cli.js +3 -9
  51. package/dist/commands/proposal/drain.js +43 -6
  52. package/dist/commands/proposal/proposal-cli.js +11 -31
  53. package/dist/commands/proposal/repository.js +20 -14
  54. package/dist/commands/proposal/validators/proposal-quality-validators.js +0 -3
  55. package/dist/commands/read/knowledge.js +3 -3
  56. package/dist/commands/read/remember-cli.js +0 -13
  57. package/dist/commands/read/search-cli.js +29 -97
  58. package/dist/commands/read/search.js +0 -11
  59. package/dist/commands/read/show.js +0 -19
  60. package/dist/commands/sources/plugin-upgrade.js +164 -101
  61. package/dist/commands/sources/sources-cli.js +1 -15
  62. package/dist/commands/sources/stash-cli.js +6 -14
  63. package/dist/commands/tasks/tasks-cli.js +4 -115
  64. package/dist/commands/workflow/plan.js +11 -33
  65. package/dist/commands/workflow-cli.js +2 -7
  66. package/dist/core/adapter/adapter-ids.js +1 -2
  67. package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
  68. package/dist/core/adapter/adapters/akm-adapter.js +9 -48
  69. package/dist/core/adapter/adapters/akm-lint.js +10 -26
  70. package/dist/core/adapter/adapters/akm-metadata.js +2 -72
  71. package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
  72. package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
  73. package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
  74. package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
  75. package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
  76. package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
  77. package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
  78. package/dist/core/adapter/recognize-match.js +3 -4
  79. package/dist/core/common.js +18 -2
  80. package/dist/core/config/config-schema.js +12 -15
  81. package/dist/core/config/config-types.js +6 -15
  82. package/dist/core/config/config-walker.js +6 -23
  83. package/dist/core/config/config.js +17 -80
  84. package/dist/core/config/engine-semantics.js +7 -3
  85. package/dist/core/config/schema/engines.js +7 -7
  86. package/dist/core/config/schema/improve-processes.js +10 -63
  87. package/dist/core/config/schema/improve.js +2 -21
  88. package/dist/core/config/schema/index-config.js +6 -39
  89. package/dist/core/env-secret-ref.js +2 -45
  90. package/dist/core/errors.js +1 -2
  91. package/dist/core/extra-params.js +2 -86
  92. package/dist/core/file-lock.js +2 -6
  93. package/dist/core/improve-result.js +13 -1
  94. package/dist/core/mutation-target.js +2 -2
  95. package/dist/core/paths.js +4 -0
  96. package/dist/core/recognition-util.js +4 -5
  97. package/dist/core/run-lock.js +1 -1
  98. package/dist/core/subprocess.js +49 -0
  99. package/dist/core/warn.js +21 -4
  100. package/dist/core/write-source.js +3 -3
  101. package/dist/execution/target-ref.js +1 -2
  102. package/dist/indexer/indexer.js +15 -6
  103. package/dist/indexer/passes/memory-inference.js +15 -6
  104. package/dist/indexer/search/db-search.js +49 -36
  105. package/dist/indexer/search/fts-query.js +0 -19
  106. package/dist/indexer/search/ranking.js +29 -1
  107. package/dist/indexer/usage/usage-events.js +21 -16
  108. package/dist/integrations/agent/engine-resolution.js +5 -2
  109. package/dist/integrations/agent/index.js +1 -1
  110. package/dist/integrations/agent/profiles.js +41 -98
  111. package/dist/integrations/agent/request-lowering.js +3 -3
  112. package/dist/integrations/harnesses/aider/index.js +5 -0
  113. package/dist/integrations/harnesses/amazonq/index.js +1 -0
  114. package/dist/integrations/harnesses/claude/config-import.js +2 -3
  115. package/dist/integrations/harnesses/claude/index.js +5 -0
  116. package/dist/integrations/harnesses/codex/index.js +1 -0
  117. package/dist/integrations/harnesses/copilot/index.js +1 -0
  118. package/dist/integrations/harnesses/gemini/index.js +1 -0
  119. package/dist/integrations/harnesses/index.js +18 -39
  120. package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
  121. package/dist/integrations/harnesses/opencode/config-import.js +121 -52
  122. package/dist/integrations/harnesses/opencode/index.js +22 -0
  123. package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
  124. package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
  125. package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
  126. package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
  127. package/dist/integrations/harnesses/opencode/session-log.js +104 -115
  128. package/dist/integrations/harnesses/opencode/version.js +98 -0
  129. package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
  130. package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
  131. package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
  132. package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +254 -0
  133. package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
  134. package/dist/integrations/harnesses/openhands/index.js +1 -0
  135. package/dist/integrations/harnesses/pi/index.js +1 -0
  136. package/dist/integrations/harnesses/shared.js +2 -0
  137. package/dist/integrations/harnesses/types.js +2 -0
  138. package/dist/llm/client.js +41 -11
  139. package/dist/output/cli-hints.js +1 -1
  140. package/dist/output/context.js +10 -19
  141. package/dist/output/format-exempt.js +5 -8
  142. package/dist/output/shapes/helpers.js +1 -22
  143. package/dist/output/shapes/passthrough.js +0 -1
  144. package/dist/output/shapes.js +3 -31
  145. package/dist/output/stdout.js +5 -1
  146. package/dist/output/text/command-format.js +6 -1
  147. package/dist/output/text/workflow-format.js +4 -22
  148. package/dist/scripts/akm-migrate-node.js +15745 -16711
  149. package/dist/scripts/akm-migrate.js +16318 -17280
  150. package/dist/setup/detect.js +10 -4
  151. package/dist/setup/harness-config-import.js +5 -14
  152. package/dist/setup/setup.js +1 -1
  153. package/dist/setup/steps/tasks.js +12 -13
  154. package/dist/sources/providers/git-stash.js +94 -13
  155. package/dist/storage/repositories/index-utility-repository.js +2 -32
  156. package/dist/storage/repositories/index-vec-repository.js +4 -0
  157. package/dist/storage/repositories/task-history-repository.js +0 -5
  158. package/dist/storage/repositories/workflow-runs-repository.js +5 -15
  159. package/dist/tasks/embedded.js +2 -1
  160. package/dist/tasks/run/run-command-task.js +9 -1
  161. package/dist/tasks/run/run-workflow-task.js +4 -3
  162. package/dist/tasks/run/task-history.js +0 -2
  163. package/dist/tasks/run/task-log.js +38 -1
  164. package/dist/tasks/schedule-gates.js +39 -0
  165. package/dist/tasks/scheduler-binding.js +0 -16
  166. package/dist/tasks/scheduler-sync.js +3 -97
  167. package/dist/tasks/source/bounded-document.js +1 -1
  168. package/dist/tasks/source/task-source-v4.js +2 -12
  169. package/dist/tasks/task-run-reserved-flags.js +2 -31
  170. package/dist/workflows/authoring/authoring.js +6 -6
  171. package/dist/workflows/compile.js +8 -65
  172. package/dist/workflows/exec/child-workflow.js +22 -3
  173. package/dist/workflows/exec/native-executor.js +12 -147
  174. package/dist/workflows/exec/run-workflow.js +31 -103
  175. package/dist/workflows/exec/step-work.js +9 -178
  176. package/dist/workflows/exec/unit-dispatch.js +0 -10
  177. package/dist/workflows/freeze/environment.js +3 -44
  178. package/dist/workflows/freeze/freeze.js +8 -41
  179. package/dist/workflows/freeze/targets/child-workflow.js +27 -63
  180. package/dist/workflows/freeze/targets/command.js +2 -16
  181. package/dist/workflows/freeze/targets/shell.js +0 -2
  182. package/dist/workflows/freeze/task-bindings.js +2 -28
  183. package/dist/workflows/ir/params.js +12 -2
  184. package/dist/workflows/parser.js +82 -232
  185. package/dist/workflows/plan.js +1 -1
  186. package/dist/workflows/renderer.js +10 -19
  187. package/dist/workflows/runtime/run-plan.js +11 -53
  188. package/dist/workflows/runtime/runs.js +4 -27
  189. package/dist/workflows/source-files.js +12 -16
  190. package/dist/workflows/source-semantics.js +1 -93
  191. package/docs/README.md +1 -1
  192. package/docs/agents/README.md +3 -3
  193. package/docs/agents/agent-install.md +1 -1
  194. package/docs/architecture/0.10-process-rules.md +827 -0
  195. package/docs/architecture/adapters.md +17 -31
  196. package/docs/architecture/architecture.md +4 -5
  197. package/docs/architecture/improvement.md +115 -76
  198. package/docs/architecture/internals/improve-workflow.md +22 -16
  199. package/docs/architecture/internals/indexing.md +1 -1
  200. package/docs/architecture/internals/search.md +1 -2
  201. package/docs/architecture/internals/storage-locations.md +6 -6
  202. package/docs/architecture/persisted-data-compat.md +13 -4
  203. package/docs/architecture/specs/0.9.0-decisions.md +6 -2
  204. package/docs/architecture/specs/improve-collapse-churn-detector-design.md +2 -2
  205. package/docs/architecture/specs/workflow-format-unification.md +1 -6
  206. package/docs/architecture/testing/manual-testing-checklist.md +21 -30
  207. package/docs/architecture/testing/task-workflow-manual-tests.md +106 -203
  208. package/docs/architecture/testing/testing-workflow.md +1 -1
  209. package/docs/architecture/workflow-engine.md +5 -56
  210. package/docs/guides/author-workflows.md +39 -69
  211. package/docs/guides/bundles.md +3 -1
  212. package/docs/guides/capture-knowledge.md +1 -1
  213. package/docs/guides/claude-code-vs-akm-workflows.md +1 -2
  214. package/docs/guides/discover-and-load.md +4 -4
  215. package/docs/guides/getting-started.md +1 -1
  216. package/docs/guides/improve-the-library.md +10 -9
  217. package/docs/guides/recipes/headless-install.md +2 -2
  218. package/docs/guides/run-workflows.md +1 -1
  219. package/docs/guides/scheduling.md +9 -1
  220. package/docs/guides/use-with-any-agent.md +49 -4
  221. package/docs/integration/bundling-akm.md +7 -6
  222. package/docs/maintainers/curate-workmap.md +1 -2
  223. package/docs/maintainers/release-checklist.md +33 -1
  224. package/docs/migration/README.md +2 -0
  225. package/docs/migration/release-notes/0.10.0.md +201 -0
  226. package/docs/migration/release-notes/README.md +1 -0
  227. package/docs/migration/v0.9-to-v0.10.md +507 -0
  228. package/docs/posts/akm-command-tour.md +3 -3
  229. package/docs/product-surface.md +1 -1
  230. package/docs/reference/README.md +1 -0
  231. package/docs/reference/api.md +65 -0
  232. package/docs/reference/asset-types.md +3 -5
  233. package/docs/reference/bundle-types.md +2 -4
  234. package/docs/reference/cli.md +160 -188
  235. package/docs/reference/configuration.md +101 -20
  236. package/docs/reference/data-and-telemetry.md +2 -2
  237. package/docs/reference/env-and-secrets.md +2 -2
  238. package/docs/reference/supported-formats.md +3 -4
  239. package/docs/reference/tasks.md +12 -19
  240. package/docs/reference/website-sources.md +1 -1
  241. package/docs/reference/workflow-schema.md +89 -317
  242. package/docs/reference/workflows.md +20 -48
  243. package/package.json +12 -2
  244. package/schemas/akm-config.json +2 -243
  245. package/schemas/akm-task.json +2 -3
  246. package/schemas/akm-workflow.json +47 -84
  247. package/dist/assets/improve-strategies/catchup.json +0 -41
  248. package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
  249. package/dist/assets/improve-strategies/quick.json +0 -17
  250. package/dist/assets/improve-strategies/reflect-distill.json +0 -29
  251. package/dist/assets/improve-strategies/thorough.json +0 -49
  252. package/dist/assets/prompts/retrieval-relevance-judge.md +0 -6
  253. package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
  254. package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
  255. package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
  256. package/dist/cli/retired-commands.js +0 -118
  257. package/dist/commands/improve/retrieval-gate.js +0 -132
  258. package/dist/commands/tasks/validate.js +0 -176
  259. package/dist/core/config/legacy-source-shape-shim.js +0 -117
  260. package/dist/indexer/feedback/utility-policy.js +0 -75
  261. package/dist/integrations/harnesses/ids.js +0 -28
  262. package/dist/tasks/source/task-source-v3-frozen.js +0 -424
  263. package/dist/tasks/source/task-to-v4.js +0 -863
  264. package/dist/workflows/exec/worktree.js +0 -372
  265. package/dist/workflows/freeze/child-output-references.js +0 -83
  266. package/dist/workflows/freeze/identity.js +0 -22
  267. package/dist/workflows/freeze/targets/script.js +0 -50
  268. package/dist/workflows/freeze/targets/task.js +0 -124
  269. package/dist/workflows/github-yaml.js +0 -506
  270. package/dist/workflows/runtime/run-outputs.js +0 -80
@@ -2,7 +2,7 @@
2
2
 
3
3
  The CLI is called `akm` (Agent Knowledge Manager). Commands default to structured
4
4
  JSON at `--detail brief`. Use `--format json|jsonl|yaml|text|md|html`,
5
- `--detail brief|normal|full`, and `--shape human|agent|summary` when you want a
5
+ `--detail brief|normal|full|agent` when you want a
6
6
  different presentation. Errors include `error` and `hint` fields.
7
7
 
8
8
  This page is authoritative for the current CLI. For per-release behavior
@@ -19,14 +19,15 @@ These flags are accepted by all commands:
19
19
  | --- | --- | --- | --- |
20
20
  | `--format` | `json`, `jsonl`, `yaml`, `text`, `md`, `html` | `json` | Output format |
21
21
  | `--output` | path | _(none)_ | Write rendered output to a file instead of stdout (all formats except `jsonl`) |
22
- | `--detail` | `brief`, `normal`, `full` | `brief` | Output **verbosity** level |
23
- | `--shape` | `human`, `agent`, `summary` | `human` | Output **projection** |
22
+ | `--detail` | `brief`, `normal`, `full`, `agent` | `brief` | Output **verbosity** level, or the `agent` projection |
24
23
  | `--quiet` / `-q` | boolean | `false` | Suppress stderr warnings |
25
24
  | `--verbose` | boolean | `false` | Enable verbose diagnostics gated behind `isVerbose()`. Parsed globally before any subcommand runs. The `AKM_VERBOSE` env var honours the same setting and wins when both are present (see `src/core/warn.ts`). |
26
25
 
27
- `--detail` controls **how much** is returned (`brief|normal|full`); `--shape`
28
- controls the **projection** (`human` for people, `agent` for a token-lean
29
- action view, `summary` for capability discovery).
26
+ `--detail brief|normal|full` controls **how much** is returned. `--detail agent`
27
+ selects the token-lean action view on `search`, `curate` and `show`; every other
28
+ command ignores it. (`--shape`, which carried `agent` and `summary` before 0.10,
29
+ is gone: it is an unknown flag, exit 2. `--shape summary` had a projection only
30
+ on `show`; use `--detail brief` there.)
30
31
 
31
32
  ### `--format jsonl`
32
33
 
@@ -67,12 +68,12 @@ Scripted `setup` modes emit a normal format-aware result. Interactive `setup`
67
68
  is a terminal UI and emits no result document. `agent` leaves inherited child
68
69
  streams raw, then formats its final `agent-result` envelope normally.
69
70
 
70
- ### `--shape=agent`
71
+ ### `--detail agent`
71
72
 
72
73
  Strips output to only action-relevant fields:
73
74
 
74
75
  - **search**: keeps `name`, canonical `ref`, absolute `path`, `editable`, `type`, `description`, `action`, `score`, and optional `estimatedTokens`/`keys`
75
- - **show**: adds absolute `path`, `editable`, and the existing type-specific action/content fields on top of the canonical `ref` that every `show` shape returns (`ref` is not agent-exclusive — see `--shape summary` below)
76
+ - **show**: adds absolute `path`, `editable`, and the existing type-specific action/content fields on top of the canonical `ref` that every `show` shape returns (`ref` is not agent-exclusive; every `show` response carries it)
76
77
  - **curate**: local items keep canonical `ref`, absolute `path`, `editable`, and their follow-up fields
77
78
 
78
79
  For local materialized assets, `editHint` is added only when `editable` is
@@ -93,20 +94,11 @@ them.
93
94
 
94
95
  Every one of these commands also carries a `results` field — the identical
95
96
  array, not a copy — alongside its semantic key, in every `--format`/`--detail`
96
- combination and both `--shape human` (the default) and `--shape agent`. Code
97
+ combination, including `--detail agent`. Code
97
98
  written against a single command should keep using its semantic key for
98
99
  clarity; code that needs to handle several list commands uniformly can read
99
100
  `results` and never maintain a per-command lookup table.
100
101
 
101
- ### `--shape summary`
102
-
103
- Valid **only on `akm show`**. Every other command rejects `--shape summary`
104
- with an `INVALID_SHAPE_VALUE` usage error (exit 2) — an honest rejection rather
105
- than a silent fallback. It returns a compact view suitable for capability
106
- discovery:
107
-
108
- - **show**: `type`, `name`, canonical `ref`, `description`, `tags`, `parameters`, `workflowTitle`, `action`, `run`, `origin`, `keys`, `links`
109
-
110
102
  ## Exit Codes and Error Envelope
111
103
 
112
104
  Every command exits with one of the following codes:
@@ -550,7 +542,7 @@ ran, `keyword` when keyword-only search was intentional or semantic search was
550
542
  not ready, and `fts-fallback` when a ready semantic backend failed during this
551
543
  query. The last case also adds one sanitized, endpoint-naming entry to
552
544
  `warnings`; it never repeats the provider/runtime error text. Both fields are
553
- preserved by `--shape agent` so machine consumers can lower their confidence
545
+ preserved by `--detail agent` so machine consumers can lower their confidence
554
546
  instead of treating keyword fallback as healthy semantic ranking.
555
547
 
556
548
  Ranking fuses two candidate lists by reciprocal rank (k = 60, equal weights):
@@ -578,8 +570,7 @@ kept.
578
570
  | `--belief` | `all`, `current`, `historical` | `all` | Memory belief filter. `current` keeps active memory beliefs; `historical` keeps contradicted/superseded/archived ones. |
579
571
  | `--include-sessions` | flag | `false` | Include session assets, which are excluded from default results via `config.search.defaultExcludeTypes` |
580
572
  | `--format` | `json`, `jsonl`, `yaml`, `text`, `md`, `html` | `json` | Output format |
581
- | `--detail` | `brief`, `normal`, `full` | `brief` | Output verbosity level |
582
- | `--shape` | `human`, `agent`, `summary` | `human` | Output projection. `--shape summary` is valid **only on `akm show`**; passing it here is an `INVALID_SHAPE_VALUE` usage error (exit 2), like on every other command. |
573
+ | `--detail` | `brief`, `normal`, `full`, `agent` | `brief` | Output verbosity level, or the `agent` projection |
583
574
 
584
575
  `--filter` flags AND-join: every supplied key must match the entry's
585
576
  `scope` for the entry to appear in the result set. Entries without any scope
@@ -603,7 +594,7 @@ availability:
603
594
  it (`lexical rank 3`, `vector rank 12`); surfaced at `full`
604
595
 
605
596
  The default brief shape is intentionally small. The exact field set per
606
- detail level (and per `--shape`) is authoritative in
597
+ detail level (and for `--detail agent`) is authoritative in
607
598
  `src/output/shapes/helpers.ts` (`shapeSearchHit` / `shapeSearchHitForAgent`),
608
599
  assembled into the shape registry by the `src/output/shapes.ts` barrel:
609
600
 
@@ -612,10 +603,7 @@ assembled into the shape registry by the `src/output/shapes.ts` barrel:
612
603
  | `brief` (default) | `type`, `name`, `ref`, `action`, `estimatedTokens` | `name`, `installRef`, `score` |
613
604
  | `normal` | `type`, `name`, `description`, `action`, `score`, `estimatedTokens`, optional `warnings`/`quality`/`keys` | `name`, `description`, `action`, `installRef`, `score`, optional `warnings` |
614
605
  | `full` | full hit object (includes `ref`, `origin`, `tags`, `whyMatched`, optional `warnings`, optional `quality`, timings, bundle metadata) | full hit object |
615
- | `--shape agent` | `name`, `ref`, `type`, `path`, `editable`, conditional `editHint`, `description`, `action`, `score`, optional `estimatedTokens`/`keys` | no local access fields |
616
-
617
- `--shape summary` is **not valid on `search`** — see the `--shape summary`
618
- section above; it is a usage error (exit 2) everywhere except `akm show`.
606
+ | `agent` | `name`, `ref`, `type`, `path`, `editable`, conditional `editHint`, `description`, `action`, `score`, optional `estimatedTokens`/`keys` | no local access fields |
619
607
 
620
608
  There is no registry `curated` boolean. Renderers surface an optional
621
609
  `warnings: string[]` field on hits when a provider has non-fatal issues to
@@ -661,8 +649,7 @@ candidates (`search.curateRerank.topN`) by name, description and the start of
661
649
  each asset's indexed content. Curate includes direct follow-up
662
650
  commands such as `akm show <ref>` or `akm bundle add <ref>` so you can
663
651
  immediately inspect or install what it found.
664
- `--detail` and `--shape agent` both work on curate output; `--shape summary`
665
- does not.
652
+ `--detail` (including `agent`) works on curate output.
666
653
  Curate preserves the underlying search's `searchMode` and warnings.
667
654
  Agent-shaped local items include `ref`, `path`, and `editable`, plus `editHint`
668
655
  only for read-only items. Their `followUp` remains `akm show <ref>` rather than
@@ -731,20 +718,15 @@ filter. A mismatch (or absent scope) returns `NotFoundError` so the caller
731
718
  cannot accidentally read out-of-scope content.
732
719
 
733
720
  The default `show` JSON includes the asset body when applicable. Canonical
734
- `ref` is always present, in every `--shape` (`human`, `agent`, and `summary`
735
- alike) and at every `--detail` level. Absolute `path` and `editable` are
736
- always present too, at every `--detail` level, in the `human` (default) and
737
- `agent` shapes — `--shape summary` omits both, since it is a compact
738
- capability-discovery view, not an edit-target view. None of `ref`/`path`/
721
+ `ref` is always present, at every `--detail` level, `agent` included. Absolute `path` and `editable` are
722
+ always present too. None of `ref`/`path`/
739
723
  `editable` are gated behind `--detail full`. Use `--detail brief` for a
740
724
  reduced metadata-first view without `content`/`template`/`prompt`;
741
725
  `--detail full` adds verbose extras such as `schemaVersion` and, when
742
- `editable` is `false`, `editHint`; `--shape agent` strips non-action metadata
726
+ `editable` is `false`, `editHint`; `--detail agent` strips non-action metadata
743
727
  (e.g. `origin`, `tags`) down to the action-relevant field set while still
744
- including `ref`/`path`/`editable`; `--shape summary`
745
- returns a compact view with `type`, `name`, `ref`, `description`, `tags`,
746
- `parameters`, `workflowTitle`, `action`, `run`, `origin`, and `keys`, plus the
747
- optional fragment metadata described below.
728
+ including `ref`/`path`/`editable`, plus the optional fragment metadata
729
+ described below.
748
730
 
749
731
  `links` lists the asset's declared links, grouped by kind: `outgoing` (the
750
732
  assets its own `xrefs:`, `supersededBy:`, `contradictedBy:`,
@@ -816,7 +798,7 @@ akm workflow status 7c115132 # 8+ char run-id prefix also works
816
798
  akm workflow resume <run-id>
817
799
  akm workflow abandon <run-id>
818
800
  akm workflow list --active
819
- akm workflow list --children # also list child workflow runs
801
+ akm workflow list --children # also list child workflow runs (Experimental)
820
802
  akm workflow list --all-scopes # include runs started from a different working directory
821
803
  akm workflow plan workflows/ship-release # compile+freeze preview, zero writes
822
804
  ```
@@ -828,10 +810,10 @@ Subcommands:
828
810
 
829
811
  | Subcommand | Description |
830
812
  | --- | --- |
831
- | `create <name>` | Validate and write a Markdown workflow under `workflows/`. `--path <dir>` places it in a subdirectory; `--from <file>` imports content; `--force` (requires `--from` or `--reset`) overwrites; `--print` prints the template that would be written instead of writing it |
832
- | `run <run-id\|ref>` | Stable canonical start/resume/execute command. A ref starts a run or resumes the active run in the current scope (announced as `resumed: true`, see below); a run id continues that exact active run. `--new` starts a fresh run even when one is already active. Executes until completion, failure, verification rejection, interruption, or an explicit limit |
813
+ | `create <name>` | Validate and write a Markdown workflow under `workflows/`. `--path <dir>` places it in a subdirectory; `--from <file>` imports content; `--force` overwrites; `--print` prints the template that would be written instead of writing it |
814
+ | `run <run-id\|ref>` | Canonical start/resume/execute command. A ref starts a run or resumes the active run in the current scope (announced as `resumed: true`, see below); a run id continues that exact active run. `--new` starts a fresh run even when one is already active. Executes until completion, failure, verification rejection, interruption, or an explicit limit |
833
815
  | `status <run-id\|ref>` | Show the full run state, including all step statuses. `--units` also lists per-unit rows from the run journal (diagnostics only). Renders a `children:` tree when the run composes child workflows. `--all-scopes` widens the ref-fallthrough lookup (only reached when the target does not resolve to a run id) to every scope instead of just the current one |
834
- | `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs are excluded unless `--children` is passed. `--all-scopes` searches every scope instead of only the current one (#942) |
816
+ | `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs (the Experimental `unit: { workflow: … }` step) are excluded unless `--children` is passed. `--all-scopes` searches every scope instead of only the current one (#942) |
835
817
  | `resume <run-id>` | Flip a `blocked` or `failed` run back to `active`. Completed runs cannot be resumed |
836
818
  | `abandon <run-id>` | Mark a run failed so it stops counting as active (`resume` can reopen it) |
837
819
  | `plan <ref>` | **Evolving.** Compile and freeze a workflow WITHOUT publishing a run: the canonical step graph, per-step frozen target kinds, task/child expansion, input bindings, source read set, and lowering notices — zero durable writes. Returns the full JSON envelope by default, like every other command; pass `--format text` for a human-readable summary |
@@ -847,8 +829,8 @@ workflow ref is never mistaken for one.
847
829
  The public `workflow start`, `next`, and `complete` lifecycle was removed in
848
830
  0.9, along with the experimental `brief`/`report` external-driver protocol.
849
831
  Use `workflow run` for execution and `workflow status` for inspection. The
850
- removed commands fail with an `UNKNOWN_COMMAND` envelope and a migration hint;
851
- there are no compatibility aliases.
832
+ removed commands fail with an `UNKNOWN_COMMAND` envelope; there are no
833
+ compatibility aliases.
852
834
 
853
835
  There is also no `akm workflow template`, `validate`, or `watch`.
854
836
  `workflow create --print` prints a starter, `akm lint --type workflows`
@@ -907,9 +889,8 @@ has nothing left to abort and nothing left to resume.
907
889
 
908
890
  **What `--max-steps` counts.** The budget is spent by the **steps that
909
891
  finish** — completed, failed, or gate-rejected with the loop budget spent — not
910
- by entries in the `executed` report, which gains one per gate-loop iteration
911
- and one per route-skip. So a step's whole bounded `gate.max_loops` loop costs
912
- one, a route-skipped step costs nothing (no work was dispatched for it), and a
892
+ by entries in the `executed` report, which gains one per gate-loop iteration.
893
+ So a step's whole bounded `gate.max_loops` loop costs one, and a
913
894
  step the invocation left unfinished — an abort, a verification-judge outage —
914
895
  costs nothing either, because the next invocation still owes that work.
915
896
  `--max-retries` subtracts the same way: a reopened run's remaining budget is
@@ -921,7 +902,7 @@ budget is left. `gate.max_loops` (1–100) is the per-step ceiling;
921
902
  `budget.max_units` and `budget.max_tokens` are the whole-run ceilings, seeded
922
903
  from the unit journal so they hold across resumes.
923
904
 
924
- `run` is Stable and does not consult `experimental.workflowEngine`. Every
905
+ `run` is Experimental and does not consult `experimental.workflowEngine`. Every
925
906
  non-empty `### gate` requires `workflow.judgeEngine` to name a configured LLM
926
907
  or agent engine before a new run can be frozen. Gate evaluation is fail-closed.
927
908
 
@@ -942,7 +923,7 @@ when the cwd is inside it, otherwise the cwd itself. In practice this means:
942
923
  akm workflow create ship-release
943
924
  akm workflow create ship-release --from ./ship-release.md
944
925
  akm workflow create ship-release --from ./ship-release.md --force
945
- akm workflow create ship-release --force --reset
926
+ akm workflow create ship-release --force
946
927
  akm workflow create ship --path release # writes workflows/release/ship.md
947
928
  ```
948
929
 
@@ -950,14 +931,9 @@ akm workflow create ship --path release # writes workflows/release/ship
950
931
  | --- | --- |
951
932
  | `--path <dir>` | Relative subdirectory under `workflows/` to place the workflow in. The filename comes from `<name>`. |
952
933
  | `--from <file>` | Import and validate a Markdown workflow from an existing file |
953
- | `--force` | Overwrite an existing workflow. Requires `--from` or `--reset`. |
954
- | `--reset` | Explicitly replace an existing workflow with a fresh template (use with `--force`) |
934
+ | `--force` | Overwrite an existing workflow: with `--from`, replace its content from that file; alone, replace it with a fresh template |
955
935
  | `--print` | Print the Markdown template without creating anything |
956
936
 
957
- `--force` requires either `--from <file>` (replace from a source file) or
958
- `--reset` (explicitly acknowledge you are overwriting in place). Without one of
959
- these, `--force` is rejected to prevent silent template overwrites.
960
-
961
937
  `<name>` itself must be **flat** — `^[a-z0-9][a-z0-9._/-]*$` after combining
962
938
  with `--path`, but the bare `--name` positional is rejected if it contains a
963
939
  `/`. Hierarchical placement (`release/ship`) goes through `--path release
@@ -1012,11 +988,11 @@ Two output modes:
1012
988
  - **`--format json`**: the full envelope — `ok`, `ref`, `title`,
1013
989
  `sourceFormat`, `sourcePath`, `irVersion`, `planHash`, `published` (always
1014
990
  `false`, so a consumer can never mistake this for a run envelope),
1015
- `execution`, `budget?`, `params?`, `outputs?`, `steps[]`, `notices[]`,
991
+ `execution`, `budget?`, `params?`, `steps[]`, `notices[]`,
1016
992
  `warnings[]`. Each step entry carries an `expansion` field
1017
993
  naming how its target was reached: `{via: "direct"}`, `{via: "task",
1018
994
  taskRef}`, or — for a step composing a child workflow —
1019
- `{via: "child", childRef, childPlanHash, childOutputs, steps[]}` with the
995
+ `{via: "child", childRef, childPlanHash, steps[]}` with the
1020
996
  child's own step list nested recursively in the same shape.
1021
997
 
1022
998
  Text-mode example:
@@ -1027,13 +1003,11 @@ source: workflows/release.md
1027
1003
  plan: irVersion 5, hash 4f2ba91c3d0e… (not published)
1028
1004
  limits: maxConcurrency 4; budget max_units 50, max_tokens 100000
1029
1005
  params: channel, version
1030
- outputs: report <- steps.summarize.output
1031
1006
  steps:
1032
1007
  1. notify [command] direct
1033
1008
  2. build [script] via tasks/plan-v4-task
1034
1009
  3. dispatch [child-workflow] -> workflows/release-checklist (plan 91acbe20f5d1…)
1035
1010
  with: channel="stable" (literal), files <- steps.build.output.files (reference)
1036
- exports: report, changed_count
1037
1011
  3.1 verify [command] direct
1038
1012
  4. summarize [command] direct
1039
1013
  read set:
@@ -1065,7 +1039,7 @@ Workflow markdown contract:
1065
1039
  - Frontmatter carries the asset envelope and orchestration graph (`params`,
1066
1040
  `steps`, `defaults`, and `budget`).
1067
1041
  - Every `## <step-id>` heading must name a declared step exactly. Unit and map
1068
- steps require a section; route-only steps may omit one.
1042
+ steps require a section.
1069
1043
  - An optional `### gate` inside a step section carries its gate rubric. Omitted
1070
1044
  or empty rubric text skips validation.
1071
1045
 
@@ -1366,7 +1340,19 @@ stopping the CLI upgrade.
1366
1340
  | --- | --- | --- |
1367
1341
  | Claude Code | `claude` is on `PATH`, the `akm-plugins` marketplace is configured and `akm@akm-plugins` is installed | `claude plugin marketplace update akm-plugins`, then `claude plugin update akm@akm-plugins` |
1368
1342
  | Codex | `codex` is on `PATH` and `akm@akm-plugins` is installed from the `akm-plugins` marketplace | `codex plugin marketplace upgrade akm-plugins` (this also refreshes the installed plugin cache) |
1369
- | OpenCode | `akm-opencode` is cached at `$XDG_CACHE_HOME/opencode/packages/akm-opencode@latest` (default `~/.cache/opencode/...`) and `opencode` is on `PATH` | If npm's `akm-opencode@latest` differs from the cached version and no OpenCode process is running: the cache directory is moved to the trash (never deleted), then `opencode debug config` is run from a temporary directory to fetch the new version. While OpenCode runs the update is `deferred` to a later `akm upgrade`. |
1343
+ | OpenCode 1 | `akm-opencode` is cached at `$XDG_CACHE_HOME/opencode/packages/akm-opencode@latest` (default `~/.cache/opencode/...`) and `opencode` is on `PATH` | If npm's `akm-opencode@latest` differs from the cached version and no OpenCode process is running: the cache directory is moved to the trash (never deleted), then `opencode debug config` is run from a temporary directory to fetch the new version. While OpenCode runs the update is `deferred` to a later `akm upgrade`. |
1344
+ | OpenCode 2 | `akm-opencode-v2` is named under `"plugins"` in the global OpenCode config (`opencode.json` or `.jsonc`) and cached at `$XDG_CACHE_HOME/opencode/npm/akm-opencode-v2@latest/<build>/`, and the `opencode` on `PATH` is OpenCode 2 | Same rule as OpenCode 1, with `akm-opencode-v2`: the cache folder is moved to the trash, then `opencode plugin add akm-opencode-v2` is run from a temporary directory (for a spec the config already names it only re-installs the cache; it does not touch the config). Listed only on a host that has the plugin, so an OpenCode 1 host reports exactly what it did before. |
1345
+
1346
+ The two OpenCode plugins never touch each other: `akm-opencode` is only looked
1347
+ for in OpenCode 1's cache and `plugin` key, `akm-opencode-v2` only in OpenCode
1348
+ 2's cache and `plugins` key. Before moving a cache, akm reads `opencode
1349
+ --version` and skips the plugin when the `opencode` on `PATH` is the other
1350
+ major, since only the matching major can re-create that cache; akm never
1351
+ installs or replaces `opencode`. A spec that appears only under the legacy
1352
+ `plugin` key for OpenCode 2 is skipped with a note (`opencode plugin add`
1353
+ would write a `plugins` entry). Which OpenCode major akm itself drives is
1354
+ [detected from the engine's binary](configuration.md#engines), independent of this
1355
+ step.
1370
1356
 
1371
1357
  Claude Code does not update third-party marketplaces on its own (the Claude
1372
1358
  desktop app turns plugin updates off), and OpenCode never re-checks a cached
@@ -1374,7 +1360,7 @@ plugin, so neither moves without this step. Codex refreshes its git
1374
1360
  marketplaces at every start.
1375
1361
 
1376
1362
  The result gains a `plugins` array, one entry per harness:
1377
- `{ "harness": "claude-code" | "codex" | "opencode", "outcome": ..., "from"?, "to"?, "message"? }`.
1363
+ `{ "harness": "claude-code" | "codex" | "opencode" | "opencode-v2", "outcome": ..., "from"?, "to"?, "message"? }`.
1378
1364
  `outcome` is `updated`, `current`, `skipped`, `deferred` or `failed`; under
1379
1365
  `--check` it can also be `pending` or `unknown`. `--check` does not fetch the
1380
1366
  Claude Code or Codex marketplaces, so for them it reports `unknown` (whether a
@@ -1392,7 +1378,9 @@ target is the akm-cli that `akm-opencode@latest` depends on
1392
1378
  The result then carries `lockstep: { plugin, pinnedVersion, newestVersion, heldBack }`,
1393
1379
  `latestVersion` is the pinned version, the install names that exact version
1394
1380
  rather than `@latest`, and the text output says the CLI is held back. The CLI
1395
- is never moved backwards to meet the pin. Claude Code and Codex have no
1381
+ is never moved backwards to meet the pin. With both OpenCode plugins present
1382
+ (`akm-opencode` and `akm-opencode-v2`), the CLI is held to the older of their
1383
+ two pins, and `lockstep.plugin` names the one that sets it. Claude Code and Codex have no
1396
1384
  in-process copy and are not part of this rule.
1397
1385
 
1398
1386
  Lockstep fails closed. When the OpenCode plugin is cached but the pin cannot
@@ -1430,6 +1418,10 @@ carries `channel: "next"` (`"latest"` otherwise); no other field changes.
1430
1418
  `@latest` does, or its `akm-cli` pin is unreadable, the CLI is held where it is and the OpenCode entry
1431
1419
  is `failed`, exactly as in the stable lockstep above.
1432
1420
 
1421
+ OpenCode 2's `akm-opencode-v2` follows the same rule with its own spec:
1422
+ `{ "plugins": ["akm-opencode-v2@next"] }`, cached under
1423
+ `$XDG_CACHE_HOME/opencode/npm/akm-opencode-v2@next/`.
1424
+
1433
1425
  Without that line the OpenCode entry is `skipped`, its message names the line
1434
1426
  to add, and lockstep stays against the `@latest` pin, so the CLI does not go
1435
1427
  past what OpenCode will run.
@@ -1529,7 +1521,10 @@ CI or fresh environments without running `akm setup` first.
1529
1521
  ### sync
1530
1522
 
1531
1523
  Stage and commit local changes in a git-backed bundle. If the bundle has a
1532
- remote configured and is marked `writable: true`, the commit is also pushed.
1524
+ remote configured and is marked `writable: true`, `akm sync` first fetches the
1525
+ remote, brings in what another host pushed (a fast-forward when it can, otherwise
1526
+ git's default merge), and then pushes. A merge that conflicts is aborted: your
1527
+ commit stays, the push is skipped, and `reason` names the conflicting files.
1533
1528
 
1534
1529
  > **Note:** there is no `akm save` command — use `akm sync`.
1535
1530
 
@@ -1561,8 +1556,9 @@ value also looks like a format token.
1561
1556
  | Not a git repo | Exit 0, `skipped: true` in JSON output — no error |
1562
1557
  | Git repo, no remote | Stage and commit only |
1563
1558
  | Git repo, has remote, not writable | Stage and commit only |
1564
- | Git repo, has remote, `writable: true` | Stage, commit, and push |
1565
- | Writable with a remote, but no upstream branch, or behind or diverged from it | Stage and commit; the push is skipped and `reason` says `not pushed: ...` |
1559
+ | Git repo, has remote, `writable: true` | Stage, commit, fetch, fast-forward or merge the upstream, and push |
1560
+ | Writable with a remote, nothing to commit, upstream has moved | Fast-forward or merge the upstream; nothing is pushed unless there is a new commit |
1561
+ | Writable with a remote, but no upstream branch, the fetch fails, or the merge conflicts | Stage and commit; the merge is aborted, the push is skipped, and `reason` says `not pushed: ...` |
1566
1562
  | Writable with a remote and ahead of its upstream | Stage, commit, and push, unpushed commits included |
1567
1563
  | Any writable repo with `--no-push` | Stage and commit only (push suppressed) |
1568
1564
 
@@ -1713,8 +1709,8 @@ file path, a single HTTP/HTTPS URL, or `-` for stdin.
1713
1709
 
1714
1710
  **Write target resolution:** the destination is the working bundle
1715
1711
  (`defaultBundle`) unless `defaultWriteTarget` is set in config, which
1716
- overrides it to a named source. An explicit `--target <name>` flag overrides
1717
- both. The full order is `--target` → `defaultWriteTarget` → working bundle →
1712
+ overrides it to a named source. An explicit `--bundle <name>` flag overrides
1713
+ both. The full order is `--bundle` → `defaultWriteTarget` → working bundle →
1718
1714
  `ConfigError`. See [Configuration](configuration.md#bundles-and-write-target) for
1719
1715
  details.
1720
1716
 
@@ -1731,14 +1727,14 @@ akm import ./notes/oauth-quirks.md --xref knowledge/auth/vendor-x-token-api
1731
1727
  akm import ./notes/modern-guide.md --supersedes knowledge/legacy-guide
1732
1728
 
1733
1729
  # Route the write to a specific writable bundle:
1734
- akm import ./docs/auth-flow.md --target team-bundle
1730
+ akm import ./docs/auth-flow.md --bundle team-bundle
1735
1731
  ```
1736
1732
 
1737
1733
  | Flag | Description |
1738
1734
  | --- | --- |
1739
1735
  | `--name` | Optional knowledge name. Defaults to the source filename, URL path, or a slug from stdin content |
1740
1736
  | `--force` | Overwrite an existing knowledge document with the same name |
1741
- | `--target <name>` | Override the write destination. Accepts a source name from your config; falls back to `defaultWriteTarget` then the working bundle. |
1737
+ | `--bundle <name>` | Override the write destination. Accepts a source name from your config; falls back to `defaultWriteTarget` then the working bundle. |
1742
1738
  | `--xref <ref>` | Cross-reference ref merged into the document's `xrefs:` frontmatter list. Repeatable. A document without frontmatter gains a block; a document with valid frontmatter keeps every existing key and value and gets the refs dedupe-appended (never a nested second block). Each ref must resolve in the write target or a configured source; an unresolvable ref fails with exit 2 before anything is written. If the document's existing frontmatter is not a parseable YAML mapping, the import fails (exit 2) rather than rewriting the block lossily — fix the frontmatter or import without `--xref`, which preserves the file verbatim. |
1743
1739
  | `--supersedes <ref>` | Ref of an existing asset this document corrects. Repeatable. Imports the correction with the old ref merged into its `xrefs:` AND demotes the old asset (`beliefState: superseded` + `supersededBy: [<new ref>]`, a metadata-only frontmatter edit), then reindexes it. Same validation (including the self-supersede rejection), skipped-demotion (`applied: false`), idempotence, and git-boundary-commit behaviour as on `remember` (see above). |
1744
1740
 
@@ -1771,17 +1767,27 @@ its description, title or `when_to_use` from your reason. Improve does not
1771
1767
  rewrite an asset's text. Once you have verified the correct fact, attach the
1772
1768
  exact fix with `--replace`, `--with` and `--source`: akm checks that each
1773
1769
  `--replace` text appears exactly once and that the frontmatter still parses,
1774
- records nothing if either check fails, and queues the edit as a `feedback`
1775
- proposal for review.
1770
+ records nothing if either check fails, and applies the edit at once, with no
1771
+ review or gate: it files a `feedback` proposal and accepts it in the same command
1772
+ (the accept is a normal one, committed to a git-backed bundle, and
1773
+ `akm proposal revert` undoes it). If the accept refuses, the proposal is
1774
+ rejected, the file is left alone and the command fails. The asset stays eligible
1775
+ for improve like any other.
1776
1776
  To mark the asset's history, with or without a text fix, add `--superseded-by
1777
1777
  <ref>` (another asset replaces it) or `--outdated` (it describes a past state
1778
1778
  and no single asset replaces it), with `--reason` and `--source`. The same single
1779
- proposal sets the asset's `beliefState` (`superseded`, or `deprecated`) and, for
1779
+ edit sets the asset's `beliefState` (`superseded`, or `deprecated`) and, for
1780
1780
  `--superseded-by`, adds the successor's ref to its `supersededBy` list, by
1781
1781
  editing only those lines of the frontmatter. `--positive` records that an asset
1782
- helped (it raises its ranking) and does not trigger a rewrite. Both signals
1783
- update the asset's utility score right away, so highly-rated assets rank higher
1784
- in search results.
1782
+ helped (it raises its ranking) and does not trigger a rewrite. Feedback
1783
+ changes `akm search` and `akm curate` ranking at once, with no reindex: each
1784
+ recorded positive raises the asset's score and each negative lowers it, the
1785
+ same way for every asset, so an asset with 5 positives ranks higher than one
1786
+ with 2, and each further vote counts for a little less. The effect is small: it
1787
+ reorders close matches and does not override relevance. Only feedback recorded
1788
+ as the user counts, not feedback from improve, task or audit runs; the output's
1789
+ `rankingUpdate.applied` says which it was (`true`, or `false` with a `reason`).
1790
+ Feedback also updates the utility score that improve and `akm metrics` read.
1785
1791
 
1786
1792
  ```sh
1787
1793
  akm feedback scripts/deploy.sh --positive
@@ -1803,9 +1809,9 @@ akm feedback knowledge/api-v1 --negative --reason "describes the retired v1 API"
1803
1809
  | `--reason` | What is wrong with the asset's content and what should change; not for `akm` command errors. Attached to the feedback event (required for negative feedback by default, and always with a fix: `--replace`, `--superseded-by` or `--outdated`) |
1804
1810
  | `--replace <text>` | Exact text to correct, copied verbatim from the asset file; it must appear exactly once. Repeatable, each paired in order with a `--with`. Negative feedback only |
1805
1811
  | `--with <text>` | The corrected text for the matching `--replace`. Use `--with=<text>` for a value that starts with `-` |
1806
- | `--source <where>` | The URL, command or file that shows the correct fact. Required with `--replace`, `--superseded-by` and `--outdated`; shown to the reviewer with the proposal |
1807
- | `--superseded-by <ref>` | The ref of the asset that replaces this one. The proposal sets `beliefState: superseded` and adds the ref, as its `bundle//conceptId`, to `supersededBy`; `contradicted` and `archived` stay, a ref already listed is not added again, and a scalar `supersededBy` becomes a list. The ref must be indexed and must not be the asset itself, or nothing is recorded; nor is anything when the asset already says all this (the fix changes nothing). Negative feedback only; may be combined with `--replace`/`--with`, not with `--outdated`; markdown assets only |
1808
- | `--outdated` | The asset describes a past state and no single asset replaces it. The proposal sets `beliefState: deprecated`, unless the asset already says `superseded`, `contradicted` or `archived`. Negative feedback only; may be combined with `--replace`/`--with`, not with `--superseded-by`; markdown assets only |
1812
+ | `--source <where>` | The URL, command or file that shows the correct fact. Required with `--replace`, `--superseded-by` and `--outdated`; kept on the proposal as the audit trail |
1813
+ | `--superseded-by <ref>` | The ref of the asset that replaces this one. The edit sets `beliefState: superseded` and adds the ref, as its `bundle//conceptId`, to `supersededBy`; `contradicted` and `archived` stay, a ref already listed is not added again, and a scalar `supersededBy` becomes a list. The ref must be indexed and must not be the asset itself, or nothing is recorded; nor is anything when the asset already says all this (the fix changes nothing). Negative feedback only; may be combined with `--replace`/`--with`, not with `--outdated`; markdown assets only |
1814
+ | `--outdated` | The asset describes a past state and no single asset replaces it. The edit sets `beliefState: deprecated`, unless the asset already says `superseded`, `contradicted` or `archived`. Negative feedback only; may be combined with `--replace`/`--with`, not with `--superseded-by`; markdown assets only |
1809
1815
  | `--tag` | Tag to attach to the feedback (repeatable, e.g. `--tag slice:train --tag team:platform`) |
1810
1816
  | `--applied-to <ref>` | Credit a `lessons/<name>` lesson that helped resolve this task. When combined with `--positive`, appends this feedback ref to the target lesson's `lessonStrength[]` frontmatter array (dedup, idempotent). A non-lesson target, or a missing `--positive`, produces a warning rather than silently doing nothing. |
1811
1817
 
@@ -1920,15 +1926,16 @@ akm registry remove my-team --yes # Skip the confirmation prompt
1920
1926
  Inspect or apply every pending migration in one plan. `akm migrate` is a thin
1921
1927
  wrapper over the standalone `akm-migrate` executable (installed alongside
1922
1928
  `akm`, and embedded in the release binary), which owns every historical shape
1923
- akm has ever written so the CLI proper reads only current schemas. The steps,
1929
+ akm 0.9.15 and later wrote so the CLI proper reads only current schemas. The steps,
1924
1930
  in order:
1925
1931
 
1926
1932
  1. config.json rewritten in its current shape (`configFile`): retired and
1927
- unknown keys dropped, legacy `extraParams` lifted onto first-class engine
1928
- fields, the legacy `stashDir`/`sources[]`/`installed` layout converted to
1929
- `bundles`/`defaultBundle`, `configVersion` bumped — the same pipeline
1930
- every load already runs in memory, so this only persists it, under a
1931
- backup;
1933
+ unknown keys dropped, `configVersion` bumped — the same pipeline every
1934
+ load already runs in memory, so this only persists it, under a backup. A
1935
+ config older than 0.9.15 (the legacy `stashDir`/`sources[]`/`installed`
1936
+ layout, an `extraParams` key that shadows a first-class engine field) is
1937
+ not converted by 0.10 and blocks this step: run `akm migrate apply` under
1938
+ akm 0.9.x first;
1932
1939
  2. pending `state.db` migrations, historical-destructive ones included, with
1933
1940
  a verified sibling safety copy (`stateMigrations`) — the only path besides
1934
1941
  `akm upgrade` that admits released migration 018, which an ordinary
@@ -1983,7 +1990,6 @@ akm config set output.detail full # Set one key
1983
1990
  akm config set output.detail full --silent # Set without the post-write config dump on stdout
1984
1991
  akm config unset llm # Remove an optional key
1985
1992
  akm config path # Print path to config file
1986
- akm config path --all # Print all config-related paths
1987
1993
  akm config diff other-host/config.json # Effective-config differences, secrets redacted
1988
1994
  ```
1989
1995
 
@@ -1995,7 +2001,7 @@ Subcommands:
1995
2001
  | `list` | List current configuration |
1996
2002
  | `set <key> <value>` | Set one config key; prints the resulting config with `ok: true` |
1997
2003
  | `unset <key>` | Unset an optional key, or a whole `embedding`/engine section; prints the resulting config with `ok: true` |
1998
- | `path` | Show paths to config, bundle, cache, and index. `--all` prints every path; without it, just the config path. Load-bearing: `config path` is the one subcommand the CLI still allows to run when the on-disk config itself fails to load, so you always have a way to locate a broken config. |
2004
+ | `path` | Print the config file path (`akm info` reports the bundle, config, data, cache and state directories). Load-bearing: `config path` is the one subcommand the CLI still allows to run when the on-disk config itself fails to load, so you always have a way to locate a broken config. |
1999
2005
  | `diff <path\|bundle//path>` | Compare this instance's effective config (its own `extends` already applied) against another config file or bundle-relative file (loaded through the same loader — its `extends` honoured too); prints sorted `{ path, local, other }` rows for every differing leaf, secrets redacted on both sides. |
2000
2006
 
2001
2007
  `set` and `unset` accept `--silent` to suppress the post-write config dump
@@ -2047,14 +2053,13 @@ column borrow its model from a configured engine instead of a literal string.
2047
2053
 
2048
2054
  ### help
2049
2055
 
2050
- Print the sectioned command overview, detailed help for any command, agent
2051
- usage instructions, or a release's migration guidance.
2056
+ Print the sectioned command overview, detailed help for any command, or a
2057
+ release's migration guidance.
2052
2058
 
2053
2059
  ```sh
2054
2060
  akm help # Sectioned command overview (same as `akm --help`)
2055
2061
  akm help bundle # Detailed options and subcommands for `bundle`
2056
2062
  akm help env # Detailed options and subcommands for `env`
2057
- akm help agents # Agent-facing usage instructions
2058
2063
  akm help migrate 0.6.0 # Notes for a specific release
2059
2064
  akm help migrate v0.6.0 # v-prefix accepted
2060
2065
  akm help migrate v0.6.0-rc1 # Prereleases normalize to the stable note
@@ -2073,22 +2078,12 @@ unknown version prints the list of bundled notes so you can pick one that
2073
2078
  exists. See [`CONTRIBUTING.md`](https://github.com/itlackey/akm/blob/main/.github/CONTRIBUTING.md#shipping-a-release--migration-notes)
2074
2079
  for the per-release workflow.
2075
2080
 
2076
- ### help agents
2077
-
2078
- Print agent-facing instructions for using `akm`. Add this output to your
2079
- `AGENTS.md`, `CLAUDE.md`, or system prompt so your agent knows how to use
2080
- the CLI. Prints the short guide by default; pass `--full` for the complete
2081
- one.
2082
-
2083
- ```sh
2084
- akm help agents
2085
- ```
2086
-
2087
2081
  ### hints
2088
2082
 
2089
- Print the agent-facing CLI guide directly. The complete guide is the default;
2090
- use `--detail brief` for the compact version. `akm help agents` remains the
2091
- short-first form and accepts `--full`.
2083
+ Print the agent-facing CLI guide. Add this output to your `AGENTS.md`,
2084
+ `CLAUDE.md`, or system prompt so your agent knows how to use the CLI. The
2085
+ complete guide is the default; use `--detail brief` for the compact version.
2086
+ (`akm help agents`, the short-first form, was removed in 0.10.)
2092
2087
 
2093
2088
  ```sh
2094
2089
  akm hints
@@ -2145,9 +2140,9 @@ akm does not manage individual keys — edit the `.env` file directly (`$EDITOR
2145
2140
  "$(akm env path <ref>)"`). `env remove <ref>` removes the whole file.
2146
2141
 
2147
2142
  Env mutations (`create`, `remove`) pick their write destination the same way
2148
- every other write command does: an explicit `--target <source>` wins, else
2143
+ every other write command does: an explicit `--bundle <source>` wins, else
2149
2144
  `defaultWriteTarget`, else the working bundle. The chosen source must be
2150
- writable — a non-writable `--target`/`defaultWriteTarget` fails with a
2145
+ writable — a non-writable `--bundle`/`defaultWriteTarget` fails with a
2151
2146
  `ConfigError` before anything is written — and on a git-backed writable target
2152
2147
  the mutation lands in a single boundary commit (filesystem targets are
2153
2148
  committed by `akm sync`; `env/` stays out of git when your bundle `.gitignore`
@@ -2211,7 +2206,7 @@ akm env create prod --from-file ./.env # seed from an existing .env (byte-for
2211
2206
  printf 'A=1\nB=2\n' | akm env create prod --from-stdin
2212
2207
  akm env create prod --path staging # creates env/staging/prod.env
2213
2208
  akm env create prod --sensitive # hidden from `env list` and the search index
2214
- akm env create prod --target team # write to the `team` source
2209
+ akm env create prod --bundle team # write to the `team` source
2215
2210
  ```
2216
2211
 
2217
2212
  | Flag | Description |
@@ -2220,7 +2215,7 @@ akm env create prod --target team # write to the `team` source
2220
2215
  | `--from-file <path>` | Seed the env file from an existing `.env` at this path |
2221
2216
  | `--from-stdin` | Seed the env file from stdin |
2222
2217
  | `--sensitive` | Exclude this env file from `env list` output and the search index |
2223
- | `--target <source>` | Override the write destination (falls back to `defaultWriteTarget` then the working bundle) |
2218
+ | `--bundle <source>` | Override the write destination (falls back to `defaultWriteTarget` then the working bundle) |
2224
2219
 
2225
2220
  Creates `env/prod.env` with mode 0600. Empty `create` is a no-op if the file
2226
2221
  exists; `--from-file`/`--from-stdin` **refuse to clobber** an existing env (remove
@@ -2335,7 +2330,7 @@ of multi-line material. Writes are atomic (mode 0600) under an exclusive
2335
2330
  `<secret>.lock`. Maximum size is 5 MB.
2336
2331
 
2337
2332
  `secret set` selects its write destination like every other write command: an
2338
- explicit `--target <source>` wins, else `defaultWriteTarget`, else the working
2333
+ explicit `--bundle <source>` wins, else `defaultWriteTarget`, else the working
2339
2334
  bundle. The chosen source must be writable (a non-writable target fails with a
2340
2335
  `ConfigError`), and on a git-backed writable target the mutation lands in a
2341
2336
  single boundary commit. Reads (`list`, `run`) still span all configured sources.
@@ -2569,7 +2564,7 @@ tombstone under `.akm/memory-cleanup/archive/` and is not reported (#884). Also
2569
2564
  `dangerous-env-key` findings for env files (the same key set `akm bundle add`
2570
2565
  enforces — see [Dangerous env key audit](#dangerous-env-key-audit) — but
2571
2566
  non-blocking here; `lint` only warns). `--type workflows` structurally parses
2572
- and compiles peer Markdown and GitHub-shaped YAML workflows; errors surface as
2567
+ and compiles Markdown workflows; errors surface as
2573
2568
  `invalid-workflow-structure` findings (0.9.0: this is the only
2574
2569
  structural-validation surface now that `akm workflow validate` is gone).
2575
2570
 
@@ -2615,9 +2610,9 @@ akm improve skills/code-review
2615
2610
  akm improve workflows/release-checklist --task "reduce duplication"
2616
2611
  akm improve --skip-if-locked # for high-frequency scheduled runs: skip (exit 0) if a run is already in progress
2617
2612
  akm improve --require-engines # for scheduled runs: abort (exit 78) instead of degrading if an engine/credential is unavailable
2618
- akm improve --no-sync # skip the end-of-run git commit entirely (default: on for git-backed bundles)
2613
+ akm improve --no-sync # skip the pre-run and end-of-run git sync entirely (default: on for git-backed bundles)
2619
2614
  akm improve --sync --no-push # commit only, skip the push after it
2620
- akm improve --plan --strategy thorough # preview thorough's resolved engine/model routing; nothing is dispatched
2615
+ akm improve --dry-run --strategy consolidate # preview consolidate's resolved engine/model routing; nothing is dispatched
2621
2616
  akm improve lessons/my-lesson --show-prompt --format text # print the composed reflect prompt for one asset, unwrapped; no lock/index/engine call
2622
2617
  akm improve report # LLM usage/routing report for the most recent real run
2623
2618
  akm improve report --run <id> # ...for one specific improve_runs id
@@ -2627,37 +2622,37 @@ akm improve judge < revision.json # reflect's quality judge on one revision
2627
2622
 
2628
2623
  | Flag | Description |
2629
2624
  | --- | --- |
2630
- | `--run <id>` | `report` scope only (#944): show the usage report for one specific `improve_runs` row instead of the most recent real run. Mutually exclusive with `--since`. Rejected with any other scope, or no scope. |
2631
- | `--since <window>` | `report` scope only (#944): aggregate the usage report over every real (non-dry-run) run started since `<window>` (a duration like `24h`/`7d`, or an ISO timestamp) instead of one run. Mutually exclusive with `--run`. Rejected with any other scope, or no scope. |
2632
2625
  | `--task` | Optional extra guidance for this improvement pass |
2633
2626
  | `--dry-run` | Show the schema-v2 result on stdout without creating config, data, state, cache, bundle, log, or result artifacts. Dry-run results are never persisted, including on errors or signals. |
2634
- | `--plan` | Alias for `--dry-run` (#947). Sets the exact same internal flag; no separate code path. Prefer this spelling when the goal is previewing `plan.processes` (resolved process -> engine -> model routing) rather than checking what would be written. |
2635
2627
  | `--bundle` | Select the bundle the run improves and writes to (default: `defaultWriteTarget`, else the working bundle); only that bundle's assets are planned. When the ref scope is bundle-qualified, it must name the same bundle |
2636
2628
  | `--limit <n>` | Cap the refs the run processes, highest salience first (refs routed to distill only come last). Overrides the strategy's `processes.reflect.limit` and `limit` |
2637
2629
  | `--timeout-ms <ms>` | Wall-clock budget for the run (default: `7200000` = 2 hours) |
2638
- | `--require-feedback-signal` | Turn the fallback lanes (high salience, proactive maintenance) off for the run: they only select and score assets, and a rewrite needs negative feedback |
2630
+ | `--require-feedback-signal` | Turn the proactive-maintenance lane off for the run, so only assets with recent feedback are planned |
2639
2631
  | `--strategy <name>` | Override the active improve strategy (a built-in or entry under `improve.strategies`) |
2640
2632
  | `--json-to-stdout` | Also emit the full persisted JSON result on stdout for a live run. Without this flag, stdout stays empty. Dry-runs always emit their result and are never persisted. |
2641
2633
  | `--skip-if-locked` | If another improve run already holds the lock, skip gracefully (exit 0) instead of failing with "already running" (exit 75, `TransientError`, code `IMPROVE_LOCK_HELD` — field follow-up to #948: two legitimate `improve` invocations colliding on this lock is ordinary, retryable contention, not a broken config file). Use for high-frequency scheduled runs so they don't pile up failures while a longer run is in progress. |
2642
2634
  | `--require-engines` | Abort (exit 78, before any indexing, lock, or log side effect) if the active strategy would enable a process whose engine or credential cannot be resolved in this process's environment, OR whose endpoint fails a bounded reachability probe — the same probe `akm health`'s `default-llm-engine`/`configured-engines` checks run, once per distinct endpoint. An agent engine's check is that its binary is on PATH, and an `opencode-sdk` engine's is both its binary and, when it sets `llmEngine`, that LLM fallback's endpoint. Without this flag, improve degrades gracefully: it skips the affected processes and reports them in the result's `skippedProcesses`. Recommended alongside `--skip-if-locked` for scheduled runs, since the operator's own shell can pass config validation while a scheduler's stripped-down environment (see #953) cannot. |
2643
2635
  | `--show-prompt` | Print the composed reflect prompt (#952) for one asset and exit — before any lock, index write, or engine dispatch. Requires a fully-qualified asset ref as the scope (`akm improve lessons/my-lesson --show-prompt`); rejected with a type or whole-bundle scope. The default output format is JSON, which carries the prompt as a `prompt` field (escaped into one line) alongside the resolved `engine`/`engineKind`; pass `--format text` to print the prompt itself, unwrapped and readable by eye. |
2644
- | `--sync` / `--no-sync` | Commit (and optionally push) the git-backed primary bundle when the run finishes. Default: on for git-backed bundles (per profile config). |
2645
- | `--push` / `--no-push` | Push after the end-of-run sync commit when writable with a remote configured. `--no-push` commits only, skipping the push. Default: per profile config (`true`). `sync.push` stays outside the autonomy gate — this is a per-run opt-out, not a default change. |
2636
+ | `--sync` / `--no-sync` | Sync the git-backed primary bundle like `akm sync` (fetch and merge the upstream, commit, push) before the run, and commit (and optionally push) when it finishes. A conflict or fetch failure before the run only warns; the run continues on the local state. Default: on for git-backed bundles (per profile config). |
2637
+ | `--push` / `--no-push` | Push after the pre-run and end-of-run sync commits when writable with a remote configured. `--no-push` commits only, skipping the push. Default: per profile config (`true`). `sync.push` stays outside the autonomy gate — this is a per-run opt-out, not a default change. |
2646
2638
 
2647
2639
  `akm improve` is the public entrypoint for whole-bundle, type-scoped, and
2648
2640
  ref-scoped improvement. It owns the memory-cleanup and lesson-distillation
2649
2641
  flow. A qualified scope such as `team//skills/code-review` selects that bundle;
2650
2642
  a different explicit `--bundle` is a usage error.
2651
2643
 
2644
+ A type scope that matches no asset in the stash (a misspelt type, say) prints a warning on stderr, with the
2645
+ nearest real type when one is close, and plans nothing; the exit code stays 0.
2646
+
2652
2647
  A run improves one bundle, the one it writes to, and plans only that bundle's
2653
2648
  assets: an asset that lives in another bundle is left alone even when that
2654
2649
  bundle is writable, and a bare ref scope (`akm improve skills/x`) resolves
2655
2650
  inside the write target only. To improve another bundle, name it
2656
2651
  (`akm improve --bundle team`, or `akm improve team//skills/code-review`). A
2657
2652
  scheduled `akm improve` therefore covers only its write target: schedule one
2658
- `akm improve --bundle <name>` run per other bundle. `--dry-run` and `--plan`
2659
- resolve the bundle the way a live run does (the working bundle starts from
2660
- `AKM_BUNDLE_DIR`, then `defaultBundle`), so they preview the bundle a live run
2653
+ `akm improve --bundle <name>` run per other bundle. `--dry-run`
2654
+ resolves the bundle the way a live run does (the working bundle starts from
2655
+ `AKM_BUNDLE_DIR`, then `defaultBundle`), so it previews the bundle a live run
2661
2656
  improves.
2662
2657
 
2663
2658
  Every stage records what it did with each asset in the improve ledger
@@ -2686,10 +2681,10 @@ covering doc that ranks lower than the 20th nearest goes unseen. With no stored
2686
2681
  vector (semantic search off, or the memory not indexed yet) that check does
2687
2682
  nothing and the exact slug and whole-body checks still apply.
2688
2683
 
2689
- No built-in strategy turns the improve-stage extract process on, and only
2690
- `proactive-maintenance` turns proactive maintenance on, which selects and
2691
- scores due assets but plans no rewrite. Use that strategy or
2692
- set the selected strategy's process `enabled: true` to opt in. The stage toggle does not disable a direct
2684
+ No built-in strategy turns the improve-stage extract process on. Set the
2685
+ selected strategy's process `enabled: true` to opt in. Proactive maintenance is
2686
+ on in `default`; set `processes.proactiveMaintenance.enabled: false` to turn it
2687
+ off. The stage toggle does not disable a direct
2693
2688
  `akm proposal extract --type <harness>` or `akm proposal extract --auto`
2694
2689
  invocation.
2695
2690
 
@@ -2718,18 +2713,16 @@ newer than distill's last attempt. It skips a memory flagged wrong and not
2718
2713
  edited since (a negative feedback in that window judged the body it still has,
2719
2714
  or, recorded without that body's hash, is newer than the file's last write),
2720
2715
  and a memory whose only feedback in that window is positive with no reason or
2721
- note, unless the ref is explicit. Two fallback lanes pick refs
2722
- with no such feedback: high salience (content-scored refs at or above
2723
- `improve.salience.salienceThreshold`, default `0.75`, that were never reflected,
2724
- capped at 10% of the limit, at least one ref) and, in a strategy that enables
2725
- `proactiveMaintenance`, refs due for a revisit. They only select and score refs
2726
- (salience and outcome) and plan nothing, so improve does not rewrite on a
2727
- proactive cadence; they pick only refs in the
2716
+ note, unless the ref is explicit. In a strategy that enables
2717
+ `proactiveMaintenance` (`default` does), a further lane plans refs with no such
2718
+ feedback that are due for a revisit: at most `maxPerRun` (default 15) per run,
2719
+ only refs not reflected or distilled for `dueDays` (default 30), so each comes up
2720
+ at most once a month. It picks only refs in the
2728
2721
  [retrieval scope](https://github.com/itlackey/akm/blob/main/docs/architecture/improvement.md#retrieval-scope): returned by
2729
2722
  `search`, `curate` or `show`, or named by feedback, in the last 90 days, or new
2730
2723
  material no improve stage has processed. The planned refs are ranked by salience
2731
2724
  and cut to the limit; an explicit ref scope bypasses every gate. Use
2732
- `--require-feedback-signal` to turn the fallback lanes off for the run.
2725
+ `--require-feedback-signal` to turn that lane off for the run.
2733
2726
 
2734
2727
  When the active strategy enables a process (or the triage judgment engine)
2735
2728
  whose engine or credential cannot be resolved in this process's environment,
@@ -2744,7 +2737,7 @@ itself. `ok` and the exit code are unchanged either way, matching `extract`'s
2744
2737
  `skippedProcesses` (or pass `--require-engines` to abort instead of
2745
2738
  degrading). `reason` names which engine and which credential reference (an env
2746
2739
  var, `apiKeyFile` path, or `secret://` reference — never its value) is
2747
- missing. A `--dry-run`/`--plan` preview never dispatches, so it never aborts
2740
+ missing. A `--dry-run` preview never dispatches, so it never aborts
2748
2741
  on an unavailable credential either — even a strategy left with every process
2749
2742
  disabled this way still returns its plan, with the affected processes in
2750
2743
  `skippedProcesses`.
@@ -2795,11 +2788,11 @@ still carries that engine's `engine`/`model`/`engineKind` alongside
2795
2788
  `unavailable`, rather than omitting them the way a never-configured process
2796
2789
  does — so a preview can show what would have run. This table is
2797
2790
  resolved before any dispatch on every invocation (dry or live), so
2798
- `akm improve --dry-run --strategy <name>` (or `--plan`) previews an ad-hoc
2791
+ `akm improve --dry-run --strategy <name>` previews an ad-hoc
2799
2792
  strategy override without changing config first; `akm health`'s
2800
2793
  `active-improve-strategy` check performs the equivalent resolution but only
2801
2794
  for the configured default strategy (`defaults.improveStrategy`), and reports
2802
- no model or per-process notices. Neither `--dry-run` nor `--plan` probes
2795
+ no model or per-process notices. `--dry-run` does not probe
2803
2796
  engine reachability over the network — pair with `akm health --probe` (or the
2804
2797
  default probe-on behavior) to check whether a named engine actually answers.
2805
2798
 
@@ -2824,9 +2817,12 @@ destination than `memory`.
2824
2817
  `akm improve report` (#944) answers "which engine did each model-calling process
2825
2818
  use this run, how much did it cost, and which enabled processes made zero
2826
2819
  calls (and why)" without hand-written SQLite against `state.db`. It is a
2827
- `scope` value, not a subcommand — `report` is not, and will never be, a real
2828
- asset type, so it is intercepted before any lock/log/index side effect (same
2829
- precedent as the retired `canary` scope).
2820
+ real subcommand (`report` is not an asset type, so it is not a scope of the
2821
+ improve run). It takes two flags of its own, `--run <id>` (the usage report for
2822
+ one specific `improve_runs` row instead of the most recent real run) and
2823
+ `--since <window>` (aggregate over every real, non-dry-run run started since a
2824
+ duration like `24h`/`7d` or an ISO timestamp); they are mutually exclusive, and on
2825
+ `akm improve` itself they are unknown flags (exit 2).
2830
2826
 
2831
2827
  Every real (non-dry-run) `akm improve` invocation persists a `usageReport`
2832
2828
  field on the result (`result_json` in `improve_runs`, and in the
@@ -2861,7 +2857,7 @@ support.
2861
2857
 
2862
2858
  #### improve judge
2863
2859
 
2864
- `akm improve judge` runs reflect's quality judge on one revision and prints its
2860
+ `akm improve judge` (a real subcommand; `--strategy` is its only flag) runs reflect's quality judge on one revision and prints its
2865
2861
  verdict, for testing a judge engine on revisions whose right answer you know. It
2866
2862
  reads `{"source": "...", "candidate": "...", "feedback": "...", "ref": "..."}` JSON
2867
2863
  from stdin (`feedback` and `ref` are optional; `ref` names the revised asset,
@@ -2888,15 +2884,15 @@ single queue.
2888
2884
 
2889
2885
  New qualified proposals record their destination source name and materialized
2890
2886
  root. `proposal diff`, `accept`, and `revert` use that recorded target by
2891
- default; an explicit `--target` must resolve to the same source and root or the
2887
+ default; an explicit `--bundle` must resolve to the same source and root or the
2892
2888
  command fails with exit 2. An unbound proposal in a selected non-primary queue
2893
2889
  uses that authenticated queue root. A short historical unbound proposal
2894
- mutation requires either an explicit `--target` or a selected `--queue` that
2890
+ mutation requires either an explicit `--bundle` or a selected `--queue` that
2895
2891
  authenticates its root; it never falls back to an ambient write target.
2896
2892
 
2897
2893
  #### proposal extract
2898
2894
 
2899
- **Experimental** (see [STABILITY.md](../../STABILITY.md)): session extraction is still being measured in 0.10.
2895
+ **Evolving** (see [STABILITY.md](../../STABILITY.md)): measured by the extract eval; 0.10 is still settling the improve defaults, so it is not yet Stable.
2900
2896
 
2901
2897
  Extract durable insights from native coding-agent session files (claude-code,
2902
2898
  codex, opencode) and queue them as proposals. This is the standalone
@@ -3054,7 +3050,7 @@ akm proposal accept <id>
3054
3050
  akm proposal accept 7c115132 # 8-char UUID prefix
3055
3051
  akm proposal accept skills/akm-dream # Asset ref
3056
3052
  akm proposal accept <id> --queue team-bundle
3057
- akm proposal accept <id> --target team-bundle # Must match a recorded target
3053
+ akm proposal accept <id> --bundle team-bundle # Must match a recorded target
3058
3054
  akm proposal accept --generator reflect -y # Bulk-accept by generator (requires -y)
3059
3055
  akm proposal accept --generator reflect --max-diff-lines 50 -y # ...only if <= 50 lines
3060
3056
  akm proposal accept --generator reflect --older-than 7 --dry-run # Preview a bulk accept
@@ -3063,7 +3059,7 @@ akm proposal accept --generator reflect --older-than 7 --dry-run # Preview a bu
3063
3059
  | Flag | Description |
3064
3060
  | --- | --- |
3065
3061
  | `--queue <source>` | Select the proposal queue by configured writable source name |
3066
- | `--target <name>` | Write destination; must match the proposal's recorded target |
3062
+ | `--bundle <name>` | Write destination; must match the proposal's recorded target |
3067
3063
  | `--generator <name>` | Bulk-accept all pending proposals from this generator (e.g. `reflect`, `distill`). Requires no positional id. |
3068
3064
  | `--max-diff-lines` | When bulk-accepting, only accept proposals whose content is `<=` this many lines. Larger proposals are skipped. |
3069
3065
  | `--older-than` | When bulk-accepting, only accept proposals created (or last reopened) more than this many days ago |
@@ -3183,8 +3179,8 @@ A reopened retire proposal no longer counts as a settled pair for the pair
3183
3179
  pass, and while it is pending that pair is not proposed a second time. The
3184
3180
  proposal's `improve_ledger` row goes back to what the mint wrote (a retire
3185
3181
  proposal's mint writes none, so the row its rejection created is dropped).
3186
- The age that retention expiry and `--older-than` see restarts at the reopen
3187
- (retire proposals never expire), and a `proposal_reopened` event is appended.
3182
+ The age that retention expiry and `--older-than` see restarts at the reopen,
3183
+ and a `proposal_reopened` event is appended.
3188
3184
  Accepting a reopened retire proposal archives the retired file exactly as for
3189
3185
  any retire proposal, and `akm proposal revert` restores it byte-exactly.
3190
3186
 
@@ -3203,13 +3199,13 @@ to `reverted` and appends a `proposal_reverted` event to the audit log.
3203
3199
  akm proposal revert <id>
3204
3200
  akm proposal revert skills/akm-dream # Asset ref
3205
3201
  akm proposal revert <id> --queue team-bundle
3206
- akm proposal revert <id> --target team-bundle # Must match a recorded target
3202
+ akm proposal revert <id> --bundle team-bundle # Must match a recorded target
3207
3203
  ```
3208
3204
 
3209
3205
  | Flag | Description |
3210
3206
  | --- | --- |
3211
3207
  | `--queue <source>` | Select the proposal queue by configured writable source name |
3212
- | `--target <name>` | Select the destination for an unbound proposal, or confirm a recorded destination; a conflict with a recorded target is rejected |
3208
+ | `--bundle <name>` | Select the destination for an unbound proposal, or confirm a recorded destination; a conflict with a recorded target is rejected |
3213
3209
 
3214
3210
  Accepts the full proposal UUID or the asset ref. UUID prefixes are **not**
3215
3211
  supported for reverting (archived proposals require the full identifier). Errors
@@ -3226,13 +3222,13 @@ akm proposal diff <id>
3226
3222
  akm proposal diff skills/akm-dream # Asset ref form
3227
3223
  akm proposal diff 7c115132 # 8-char UUID prefix
3228
3224
  akm proposal diff <id> --queue team-bundle
3229
- akm proposal diff <id> --target team-bundle # Must match a recorded target
3225
+ akm proposal diff <id> --bundle team-bundle # Must match a recorded target
3230
3226
  ```
3231
3227
 
3232
3228
  | Flag | Description |
3233
3229
  | --- | --- |
3234
3230
  | `--queue <source>` | Select the proposal queue by configured writable source name |
3235
- | `--target <name>` | Select an unbound destination or confirm a recorded one for `proposal accept`, `diff`, or `revert`; a conflict with a recorded target is rejected |
3231
+ | `--bundle <name>` | Select an unbound destination or confirm a recorded one for `proposal accept`, `diff`, or `revert`; a conflict with a recorded target is rejected |
3236
3232
 
3237
3233
  `proposal accept` runs full validation before promoting. `proposal reject`
3238
3234
  requires `--reason`.
@@ -3279,8 +3275,15 @@ one at a time. One rule decides each proposal: a proposal whose quality judge
3279
3275
  passed on its current content is accepted (unless its target changed since it
3280
3276
  was minted — that one is auto-rejected as `stale-target`); an empty diff is
3281
3277
  rejected; a proposal that reflect or distill deferred for review is left for a
3282
- person; everything else goes to the judgment tier when one is enabled, and
3283
- is otherwise left for review. A reflect revision that changes the body, and
3278
+ person; a proposal from the proactive-maintenance lane (no feedback behind it)
3279
+ is left for a person too (reason `proactive-needs-review`), even when its judge
3280
+ passed it; everything else goes to the judgment tier when one is enabled, and
3281
+ is otherwise left for review. The judgment tier may accept only a consolidate
3282
+ promotion (a memory proposed as a new knowledge note); any other kind it would
3283
+ accept, such as a retirement or a reflect revision, is left for a
3284
+ person (reason `judgment-not-promotion`). Judged over every kind, the tier
3285
+ accepted unsafe retirements, applied exact fixes unreviewed and changed notes
3286
+ nobody had touched: 6 to 14 harmed items a night on two models (#1132). A reflect revision that changes the body, and
3284
3287
  every distill lesson or knowledge promotion, is deferred for review even when
3285
3288
  its judge passes it. Default mode stages decisions (queue mode); pass
3286
3289
  `--promote` to actually accept.
@@ -3299,7 +3302,7 @@ akm proposal drain --strategy default --promote -y # Read the triage block from
3299
3302
  | `--dry-run` | List what would be accepted/rejected/deferred, without writing |
3300
3303
  | `--max-accepts` | Hard per-run accept ceiling; accepts beyond this are reported as `skippedByCap` |
3301
3304
  | `--older-than` | Only consider proposals created (or last reopened) more than this many days ago |
3302
- | `--judgment` | Explicitly enable the judgment tier for this standalone drain, including when the selected strategy says `judgment.enabled: false`; execution overrides still come from that strategy. Without this flag, strategy judgment config does not enable standalone drain judgment. A missing runner remains a no-op with a logged `triage_deferred` summary. |
3305
+ | `--judgment` | Explicitly enable the judgment tier for this standalone drain, including when the selected strategy says `judgment.enabled: false`; it accepts only consolidate promotions (#1132); execution overrides still come from that strategy. Without this flag, strategy judgment config does not enable standalone drain judgment. A missing runner remains a no-op with a logged `triage_deferred` summary. |
3303
3306
  | `-y`, `--yes` | Skip the confirmation prompt (required in non-interactive mode for promotion) |
3304
3307
 
3305
3308
  ### feedback (`--reason`)
@@ -3325,15 +3328,14 @@ shell commands. It manages on-disk task definitions under
3325
3328
  (cron / launchd / schtasks). Task source v4 YAML (`version: 4`) is the only
3326
3329
  executable source contract this release accepts; `akm task add` writes v4 —
3327
3330
  see the canonical [Tasks reference](tasks.md). The
3328
- group is `add | enable | disable | run | explain | validate | list | sync | doctor | history | prune`
3331
+ group is `add | enable | disable | run | explain | validate | sync | doctor | history | prune`
3329
3332
  — there is no `show` or `remove`; use `akm show tasks/<id>` to inspect one
3330
3333
  task. Use `task enable` / `task disable` for host-local activation; edit the
3331
3334
  file only to change the authored schedule or remove the task.
3332
- `task list` is a delegating alias for `akm search --type task` — both
3333
- spellings return the identical envelope.
3335
+ List tasks with `akm search --type task`.
3334
3336
 
3335
3337
  ```sh
3336
- akm task list # List tasks (cross-bundle) — alias for `search --type task`
3338
+ akm search --type task # List tasks (cross-bundle)
3337
3339
  akm show tasks/<id> # Inspect one task
3338
3340
  akm task add <id> --schedule "@daily" \ # Register a new task and install it
3339
3341
  --command "akm improve --strategy default"
@@ -3344,7 +3346,6 @@ akm task enable team//tasks/nightly # Add local activation and sync its bu
3344
3346
  akm task disable team//tasks/nightly # Remove local activation and unschedule it
3345
3347
  akm task run <id> # Execute now (what the scheduler calls)
3346
3348
  akm task explain <ref> # Read-only: declared inputs, target, schedule — spawns nothing
3347
- akm task validate <path> # Read-only: parse one task file by path, report sync's diagnostic
3348
3349
  akm task history [<id>] [--id <id>] [--limit <n>] # Recent runs from state.db (positional id == --id)
3349
3350
  akm task sync # Reconcile activated refs from all enabled configured bundles
3350
3351
  akm task sync --dry-run # Preview the reconcile — zero scheduler writes
@@ -3360,13 +3361,6 @@ this host's scheduler activation), `--force` (overwrite an existing task with
3360
3361
  the same id), and `--rebind` (also point the bundle's installed scheduler rows
3361
3362
  at this akm invocation, as `akm task sync --rebind` does).
3362
3363
 
3363
- `akm task list [<query>] [--limit <n>] [--from local|registry|all]` is a
3364
- pure alias for `akm search --type task` with the query, `--limit`, and
3365
- `--from` flags passed through — same envelope, same `results` alias, no
3366
- second implementation. 0.9.0 removed `task list` as a redundant
3367
- implementation of task listing (see the 0.9.0 CHANGELOG entry); this
3368
- reintroduces only the spelling, not the logic.
3369
-
3370
3364
  `akm task explain <ref> [input flags]` prints a task's declared `inputs:`,
3371
3365
  the values that would actually be supplied (with provenance), the resolved
3372
3366
  target, effective execution settings, and schedule bindings — **read-only**:
@@ -3374,28 +3368,6 @@ it never spawns anything, writes history, or touches the scheduler. A
3374
3368
  secret-shaped value prints as `<redacted>`. See
3375
3369
  [`akm task explain`](tasks.md#akm-task-explain).
3376
3370
 
3377
- `akm task validate <path>` parses ONE task file by filesystem path — not a
3378
- concept ref or id, and the file need not live in any configured bundle —
3379
- and reports the same diagnostic `akm task sync` would produce for it,
3380
- INCLUDING sync's own cron-dialect check and its per-schedule-entry
3381
- input-contract check (so a file `sync` would reject can never be reported
3382
- `valid` here): `{ok, path, sourceVersion, outcome, reason?,
3383
- resolved?}` where `outcome` is `valid` (parses as task source v4 directly
3384
- and passes both sync checks), `blocked` (task v2/v3 that must first be
3385
- rewritten by `akm migrate apply`), `invalid` (the YAML doesn't parse, or the document fails schema
3386
- validation, or it parsed but fails one of the two sync checks), or
3387
- `not-a-task` (the YAML parses but never declares a `version:` field — not
3388
- shaped like a task source). `resolved` is the compiled task shape
3389
- `akm task sync` itself would build a scheduler binding from — id, the
3390
- compiled schema version, resolved `uses`/`run` target, declared `inputs`
3391
- contract, and `schedule` bindings — present only on `valid`.
3392
- Unlike `akm task explain`, it never runs execution lowering: a command-kind
3393
- task validates the same whether or not the local config has an engine
3394
- configured. Exits 0 for `valid`, 1 for
3395
- `blocked`/`invalid`/`not-a-task`, 2 for a missing or unreadable path.
3396
- **Read-only**: it never touches the scheduler and never requires the file to
3397
- be indexed or wired into a bundle.
3398
-
3399
3371
  `akm task run` is what cron / launchd / schtasks invoke at the scheduled
3400
3372
  time. Each run is recorded as a row in the durable `task_history` table
3401
3373
  (`state.db`), surfaced by `akm task history` — **not** by `akm log`; there is