akm-cli 0.9.0-rc.5 → 0.9.0-rc.6

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 (430) hide show
  1. package/CHANGELOG.md +116 -26
  2. package/README.md +7 -7
  3. package/SECURITY.md +11 -10
  4. package/dist/akm +2 -2
  5. package/dist/akm-migrate-storage +2 -2
  6. package/dist/assets/hints/cli-hints-full.md +60 -73
  7. package/dist/assets/hints/cli-hints-short.md +8 -12
  8. package/dist/assets/improve-strategies/default.json +5 -7
  9. package/dist/assets/improve-strategies/frequent.json +2 -2
  10. package/dist/assets/improve-strategies/proactive-maintenance.json +2 -2
  11. package/dist/assets/improve-strategies/quick.json +1 -1
  12. package/dist/assets/improve-strategies/reflect-distill.json +3 -3
  13. package/dist/assets/improve-strategies/thorough.json +1 -1
  14. package/dist/assets/prompts/consolidate-system.md +5 -5
  15. package/dist/assets/prompts/extract-session.md +2 -6
  16. package/dist/assets/prompts/reflect-llm-framed-contract.md +11 -0
  17. package/dist/assets/prompts/reflect-llm-schema-contract.md +3 -0
  18. package/dist/assets/prompts/reflect-output-repair.md +3 -0
  19. package/dist/assets/stash-skeleton/README.md +10 -11
  20. package/dist/assets/stash-skeleton/facts/conventions/assets/agent.md +1 -1
  21. package/dist/assets/stash-skeleton/facts/conventions/assets/fact.md +1 -1
  22. package/dist/assets/stash-skeleton/facts/conventions/assets/knowledge.md +1 -1
  23. package/dist/assets/stash-skeleton/facts/conventions/assets/lesson.md +2 -2
  24. package/dist/assets/stash-skeleton/facts/conventions/assets/memory.md +2 -2
  25. package/dist/assets/stash-skeleton/facts/conventions/assets/script.md +1 -1
  26. package/dist/assets/stash-skeleton/facts/conventions/assets/skill.md +2 -2
  27. package/dist/assets/stash-skeleton/facts/conventions/assets/workflow.md +1 -1
  28. package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +18 -18
  29. package/dist/assets/stash-skeleton/facts/conventions/domains.md +8 -9
  30. package/dist/assets/stash-skeleton/facts/conventions/organization.md +13 -15
  31. package/dist/assets/tasks/core/extract.yml +2 -2
  32. package/dist/assets/tasks/core/improve.yml +1 -1
  33. package/dist/assets/templates/html/health.html +2 -3
  34. package/dist/cli/config-migrate.js +1328 -101
  35. package/dist/cli/invocation.js +255 -0
  36. package/dist/cli/parse-args.js +20 -83
  37. package/dist/cli/shared.js +15 -37
  38. package/dist/cli.js +18 -49
  39. package/dist/commands/agent/agent-dispatch.js +2 -2
  40. package/dist/commands/agent/contribute-cli.js +5 -4
  41. package/dist/commands/bundle/bundle-cli.js +68 -0
  42. package/dist/commands/bundle/bundle.js +219 -0
  43. package/dist/commands/completions.js +2 -2
  44. package/dist/commands/config-cli.js +6 -3
  45. package/dist/commands/env/env-binding.js +13 -9
  46. package/dist/commands/env/env-cli.js +49 -48
  47. package/dist/commands/env/secret-cli.js +24 -10
  48. package/dist/commands/events.js +2 -2
  49. package/dist/commands/feedback-cli.js +59 -33
  50. package/dist/commands/graph/graph.js +6 -4
  51. package/dist/commands/health/advisories.js +4 -4
  52. package/dist/commands/health/html-report.js +190 -593
  53. package/dist/commands/health/improve-metrics.js +240 -188
  54. package/dist/commands/health/metrics.js +9 -17
  55. package/dist/commands/health/report-view-model.js +509 -0
  56. package/dist/commands/health/surfaces.js +6 -3
  57. package/dist/commands/health/types-checks.js +4 -0
  58. package/dist/commands/health/types-improve.js +22 -0
  59. package/dist/commands/health/types-metrics.js +4 -0
  60. package/dist/commands/health/types-result.js +7 -0
  61. package/dist/commands/health/types-runs.js +4 -0
  62. package/dist/commands/health/types-session-log.js +4 -0
  63. package/dist/commands/health/types-windows.js +4 -0
  64. package/dist/commands/health/types.js +26 -21
  65. package/dist/commands/health/windows.js +1 -2
  66. package/dist/commands/health.js +219 -161
  67. package/dist/commands/improve/collapse-detector.js +25 -14
  68. package/dist/commands/improve/consolidate/chunking.js +7 -5
  69. package/dist/commands/improve/consolidate.js +640 -740
  70. package/dist/commands/improve/content-hash.js +39 -0
  71. package/dist/commands/improve/distill/content-repair.js +4 -10
  72. package/dist/commands/improve/distill/promote-memory.js +73 -47
  73. package/dist/commands/improve/distill/quality-gate.js +30 -15
  74. package/dist/commands/improve/distill-promotion-policy.js +24 -885
  75. package/dist/commands/improve/distill.js +564 -341
  76. package/dist/commands/improve/eligibility.js +75 -36
  77. package/dist/commands/improve/extract-cli.js +6 -6
  78. package/dist/commands/improve/extract-prompt.js +5 -34
  79. package/dist/commands/improve/extract.js +524 -358
  80. package/dist/commands/improve/feedback-valence.js +2 -12
  81. package/dist/commands/improve/improve-cli.js +11 -20
  82. package/dist/commands/improve/improve-result-file.js +7 -6
  83. package/dist/commands/improve/improve-run-types.js +4 -0
  84. package/dist/commands/improve/improve-strategies.js +3 -9
  85. package/dist/commands/improve/improve.js +781 -668
  86. package/dist/commands/improve/locks.js +6 -2
  87. package/dist/commands/improve/loop-stages.js +938 -965
  88. package/dist/commands/improve/memory/derived-ref.js +122 -0
  89. package/dist/commands/improve/memory/memory-contradiction-detect.js +35 -38
  90. package/dist/commands/improve/memory/memory-improve.js +24 -37
  91. package/dist/commands/improve/outcome-loop.js +13 -33
  92. package/dist/commands/improve/preparation.js +886 -692
  93. package/dist/commands/improve/proactive-maintenance.js +33 -3
  94. package/dist/commands/improve/proposal-envelope.js +31 -0
  95. package/dist/commands/improve/reflect.js +962 -549
  96. package/dist/commands/improve/run-context.js +119 -0
  97. package/dist/commands/improve/salience.js +8 -4
  98. package/dist/commands/improve/session-asset.js +7 -3
  99. package/dist/commands/improve/shared.js +14 -40
  100. package/dist/commands/improve/source-identity.js +39 -26
  101. package/dist/commands/improve/triage.js +20 -17
  102. package/dist/commands/lint/base-linter.js +288 -295
  103. package/dist/commands/lint/index.js +132 -19
  104. package/dist/commands/mv-cli.js +257 -234
  105. package/dist/commands/observability-cli.js +2 -1
  106. package/dist/commands/proposal/diff-format.js +50 -0
  107. package/dist/commands/proposal/drain-policies.js +0 -6
  108. package/dist/commands/proposal/drain.js +17 -16
  109. package/dist/commands/proposal/proposal-cli.js +40 -77
  110. package/dist/commands/proposal/proposal-types.js +56 -0
  111. package/dist/commands/proposal/proposal.js +39 -1
  112. package/dist/commands/proposal/propose.js +41 -19
  113. package/dist/commands/proposal/repository.js +566 -486
  114. package/dist/commands/proposal/validators/proposal-quality-validators.js +22 -6
  115. package/dist/commands/proposal/validators/proposal-validators.js +6 -5
  116. package/dist/commands/proposal/validators/proposals.js +5 -4
  117. package/dist/commands/read/curate.js +50 -28
  118. package/dist/commands/read/knowledge.js +25 -16
  119. package/dist/commands/read/remember-cli.js +12 -4
  120. package/dist/commands/read/search-cli.js +33 -33
  121. package/dist/commands/read/search.js +68 -55
  122. package/dist/commands/read/show.js +54 -135
  123. package/dist/commands/remember.js +7 -5
  124. package/dist/commands/sources/add-cli.js +10 -24
  125. package/dist/commands/sources/bundle-config-ops.js +58 -0
  126. package/dist/commands/sources/history.js +13 -8
  127. package/dist/commands/sources/info.js +10 -11
  128. package/dist/commands/sources/init.js +12 -21
  129. package/dist/commands/sources/installed-stashes.js +151 -138
  130. package/dist/commands/sources/schema-repair.js +5 -3
  131. package/dist/commands/sources/self-update.js +9 -7
  132. package/dist/commands/sources/source-add.js +116 -154
  133. package/dist/commands/sources/source-clone.js +33 -14
  134. package/dist/commands/sources/source-manage.js +43 -32
  135. package/dist/commands/sources/sources-cli.js +12 -7
  136. package/dist/commands/sources/stash-cli.js +12 -5
  137. package/dist/commands/sources/stash-skeleton.js +1 -1
  138. package/dist/commands/tasks/default-tasks.js +13 -13
  139. package/dist/commands/tasks/tasks-cli.js +3 -3
  140. package/dist/commands/tasks/tasks.js +71 -31
  141. package/dist/commands/workflow-cli.js +22 -26
  142. package/dist/core/action-contributors.js +1 -1
  143. package/dist/core/activation-policy.js +49 -0
  144. package/dist/core/adapter/adapters/agent-skills-adapter.js +181 -0
  145. package/dist/core/adapter/adapters/akm-adapter.js +509 -0
  146. package/dist/core/adapter/adapters/akm-lint.js +381 -0
  147. package/dist/core/adapter/adapters/akm-metadata.js +416 -0
  148. package/dist/core/adapter/adapters/akm-task-adapter.js +150 -0
  149. package/dist/core/adapter/adapters/akm-workflow-adapter.js +196 -0
  150. package/dist/core/adapter/adapters/claude-adapter.js +61 -0
  151. package/dist/core/adapter/adapters/dotenv-adapter.js +187 -0
  152. package/dist/core/adapter/adapters/generic-files-adapter.js +117 -0
  153. package/dist/core/adapter/adapters/index.js +80 -0
  154. package/dist/core/adapter/adapters/llm-wiki-adapter.js +413 -0
  155. package/dist/core/adapter/adapters/okf-adapter.js +223 -0
  156. package/dist/core/adapter/adapters/opencode-adapter.js +68 -0
  157. package/dist/core/adapter/adapters/shared.js +286 -0
  158. package/dist/core/adapter/adapters/tool-dir-shared.js +212 -0
  159. package/dist/core/adapter/adapters/website-snapshot-adapter.js +154 -0
  160. package/dist/core/adapter/bundle-adapter.js +4 -0
  161. package/dist/core/adapter/recognize-match.js +42 -0
  162. package/dist/core/adapter/registry.js +56 -0
  163. package/dist/core/adapter/types.js +4 -0
  164. package/dist/core/asset/asset-placement.js +229 -0
  165. package/dist/core/asset/asset-ref.js +107 -78
  166. package/dist/core/asset/asset-serialize.js +20 -0
  167. package/dist/core/asset/frontmatter.js +1 -1
  168. package/dist/core/asset/resolve-ref.js +223 -0
  169. package/dist/core/asset/stash-meta.js +1 -1
  170. package/dist/core/common.js +141 -49
  171. package/dist/core/config/config-io.js +0 -108
  172. package/dist/core/config/config-schema.js +94 -1039
  173. package/dist/core/config/config-sources.js +115 -36
  174. package/dist/core/config/config-types.js +16 -11
  175. package/dist/core/config/config-walker.js +4 -2
  176. package/dist/core/config/config.js +21 -26
  177. package/dist/core/config/engine-semantics.js +0 -4
  178. package/dist/core/config/schema/embedding.js +38 -0
  179. package/dist/core/config/schema/engines.js +116 -0
  180. package/dist/core/config/schema/feedback.js +31 -0
  181. package/dist/core/config/schema/improve-processes.js +395 -0
  182. package/dist/core/config/schema/improve.js +76 -0
  183. package/dist/core/config/schema/index-config.js +183 -0
  184. package/dist/core/config/schema/output.js +15 -0
  185. package/dist/core/config/schema/primitives.js +94 -0
  186. package/dist/core/config/schema/search.js +30 -0
  187. package/dist/core/config/schema/setup.js +27 -0
  188. package/dist/core/config/schema/sources-bundles.js +164 -0
  189. package/dist/core/config/schema/workflow.js +29 -0
  190. package/dist/core/env-secret-ref.js +113 -8
  191. package/dist/core/errors.js +1 -1
  192. package/dist/core/events-types.js +4 -0
  193. package/dist/core/file-change.js +16 -0
  194. package/dist/core/fs-txn.js +316 -0
  195. package/dist/core/git-message.js +59 -0
  196. package/dist/core/improve-result.js +9 -1
  197. package/dist/core/logs-db.js +1 -1
  198. package/dist/core/migration-backup.js +332 -160
  199. package/dist/core/paths.js +3 -6
  200. package/dist/core/platform.js +10 -0
  201. package/dist/core/recognition-util.js +130 -0
  202. package/dist/core/redaction.js +2 -2
  203. package/dist/core/standards/resolve-standards-context.js +47 -64
  204. package/dist/core/standards/resolve-type-conventions.js +3 -3
  205. package/dist/core/state/migrations.js +201 -8
  206. package/dist/core/state-db.js +38 -2
  207. package/dist/core/subprocess.js +303 -0
  208. package/dist/core/time.js +20 -0
  209. package/dist/core/type-presentation.js +130 -0
  210. package/dist/core/write-source.js +38 -67
  211. package/dist/indexer/bundle-identity-guard.js +91 -0
  212. package/dist/indexer/db/graph-db.js +1 -1
  213. package/dist/indexer/db/llm-cache.js +1 -1
  214. package/dist/indexer/ensure-index.js +28 -10
  215. package/dist/indexer/graph/graph-boost.js +28 -24
  216. package/dist/indexer/graph/graph-extraction.js +5 -6
  217. package/dist/indexer/graph/graph-types.js +4 -0
  218. package/dist/indexer/index-written-assets.js +44 -17
  219. package/dist/indexer/indexer.js +289 -153
  220. package/dist/indexer/init.js +18 -25
  221. package/dist/indexer/installations.js +224 -0
  222. package/dist/indexer/passes/dir-staleness.js +2 -1
  223. package/dist/indexer/passes/memory-inference.js +8 -4
  224. package/dist/indexer/passes/metadata.js +96 -243
  225. package/dist/indexer/scan/doc-to-entry.js +123 -0
  226. package/dist/indexer/scan/drain-dir.js +144 -0
  227. package/dist/indexer/search/db-search.js +171 -99
  228. package/dist/indexer/search/fts-query.js +1 -1
  229. package/dist/indexer/search/ranking-contributors.js +57 -7
  230. package/dist/indexer/search/ranking-types.js +4 -0
  231. package/dist/indexer/search/ranking.js +31 -6
  232. package/dist/indexer/search/search-attribution.js +67 -0
  233. package/dist/indexer/search/search-hit-enrichers.js +30 -40
  234. package/dist/indexer/search/search-source.js +109 -52
  235. package/dist/indexer/search/semantic-status.js +4 -1
  236. package/dist/indexer/usage/unmigrated-vaults-guard.js +2 -1
  237. package/dist/indexer/usage/usage-events.js +72 -9
  238. package/dist/indexer/walk/file-context.js +1 -44
  239. package/dist/indexer/walk/matchers.js +16 -32
  240. package/dist/indexer/walk/path-resolver.js +6 -5
  241. package/dist/indexer/walk/walker.js +4 -2
  242. package/dist/integrations/agent/engine-resolution.js +22 -0
  243. package/dist/integrations/agent/model-aliases.js +1 -1
  244. package/dist/integrations/agent/prompts.js +35 -11
  245. package/dist/integrations/agent/spawn.js +41 -270
  246. package/dist/integrations/harnesses/aider/agent-builder.js +2 -2
  247. package/dist/integrations/harnesses/aider/index.js +2 -11
  248. package/dist/integrations/harnesses/amazonq/agent-builder.js +1 -9
  249. package/dist/integrations/harnesses/amazonq/index.js +3 -16
  250. package/dist/integrations/harnesses/claude/config-import.js +1 -3
  251. package/dist/integrations/harnesses/claude/index.js +1 -12
  252. package/dist/integrations/harnesses/claude/session-log.js +27 -65
  253. package/dist/integrations/harnesses/codex/agent-builder.js +1 -2
  254. package/dist/integrations/harnesses/codex/index.js +2 -12
  255. package/dist/integrations/harnesses/copilot/agent-builder.js +2 -3
  256. package/dist/integrations/harnesses/copilot/index.js +1 -12
  257. package/dist/integrations/harnesses/gemini/agent-builder.js +1 -3
  258. package/dist/integrations/harnesses/gemini/index.js +1 -12
  259. package/dist/integrations/harnesses/ids.js +24 -0
  260. package/dist/integrations/harnesses/index.js +27 -2
  261. package/dist/integrations/harnesses/opencode/config-import.js +1 -3
  262. package/dist/integrations/harnesses/opencode/index.js +1 -12
  263. package/dist/integrations/harnesses/opencode/session-log.js +67 -110
  264. package/dist/integrations/harnesses/opencode-sdk/harness.js +2 -11
  265. package/dist/integrations/harnesses/openhands/agent-builder.js +3 -3
  266. package/dist/integrations/harnesses/openhands/index.js +2 -11
  267. package/dist/integrations/harnesses/pi/agent-builder.js +3 -11
  268. package/dist/integrations/harnesses/pi/index.js +3 -15
  269. package/dist/integrations/harnesses/shared.js +17 -0
  270. package/dist/integrations/harnesses/types.js +37 -2
  271. package/dist/integrations/lockfile.js +36 -0
  272. package/dist/integrations/session-logs/index.js +21 -12
  273. package/dist/integrations/session-logs/provider-base.js +113 -0
  274. package/dist/llm/embedders/deterministic.js +2 -2
  275. package/dist/llm/embedders/remote.js +8 -4
  276. package/dist/llm/graph-extract.js +7 -2
  277. package/dist/llm/metadata-enhance.js +43 -26
  278. package/dist/llm/structured-call.js +15 -7
  279. package/dist/migrate/legacy/config-source-migration.js +223 -0
  280. package/dist/migrate/legacy/content-migration.js +305 -0
  281. package/dist/migrate/legacy/legacy-layout.js +779 -0
  282. package/dist/migrate/legacy/legacy-paths.js +25 -0
  283. package/dist/migrate/legacy/legacy-stash-json.js +72 -0
  284. package/dist/migrate/legacy/proposal-fs-import.js +168 -0
  285. package/dist/migrate/legacy/task-target-ref-migration.js +272 -0
  286. package/dist/migrate/legacy/three-db-cutover.js +840 -0
  287. package/dist/migrate/legacy/workflow-migrations-bodies.js +52 -0
  288. package/dist/migrate/legacy/workflow-migrations-frozen.js +21 -0
  289. package/dist/migrate/legacy-ref-grammar.js +209 -0
  290. package/dist/output/command-registry.js +27 -0
  291. package/dist/output/html-render.js +11 -16
  292. package/dist/output/renderers.js +32 -276
  293. package/dist/output/shapes/passthrough.js +3 -9
  294. package/dist/output/shapes/registry.js +12 -6
  295. package/dist/output/text/command-format.js +547 -0
  296. package/dist/output/text/helpers.js +15 -1377
  297. package/dist/output/text/proposal-format.js +230 -0
  298. package/dist/output/text/registry.js +12 -6
  299. package/dist/output/text/show-directives.js +107 -0
  300. package/dist/output/text/show-format.js +103 -0
  301. package/dist/output/text/workflow-format.js +345 -0
  302. package/dist/output/text.js +1 -3
  303. package/dist/registry/build-index.js +13 -17
  304. package/dist/registry/providers/static-index.js +2 -2
  305. package/dist/registry/resolve.js +4 -90
  306. package/dist/registry/semver.js +93 -0
  307. package/dist/runtime.js +90 -0
  308. package/dist/schemas/akm-config.json +2956 -14890
  309. package/dist/scripts/migrate-storage.js +2312 -19643
  310. package/dist/setup/detect.js +5 -7
  311. package/dist/setup/engine-config.js +2 -1
  312. package/dist/setup/registry-stash-loader.js +1 -1
  313. package/dist/setup/semantic-assets.js +12 -9
  314. package/dist/setup/setup.js +109 -39
  315. package/dist/setup/steps/connection-shared.js +120 -0
  316. package/dist/setup/steps/connection.js +50 -274
  317. package/dist/setup/steps/platforms.js +1 -0
  318. package/dist/setup/steps/sources.js +13 -6
  319. package/dist/setup/steps/stashdir.js +5 -2
  320. package/dist/sources/freshness.js +39 -0
  321. package/dist/sources/providers/git-provider.js +29 -33
  322. package/dist/sources/providers/git-stash.js +10 -5
  323. package/dist/sources/providers/provider-utils.js +40 -18
  324. package/dist/sources/providers/website.js +1 -1
  325. package/dist/sources/resolve.js +5 -5
  326. package/dist/sources/snapshot-fetchers/types.js +4 -0
  327. package/dist/sources/{website-ingest.js → snapshot-fetchers/website-ingest.js} +105 -39
  328. package/dist/storage/database.js +47 -3
  329. package/dist/storage/engines/sqlite-migrations.js +34 -16
  330. package/dist/storage/locations.js +1 -2
  331. package/dist/storage/repositories/improve-runs-repository.js +0 -20
  332. package/dist/storage/repositories/index-connection.js +80 -0
  333. package/dist/storage/repositories/index-db.js +4 -3
  334. package/dist/storage/repositories/index-entries-repository.js +952 -0
  335. package/dist/{indexer/db/entry-mapper.js → storage/repositories/index-entry-mapper.js} +15 -2
  336. package/dist/storage/repositories/index-entry-types.js +4 -0
  337. package/dist/storage/repositories/index-fts-repository.js +164 -0
  338. package/dist/storage/repositories/index-llm-cache-repository.js +109 -0
  339. package/dist/storage/repositories/index-meta-repository.js +50 -0
  340. package/dist/{indexer/db/schema.js → storage/repositories/index-schema.js} +241 -100
  341. package/dist/storage/repositories/index-sql.js +12 -0
  342. package/dist/storage/repositories/index-utility-repository.js +369 -0
  343. package/dist/storage/repositories/index-vec-repository.js +245 -0
  344. package/dist/storage/repositories/proposals-repository.js +41 -50
  345. package/dist/storage/repositories/registry-cache.js +1 -1
  346. package/dist/storage/repositories/workflow-runs-repository.js +17 -11
  347. package/dist/tasks/backends/cron.js +5 -5
  348. package/dist/tasks/backends/exec-utils.js +21 -0
  349. package/dist/tasks/backends/index.js +6 -9
  350. package/dist/tasks/backends/launchd.js +16 -17
  351. package/dist/tasks/backends/schtasks.js +33 -41
  352. package/dist/tasks/backends/types.js +4 -0
  353. package/dist/tasks/parser.js +25 -5
  354. package/dist/tasks/runner.js +33 -39
  355. package/dist/tasks/validator.js +5 -6
  356. package/dist/workflows/authoring/authoring.js +8 -11
  357. package/dist/workflows/exec/brief.js +10 -7
  358. package/dist/workflows/exec/report.js +261 -156
  359. package/dist/workflows/exec/run-workflow.js +2 -1
  360. package/dist/workflows/exec/step-work.js +3 -9
  361. package/dist/workflows/program/parser.js +4 -60
  362. package/dist/workflows/renderer.js +11 -60
  363. package/dist/workflows/runtime/checkin.js +1 -1
  364. package/dist/workflows/runtime/plan-classifier.js +7 -4
  365. package/dist/workflows/runtime/runs.js +11 -10
  366. package/dist/workflows/runtime/unit-checkin.js +1 -1
  367. package/dist/workflows/runtime/unit-phases.js +20 -0
  368. package/dist/workflows/runtime/workflow-asset-loader.js +27 -16
  369. package/dist/workflows/validate-summary.js +2 -2
  370. package/dist/workflows/validator.js +18 -2
  371. package/docs/migration/release-notes/0.9.0.md +45 -3
  372. package/docs/migration/v0.8-to-v0.9.md +466 -262
  373. package/docs/{data-and-telemetry.md → reference/data-and-telemetry.md} +61 -17
  374. package/package.json +10 -9
  375. package/schemas/akm-config.json +2956 -14890
  376. package/dist/assets/help/help-accept.md +0 -12
  377. package/dist/assets/help/help-improve.md +0 -87
  378. package/dist/assets/help/help-proposals.md +0 -17
  379. package/dist/assets/help/help-propose.md +0 -17
  380. package/dist/assets/help/help-reject.md +0 -11
  381. package/dist/assets/improve-strategies/recombine-only.json +0 -23
  382. package/dist/assets/improve-strategies/synthesize.json +0 -17
  383. package/dist/assets/prompts/procedural-system.md +0 -44
  384. package/dist/assets/prompts/recombine-system.md +0 -40
  385. package/dist/assets/prompts/staleness-detect-system.md +0 -6
  386. package/dist/assets/templates/html/default.html +0 -78
  387. package/dist/assets/templates/html/vendor/echarts.min.js +0 -45
  388. package/dist/assets/wiki/index-template.md +0 -12
  389. package/dist/assets/wiki/ingest-workflow-template.md +0 -83
  390. package/dist/assets/wiki/log-template.md +0 -8
  391. package/dist/assets/wiki/schema-template.md +0 -61
  392. package/dist/commands/improve/calibration.js +0 -161
  393. package/dist/commands/improve/dedup.js +0 -482
  394. package/dist/commands/improve/hot-probation.js +0 -45
  395. package/dist/commands/improve/improve-auto-accept.js +0 -262
  396. package/dist/commands/improve/procedural.js +0 -403
  397. package/dist/commands/improve/recombine.js +0 -843
  398. package/dist/commands/improve/schema-similarity-gate.js +0 -168
  399. package/dist/commands/lint/agent-linter.js +0 -44
  400. package/dist/commands/lint/command-linter.js +0 -44
  401. package/dist/commands/lint/default-linter.js +0 -16
  402. package/dist/commands/lint/fact-linter.js +0 -39
  403. package/dist/commands/lint/knowledge-linter.js +0 -16
  404. package/dist/commands/lint/memory-linter.js +0 -61
  405. package/dist/commands/lint/registry.js +0 -41
  406. package/dist/commands/lint/skill-linter.js +0 -45
  407. package/dist/commands/lint/task-linter.js +0 -50
  408. package/dist/commands/lint/workflow-linter.js +0 -81
  409. package/dist/commands/proposal/legacy-import.js +0 -115
  410. package/dist/commands/wiki-cli.js +0 -291
  411. package/dist/core/asset/asset-registry.js +0 -76
  412. package/dist/core/asset/asset-spec.js +0 -316
  413. package/dist/core/eval/rank-metrics.js +0 -113
  414. package/dist/core/ripgrep/install.js +0 -163
  415. package/dist/core/ripgrep/resolve.js +0 -81
  416. package/dist/indexer/db/db.js +0 -1585
  417. package/dist/indexer/manifest.js +0 -170
  418. package/dist/indexer/passes/metadata-contributors.js +0 -31
  419. package/dist/integrations/harnesses/opencode-sdk/index.js +0 -25
  420. package/dist/output/text/wiki.js +0 -16
  421. package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +0 -18229
  422. package/dist/scripts/migrations/v16-to-v17.js +0 -141
  423. package/dist/storage/repositories/consolidation-repository.js +0 -38
  424. package/dist/storage/repositories/recombine-repository.js +0 -213
  425. package/dist/wiki/wiki-templates.js +0 -15
  426. package/dist/wiki/wiki.js +0 -1013
  427. package/dist/workflows/db.js +0 -413
  428. package/docs/migration/release-notes/0.9.0-beta.60.md +0 -19
  429. /package/dist/sources/{wiki-fetchers → snapshot-fetchers}/registry.js +0 -0
  430. /package/dist/sources/{wiki-fetchers → snapshot-fetchers}/youtube.js +0 -0
