akm-cli 0.9.31 → 0.10.261002-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +420 -0
- package/STABILITY.md +99 -57
- package/dist/api-node.mjs +20 -0
- package/dist/api.d.ts +23 -0
- package/dist/api.js +45 -0
- package/dist/assets/hints/cli-hints-full.md +15 -29
- package/dist/assets/hints/cli-hints-short.md +2 -2
- package/dist/assets/improve-strategies/default.json +3 -3
- package/dist/assets/prompts/consolidate-pair.md +9 -7
- package/dist/assets/stash-skeleton/README.md +1 -1
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
- package/dist/cli/shared.js +31 -48
- package/dist/cli/unknown-flags.js +6 -43
- package/dist/cli.js +8 -34
- package/dist/commands/agent/contribute-cli.js +1 -1
- package/dist/commands/completions.js +1 -2
- package/dist/commands/config-cli.js +5 -28
- package/dist/commands/env/env-cli.js +5 -5
- package/dist/commands/env/secret-cli.js +2 -2
- package/dist/commands/feedback-cli.js +75 -49
- package/dist/commands/health/checks.js +41 -16
- package/dist/commands/health/plugin-staleness.js +52 -22
- package/dist/commands/improve/autonomy-gate.js +5 -3
- package/dist/commands/improve/consolidate/chunking.js +3 -10
- package/dist/commands/improve/consolidate/continuity-check.js +4 -4
- package/dist/commands/improve/consolidate/pair-pass.js +29 -10
- package/dist/commands/improve/consolidate.js +10 -65
- package/dist/commands/improve/distill/lesson-update.js +91 -0
- package/dist/commands/improve/distill-guards.js +1 -43
- package/dist/commands/improve/distill.js +148 -21
- package/dist/commands/improve/eligibility.js +14 -1
- package/dist/commands/improve/extract-cli.js +1 -1
- package/dist/commands/improve/extract-prompt.js +17 -7
- package/dist/commands/improve/extract.js +5 -7
- package/dist/commands/improve/improve-cli.js +92 -106
- package/dist/commands/improve/improve-strategies.js +8 -12
- package/dist/commands/improve/improve.js +134 -52
- package/dist/commands/improve/loop-stages.js +18 -5
- package/dist/commands/improve/planner.js +0 -1
- package/dist/commands/improve/preparation.js +40 -99
- package/dist/commands/improve/proactive-maintenance.js +2 -2
- package/dist/commands/improve/reflect-noise.js +3 -55
- package/dist/commands/improve/reflect.js +29 -34
- package/dist/commands/improve/retrieval-queries.js +37 -0
- package/dist/commands/improve/retrieval-scope.js +2 -2
- package/dist/commands/improve/salience.js +2 -9
- package/dist/commands/improve/session-asset.js +4 -1
- package/dist/commands/improve/stage.js +23 -12
- package/dist/commands/lint/index.js +5 -20
- package/dist/commands/observability-cli.js +3 -9
- package/dist/commands/proposal/drain.js +43 -6
- package/dist/commands/proposal/proposal-cli.js +11 -31
- package/dist/commands/proposal/repository.js +20 -14
- package/dist/commands/proposal/validators/proposal-quality-validators.js +0 -3
- package/dist/commands/read/knowledge.js +3 -3
- package/dist/commands/read/remember-cli.js +0 -13
- package/dist/commands/read/search-cli.js +29 -97
- package/dist/commands/read/search.js +0 -11
- package/dist/commands/read/show.js +0 -19
- package/dist/commands/sources/plugin-upgrade.js +164 -101
- package/dist/commands/sources/sources-cli.js +1 -15
- package/dist/commands/sources/stash-cli.js +6 -14
- package/dist/commands/tasks/tasks-cli.js +4 -115
- package/dist/commands/workflow/plan.js +11 -33
- package/dist/commands/workflow-cli.js +2 -7
- package/dist/core/adapter/adapter-ids.js +1 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
- package/dist/core/adapter/adapters/akm-adapter.js +9 -48
- package/dist/core/adapter/adapters/akm-lint.js +10 -26
- package/dist/core/adapter/adapters/akm-metadata.js +2 -72
- package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
- package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
- package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
- package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
- package/dist/core/adapter/recognize-match.js +3 -4
- package/dist/core/common.js +18 -2
- package/dist/core/config/config-schema.js +12 -15
- package/dist/core/config/config-types.js +6 -15
- package/dist/core/config/config-walker.js +6 -23
- package/dist/core/config/config.js +17 -80
- package/dist/core/config/engine-semantics.js +7 -3
- package/dist/core/config/schema/engines.js +7 -7
- package/dist/core/config/schema/improve-processes.js +10 -63
- package/dist/core/config/schema/improve.js +2 -21
- package/dist/core/config/schema/index-config.js +6 -39
- package/dist/core/env-secret-ref.js +2 -45
- package/dist/core/errors.js +1 -2
- package/dist/core/extra-params.js +2 -86
- package/dist/core/file-lock.js +2 -6
- package/dist/core/improve-result.js +13 -1
- package/dist/core/mutation-target.js +2 -2
- package/dist/core/paths.js +4 -0
- package/dist/core/recognition-util.js +4 -5
- package/dist/core/run-lock.js +1 -1
- package/dist/core/subprocess.js +49 -0
- package/dist/core/warn.js +21 -4
- package/dist/core/write-source.js +3 -3
- package/dist/execution/target-ref.js +1 -2
- package/dist/indexer/indexer.js +15 -6
- package/dist/indexer/passes/memory-inference.js +15 -6
- package/dist/indexer/search/db-search.js +49 -36
- package/dist/indexer/search/fts-query.js +0 -19
- package/dist/indexer/search/ranking.js +29 -1
- package/dist/indexer/usage/usage-events.js +21 -16
- package/dist/integrations/agent/engine-resolution.js +5 -2
- package/dist/integrations/agent/index.js +1 -1
- package/dist/integrations/agent/profiles.js +41 -98
- package/dist/integrations/agent/request-lowering.js +3 -3
- package/dist/integrations/harnesses/aider/index.js +5 -0
- package/dist/integrations/harnesses/amazonq/index.js +1 -0
- package/dist/integrations/harnesses/claude/config-import.js +2 -3
- package/dist/integrations/harnesses/claude/index.js +5 -0
- package/dist/integrations/harnesses/codex/index.js +1 -0
- package/dist/integrations/harnesses/copilot/index.js +1 -0
- package/dist/integrations/harnesses/gemini/index.js +1 -0
- package/dist/integrations/harnesses/index.js +18 -39
- package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
- package/dist/integrations/harnesses/opencode/config-import.js +121 -52
- package/dist/integrations/harnesses/opencode/index.js +22 -0
- package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
- package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
- package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
- package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
- package/dist/integrations/harnesses/opencode/session-log.js +104 -115
- package/dist/integrations/harnesses/opencode/version.js +98 -0
- package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
- package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
- package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +254 -0
- package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
- package/dist/integrations/harnesses/openhands/index.js +1 -0
- package/dist/integrations/harnesses/pi/index.js +1 -0
- package/dist/integrations/harnesses/shared.js +2 -0
- package/dist/integrations/harnesses/types.js +2 -0
- package/dist/llm/client.js +41 -11
- package/dist/output/cli-hints.js +1 -1
- package/dist/output/context.js +10 -19
- package/dist/output/format-exempt.js +5 -8
- package/dist/output/shapes/helpers.js +1 -22
- package/dist/output/shapes/passthrough.js +0 -1
- package/dist/output/shapes.js +3 -31
- package/dist/output/stdout.js +5 -1
- package/dist/output/text/command-format.js +6 -1
- package/dist/output/text/workflow-format.js +4 -22
- package/dist/scripts/akm-migrate-node.js +15745 -16711
- package/dist/scripts/akm-migrate.js +16318 -17280
- package/dist/setup/detect.js +10 -4
- package/dist/setup/harness-config-import.js +5 -14
- package/dist/setup/setup.js +1 -1
- package/dist/setup/steps/tasks.js +12 -13
- package/dist/sources/providers/git-stash.js +113 -16
- package/dist/storage/repositories/index-utility-repository.js +2 -32
- package/dist/storage/repositories/index-vec-repository.js +4 -0
- package/dist/storage/repositories/task-history-repository.js +0 -5
- package/dist/storage/repositories/workflow-runs-repository.js +5 -15
- package/dist/tasks/embedded.js +2 -1
- package/dist/tasks/run/run-command-task.js +9 -1
- package/dist/tasks/run/run-workflow-task.js +4 -3
- package/dist/tasks/run/task-history.js +0 -2
- package/dist/tasks/run/task-log.js +38 -1
- package/dist/tasks/schedule-gates.js +39 -0
- package/dist/tasks/scheduler-binding.js +0 -16
- package/dist/tasks/scheduler-sync.js +3 -97
- package/dist/tasks/source/bounded-document.js +1 -1
- package/dist/tasks/source/task-source-v4.js +2 -12
- package/dist/tasks/task-run-reserved-flags.js +2 -31
- package/dist/workflows/authoring/authoring.js +6 -6
- package/dist/workflows/compile.js +8 -65
- package/dist/workflows/exec/child-workflow.js +22 -3
- package/dist/workflows/exec/native-executor.js +12 -147
- package/dist/workflows/exec/run-workflow.js +31 -103
- package/dist/workflows/exec/step-work.js +9 -178
- package/dist/workflows/exec/unit-dispatch.js +0 -10
- package/dist/workflows/freeze/environment.js +3 -44
- package/dist/workflows/freeze/freeze.js +8 -41
- package/dist/workflows/freeze/targets/child-workflow.js +27 -63
- package/dist/workflows/freeze/targets/command.js +2 -16
- package/dist/workflows/freeze/targets/shell.js +0 -2
- package/dist/workflows/freeze/task-bindings.js +2 -28
- package/dist/workflows/ir/params.js +12 -2
- package/dist/workflows/parser.js +82 -232
- package/dist/workflows/plan.js +1 -1
- package/dist/workflows/renderer.js +10 -19
- package/dist/workflows/runtime/run-plan.js +11 -53
- package/dist/workflows/runtime/runs.js +4 -27
- package/dist/workflows/source-files.js +12 -16
- package/dist/workflows/source-semantics.js +1 -93
- package/docs/README.md +1 -1
- package/docs/agents/README.md +3 -3
- package/docs/agents/agent-install.md +1 -1
- package/docs/architecture/0.10-process-rules.md +827 -0
- package/docs/architecture/adapters.md +17 -31
- package/docs/architecture/architecture.md +4 -5
- package/docs/architecture/improvement.md +115 -76
- package/docs/architecture/internals/improve-workflow.md +22 -16
- package/docs/architecture/internals/indexing.md +1 -1
- package/docs/architecture/internals/search.md +1 -2
- package/docs/architecture/internals/storage-locations.md +6 -6
- package/docs/architecture/persisted-data-compat.md +13 -4
- package/docs/architecture/specs/0.9.0-decisions.md +6 -2
- package/docs/architecture/specs/improve-collapse-churn-detector-design.md +2 -2
- package/docs/architecture/specs/workflow-format-unification.md +1 -6
- package/docs/architecture/testing/manual-testing-checklist.md +21 -30
- package/docs/architecture/testing/task-workflow-manual-tests.md +106 -203
- package/docs/architecture/testing/testing-workflow.md +1 -1
- package/docs/architecture/workflow-engine.md +5 -56
- package/docs/guides/author-workflows.md +39 -69
- package/docs/guides/bundles.md +3 -1
- package/docs/guides/capture-knowledge.md +1 -1
- package/docs/guides/claude-code-vs-akm-workflows.md +1 -2
- package/docs/guides/discover-and-load.md +4 -4
- package/docs/guides/getting-started.md +1 -1
- package/docs/guides/improve-the-library.md +10 -9
- package/docs/guides/recipes/headless-install.md +2 -2
- package/docs/guides/run-workflows.md +1 -1
- package/docs/guides/scheduling.md +9 -1
- package/docs/guides/use-with-any-agent.md +49 -4
- package/docs/integration/bundling-akm.md +7 -6
- package/docs/maintainers/curate-workmap.md +1 -2
- package/docs/maintainers/release-checklist.md +33 -1
- package/docs/migration/README.md +2 -0
- package/docs/migration/release-notes/0.10.0.md +201 -0
- package/docs/migration/release-notes/README.md +1 -0
- package/docs/migration/v0.9-to-v0.10.md +507 -0
- package/docs/posts/akm-command-tour.md +3 -3
- package/docs/product-surface.md +1 -1
- package/docs/reference/README.md +1 -0
- package/docs/reference/api.md +65 -0
- package/docs/reference/asset-types.md +3 -5
- package/docs/reference/bundle-types.md +2 -4
- package/docs/reference/cli.md +160 -188
- package/docs/reference/configuration.md +101 -20
- package/docs/reference/data-and-telemetry.md +2 -2
- package/docs/reference/env-and-secrets.md +2 -2
- package/docs/reference/supported-formats.md +3 -4
- package/docs/reference/tasks.md +12 -19
- package/docs/reference/website-sources.md +1 -1
- package/docs/reference/workflow-schema.md +89 -317
- package/docs/reference/workflows.md +20 -48
- package/package.json +12 -2
- package/schemas/akm-config.json +2 -243
- package/schemas/akm-task.json +2 -3
- package/schemas/akm-workflow.json +47 -84
- package/dist/assets/improve-strategies/catchup.json +0 -41
- package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
- package/dist/assets/improve-strategies/quick.json +0 -17
- package/dist/assets/improve-strategies/reflect-distill.json +0 -29
- package/dist/assets/improve-strategies/thorough.json +0 -49
- package/dist/assets/prompts/retrieval-relevance-judge.md +0 -6
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
- package/dist/cli/retired-commands.js +0 -118
- package/dist/commands/improve/retrieval-gate.js +0 -132
- package/dist/commands/tasks/validate.js +0 -176
- package/dist/core/config/legacy-source-shape-shim.js +0 -117
- package/dist/indexer/feedback/utility-policy.js +0 -75
- package/dist/integrations/harnesses/ids.js +0 -28
- package/dist/tasks/source/task-source-v3-frozen.js +0 -424
- package/dist/tasks/source/task-to-v4.js +0 -863
- package/dist/workflows/exec/worktree.js +0 -372
- package/dist/workflows/freeze/child-output-references.js +0 -83
- package/dist/workflows/freeze/identity.js +0 -22
- package/dist/workflows/freeze/targets/script.js +0 -50
- package/dist/workflows/freeze/targets/task.js +0 -124
- package/dist/workflows/github-yaml.js +0 -506
- package/dist/workflows/runtime/run-outputs.js +0 -80
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
# Moving from akm 0.9 to 0.10
|
|
2
|
+
|
|
3
|
+
0.10 is a clean-up and tuning release. It adds no `state.db` migration and
|
|
4
|
+
does not change the `index.db` layout (still 26). It does remove CLI
|
|
5
|
+
spellings, built-in improve strategies and a few workflow features, it changes
|
|
6
|
+
what a nightly `akm improve` does on its own, and it changes how releases are
|
|
7
|
+
numbered. This guide lists what to do, in order, and every change that can
|
|
8
|
+
break a script, a task or a config.
|
|
9
|
+
|
|
10
|
+
Checked against the `release/0.10.0` branch at build 0.10.26101202. The
|
|
11
|
+
user-facing summary of the whole series is the
|
|
12
|
+
[0.10.0 release note](release-notes/0.10.0.md); the per-build detail is in the
|
|
13
|
+
[CHANGELOG](https://github.com/itlackey/akm/blob/main/CHANGELOG.md).
|
|
14
|
+
|
|
15
|
+
## What the upgrade preserves
|
|
16
|
+
|
|
17
|
+
- config, `state.db`, `index.db`, task sources, frozen workflow plans and
|
|
18
|
+
scheduler rows that 0.9.15 or later wrote;
|
|
19
|
+
- every authored asset in your bundles;
|
|
20
|
+
- the `akm upgrade` and `akm migrate` commands, with the same behaviour.
|
|
21
|
+
|
|
22
|
+
## What it does not cover
|
|
23
|
+
|
|
24
|
+
0.10 reads what 0.9.15 and later wrote and converts nothing older. A config
|
|
25
|
+
still in the old `stashDir` / `sources[]` / `installed[]` layout, or one with an
|
|
26
|
+
`engines.<name>.extraParams` key that shadows a first-class engine field,
|
|
27
|
+
fails to load with one message that names `akm migrate apply` under akm 0.9.x.
|
|
28
|
+
An install older than 0.9.15 must go through 0.9.x first (step 1).
|
|
29
|
+
|
|
30
|
+
## Upgrade procedure
|
|
31
|
+
|
|
32
|
+
### 1. Check your starting point
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
akm --version
|
|
36
|
+
akm migrate status
|
|
37
|
+
akm workflow list --active
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- **Older than 0.9.15?** Install 0.9.31 first (`npm install -g akm-cli@0.9.31`,
|
|
41
|
+
or the same with Bun or pnpm, or the standalone binary from the `v0.9.31`
|
|
42
|
+
GitHub release), run `akm migrate apply` under it, then continue. Once 0.10
|
|
43
|
+
is the `latest` release, a plain `akm upgrade` would skip that step.
|
|
44
|
+
- **0.9.15 or later?** `akm migrate status` should end with `status: "current"`.
|
|
45
|
+
If it does not, run `akm migrate apply` now, under 0.9.x, and read what it
|
|
46
|
+
changed.
|
|
47
|
+
- **Workflow runs in flight.** A stored run whose plan has a `route` step or a
|
|
48
|
+
`script` target (both came from features 0.10 removed) cannot be decoded in
|
|
49
|
+
0.10; `akm workflow run` abandons it. A run whose plan has `unit.isolation`
|
|
50
|
+
still decodes and runs in the engine's working directory. Let active runs
|
|
51
|
+
finish, or abandon them on purpose, before you upgrade.
|
|
52
|
+
- **Quit OpenCode.** `akm upgrade` skips (reports `deferred`) a plugin update
|
|
53
|
+
while an OpenCode process runs. See [Plugins](#plugins).
|
|
54
|
+
|
|
55
|
+
### 2. Find the callers that need a change
|
|
56
|
+
|
|
57
|
+
The spellings in the [CLI](#cli-spellings-that-are-gone) and
|
|
58
|
+
[improve](#improve-strategies-tasks-and-config-keys) tables are unknown flags
|
|
59
|
+
or commands in 0.10 (exit 2, `UNKNOWN_FLAG` / `UNKNOWN_COMMAND`), with no alias
|
|
60
|
+
and no hint that points to the new spelling. Search your scripts, hooks,
|
|
61
|
+
agent instructions, scheduled tasks and crontab for them before you upgrade:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
grep -rnE -- '--shape|--target|help agents|task (list|validate)|config path --all|--reset|improve .*(--plan|--auto-accept|--run|--since)|--strategy +(quick|reflect-distill|thorough|catchup|proactive-maintenance)' <your script and task directories>
|
|
65
|
+
crontab -l | grep akm
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`--target` is still valid on `env run`, `bundle remove`, `bundle update` and
|
|
69
|
+
`registry remove` (it names the thing to act on there). Read each hit.
|
|
70
|
+
|
|
71
|
+
### 3. Upgrade the program
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
akm upgrade --check
|
|
75
|
+
akm upgrade
|
|
76
|
+
akm --version
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`akm upgrade` installs the newer release, then runs `akm-migrate apply` (the
|
|
80
|
+
migrator that shipped with the new install), then updates the harness plugins.
|
|
81
|
+
It exits 1 when the migration is blocked.
|
|
82
|
+
|
|
83
|
+
- **Release channels.** 0.10 releases are `0.10.YYMMNN`. Prereleases
|
|
84
|
+
(`-alpha`, `-beta`, `-rc`) publish to the npm `next` tag and stable builds to
|
|
85
|
+
`latest`; `akm upgrade --next` follows `next`. See
|
|
86
|
+
[Version numbers](#version-numbers).
|
|
87
|
+
- **OpenCode plugin installed?** `akm upgrade` holds the CLI to the `akm-cli`
|
|
88
|
+
version the plugin pins (see [Plugins](#plugins)). If the CLI stays on
|
|
89
|
+
0.9.x and the output says it was held back, the plugin on that channel has
|
|
90
|
+
not published a 0.10 build yet.
|
|
91
|
+
- You can install a specific version directly with npm, Bun or pnpm
|
|
92
|
+
(`akm-cli@<version>`), or replace the standalone binary after checking its
|
|
93
|
+
published checksum.
|
|
94
|
+
|
|
95
|
+
### 4. Apply the config migration
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
akm migrate status
|
|
99
|
+
akm migrate apply --dry-run
|
|
100
|
+
akm migrate apply
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`akm upgrade` already ran `apply`; run `status` to confirm. What `apply` does
|
|
104
|
+
in 0.10:
|
|
105
|
+
|
|
106
|
+
- rewrites `config.json` through the normal load path, under a backup in
|
|
107
|
+
`<cache dir>/config-backups/`, and drops every retired or unknown key (the
|
|
108
|
+
[removed keys](#improve-strategies-tasks-and-config-keys) below);
|
|
109
|
+
- applies pending `state.db` migrations. 0.10 adds none, so on a 0.9.31 install
|
|
110
|
+
this step has nothing to do;
|
|
111
|
+
- rewrites task files still at version 2 or 3 as task source v4 and reports
|
|
112
|
+
any it cannot convert as `blocked`;
|
|
113
|
+
- removes superseded residue files.
|
|
114
|
+
|
|
115
|
+
Until you run it, a retired key in `config.json` is harmless: the config loads,
|
|
116
|
+
names the key once, and ignores it.
|
|
117
|
+
|
|
118
|
+
### 5. Fix what the migration cannot
|
|
119
|
+
|
|
120
|
+
- **`defaults.improveStrategy` or `--strategy` names a removed strategy.** The
|
|
121
|
+
config still loads, but `akm improve` fails (exit 78) with an error that names
|
|
122
|
+
`default`. `akm health` reports it as the warning `active-improve-strategy`.
|
|
123
|
+
Change the name, or define a strategy of that name yourself (below).
|
|
124
|
+
- **Scheduled tasks that call a removed strategy, flag or command.** Edit the
|
|
125
|
+
task source, then run `akm task sync`. Tasks copied from the shipped
|
|
126
|
+
templates `akm-improve-nightly`, `akm-improve-frequent` and
|
|
127
|
+
`akm-improve-catchup` keep their `--strategy`; change it to `default` or
|
|
128
|
+
`consolidate`.
|
|
129
|
+
- **A consolidate task copied from the shipped template** runs with the old
|
|
130
|
+
2-hour budget. The shipped `akm-improve-consolidate` task now passes
|
|
131
|
+
`--timeout-ms 3600000` so its 00:20 run ends before a 02:00 nightly; add the
|
|
132
|
+
flag to your copy if you run both.
|
|
133
|
+
- **Workflows.** Rewrite any `.yml` workflow as Markdown and remove the
|
|
134
|
+
[removed workflow features](#workflows).
|
|
135
|
+
- **Pasted agent guides.** If you pasted `akm help agents` output into an
|
|
136
|
+
`AGENTS.md` or a system prompt, regenerate it with
|
|
137
|
+
`akm hints --detail brief` (or `akm hints` for the complete guide). The old
|
|
138
|
+
text uses `--shape`.
|
|
139
|
+
|
|
140
|
+
### 6. Update the plugins and other callers
|
|
141
|
+
|
|
142
|
+
See [Plugins](#plugins). Do this in the same sitting: a 0.9 plugin passes
|
|
143
|
+
`--shape agent`, which 0.10 rejects, and a 0.10 plugin passes `--detail agent`,
|
|
144
|
+
which 0.9 rejects.
|
|
145
|
+
|
|
146
|
+
### 7. Verify
|
|
147
|
+
|
|
148
|
+
See [Verify the upgrade](#verify-the-upgrade).
|
|
149
|
+
|
|
150
|
+
## Breaking changes
|
|
151
|
+
|
|
152
|
+
### CLI spellings that are gone
|
|
153
|
+
|
|
154
|
+
Each is an unknown flag or command (exit 2) from 0.10.
|
|
155
|
+
|
|
156
|
+
| Gone | Use |
|
|
157
|
+
| --- | --- |
|
|
158
|
+
| `akm help agents` | `akm hints` (complete guide); `akm hints --detail brief` for the short one |
|
|
159
|
+
| `--shape agent` (any command) | `--detail agent` |
|
|
160
|
+
| `--shape summary` (only `akm show` used it) | `--detail brief` |
|
|
161
|
+
| `--detail` values | now `brief`, `normal`, `full`, `agent`; `agent` trims `search`, `curate` and `show`, other commands ignore it |
|
|
162
|
+
| `--target` on `import`, `env create`, `env remove`, `secret set`, `proposal accept`, `proposal diff`, `proposal revert` | `--bundle` |
|
|
163
|
+
| `akm task validate <path>` | `akm lint --type tasks` (also runs the two gates `akm task sync` runs; point `--dir` at a bundle root, not a file) |
|
|
164
|
+
| `akm task list` | `akm search --type task` |
|
|
165
|
+
| `akm config path --all` | `akm info` (reports the bundle, config, data, cache and state directories) |
|
|
166
|
+
| `akm improve --plan` | `akm improve --dry-run` |
|
|
167
|
+
| `akm improve --auto-accept` | `akm improve && akm proposal drain --promote --yes`, or a `triage` block with `applyMode: "promote"` |
|
|
168
|
+
| `akm improve --run`, `akm improve --since` | `akm improve report --run` / `--since` |
|
|
169
|
+
| `akm workflow create --reset` | `--force` (alone: replace with a fresh template; with `--from <file>`: replace from the file) |
|
|
170
|
+
|
|
171
|
+
Also gone, with no replacement needed:
|
|
172
|
+
|
|
173
|
+
- every hint that told you the new spelling of a retired 0.9.0 command or
|
|
174
|
+
flag. A retired command is now a plain `UNKNOWN_COMMAND` (with a "did you
|
|
175
|
+
mean" only when the name is close) and a retired flag a plain `UNKNOWN_FLAG`;
|
|
176
|
+
- the error codes `INVALID_SHAPE_VALUE`; `INVALID_DETAIL_VALUE` now lists
|
|
177
|
+
`agent`;
|
|
178
|
+
- `task run` and `task explain` no longer reserve the input name `target`.
|
|
179
|
+
|
|
180
|
+
`akm improve report` and `akm improve judge` are now real subcommands. Both
|
|
181
|
+
spellings you used before still work; `--run` and `--since` belong to `report`
|
|
182
|
+
alone, and `--strategy` is also `judge`'s own flag. `akm improve [scope]` is
|
|
183
|
+
unchanged. `akm improve canary` is now an asset-type scope that matches nothing.
|
|
184
|
+
|
|
185
|
+
### Improve strategies, tasks and config keys
|
|
186
|
+
|
|
187
|
+
**Built-in strategies.** Only `default` and `consolidate` are built in.
|
|
188
|
+
|
|
189
|
+
| Removed | Why / what to do |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| `quick` | Measured at 0.75 to 0.76 of items solved against `default`'s 0.89 to 0.92. For a reflect-only run, define your own (below). |
|
|
192
|
+
| `reflect-distill` | Same measurement (0.77 to 0.78). Use `default`. |
|
|
193
|
+
| `thorough` | Added only a judged triage drain, which harmed items. Use `default`. |
|
|
194
|
+
| `catchup` | Identical to `consolidate` on the pool. Use `consolidate`. |
|
|
195
|
+
| `proactive-maintenance` | The lane now lives in `default`. |
|
|
196
|
+
|
|
197
|
+
A `improve.strategies.<name>` block with one of these names stays valid as an
|
|
198
|
+
ordinary user-defined strategy, but it now inherits `default` and no longer
|
|
199
|
+
carries the old built-in's settings. A reflect-only replacement for `quick`:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"improve": {
|
|
204
|
+
"strategies": {
|
|
205
|
+
"reflect-only": {
|
|
206
|
+
"processes": {
|
|
207
|
+
"distill": { "enabled": false },
|
|
208
|
+
"consolidate": { "enabled": false },
|
|
209
|
+
"memoryInference": { "enabled": false },
|
|
210
|
+
"triage": { "enabled": false },
|
|
211
|
+
"validation": { "enabled": false },
|
|
212
|
+
"proactiveMaintenance": { "enabled": false }
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Shipped task templates.** `akm-improve-nightly`, `akm-improve-frequent` and
|
|
221
|
+
`akm-improve-catchup` are gone. The nightly template for a server install is
|
|
222
|
+
now `core/improve` (`akm improve --require-engines`, 02:00), and `akm setup`
|
|
223
|
+
preselects it.
|
|
224
|
+
|
|
225
|
+
**Config keys.** These are removed. A config that still sets one loads (the key
|
|
226
|
+
is named once by the unknown-key warning and ignored), and `akm migrate apply`
|
|
227
|
+
drops it. Paths are under `improve.strategies.<name>.processes.` unless noted.
|
|
228
|
+
|
|
229
|
+
| Removed key | Note |
|
|
230
|
+
| --- | --- |
|
|
231
|
+
| `consolidate.antiCollapse`, `consolidate.p90ChunkSecondsDefault`, `consolidate.minPoolSize`, `distill.fidelityCheck`, `reflect.lowValueFilter`, `improve.salience.outcomeWeightEnabled` | Measured no effect. The `pool_below_min_size` skip reason goes with `minPoolSize`. |
|
|
232
|
+
| `improve.salience.salienceThreshold` | The high-salience lane it tuned is gone. |
|
|
233
|
+
| `distill.limit`, `memoryInference.cls`, `proactiveMaintenance.limit`, `triage.policy` | Nothing read them. `distill.cls` and the `limit` of `reflect` and `consolidate` are read and stay. |
|
|
234
|
+
| `defaults.llm`, `defaults.agent`, `defaults.improve`, `feedbackDistillation`, `index.<pass>.{endpoint,provider,apiKey,baseUrl,temperature,maxTokens,capabilities}`, `index.stalenessDetection` | 0.9 rejected these with a bespoke error. They now load like any unknown key. |
|
|
235
|
+
|
|
236
|
+
Config that is newly refused: a retired source key (`stashDir`, `sources`,
|
|
237
|
+
`installed`) and an `engines.<name>.extraParams` key that shadows a first-class
|
|
238
|
+
field (`temperature`, `maxTokens`, `enableThinking`, `reasoningEffort`). Both
|
|
239
|
+
were only warned about in 0.9.15 and later; the error says to run
|
|
240
|
+
`akm migrate apply` under akm 0.9.x.
|
|
241
|
+
|
|
242
|
+
### Workflows
|
|
243
|
+
|
|
244
|
+
Workflows are Experimental through 0.10. Removed:
|
|
245
|
+
|
|
246
|
+
- **The GitHub-shaped YAML workflow format.** A `.yml` under `workflows/` is
|
|
247
|
+
skipped at index time with the message "must use .md". Rewrite it as
|
|
248
|
+
Markdown. This takes with it workflow-step `uses: tasks/<ref>`,
|
|
249
|
+
`uses: scripts/<ref>` and `uses: commands/<ref>`, YAML `on.schedule`
|
|
250
|
+
triggers, and the `script` frozen target. A task that runs a workflow
|
|
251
|
+
(`uses: workflows/<ref>`, or a `run:` that calls `akm workflow run`) is a
|
|
252
|
+
task feature and is unchanged.
|
|
253
|
+
- **Top-level `outputs:`** (a lint error). A completed child workflow returns
|
|
254
|
+
the output of its last step; a parent reads `steps.<composing-step>.output`.
|
|
255
|
+
- **`route` steps** (a lint error). Branch with an `exec` or agent step that
|
|
256
|
+
reads its inputs.
|
|
257
|
+
- **`unit.isolation: worktree`** (a lint error).
|
|
258
|
+
|
|
259
|
+
Child workflows stay, in a simpler form: a Markdown step declares
|
|
260
|
+
`unit: { workflow: workflows/<name>, with: { <param>: <literal or { from: <reference> }> } }`.
|
|
261
|
+
See [Workflow schema](../reference/workflow-schema.md#child-workflows).
|
|
262
|
+
|
|
263
|
+
One change in the other direction: a param's `default:` is now applied. A run
|
|
264
|
+
starts with each declared default for the params it was not given, where it
|
|
265
|
+
used to leave them absent. Workflows that restated their defaults in prose can
|
|
266
|
+
stop.
|
|
267
|
+
|
|
268
|
+
### Internal surfaces and packaging
|
|
269
|
+
|
|
270
|
+
- **`BundleAdapter.placeNew()`** is removed, with its nine implementations. It
|
|
271
|
+
was never called; every write already used the fixed type-to-directory table.
|
|
272
|
+
There is no behaviour change. A writable bundle in a non-akm layout would need
|
|
273
|
+
per-adapter placement back ([#1163](https://github.com/itlackey/akm/issues/1163)).
|
|
274
|
+
- **`package.json` has an `exports` map**: `akm-cli/api`, `akm-cli/package.json`
|
|
275
|
+
and `akm-cli/dist/*`. `akm-cli/api` exports `curate` for in-process recall by
|
|
276
|
+
the plugins (see [Programmatic API](../reference/api.md)). Any other deep
|
|
277
|
+
import path no longer resolves.
|
|
278
|
+
- **The task-source migrator moved** to `scripts/akm-migrate/migrate/` out of
|
|
279
|
+
`src/`. `akm migrate apply` and `akm-migrate apply` behave as before for data
|
|
280
|
+
0.9.15 and later wrote.
|
|
281
|
+
- **Dropped runtime shims.** The `{kind, ref, sourceId}` write-back of
|
|
282
|
+
`scheduler.enabled` is gone: 0.10 writes plain refs and still reads the
|
|
283
|
+
object form. The `targetVocab` marker on `task_history` rows is no longer
|
|
284
|
+
written, and the `"mcp"` package keyword is gone (akm has no MCP code).
|
|
285
|
+
|
|
286
|
+
## Behaviour changes you will notice
|
|
287
|
+
|
|
288
|
+
### `akm improve`
|
|
289
|
+
|
|
290
|
+
- **A nightly `akm improve` now drains the proposal queue.** The `default`
|
|
291
|
+
strategy runs triage in `promote` mode with judgment off, up to 200 accepts
|
|
292
|
+
a run (it was off before). It accepts proposals a quality judge already
|
|
293
|
+
stamped as passing, when their content has not changed since, and retirements
|
|
294
|
+
the consolidate pair pass staged with no continuity risk. It never accepts a
|
|
295
|
+
proposal from the proactive lane (reason `proactive-needs-review`), an
|
|
296
|
+
uncertain verdict, or a distill lesson. The judgment tier is off in every
|
|
297
|
+
built-in strategy and, if you turn it on, accepts only consolidate
|
|
298
|
+
promotions. To keep the old behaviour of leaving every proposal for you, set
|
|
299
|
+
this in config:
|
|
300
|
+
|
|
301
|
+
```json
|
|
302
|
+
{ "improve": { "strategies": { "default": { "processes": { "triage": { "enabled": false } } } } } }
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Every accept is an ordinary accept: a git-backed bundle gets the usual commit,
|
|
306
|
+
and `akm proposal revert` undoes it. A standalone `akm proposal drain` now
|
|
307
|
+
resolves to promote mode on a stock install, asks for confirmation, and needs
|
|
308
|
+
`--yes` when there is no terminal.
|
|
309
|
+
- **The proactive-maintenance lane is on in `default`.** It plans up to 15
|
|
310
|
+
assets a run that have no fresh feedback and were not reflected or distilled
|
|
311
|
+
in the last 30 days. Its proposals wait for you. `--require-feedback-signal`
|
|
312
|
+
turns it off for one run; `processes.proactiveMaintenance.enabled: false`
|
|
313
|
+
turns it off in a strategy.
|
|
314
|
+
- **Sync before the run.** On a git-backed bundle, a live run does what
|
|
315
|
+
`akm sync` does right after it takes its lock and before it plans: commit
|
|
316
|
+
pending edits in the managed paths, fetch, fast-forward or merge, push. A
|
|
317
|
+
conflict or a failed fetch warns and the run continues on local state. The
|
|
318
|
+
result carries `preRunSync`. `--no-sync` skips both the pre-run and the
|
|
319
|
+
end-of-run sync, and `--no-push` skips the push.
|
|
320
|
+
- **Uncertain reflect verdicts go to a person.** A reflect revision the judge
|
|
321
|
+
does not pass but scores 3.5 or more becomes a pending proposal
|
|
322
|
+
(`judge-uncertain`, shown as `gate=deferred:judge-uncertain`) with no 14-day
|
|
323
|
+
lock on the asset. A lower score is refused as before. A distill lesson or
|
|
324
|
+
promotion whose judge is missing is queued for review, not locked out for 30
|
|
325
|
+
days.
|
|
326
|
+
- **The retrieval regression gate is gone.** After the judge passed a revision,
|
|
327
|
+
reflect used to grade old and new text against the asset's retrieval queries
|
|
328
|
+
and refuse the revision if the grade fell. It refused 12 to 17 percent of
|
|
329
|
+
revisions the judge had passed. A judge-passed revision is now minted as a
|
|
330
|
+
proposal with no further check. The gate had no config key.
|
|
331
|
+
- **`captureMode: hot` memories are consolidated like any other.** The pair pass
|
|
332
|
+
may retire one and the promote pass may promote and archive one.
|
|
333
|
+
- **Distill can extend a lesson.** When a memory repeats an existing lesson, a
|
|
334
|
+
proposal on the lesson's own ref adds the new lines (reason `distill-update`).
|
|
335
|
+
It is left for a person.
|
|
336
|
+
- **Retirements expire.** A retire proposal now expires by age like any other
|
|
337
|
+
(`archiveRetentionDays`, default 90) instead of never; `akm proposal reopen`
|
|
338
|
+
brings one back. One whose file or successor has changed is rejected once as
|
|
339
|
+
`stale-target`.
|
|
340
|
+
- **Per-run log files are purged.** `$CACHE/logs/improve/` and
|
|
341
|
+
`$CACHE/logs/index/` files now follow `improve.eventRetentionDays` (default 90;
|
|
342
|
+
0 disables).
|
|
343
|
+
- **`akm improve <scope>` warns** on stderr when the scope matches no asset,
|
|
344
|
+
naming the likely intended type. Exit code and plan are unchanged.
|
|
345
|
+
- **A run killed by its budget watchdog** now leaves an `improve_runs` row
|
|
346
|
+
(`budget_exhausted`) and commits what it wrote, without pushing.
|
|
347
|
+
|
|
348
|
+
### Feedback
|
|
349
|
+
|
|
350
|
+
- **Manual fixes apply at once.** `akm feedback --negative ... --replace/--with/--source`,
|
|
351
|
+
`--superseded-by` and `--outdated` used to queue a `feedback` proposal for
|
|
352
|
+
`akm proposal accept`. They now file it and accept it in the same command
|
|
353
|
+
(gate decision `manual-fix`, no judge). If the accept refuses, the proposal is
|
|
354
|
+
rejected, the file is untouched and the command fails. Drop any follow-up
|
|
355
|
+
`akm proposal accept` from your scripts; use `akm proposal revert` to undo.
|
|
356
|
+
- **Feedback changes search and curate ranking.** Each hit's score is
|
|
357
|
+
multiplied by `1 + 0.03 x (ln(1 + positives) - ln(1 + negatives))`, counting
|
|
358
|
+
your own feedback events for the asset (not improve, task or audit feedback).
|
|
359
|
+
The effect is small: about +2 percent, +3, +5 and +9 for 1, 2, 5 and 20
|
|
360
|
+
positives. It reorders close matches and does not override relevance, and it
|
|
361
|
+
takes effect without a reindex. `rankingUpdate.applied` in the `akm feedback`
|
|
362
|
+
output is now `true` exactly when the event counts toward ranking.
|
|
363
|
+
- **Utility has one formula.** `akm feedback` and `akm index` now compute the
|
|
364
|
+
utility score the same way, so the stored value no longer depends on which ran
|
|
365
|
+
last. Improve and `akm metrics` read it; search does not.
|
|
366
|
+
|
|
367
|
+
### Other commands
|
|
368
|
+
|
|
369
|
+
- **`akm sync` fetches first.** On a writable bundle with a remote it fetches,
|
|
370
|
+
fast-forwards or merges what another host pushed, then pushes. A merge that
|
|
371
|
+
conflicts is aborted, your commit stays, the push is skipped and `reason`
|
|
372
|
+
names the files. Before this it failed with exit 70 once another host had
|
|
373
|
+
pushed.
|
|
374
|
+
- **`akm search` no longer warns "no embedding provider is configured"** on a
|
|
375
|
+
default install. It warns only for a remote `embedding.endpoint` with no
|
|
376
|
+
`embedding.model`.
|
|
377
|
+
- **Command tasks (`uses: commands/...`) get the 6-hour unattended timeout** that
|
|
378
|
+
workflow and shell tasks already had. An explicit task `timeout:`, an engine
|
|
379
|
+
timeout or `timeout: null` still wins.
|
|
380
|
+
- **Memory inference** writes to the default bundle (it used the first bundle in
|
|
381
|
+
the list), and no longer reverts an edit made to the parent memory while the
|
|
382
|
+
model ran.
|
|
383
|
+
- **The session summary prompt** fences the transcript as untrusted.
|
|
384
|
+
- **A transient reflect failure** (transport error, timeout, crash) no longer
|
|
385
|
+
uses up the feedback that planned it; the ref is retried next run.
|
|
386
|
+
|
|
387
|
+
## Deprecated in 0.10
|
|
388
|
+
|
|
389
|
+
- **The `opencode` CLI dispatch path.** An agent engine with
|
|
390
|
+
`platform: "opencode"` runs `opencode run` for each call. It still works on
|
|
391
|
+
OpenCode 1 and 2 throughout 0.10, but it is deprecated and may be removed in
|
|
392
|
+
0.11 or later. Switch such engines to `opencode-sdk`, which covers the same
|
|
393
|
+
work, including a default agent for the engine.
|
|
394
|
+
|
|
395
|
+
## Plugins
|
|
396
|
+
|
|
397
|
+
| OpenCode | Package | Config key | Cache folder |
|
|
398
|
+
| --- | --- | --- | --- |
|
|
399
|
+
| 1 | `akm-opencode` | `"plugin"` | `~/.cache/opencode/packages/akm-opencode@<tag>/` |
|
|
400
|
+
| 2 | `akm-opencode-v2` (new) | `"plugins"` | `~/.cache/opencode/npm/akm-opencode-v2@<tag>/<build>/` |
|
|
401
|
+
|
|
402
|
+
(`$XDG_CACHE_HOME` moves both.) Install only the package for the OpenCode you
|
|
403
|
+
run. For OpenCode 2, run `opencode plugin add akm-opencode-v2`.
|
|
404
|
+
|
|
405
|
+
- **Each plugin pins one exact `akm-cli`.** It runs that CLI in-process, so
|
|
406
|
+
`akm upgrade` never moves the CLI past the pin, and with both plugins present
|
|
407
|
+
it holds the CLI to the older pin. It never moves the CLI backwards. If it
|
|
408
|
+
cannot read the pin it leaves the CLI alone and exits 1. `akm health` warns
|
|
409
|
+
when a plugin's bundled `akm-cli` differs from the running CLI.
|
|
410
|
+
- **OpenCode caches the plugin spec it resolved, and never re-checks it.** A new
|
|
411
|
+
plugin build is not picked up until its cache folder is cleared. `akm upgrade`
|
|
412
|
+
does this for `@latest` (and `@next` with `--next`) when no OpenCode process
|
|
413
|
+
is running: it moves the folder to the trash, then re-fetches (`opencode debug
|
|
414
|
+
config` for OpenCode 1, `opencode plugin add akm-opencode-v2` for OpenCode 2).
|
|
415
|
+
If your config pins another spec, such as `akm-opencode@0.9.30`, `akm upgrade`
|
|
416
|
+
leaves it alone: change the spec, quit OpenCode, move that cache folder aside
|
|
417
|
+
and start OpenCode again.
|
|
418
|
+
- **OpenCode 2 permission defaults.** akm rejects every OpenCode permission
|
|
419
|
+
request in a dispatch and changes no OpenCode default. OpenCode 1 asks before
|
|
420
|
+
reading or writing outside the project directory, so akm rejects it and the
|
|
421
|
+
model carries on. OpenCode 2 does not ask, so a read or write outside the
|
|
422
|
+
project just runs. To get the rejection on OpenCode 2, add a rule to the
|
|
423
|
+
global `opencode.json`, for example
|
|
424
|
+
`"permissions": [{"action": "external_directory", "resource": "*", "effect": "ask"}]`.
|
|
425
|
+
When akm rejects a request on OpenCode 2 the turn ends with `ok: false` and
|
|
426
|
+
`reason: "aborted"`. See [Configuration](../reference/configuration.md#engines).
|
|
427
|
+
- **Which OpenCode akm drives is detected**, from the engine's `bin` (or
|
|
428
|
+
`opencode2`, else `opencode`, on `PATH`). There is no setting. OpenCode 1
|
|
429
|
+
logs one warning recommending OpenCode 2; a binary of an unknown major is
|
|
430
|
+
driven as OpenCode 2 with a warning.
|
|
431
|
+
- **Claude Code and Codex plugins** come from the `akm-plugins` marketplace and
|
|
432
|
+
are updated by `akm upgrade`. Use the 0.10 plugin set with 0.10 (it passes
|
|
433
|
+
`--detail agent`; see itlackey/akm-plugins#133).
|
|
434
|
+
- **Other callers.** Anything of yours that passes `--shape agent` (benchmark
|
|
435
|
+
runners, hooks) needs `--detail agent` and akm 0.10 together. akm-eval's
|
|
436
|
+
retrieval, skillret and longmemeval benchmarks are the known ones
|
|
437
|
+
(itlackey/akm-eval#33).
|
|
438
|
+
- **A signal to `akm agent` now ends the harness.** `akm agent` on the
|
|
439
|
+
`opencode`, `claude` and `codex` CLI engines runs the harness in its own
|
|
440
|
+
process group, and SIGTERM or SIGINT to akm now takes it down too.
|
|
441
|
+
|
|
442
|
+
## Version numbers
|
|
443
|
+
|
|
444
|
+
From 0.10 a release is numbered `0.10.YYMMNN`: the UTC year and month, then the
|
|
445
|
+
release within that month (`01` to `99`), two digits each. The first release of
|
|
446
|
+
2026-10 is `0.10.261001`. Every release takes the next number, whatever its
|
|
447
|
+
stage. A prerelease carries its stage only (`0.10.261001-alpha`, `-beta`,
|
|
448
|
+
`-rc`), and a build is not promoted through stages under one number. Prereleases
|
|
449
|
+
go to the npm `next` tag and stable releases to `latest`. Versions sort by
|
|
450
|
+
month and then number, so `akm upgrade` and semver ranges order them correctly.
|
|
451
|
+
The patch number no longer says how big a change is: read the CHANGELOG, which
|
|
452
|
+
still marks breaking changes. The 0.9 line keeps `0.9.N`, and 0.11 restarts on
|
|
453
|
+
the same scheme.
|
|
454
|
+
|
|
455
|
+
**If you installed a 0.10 daily alpha** (`0.10.26101001-alpha` through
|
|
456
|
+
`0.10.26101202-alpha`, an 8-digit patch), `akm upgrade` will not offer the
|
|
457
|
+
monthly numbering: semver compares the patch numerically, so `0.10.261001` is
|
|
458
|
+
below every daily alpha. Install the first monthly release explicitly once, for
|
|
459
|
+
example `npm install -g akm-cli@0.10.261001-beta`; `akm upgrade` works normally
|
|
460
|
+
from there.
|
|
461
|
+
|
|
462
|
+
`akm help migrate 0.10.0` prints the [0.10.0 release note](release-notes/0.10.0.md).
|
|
463
|
+
The loader looks a note up by its exact file name, so `akm help migrate latest`
|
|
464
|
+
and a release number such as `0.10.261001` print the CHANGELOG section
|
|
465
|
+
only.
|
|
466
|
+
|
|
467
|
+
## Verify the upgrade
|
|
468
|
+
|
|
469
|
+
```sh
|
|
470
|
+
akm --version # the 0.10.YYMMNN you meant to install
|
|
471
|
+
akm migrate status # status "current", ok true
|
|
472
|
+
akm health # exit 0 ok; 4 means a warning, read the check names
|
|
473
|
+
akm task doctor # scheduler backend, akm path, engines, improve triage and autonomy
|
|
474
|
+
akm upgrade --check # per-plugin outcomes: current, pending, deferred, failed
|
|
475
|
+
akm improve --dry-run # the strategy resolves, plan.triage shows the drain
|
|
476
|
+
akm lint --type tasks # task files parse and pass the gates task sync runs
|
|
477
|
+
akm lint --type workflows # workflows parse; no .yml, route, outputs or isolation
|
|
478
|
+
akm search --type task # your tasks are indexed
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Things to look for:
|
|
482
|
+
|
|
483
|
+
- `akm health` check `active-improve-strategy` warns when the configured
|
|
484
|
+
strategy was removed.
|
|
485
|
+
- `akm task doctor` reports `improveTriage` (enabled, mode) and
|
|
486
|
+
`improveAutonomy` with the lanes the `experimental.improveAutonomy` gate holds
|
|
487
|
+
off.
|
|
488
|
+
- `akm health` check `state-db-migrations` passes with nothing applied.
|
|
489
|
+
- After one scheduled `akm improve`, `akm log` shows `stash_synced` events with
|
|
490
|
+
`phase: "pre-run"` on a git-backed bundle, and `akm proposal list` shows what
|
|
491
|
+
the drain left for you.
|
|
492
|
+
|
|
493
|
+
## Recovery
|
|
494
|
+
|
|
495
|
+
0.10 changes neither database schema, so a downgrade needs no data change. To
|
|
496
|
+
go back, stop AKM and any OpenCode process, install the earlier version
|
|
497
|
+
(`akm-cli@0.9.31`), and restore `config.json` from the backup that
|
|
498
|
+
`akm migrate apply` wrote under `<cache dir>/config-backups/` if you want the
|
|
499
|
+
dropped keys back. Downgrade the plugins with the CLI: a 0.9 CLI rejects
|
|
500
|
+
`--detail agent` and a 0.10 CLI rejects `--shape agent`.
|
|
501
|
+
|
|
502
|
+
For the CHANGELOG entries behind each item, see the
|
|
503
|
+
[CHANGELOG](https://github.com/itlackey/akm/blob/main/CHANGELOG.md) sections
|
|
504
|
+
`0.10.26101001` to `0.10.26101202` (the daily alphas) and the monthly releases after them. For the stability tier of each command, see
|
|
505
|
+
[STABILITY.md](https://github.com/itlackey/akm/blob/main/STABILITY.md). The
|
|
506
|
+
rules each improve process follows in 0.10 are in
|
|
507
|
+
[the 0.10 process rules](../architecture/0.10-process-rules.md).
|
|
@@ -99,7 +99,7 @@ Use this to inspect or change settings.
|
|
|
99
99
|
```sh
|
|
100
100
|
akm config get output.format
|
|
101
101
|
akm config set output.detail full
|
|
102
|
-
akm
|
|
102
|
+
akm info
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Real-world use: your agent prefers text output in one repo and JSON in another, or you want to set a default write target for memories and imports.
|
|
@@ -404,12 +404,12 @@ akm help migrate latest
|
|
|
404
404
|
|
|
405
405
|
Real-world use: you upgraded `akm` and want the release-specific migration notes without leaving the terminal.
|
|
406
406
|
|
|
407
|
-
### `akm
|
|
407
|
+
### `akm hints`
|
|
408
408
|
|
|
409
409
|
Print instructions you can drop into `AGENTS.md` or `CLAUDE.md`.
|
|
410
410
|
|
|
411
411
|
```sh
|
|
412
|
-
akm
|
|
412
|
+
akm hints
|
|
413
413
|
```
|
|
414
414
|
|
|
415
415
|
Real-world use: you want every project to tell its coding agent how to use the local `akm` installation.
|
package/docs/product-surface.md
CHANGED
|
@@ -28,7 +28,7 @@ Every akm feature, with its status. Status meanings are in
|
|
|
28
28
|
- [`akm improve` and proposals](guides/improve-the-library.md): reviewable changes from feedback and usage. *Evolving*
|
|
29
29
|
- Improve settings and strategies other than `default` and `consolidate`. *Experimental*
|
|
30
30
|
- Automatic acceptance (opt-in). *Experimental*
|
|
31
|
-
- Session extraction. *
|
|
31
|
+
- Session extraction. *Evolving*
|
|
32
32
|
|
|
33
33
|
## Monitor
|
|
34
34
|
|
package/docs/reference/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Authoritative reference documentation for the akm CLI and its data.
|
|
4
4
|
|
|
5
|
+
- [Programmatic API](api.md) -- `akm-cli/api`: in-process `curate()` for the akm plugins
|
|
5
6
|
- [Bundle Types](bundle-types.md) -- Supported bundle formats and compatibility
|
|
6
7
|
- [CLI](cli.md) -- All `akm` commands and flags
|
|
7
8
|
- [Configuration](configuration.md) -- Engines, strategies, bundles, and settings
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Programmatic API (`akm-cli/api`)
|
|
2
|
+
|
|
3
|
+
`akm-cli` is a CLI package. The one supported programmatic entry point is
|
|
4
|
+
`akm-cli/api`, which exists so the akm plugins (OpenCode, Claude Code, ...) can
|
|
5
|
+
do their automatic recall in-process instead of starting an `akm` process per
|
|
6
|
+
prompt. Everything else in the package stays CLI-only: deep imports of
|
|
7
|
+
`akm-cli/dist/*` are not an API, and the CLI is still the way to run every
|
|
8
|
+
other command.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { curate } from "akm-cli/api";
|
|
12
|
+
|
|
13
|
+
const text = await curate("deploy to prod", { limit: 4, type: "skill", format: "text" });
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## `curate(query, options?)`
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
function curate(
|
|
20
|
+
query: string,
|
|
21
|
+
options?: { limit?: number; type?: string; format?: "text" | "json" },
|
|
22
|
+
): Promise<string>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- **Result.** Exactly the stdout of
|
|
26
|
+
`akm --detail agent -q curate <query> [--limit N] [--type T] --format <format>`,
|
|
27
|
+
including the trailing newline, computed in-process. `format` defaults to
|
|
28
|
+
`"json"`, as the CLI does. It runs the same code as the command (argument
|
|
29
|
+
validation, search, ranking, shaping and rendering are shared, not copied), so
|
|
30
|
+
the two cannot drift.
|
|
31
|
+
- **Failure.** It rejects with an `Error` whose `message` is the CLI's error
|
|
32
|
+
text and whose `code` is the CLI's error code (`MISSING_REQUIRED_ARGUMENT`,
|
|
33
|
+
`INVALID_FLAG_VALUE`, `INVALID_CONFIG_FILE`, ...) wherever the CLI would have
|
|
34
|
+
failed. An unexpected internal failure rejects with a plain `Error` without a
|
|
35
|
+
`code`.
|
|
36
|
+
- **No side effects on the host.** No child process; nothing is written to
|
|
37
|
+
stdout or stderr; `process.chdir` is never called; `process.env` and
|
|
38
|
+
`process.argv` are not modified; the host's quiet and verbose state is
|
|
39
|
+
unchanged afterwards. As with `akm curate`, the call records its usage
|
|
40
|
+
event in `state.db`.
|
|
41
|
+
- **Repeated calls.** Config is re-validated against `config.json` on every
|
|
42
|
+
call (its path, size and modification time), so an edit on disk is seen by
|
|
43
|
+
the next call exactly as a separate CLI run would see it. Database handles are
|
|
44
|
+
opened and closed within each call. The local embedding model and the embedding
|
|
45
|
+
cache are kept for the life of the process, which is what makes a warm call
|
|
46
|
+
cheaper than a CLI run. Overlapping calls are safe. Under Bun the SQLite file
|
|
47
|
+
descriptors of a finished call are released when the garbage collector
|
|
48
|
+
finalizes its statements, so they can briefly outlive the call.
|
|
49
|
+
|
|
50
|
+
## Loading it
|
|
51
|
+
|
|
52
|
+
`package.json` `exports` maps `akm-cli/api` to `dist/api.js` under Bun and to
|
|
53
|
+
`dist/api-node.mjs` under Node (which registers the loader hook for the
|
|
54
|
+
package's embedded `.md`/`.xml` assets before loading `dist/api.js`), with
|
|
55
|
+
`dist/api.d.ts` for types. `akm-cli/package.json` and `akm-cli/dist/*` are also
|
|
56
|
+
exported, so a plugin can locate the `akm` bin with
|
|
57
|
+
`require.resolve("akm-cli/package.json")` and published plugin versions that
|
|
58
|
+
deep-import `akm-cli/dist/commands/read/*.js` keep working.
|
|
59
|
+
|
|
60
|
+
## Stability
|
|
61
|
+
|
|
62
|
+
Evolving (see [STABILITY.md](../../STABILITY.md)): the export list only grows,
|
|
63
|
+
and `curate()`'s parameters and result keep the contract above; the text it
|
|
64
|
+
returns is the CLI's agent-shaped output and changes whenever that does.
|
|
65
|
+
`tests/contracts/api-surface.test.ts` pins the export list.
|
|
@@ -40,7 +40,7 @@ my-bundle/
|
|
|
40
40
|
instructions/ # Project guidance (.md)
|
|
41
41
|
env/ # Environment files (.env) — groups of related config, loaded whole
|
|
42
42
|
secrets/ # Secrets — one sensitive value per file (auth tokens, keys, certs)
|
|
43
|
-
workflows/ #
|
|
43
|
+
workflows/ # Workflow sources (.md)
|
|
44
44
|
lessons/ # Distilled lessons (.md, see akm improve / proposals)
|
|
45
45
|
memories/ # Recalled context fragments (.md, see Memory reference)
|
|
46
46
|
facts/ # Durable bundle-level facts (.md)
|
|
@@ -60,10 +60,8 @@ Scripts and knowledge are classified by **what they are**: a `.sh` file is a
|
|
|
60
60
|
script; a plain `.md` file is knowledge. Commands and agents are classified
|
|
61
61
|
by **how an LLM should use them**: a `.md` file with `$ARGUMENTS`
|
|
62
62
|
placeholders is a command template; one with `tools` in its frontmatter is an
|
|
63
|
-
agent definition. Workflow assets
|
|
64
|
-
|
|
65
|
-
adapter validates the closed workflow subset. These are peer workflow sources,
|
|
66
|
-
not an md-only surface. Skills are a
|
|
63
|
+
agent definition. Workflow assets are `.md`, classified by `type: workflow`
|
|
64
|
+
or placement. Skills are a
|
|
67
65
|
**packaging convention**: a directory containing a `SKILL.md` file.
|
|
68
66
|
|
|
69
67
|
See [Classification](../architecture/internals/classification.md) for the
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
This page has moved. AKM's bundle-format documentation is now split in two:
|
|
4
4
|
the public compatibility table lives at
|
|
5
5
|
[Supported Formats](supported-formats.md), and the adapter internals — probe
|
|
6
|
-
order, the `BundleAdapter` interface,
|
|
7
|
-
write allowlists — live at
|
|
6
|
+
order, the `BundleAdapter` interface, and the write allowlists — live at
|
|
8
7
|
[Architecture → Adapters](https://github.com/itlackey/akm/blob/main/docs/architecture/adapters.md).
|
|
9
8
|
|
|
10
9
|
- [Supported Formats](supported-formats.md) — the format-by-format table:
|
|
@@ -13,7 +12,6 @@ write allowlists — live at
|
|
|
13
12
|
`llm-wiki`, `claude`, `opencode`, `agent-skills`, `dotenv`,
|
|
14
13
|
`akm-workflow`, `akm-task`, `website-snapshot`, `generic-files`).
|
|
15
14
|
- [Architecture → Adapters](https://github.com/itlackey/akm/blob/main/docs/architecture/adapters.md) — how AKM picks an
|
|
16
|
-
adapter for a bundle, the `BundleAdapter` interface contract, the
|
|
17
|
-
`placeNew()` wiring status, the write allowlists that actually gate
|
|
15
|
+
adapter for a bundle, the `BundleAdapter` interface contract, the write allowlists that actually gate
|
|
18
16
|
`akm remember`/`import`/`proposal accept`/etc., and per-adapter
|
|
19
17
|
implementation caveats.
|