akm-cli 0.9.0-rc.0 → 0.9.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/CHANGELOG.md +339 -2
  2. package/SECURITY.md +23 -24
  3. package/dist/assets/help/help-improve.md +10 -10
  4. package/dist/assets/hints/cli-hints-full.md +44 -10
  5. package/dist/assets/hints/cli-hints-short.md +6 -2
  6. package/dist/assets/{profiles → improve-strategies}/default.json +1 -0
  7. package/dist/assets/{profiles → improve-strategies}/graph-refresh.json +1 -1
  8. package/dist/assets/{profiles → improve-strategies}/proactive-maintenance.json +2 -3
  9. package/dist/assets/{profiles → improve-strategies}/reflect-distill.json +3 -4
  10. package/dist/assets/prompts/workflow-unit-preamble.md +26 -0
  11. package/dist/assets/stash-skeleton/README.md +28 -0
  12. package/dist/assets/stash-skeleton/facts/conventions/assets/agent.md +6 -0
  13. package/dist/assets/stash-skeleton/facts/conventions/assets/command.md +6 -0
  14. package/dist/assets/stash-skeleton/facts/conventions/assets/fact.md +12 -1
  15. package/dist/assets/stash-skeleton/facts/conventions/assets/knowledge.md +11 -1
  16. package/dist/assets/stash-skeleton/facts/conventions/assets/lesson.md +6 -0
  17. package/dist/assets/stash-skeleton/facts/conventions/assets/memory.md +9 -0
  18. package/dist/assets/stash-skeleton/facts/conventions/assets/script.md +7 -0
  19. package/dist/assets/stash-skeleton/facts/conventions/assets/skill.md +7 -0
  20. package/dist/assets/stash-skeleton/facts/conventions/assets/workflow.md +6 -0
  21. package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +98 -0
  22. package/dist/assets/stash-skeleton/facts/conventions/domains.md +63 -0
  23. package/dist/assets/stash-skeleton/facts/conventions/organization.md +127 -0
  24. package/dist/assets/tasks/core/backup.yml +1 -0
  25. package/dist/assets/tasks/core/extract.yml +1 -0
  26. package/dist/assets/tasks/core/improve.yml +1 -0
  27. package/dist/assets/tasks/core/index-refresh.yml +1 -0
  28. package/dist/assets/tasks/core/sync.yml +1 -0
  29. package/dist/assets/tasks/core/version-check.yml +1 -0
  30. package/dist/assets/tasks/graph-refresh-weekly.yml +4 -4
  31. package/dist/assets/templates/html/health.html +5 -1
  32. package/dist/cli/config-migrate.js +31 -138
  33. package/dist/cli/config-validate.js +10 -8
  34. package/dist/cli.js +48 -14
  35. package/dist/commands/agent/agent-dispatch.js +17 -16
  36. package/dist/commands/agent/agent-support.js +0 -24
  37. package/dist/commands/agent/contribute-cli.js +5 -15
  38. package/dist/commands/backup-cli.js +54 -0
  39. package/dist/commands/config-cli.js +45 -159
  40. package/dist/commands/env/env-binding.js +95 -0
  41. package/dist/commands/env/env-cli.js +8 -65
  42. package/dist/commands/env/secret.js +8 -5
  43. package/dist/commands/health/checks.js +130 -83
  44. package/dist/commands/health/html-report.js +4 -0
  45. package/dist/commands/health/improve-metrics.js +30 -32
  46. package/dist/commands/health/llm-usage.js +19 -19
  47. package/dist/commands/health/md-report.js +4 -0
  48. package/dist/commands/health/metrics.js +2 -1
  49. package/dist/commands/health/surfaces.js +5 -4
  50. package/dist/commands/health.js +1 -1
  51. package/dist/commands/improve/consolidate/chunking.js +2 -2
  52. package/dist/commands/improve/consolidate.js +28 -25
  53. package/dist/commands/improve/distill/promote-memory.js +5 -12
  54. package/dist/commands/improve/distill/quality-gate.js +5 -7
  55. package/dist/commands/improve/distill.js +16 -5
  56. package/dist/commands/improve/eligibility.js +22 -12
  57. package/dist/commands/improve/extract-cli.js +47 -19
  58. package/dist/commands/improve/extract.js +110 -62
  59. package/dist/commands/improve/improve-cli.js +38 -16
  60. package/dist/commands/improve/improve-result-file.js +30 -24
  61. package/dist/commands/improve/improve-strategies.js +137 -0
  62. package/dist/commands/improve/improve.js +60 -30
  63. package/dist/commands/improve/locks.js +66 -45
  64. package/dist/commands/improve/loop-stages.js +75 -33
  65. package/dist/commands/improve/memory/memory-belief.js +79 -7
  66. package/dist/commands/improve/memory/memory-contradiction-detect.js +12 -4
  67. package/dist/commands/improve/preparation.js +71 -73
  68. package/dist/commands/improve/procedural.js +3 -2
  69. package/dist/commands/improve/recombine.js +2 -1
  70. package/dist/commands/improve/reflect.js +119 -214
  71. package/dist/commands/improve/shared.js +11 -5
  72. package/dist/commands/lint/base-linter.js +152 -42
  73. package/dist/commands/mv-cli.js +809 -0
  74. package/dist/commands/proposal/proposal-cli.js +18 -8
  75. package/dist/commands/proposal/propose.js +64 -69
  76. package/dist/commands/read/knowledge.js +436 -4
  77. package/dist/commands/read/remember-cli.js +39 -2
  78. package/dist/commands/read/search-cli.js +6 -1
  79. package/dist/commands/registry-cli.js +29 -14
  80. package/dist/commands/remember.js +2 -0
  81. package/dist/commands/sources/init.js +13 -14
  82. package/dist/commands/sources/migration-help.js +7 -4
  83. package/dist/commands/sources/schema-repair.js +2 -4
  84. package/dist/commands/sources/source-add.js +62 -73
  85. package/dist/commands/sources/source-manage.js +50 -46
  86. package/dist/commands/sources/stash-cli.js +41 -4
  87. package/dist/commands/tasks/default-tasks.js +12 -12
  88. package/dist/commands/tasks/tasks-cli.js +7 -3
  89. package/dist/commands/tasks/tasks.js +113 -18
  90. package/dist/commands/wiki-cli.js +9 -10
  91. package/dist/commands/workflow-cli.js +276 -12
  92. package/dist/core/asset/asset-spec.js +58 -1
  93. package/dist/core/asset/frontmatter.js +12 -2
  94. package/dist/core/common.js +5 -3
  95. package/dist/core/config/config-io.js +28 -17
  96. package/dist/core/config/config-schema.js +379 -66
  97. package/dist/core/config/config-types.js +3 -3
  98. package/dist/core/config/config-version.js +29 -0
  99. package/dist/core/config/config-walker.js +98 -27
  100. package/dist/core/config/config.js +132 -266
  101. package/dist/core/config/deep-merge.js +41 -0
  102. package/dist/core/config/engine-semantics.js +32 -0
  103. package/dist/core/errors.js +2 -2
  104. package/dist/core/extra-params.js +61 -0
  105. package/dist/core/file-lock.js +201 -56
  106. package/dist/core/improve-result.js +178 -0
  107. package/dist/core/json-schema.js +142 -0
  108. package/dist/core/maintenance-barrier.js +119 -0
  109. package/dist/core/migration-backup.js +416 -0
  110. package/dist/core/paths.js +3 -0
  111. package/dist/core/redaction.js +358 -0
  112. package/dist/core/state/migrations.js +17 -2
  113. package/dist/core/state-db.js +44 -1
  114. package/dist/indexer/db/db.js +118 -2
  115. package/dist/indexer/graph/graph-extraction.js +28 -16
  116. package/dist/indexer/index-writer-lock.js +31 -24
  117. package/dist/indexer/index-written-assets.js +15 -6
  118. package/dist/indexer/indexer.js +47 -2
  119. package/dist/indexer/passes/memory-inference.js +10 -6
  120. package/dist/indexer/passes/metadata.js +250 -0
  121. package/dist/indexer/search/db-search.js +111 -44
  122. package/dist/indexer/search/fts-query.js +41 -0
  123. package/dist/indexer/search/ranking-contributors.js +48 -0
  124. package/dist/indexer/search/ranking.js +36 -23
  125. package/dist/indexer/search/search-fields.js +11 -1
  126. package/dist/indexer/walk/matchers.js +39 -0
  127. package/dist/integrations/agent/builder-shared.js +7 -0
  128. package/dist/integrations/agent/builders.js +5 -50
  129. package/dist/integrations/agent/config.js +3 -143
  130. package/dist/integrations/agent/detect.js +17 -2
  131. package/dist/integrations/agent/engine-resolution.js +202 -0
  132. package/dist/integrations/agent/index.js +1 -2
  133. package/dist/integrations/agent/model-aliases.js +16 -2
  134. package/dist/integrations/agent/profiles.js +36 -62
  135. package/dist/integrations/agent/runner-dispatch.js +91 -4
  136. package/dist/integrations/agent/runner.js +76 -207
  137. package/dist/integrations/agent/spawn.js +141 -20
  138. package/dist/integrations/harnesses/aider/agent-builder.js +112 -0
  139. package/dist/integrations/harnesses/aider/index.js +57 -0
  140. package/dist/integrations/harnesses/aider/result-extractor.js +53 -0
  141. package/dist/integrations/harnesses/amazonq/agent-builder.js +152 -0
  142. package/dist/integrations/harnesses/amazonq/index.js +58 -0
  143. package/dist/integrations/harnesses/amazonq/result-extractor.js +48 -0
  144. package/dist/integrations/harnesses/claude/agent-builder.js +46 -8
  145. package/dist/integrations/harnesses/claude/index.js +25 -25
  146. package/dist/integrations/harnesses/claude/result-extractor.js +52 -0
  147. package/dist/integrations/harnesses/codex/agent-builder.js +136 -0
  148. package/dist/integrations/harnesses/codex/index.js +62 -0
  149. package/dist/integrations/harnesses/codex/result-extractor.js +73 -0
  150. package/dist/integrations/harnesses/copilot/agent-builder.js +121 -0
  151. package/dist/integrations/harnesses/copilot/index.js +59 -0
  152. package/dist/integrations/harnesses/copilot/result-extractor.js +151 -0
  153. package/dist/integrations/harnesses/gemini/agent-builder.js +120 -0
  154. package/dist/integrations/harnesses/gemini/index.js +59 -0
  155. package/dist/integrations/harnesses/gemini/result-extractor.js +121 -0
  156. package/dist/integrations/harnesses/index.js +27 -28
  157. package/dist/integrations/harnesses/opencode/agent-builder.js +2 -3
  158. package/dist/integrations/harnesses/opencode/index.js +15 -22
  159. package/dist/integrations/harnesses/opencode-sdk/harness.js +60 -0
  160. package/dist/integrations/harnesses/opencode-sdk/index.js +8 -32
  161. package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +681 -108
  162. package/dist/integrations/harnesses/openhands/agent-builder.js +125 -0
  163. package/dist/integrations/harnesses/openhands/index.js +57 -0
  164. package/dist/integrations/harnesses/openhands/result-extractor.js +103 -0
  165. package/dist/integrations/harnesses/pi/agent-builder.js +103 -0
  166. package/dist/integrations/harnesses/pi/index.js +57 -0
  167. package/dist/integrations/harnesses/pi/result-extractor.js +135 -0
  168. package/dist/integrations/harnesses/types.js +8 -32
  169. package/dist/integrations/lockfile.js +32 -21
  170. package/dist/integrations/session-logs/index.js +24 -11
  171. package/dist/llm/client.js +48 -14
  172. package/dist/llm/feature-gate.js +15 -47
  173. package/dist/llm/graph-extract.js +1 -1
  174. package/dist/llm/index-passes.js +8 -42
  175. package/dist/llm/memory-infer-impl.js +1 -1
  176. package/dist/llm/usage-persist.js +4 -0
  177. package/dist/llm/usage-telemetry.js +35 -5
  178. package/dist/output/renderers.js +3 -2
  179. package/dist/output/shapes/helpers.js +2 -1
  180. package/dist/output/shapes/passthrough.js +6 -0
  181. package/dist/output/text/helpers.js +215 -2
  182. package/dist/output/text/workflow.js +3 -1
  183. package/dist/schemas/akm-config.json +16638 -0
  184. package/dist/schemas/akm-task.json +87 -0
  185. package/dist/schemas/akm-workflow.json +372 -0
  186. package/dist/scripts/migrate-storage.js +10944 -8801
  187. package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +9247 -350
  188. package/dist/setup/detected-engines.js +142 -0
  189. package/dist/setup/engine-config.js +89 -0
  190. package/dist/setup/setup.js +236 -132
  191. package/dist/setup/steps/connection.js +61 -32
  192. package/dist/setup/steps/platforms.js +4 -4
  193. package/dist/setup/steps.js +3 -2
  194. package/dist/storage/database.js +13 -1
  195. package/dist/storage/engines/sqlite-migrations.js +1 -0
  196. package/dist/storage/repositories/improve-runs-repository.js +5 -5
  197. package/dist/storage/repositories/task-history-repository.js +78 -0
  198. package/dist/storage/repositories/workflow-runs-repository.js +190 -1
  199. package/dist/tasks/parser.js +138 -52
  200. package/dist/tasks/runner.js +71 -75
  201. package/dist/tasks/schema.js +1 -1
  202. package/dist/tasks/validator.js +11 -6
  203. package/dist/text-import-hook.mjs +1 -1
  204. package/dist/wiki/wiki.js +9 -8
  205. package/dist/workflows/authoring/authoring.js +123 -10
  206. package/dist/workflows/authoring/workflow-program-template.yaml +31 -0
  207. package/dist/workflows/cli.js +4 -0
  208. package/dist/workflows/concurrency-policy.js +15 -0
  209. package/dist/workflows/db.js +200 -13
  210. package/dist/workflows/exec/brief.js +478 -0
  211. package/dist/workflows/exec/frozen-judge.js +47 -0
  212. package/dist/workflows/exec/native-executor.js +1034 -0
  213. package/dist/workflows/exec/param-secrets.js +115 -0
  214. package/dist/workflows/exec/report.js +1355 -0
  215. package/dist/workflows/exec/run-workflow.js +609 -0
  216. package/dist/workflows/exec/scheduler.js +71 -0
  217. package/dist/workflows/exec/step-work.js +1212 -0
  218. package/dist/workflows/exec/unit-writer.js +23 -0
  219. package/dist/workflows/exec/watch.js +116 -0
  220. package/dist/workflows/exec/worktree.js +171 -0
  221. package/dist/workflows/ir/compile.js +375 -0
  222. package/dist/workflows/ir/freeze.js +243 -0
  223. package/dist/workflows/ir/params.js +54 -0
  224. package/dist/workflows/ir/plan-hash.js +68 -0
  225. package/dist/workflows/ir/schema.js +545 -0
  226. package/dist/workflows/parser.js +10 -1
  227. package/dist/workflows/program/expressions.js +369 -0
  228. package/dist/workflows/program/parser.js +869 -0
  229. package/dist/workflows/program/project.js +104 -0
  230. package/dist/workflows/program/schema.js +54 -0
  231. package/dist/workflows/renderer.js +82 -5
  232. package/dist/workflows/resource-limits.js +20 -0
  233. package/dist/workflows/runtime/agent-identity.js +59 -14
  234. package/dist/workflows/runtime/plan-classifier.js +187 -0
  235. package/dist/workflows/runtime/runs.js +246 -69
  236. package/dist/workflows/runtime/unit-checkin.js +45 -0
  237. package/dist/workflows/runtime/workflow-asset-loader.js +42 -1
  238. package/dist/workflows/validate-summary.js +24 -3
  239. package/dist/workflows/validator.js +26 -1
  240. package/docs/data-and-telemetry.md +4 -3
  241. package/docs/migration/release-notes/0.6.0.md +1 -1
  242. package/docs/migration/release-notes/0.7.0.md +5 -4
  243. package/docs/migration/release-notes/0.9.0-beta.60.md +19 -0
  244. package/docs/migration/v0.8-to-v0.9.md +401 -0
  245. package/package.json +4 -2
  246. package/schemas/akm-config.json +16638 -0
  247. package/schemas/akm-task.json +87 -0
  248. package/schemas/akm-workflow.json +372 -0
  249. package/dist/commands/improve/improve-profiles.js +0 -168
  250. package/dist/core/config/config-migration.js +0 -602
  251. package/dist/core/deep-merge.js +0 -38
  252. package/dist/llm/call-ai.js +0 -62
  253. package/dist/setup/legacy-config.js +0 -106
  254. package/docs/README.md +0 -104
  255. /package/dist/assets/{profiles → improve-strategies}/catchup.json +0 -0
  256. /package/dist/assets/{profiles → improve-strategies}/consolidate.json +0 -0
  257. /package/dist/assets/{profiles → improve-strategies}/frequent.json +0 -0
  258. /package/dist/assets/{profiles → improve-strategies}/memory-focus.json +0 -0
  259. /package/dist/assets/{profiles → improve-strategies}/quick.json +0 -0
  260. /package/dist/assets/{profiles → improve-strategies}/recombine-only.json +0 -0
  261. /package/dist/assets/{profiles → improve-strategies}/synthesize.json +0 -0
  262. /package/dist/assets/{profiles → improve-strategies}/thorough.json +0 -0