@@ -1,6 +1,6 @@
1
1
  # akm CLI — Full Reference
2
2
 
3
- You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, wikis, and memories via `akm`. Search your sources first before writing something from scratch.
3
+ You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, and memories via `akm`. Search your sources first before writing something from scratch.
4
4
 
5
5
  ## Search
6
6
 
@@ -18,7 +18,7 @@ akm search "knowledge:" # List every asset of a type
18
18
 
19
19
  | Flag | Values | Default |
20
20
  | --- | --- | --- |
21
- | `--type` | `skill`, `command`, `agent`, `knowledge`, `workflow`, `script`, `memory`, `env`, `secret`, `wiki`, `any` | `any` |
21
+ | `--type` | `skill`, `command`, `agent`, `knowledge`, `workflow`, `script`, `memory`, `env`, `secret`, `any` | `any` |
22
22
  | `--source` | `stash`, `registry`, `both` | `stash` |
23
23
  | `--limit` | number | `20` |
24
24
  | `--format` | `json`, `jsonl`, `text`, `yaml` | `json` |
@@ -26,10 +26,10 @@ akm search "knowledge:" # List every asset of a type
26
26
  | `--shape` | `human`, `agent`, `summary` (`summary` only on `show`) | `human` |
27
27
 
28
28
  Ref-prefix queries (`"<type>:<prefix>/"` or a bare `"<type>:"`) return a
