akm-cli 0.9.1 → 0.9.2-alpha.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.
- package/CHANGELOG.md +103 -28
- package/README.md +3 -1
- package/SECURITY.md +1 -1
- package/STABILITY.md +1 -1
- package/dist/akm +2 -2
- package/dist/akm-migrate +2 -2
- package/dist/assets/hints/cli-hints-full.md +14 -9
- package/dist/assets/improve-strategies/proactive-maintenance.json +1 -1
- package/dist/assets/improve-strategies/reflect-distill.json +1 -1
- package/dist/assets/models.json +35 -0
- package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +3 -4
- package/dist/assets/stash-skeleton/facts/conventions/organization.md +1 -3
- package/dist/assets/tasks/core/extract.yml +6 -5
- package/dist/assets/tasks/core/improve.yml +6 -5
- package/dist/assets/tasks/core/index-refresh.yml +6 -5
- package/dist/assets/tasks/core/sync.yml +6 -5
- package/dist/assets/tasks/core/version-check.yml +6 -5
- package/dist/assets/tasks/improve/akm-graph-refresh-weekly.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +6 -5
- package/dist/cli/confirm.js +2 -2
- package/dist/cli/parse-args.js +3 -24
- package/dist/cli/retired-commands.js +1 -1
- package/dist/cli/shared.js +2 -2
- package/dist/cli.js +11 -9
- package/dist/commands/agent/agent-dispatch.js +55 -89
- package/dist/commands/agent/contribute-cli.js +12 -45
- package/dist/commands/command/builtin-action.js +32 -0
- package/dist/commands/command/command-cli.js +99 -0
- package/dist/commands/command/command-execution.js +308 -0
- package/dist/commands/command/execution-source-loader.js +176 -0
- package/dist/commands/command/portable-template.js +60 -0
- package/dist/commands/config-cli.js +10 -4
- package/dist/commands/env/env.js +4 -2
- package/dist/commands/feedback-cli.js +1 -1
- package/dist/commands/health/checks.js +241 -29
- package/dist/commands/health/html-report.js +0 -14
- package/dist/commands/health/report-view-model.js +0 -1
- package/dist/commands/health/surfaces.js +6 -7
- package/dist/commands/health/types.js +0 -2
- package/dist/commands/health.js +63 -18
- package/dist/commands/improve/collapse-detector.js +5 -6
- package/dist/commands/improve/consolidate.js +251 -214
- package/dist/commands/improve/distill/promote-memory.js +71 -34
- package/dist/commands/improve/distill/quality-gate.js +17 -5
- package/dist/commands/improve/distill.js +232 -155
- package/dist/commands/improve/eligibility.js +112 -79
- package/dist/commands/improve/execution.js +57 -0
- package/dist/commands/improve/extract-cli.js +5 -5
- package/dist/commands/improve/extract-prompt.js +64 -22
- package/dist/commands/improve/extract.js +608 -360
- package/dist/commands/improve/improve-strategies.js +43 -14
- package/dist/commands/improve/improve.js +249 -29
- package/dist/commands/improve/loop-stages.js +11 -17
- package/dist/commands/improve/memory/memory-contradiction-detect.js +90 -66
- package/dist/commands/improve/outcome-loop.js +22 -38
- package/dist/commands/improve/planner.js +134 -0
- package/dist/commands/improve/preparation.js +730 -409
- package/dist/commands/improve/reflect.js +386 -223
- package/dist/commands/improve/run-context.js +3 -4
- package/dist/commands/improve/salience.js +6 -58
- package/dist/commands/improve/session-asset.js +12 -12
- package/dist/commands/lint/index.js +101 -29
- package/dist/commands/migrate-cli.js +11 -69
- package/dist/commands/migration-tool.js +6 -9
- package/dist/commands/models-cli.js +27 -0
- package/dist/commands/proposal/drain.js +258 -186
- package/dist/commands/proposal/proposal-cli.js +32 -10
- package/dist/commands/proposal/proposal.js +2 -5
- package/dist/commands/proposal/propose.js +192 -172
- package/dist/commands/proposal/repository.js +54 -91
- package/dist/commands/proposal/validators/proposal-validators.js +9 -7
- package/dist/commands/read/curate.js +53 -22
- package/dist/commands/read/registry-search.js +25 -9
- package/dist/commands/read/remember-cli.js +14 -2
- package/dist/commands/read/search.js +10 -4
- package/dist/commands/read/show.js +139 -153
- package/dist/commands/registry-cli.js +16 -7
- package/dist/commands/remember.js +33 -18
- package/dist/commands/sources/add-cli.js +19 -178
- package/dist/commands/sources/bundle-cli.js +15 -3
- package/dist/commands/sources/dangerous-env-audit.js +135 -0
- package/dist/commands/sources/info.js +2 -1
- package/dist/commands/sources/installed-stashes.js +901 -177
- package/dist/commands/sources/schema-repair.js +174 -95
- package/dist/commands/sources/self-update.js +30 -74
- package/dist/commands/sources/source-add.js +3 -5
- package/dist/commands/sources/sources-cli.js +2 -15
- package/dist/commands/sources/update-transaction.js +220 -0
- package/dist/commands/tasks/tasks-cli.js +3 -3
- package/dist/commands/tasks/tasks.js +736 -317
- package/dist/commands/workflow-cli.js +2 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +3 -0
- package/dist/core/adapter/adapters/akm-adapter.js +85 -35
- package/dist/core/adapter/adapters/akm-lint.js +54 -39
- package/dist/core/adapter/adapters/akm-metadata.js +45 -45
- package/dist/core/adapter/adapters/akm-task-adapter.js +32 -49
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +38 -23
- package/dist/core/adapter/adapters/dotenv-adapter.js +30 -1
- package/dist/core/adapter/adapters/generic-files-adapter.js +11 -0
- package/dist/core/adapter/adapters/index.js +0 -9
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +4 -0
- package/dist/core/adapter/adapters/okf-adapter.js +4 -0
- package/dist/core/adapter/adapters/opencode-adapter.js +5 -8
- package/dist/core/adapter/adapters/tool-dir-shared.js +63 -6
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -0
- package/dist/core/adapter/execution-source.js +308 -0
- package/dist/core/adapter/recognize-match.js +36 -13
- package/dist/core/adapter/registry.js +0 -9
- package/dist/core/asset/stash-meta.js +94 -4
- package/dist/core/common.js +6 -11
- package/dist/core/config/config-io.js +3 -3
- package/dist/core/config/config-schema.js +18 -40
- package/dist/core/config/config-sources.js +11 -21
- package/dist/core/config/config-walker.js +31 -13
- package/dist/core/config/config.js +23 -26
- package/dist/core/config/schema/engines.js +8 -7
- package/dist/core/config/schema/improve-processes.js +29 -5
- package/dist/core/config/schema/index-config.js +0 -27
- package/dist/core/config/schema/primitives.js +1 -23
- package/dist/core/config/schema/sources-bundles.js +13 -16
- package/dist/core/errors.js +2 -0
- package/dist/core/events.js +68 -32
- package/dist/core/extra-params.js +1 -0
- package/dist/core/improve-result.js +315 -0
- package/dist/core/lesson-lint.js +0 -6
- package/dist/core/maintenance-barrier.js +4 -4
- package/dist/core/network-policy.js +152 -0
- package/dist/core/paths.js +1 -1
- package/dist/core/recognition-util.js +4 -4
- package/dist/core/registry-url.js +456 -0
- package/dist/core/state/migrations.js +161 -47
- package/dist/core/state-db.js +453 -80
- package/dist/core/system-error.js +32 -0
- package/dist/core/time.js +2 -12
- package/dist/core/write-source.js +0 -18
- package/dist/execution/directory-identity.js +52 -0
- package/dist/execution/executable-identity.js +107 -0
- package/dist/execution/guarded-source.js +398 -0
- package/dist/execution/json.js +95 -0
- package/dist/{commands/health/types-session-log.js → execution/limits.js} +2 -1
- package/dist/execution/record.js +55 -0
- package/dist/execution/resolved-request.js +730 -0
- package/dist/execution/source.js +320 -0
- package/dist/indexer/bundle-identity-guard.js +5 -4
- package/dist/indexer/db/graph-db.js +33 -0
- package/dist/indexer/graph/graph-boost.js +3 -4
- package/dist/indexer/graph/graph-extraction.js +562 -373
- package/dist/indexer/index-written-assets.js +78 -39
- package/dist/indexer/indexer.js +471 -432
- package/dist/indexer/installations.js +6 -0
- package/dist/indexer/lookup/adapter-concept-owner.js +283 -0
- package/dist/indexer/materialize-embeddings.js +155 -0
- package/dist/indexer/passes/memory-inference.js +227 -174
- package/dist/indexer/passes/metadata.js +263 -118
- package/dist/indexer/scan/doc-to-entry.js +7 -10
- package/dist/indexer/scan/drain-dir.js +51 -23
- package/dist/indexer/search/db-search.js +156 -50
- package/dist/indexer/search/fts-query.js +40 -40
- package/dist/indexer/search/ranking.js +36 -1
- package/dist/indexer/search/search-attribution.js +3 -1
- package/dist/indexer/search/search-fields.js +23 -14
- package/dist/indexer/search/search-hit-enrichers.js +1 -1
- package/dist/indexer/search/search-source.js +7 -16
- package/dist/indexer/search/semantic-status.js +10 -1
- package/dist/indexer/usage/show-usage.js +105 -0
- package/dist/indexer/usage/usage-events.js +7 -2
- package/dist/indexer/walk/matchers.js +40 -10
- package/dist/indexer/walk/path-resolver.js +5 -2
- package/dist/indexer/walk/walker.js +20 -2
- package/dist/integrations/agent/builder-shared.js +3 -6
- package/dist/integrations/agent/conversation-fallback.js +16 -0
- package/dist/integrations/agent/engine-resolution.js +87 -87
- package/dist/integrations/agent/execution-cascade.js +566 -0
- package/dist/integrations/agent/execution-definitions.js +211 -0
- package/dist/integrations/agent/execution-lowering.js +811 -0
- package/dist/integrations/agent/execution-preparation.js +67 -0
- package/dist/integrations/agent/index.js +0 -2
- package/dist/integrations/agent/inline-execution.js +74 -0
- package/dist/integrations/agent/model-map.js +515 -0
- package/dist/integrations/agent/persona-fallback.js +30 -0
- package/dist/integrations/agent/request-lowering.js +186 -0
- package/dist/integrations/agent/runner-dispatch.js +230 -37
- package/dist/integrations/agent/runner.js +12 -83
- package/dist/integrations/harnesses/aider/agent-builder.js +8 -0
- package/dist/integrations/harnesses/aider/index.js +0 -1
- package/dist/integrations/harnesses/amazonq/agent-builder.js +8 -0
- package/dist/integrations/harnesses/amazonq/index.js +0 -1
- package/dist/integrations/harnesses/claude/agent-builder.js +14 -1
- package/dist/integrations/harnesses/claude/index.js +1 -5
- package/dist/integrations/harnesses/claude/session-log.js +3 -33
- package/dist/integrations/harnesses/codex/agent-builder.js +8 -0
- package/dist/integrations/harnesses/codex/index.js +0 -1
- package/dist/integrations/harnesses/copilot/agent-builder.js +8 -0
- package/dist/integrations/harnesses/copilot/index.js +0 -1
- package/dist/integrations/harnesses/gemini/agent-builder.js +8 -0
- package/dist/integrations/harnesses/gemini/index.js +0 -1
- package/dist/integrations/harnesses/index.js +4 -44
- package/dist/integrations/harnesses/opencode/agent-builder.js +16 -9
- package/dist/integrations/harnesses/opencode/index.js +0 -2
- package/dist/integrations/harnesses/opencode/session-log.js +14 -204
- package/dist/integrations/harnesses/opencode-sdk/harness.js +12 -1
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +40 -42
- package/dist/integrations/harnesses/openhands/agent-builder.js +8 -0
- package/dist/integrations/harnesses/openhands/index.js +0 -1
- package/dist/integrations/harnesses/pi/agent-builder.js +8 -0
- package/dist/integrations/harnesses/pi/index.js +0 -1
- package/dist/integrations/harnesses/shared.js +0 -1
- package/dist/integrations/harnesses/types.js +1 -3
- package/dist/integrations/lockfile.js +82 -79
- package/dist/integrations/session-logs/index.js +6 -17
- package/dist/integrations/session-logs/provider-base.js +1 -29
- package/dist/llm/client.js +10 -5
- package/dist/llm/embedder.js +6 -7
- package/dist/llm/embedders/local.js +37 -88
- package/dist/llm/embedders/types.js +1 -1
- package/dist/llm/graph-extract.js +75 -50
- package/dist/llm/index-passes.js +43 -5
- package/dist/llm/memory-infer.js +8 -6
- package/dist/llm/metadata-enhance.js +5 -3
- package/dist/llm/structured-call.js +122 -25
- package/dist/output/format-exempt.js +1 -1
- package/dist/output/render-registry.js +0 -16
- package/dist/output/renderers.js +12 -7
- package/dist/output/shapes/curate.js +1 -0
- package/dist/output/shapes/helpers.js +10 -2
- package/dist/output/shapes/passthrough.js +2 -0
- package/dist/output/text/command-format.js +31 -33
- package/dist/output/text/health-format.js +1 -29
- package/dist/output/text/migrate.js +6 -56
- package/dist/output/text/proposal-format.js +16 -1
- package/dist/output/text/workflow-format.js +16 -0
- package/dist/registry/network.js +279 -0
- package/dist/registry/pinned-request-helper.js +247 -0
- package/dist/registry/pinned-transport.js +717 -0
- package/dist/registry/providers/skills-sh.js +18 -6
- package/dist/registry/providers/static-index.js +20 -7
- package/dist/registry/resolve.js +53 -28
- package/dist/scripts/akm-migrate-node.js +19334 -52269
- package/dist/scripts/akm-migrate.js +19270 -51612
- package/dist/setup/registry-stash-loader.js +64 -20
- package/dist/setup/semantic-assets.js +9 -34
- package/dist/setup/setup.js +12 -30
- package/dist/setup/source-identity.js +17 -0
- package/dist/setup/steps/sources.js +36 -15
- package/dist/setup/steps/tasks.js +39 -11
- package/dist/sources/providers/git-provider.js +3 -3
- package/dist/sources/providers/npm.js +2 -2
- package/dist/sources/providers/provider-utils.js +4 -3
- package/dist/sources/providers/website.js +11 -7
- package/dist/sources/snapshot-fetchers/host-guard.js +9 -136
- package/dist/sources/snapshot-fetchers/website-ingest.js +25 -109
- package/dist/sources/website-url.js +73 -0
- package/dist/storage/engines/sqlite-migrations.js +81 -26
- package/dist/storage/managed-db.js +27 -24
- package/dist/storage/repositories/events-repository.js +3 -0
- package/dist/storage/repositories/index-connection.js +42 -10
- package/dist/storage/repositories/index-entries-repository.js +203 -229
- package/dist/storage/repositories/index-entry-mapper.js +8 -12
- package/dist/storage/repositories/index-entry-schema.js +255 -0
- package/dist/storage/repositories/index-fts-repository.js +64 -71
- package/dist/storage/repositories/index-llm-cache-repository.js +8 -13
- package/dist/storage/repositories/index-meta-repository.js +0 -11
- package/dist/storage/repositories/index-schema.js +74 -350
- package/dist/storage/repositories/index-utility-repository.js +12 -17
- package/dist/storage/repositories/index-vec-repository.js +56 -7
- package/dist/storage/repositories/proposals-repository.js +4 -127
- package/dist/storage/repositories/registry-cache.js +2 -1
- package/dist/storage/repositories/task-history-repository.js +20 -40
- package/dist/storage/repositories/workflow-runs-repository.js +228 -129
- package/dist/storage/sqlite-read-snapshot.js +148 -0
- package/dist/tasks/backends/cron.js +170 -42
- package/dist/tasks/backends/index.js +1 -1
- package/dist/tasks/backends/launchd.js +787 -202
- package/dist/tasks/backends/schtasks.js +282 -83
- package/dist/tasks/embedded.js +7 -7
- package/dist/tasks/frozen-script.js +50 -0
- package/dist/tasks/resolve-akm-bin.js +5 -1
- package/dist/tasks/runner.js +239 -251
- package/dist/tasks/runtime-v3.js +281 -0
- package/dist/tasks/scheduler-binding.js +272 -0
- package/dist/tasks/scheduler-invocation.js +57 -43
- package/dist/tasks/scheduler-sync.js +654 -0
- package/dist/tasks/source-v3.js +752 -0
- package/dist/tasks/standalone-script-entry.js +5 -0
- package/dist/tasks/task-id.js +29 -0
- package/dist/workflows/authoring/authoring.js +15 -32
- package/dist/workflows/exec/dispatch-redaction.js +14 -8
- package/dist/workflows/exec/exec-unit.js +7 -28
- package/dist/workflows/exec/frozen-judge.js +57 -89
- package/dist/workflows/exec/lowering-notices.js +23 -0
- package/dist/workflows/exec/native-executor.js +301 -458
- package/dist/workflows/exec/param-secrets.js +4 -3
- package/dist/workflows/exec/run-workflow.js +26 -32
- package/dist/workflows/exec/step-work.js +105 -109
- package/dist/workflows/exec/unit-dispatch.js +103 -27
- package/dist/workflows/exec/unit-writer.js +3 -3
- package/dist/workflows/exec/worktree.js +2 -2
- package/dist/workflows/ir/compile.js +86 -72
- package/dist/workflows/ir/environment-v4.js +328 -0
- package/dist/workflows/ir/freeze-v4.js +122 -0
- package/dist/workflows/ir/plan-hash.js +13 -7
- package/dist/workflows/ir/schema-v4.js +525 -0
- package/dist/workflows/ir/schema.js +25 -284
- package/dist/workflows/ir/source-freeze-v4.js +506 -0
- package/dist/workflows/parser.js +27 -24
- package/dist/workflows/program/schema.js +1 -2
- package/dist/workflows/renderer.js +42 -29
- package/dist/workflows/resource-limits.js +4 -5
- package/dist/workflows/runtime/agent-identity.js +11 -13
- package/dist/workflows/runtime/plan-classifier.js +8 -8
- package/dist/workflows/runtime/runs.js +27 -43
- package/dist/workflows/runtime/workflow-asset-loader.js +45 -205
- package/dist/workflows/source-files.js +373 -0
- package/dist/workflows/source-ir/compile.js +196 -0
- package/dist/workflows/source-ir/github-yaml.js +577 -0
- package/dist/workflows/source-ir/ordering.js +38 -0
- package/dist/workflows/source-ir/program.js +50 -0
- package/dist/workflows/source-ir/result.js +26 -0
- package/dist/workflows/source-ir/schema.js +772 -0
- package/dist/workflows/source-ir/semantics.js +242 -0
- package/dist/workflows/source-ir/uses.js +14 -0
- package/docs/README.md +2 -0
- package/docs/migration/README.md +3 -1
- package/docs/migration/release-notes/0.9.2.md +55 -0
- package/docs/migration/release-notes/README.md +5 -0
- package/docs/migration/v0.8-to-v0.9.md +76 -1077
- package/docs/migration/v0.9.0-troubleshooting.md +104 -516
- package/docs/migration/v0.9.1-to-v0.9.2.md +150 -0
- package/docs/reference/README.md +1 -0
- package/docs/reference/cli.md +230 -98
- package/docs/reference/configuration.md +159 -36
- package/docs/reference/data-and-telemetry.md +19 -1
- package/docs/reference/supported-formats.md +23 -3
- package/docs/reference/tasks.md +182 -0
- package/docs/reference/workflow-schema.md +91 -40
- package/docs/reference/workflows.md +33 -6
- package/package.json +10 -6
- package/schemas/akm-config.json +372 -224
- package/schemas/akm-task.json +324 -80
- package/schemas/akm-workflow.json +6 -9
- package/dist/core/migration-operation.js +0 -75
- package/dist/integrations/agent/model-aliases.js +0 -74
- package/dist/tasks/parser.js +0 -380
- package/dist/tasks/schema.js +0 -123
- package/dist/tasks/validator.js +0 -80
- package/dist/workflows/ir/freeze.js +0 -320
- package/dist/workflows/runtime/document-cache.js +0 -13
|
@@ -1,1123 +1,122 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Moving from akm 0.8 to the current 0.9 line
|
|
2
2
|
|
|
3
|
-
0.9
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
native type→directory table; wiring it through the adapter interface is
|
|
7
|
-
deferred to 0.10 (see [Removed surfaces](#3-removed-surfaces) and the 0.9.0
|
|
8
|
-
release notes for the exact boundary) — adopts one canonical ref grammar,
|
|
9
|
-
consolidates the durable databases and config, and completes several
|
|
10
|
-
0.8-era deprecations (the CLI aliases and the `vault` asset type). This
|
|
11
|
-
guide is ordered the way you'll need it:
|
|
3
|
+
The current 0.9 runtime does not contain a second 0.8 config/storage/runtime
|
|
4
|
+
architecture. Upgrading the package is supported; loading an old installation
|
|
5
|
+
in place is not.
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
> series — patch releases may include further breaking changes (each with a
|
|
15
|
-
> CHANGELOG migration note) until the remaining technical debt is paid off.
|
|
16
|
-
> The 0.10.x series returns to bug fixes and tuning with the normal
|
|
17
|
-
> breaking-changes-only-in-major/minor discipline. See STABILITY.md.
|
|
7
|
+
## What the upgrade preserves
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[Engine And Task Assets](#engine-and-task-assets) config migration
|
|
24
|
-
5. [Troubleshooting](#5-troubleshooting)
|
|
9
|
+
- authored assets that you copy into a current bundle;
|
|
10
|
+
- task-v2 source files that the explicit task migrator can translate without
|
|
11
|
+
guessing;
|
|
12
|
+
- package-manager or standalone-binary updates through `akm upgrade`.
|
|
25
13
|
|
|
26
|
-
|
|
27
|
-
the crash-resumable `akm migrate apply` coordinator. It also rewrites
|
|
28
|
-
legacy `workflow:` target refs in valid 0.8 task files after resolving them
|
|
29
|
-
against their containing/configured bundle while preserving each YAML file's
|
|
30
|
-
permission mode; it does not translate profile-based configuration or workflow
|
|
31
|
-
definitions automatically — a 0.8 workflow document keeps its 0.8 structure
|
|
32
|
-
verbatim and needs a manual rewrite (see
|
|
33
|
-
[0.8 workflow assets after migration](#08-workflow-assets-after-migration) for
|
|
34
|
-
the concrete symptom and the fix). Create the recovery backup
|
|
35
|
-
before changing a live installation, then migrate other affected assets deliberately.
|
|
14
|
+
## What it does not preserve
|
|
36
15
|
|
|
37
|
-
|
|
16
|
+
- 0.8 config shapes;
|
|
17
|
+
- old `index.db`, `workflow.db`, task-history JSONL, or legacy lock/cache
|
|
18
|
+
layouts;
|
|
19
|
+
- old ref grammar or old workflow/task execution paths;
|
|
20
|
+
- in-flight pre-v4 workflow plans.
|
|
38
21
|
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
Those formats are not compatibility inputs to the current runtime. Keep an
|
|
23
|
+
archive if you need historical inspection; do not place it in the live 0.9
|
|
24
|
+
config/data directories.
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
`wikiName` keys to a `bundles` map keyed by each source's stable id, plus
|
|
44
|
-
`defaultBundle` naming the primary writable bundle. Bundle ids are derived
|
|
45
|
-
from the existing `registryId` / path slug, so no second identity migration
|
|
46
|
-
happens. After the cutover, the retired keys are **hard-rejected** by the
|
|
47
|
-
0.9.0 config schema whenever present — a config still carrying them fails to
|
|
48
|
-
load with an error naming `akm migrate apply`
|
|
49
|
-
(`src/core/config/config-schema.ts`). Registry-installed bundles keep only
|
|
50
|
-
their desired locator (`git`/`npm` + `registryId`) in config; resolved cache
|
|
51
|
-
paths and revisions live exclusively in the lockfile.
|
|
52
|
-
- Folds the former `workflow.db` into `state.db`, taking the database count
|
|
53
|
-
from four to three: `state.db` (durable workspace state), `index.db` (the
|
|
54
|
-
fully regenerable search cache), and a separate `logs.db`.
|
|
55
|
-
- Folds `.stash.json` sidecars into the new layout and applies the AKM adapter's
|
|
56
|
-
D-R6 reserved-filename renames (`index.md` / `log.md` at any AKM stash depth
|
|
57
|
-
are now reserved structural files — see
|
|
58
|
-
[§2](#2-ref-grammar-typename--bundleconceptid)).
|
|
59
|
-
- Imports any pre-0.9 filesystem proposals into `state.db` as part of the same
|
|
60
|
-
apply — this is no longer a separate step.
|
|
61
|
-
- Re-keys every durable ref (usage/feedback events, proposal targets,
|
|
62
|
-
workflow/task targets, salience) to the new `[bundle//]conceptId` spelling.
|
|
63
|
-
Refs embedded in your own asset bodies are rewritten by the content
|
|
64
|
-
migration; unresolvable refs are quarantined, not dropped: the audit summary
|
|
65
|
-
lands in `legacy_state` (surface, ref, row count) and the complete original
|
|
66
|
-
rows are preserved as JSON in `legacy_state_rows` in the migrated
|
|
67
|
-
`state.db`, so nothing the migration cannot re-key is destroyed.
|
|
68
|
-
- Generates the target config for you when no `--config` is given and none
|
|
69
|
-
exists yet, instead of requiring one hand-authored from a blank page — see
|
|
70
|
-
[Auto-generating the 0.9 config](#auto-generating-the-09-config).
|
|
26
|
+
## Upgrade procedure
|
|
71
27
|
|
|
72
|
-
###
|
|
28
|
+
### 1. Archive the old installation
|
|
73
29
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
package-manager/manual boundary procedure instead:
|
|
30
|
+
Stop scheduled tasks and running AKM processes. Copy the old config, data,
|
|
31
|
+
state, cache, and authored bundle directories to an archive outside the live
|
|
32
|
+
AKM paths. Verify the copy before continuing.
|
|
78
33
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
hand-write one: `akm migrate apply` (step 5) generates the mechanical part
|
|
82
|
-
— `bundles`/`defaultBundle` — from your existing `stashDir`/`sources[]`/
|
|
83
|
-
`installed[]` automatically when no `--config` is given and no target
|
|
84
|
-
config exists yet (see
|
|
85
|
-
[Auto-generating the 0.9 config](#auto-generating-the-09-config) below).
|
|
86
|
-
Write one by hand instead (see
|
|
87
|
-
[Preparing the 0.9 config](#preparing-the-09-config)) only if you want full
|
|
88
|
-
control, or already know your 0.8 config configured LLM/agent profiles —
|
|
89
|
-
AKM never guesses those. Either way, never replace the live 0.8 config
|
|
90
|
-
directly; a generated or hand-written target config always lives in a
|
|
91
|
-
separate file.
|
|
92
|
-
3. Take an independent filesystem backup of the live 0.8 `config.json`,
|
|
93
|
-
`state.db`, and `workflow.db` (including any SQLite `-wal`/`-shm` files).
|
|
94
|
-
Store it outside AKM's data directory and verify it before continuing.
|
|
95
|
-
4. Install 0.9 with the package manager, or download, checksum, and stage the
|
|
96
|
-
0.9 standalone binary. A package-manager install replaces the managed 0.8
|
|
97
|
-
package; a standalone operator should retain the old executable. Keep the
|
|
98
|
-
independent data backup in either case.
|
|
99
|
-
5. Invoke the newly installed or staged 0.9 binary, whose migration startup
|
|
100
|
-
bypass can read the old installation without loading its config normally.
|
|
101
|
-
6. After apply succeeds, run `akm task sync --rebind` with that same 0.9 binary
|
|
102
|
-
before restarting schedulers. The explicit rebind replaces 0.8 native
|
|
103
|
-
scheduler definitions with current context-bound invocations.
|
|
34
|
+
Do not delete the authored bundle: it is the input you will selectively bring
|
|
35
|
+
forward.
|
|
104
36
|
|
|
105
|
-
###
|
|
37
|
+
### 2. Update the package or binary
|
|
106
38
|
|
|
107
|
-
|
|
108
|
-
the active 0.8 config still carries `stashDir`/`sources[]`/`installed[]` and no
|
|
109
|
-
target config exists yet, the plan's `generatedConfig` field previews what a
|
|
110
|
-
`migrate apply` will write: `path` (a predictable location next to the
|
|
111
|
-
migration's recovery backups — never the live `config.json`) and
|
|
112
|
-
`droppedKeys` — any `profiles.llm.<name>`/`profiles.agent.<name>`/
|
|
113
|
-
`profiles.improve.<name>`/`defaults.llm`/`defaults.agent`/`defaults.improve`
|
|
114
|
-
keys it will leave out, named exactly rather than guessed at (see
|
|
115
|
-
[Engine And Task Assets](#engine-and-task-assets) for why).
|
|
116
|
-
|
|
117
|
-
A `migrate apply` with no `--config` and no target config yet WRITES that
|
|
118
|
-
file and stops — it deliberately does not proceed to back up or mutate
|
|
119
|
-
anything on that run, so you get a real chance to review the generated
|
|
120
|
-
config (and hand-add `engines`/`defaults` for anything `droppedKeys` named)
|
|
121
|
-
before a second, explicit `akm migrate apply` — still no `--config` — picks
|
|
122
|
-
the file up and completes the cutover:
|
|
39
|
+
Use the installation method that owns AKM:
|
|
123
40
|
|
|
124
41
|
```sh
|
|
125
|
-
akm
|
|
126
|
-
akm
|
|
127
|
-
|
|
128
|
-
# droppedKeys named anything you need engines for, then:
|
|
129
|
-
akm migrate apply # picks up the generated file, applies it (status "current")
|
|
42
|
+
akm upgrade --check
|
|
43
|
+
akm upgrade
|
|
44
|
+
akm --version
|
|
130
45
|
```
|
|
131
46
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
below](#08-key--09-key) describes for a hand-written target — generation just
|
|
135
|
-
runs it for you. When your 0.8 config had no `profiles`/`defaults.llm`/
|
|
136
|
-
`defaults.agent`/`defaults.improve` to translate, `droppedKeys` comes back
|
|
137
|
-
empty and the generated config is complete on its own: the second `apply` is
|
|
138
|
-
a plain confirming re-run, no editing required.
|
|
139
|
-
|
|
140
|
-
An explicit `--config` always wins over this and is never second-guessed — if
|
|
141
|
-
you pass one, generation never runs, exactly as if this section did not
|
|
142
|
-
exist. Use it for full control, or when you already know your 0.8 config
|
|
143
|
-
configured LLM/agent profiles and would rather write `engines`/`defaults`
|
|
144
|
-
yourself up front instead of re-running `apply` a second time.
|
|
145
|
-
|
|
146
|
-
### Preparing the 0.9 config
|
|
47
|
+
Alternatively install `akm-cli@0.9.2` directly with npm, Bun, or pnpm, or
|
|
48
|
+
replace the standalone binary after verifying its published checksum.
|
|
147
49
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
still point `--config` at it exactly as before. This is the minimum that is
|
|
151
|
-
sufficient to drive a successful `akm migrate apply`: one writable bundle and
|
|
152
|
-
a `defaultBundle` naming it.
|
|
50
|
+
`akm upgrade` updates executable code. It does not rewrite old config or
|
|
51
|
+
storage.
|
|
153
52
|
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
"configVersion": "0.9.0",
|
|
157
|
-
"bundles": {
|
|
158
|
-
"primary": { "path": "/abs/path/to/your/stash", "writable": true }
|
|
159
|
-
},
|
|
160
|
-
"defaultBundle": "primary"
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Point `path` at the same directory your 0.8 `stashDir` used — that is what
|
|
165
|
-
turns your existing assets into the migrated installation's working bundle. If
|
|
166
|
-
your 0.8 config also had `sources[]` or `installed[]` entries, add one
|
|
167
|
-
`bundles` entry per source (see the mapping table below); each one becomes
|
|
168
|
-
searchable the same way it was in 0.8.
|
|
53
|
+
### 3. Start from current config and state
|
|
169
54
|
|
|
170
|
-
|
|
171
|
-
|
|
55
|
+
Move the archived 0.8 config/data/state/cache paths out of the live locations,
|
|
56
|
+
then run current setup:
|
|
172
57
|
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"bundles": {
|
|
177
|
-
"primary": { "path": "/abs/path/to/your/stash", "writable": true }
|
|
178
|
-
},
|
|
179
|
-
"defaultBundle": "primary",
|
|
180
|
-
"engines": {
|
|
181
|
-
"fast": {
|
|
182
|
-
"kind": "llm",
|
|
183
|
-
"endpoint": "http://localhost:11434/v1/chat/completions",
|
|
184
|
-
"model": "qwen3"
|
|
185
|
-
},
|
|
186
|
-
"reviewer": { "kind": "agent", "platform": "opencode" }
|
|
187
|
-
},
|
|
188
|
-
"defaults": {
|
|
189
|
-
"engine": "reviewer",
|
|
190
|
-
"llmEngine": "fast"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
58
|
+
```sh
|
|
59
|
+
akm setup
|
|
60
|
+
akm health
|
|
193
61
|
```
|
|
194
62
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
`$schema: "https://itlackey.github.io/akm/schemas/akm-config.json"` (or the
|
|
199
|
-
local `schemas/akm-config.json` in a source checkout) for autocomplete and
|
|
200
|
-
inline validation while you write it.
|
|
63
|
+
Configure current `bundles`, `defaultBundle`, engines, and credentials. Copy
|
|
64
|
+
only authored assets you intend to retain into a current bundle. Regenerable
|
|
65
|
+
indexes and caches should be rebuilt, not imported.
|
|
201
66
|
|
|
202
|
-
|
|
67
|
+
Current additive `state.db` schema changes run automatically when the managed
|
|
68
|
+
database opens. That mechanism upgrades current ledgers; it is not an importer
|
|
69
|
+
for 0.8 databases.
|
|
203
70
|
|
|
204
|
-
|
|
205
|
-
(the transform `akm migrate apply` runs on your behalf once you give it a
|
|
206
|
-
target config that already speaks the 0.9 shape) and
|
|
207
|
-
`src/core/config/config-walker.ts`'s retired-key hints:
|
|
71
|
+
### 4. Convert task-v2 sources explicitly
|
|
208
72
|
|
|
209
|
-
|
|
210
|
-
| --- | --- | --- |
|
|
211
|
-
| `stashDir` | `bundles.<id>.path` + `defaultBundle` | The `primary: true` source (or the top-level `stashDir` if none was marked primary) becomes the bundle named by `defaultBundle` |
|
|
212
|
-
| `sources[]` | `bundles` | One `bundles.<id>` entry per source; `id` is derived from the source's `name`/`registryId` or a slug of its path |
|
|
213
|
-
| `installed[]` | `bundles` + lockfile | The config entry keeps only the desired locator (`git`/`npm` + `registryId`); the materialized cache path and revision move to the lockfile, not the config |
|
|
214
|
-
| `wikiName` | (gone — no replacement) | The wiki subsystem was removed in 0.9; a Karpathy-style wiki is recognized automatically as an `llm-wiki` bundle, and ordinary content goes through `akm import` |
|
|
215
|
-
| `profiles.llm.<name>` / `defaults.llm` | `engines.<name>` (`kind: "llm"`) / `defaults.llmEngine` | Not migrated automatically — you choose the new engine names |
|
|
216
|
-
| `profiles.agent.<name>` / `defaults.agent` | `engines.<name>` (`kind: "agent"`) / `defaults.engine` | Not migrated automatically — see the name-collision note below |
|
|
217
|
-
| `profiles.improve.<name>` / `defaults.improve` | `improve.strategies.<name>` / `defaults.improveStrategy` | Not migrated automatically |
|
|
218
|
-
|
|
219
|
-
The engine/task-asset keys are **not** translated to `engines`/`defaults` by
|
|
220
|
-
`migrate apply` — see [Engine And Task Assets](#engine-and-task-assets) below
|
|
221
|
-
for why AKM cannot safely auto-generate `engines` names when a 0.8 LLM
|
|
222
|
-
profile and agent profile shared one. In a hand-written target config passed
|
|
223
|
-
via `--config`, leaving these keys in is a hard schema-validation error (same
|
|
224
|
-
as before 0.9.0's config generation existed) — [Preparing the 0.9
|
|
225
|
-
config](#preparing-the-09-config) above never touches them for you. The
|
|
226
|
-
auto-generation path ([above](#auto-generating-the-09-config)) instead
|
|
227
|
-
actively STRIPS them and reports exactly what it stripped via
|
|
228
|
-
`generatedConfig.droppedKeys`, so the config it writes is valid on its own;
|
|
229
|
-
either way, you still add `engines`/`defaults` by hand afterward if you want
|
|
230
|
-
LLM/agent execution to keep working. Everything else in the table above
|
|
231
|
-
(bundles, defaultBundle, `wikiName` removal) *is* handled — by `migrate apply`
|
|
232
|
-
once you hand it a target config, or by the generator on your behalf —
|
|
233
|
-
`migrate apply` moves the durable state and databases, not the config keys
|
|
234
|
-
themselves.
|
|
235
|
-
|
|
236
|
-
#### End-to-end happy path
|
|
237
|
-
|
|
238
|
-
The complete sequence, in the order you actually hit it, assuming a single
|
|
239
|
-
0.8 `stashDir` and no LLM/agent profiles to carry over — letting `migrate
|
|
240
|
-
apply` generate the target config instead of hand-writing one:
|
|
73
|
+
Normal task execution accepts task v3 only. Preview every translation:
|
|
241
74
|
|
|
242
75
|
```sh
|
|
243
|
-
# 1. Stop schedulers and any running akm process first (see step 1 above).
|
|
244
|
-
|
|
245
|
-
# 2. Back up the live 0.8 data directory independently (outside AKM's own dirs).
|
|
246
|
-
cp -a ~/.local/share/akm ~/akm-0.8-backup-"$(date +%Y%m%d)"
|
|
247
|
-
|
|
248
|
-
# 3. Install 0.9.
|
|
249
|
-
npm install -g akm-cli@0.9.0
|
|
250
|
-
|
|
251
|
-
# 4. Check eligibility (previews the config apply would generate), then apply
|
|
252
|
-
# TWICE: the first apply only writes the generated config and stops; the
|
|
253
|
-
# second, unchanged, invocation picks it up and performs the cutover.
|
|
254
76
|
akm migrate status
|
|
255
77
|
akm migrate apply --dry-run
|
|
256
|
-
akm migrate apply
|
|
257
|
-
akm migrate apply
|
|
258
|
-
|
|
259
|
-
# 5. Rebind the scheduler to the new binary and rebuild the index.
|
|
260
|
-
akm task sync --rebind
|
|
261
|
-
akm index
|
|
262
|
-
akm migrate status # now reports current with no --config needed
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
If your 0.8 config configured LLM/agent profiles, or you'd simply rather
|
|
266
|
-
write the target config yourself, replace step 4 with the hand-authored
|
|
267
|
-
`--config` form instead:
|
|
268
|
-
|
|
269
|
-
```sh
|
|
270
|
-
# 4'. Write the target config (see the minimal example above), then check
|
|
271
|
-
# eligibility, dry-run, and apply against it explicitly.
|
|
272
|
-
cat > ./prepared-0.9.json << 'EOF'
|
|
273
|
-
{
|
|
274
|
-
"configVersion": "0.9.0",
|
|
275
|
-
"bundles": { "primary": { "path": "/home/you/akm", "writable": true } },
|
|
276
|
-
"defaultBundle": "primary"
|
|
277
|
-
}
|
|
278
|
-
EOF
|
|
279
|
-
akm migrate status --config ./prepared-0.9.json
|
|
280
|
-
akm migrate apply --config ./prepared-0.9.json --dry-run
|
|
281
|
-
akm migrate apply --config ./prepared-0.9.json
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
Package-manager installation examples for step 4:
|
|
285
|
-
|
|
286
|
-
Package-manager installs require Node.js >= 22. If Bun >= 1.0 is also on
|
|
287
|
-
`PATH`, the installed launcher prefers Bun after Node.js bootstraps it.
|
|
288
|
-
|
|
289
|
-
```sh
|
|
290
|
-
npm install -g akm-cli@0.9.0
|
|
291
|
-
# or: pnpm add -g akm-cli@0.9.0
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Commands for steps 5 and 6:
|
|
295
|
-
|
|
296
|
-
```sh
|
|
297
|
-
# Package-manager install: this `akm` is now the 0.9 binary.
|
|
298
|
-
akm migrate status --config ./prepared-0.9.json
|
|
299
|
-
akm migrate apply --config ./prepared-0.9.json --dry-run
|
|
300
|
-
akm migrate apply --config ./prepared-0.9.json
|
|
301
|
-
akm task sync --rebind
|
|
302
|
-
|
|
303
|
-
# Or invoke a checksummed staged standalone binary explicitly.
|
|
304
|
-
./akm-0.9 migrate status --config ./prepared-0.9.json
|
|
305
|
-
./akm-0.9 migrate apply --config ./prepared-0.9.json
|
|
306
|
-
./akm-0.9 task sync --rebind
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
Status and dry-run perform the same read-only eligibility checks and report the
|
|
310
|
-
source config plus target config explicitly. Apply validates the target in
|
|
311
|
-
memory and creates a verified recovery run. Before the first mutation it writes
|
|
312
|
-
one phase-free incomplete sentinel containing the retained target, path base,
|
|
313
|
-
and original backup identity. It then applies schema changes by ordered
|
|
314
|
-
migration ID, runs the data and asset transforms idempotently, and atomically
|
|
315
|
-
installs the prepared config last.
|
|
316
|
-
|
|
317
|
-
If a transform fails, apply does not guess at rollback and does not replace the
|
|
318
|
-
original backup. It leaves the incomplete sentinel in place, ordinary config
|
|
319
|
-
and canonical database access fail closed, and the next `akm migrate apply`
|
|
320
|
-
replays the same transforms to convergence. The transaction-local cutover
|
|
321
|
-
ledger prevents duplicate workflow or usage-event imports. The sentinel is
|
|
322
|
-
removed only after final config, schema, task, proposal-ref, and cutover outcome
|
|
323
|
-
checks pass. Apply also refuses before backup while managed database handles,
|
|
324
|
-
maintenance activities, AKM mutation locks, or workflow claims are live.
|
|
325
|
-
|
|
326
|
-
Once already running a contract-capable 0.9 release, future self-upgrades may
|
|
327
|
-
pass a prepared target through the coordinated upgrade path:
|
|
328
|
-
|
|
329
|
-
```sh
|
|
330
|
-
akm upgrade --migration-config ./prepared-0.9.json
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
This command is not the 0.8-to-0.9 procedure. The already-installed 0.8 binary
|
|
334
|
-
cannot contain or enforce safeguards added in 0.9, so operators must follow the
|
|
335
|
-
manual boundary above rather than relying on 0.8 self-update. For 0.9+ upgrades,
|
|
336
|
-
the current binary preflights only its current artifact state; it does not parse
|
|
337
|
-
a prepared config for the future release. After installation, only the new
|
|
338
|
-
binary receives `--config` during apply. If the active config is already current,
|
|
339
|
-
no migration-config flag is needed.
|
|
340
|
-
|
|
341
|
-
Recovery runs are stored under
|
|
342
|
-
`$DATA/backups/migrations/<installation-id>/<run-id>/`. They record present and
|
|
343
|
-
absent `config.json`, `state.db`, `workflow.db`, and `index.db` artifacts,
|
|
344
|
-
ordered migration ledgers, and semantic state. SQLite snapshots must pass
|
|
345
|
-
`PRAGMA quick_check` and ledger-prefix validation before the manifest is
|
|
346
|
-
published. `akm-migrate backup
|
|
347
|
-
--for 0.9.0` creates an additional unique run when an operator wants a manual
|
|
348
|
-
snapshot. Routine config writes, telemetry, and already-current database opens
|
|
349
|
-
do not depend on any historical run.
|
|
350
|
-
|
|
351
|
-
### What migration control does not cover
|
|
352
|
-
|
|
353
|
-
Migration control tracks exactly four artifacts — `config.json`, `state.db`,
|
|
354
|
-
`workflow.db`, `index.db` — because that is the literal list the backup/restore
|
|
355
|
-
manifest enumerates. Two boundaries follow from that list that are worth
|
|
356
|
-
stating plainly rather than discovering by accident:
|
|
357
|
-
|
|
358
|
-
- **`logs.db` is entirely outside the migration system.** It is never backed
|
|
359
|
-
up, never restored, and never version-checked; `src/core/logs-db.ts`
|
|
360
|
-
bootstraps its own schema the first time it is opened, independent of the
|
|
361
|
-
migration coordinator. This is fine in practice — task and index logs are
|
|
362
|
-
purgeable operational data, not state you need a rollback path for — but it
|
|
363
|
-
means an `akm-migrate restore` rolls back `config.json`, `state.db`,
|
|
364
|
-
`workflow.db`, and `index.db` to a prior run while `logs.db` is left exactly
|
|
365
|
-
as the newer binary wrote it. Do not expect `logs.db` to move with a
|
|
366
|
-
restore.
|
|
367
|
-
- **`index.db` is only checked with `PRAGMA quick_check`**, never inspected
|
|
368
|
-
for a schema/migration version the way `state.db` and `workflow.db` are. A
|
|
369
|
-
`index.db` written by a release newer than the one currently running cannot
|
|
370
|
-
be detected as "newer" — the runtime instead quarantines and rebuilds it
|
|
371
|
-
from scratch on the next `akm index`. This is safe because the index is a
|
|
372
|
-
fully regenerable search cache; it is called out here only so "migration
|
|
373
|
-
status: current" is not read as "index.db is exactly what this binary
|
|
374
|
-
expects."
|
|
375
|
-
|
|
376
|
-
### Two different `migrate` surfaces
|
|
377
|
-
|
|
378
|
-
`akm migrate` — the subcommand on the everyday `akm` binary — exposes only
|
|
379
|
-
`status` and `apply`: the two commands you need to cross the boundary and to
|
|
380
|
-
check or apply any future in-place migration. It does **not** expose `backup`,
|
|
381
|
-
`restore`, or `storage`.
|
|
382
|
-
|
|
383
|
-
The standalone `akm-migrate` program (`scripts/akm-migrate.ts` in a source
|
|
384
|
-
checkout; shipped as its own `dist/akm-migrate` release artifact — see the
|
|
385
|
-
`bin` entry in `package.json`) is a separate binary with a larger surface:
|
|
386
|
-
`status`, `apply`, `backup`, `restore`, and `storage`. `backup` and `restore`
|
|
387
|
-
exist **only** here — there is no `akm migrate restore`. If your install does
|
|
388
|
-
not ship `akm-migrate` (some minimal or hand-rolled installs omit it), you have
|
|
389
|
-
no restore path from that install; every `akm-migrate restore ...` /
|
|
390
|
-
`akm-migrate backup ...` command in this guide and in
|
|
391
|
-
[the troubleshooting guide](v0.9.0-troubleshooting.md) refers to that separate
|
|
392
|
-
binary, not the `akm migrate` subcommand.
|
|
393
|
-
|
|
394
|
-
There is also no `plan` subcommand on either surface. What some other tools
|
|
395
|
-
call "planning" is `akm migrate status` (read-only eligibility check) or
|
|
396
|
-
`akm migrate apply --dry-run` (the same transforms, run without writing) — do
|
|
397
|
-
not look for a separate plan step.
|
|
398
|
-
|
|
399
|
-
## 2. Ref grammar: `type:name` → `[bundle//]conceptId`
|
|
400
|
-
|
|
401
|
-
Refs are now subdir-qualified concept ids inside their bundle —
|
|
402
|
-
`skills/code-review`, `memories/vpn-note`, `knowledge/api-guide`, `env/prod`,
|
|
403
|
-
`secrets/deploy-token` — with an optional `bundle//` installation prefix and an
|
|
404
|
-
optional `#fragment`. Durable state stores the fully-qualified
|
|
405
|
-
`bundle//conceptId`; the short bundle-omitted form is accepted input only (CLI,
|
|
406
|
-
API, and inside bundle content), resolved against `defaultBundle` and then
|
|
407
|
-
installation-priority order.
|
|
408
|
-
|
|
409
|
-
Before / after:
|
|
410
|
-
|
|
411
|
-
| 0.8.x | 0.9.0 |
|
|
412
|
-
| --- | --- |
|
|
413
|
-
| `skill:code-review` | `skills/code-review` |
|
|
414
|
-
| `memory:vpn-note` | `memories/vpn-note` |
|
|
415
|
-
| `origin//knowledge:api-guide` | `origin//knowledge/api-guide` |
|
|
416
|
-
| `vault:prod` | `env/prod` (see [§3](#3-removed-surfaces)) |
|
|
417
|
-
|
|
418
|
-
**There is no compatibility parser.** The pre-0.9.0 `[origin//]type:name`
|
|
419
|
-
grammar is removed from every normal code path; it survives only inside the
|
|
420
|
-
migrator (`scripts/akm-migrate/migrate/legacy-ref-grammar.ts`) for reading
|
|
421
|
-
pre-cutover data.
|
|
422
|
-
`akm migrate apply` re-keys every durable ref to the new spelling, and refs
|
|
423
|
-
embedded in your own asset bodies are rewritten by the content migration — but
|
|
424
|
-
any prompt, `AGENTS.md`, or doc that still spells refs in the old `type:name`
|
|
425
|
-
form must be updated by hand. A code-review skill is now `skills/code-review`.
|
|
426
|
-
See `STABILITY.md` for the full contract.
|
|
427
|
-
|
|
428
|
-
`index.md` and `log.md` are also now reserved by the AKM adapter at every stash
|
|
429
|
-
depth — never indexed as items and never valid item-write targets. This matches
|
|
430
|
-
OKF's structural names but is an AKM format rule, not an assertion that the
|
|
431
|
-
stash is an OKF bundle. Existing stash files with those names are excluded from
|
|
432
|
-
the index and renamed by the content migration if they hold a real item.
|
|
433
|
-
|
|
434
|
-
## 3. Removed surfaces
|
|
435
|
-
|
|
436
|
-
### `akm wiki` → a bundle format, not a command family
|
|
437
|
-
|
|
438
|
-
0.9.0 removes the entire `akm wiki` verb family (`create`, `register`, `list`,
|
|
439
|
-
`show`, `remove`, `pages`, `search`, `stash`, `lint`, `ingest`) and the `wiki`
|
|
440
|
-
asset type. The Karpathy-style LLM wiki structure stays first-class for
|
|
441
|
-
*reading*, now as a **bundle format** recognized by the `llm-wiki` adapter
|
|
442
|
-
instead of a bespoke command surface: `schema.md` (the per-wiki rulebook) +
|
|
443
|
-
`pages/` (agent-authored pages) at a bundle's root is enough for the indexer
|
|
444
|
-
to recognize it, index its pages, and present them through `akm show`.
|
|
445
|
-
`raw/`, `index.md`, and `log.md` stay reserved infrastructure.
|
|
446
|
-
|
|
447
|
-
**llm-wiki is consumer/read-only for writes in 0.9.0, the same as OKF.** The
|
|
448
|
-
adapter defines its own `validate` and `placeNew` logic. Validation is
|
|
449
|
-
adapter-driven in 0.9.0: `akm lint` runs the `llm-wiki` adapter's own
|
|
450
|
-
wiki-shaped checks through `validate()` rather than falling back to the
|
|
451
|
-
generic AKM subdirectory scan. Placement is not — nothing in the write path
|
|
452
|
-
calls `placeNew()` yet for any adapter, llm-wiki included; that wiring is
|
|
453
|
-
deferred to 0.10 (see
|
|
454
|
-
[D12 in the 0.9.0 decision record](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/0.9.0-decisions.md#d12--bundleadapterplacenew-stays-unwired-until-010)).
|
|
455
|
-
Separately, `akm remember`/`akm import`/proposal-accept into an llm-wiki
|
|
456
|
-
bundle are rejected before they reach the adapter at all — the same
|
|
457
|
-
`assertAkmAssetWrite` allowlist that rejects OKF targets, unrelated to the
|
|
458
|
-
`placeNew` deferral. Author llm-wiki content through your agent writing
|
|
459
|
-
directly into `pages/` (as the Karpathy pattern always intended), not
|
|
460
|
-
through akm's native write commands.
|
|
461
|
-
|
|
462
|
-
There is no `akm wiki ...` compatibility shim — an installed non-akm wiki
|
|
463
|
-
directory reclassifies under the `llm-wiki` adapter on your next `akm index`
|
|
464
|
-
(see [adapter dispatch reclassification](#4-behavioral-notes)); wiki pages are
|
|
465
|
-
found through `akm search`/`akm show` like any other asset.
|
|
466
|
-
|
|
467
|
-
### `akm vault` → `env` / `secret`
|
|
468
|
-
|
|
469
|
-
0.9.0 also removes the deprecated `vault` asset type. Its replacement, the `env`
|
|
470
|
-
asset type, shipped in 0.8.0 alongside a deprecation shim and an automatic
|
|
471
|
-
`vaults/` → `env/` migration. This section explains what changed, how to
|
|
472
|
-
migrate, and what 0.9.0 removes.
|
|
473
|
-
|
|
474
|
-
> **TL;DR:** In 0.8.0, run the migration (`akm-migrate storage --yes`) to copy
|
|
475
|
-
> `vaults/` → `env/`, then switch your scripts from `akm vault …` to
|
|
476
|
-
> `akm env …` and from `source "$(akm vault path …)"` to
|
|
477
|
-
> `akm env run <name> -- <command>` (or `-- $SHELL` for an interactive
|
|
478
|
-
> session). Everything keeps working through 0.8.x; the `vault` verb and
|
|
479
|
-
> `vault:` refs are removed in 0.9.0.
|
|
480
|
-
|
|
481
|
-
#### Why `vault` → `env`
|
|
482
|
-
|
|
483
|
-
The old `vault` type managed individual `KEY=value` entries: `vault set`,
|
|
484
|
-
`vault unset`, comment management, and bespoke value quoting. That hand-rolled
|
|
485
|
-
write surface was the riskiest part of the feature. 0.8.0 simplifies the model
|
|
486
|
-
and splits it by **purpose**:
|
|
487
|
-
|
|
488
|
-
- **`env`** — a group of related **configuration** for an app/service (URLs,
|
|
489
|
-
flags, and any credentials it needs) in one `.env` file, sourced or injected
|
|
490
|
-
**wholesale**. Values may or may not be sensitive — all are protected. akm no
|
|
491
|
-
longer edits entries; you edit the file with your own editor and akm loads it.
|
|
492
|
-
- **`secret`** — a single **sensitive value** used on its own for authentication
|
|
493
|
-
(one file = one value: a token, key, or cert), for the cases where
|
|
494
|
-
`vault set <ref> <KEY>` was used to store one credential.
|
|
495
|
-
|
|
496
|
-
Both protect values identically (never written to stdout, the index, or any
|
|
497
|
-
structured output); env additionally surfaces key names for discoverability
|
|
498
|
-
(comment text is never surfaced — comments can contain commented-out
|
|
499
|
-
credentials). Pick `env` for configuration, `secret` for a standalone
|
|
500
|
-
authentication credential.
|
|
501
|
-
|
|
502
|
-
#### What the `vault` split became
|
|
503
|
-
|
|
504
|
-
The mapping (right column is the current 0.9.0 world):
|
|
505
|
-
|
|
506
|
-
| Area | old `vault` world | now (0.9.0) |
|
|
507
|
-
| --- | --- | --- |
|
|
508
|
-
| Asset type | `vault` | `env` (whole group) / `secret` (single value) |
|
|
509
|
-
| Directory | `vaults/` | `env/` and `secrets/` (`vaults/` frozen after migration) |
|
|
510
|
-
| Ref | `vault:prod` | `env/prod` / `secrets/<name>` (the `vault:` prefix is removed) |
|
|
511
|
-
| Shell load | `source "$(akm vault path …)"` | `akm env run prod -- $SHELL` (or `export --out <file>` then source) |
|
|
512
|
-
| Run | `akm vault run vault:prod[/KEY] -- …` | `akm env run prod [--only K] -- …` |
|
|
513
|
-
| Set one value | `akm vault set vault:prod KEY` | `akm secret set <name>` (or edit the `.env`) |
|
|
514
|
-
| Ingest a `.env` | (hand-copy into `vaults/`) | `akm env create prod --from-file ./.env` |
|
|
515
|
-
| Delete | (hand-delete the file) | `akm env remove prod` |
|
|
516
|
-
| Renderer | `vault-env` | `env-file` |
|
|
517
|
-
| Audit event | `vault_access` | `env_access` |
|
|
518
|
-
|
|
519
|
-
The `akm vault` verb still works in 0.8.x: it prints a stderr deprecation
|
|
520
|
-
warning and delegates `list` / `path` / `export` / `run` / `create` to the
|
|
521
|
-
`env` handlers. `vault set` / `vault unset` and the single-key
|
|
522
|
-
`vault run <ref>/KEY` form are **hard-errors** with a signpost — silent changes
|
|
523
|
-
to secret-handling behaviour are unacceptable.
|
|
524
|
-
|
|
525
|
-
#### Running the migration
|
|
526
|
-
|
|
527
|
-
The migration copies `<stash>/vaults/` → `<stash>/env/`. It is **copy, never
|
|
528
|
-
move**: the legacy `vaults/` tree is left intact as a frozen copy and a
|
|
529
|
-
`vaults/.migrated` marker is written so re-runs are no-ops.
|
|
530
|
-
|
|
531
|
-
```sh
|
|
532
|
-
# Preview (no changes written)
|
|
533
|
-
akm-migrate storage --dry-run
|
|
534
|
-
|
|
535
|
-
# Apply
|
|
536
|
-
akm-migrate storage --yes
|
|
537
|
-
|
|
538
|
-
# From a source clone:
|
|
539
|
-
bun scripts/akm-migrate.ts storage --yes
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
What the `vaults/ → env/` step does:
|
|
543
|
-
|
|
544
|
-
1. Skips entirely if there is no `vaults/` directory, if the `.migrated` marker
|
|
545
|
-
already exists, or if `vaults/` contains no `.env` files (e.g. a fresh
|
|
546
|
-
install).
|
|
547
|
-
2. Copies every file under `vaults/` into `env/` as **opaque bytes** (`.env`,
|
|
548
|
-
`.sensitive`, and `.lock` sidecars alike) — contents are never read or
|
|
549
|
-
re-serialised.
|
|
550
|
-
3. **Never overwrites** an `env/` file you already authored (those are skipped
|
|
551
|
-
and preserved).
|
|
552
|
-
4. Tightens permissions on the copied tree: `0600` files, `0700` directories,
|
|
553
|
-
then verifies the mode. (The generic copy helper checks size only, so this
|
|
554
|
-
pass guarantees migrated secret material does not land at the umask default.)
|
|
555
|
-
5. Verifies the post-copy `.env` count is at least the source count, then writes
|
|
556
|
-
the `vaults/.migrated` marker.
|
|
557
|
-
|
|
558
|
-
After migrating, run `akm index` to refresh search so entries surface under
|
|
559
|
-
`env/…` rather than `vault:`.
|
|
560
|
-
|
|
561
|
-
#### Command mapping
|
|
562
|
-
|
|
563
|
-
```sh
|
|
564
|
-
# List
|
|
565
|
-
akm vault list → akm env list # doclint:ignore (left side is the removed 0.8.x `vault` verb — this is the "Before" of the mapping)
|
|
566
|
-
|
|
567
|
-
# Inspect keys (values never shown)
|
|
568
|
-
akm show vault:prod → akm show env/prod
|
|
569
|
-
|
|
570
|
-
# Load values into a shell (use a subshell — safe, nothing on disk)
|
|
571
|
-
source "$(akm vault path vault:prod)" → akm env run prod -- $SHELL
|
|
572
|
-
|
|
573
|
-
# Run a command with the env injected
|
|
574
|
-
akm vault run vault:prod -- ./deploy.sh → akm env run prod -- ./deploy.sh # doclint:ignore (left side is the removed 0.8.x `vault` verb — this is the "Before" of the mapping)
|
|
575
|
-
|
|
576
|
-
# Create / ingest an existing .env
|
|
577
|
-
akm vault create prod → akm env create prod # doclint:ignore (left side is the removed 0.8.x `vault` verb — this is the "Before" of the mapping)
|
|
578
|
-
# or: akm env create prod --from-file ./.env
|
|
579
|
-
|
|
580
|
-
# Edit (akm no longer manages entries)
|
|
581
|
-
akm vault set vault:prod DB_URL → $EDITOR "$(akm env path prod --quiet)" # doclint:ignore (left side is the removed 0.8.x `vault` verb — this is the "Before" of the mapping)
|
|
582
|
-
# or: akm secret set db-url
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
Existing `vault:` refs embedded in your own assets are **not** rewritten (akm
|
|
586
|
-
never mutates your content). They keep resolving through 0.8.x: the resolver
|
|
587
|
-
prefers `env/` and falls back to the frozen `vaults/` copy.
|
|
588
|
-
|
|
589
|
-
#### The safe load paths
|
|
590
|
-
|
|
591
|
-
`env path` prints the **raw** file path. Do **not** `source` it: a hand-edited
|
|
592
|
-
or migrated `.env` containing `X=$(rm -rf ~)` would execute on `source`.
|
|
593
|
-
|
|
594
|
-
- **Processes / agents / interactive** — `akm env run prod -- <cmd>` (or
|
|
595
|
-
`-- $SHELL`). Values go straight into the child process, never through a shell
|
|
596
|
-
and never onto stdout. **This is the only path safe for AI agents** —
|
|
597
|
-
`env export`/`env path` put value-bearing data where a captured context would
|
|
598
|
-
ingest it.
|
|
599
|
-
- **A sourceable file** (a tool that must `source` a script) — `akm env export
|
|
600
|
-
prod --out <file>` writes single-quote-escaped `export KEY='value'` lines
|
|
601
|
-
to a file (mode 0600); the values are re-serialised so sourcing it can never
|
|
602
|
-
execute a substitution. `export` never prints values to stdout, so it requires
|
|
603
|
-
`--out`.
|
|
604
|
-
- **Docker `_FILE` / `--env-file`** — `akm env path prod --quiet` prints the
|
|
605
|
-
raw file path for tools that read it themselves.
|
|
606
|
-
|
|
607
|
-
#### Single values are now secrets
|
|
608
|
-
|
|
609
|
-
If you used `vault set <ref> <KEY>` to store a single credential, store it as a
|
|
610
|
-
[secret](../reference/cli.md#secret) instead:
|
|
611
|
-
|
|
612
|
-
```sh
|
|
613
|
-
printf '%s' "$TOKEN" | akm secret set deploy-token
|
|
614
|
-
akm secret run deploy-token GITHUB_TOKEN -- gh release create v1.0.0
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
`akm env run` injects the **whole** file; the single-key `vault run <ref>/KEY`
|
|
618
|
-
form was removed because silently changing which variables a child process sees
|
|
619
|
-
is a security-relevant behaviour change.
|
|
620
|
-
|
|
621
|
-
#### What 0.9.0 removes
|
|
622
|
-
|
|
623
|
-
- The entire `akm vault` verb and its subcommands.
|
|
624
|
-
- The `vault:` ref alias. Parsing a `vault:` ref now fails immediately with:
|
|
625
|
-
`The \`vault\` asset type was removed in 0.9.0 — use \`env/\` (whole .env
|
|
626
|
-
config) or \`secrets/\` (a single value).`
|
|
627
|
-
- The `vault` asset-spec entry, renderer (`vault-env`), and the `vault_access`
|
|
628
|
-
audit-event alias.
|
|
629
|
-
- The frozen `vaults/` directory is deleted **only** after explicit per-path
|
|
630
|
-
confirmation — the migration never auto-removes it.
|
|
631
|
-
|
|
632
|
-
Switch to `akm env` / `akm secret` and the `akm env run <name> -- <cmd>`
|
|
633
|
-
idiom before upgrading to 0.9.0.
|
|
634
|
-
|
|
635
|
-
##### If you upgraded straight to 0.9.0 without migrating
|
|
636
|
-
|
|
637
|
-
Because 0.9.0 removed the `vault` asset type, the indexer **no longer scans
|
|
638
|
-
`vaults/` at all**. If you jumped from 0.7/0.8 to 0.9.0 and never ran
|
|
639
|
-
`akm-migrate storage`, the `.env` data still sitting in `vaults/` was never
|
|
640
|
-
copied to `env/` and will **not** appear under `env/…` — it is silently
|
|
641
|
-
un-indexed (the files themselves are untouched on disk).
|
|
642
|
-
|
|
643
|
-
The 0.9 runtime does not inspect the retired `vaults/` tree. Use the standalone
|
|
644
|
-
migration tool to detect and copy any remaining files; it owns the
|
|
645
|
-
`vaults/.migrated` marker and remains idempotent and non-destructive:
|
|
646
|
-
|
|
647
|
-
```sh
|
|
648
|
-
akm-migrate storage --yes # copies vaults/ -> env/, leaving vaults/ intact
|
|
649
|
-
akm index # refresh search so entries surface under env/
|
|
650
78
|
```
|
|
651
79
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
80
|
+
Review each `changed`, `skipped`, and `blocked` entry. The migrator blocks
|
|
81
|
+
ambiguous argv arrays or any conversion whose execution meaning is not
|
|
82
|
+
provable. Rewrite blocked files manually as task v3.
|
|
655
83
|
|
|
656
|
-
|
|
84
|
+
Apply only after the preview is correct:
|
|
657
85
|
|
|
658
86
|
```sh
|
|
659
|
-
|
|
660
|
-
akm env list
|
|
661
|
-
|
|
662
|
-
# The frozen copy + marker are present
|
|
663
|
-
ls -la "$(akm info --format=json | jq -r .bundleDir)/vaults/.migrated"
|
|
664
|
-
|
|
665
|
-
# Values still never leak
|
|
666
|
-
akm show env/prod # key names only
|
|
667
|
-
akm search <a-secret-value> # no hits
|
|
668
|
-
```
|
|
669
|
-
|
|
670
|
-
#### Rolling back the vault copy
|
|
671
|
-
|
|
672
|
-
The migration is non-destructive — `vaults/` is untouched. To roll back, delete
|
|
673
|
-
the generated `env/` directory and remove the `vaults/.migrated` marker, then
|
|
674
|
-
downgrade akm. Because `env/` is a copy, no data is lost either way.
|
|
675
|
-
|
|
676
|
-
### Removed `--auto-accept` on `akm improve`
|
|
677
|
-
|
|
678
|
-
The 0.9.0 confidence gate `--auto-accept` used to configure was deleted:
|
|
679
|
-
proposals now queue for review (`akm proposal` / the drain engine) instead of
|
|
680
|
-
being auto-promoted by threshold. Through 0.9.x, `--auto-accept` is accepted
|
|
681
|
-
only as a compatibility flag: akm warns that it is removed and ignored, and
|
|
682
|
-
discards a space-separated value. Remove it from task definitions and scripts;
|
|
683
|
-
it becomes a hard error in 0.10. See [proposal triage](#4-behavioral-notes) for
|
|
684
|
-
the explicit replacement.
|
|
685
|
-
|
|
686
|
-
### Retired `--wiki` flag
|
|
687
|
-
|
|
688
|
-
`akm import`'s 0.8.x `--wiki <name>` flag (route content into
|
|
689
|
-
`wikis/<name>/raw/` instead of `knowledge/`) is removed along with the rest of
|
|
690
|
-
the `akm wiki` surface. `akm import` always writes into `knowledge/` (use
|
|
691
|
-
`--path` for a subdirectory); use the `llm-wiki` bundle format directly
|
|
692
|
-
(`pages/`, `raw/`) if you still want wiki-shaped content.
|
|
693
|
-
|
|
694
|
-
### Removed `--min-retrieval-count`
|
|
695
|
-
|
|
696
|
-
`akm improve`'s `--min-retrieval-count` flag and the `minRetrievalCount` option
|
|
697
|
-
configured the P0-A high-retrieval fallback lane, which was deleted along with
|
|
698
|
-
several other improve-loop lanes (self-consistency, multi-cycle, exploration
|
|
699
|
-
budget). There is no replacement flag — retrieval-count signal still feeds
|
|
700
|
-
ranking, just not through a dedicated eligibility fallback. Drop the flag from
|
|
701
|
-
any scripted `akm improve` invocations.
|
|
702
|
-
|
|
703
|
-
### `akm mv` → move the file, then `akm index`
|
|
704
|
-
|
|
705
|
-
0.9.0 removes `akm mv` outright — no alias, no stub; `akm mv …` fails with the
|
|
706
|
-
standard unknown-command error. A rename **is** delete plus create in akm's
|
|
707
|
-
identity model (see [`STABILITY.md`](../../STABILITY.md) § Renames), and the
|
|
708
|
-
command's inbound-ref rewrite matched bare conceptIds rather than anchored
|
|
709
|
-
`bundle//conceptId` refs, so it could edit ordinary prose while leaving real
|
|
710
|
-
refs dangling. The supported procedure is three steps you can see the results
|
|
711
|
-
of:
|
|
712
|
-
|
|
713
|
-
```sh
|
|
714
|
-
mv ~/akm/memories/projectA/old-note.md ~/akm/memories/projectA/new-note.md
|
|
715
|
-
akm index # the new path is indexed; the old entry drops out
|
|
716
|
-
akm lint # reports every inbound ref the rename left dangling
|
|
717
|
-
```
|
|
718
|
-
|
|
719
|
-
Fix the refs `akm lint` reports (its `missing-ref` check covers body prose and
|
|
720
|
-
the frontmatter xref channels) and re-run `akm lint` until it is clean.
|
|
721
|
-
Cross-bundle movement is copy/import plus delete — never identity-preserving.
|
|
722
|
-
|
|
723
|
-
**Optional: carry the ranking signal over.** The destination gets a fresh
|
|
724
|
-
identity, so its accumulated signal — feedback, usage events, salience and
|
|
725
|
-
outcome history — stays keyed to the old ref and is eventually collected as
|
|
726
|
-
orphan rows. If the asset has earned history worth keeping, run the re-key
|
|
727
|
-
script from a source clone **before** `akm index`:
|
|
728
|
-
|
|
729
|
-
```sh
|
|
730
|
-
mv ~/akm/memories/projectA/old-note.md ~/akm/memories/projectA/new-note.md
|
|
731
|
-
bun scripts/rekey-asset-ref.ts memories/projectA/old-note memories/projectA/new-note
|
|
732
|
-
akm index && akm lint
|
|
733
|
-
```
|
|
734
|
-
|
|
735
|
-
Add `--dry-run` to see the row counts it would move. It refuses if both files
|
|
736
|
-
exist (that is a copy, not a rename), and it is idempotent — a second run
|
|
737
|
-
reports zero changed rows. See
|
|
738
|
-
[the 0.9.0 troubleshooting guide](v0.9.0-troubleshooting.md) for the symptom
|
|
739
|
-
this fixes after the fact.
|
|
740
|
-
|
|
741
|
-
## 4. Behavioral notes
|
|
742
|
-
|
|
743
|
-
### Adapter dispatch reclassification (installed non-akm bundles)
|
|
744
|
-
|
|
745
|
-
The indexer now dispatches each installed bundle's *detected* adapter (Claude
|
|
746
|
-
tool dirs, LLM wikis, website snapshots, agent-skills packs, …) instead of
|
|
747
|
-
recognizing everything with the akm-stash adapter. Entries in such bundles
|
|
748
|
-
change type and ref spelling to the owning adapter's own scheme the first time
|
|
749
|
-
you reindex after upgrading. **No action needed** — the index is a
|
|
750
|
-
regenerable cache and rebuilds itself — but searches or saved refs into those
|
|
751
|
-
bundles may resolve to the new spellings afterwards. Reindex with `akm index`
|
|
752
|
-
right after the cutover so this settles before you rely on saved refs. See
|
|
753
|
-
[Bundle Types](../reference/bundle-types.md) for the full 11-adapter list,
|
|
754
|
-
detection rules, and what each one reads/writes.
|
|
755
|
-
|
|
756
|
-
### 0.8 workflow assets after migration
|
|
757
|
-
|
|
758
|
-
A workflow document created by 0.8's own `akm workflow create` used
|
|
759
|
-
heading-based steps (`## Step name` sections). 0.9.0 requires the step graph
|
|
760
|
-
in frontmatter (`steps:`) instead — see
|
|
761
|
-
[Ref grammar](#2-ref-grammar-typename--bundleconceptid) for the related
|
|
762
|
-
`index.md`/`log.md` reservation, and the workflow authoring reference for the
|
|
763
|
-
current shape. `migrate apply` does not rewrite workflow *definitions* (only
|
|
764
|
-
`workflow:` target refs inside task files), so a 0.8-authored workflow
|
|
765
|
-
document keeps its 0.8 heading structure verbatim after migration.
|
|
766
|
-
|
|
767
|
-
The concrete end state, if you leave such a document unconverted:
|
|
768
|
-
|
|
769
|
-
- `akm lint` reports structural validation errors against it (missing
|
|
770
|
-
frontmatter `steps:`, plus one error per heading that no longer matches a
|
|
771
|
-
declared step id).
|
|
772
|
-
- It is **not indexed** as a workflow: `akm search --type workflow` and
|
|
773
|
-
`akm show <ref>` will not find it.
|
|
774
|
-
- Any run already started against it before the upgrade is unaffected by the
|
|
775
|
-
document rewrite and **stays `active`** — 0.9 does not silently fail or
|
|
776
|
-
auto-close it — and pollutes unrelated `akm show` output for other assets
|
|
777
|
-
with a `WORKFLOW ACTIVE` banner (workflow status is looked up by target,
|
|
778
|
-
not by whether the definition still validates).
|
|
779
|
-
|
|
780
|
-
Fix either by rewriting the asset with a frontmatter `steps:` list (see the
|
|
781
|
-
workflow reference for the schema, or run `akm workflow create --print` for a
|
|
782
|
-
fresh template to copy the shape from), or, if the run is no longer wanted, by
|
|
783
|
-
retiring it explicitly:
|
|
784
|
-
|
|
785
|
-
```sh
|
|
786
|
-
akm workflow list --active # find the stale run-id
|
|
787
|
-
akm workflow abandon <run-id> # marks it failed; resume can still reopen it
|
|
788
|
-
```
|
|
789
|
-
|
|
790
|
-
`akm workflow abandon` only changes the run's status — it does not touch the
|
|
791
|
-
workflow document. Rewrite the document separately if you want the asset
|
|
792
|
-
itself to lint clean and be searchable again.
|
|
793
|
-
|
|
794
|
-
### `env`/`secret` writes now honor `--target` / `defaultWriteTarget`
|
|
795
|
-
|
|
796
|
-
Previously, `env create`/`set`/`unset`/`remove` and `secret set`/`remove`
|
|
797
|
-
selected a write destination independently of `--target` and
|
|
798
|
-
`defaultWriteTarget`, ignoring writability and git commit boundaries. 0.9.0
|
|
799
|
-
routes the surviving mutating subcommands (`env create`/`remove`, `secret
|
|
800
|
-
set`) through the same `resolveWriteTarget` selection every other write
|
|
801
|
-
command uses: explicit `--target` wins, else `defaultWriteTarget`, else the
|
|
802
|
-
working stash — and a non-writable target is refused. A git-backed writable
|
|
803
|
-
target now lands the change in the same batch-at-boundary commit as any other
|
|
804
|
-
write (see [below](#single-batch-at-boundary-git-commit)). Reads (`env
|
|
805
|
-
run`/`list`/`path`/`export`, `secret run`/`list`) are unaffected — they still
|
|
806
|
-
search every configured source.
|
|
807
|
-
|
|
808
|
-
`env set`/`env unset` and `secret path`/`secret remove` are not merely
|
|
809
|
-
unaffected — they no longer exist in 0.9.0 (see the
|
|
810
|
-
[CLI rename table](#cli-surface-overhaul-rename-table-090-hard-break) and
|
|
811
|
-
[`akm secret`'s removal note](../reference/cli.md#secret) for why `secret
|
|
812
|
-
path`/`secret remove` specifically were dropped rather than fixed).
|
|
813
|
-
|
|
814
|
-
### LLM enrichment concurrency defaults
|
|
815
|
-
|
|
816
|
-
Indexing's LLM enrichment pool now defaults its concurrency from the
|
|
817
|
-
configured LLM endpoint instead of always assuming a remote API: a **local**
|
|
818
|
-
endpoint (`localhost`/`127.0.0.1`/`::1`/`*.localhost`) defaults to
|
|
819
|
-
**concurrency 1** (a single loaded model; parallel requests trigger reload
|
|
820
|
-
thrash), and a **remote** endpoint defaults to **concurrency 2** (enough to
|
|
821
|
-
overlap request latency without hammering rate-limited APIs).
|
|
822
|
-
`engines.<name>.concurrency` does not currently affect indexing enrichment;
|
|
823
|
-
it does cap frozen workflow fan-out.
|
|
824
|
-
|
|
825
|
-
### CLI rename table (old → new, removed 0.9.0)
|
|
826
|
-
|
|
827
|
-
Every old spelling printed a stderr deprecation warning in 0.8.x (suppressed
|
|
828
|
-
under `--quiet`) and delegated to the canonical form. 0.9.0 removes the old
|
|
829
|
-
spellings entirely — there is no delegation, and using one is a usage error.
|
|
830
|
-
|
|
831
|
-
| Old spelling (0.8, deprecated) | Canonical (use this) | Notes |
|
|
832
|
-
| --- | --- | --- |
|
|
833
|
-
| `akm proposals` | `akm proposal list` | bare `akm proposal` is now a usage error (exit 2) |
|
|
834
|
-
| `akm show proposal <id>` | `akm proposal show <id>` | |
|
|
835
|
-
| `akm diff <id>` | `akm proposal diff <id>` | |
|
|
836
|
-
| `akm accept <id>` | `akm proposal accept <id>` | |
|
|
837
|
-
| `akm reject <id>` | `akm proposal reject <id>` | |
|
|
838
|
-
| `akm revert <id>` | `akm proposal revert <id>` | |
|
|
839
|
-
| `--detail summary` | `--shape summary` | `--detail` is now verbosity only (`brief\|normal\|full`) |
|
|
840
|
-
| `--detail agent` | `--shape agent` | |
|
|
841
|
-
| `--for-agent` | `--shape agent` | |
|
|
842
|
-
| `--source` (on `accept`/`reject`/`history`) | `--generator` | `search`/`curate`'s `--source` was separately replaced by `--from` in the 0.9.0 surface overhaul (see below); `remember`'s `--source` is a distinct memory-tagging field, not renamed; `graph` was removed in 0.9.0 |
|
|
843
|
-
| `akm save` | `akm sync` | `sync` = commit + optional push; adds `--no-push` |
|
|
844
|
-
| `akm enable <component>` | `akm registry add <url> --name <component>` | `akm config enable/disable` was also removed in 0.9.0 (it only ever toggled the skills.sh registry); use `akm registry add\|remove`, the general mechanism |
|
|
845
|
-
| `akm disable <component>` | `akm registry remove <component>` | |
|
|
846
|
-
| `akm events` | `akm log` | `log` is primary in 0.9.0; `history` is a different (asset-scoped) surface |
|
|
847
|
-
| `akm wiki remove --force` | (removed — see [§3](#3-removed-surfaces)) | the whole `akm wiki` family is gone in 0.9.0 |
|
|
848
|
-
| `akm feedback --note <text>` | `akm feedback --reason <text>` | |
|
|
849
|
-
| `akm workflow next --dry-run` | (removed) | the flag is gone; `next` never supported a dry run |
|
|
850
|
-
|
|
851
|
-
0.9.0 retires the plural `akm tasks` spelling entirely (no alias): `akm task`
|
|
852
|
-
is the sole scheduling group. Its remaining subcommands are `add`, `run`,
|
|
853
|
-
`sync`, `doctor`, and `history`; `list`, `remove`, `init`, `enable`, and
|
|
854
|
-
`disable` are removed. `akm lessons` was removed outright (see
|
|
855
|
-
[§3](#3-removed-surfaces)).
|
|
856
|
-
|
|
857
|
-
### CLI surface overhaul rename table (0.9.0, hard break)
|
|
858
|
-
|
|
859
|
-
A second, larger rename pass landed within 0.9.0 itself: a full CLI-surface
|
|
860
|
-
overhaul with no deprecation window and no aliases. Every old spelling below
|
|
861
|
-
fails immediately with the standard unknown-command/unknown-flag error —
|
|
862
|
-
there was no 0.8.x warn-and-delegate period for these.
|
|
863
|
-
|
|
864
|
-
| Old spelling | New spelling / replacement | Notes |
|
|
865
|
-
| --- | --- | --- |
|
|
866
|
-
| `akm init` | `akm bundle create` | |
|
|
867
|
-
| `akm add` | `akm bundle add` | |
|
|
868
|
-
| `akm list` | `akm bundle list` | |
|
|
869
|
-
| `akm remove` | `akm bundle remove` | |
|
|
870
|
-
| `akm update` | `akm bundle update` | |
|
|
871
|
-
| `akm extract` | `akm proposal extract` | |
|
|
872
|
-
| `akm propose` | `akm proposal new` | |
|
|
873
|
-
| `akm registry search` | `akm search --from registry` | `--assets` folds in too |
|
|
874
|
-
| `akm tasks ...` | `akm task add\|run\|sync\|doctor\|history` | singular group; no plural alias; `list`, `remove`, `init`, `enable`, and `disable` are removed |
|
|
875
|
-
| `akm lessons` / `akm lesson` (command group) | (removed) | the `lesson` asset **type** is unaffected — read/write it via `akm search`/`akm show`/the proposal queue |
|
|
876
|
-
| `akm history` | (removed) | `--accept-rate-by-source` folded into `akm health --report` |
|
|
877
|
-
| `akm log tail` | `akm log --since '@offset:<id>'` | poll from a cooperating process; no daemon |
|
|
878
|
-
| `akm graph ...` (command group) | (removed) | summary counts (entities/relations/extraction coverage) folded into `akm health`; the extraction engine and `akm show`'s related-paths are unaffected |
|
|
879
|
-
| `akm mv` | (removed — see [§3](#akm-mv--move-the-file-then-akm-index)) | plain filesystem move → `akm index` → `akm lint`; optionally `bun scripts/rekey-asset-ref.ts <old> <new>` first to carry feedback/usage signal across the rename |
|
|
880
|
-
| `akm workflow template` | `akm workflow create --print` | prints the template without writing |
|
|
881
|
-
| `akm workflow validate` | `akm lint --type workflows --fail-on-flagged` | plain `lint` exits 0 regardless of findings — keep `--fail-on-flagged` in CI gates to preserve the old non-zero-on-invalid semantics |
|
|
882
|
-
| `akm workflow watch <run-id>` | `akm log --run <run-id> --since '@offset:<id>'` | |
|
|
883
|
-
| `akm workflow start <ref> --params '<json>'` | `akm workflow run <ref> --<param> <value> ...` | `run` is the canonical start/resume/execute command; parameter flags must exactly match declared names, and `--force` parallel starts are removed |
|
|
884
|
-
| `akm workflow next <target>` | `akm workflow run <target>` or `akm workflow status <target>` | use `run` to execute and `status` to inspect; there is no step-at-a-time native lifecycle |
|
|
885
|
-
| `akm workflow complete ...` | `akm workflow run ...` | native orchestration completes steps itself |
|
|
886
|
-
| `akm workflow brief` / `akm workflow report` | `akm workflow run <target>` | the experimental external-driver protocol was removed; `run` dispatches and records units itself |
|
|
887
|
-
| `akm workflow run <ref> --params '<json>'` | `akm workflow run <ref> --<param> <value> ...` | the JSON parameter bag is removed; repeat array flags or pass object/whole-array values as JSON |
|
|
888
|
-
| `akm extract --watch` / `--debounce-ms` | (removed) | use the shipped `core/extract.yml` cron template instead of a foreground daemon |
|
|
889
|
-
| `akm improve canary` / `--refresh` | `bun scripts/refresh-canary-set.ts [--refresh]` | maintainer tooling, run from a source checkout — helper scripts are not shipped in the npm package or binaries |
|
|
890
|
-
| `akm config show` | `akm config list` | `show` was a self-declared alias |
|
|
891
|
-
| `akm config validate` | (removed) | load-time schema checks already reject an invalid config |
|
|
892
|
-
| `akm index --background` | (removed) | the flag never actually backgrounded the process |
|
|
893
|
-
| `akm setup --detect-only` / `--reset-recommended` | (removed) | environment detection runs inside `akm setup`; `akm info` reports the *configured* capabilities, not a detection scan |
|
|
894
|
-
| `akm env set` / `akm env unset` | (removed) | edit the `.env` file directly, or ingest one with `env create --from-file` |
|
|
895
|
-
| `--source` on `search` / `curate` | `--from` | value rename too: `stash` → `local`, `both` → `all` |
|
|
896
|
-
| `--target` on `remember` / `clone` / `improve` / `task add`/`run`/`sync`/`history` | `--bundle` | `import`, `proposal accept`/`diff`/`revert`, `env create`/`remove`, and `secret set` **keep** `--target` |
|
|
897
|
-
| `AKM_STASH_DIR` | `AKM_BUNDLE_DIR` | no fallback to the old name |
|
|
898
|
-
| JSON field `stashDir` | `bundleDir` | in command results (`akm info`, `akm bundle create`, `akm config path --all`'s `stash` key → `bundle`); internal DB columns and type names are unaffected |
|
|
899
|
-
| "stash" wording in help text, hints, and docs | "bundle" | user-visible surface only — internal identifiers, DB schema, and historical CHANGELOG/release-notes text are unaffected |
|
|
900
|
-
|
|
901
|
-
**Scheduler ABI respelling.** Installed cron/launchd/schtasks entries invoke
|
|
902
|
-
`akm task run <id> ... --scheduled` (previously a `tasks` spelling on some
|
|
903
|
-
installs). `akm task sync` detects an entry whose argv no longer parses under
|
|
904
|
-
the current spelling — treating it as an orphan of its marker id — and
|
|
905
|
-
reinstalls it from the current file state. Run `akm task sync --rebind` once
|
|
906
|
-
after upgrading to 0.9.0 to explicitly capture the current binary/invocation
|
|
907
|
-
in every installed scheduler entry; see [§1](#1-cross-the-boundary-akm-migrate-status--akm-migrate-apply).
|
|
908
|
-
|
|
909
|
-
### Safety guards added in 0.8 (behavior change for non-interactive callers)
|
|
910
|
-
|
|
911
|
-
Two previously-unguarded destructive paths confirm before acting. **Scripts
|
|
912
|
-
that invoke these non-interactively must add `-y` / `--yes`:**
|
|
913
|
-
|
|
914
|
-
- `akm registry remove <name>` — prompts before removing the registry; pass `-y`
|
|
915
|
-
to skip. Non-interactive use without `-y` aborts.
|
|
916
|
-
- `akm proposal accept --generator <g>` (the **bulk** form) — prompts before
|
|
917
|
-
promoting every matching proposal. Single-id accept is unchanged (revertable).
|
|
918
|
-
|
|
919
|
-
### Proposal triage replaces the `process-proposals` prompt task
|
|
920
|
-
|
|
921
|
-
Move a 0.8 triage process into the selected 0.9 improve strategy. The folded
|
|
922
|
-
pre-pass remains the recommended shape:
|
|
923
|
-
|
|
924
|
-
```jsonc
|
|
925
|
-
{
|
|
926
|
-
"improve": {
|
|
927
|
-
"strategies": {
|
|
928
|
-
"default": {
|
|
929
|
-
"processes": {
|
|
930
|
-
"triage": {
|
|
931
|
-
"enabled": true,
|
|
932
|
-
"applyMode": "queue",
|
|
933
|
-
"policy": "personal-stash"
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
```
|
|
941
|
-
|
|
942
|
-
If a separate schedule is required, replace the old agent prompt task with a
|
|
943
|
-
strict task YAML v2 command:
|
|
944
|
-
|
|
945
|
-
```yaml
|
|
946
|
-
version: 2
|
|
947
|
-
schedule: "20 * * * *"
|
|
948
|
-
command: akm proposal drain --policy personal-stash --yes
|
|
949
|
-
enabled: true
|
|
950
|
-
name: Drain AKM proposal queue
|
|
951
|
-
```
|
|
952
|
-
|
|
953
|
-
Task files live in your stash. Migration rewrites only legacy workflow-target
|
|
954
|
-
ref scalars; it does not convert an arbitrary prompt task into this command. The
|
|
955
|
-
deterministic `akm proposal drain` verb, or the folded strategy pre-pass, is the
|
|
956
|
-
supported 0.9 path.
|
|
957
|
-
|
|
958
|
-
### Single batch-at-boundary git commit
|
|
959
|
-
|
|
960
|
-
0.9.0 unifies the two commit models for git-backed sources onto a single
|
|
961
|
-
**batch-at-boundary** model (issue #507). Previously, writing an asset to a
|
|
962
|
-
writable git `--target` committed (and optionally pushed) **per asset**, gated
|
|
963
|
-
on `options.pushOnCommit`. That staged only the single asset file (leaving
|
|
964
|
-
`.akm/` state dirty) and produced one noisy commit per asset.
|
|
965
|
-
|
|
966
|
-
Now every write/delete to a source is a plain filesystem operation with **no**
|
|
967
|
-
per-asset commit. Git-backed targets are committed **once** at the end of the
|
|
968
|
-
operation (e.g. `akm remember --bundle <git-source>`, proposal accept/revert,
|
|
969
|
-
consolidate) as a single complete commit (`git add -A` staging `.akm/` + assets
|
|
970
|
-
together), pushed under the same `writable + remote` gate as `akm save`/`akm sync`.
|
|
971
|
-
|
|
972
|
-
**Migration:** `options.pushOnCommit` is rejected at config load. Remove it
|
|
973
|
-
from your source config and rely on `writable: true` (plus a configured remote)
|
|
974
|
-
to push. A writable git target with a remote is still pushed; a target without
|
|
975
|
-
a remote (or with push disabled) commits only.
|
|
976
|
-
|
|
977
|
-
## Engine And Task Assets
|
|
978
|
-
|
|
979
|
-
Replace `profiles.llm.<name>` and `profiles.agent.<name>` with one
|
|
980
|
-
`engines.<name>` map. Replace `defaults.llm`, `defaults.agent`, and
|
|
981
|
-
`defaults.improve` with `defaults.llmEngine`, `defaults.engine`, and
|
|
982
|
-
`defaults.improveStrategy`. Replace `profiles.improve.<name>` with
|
|
983
|
-
`improve.strategies.<name>`, process `mode`/`profile` with `engine`, and CLI
|
|
984
|
-
`--profile` with `--strategy` for improve or `--engine` for execution.
|
|
985
|
-
|
|
986
|
-
Do not reuse a colliding LLM and agent profile name without deciding which new
|
|
987
|
-
engine names make the distinction clear. AKM cannot safely infer that choice.
|
|
988
|
-
|
|
989
|
-
Task files use strict YAML v2. During `migrate apply`, valid 0.8 task files are
|
|
990
|
-
rewritten on disk to v2. The standalone migrator canonicalizes workflow refs,
|
|
991
|
-
moves prompt `profile:` to `engine:`, normalizes permissive scalar forms, maps
|
|
992
|
-
bare-current-AKM `improve --profile` to `--strategy`, and removes the retired
|
|
993
|
-
`--auto-accept` argument. The 0.9 runtime does not read v1 task files:
|
|
994
|
-
|
|
995
|
-
```yaml
|
|
996
|
-
version: 2
|
|
997
|
-
schedule: "@daily"
|
|
998
|
-
prompt: Review the previous day's changes.
|
|
999
|
-
engine: reviewer
|
|
1000
|
-
model: claude-sonnet-4-6
|
|
1001
|
-
timeoutMs: 600000
|
|
1002
|
-
enabled: true
|
|
87
|
+
akm migrate apply
|
|
1003
88
|
```
|
|
1004
89
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
keys are errors in v2. Unsupported versions are reported by current task
|
|
1008
|
-
commands. Migration changes only removed AKM spellings; arbitrary shell
|
|
1009
|
-
commands are never rewritten.
|
|
1010
|
-
|
|
1011
|
-
A workflow task now invokes the same native orchestration as `akm workflow
|
|
1012
|
-
run`: it executes to completion, failure, or verification rejection rather
|
|
1013
|
-
than merely creating a run row. Review scheduled workflow tasks for the
|
|
1014
|
-
resulting execution and cost impact before re-enabling the scheduler.
|
|
1015
|
-
|
|
1016
|
-
For 0.8 command tasks, syntax migration and self-invocation routing are separate.
|
|
1017
|
-
`--profile` is lowered only for a PATH-selected bare `akm`/`akm.exe`, including
|
|
1018
|
-
when it follows supported `env` options and assignments. The scanner recognizes
|
|
1019
|
-
citty-valid global forms before `improve`, including `--no-quiet`,
|
|
1020
|
-
`--no-verbose`, `--quiet=false`, `--verbose=false`, and value options such as
|
|
1021
|
-
`--format json`. An explicit `./akm`, `/opt/vendor/akm`, or other executable path
|
|
1022
|
-
is operator-owned: it keeps selecting that exact binary and its command argv is
|
|
1023
|
-
retained exactly. In particular, AKM does not change syntax sent to a retained
|
|
1024
|
-
0.8 binary. Version-2 commands receive no compatibility rewriting.
|
|
90
|
+
Each changed file is validated, backed up immediately before replacement, and
|
|
91
|
+
atomically replaced. `akm migrate` does not alter config or databases.
|
|
1025
92
|
|
|
1026
|
-
|
|
1027
|
-
enabled and ran `akm db backups`, but that command only listed snapshots; it did
|
|
1028
|
-
not create a recurring backup. The standalone migrator disables the exact bare
|
|
1029
|
-
`akm db backups` task while preserving its command for operator review. An
|
|
1030
|
-
explicit executable path is operator-owned and is not changed. Replace or remove
|
|
1031
|
-
the disabled task; use `akm-migrate backup --for 0.9.0` for an explicit migration
|
|
1032
|
-
recovery snapshot. Existing 0.8 data-directory backup folders are left
|
|
1033
|
-
untouched.
|
|
1034
|
-
|
|
1035
|
-
Task `enabled` state controls scheduler-originated execution, not explicit
|
|
1036
|
-
operator invocation. `akm task run <id>` intentionally runs a disabled task so
|
|
1037
|
-
manual catch-up definitions remain useful. Backend-generated invocations carry
|
|
1038
|
-
the internal `--scheduled` marker and record a `disabled` result without running
|
|
1039
|
-
the target. Do not use the manual command as a scheduler replacement.
|
|
1040
|
-
|
|
1041
|
-
Canonical task IDs contain only letters, digits, dots, underscores, and dashes,
|
|
1042
|
-
start with a letter or digit, are at most 228 characters, omit `.yml`/`.yaml`,
|
|
1043
|
-
and cannot use Windows device aliases such as `CON`, `NUL`, `COM1`, or `LPT1`
|
|
1044
|
-
(including aliases followed by a dot). The 228-character limit is the final
|
|
1045
|
-
portable bound after scheduler and filename overhead. These portability checks
|
|
1046
|
-
apply on every platform. For command-line compatibility only, a trailing
|
|
1047
|
-
lowercase `.yml` or legacy `.md` is stripped from an ID; a filename discovered
|
|
1048
|
-
under `tasks/` must already be canonical and is never renamed. Sync skips a
|
|
1049
|
-
non-portable file and disables any matching installed entry rather than guessing
|
|
1050
|
-
a replacement ID.
|
|
1051
|
-
|
|
1052
|
-
Canonical migration preserves 0.8 `state.db` task-history rows and their log
|
|
1053
|
-
paths. One historical detail cannot be recovered: published 0.8.14 stored
|
|
1054
|
-
command-task history with `target_kind=prompt`. Because the durable row contains
|
|
1055
|
-
no command marker, 0.9 preserves and exposes it as legacy prompt history rather
|
|
1056
|
-
than inventing a command classification. New runs use the correct target kind.
|
|
1057
|
-
|
|
1058
|
-
## 5. Troubleshooting
|
|
1059
|
-
|
|
1060
|
-
### Database is busy
|
|
1061
|
-
|
|
1062
|
-
Close every other `akm` process, including schedulers, workflow runs, and
|
|
1063
|
-
background improve jobs, then re-run `akm migrate apply`. Apply holds the
|
|
1064
|
-
maintenance barrier and refuses to begin while known database handles, process
|
|
1065
|
-
locks, or workflow claims are active.
|
|
1066
|
-
|
|
1067
|
-
### Resuming after a crash
|
|
1068
|
-
|
|
1069
|
-
If `akm migrate apply` is interrupted (killed, host crash, power loss), do not
|
|
1070
|
-
manually edit or delete anything under `$DATA`. Run `akm migrate status` to
|
|
1071
|
-
confirm that an incomplete apply is present, then re-run `akm migrate apply`.
|
|
1072
|
-
The sentinel already contains the original target and path base, so `--config`
|
|
1073
|
-
is not needed on a retry. Apply reuses the same verified backup and operation ID,
|
|
1074
|
-
reruns every idempotent transform, verifies final outcomes, and removes the
|
|
1075
|
-
sentinel. A malformed sentinel fails closed for operator diagnosis.
|
|
1076
|
-
|
|
1077
|
-
### Restoring migration control state
|
|
1078
|
-
|
|
1079
|
-
Stop scheduled AKM jobs and all running `akm improve`, `akm extract`, and
|
|
1080
|
-
workflow engine processes first. Restore refuses while a live process lock or
|
|
1081
|
-
workflow lease exists. Then, while still running the 0.9 binary, restore the
|
|
1082
|
-
pre-cutover config and database snapshot:
|
|
93
|
+
### 5. Rebuild and reactivate
|
|
1083
94
|
|
|
1084
95
|
```sh
|
|
1085
|
-
akm
|
|
96
|
+
akm index
|
|
97
|
+
akm task doctor
|
|
98
|
+
akm task sync
|
|
99
|
+
akm health
|
|
1086
100
|
```
|
|
1087
101
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
destination, removes stale SQLite sidecars, and publishes the config last. If
|
|
1092
|
-
interrupted, ordinary config and canonical database access remain blocked and
|
|
1093
|
-
the next recovery repeats the same replacements from the selected backup until
|
|
1094
|
-
semantic verification passes. The selected and rescue runs remain under
|
|
1095
|
-
`$DATA`; if verification reports corruption, preserve them and recover from an
|
|
1096
|
-
independent backup.
|
|
102
|
+
Review the scheduler plan before activation. Use `task sync --rebind` only when
|
|
103
|
+
you intentionally want the current installation to take ownership of an
|
|
104
|
+
existing scheduler entry.
|
|
1097
105
|
|
|
1098
|
-
|
|
1099
|
-
plans are retained; sidecar/frontmatter rewrites are inherently idempotent, and
|
|
1100
|
-
task rewrites are re-planned on each apply. Restore replaces config and databases
|
|
1101
|
-
only. Already-migrated content stays in its forward-compatible form so a later
|
|
1102
|
-
0.9 apply can converge without undoing filesystem changes.
|
|
106
|
+
## Workflow boundary
|
|
1103
107
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
the same cap is rejected before any apply sentinel or artifact mutation.
|
|
108
|
+
Current Markdown and GitHub-shaped YAML workflows compile to the same source
|
|
109
|
+
IR and freeze durable plan IR v4. Durable v4 is the only executable stored
|
|
110
|
+
plan. Do not copy an old workflow database expecting old runs to resume; start
|
|
111
|
+
new runs from current authored sources.
|
|
1109
112
|
|
|
1110
|
-
|
|
1111
|
-
already use 0.9 task and ref formats. Restore is a control-state recovery step for
|
|
1112
|
-
a later 0.9 apply, not an in-place downgrade. To run 0.8 again, recover config,
|
|
1113
|
-
databases, and writable content from an independent pre-cutover backup, or create
|
|
1114
|
-
a separate 0.8 data/config/content root and reconstruct it manually.
|
|
113
|
+
## Recovery
|
|
1115
114
|
|
|
1116
|
-
|
|
115
|
+
If the new setup is wrong, stop AKM, move the new current directories aside,
|
|
116
|
+
and restore the archived 0.8 installation with its matching 0.8 executable.
|
|
117
|
+
Do not mix old executable code with current state or current executable code
|
|
118
|
+
with old state.
|
|
1117
119
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
ordered migration ledgers, and semantic state. `akm-migrate backup --for 0.9.0`
|
|
1122
|
-
creates an additional unique run when an operator wants a manual snapshot
|
|
1123
|
-
outside of `apply`'s automatic one.
|
|
120
|
+
For the task-v3 format and the narrower 0.9.1-to-0.9.2 transition, see
|
|
121
|
+
[Tasks](../reference/tasks.md) and
|
|
122
|
+
[Migrating from 0.9.1 to 0.9.2](v0.9.1-to-v0.9.2.md).
|