@@ -1,62 +0,0 @@
1
- // This Source Code Form is subject to the terms of the Mozilla Public
2
- // License, v. 2.0. If a copy of the MPL was not distributed with this
3
- // file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
- import { getDefaultLlmConfig } from "../core/config/config.js";
5
- import { warn } from "../core/warn.js";
6
- import { resolveProfileFromConfig, runAgent } from "../integrations/agent/index.js";
7
- import { chatCompletion } from "./client.js";
8
- /**
9
- * Unified AI call: prefers the default agent profile, falls back to the
10
- * default LLM profile. When neither is configured, returns a structured
11
- * error pointing the user at `akm setup`.
12
- */
13
- export async function callAi(config, prompt, opts = {}) {
14
- const defaultAgentName = config.defaults?.agent;
15
- if (defaultAgentName) {
16
- try {
17
- const profile = resolveProfileFromConfig(defaultAgentName, config);
18
- if (!profile) {
19
- return {
20
- ok: false,
21
- error: `Agent profile "${defaultAgentName}" is not built-in and has no \`bin\` override.`,
22
- };
23
- }
24
- const result = await runAgent(profile, prompt, {
25
- stdio: opts.draftFilePath ? "interactive" : "captured",
26
- parseOutput: "text",
27
- timeoutMs: opts.timeoutMs,
28
- });
29
- if (!result.ok)
30
- return { ok: false, error: result.error ?? result.reason ?? "agent failed" };
31
- return { ok: true, content: result.stdout ?? "", path: "agent-cli" };
32
- }
33
- catch (e) {
34
- return { ok: false, error: String(e) };
35
- }
36
- }
37
- const llmConfig = getDefaultLlmConfig(config);
38
- if (llmConfig) {
39
- if (opts.draftFilePath) {
40
- warn("[akm] No agent CLI configured — falling back to LLM API. " +
41
- "File-write contract unavailable; expecting JSON in stdout. " +
42
- "Install an agent CLI and run `akm setup` for full functionality.");
43
- }
44
- const messages = [];
45
- if (opts.systemPrompt)
46
- messages.push({ role: "system", content: opts.systemPrompt });
47
- messages.push({ role: "user", content: prompt });
48
- try {
49
- const content = await chatCompletion(llmConfig, messages, {
50
- ...(opts.timeoutMs !== undefined ? { timeoutMs: opts.timeoutMs } : {}),
51
- });
52
- return { ok: true, content, path: "llm-http" };
53
- }
54
- catch (e) {
55
- return { ok: false, error: String(e) };
56
- }
57
- }
58
- return {
59
- ok: false,
60
- error: "No AI connection configured. Run `akm setup` or set `defaults.agent`/`defaults.llm`.",
61
- };
62
- }
@@ -1,106 +0,0 @@
1
- // This Source Code Form is subject to the terms of the Mozilla Public
2
- // License, v. 2.0. If a copy of the MPL was not distributed with this
3
- // file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
- import { getDefaultLlmConfig } from "../core/config/config.js";
5
- import { warn } from "../core/warn.js";
6
- import { v1ProfilePlatform } from "../integrations/harnesses/index.js";
7
- /** Read the currently-configured LLM connection from a loaded config. */
8
- export function getCurrentLlm(config) {
9
- return getDefaultLlmConfig(config);
10
- }
11
- /** Read a synthesised legacy-shape agent block from the new-shape AkmConfig. */
12
- export function getCurrentAgentBlock(config) {
13
- if (!config.profiles?.agent && !config.defaults?.agent)
14
- return undefined;
15
- const block = {};
16
- if (config.defaults?.agent)
17
- block.default = config.defaults.agent;
18
- if (config.profiles?.agent) {
19
- const profiles = {};
20
- for (const [name, raw] of Object.entries(config.profiles.agent)) {
21
- profiles[name] = {
22
- ...(raw.platform === "opencode-sdk" ? { sdkMode: true } : {}),
23
- ...(raw.model ? { model: raw.model } : {}),
24
- ...(raw.bin ? { bin: raw.bin } : {}),
25
- ...(raw.args ? { args: raw.args } : {}),
26
- };
27
- }
28
- block.profiles = profiles;
29
- }
30
- return block;
31
- }
32
- /** Apply an LLM connection patch onto the new-shape config. */
33
- export function applyLegacyLlm(config, llm) {
34
- if (!llm) {
35
- // Clear the default LLM profile.
36
- const name = config.defaults?.llm ?? "default";
37
- const remaining = { ...(config.profiles?.llm ?? {}) };
38
- delete remaining[name];
39
- return {
40
- profiles: { ...(config.profiles ?? {}), llm: remaining },
41
- defaults: { ...(config.defaults ?? {}), llm: undefined },
42
- };
43
- }
44
- const name = config.defaults?.llm ?? "default";
45
- return {
46
- profiles: {
47
- ...(config.profiles ?? {}),
48
- llm: { ...(config.profiles?.llm ?? {}), [name]: llm },
49
- },
50
- defaults: { ...(config.defaults ?? {}), llm: name },
51
- };
52
- }
53
- /** Apply a legacy-shape agent block onto the new-shape config. */
54
- export function applyLegacyAgent(config, agent) {
55
- if (!agent) {
56
- return {
57
- profiles: { ...(config.profiles ?? {}), agent: undefined },
58
- defaults: { ...(config.defaults ?? {}), agent: undefined },
59
- };
60
- }
61
- const v2Profiles = { ...(config.profiles?.agent ?? {}) };
62
- for (const [name, profile] of Object.entries(agent.profiles ?? {})) {
63
- // #566: resolve the platform via the harness registry instead of the old
64
- // `name.includes("claude") ? "claude" : "opencode"` heuristic, which
65
- // silently mapped Cursor/Copilot/any new harness to "opencode". An explicit
66
- // sdkMode flag still wins; otherwise we ask the registry. A name the
67
- // registry does not recognize is surfaced (warn) rather than silently
68
- // misclassified, then kept as a best-effort "opencode" profile so the user
69
- // does not lose a profile they explicitly configured.
70
- let platform;
71
- if (profile.sdkMode) {
72
- platform = "opencode-sdk";
73
- }
74
- else {
75
- const resolved = v1ProfilePlatform(name);
76
- if (resolved) {
77
- platform = resolved;
78
- }
79
- else {
80
- warn(`[akm setup] Agent profile "${name}" did not match any known harness; ` +
81
- `defaulting its platform to "opencode". Set its platform explicitly in config if this is wrong.`);
82
- platform = "opencode";
83
- }
84
- }
85
- v2Profiles[name] = {
86
- platform,
87
- ...(profile.bin ? { bin: profile.bin } : {}),
88
- ...(profile.args ? { args: profile.args } : {}),
89
- ...(profile.model ? { model: profile.model } : {}),
90
- };
91
- }
92
- return {
93
- profiles: { ...(config.profiles ?? {}), agent: v2Profiles },
94
- defaults: { ...(config.defaults ?? {}), agent: agent.default },
95
- };
96
- }
97
- /** Deep-ish clone of an LLM connection config (capabilities + extraParams). */
98
- export function cloneLlmConfig(llm) {
99
- if (!llm)
100
- return undefined;
101
- return {
102
- ...llm,
103
- ...(llm.capabilities ? { capabilities: { ...llm.capabilities } } : {}),
104
- ...(llm.extraParams ? { extraParams: { ...llm.extraParams } } : {}),
105
- };
106
- }
package/docs/README.md DELETED
@@ -1,104 +0,0 @@
1
- # Documentation
2
-
3
- ## Getting Started
4
-
5
- - [Concepts](concepts.md) -- Stashes, registries, asset types, and refs
6
- - [Getting Started](getting-started.md) -- Quick setup guide
7
- - [Local Development](local-development.md) -- Dogfooding akm while editing its own source
8
- - [Agent Install Guide](agents/agent-install.md) -- Step-by-step automated install for agents
9
- - [Stash Maker's Guide](stash-makers.md) -- Build and share a stash on GitHub, npm, or a network directory
10
- - [Wikis](wikis.md) -- Multi-wiki knowledge bases (Karpathy-style)
11
-
12
- ## Configuration & Data
13
-
14
- - [Configuration](configuration.md) -- Providers, settings, and Ollama setup
15
- - [Configuring Agent Profiles](configuration-agent-profiles.md) -- How akm runs a coding agent, CLI or API
16
- - [Data & Telemetry](data-and-telemetry.md) -- Exactly what akm reads and writes on your machine (no remote telemetry)
17
-
18
- ## Features
19
-
20
- - [Workflows](features/workflows.md) -- Structured, resumable multi-step procedures
21
- - [Search & Discovery](features/search-discovery.md) -- Finding assets without knowing their exact name
22
- - [Knowledge Management](features/knowledge-management.md) -- Lessons, incidents, and research as first-class assets
23
- - [Sources & Registries](features/sources-registries.md) -- Where assets come from and how to find more
24
- - [Wiki Snapshot Fetchers](features/wiki-snapshot-fetchers.md) -- Pluggable fetchers for URL-based knowledge reads
25
- - [Agent Integration](features/agent-integration.md) -- Wiring akm into any shell-capable coding agent
26
- - [The Improvement Loop](features/improvement-loop.md) -- How the stash adapts from usage and feedback
27
-
28
- ## Upgrading
29
-
30
- - [Roadmap](roadmap.md) -- High-level focus for the 0.9 and 1.0 releases
31
- - [v1 migration guide](migration/v1.md) -- The path from 0.x to v1.0
32
- - [v0.8 -> v0.9 migration guide](migration/v0.8-to-v0.9.md) -- Current-cycle breaking changes
33
- - [Release notes (latest: 0.9.0)](migration/release-notes/0.9.0.md) -- Per-release notes; see the [release-notes index](migration/release-notes/README.md) for every version
34
- - [v0.5 -> v0.6 migration guide](migration/v0.5-to-v0.6.md) -- Every breaking change with before/after code, publisher checklist, and troubleshooting
35
-
36
- ## Reference
37
-
38
- - [CLI](cli.md) -- All `akm` commands and flags
39
- - [Registry](registry.md) -- Registries, search, hosting, and managing sources
40
- - [akm-eval](akm-eval.md) -- Standalone toolkit for measuring whether `akm improve` is working
41
-
42
- ## Agents
43
-
44
- - [AGENTS.md](agents/AGENTS.md) -- The system-prompt reference agents load to use akm
45
- - [Curate Workmap](agents/curate-workmap.md) -- Read before changing `akm curate` ranking or output
46
-
47
- ## Architecture
48
-
49
- - [Architecture](technical/architecture.md) -- How akm's sources, cache, index, and registries fit together
50
- - [Runtime Boundary Design](architecture/runtime-boundary-design.md) -- Isolating `bun:sqlite`/`Bun.*` from the core
51
- - [Brain Workflow (diagram)](architecture/brain-workflow.html) -- Visual map of the improve/self-learning loop
52
-
53
- ## Example Stash
54
-
55
- - [Example Stash](example-stash/README.md) -- A documentation-backed example stash showing how asset types fit together
56
-
57
- ## Analysis
58
-
59
- - [Indexer Vertical Slice Refactor Plan](analysis/indexer-vertical-slice-refactor-plan.md)
60
- - [Indexer Refactor Review (Expert Options)](analysis/indexer-refactor-expert-options.md)
61
-
62
- ## Design (unshipped work)
63
-
64
- - [Self-Improvement, Self-Learning & Memory Reference Index](design/self-improvement-learning-memory-reference-index.md) -- Master index for every unshipped improve/self-learning/memory design doc, with a subsystem-to-doc status table
65
-
66
- Every doc under `docs/design/` must carry a `Status` / `Supersedes` / `Date` header (pre-existing docs are grandfathered until next touched). When a design ships, the shipping PR moves it to `docs/archive/` in the same PR.
67
-
68
- ## Archive
69
-
70
- - [Archive](archive/README.md) -- Design and implementation plans whose work has already shipped, retained as ADR-style records
71
-
72
- ## Internals (technical/)
73
-
74
- - [Filesystem](technical/filesystem.md) -- Directory layout plus `.stash.json` deprecation and migration notes
75
- - [Search](technical/search.md) -- Hybrid search architecture and scoring
76
- - [Indexing](technical/indexing.md) -- How the search index is built
77
- - [Classification](technical/classification.md) -- Matcher and renderer behavior
78
- - [Storage Locations](technical/storage-locations.md) -- Authoritative inventory of every on-disk read/write path
79
- - [Improve Workflow](technical/improve-workflow.md) -- `akm improve` command surface and pipeline reference
80
- - [Health Advisories](technical/health-advisories.md) -- `akm health` advisory-to-action map for operators
81
- - [Fresh-Host Rebuild Runbook](technical/fresh-host-rebuild-runbook.md) -- Rebuild an akm install on a new machine
82
- - [Ranking Ablation & Saturation Analysis](technical/ranking-ablation-and-saturation-analysis.md) -- Reproducible contributor-ablation measurement and the score-saturation trap
83
- - [Functional Contract Patterns](technical/functional-contract-patterns.md) -- Quick reference for contributor pipelines and small process contracts
84
- - [Test Coverage Guide](technical/test-coverage-guide.md) -- High-value testing areas
85
- - [Testing Workflow](technical/testing-workflow.md) -- End-to-end, Docker, deployment, and upgrade validation
86
- - [Ref Format](technical/ref.md) -- Wire format for asset references
87
- - [Core Principles](technical/akm-core-principles.md) -- Design principles and constraints
88
- - [Claude Code workflows vs. akm workflows](technical/claude-code-vs-akm-workflows.md) -- Comparing the two things that share a name
89
- - [Extending akm workflows into a harness-agnostic orchestration engine](technical/akm-workflows-orchestration-plan.md) -- Current formalized plan, supersedes part of the doc above
90
-
91
- ## Official Ecosystem Repositories
92
-
93
- - [itlackey/akm-stash](https://github.com/itlackey/akm-stash) -- the official onboarding stash with ready-made assets you can install with `akm add`
94
- - [itlackey/akm-registry](https://github.com/itlackey/akm-registry) -- the official registry index that powers built-in discovery
95
- - [itlackey/akm-plugins](https://github.com/itlackey/akm-plugins) -- optional integrations for tools like OpenCode
96
- - [itlackey/akm-bench](https://github.com/itlackey/akm-bench) -- the standalone benchmark and evaluation repo for akm
97
-
98
- ## Posts
99
-
100
- - [Blog posts](posts/) -- Articles and posts about akm
101
-
102
- ---
103
-
104
- New docs, in five lines: keep one current-truth doc per subsystem, don't fork a second one. Unshipped designs live in `docs/design/` with a mandatory `Status` / `Supersedes` / `Date` header. The PR that ships the design moves its doc to `docs/archive/` in that same PR. Cite code by symbol and memories by search-terms -- not line numbers or exact refs, both rot. Nothing in `docs/` may reference `.plans/` (it's scratch -- promote the content or drop the link); no new improve-analysis docs until the 30-clean-day gate.