29
- deterministic listing, not a relevance ranking. A full ref without the
30
- trailing slash (`memory:projectA/auth-tip`) stays an ordinary keyword search —
31
- resolving a single ref is `akm show`'s job — and an explicit `--type` flag
32
- wins over the type parsed from the query.
29
+ deterministic listing, not a relevance ranking. Drop the trailing slash and the
30
+ same text becomes an ordinary keyword search — resolving a single asset by its
31
+ `<subdir>/<name>` id is `akm show`'s job — and an explicit `--type` flag wins
32
+ over the type parsed from the query.
33
33
 
34
34
  ## Curate
35
35
 
@@ -46,15 +46,15 @@ akm curate "review architecture" --type workflow # Restrict to one asset type
46
46
  Display an asset by ref. Knowledge assets support view modes as positional arguments.
47
47
 
48
48
  ```sh
49
- akm show script:deploy.sh # Show script (returns run command)
50
- akm show skill:code-review # Show skill (returns full content)
51
- akm show command:release # Show command (returns template)
52
- akm show agent:architect # Show agent (returns system prompt)
53
- akm show workflow:ship-release # Show parsed workflow steps
54
- akm show knowledge:guide toc # Table of contents
55
- akm show knowledge:guide section "Auth" # Specific section
56
- akm show knowledge:guide lines 10 30 # Line range
57
- akm show knowledge:my-doc # Show content (local or remote)
49
+ akm show scripts/deploy.sh # Show script (returns run command)
50
+ akm show skills/code-review # Show skill (returns full content)
51
+ akm show commands/release # Show command (returns template)
52
+ akm show agents/architect # Show agent (returns system prompt)
53
+ akm show workflows/ship-release # Show parsed workflow steps
54
+ akm show knowledge/guide toc # Table of contents
55
+ akm show knowledge/guide section "Auth" # Specific section
56
+ akm show knowledge/guide lines 10 30 # Line range
57
+ akm show knowledge/my-doc # Show content (local or remote)
58
58
  ```
59
59
 
60
60
  | Type | Key fields returned |
@@ -68,7 +68,6 @@ akm show knowledge:my-doc # Show content (local or remote)
68
68
  | memory | `content` (recalled context) |
69
69
  | env | `keys` (key names only — values and comment text never returned) |
70
70
  | secret | `name` only (the whole file is the value — never returned) |
71
- | wiki | `content` (same view modes as knowledge). For any wiki task, run `akm wiki list`. To ingest sources, `akm wiki ingest <name>` dispatches the configured agent (`defaults.engine` or `--engine`) to execute the ingest workflow. |
72
71
 
73
72
  ## Capture Knowledge While You Work
74
73
 
@@ -76,65 +75,53 @@ akm show knowledge:my-doc # Show content (local or remote)
76
75
  akm remember "Deployment needs VPN access" # Record a memory in your stash
77
76
  akm remember --name release-retro < notes.md # Save multiline memory from stdin
78
77
  akm remember "note" --target my-other-stash # Route write to a named writable stash source
79
- akm remember "note" --xref knowledge:auth-flow # Cite provenance in frontmatter xrefs (repeatable; ref must resolve)
80
- akm remember "fix" --supersedes memory:old-note # Write a correction AND demote the old asset (beliefState: superseded)
78
+ akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable; ref must resolve)
79
+ akm remember "fix" --supersedes memories/old-note # Write a correction AND demote the old asset (beliefState: superseded)
81
80
  akm import ./docs/auth-flow.md # Import a file as knowledge
82
- akm import ./doc.md --xref knowledge:auth-flow # Merge provenance xrefs into the imported doc's frontmatter
83
- akm import ./new.md --supersedes knowledge:old # Import a correction AND demote the doc it replaces
81
+ akm import ./doc.md --xref knowledge/auth-flow # Merge provenance xrefs into the imported doc's frontmatter
82
+ akm import ./new.md --supersedes knowledge/old # Import a correction AND demote the doc it replaces
84
83
  akm import - --name scratch-notes < notes.md # Import stdin as a knowledge doc
85
84
  akm import https://example.com/docs/auth # Fetch one URL and import it as knowledge
86
85
  akm import ./doc.md --target my-other-stash # Route import to a named writable stash source
87
86
  akm workflow create ship-release # Create a workflow asset in the stash
88
87
  akm workflow validate workflows/foo.yaml # Validate a YAML v2/markdown workflow or ref; lists every error
89
- akm workflow next workflow:ship-release # Start or resume the next workflow step
90
- akm feedback skill:code-review --positive # Record that an asset helped
91
- akm feedback agent:reviewer --negative # Record that an asset missed the mark
92
- akm feedback memory:deployment-notes --positive # Works for memories too
93
- akm feedback env:prod --positive # Records env feedback without surfacing values
88
+ akm workflow next workflows/ship-release # Start or resume the next workflow step
89
+ akm feedback skills/code-review --positive # Record that an asset helped
90
+ akm feedback agents/reviewer --negative # Record that an asset missed the mark
91
+ akm feedback memories/deployment-notes --positive # Works for memories too
92
+ akm feedback env/prod --positive # Records env feedback without surfacing values
94
93
  ```
95
94
 
96
95
  Use `akm feedback` whenever an asset materially helps or fails so future search
97
96
  ranking can learn from actual usage.
98
97
 
99
- ## Wikis
98
+ ## LLM Wiki bundles
100
99
 
101
- Multi-wiki knowledge bases (Karpathy-style). A stash-owned wiki lives at
102
- `<stashDir>/wikis/<name>/`; external directories or repos can also be registered
103
- as first-class wikis. akm owns lifecycle + raw-slug + lint + index regeneration
104
- for stash-owned wikis; page edits use your native Read/Write/Edit tools.
100
+ An LLM Wiki (Karpathy-style knowledge base) is a **bundle format**, not an akm
101
+ asset type there is no `akm wiki` command family. akm's LLM Wiki adapter
102
+ recognizes one deterministically at install time: a bundle component whose root
103
+ holds a `schema.md` plus a `pages/` directory is mounted as an `llm-wiki`
104
+ component. Its pages are then indexed like any other content and resolve to
105
+ `bundle//conceptId` refs (e.g. `team-catalog//pages/attention`).
106
+
107
+ Install one as a source, then search and read its pages with the ordinary
108
+ commands — no wiki-specific verbs:
105
109
 
106
110
  ```sh
107
- akm wiki list # List wikis (name, pages, raws, last-modified)
108
- akm wiki create research # Scaffold a new wiki
109
- akm wiki register ics-docs ~/code/ics-documentation # Register an external wiki
110
- akm wiki show research # Path, description, counts, last 3 log entries
111
- akm wiki pages research # Page refs + descriptions (excludes schema/index/log; includes raw/)
112
- akm wiki search research "attention" # Scoped search (equivalent to --type wiki --wiki research)
113
- akm wiki stash research ./paper.md # Copy source into raw/<slug>.md (never overwrites)
114
- akm wiki stash research https://example.com/paper # Fetch one URL into raw/<slug>.md
115
- akm wiki stash research ./paper.md --target my-stash # Route write to a named writable stash source
116
- echo "..." | akm wiki stash research - # stdin form
117
- akm wiki lint research # Structural checks: orphans, broken xrefs, uncited raws, stale index
118
- akm wiki ingest research # Dispatch defaults.engine to run the ingest workflow on this wiki
119
- akm wiki ingest research --engine claude --model sonnet # Override engine and model
120
- akm wiki ingest research --timeout-ms 600000 # Override the invocation timeout
121
- akm wiki remove research -y # Delete pages/schema/index/log; preserves raw/ (--force is a deprecated alias for -y)
122
- akm wiki remove research -y --with-sources # Full nuke, including raw/
111
+ akm add owner/llm-wiki-repo # Install an LLM Wiki bundle as a source (npm, GitHub, git, or local dir)
112
+ akm search "attention" # Wiki pages surface in ordinary search results
113
+ akm show team-catalog//pages/attention # Read a page by its bundle//conceptId ref (copy the ref from search)
114
+ akm list # Confirm the bundle is installed
123
115
  ```
124
116
 
125
- **For any wiki task, start with `akm wiki list`. Then `akm wiki ingest <name>`
126
- dispatches the configured agent (`defaults.engine` or `--engine`) to execute
127
- the wiki's ingest workflow end-to-end — schema read, source dedup, search,
128
- page create/update, log entry, lint, reindex.** Wiki pages are also addressable as
129
- `wiki:<name>/<page-path>` and show up in stash-wide `akm search` as
130
- `type: wiki`. Files under `raw/` and the wiki root infrastructure files
117
+ Files under the bundle's `raw/` directory and the wiki infrastructure files
131
118
  `schema.md`, `index.md`, and `log.md` are not indexed and do not appear in
132
119
  search results. No `--llm` anywhere — akm never reasons about page content.
133
120
 
134
121
  ## Env files
135
122
 
136
123
  A group of related CONFIGURATION for an app/service in one `.env` file at
137
- `<stashDir>/env/<name>.env`, sourced/injected wholesale. Key names are
124
+ `<stash>/env/<name>.env`, sourced/injected wholesale. Key names are
138
125
  discoverable; values and comment text stay on disk and never reach stdout or
139
126
  the index (comments can contain commented-out credentials). akm does not edit
140
127
  entries — you edit the file with your own editor and akm loads it.
@@ -143,31 +130,31 @@ entries — you edit the file with your own editor and akm loads it.
143
130
  akm env create prod # Create an empty env file
144
131
  akm env create prod --from-file ./.env # Ingest an existing .env
145
132
  akm env list # List all env files across stashes with key names
146
- akm show env:prod # Inspect key names (never values or comments)
147
- akm env run env:prod -- ./deploy.sh # Run a command with the whole .env injected (the safe path)
148
- akm env run env:prod -- $SHELL # Open an interactive shell with values injected
149
- akm env export env:prod --out ./env.sh # Write a sourceable script to a file (mode 0600)
150
- akm env path env:prod --quiet # Print the raw file path (for Docker `_FILE` / `--env-file`)
151
- akm env remove env:prod # Delete the env file
133
+ akm show env/prod # Inspect key names (never values or comments)
134
+ akm env run env/prod -- ./deploy.sh # Run a command with the whole .env injected (the safe path)
135
+ akm env run env/prod -- $SHELL # Open an interactive shell with values injected
136
+ akm env export env/prod --out ./env.sh # Write a sourceable script to a file (mode 0600)
137
+ akm env path env/prod --quiet # Print the raw file path (for Docker `_FILE` / `--env-file`)
138
+ akm env remove env/prod # Delete the env file
152
139
  ```
153
140
 
154
141
  ## Secrets
155
142
 
156
143
  A single sensitive value used on its own for authentication (a token, key, or
157
- cert) — one file = one value at `<stashDir>/secrets/<name>`. The ENTIRE file is
144
+ cert) — one file = one value at `<stash>/secrets/<name>`. The ENTIRE file is
158
145
  the value; only the name is ever surfaced.
159
146
 
160
147
  ```sh
161
- printf '%s' "$TOKEN" | akm secret set secret:deploy-token # Store a single value
148
+ printf '%s' "$TOKEN" | akm secret set secrets/deploy-token # Store a single value
162
149
  akm secret list # List secrets (names only)
163
- akm secret path secret:deploy-token # Print the file path (Docker `_FILE`)
164
- akm secret run secret:deploy-token GITHUB_TOKEN -- gh release create v1.0.0 # Inject into one env var
165
- akm secret remove secret:deploy-token # Delete the secret
150
+ akm secret path secrets/deploy-token # Print the file path (Docker `_FILE`)
151
+ akm secret run secrets/deploy-token GITHUB_TOKEN -- gh release create v1.0.0 # Inject into one env var
152
+ akm secret remove secrets/deploy-token # Delete the secret
166
153
  ```
167
154
 
168
155
  ## Workflows
169
156
 
170
- Workflows live under `<stashDir>/workflows/` as markdown or YAML v2 (`.yaml`/`.yml`).
157
+ Workflows live under `<stash>/workflows/` as markdown or YAML v2 (`.yaml`/`.yml`).
171
158
 
172
159
  Ref-based workflow commands are scoped to the current project/worktree/directory,
173
160
  so one active run does not block unrelated directories from starting the same
@@ -176,8 +163,8 @@ workflow. Direct run-id commands still target the exact run.
176
163
  ```sh
177
164
  akm workflow template # Print a starter workflow template
178
165
  akm workflow create ship-release # Scaffold a new workflow asset
179
- akm workflow start workflow:ship-release # Start a new run in the current scope
180
- akm workflow next workflow:ship-release # Advance to the next step (or auto-start) in the current scope
166
+ akm workflow start workflows/ship-release # Start a new run in the current scope
167
+ akm workflow next workflows/ship-release # Advance to the next step (or auto-start) in the current scope
181
168
  akm workflow complete <run-id> # Mark a step complete and advance
182
169
  akm workflow status <run-id> # Show the exact run by id
183
170
  akm workflow resume <run-id> # Resume a blocked or failed run
@@ -193,7 +180,7 @@ akm clone <ref> # Clone to working stash
193
180
  akm clone <ref> --name new-name # Rename on clone
194
181
  akm clone <ref> --dest ./project/.claude # Clone to custom location
195
182
  akm clone <ref> --force # Overwrite existing
196
- akm clone "npm:@scope/pkg//script:deploy.sh" # Clone from remote package
183
+ akm clone "npm:@scope/pkg//scripts/deploy.sh" # Clone from remote package
197
184
  ```
198
185
 
199
186
  When `--dest` is provided, `akm init` is not required first.
@@ -209,11 +196,11 @@ and re-keys the index row in place so the asset's learned ranking history
209
196
  survives.
210
197
 
211
198
  ```sh
212
- akm mv memory:projectA/old-note projectA/new-note # Rename; subdirectories allowed in the new name
213
- akm mv memory:solo memory:renamed-solo # Same-type ref-shaped target also accepted
199
+ akm mv memories/projectA/old-note projectA/new-note # Rename; subdirectories allowed in the new name
200
+ akm mv memories/solo memories/renamed-solo # Same-type ref-shaped target also accepted
214
201
  ```
215
202
 
216
- Wiki refs, cross-type targets, existing targets, `../` escapes, non-canonical
203
+ Cross-type targets, existing targets, `../` escapes, non-canonical
217
204
  source spellings (the error names the canonical ref), `.derived` twin sources
218
205
  (rename the base — the twin follows), and `.derived`-suffixed target names are
219
206
  rejected (exit 2, nothing moved). Read-only sources are scanned but never
@@ -321,10 +308,10 @@ akm improve <ref> # Propose improvement fo
321
308
  akm proposal list # List pending proposals
322
309
  akm proposal show <id> # Render the proposal body
323
310
  akm proposal diff <ref-or-id> # Diff by ref, UUID, or 8-char prefix
324
- akm proposal diff skill:akm-dream # Diff by asset ref
311
+ akm proposal diff skills/akm-dream # Diff by asset ref
325
312
  akm proposal accept 7c115132 # Accept by UUID prefix
326
313
  akm proposal accept <id> --target team-stash # Accept to a named writable stash source
327
- akm proposal reject skill:my-skill --reason "not ready" # Reject by asset ref
314
+ akm proposal reject skills/my-skill --reason "not ready" # Reject by asset ref
328
315
  akm proposal reject <id> --reason "..." # Archive with a reason
329
316
  akm proposal revert <id> # Restore the pre-promotion content
330
317
  ```
@@ -1,6 +1,6 @@
1
1
  # akm CLI
2
2
 
3
- You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, wikis, and memories via `akm`. Search your sources first before writing something from scratch.
3
+ You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, and memories via `akm`. Search your sources first before writing something from scratch.
4
4
 
5
5
  ## Agent Task Loop
6
6
 
@@ -11,12 +11,12 @@ For any task, follow this loop:
11
11
  4. `akm feedback <ref> --positive` — record success
12
12
 
13
13
  For workflow tasks:
14
- 1. `akm workflow next workflow:<name>` — get current step instructions
14
+ 1. `akm workflow next workflows/<name>` — get current step instructions
15
15
  2. Do the step work in your workspace
16
16
  3. `akm workflow complete <run-id> --step <step-id>` — mark done, get next step
17
17
 
18
18
  Workflow runs are scoped to your current project/worktree/directory. Ref-based
19
- commands like `workflow next workflow:<name>`, `workflow status workflow:<name>`,
19
+ commands like `workflow next workflows/<name>`, `workflow status workflows/<name>`,
20
20
  and `workflow list` operate within the current scope only.
21
21
 
22
22
  ## Quick Reference
@@ -31,20 +31,17 @@ akm show <ref> # View asset details
31
31
  akm workflow next <ref> # Start or resume a workflow
32
32
  akm remember "Deployment needs VPN access" # Record a memory in your stash
33
33
  akm remember "note" --target my-stash # Route write to a named writable stash source
34
- akm remember "note" --xref knowledge:auth-flow # Cite provenance in frontmatter xrefs (repeatable)
35
- akm remember "fix" --supersedes memory:old-note # Write a correction AND demote the superseded asset
34
+ akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable)
35
+ akm remember "fix" --supersedes memories/old-note # Write a correction AND demote the superseded asset
36
36
  akm import ./notes/release-checklist.md # Import a knowledge doc into your stash
37
37
  akm import ./doc.md --target my-stash # Route import to a named writable stash source
38
- akm wiki list # List available wikis
39
- akm wiki ingest <name> # Dispatch an agent to run the ingest workflow (uses defaults.engine or --engine)
40
- akm wiki stash <name> ./paper.md --target my-stash # Route wiki stash write to a named source
41
- akm proposal diff skill:akm-dream # Diff proposal by ref, UUID, or 8-char prefix
38
+ akm proposal diff skills/akm-dream # Diff proposal by ref, UUID, or 8-char prefix
42
39
  akm proposal accept 7c115132 # Accept by UUID prefix
43
- akm proposal reject skill:my-skill --reason "..." # Reject by ref
40
+ akm proposal reject skills/my-skill --reason "..." # Reject by ref
44
41
  akm feedback <ref> --positive|--negative # Record whether an asset helped
45
42
  akm add <ref> # Add a source (npm, GitHub, git, local dir)
46
43
  akm clone <ref> # Copy an asset to the working stash (optional --dest arg to clone to specific location)
47
- akm mv memory:old-note new-note # Rename an asset: inbound refs rewritten, ranking history preserved
44
+ akm mv memories/old-note new-note # Rename an asset: inbound refs rewritten, ranking history preserved
48
45
  akm sync # Commit (and push if writable remote) changes in the primary stash (--no-push to commit only)
49
46
  akm improve --no-sync # Run improve without the end-of-run auto-commit
50
47
  akm improve --no-push # Auto-commit but skip push for this run
@@ -64,7 +61,6 @@ akm registry search "<query>" # Search all registries
64
61
  | memory | Recalled context (read the content for background information) |
65
62
  | env | A `.env` file of related CONFIGURATION (many vars; sensitive or not — all protected); key names only. Inject with `akm env run <ref> -- <cmd>` (the agent-safe path — values stay on disk). |
66
63
  | secret | A single sensitive value for AUTHENTICATION (token, key, cert); name only. Use `akm secret path` / `akm secret run`. |
67
- | wiki | A page in a multi-wiki knowledge base. For any wiki task, start with `akm wiki list`. To ingest sources, run `akm wiki ingest <name>` — it dispatches the configured agent engine to execute the ingest workflow against the wiki's `raw/` directory. Run `akm wiki -h` for the full surface. |
68
64
 
69
65
  When an asset meaningfully helps or fails, record that with `akm feedback` so
70
66
  future search ranking can learn from real usage.
@@ -1,21 +1,19 @@
1
1
  {
2
- "description": "Standard improve pass — all sub-processes + sustaining proactive lane.",
2
+ "description": "Standard improve pass — reflect, distill, consolidate, memory inference, graph extraction, and validation; improve-stage extract and proactive maintenance off.",
3
3
  "processes": {
4
4
  "reflect": {
5
5
  "enabled": true,
6
6
  "limit": 25,
7
- "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "wiki", "workflow"]
7
+ "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
8
8
  },
9
9
  "distill": { "enabled": true, "allowedTypes": ["memory"], "requirePlannedRefs": true },
10
10
  "consolidate": { "enabled": true, "allowedTypes": ["memory"], "minPoolSize": 500 },
11
11
  "memoryInference": { "enabled": true },
12
12
  "graphExtraction": { "enabled": true },
13
- "extract": { "enabled": true, "triage": { "enabled": true, "minScore": 2 } },
13
+ "extract": { "enabled": false, "triage": { "enabled": true, "minScore": 2 } },
14
14
  "validation": { "enabled": true },
15
- "proactiveMaintenance": { "enabled": true, "dueDays": 30, "maxPerRun": 15 },
16
- "triage": { "enabled": false, "applyMode": "queue", "policy": "personal-stash" },
17
- "recombine": { "enabled": false },
18
- "procedural": { "enabled": false }
15
+ "proactiveMaintenance": { "enabled": false, "dueDays": 30, "maxPerRun": 15 },
16
+ "triage": { "enabled": false, "applyMode": "queue", "policy": "personal-stash" }
19
17
  },
20
18
  "sync": { "enabled": true, "push": true }
21
19
  }
@@ -1,12 +1,12 @@
1
1
  {
2
- "description": "Frequent extract + inference pass — sessions, memory inference, graph, reflect.",
2
+ "description": "Frequent inference pass — memory inference, graph extraction, and reflect; improve-stage extract off.",
3
3
  "processes": {
4
4
  "reflect": { "enabled": true },
5
5
  "distill": { "enabled": false },
6
6
  "consolidate": { "enabled": false },
7
7
  "memoryInference": { "enabled": true },
8
8
  "graphExtraction": { "enabled": true },
9
- "extract": { "enabled": true, "minNewSessions": 3, "triage": { "enabled": true, "minScore": 2 } },
9
+ "extract": { "enabled": false, "minNewSessions": 3, "triage": { "enabled": true, "minScore": 2 } },
10
10
  "triage": { "enabled": false },
11
11
  "validation": { "enabled": false },
12
12
  "proactiveMaintenance": { "enabled": false }
@@ -1,9 +1,9 @@
1
1
  {
2
- "description": "Proactive-maintenance pass — reflect, distill, proposal triage (promote, high budget), and the proactive-maintenance lane (maxPerRun 100); consolidate/memoryInference/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
2
+ "description": "Opt-in proactive-maintenance pass — reflect, distill, proposal triage (promote, high budget), and the proactive-maintenance lane (maxPerRun 100); consolidate/memoryInference/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
3
3
  "processes": {
4
4
  "reflect": {
5
5
  "enabled": true,
6
- "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "wiki", "workflow"]
6
+ "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
7
7
  },
8
8
  "distill": { "enabled": true, "allowedTypes": ["memory"] },
9
9
  "consolidate": { "enabled": false },
@@ -3,7 +3,7 @@
3
3
  "processes": {
4
4
  "reflect": {
5
5
  "enabled": true,
6
- "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "wiki", "workflow"]
6
+ "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
7
7
  },
8
8
  "extract": { "enabled": false },
9
9
  "distill": { "enabled": false },
@@ -1,9 +1,9 @@
1
1
  {
2
- "description": "Reflect + distill sustaining pass — reflect, distill, memoryInference, proposal triage (promote), and the proactive-maintenance lane; consolidate/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
2
+ "description": "Reflect + distill pass — reflect, distill, memoryInference, and proposal triage (promote); proactiveMaintenance/consolidate/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
3
3
  "processes": {
4
4
  "reflect": {
5
5
  "enabled": true,
6
- "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "wiki", "workflow"]
6
+ "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
7
7
  },
8
8
  "distill": { "enabled": true, "allowedTypes": ["memory"] },
9
9
  "consolidate": { "enabled": false },
@@ -24,7 +24,7 @@
24
24
  "maxDiffLines": 200,
25
25
  "judgment": {}
26
26
  },
27
- "proactiveMaintenance": { "enabled": true, "dueDays": 30, "maxPerRun": 15 }
27
+ "proactiveMaintenance": { "enabled": false, "dueDays": 30, "maxPerRun": 15 }
28
28
  },
29
29
  "sync": { "enabled": false }
30
30
  }
@@ -3,7 +3,7 @@
3
3
  "processes": {
4
4
  "reflect": {
5
5
  "enabled": true,
6
- "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "wiki", "workflow"]
6
+ "allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
7
7
  },
8
8
  "distill": { "enabled": true, "allowedTypes": ["memory"] },
9
9
  "consolidate": { "enabled": true, "allowedTypes": ["memory"] },
@@ -3,17 +3,17 @@ You are the akm consolidate assistant analyzing memory assets.
3
3
  Rules:
4
4
  1. MERGE: Two or more memories are substantially duplicated or closely related → propose merging. Return the primary ref to keep and secondary refs to delete. Do NOT include mergedContent — the merge will be executed in a separate step.
5
5
  2. DELETE: Memory is clearly outdated, contradicted, or redundant → propose deletion. NEVER propose delete for memories annotated `(captureMode: hot)` — they are user-explicit and only the user can retire them. The downstream guard will refuse these regardless, so proposing them just wastes tokens.
6
- 3. PROMOTE: Memory expresses a stable, reusable fact suitable as a `knowledge:` asset → propose promotion. Do NOT delete the source memory. NEVER propose promote / merge / contradict for memories annotated `(already queued)` — they have a pending proposal whose body matches; a duplicate will be deterministically dropped, so proposing them just wastes tokens.
6
+ 3. PROMOTE: Memory expresses a stable, reusable fact suitable as a `knowledge/` asset → propose promotion. Do NOT delete the source memory. NEVER propose promote / merge / contradict for memories annotated `(already queued)` — they have a pending proposal whose body matches; a duplicate will be deterministically dropped, so proposing them just wastes tokens.
7
7
  4. CONTRADICT: Two memories assert logically exclusive facts such that following BOTH simultaneously is impossible — not merely related or overlapping. You MUST cite the exact sentence from Memory A and the exact sentence from Memory B that are in direct conflict. If you cannot cite specific opposing sentences, use KEEP instead. Sharing a topic, tool, domain, or workflow stage is NOT sufficient. Only direct factual opposites qualify: opposing recommended commands, opposing boolean flags, opposing version numbers, or mutually exclusive instructions. Use confidence ≥ 0.92 only; omit the op entirely if below that threshold.
8
8
  5. KEEP: Memory is unique and current → omit from output.
9
9
 
10
10
  Return ONLY JSON (no prose, no code fences):
11
11
  {
12
12
  "operations": [
13
- { "op": "merge", "primary": "memory:<name>", "secondaries": ["memory:<name>", ...], "mergeStrategy": "synthesize", "confidence": 0.95 },
14
- { "op": "delete", "ref": "memory:<name>", "reason": "<brief reason>", "confidence": 0.90 },
15
- { "op": "promote", "ref": "memory:<name>", "knowledgeRef": "knowledge:<suggested-slug>", "reason": "<brief reason>", "description": "<one sentence describing the new knowledge asset>", "confidence": 0.92 },
16
- { "op": "contradict", "ref": "memory:<name>", "contradictedByRef": "memory:<name>", "reason": "<brief reason>", "confidence": 0.88 }
13
+ { "op": "merge", "primary": "memories/<name>", "secondaries": ["memories/<name>", ...], "mergeStrategy": "synthesize", "confidence": 0.95 },
14
+ { "op": "delete", "ref": "memories/<name>", "reason": "<brief reason>", "confidence": 0.90 },
15
+ { "op": "promote", "ref": "memories/<name>", "knowledgeRef": "knowledge/<suggested-slug>", "reason": "<brief reason>", "description": "<one sentence describing the new knowledge asset>", "confidence": 0.92 },
16
+ { "op": "contradict", "ref": "memories/<name>", "contradictedByRef": "memories/<name>", "reason": "<brief reason>", "confidence": 0.88 }
17
17
  ],
18
18
  "warnings": ["<optional concerns>"]
19
19
  }
@@ -46,22 +46,18 @@ Respond with EXACTLY one JSON object matching this shape:
46
46
  "candidates": [
47
47
  {
48
48
  "type": "memory" | "lesson" | "knowledge",
49
- "name": "<kebab-case-slug>",
49
+ "name": "<kebab-case name, e.g. jwt-token; optionally under one kebab-case scope, e.g. auth/jwt-token>",
50
50
  "description": "<one sentence 20-400 chars>",
51
51
  "when_to_use": "<one sentence 15-400 chars; REQUIRED only when type=lesson>",
52
52
  "body": "<markdown body, 200-3000 chars typical>",
53
53
  "confidence": <number 0.0-1.0>,
54
- "evidence": "<one-line pointer to the moment in the session>",
55
- "orderedActions": ["<action-1>", "<action-2>", ...],
56
- "outcomeData": "<one sentence describing the outcome of the action sequence>"
54
+ "evidence": "<one-line pointer to the moment in the session>"
57
55
  }
58
56
  ],
59
57
  "rationale_if_empty": "<one sentence; REQUIRED when candidates is empty>"
60
58
  }
61
59
  ```
62
60
 
63
- `orderedActions` and `outcomeData` are **optional**. Include them only when the candidate represents a recurring action sequence (e.g. a recovery procedure, a build-fix recipe, a deployment checklist) where preserving the ordered steps adds future value. When present, `outcomeData` is required and must describe what happened when the sequence completed (success or failure). Omit both fields entirely for standalone facts, observations, or lessons that are not action-sequence-shaped.
64
-
65
61
  ## Rules
66
62
 
67
63
  1. **Zero candidates is a valid and frequent answer.** Most sessions yield no new durable insight. When that's the case, return `{"candidates": [], "rationale_if_empty": "..."}` explaining what you saw and why it didn't rise to durable-knowledge level. Do not fabricate.
@@ -0,0 +1,11 @@
1
+ Respond with exactly this plain-text frame, with no prose or code fence around it:
2
+
3
+ {{REF_LINE}}AKM_REFLECT_CONFIDENCE: <number from 0 to 1>
4
+ AKM_REFLECT_FRONTMATTER_PATCH: {"description": null, "when_to_use": null}
5
+ AKM_REFLECT_CONTENT_BEGIN
6
+ <complete improved markdown body>
7
+ AKM_REFLECT_CONTENT_END
8
+
9
+ The first begin marker and final end marker delimit the body; marker lines between them are literal content. Put the complete markdown body between those outer markers. Quotes, Markdown fences, and backslashes inside the body are literal content; do not JSON-escape them. Emit the body only, without YAML frontmatter, because AKM preserves and merges the source frontmatter itself.
10
+
11
+ The frontmatter patch must be a one-line JSON object with exactly `description` and `when_to_use`. Keep a field `null` when it should not change. Supply a non-empty string only when adding or correcting that field; AKM merges those values through its existing sanitizer.
@@ -0,0 +1,3 @@
1
+ Respond only through the provider's native JSON schema. {{FIELD_RULE}}
2
+
3
+ `content` must contain the complete improved markdown body only, without YAML frontmatter. `frontmatterPatch` must contain exactly `description` and `when_to_use`; set either field to `null` when it should not change, or to a non-empty string when adding or correcting it. AKM merges that narrow patch with the source frontmatter and preserves target identity itself. `confidence` is your honest self-rated quality confidence from 0 to 1. Do not add prose or Markdown fences around the JSON response.
@@ -0,0 +1,3 @@
1
+ Your previous response could not be extracted using the required output contract. Reformat that response exactly once using the contract below. Preserve its proposed markdown verbatim: do not revise, summarize, or add content. Return only the repaired envelope.
2
+
3
+ {{OUTPUT_CONTRACT}}
@@ -18,7 +18,6 @@ consistency and reducing repeated context-setting.
18
18
  | `tasks/` | Tasks | Scheduled or on-demand automation tasks |
19
19
  | `lessons/` | Lessons | Durable lessons extracted from past sessions |
20
20
  | `facts/` | Facts | Durable stash-level context; the house conventions in `facts/conventions/` are auto-surfaced to authoring agents |
21
- | `wikis/` | Wikis | Agent-maintained knowledge bases (see `akm wiki`) |
22
21
  | `scripts/` | Scripts | Executable helpers agents and humans can run |
23
22
  | `env/`, `secrets/` | Env & Secrets | Configuration groups and single credentials; values are never content-indexed |
24
23
 
@@ -28,22 +27,22 @@ on the next `akm index` run (or when the background improve pipeline picks them
28
27
  ## How to organize assets
29
28
 
30
29
  A file's path under its type directory becomes part of its ref
31
- (`knowledge/auth/oauth-refresh-races.md` → `knowledge:auth/oauth-refresh-races`),
30
+ (`knowledge/auth/oauth-refresh-races.md` → `knowledge/auth/oauth-refresh-races`),
32
31
  and its segments are search terms: `akm search "auth" --type knowledge` narrows
33
32
  to that subtree. Retrieval is search, not folder-browse, so pick subdirectories
34
33
  deliberately. The house rules live in three convention facts under
35
34
  `facts/conventions/` and are surfaced to agents automatically when they author
36
35
  assets:
37
36
 
38
- - **`fact:conventions/organization`** — the single path axis, chosen by asset
37
+ - **`facts/conventions/organization`** — the single path axis, chosen by asset
39
38
  type. **Scope-born** types (`memory`, `lesson`, `task`, `env`, `secret`) go
40
39
  under the current **project/client** slug; **reuse-born** types (`knowledge`,
41
- `skill`, `wiki`, `fact`, `script`) go under a stable **domain**; global types
40
+ `skill`, `fact`, `script`) go under a stable **domain**; global types
42
41
  stay at the type root.
43
- - **`fact:conventions/backlinks`** — how to cross-link: a provenance xref
42
+ - **`facts/conventions/backlinks`** — how to cross-link: a provenance xref
44
43
  whenever an asset derives from another, sparse real associative links,
45
44
  corrections as new assets, canonical entity naming.
46
- - **`fact:conventions/domains`** — the (editable) domain vocabulary for
45
+ - **`facts/conventions/domains`** — the (editable) domain vocabulary for
47
46
  reuse-born assets, plus canonical entity spellings.
48
47
 
49
48
  Per-type nuances live in `facts/conventions/assets/<type>.md`. All of these are
@@ -63,11 +62,11 @@ akm search "<query>"
63
62
  akm search "<query>" --type skill
64
63
  akm search "<query>" --type knowledge
65
64
 
66
- # Show a specific asset by ref
67
- akm show skill:<name>
68
- akm show knowledge:<name>
69
- akm show memory:<name>
70
- akm show command:<name>
65
+ # Show a specific asset by ref ([bundle//]conceptId)
66
+ akm show skills/<name>
67
+ akm show knowledge/<name>
68
+ akm show memories/<name>
69
+ akm show commands/<name>
71
70
 
72
71
  # List available assets by type
73
72
  akm list --type skill
@@ -40,5 +40,5 @@ Use an agent when a recurring task benefits from a specialized role, bounded res
40
40
  ## Placement & linking
41
41
 
42
42
  - Agent definitions are usually **global**: keep them at the type root or under a
43
- role/domain slug (`agent:reviewer`). Point the agent at the standards and type
43
+ role/domain slug (`agents/reviewer`). Point the agent at the standards and type
44
44
  conventions it must read first via xrefs.
@@ -42,7 +42,7 @@ Use a fact for stable information that future agents should treat as true or nor
42
42
  ## Placement & linking
43
43
 
44
44
  - Facts are **reuse-born**: give a policy/standard fact a domain-like prefix
45
- (`fact:policies/pii-handling`) or the type root for personal/meta facts.
45
+ (`facts/policies/pii-handling`) or the type root for personal/meta facts.
46
46
  - Facts are also the **delivery layer** for stash-wide conventions:
47
47
  `category: convention` or `category: meta` facts are surfaced to every non-wiki
48
48
  author, so this is where naming, placement, and linking house-rules live. Keep
@@ -42,7 +42,7 @@ Use a knowledge asset for durable reference material, synthesized explanations,
42
42
  ## Placement & linking
43
43
 
44
44
  - Knowledge is **reuse-born**: file it under a stable **domain** prefix from
45
- `fact:conventions/domains` (`knowledge:auth/oauth-refresh-races`), not under a
45
+ `facts/conventions/domains` (`knowledge/auth/oauth-refresh-races`), not under a
46
46
  project — that domain slug is what any project searches to reuse it.
47
47
  - Knowledge pages are the rewritable synthesized layer — update them in place.
48
48
  Ingested source material stays immutable; corrections to it are new assets
@@ -40,10 +40,10 @@ Use a lesson to record:
40
40
  - Update an existing lesson when new feedback sharpens the same judgment.
41
41
  - Create a new lesson only when the trigger or failure mode is meaningfully different.
42
42
  - Deprecate or revise stale lessons instead of allowing contradictory guidance to accumulate.
43
- - When a lesson becomes broadly normative, consider promoting the stable rule into a `fact:conventions/...` asset.
43
+ - When a lesson becomes broadly normative, consider promoting the stable rule into a `facts/conventions/...` asset.
44
44
 
45
45
  ## Placement & linking
46
46
 
47
47
  - Lessons are **scope-born**: file them under the **project/client** they were
48
- learned in (`lesson:projectA/token-refresh-gotcha`) and xref the asset the
48
+ learned in (`lessons/projectA/token-refresh-gotcha`) and xref the asset the
49
49
  lesson corrects or refines.
@@ -40,8 +40,8 @@ Use a memory when a future agent would make a better decision by knowing a speci
40
40
  ## Placement & linking
41
41
 
42
42
  - Memories are **scope-born**: file them under the **current project/client**
43
- slug (`memory:projectA/auth-token-refresh`) — the working context is the
43
+ slug (`memories/projectA/auth-token-refresh`) — the working context is the
44
44
  answer, so no per-asset judgment is needed. Add the subject as a tag
45
45
  (`tags: [auth, projectA]`) for cross-cutting recall.
46
46
  - When a memory turns out to be domain-general, **append** a new
47
- `knowledge:<domain>/…` asset that xrefs it — never rename the memory up a rung.
47
+ `knowledge/<domain>/…` asset that xrefs it — never rename the memory up a rung.
@@ -45,6 +45,6 @@ Use a script when a task is mechanical, repeatable, and better handled by a dete
45
45
  ## Placement & linking
46
46
 
47
47
  - Scripts are **reuse-born**: file a general helper under a tool/domain slug
48
- from `fact:conventions/domains` (`script:build/release`). Use the project slug
48
+ from `facts/conventions/domains` (`scripts/build/release`). Use the project slug
49
49
  only when the script hard-codes project-specific paths, endpoints, or
50
50
  credentials.