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
package/STABILITY.md
CHANGED
|
@@ -12,6 +12,47 @@ out in the CHANGELOG with a migration note. The 0.10.x series returns to bug
|
|
|
12
12
|
fixes and tuning, and aims to restore the normal discipline of breaking
|
|
13
13
|
changes only in major and minor releases.
|
|
14
14
|
|
|
15
|
+
**Version floor (0.10, #1091).** 0.10 reads what 0.9.15 and later wrote: config,
|
|
16
|
+
`state.db`, task sources, frozen workflow plans and scheduler rows. It does not
|
|
17
|
+
convert anything older. An install on an earlier release runs `akm migrate
|
|
18
|
+
apply` under akm 0.9.x first, then upgrades; a 0.10 reader that meets an older
|
|
19
|
+
shape refuses with one message saying so. See
|
|
20
|
+
[`docs/architecture/persisted-data-compat.md`](docs/architecture/persisted-data-compat.md).
|
|
21
|
+
|
|
22
|
+
**CLI spellings merged in 0.10 (#1091).** Each of these is an unknown flag or
|
|
23
|
+
command (exit 2) from 0.10, with no alias and no deprecation period; the new
|
|
24
|
+
spelling is in the CHANGELOG entry and the CLI reference.
|
|
25
|
+
|
|
26
|
+
| Gone | Use |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `akm help agents` | `akm hints` (`--detail brief` for the short guide) |
|
|
29
|
+
| `--shape agent` | `--detail agent` |
|
|
30
|
+
| `--shape summary` | `--detail brief` (it only had a projection on `akm show`) |
|
|
31
|
+
| `--target` on `import`, `env create`, `env remove`, `secret set`, `proposal accept`, `proposal diff`, `proposal revert` | `--bundle` |
|
|
32
|
+
| `akm task validate <path>` | `akm lint --type tasks` |
|
|
33
|
+
| `akm config path --all` | `akm info` |
|
|
34
|
+
| `--run` / `--since` on `akm improve` | `akm improve report --run` / `--since` |
|
|
35
|
+
|
|
36
|
+
**Version numbers (0.10 onward, #1089).** A 0.10 release is numbered
|
|
37
|
+
`0.10.YYMMNN`: `YY` the UTC year, `MM` the month (`01` to `12`) and `NN` the
|
|
38
|
+
release within that month (`01` to `99`), each two digits. Every release takes
|
|
39
|
+
the next `NN`, whatever its stage: the first release of 2026-10 is `0.10.261001`
|
|
40
|
+
(or `0.10.261001-alpha`), the next `0.10.261002`. A prerelease carries its stage
|
|
41
|
+
only: `-alpha`, `-beta` or `-rc`, with no `.N`. A build is not promoted through
|
|
42
|
+
stages under one number: each stage is its own release. Prereleases publish to
|
|
43
|
+
the npm `next` tag and stable releases to `latest`; `akm upgrade --next` follows
|
|
44
|
+
`next`. Versions sort by month and then `NN`, so semver ranges and `akm upgrade`
|
|
45
|
+
order them correctly across months and years. The patch number no longer says
|
|
46
|
+
how big a change is: read the CHANGELOG, which still marks breaking changes. The
|
|
47
|
+
0.9 line keeps `0.9.N`, and `0.11` restarts on the same scheme.
|
|
48
|
+
|
|
49
|
+
The 0.10 daily alphas (`0.10.26101001-alpha` through `0.10.26101202-alpha`) used
|
|
50
|
+
an 8-digit patch, `YYMMDDNN`. Semver compares the patch numerically, so every
|
|
51
|
+
`0.10.YYMMNN` sorts below them and `akm upgrade` does not offer it from a daily
|
|
52
|
+
alpha: install the first monthly release explicitly once (for example
|
|
53
|
+
`npm install -g akm-cli@0.10.261001-beta`). This is a known, accepted break and
|
|
54
|
+
`tests/semver-order.test.ts` pins it.
|
|
55
|
+
|
|
15
56
|
This document classifies **every** user-facing surface by stability so you can
|
|
16
57
|
decide which parts of `akm` are safe to script against today and which to
|
|
17
58
|
treat as still-evolving. If a surface is not listed here, that is a bug —
|
|
@@ -87,6 +128,8 @@ enumeration of the whole `proposal` noun group.
|
|
|
87
128
|
| `akm models` | Evolving | `list` and `copy-defaults` for model intent aliases. |
|
|
88
129
|
| `akm lint` | Evolving | |
|
|
89
130
|
| `akm improve` | Evolving | Review-first by default; mutating lanes require `experimental.improveAutonomy` — see below. |
|
|
131
|
+
| `akm improve report` | Evolving | Subcommand since 0.10 (was a magic `scope` value); owns `--run` and `--since`. |
|
|
132
|
+
| `akm improve judge` | Evolving | Subcommand since 0.10 (was a magic `scope` value); reads one revision as JSON on stdin and writes nothing. |
|
|
90
133
|
| `akm proposal list` | Stable | See reconciliation note above. |
|
|
91
134
|
| `akm proposal show` | Evolving | |
|
|
92
135
|
| `akm proposal diff` | Evolving | |
|
|
@@ -95,10 +138,9 @@ enumeration of the whole `proposal` noun group.
|
|
|
95
138
|
| `akm proposal reopen` | Evolving | New in 0.9.19; undoes a rejection. |
|
|
96
139
|
| `akm proposal revert` | Evolving | |
|
|
97
140
|
| `akm proposal drain` | Evolving | |
|
|
98
|
-
| `akm proposal extract` |
|
|
141
|
+
| `akm proposal extract` | Evolving | Former top-level `akm extract`. Promoted from Experimental in 0.10 (#1133): the extract eval measures it. Evolving, not Stable, because 0.10 is still settling the improve defaults. |
|
|
99
142
|
| `akm proposal new` | Evolving | Former top-level `akm propose`. |
|
|
100
143
|
| `akm help` | Stable | |
|
|
101
|
-
| `akm help agents` | Stable | |
|
|
102
144
|
| `akm help migrate` | Stable | Only renders release notes. |
|
|
103
145
|
| `akm hints` | Stable | Format-exempt agent guide; `--detail brief` selects the compact version. |
|
|
104
146
|
| `akm completions` | Stable | Format-exempt (emits shell script source). |
|
|
@@ -117,8 +159,6 @@ enumeration of the whole `proposal` noun group.
|
|
|
117
159
|
| `akm task sync` | Evolving | |
|
|
118
160
|
| `akm task doctor` | Evolving | |
|
|
119
161
|
| `akm task explain` | Evolving | New in 0.9.2; secret-shaped values in provenance output are redacted on a best-effort heuristic basis (not a guarantee). |
|
|
120
|
-
| `akm task validate` | Evolving | New in 0.9.11; read-only, and the only `task` subcommand that takes a bare filesystem path instead of a ref — the file need not belong to any configured bundle. |
|
|
121
|
-
| `akm task list` | Evolving | New in 0.9.15 (#951); a pure delegating alias for `akm search --type task` — same envelope, no separate implementation. |
|
|
122
162
|
|
|
123
163
|
## Stable
|
|
124
164
|
|
|
@@ -157,7 +197,7 @@ enumeration of the whole `proposal` noun group.
|
|
|
157
197
|
- **Read commands** — `akm search`, `akm show`, `akm bundle list`, `akm curate`,
|
|
158
198
|
`akm info`, `akm config get`, `akm config list`, `akm config path`,
|
|
159
199
|
`akm env list`, `akm secret list`, `akm proposal list` (list filters),
|
|
160
|
-
`akm help`, `akm
|
|
200
|
+
`akm help`, `akm hints`, `akm completions`.
|
|
161
201
|
- **Write commands core surface** — `akm bundle add`, `akm bundle update`,
|
|
162
202
|
`akm bundle remove`, `akm clone`, `akm import`, `akm sync`, `akm index`,
|
|
163
203
|
`akm bundle create`, `akm setup`, `akm remember`, `akm feedback`,
|
|
@@ -195,12 +235,11 @@ enumeration of the whole `proposal` noun group.
|
|
|
195
235
|
fetch**: a registered renderer fires on the shape of the result (`akm health
|
|
196
236
|
--report` carries the report dataset in the envelope, so the same data is
|
|
197
237
|
available as JSON), never on the format alone.
|
|
198
|
-
`--detail` is
|
|
199
|
-
|
|
200
|
-
Experimental). A small set of commands is **format-exempt** because their
|
|
238
|
+
`--detail` is `brief|normal|full` (verbosity) or `agent` (the projection of
|
|
239
|
+
`search`, `curate` and `show`; see Experimental). A small set of commands is **format-exempt** because their
|
|
201
240
|
output is not a result envelope at all: `completions` (shell script source),
|
|
202
241
|
child-process passthrough in `env run` / `secret run`, a bare-path payload
|
|
203
|
-
from `env path`, and document payloads from `help` (bare
|
|
242
|
+
from `env path`, and document payloads from `help` (bare and
|
|
204
243
|
`help migrate`). The set is declared in
|
|
205
244
|
`src/output/format-exempt.ts`, and
|
|
206
245
|
passing `--format` to one of them warns rather than silently doing something
|
|
@@ -250,6 +289,7 @@ remain available across minor releases, but flag names, prompts, and
|
|
|
250
289
|
proposal-queue shape may shift. Breaking changes will be flagged in the
|
|
251
290
|
CHANGELOG with a migration note.
|
|
252
291
|
|
|
292
|
+
- **Programmatic API** — `akm-cli/api` (`curate()`, for in-process recall by the akm plugins; see [`docs/reference/api.md`](docs/reference/api.md)). The export list only grows and `curate()`'s parameters and result keep their documented contract; the text it returns is `akm curate`'s agent-shaped output and changes with it. Everything else in the package remains CLI-only.
|
|
253
293
|
- **Improvement loop** — `akm improve` and the proposal noun group
|
|
254
294
|
`akm proposal {extract,new,list,show,diff,accept,reject,reopen,revert,drain}`
|
|
255
295
|
(`extract` and `new` are the former top-level `akm extract`/`akm propose`,
|
|
@@ -259,14 +299,15 @@ CHANGELOG with a migration note.
|
|
|
259
299
|
default and is **review-first**: the lanes that mutate assets without review
|
|
260
300
|
require `experimental.improveAutonomy` — see
|
|
261
301
|
[`akm improve` autonomy](#akm-improve-autonomy--opt-in-in-090).
|
|
262
|
-
`--auto-accept` was removed in 0.9.0
|
|
263
|
-
|
|
264
|
-
replacement, and the space-separated form (`--auto-accept 90`) no longer
|
|
265
|
-
poisons the asset-type positional — its value is discarded with a second
|
|
266
|
-
warning instead of silently reducing the run to a zero-match no-op. It
|
|
267
|
-
becomes a hard error in 0.10. The replacement is
|
|
302
|
+
`--auto-accept` was removed in 0.9.0 and is an unknown flag (a usage error,
|
|
303
|
+
exit 2) since 0.10. The replacement is
|
|
268
304
|
`akm improve && akm proposal drain --promote --yes`, or a `triage` block
|
|
269
305
|
with `applyMode: "promote"` in your strategy.
|
|
306
|
+
**Session extraction** (`akm proposal extract` and the improve `extract`
|
|
307
|
+
process) is Evolving as of 0.10 (#1133): the extract eval (insights saved,
|
|
308
|
+
routine sessions left empty, planted instructions refused) is its gate. It
|
|
309
|
+
is Evolving, not Stable, because 0.10 is still settling the improve
|
|
310
|
+
defaults; what it extracts and its output may still be tuned.
|
|
270
311
|
- **Tasks** — `akm task` subcommand surface (`add | run | sync | doctor |
|
|
271
312
|
history | explain | validate`; no alias, no
|
|
272
313
|
`list`/`remove`/`init`/`enable`/`disable`); task source v4 YAML (typed
|
|
@@ -282,14 +323,7 @@ CHANGELOG with a migration note.
|
|
|
282
323
|
construction** (the excluded data never reaches the command). `akm task
|
|
283
324
|
explain` instead **redacts** secret-shaped input values on a best-effort
|
|
284
325
|
heuristic basis — a value that doesn't match the heuristic can still
|
|
285
|
-
print unredacted.
|
|
286
|
-
kind of zero-write introspection as `explain`, but takes a bare filesystem
|
|
287
|
-
path rather than a bundle-qualified ref — it reports whether that ONE file
|
|
288
|
-
would parse cleanly (`valid`), need `akm migrate apply` first (`blocked`:
|
|
289
|
-
task v2/v3, or a retired `schedule[].enabled`),
|
|
290
|
-
fail schema validation (`invalid`), or isn't a task source at all
|
|
291
|
-
(`not-a-task`) — exactly the diagnostic `akm task sync` would produce for
|
|
292
|
-
it, before the file is ever wired into a bundle or the scheduler.
|
|
326
|
+
print unredacted.
|
|
293
327
|
- **Workflow plan** — `akm workflow plan <ref>`, new in 0.9.2: zero-write
|
|
294
328
|
compile+freeze introspection (the canonical step graph, task/child
|
|
295
329
|
expansion, input bindings, and lowering notices for a workflow, without
|
|
@@ -300,7 +334,7 @@ CHANGELOG with a migration note.
|
|
|
300
334
|
both removed; `log` is now a leaf command — the former `list` surface).
|
|
301
335
|
- **Bundles & the workspace model** — installed sources are *bundles*; each is
|
|
302
336
|
recognized by a built-in *adapter* (native Agent Skills, Claude and OpenCode
|
|
303
|
-
commands/agents, knowledge,
|
|
337
|
+
commands/agents, knowledge, workflows, tasks, env/secret files, scripts,
|
|
304
338
|
OKF and LLM-wiki knowledge bases). Config is keyed by `bundles` and
|
|
305
339
|
`defaultBundle`. The adapter set, bundle-recognition rules, and the
|
|
306
340
|
`bundles` config shape may still shift; the `okf`, `llm-wiki` and
|
|
@@ -324,9 +358,14 @@ CHANGELOG with a migration note.
|
|
|
324
358
|
`claude`, `opencode-sdk` (the primary OpenCode interface), `codex`, and the
|
|
325
359
|
`opencode` CLI path, `copilot`, `pi`, `gemini`, `aider`, `amazonq`,
|
|
326
360
|
`openhands`. Every harness is Evolving: the harness implementation is being
|
|
327
|
-
reworked so harnesses are easy to add, remove and update (0.10)
|
|
328
|
-
|
|
329
|
-
|
|
361
|
+
reworked so harnesses are easy to add, remove and update (0.10). The set will
|
|
362
|
+
grow.
|
|
363
|
+
**Deprecated:** the `opencode` CLI dispatch path (an agent engine with
|
|
364
|
+
`platform: "opencode"`, which runs `opencode run` per call). It still works on
|
|
365
|
+
OpenCode 1 and 2 throughout 0.10; use an `opencode-sdk` engine instead, which
|
|
366
|
+
covers it, including a default agent (#1098). It may be removed in 0.11 or
|
|
367
|
+
later. The rest of the OpenCode integration (session-log import, config
|
|
368
|
+
import) is not deprecated.
|
|
330
369
|
- **Model aliases** — `akm models list|copy-defaults` and the intent-alias
|
|
331
370
|
defaults they expose.
|
|
332
371
|
- **Proposal queue** — quality classifications (`accepted`, `pending`,
|
|
@@ -357,16 +396,19 @@ for scripted use.
|
|
|
357
396
|
workflow engine are Experimental from 0.9.28 and throughout 0.10. The 0.10
|
|
358
397
|
series stabilizes the feature and trims what is not useful, then either
|
|
359
398
|
promotes it out of Experimental or removes it if stabilization does not
|
|
360
|
-
produce a quality feature.
|
|
399
|
+
produce a quality feature. **Child workflows** (`unit: { workflow: … }`, a
|
|
400
|
+
step that runs another workflow and returns its last step's output) are the
|
|
401
|
+
least settled part and are kept only in that simple form; `akm workflow list
|
|
402
|
+
--children` goes with them.
|
|
361
403
|
- **`akm metrics`** — new in 0.9.28. What it reports, its JSON shape and the
|
|
362
404
|
`--format html` dashboard may change in any release; do not script against
|
|
363
405
|
them.
|
|
364
406
|
- **`lesson` asset type** — schema (`when_to_use`, `description`) is
|
|
365
407
|
stable, but lesson-distillation triggers and ranking are tuning targets.
|
|
366
|
-
- **`--
|
|
367
|
-
(
|
|
368
|
-
|
|
369
|
-
|
|
408
|
+
- **`--detail agent`** — the agent projection, implemented on `search`, `show`,
|
|
409
|
+
and `curate` (other commands ignore it). Coverage will expand. It replaces
|
|
410
|
+
`--shape agent`; `--shape` (and `--shape summary`, which only `show` had) is
|
|
411
|
+
gone in 0.10 and is an unknown flag.
|
|
370
412
|
- **Protected env & secret values** — `env` (a whole `.env` group; key names
|
|
371
413
|
are surfaced for discoverability, values never are) and `secret` (a single
|
|
372
414
|
sensitive value). Values are never written to stdout, the index, or
|
|
@@ -378,14 +420,11 @@ for scripted use.
|
|
|
378
420
|
contradiction edges, and the consolidate journal are observable but
|
|
379
421
|
the algorithm that writes them is tuning across patch releases.
|
|
380
422
|
- **Improve built-in strategies and lanes** — the built-in strategies other
|
|
381
|
-
than `default` and `consolidate`
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
- **Session extraction** — `akm proposal extract` and the `extract` process:
|
|
385
|
-
what it extracts, its quality gates and its output may change while 0.10
|
|
386
|
-
measures it (#1094).
|
|
423
|
+
than `default` and `consolidate` and the proactive-maintenance lane. 0.10 measures each and keeps, folds or removes it
|
|
424
|
+
(#1094). `quick`, `reflect-distill`, `thorough` and `catchup` were removed
|
|
425
|
+
in 0.10 (#1130), as were `proactive-maintenance` and the high-salience lane (#1129); a user-defined strategy of the same name keeps working.
|
|
387
426
|
- **Improve tuning config** — `improve.strategies.*.processes.*` (per-process
|
|
388
|
-
engines, limits, gates, and the
|
|
427
|
+
engines, limits, gates, and the CLS knobs) and
|
|
389
428
|
the `index.*` per-pass config. The 0.9.x series is explicitly still settling
|
|
390
429
|
the design of the improve processes, so **keys in these two families may be
|
|
391
430
|
added, renamed, or dropped in any 0.9.x or 0.10.x release**. The `akm
|
|
@@ -401,7 +440,8 @@ mutate assets *without* review require an explicit opt-in:
|
|
|
401
440
|
akm config set experimental.improveAutonomy true
|
|
402
441
|
```
|
|
403
442
|
|
|
404
|
-
Without it, these three lanes are downgraded
|
|
443
|
+
Without it, these three lanes are downgraded (the triage lane only when its
|
|
444
|
+
judgment tier is on), and each downgrade is **reported,
|
|
405
445
|
not silent**: it warns on stderr naming the lane and the key, appends an
|
|
406
446
|
`improve_skipped` event with `reason: "autonomy_gated"`, is counted in
|
|
407
447
|
`akm health`'s improve skip-reason summary, and is listed by `akm task doctor`
|
|
@@ -414,7 +454,13 @@ review-first config correctly shows `queue`.
|
|
|
414
454
|
| --- | --- | --- |
|
|
415
455
|
| `memoryInference` | Writes `.derived.md` children and rewrites parent frontmatter | disabled |
|
|
416
456
|
| memory cleanup | Belief-state frontmatter rewrites, archive moves | analyzed but not applied |
|
|
417
|
-
| `triage` `applyMode: "promote"` |
|
|
457
|
+
| `triage` `applyMode: "promote"` **with judgment on** | The judgment tier auto-accepts consolidate promotions into the bundle | downgraded to `queue` — triage still runs, it just does not auto-accept |
|
|
458
|
+
|
|
459
|
+
A deterministic-only `promote` (triage with judgment off) is **not** a gated
|
|
460
|
+
lane (#1143): the `default` strategy runs it without the opt-in, bounded by
|
|
461
|
+
`maxAcceptsPerRun` (200), through the same deterministic gates as
|
|
462
|
+
`akm proposal drain --promote`. Only a promote that turns the judgment tier on
|
|
463
|
+
needs `experimental.improveAutonomy`.
|
|
418
464
|
|
|
419
465
|
Consolidation remains enabled with autonomy off: both its passes (promotion,
|
|
420
466
|
and the pair pass's duplicate/subsumed/supersedes judging) only ever emit a
|
|
@@ -510,7 +556,7 @@ Shipped from that record: **D1** (`#fragment` section selection),
|
|
|
510
556
|
gone — `#fragment` is the only section selector), **D4** (conceptId /
|
|
511
557
|
`bundle//` prefix browse), **D5** (`akm bundle` removed), **D6** (open `type`
|
|
512
558
|
set at runtime), **D7** (all six `--format` values everywhere), **D8** (the
|
|
513
|
-
`experimental.improveAutonomy` gate), **D9** (`--auto-accept`
|
|
559
|
+
`experimental.improveAutonomy` gate), **D9** (`--auto-accept` removed, a hard error since 0.10),
|
|
514
560
|
and partially **D10** (an `akm-migrate` binary now exists, though the code still
|
|
515
561
|
lives in this repo). **D3** shipped too, in the end: `akm mv` was removed in
|
|
516
562
|
0.9.0 (see the Renames bullet above), with `scripts/rekey-asset-ref.ts` as the
|
|
@@ -518,21 +564,17 @@ Internal replacement for the one capability nothing else covered.
|
|
|
518
564
|
|
|
519
565
|
- **0.10 — `config set`/`config unset` may drop the config dump** in favor of
|
|
520
566
|
a compact `{ok, shape, key}` result; `akm config list` remains the full read.
|
|
521
|
-
- **0.10 — migration extraction.** The migration machinery
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
deliberately sequenced routing change, not unfinished behavior. See
|
|
533
|
-
[D12](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/0.9.0-decisions.md#d12--bundleadapterplacenew-stays-unwired-until-010)
|
|
534
|
-
for why it is scoped out of 0.9.0. Nothing user-visible changes in 0.10 for
|
|
535
|
-
this alone.
|
|
567
|
+
- **0.10 — migration extraction.** The migration machinery lives in its own
|
|
568
|
+
`akm-migrate` executable, which ships inside the `akm-cli` package next to
|
|
569
|
+
`akm` (no separate npm package). The task-source migrator (`task-to-v4.ts`,
|
|
570
|
+
`task-source-v3-frozen.ts`) lives with it under `scripts/akm-migrate/migrate/`,
|
|
571
|
+
out of `src/`.
|
|
572
|
+
- **0.11 or later — the `opencode` CLI dispatch path may be removed.**
|
|
573
|
+
Deprecated in 0.10 (see Agent dispatch under Evolving); `opencode-sdk`
|
|
574
|
+
engines replace it.
|
|
575
|
+
- **0.10 — `BundleAdapter.placeNew()` is removed.** Nothing called it; writes use AKM's fixed type→directory table.
|
|
576
|
+
Writable bundles in a non-akm layout would need per-adapter placement back
|
|
577
|
+
([#1163](https://github.com/itlackey/akm/issues/1163)).
|
|
536
578
|
- **1.0 contract freeze** — the `[bundle//]conceptId[#fragment]` ref grammar,
|
|
537
579
|
the supported source model, search behavior, and write-target rules are
|
|
538
580
|
frozen at 1.0. The SDK and in-process plugin story ship on top of that
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
|
|
5
|
+
// Node entry for `akm-cli/api` (the package `exports` map points the default
|
|
6
|
+
// condition here; the `bun` condition points straight at `api.js`).
|
|
7
|
+
//
|
|
8
|
+
// `api.js` reaches modules that embed `.md`/`.xml` assets through
|
|
9
|
+
// `with { type: "text" }` imports, which Node cannot load without the
|
|
10
|
+
// text-import hook. Those imports are static and hoisted, so the hook must be
|
|
11
|
+
// registered before `api.js` is evaluated: register it, then import `api.js`
|
|
12
|
+
// dynamically. Same reason as `cli-node.mjs`.
|
|
13
|
+
|
|
14
|
+
import { register } from "node:module";
|
|
15
|
+
|
|
16
|
+
register("./text-import-hook.mjs", import.meta.url);
|
|
17
|
+
|
|
18
|
+
const { curate } = await import("./api.js");
|
|
19
|
+
|
|
20
|
+
export { curate };
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
|
|
5
|
+
// Hand-written declarations for `akm-cli/api` (the build emits no .d.ts).
|
|
6
|
+
// tests/contracts/api-surface.test.ts keeps this file and src/api.ts in step.
|
|
7
|
+
|
|
8
|
+
export interface CurateOptions {
|
|
9
|
+
/** Maximum number of curated results (positive integer; the CLI default is 4). */
|
|
10
|
+
limit?: number;
|
|
11
|
+
/** Asset type filter, same as `--type`. */
|
|
12
|
+
type?: string;
|
|
13
|
+
/** Output format, same as `--format`. Default `"json"`, as in the CLI. */
|
|
14
|
+
format?: "text" | "json";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns exactly the stdout text of
|
|
19
|
+
* `akm --detail agent -q curate <query> [--limit N] [--type T] --format <format>`,
|
|
20
|
+
* including its trailing newline. Rejects with the error the CLI would fail
|
|
21
|
+
* with: its message, and its error code on the `code` property.
|
|
22
|
+
*/
|
|
23
|
+
export function curate(query: string, options?: CurateOptions): Promise<string>;
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
/**
|
|
5
|
+
* `akm-cli/api` — the one supported programmatic entry point. Everything else
|
|
6
|
+
* in this package is CLI-only. See docs/reference/api.md for the contract.
|
|
7
|
+
*
|
|
8
|
+
* Each export runs the same code path as its CLI command and computes the
|
|
9
|
+
* document the CLI would print, in-process: no child process, no write to
|
|
10
|
+
* stdout/stderr, no `process.chdir`, no change to the host's `process.env`,
|
|
11
|
+
* and no process-level output-mode, quiet or verbose state left changed.
|
|
12
|
+
*/
|
|
13
|
+
import { renderOutput } from "./cli/shared.js";
|
|
14
|
+
import { runCurate } from "./commands/read/search-cli.js";
|
|
15
|
+
import { loadConfig } from "./core/config/config.js";
|
|
16
|
+
import { UsageError } from "./core/errors.js";
|
|
17
|
+
import { withQuiet } from "./core/warn.js";
|
|
18
|
+
import { installLlmUsagePersistenceIfAbsent } from "./llm/usage-persist.js";
|
|
19
|
+
import { resolveOutputMode } from "./output/context.js";
|
|
20
|
+
import { stdoutText } from "./output/stdout.js";
|
|
21
|
+
/**
|
|
22
|
+
* Returns exactly the stdout text of
|
|
23
|
+
* `akm --detail agent -q curate <query> [--limit N] [--type T] --format <format>`
|
|
24
|
+
* including its trailing newline. Rejects with the error the CLI
|
|
25
|
+
* would fail with: its message, and its error code on the `code` property.
|
|
26
|
+
*/
|
|
27
|
+
export async function curate(query, options = {}) {
|
|
28
|
+
const format = options.format ?? "json";
|
|
29
|
+
if (format !== "text" && format !== "json") {
|
|
30
|
+
throw new UsageError(`Invalid value for --format: ${format}. Expected one of: json|text`, "INVALID_FORMAT_VALUE");
|
|
31
|
+
}
|
|
32
|
+
return withQuiet(async () => {
|
|
33
|
+
// Same startup order as the CLI: config first (an invalid config fails
|
|
34
|
+
// the call before anything runs), then the output mode from argv + config.
|
|
35
|
+
const mode = resolveOutputMode(["--detail", "agent", "--format", format], loadConfig().output ?? {});
|
|
36
|
+
const disposeLlmUsageSink = installLlmUsagePersistenceIfAbsent();
|
|
37
|
+
try {
|
|
38
|
+
const curated = await runCurate({ query, type: options.type, limit: options.limit === undefined ? undefined : String(options.limit) }, mode);
|
|
39
|
+
return stdoutText(renderOutput("curate", curated, { ...mode, format }));
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
disposeLlmUsageSink();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -23,8 +23,7 @@ akm search "team-catalog//" # List every item in one bundle
|
|
|
23
23
|
| `--from` | `local`, `registry`, `all`, or a configured bundle name | `local` |
|
|
24
24
|
| `--limit` | number | `20` |
|
|
25
25
|
| `--format` | `json`, `jsonl`, `text`, `yaml`, `md`, `html` | `json` |
|
|
26
|
-
| `--detail` | `brief`, `normal`, `full` | `brief` |
|
|
27
|
-
| `--shape` | `human`, `agent`, `summary` (`summary` only on `show`) | `human` |
|
|
26
|
+
| `--detail` | `brief`, `normal`, `full`, `agent` (`agent`: search, curate and show only) | `brief` |
|
|
28
27
|
|
|
29
28
|
Ref-prefix queries (a conceptId prefix ending in `/`, optionally bundle-qualified)
|
|
30
29
|
return a deterministic listing, not a relevance ranking. Drop the trailing slash
|
|
@@ -90,13 +89,13 @@ akm import ./doc.md --xref knowledge/auth-flow # Merge provenance xrefs into the
|
|
|
90
89
|
akm import ./new.md --supersedes knowledge/old # Import a correction AND demote the doc it replaces
|
|
91
90
|
akm import - --name scratch-notes < notes.md # Import stdin as a knowledge doc
|
|
92
91
|
akm import https://example.com/docs/auth # Fetch one URL and import it as knowledge
|
|
93
|
-
akm import ./doc.md --
|
|
92
|
+
akm import ./doc.md --bundle my-other-bundle # Route import to a named writable bundle source
|
|
94
93
|
akm workflow create ship-release # Create a workflow asset in the bundle
|
|
95
|
-
akm lint --type workflows # Parse and compile every
|
|
94
|
+
akm lint --type workflows # Parse and compile every workflow source; list every error
|
|
96
95
|
akm workflow run workflows/ship-release # Start or resume and execute the workflow
|
|
97
96
|
akm feedback skills/code-review --positive # Record that an asset helped (ranks it higher; no rewrite)
|
|
98
97
|
akm feedback agents/reviewer --negative --reason "says to run jest; the suite runs on vitest" # Content wrong or stale: lowers its ranking; improve may repair its frontmatter
|
|
99
|
-
akm feedback knowledge/opencode-server --negative --reason "the default port is 4096, not 8000" --replace "port 8000" --with "port 4096" --source "https://opencode.ai/docs/server/" #
|
|
98
|
+
akm feedback knowledge/opencode-server --negative --reason "the default port is 4096, not 8000" --replace "port 8000" --with "port 4096" --source "https://opencode.ai/docs/server/" # Apply an exact fix
|
|
100
99
|
akm feedback memories/deployment-notes --positive # Works for memories too
|
|
101
100
|
akm feedback env/prod --positive # Records env feedback without surfacing values
|
|
102
101
|
```
|
|
@@ -111,7 +110,7 @@ its description, title or `when_to_use` from your reason. A note that simply did
|
|
|
111
110
|
not fit your task is not negative feedback: record nothing for it. Improve does
|
|
112
111
|
not rewrite an asset's text: once you have verified the correct fact, attach the
|
|
113
112
|
exact fix with `--replace "<exact current text>" --with "<corrected text>"
|
|
114
|
-
--source "<URL, command or file>"`, which akm checks and
|
|
113
|
+
--source "<URL, command or file>"`, which akm checks and applies at once.
|
|
115
114
|
A note that is outdated can be marked with `--outdated`, or
|
|
116
115
|
`--superseded-by <ref>` when another note replaces it.
|
|
117
116
|
`--positive` records that an asset helped (it raises its ranking) and does not
|
|
@@ -176,9 +175,8 @@ akm secret run secrets/deploy-token GITHUB_TOKEN -- gh release create v1.0.0 #
|
|
|
176
175
|
|
|
177
176
|
## Workflows
|
|
178
177
|
|
|
179
|
-
Workflows live under `<bundle>/workflows/` as
|
|
180
|
-
|
|
181
|
-
the bounded GitHub-shaped YAML subset.
|
|
178
|
+
Workflows live under `<bundle>/workflows/` as `.md` sources; see
|
|
179
|
+
`docs/reference/workflow-schema.md` for the frontmatter and body syntax.
|
|
182
180
|
|
|
183
181
|
Ref-based workflow commands are scoped to the current project/worktree/directory,
|
|
184
182
|
so one active run does not block unrelated directories from starting the same
|
|
@@ -235,7 +233,6 @@ rename instead of starting fresh, run `bun scripts/rekey-asset-ref.ts <old-ref>
|
|
|
235
233
|
## Sync
|
|
236
234
|
|
|
237
235
|
Commit local changes in a git-backed bundle. Behaviour adapts automatically.
|
|
238
|
-
(`akm save` was the pre-0.8 spelling; it was removed in 0.9.0 — use `akm sync`.)
|
|
239
236
|
|
|
240
237
|
- **No `.git` directory** — no-op (silent skip)
|
|
241
238
|
- **Git repo, no remote** — stage and commit only (the default bundle always falls here)
|
|
@@ -255,15 +252,13 @@ akm sync my-skills -m "Update patterns" # Sync named bundle with message
|
|
|
255
252
|
The `--sync` / `--no-sync` and `--push` / `--no-push` flags control this:
|
|
256
253
|
|
|
257
254
|
```sh
|
|
258
|
-
akm improve # auto-sync per strategy default (
|
|
255
|
+
akm improve # auto-sync per strategy default (both strategies: on)
|
|
259
256
|
akm improve --no-sync # skip the end-of-run commit
|
|
260
257
|
akm improve --no-push # commit but skip push for this run
|
|
261
258
|
akm improve --sync # force sync even on strategies that disable it
|
|
262
259
|
```
|
|
263
260
|
|
|
264
|
-
Strategy sync defaults: `
|
|
265
|
-
`thorough` auto-commit + push; `proactive-maintenance` and `reflect-distill`
|
|
266
|
-
skip sync entirely. Override with `--sync` / `--no-sync` flags.
|
|
261
|
+
Strategy sync defaults: `consolidate` and `default` auto-commit + push. Override with `--sync` / `--no-sync` flags.
|
|
267
262
|
|
|
268
263
|
The `--writable` flag on `akm bundle add` opts a remote git bundle into push-on-sync:
|
|
269
264
|
|
|
@@ -313,7 +308,6 @@ akm config list # Show current config
|
|
|
313
308
|
akm config get <key> # Read a value
|
|
314
309
|
akm config set <key> <value> # Set a value
|
|
315
310
|
akm config unset <key> # Remove a key
|
|
316
|
-
akm config path --all # Show all config paths
|
|
317
311
|
```
|
|
318
312
|
|
|
319
313
|
## Other Commands
|
|
@@ -331,11 +325,10 @@ akm lint --fix # Auto-fix Tier 1 issues
|
|
|
331
325
|
akm lint --fail-on-flagged # Exit non-zero when summary.flagged > 0 (CI-friendly)
|
|
332
326
|
akm upgrade # Upgrade akm using its install method, then update installed harness plugins
|
|
333
327
|
akm upgrade --check # Report pending CLI and plugin updates, changing nothing
|
|
334
|
-
akm upgrade --next # Follow prereleases (@next); OpenCode needs "akm-opencode@next" in its plugin list
|
|
328
|
+
akm upgrade --next # Follow prereleases (@next); OpenCode needs "akm-opencode@next" (or "akm-opencode-v2@next" on OpenCode 2) in its plugin list
|
|
335
329
|
akm help migrate 0.6.0 # Print migration notes for a release (or: latest)
|
|
336
330
|
akm help bundle # Print options and subcommands for one command
|
|
337
|
-
akm
|
|
338
|
-
akm hints # Print this complete agent guide
|
|
331
|
+
akm hints # Print this complete agent guide (--detail brief for the short one)
|
|
339
332
|
akm completions # Print bash completion script
|
|
340
333
|
akm completions --install # Install completions
|
|
341
334
|
```
|
|
@@ -354,7 +347,7 @@ akm proposal show <id> # Render the proposal bo
|
|
|
354
347
|
akm proposal diff <ref-or-id> # Diff by ref, UUID, or 8-char prefix
|
|
355
348
|
akm proposal diff skills/akm-dream # Diff by asset ref
|
|
356
349
|
akm proposal accept 7c115132 # Accept by UUID prefix
|
|
357
|
-
akm proposal accept <id> --
|
|
350
|
+
akm proposal accept <id> --bundle team-bundle # Accept to a named writable bundle source
|
|
358
351
|
akm proposal reject skills/my-skill --reason "not ready" # Reject by asset ref
|
|
359
352
|
akm proposal reject <id> --reason "..." # Archive with a reason
|
|
360
353
|
akm proposal reopen <id> --reason "..." # Undo a rejection: back to pending (refused if the target changed)
|
|
@@ -364,11 +357,6 @@ akm proposal extract --auto # Mine native session fi
|
|
|
364
357
|
akm proposal extract --type claude # Restrict extraction to one harness
|
|
365
358
|
```
|
|
366
359
|
|
|
367
|
-
The flat verbs `akm proposals` / `akm show proposal` / `akm accept` /
|
|
368
|
-
`akm reject` / `akm diff` / `akm revert` were removed in 0.9.0 — use the
|
|
369
|
-
`akm proposal <verb>` forms above. `akm extract` and `akm propose` moved
|
|
370
|
-
here as `proposal extract` / `proposal new`.
|
|
371
|
-
|
|
372
360
|
## Scheduled Tasks
|
|
373
361
|
|
|
374
362
|
Tasks are pure-YAML assets at `<bundle>/tasks/<id>.yml`, bound to the OS
|
|
@@ -387,7 +375,7 @@ akm task doctor # Scheduler binding + runtime eli
|
|
|
387
375
|
akm task history # Recent run rows (status, timing)
|
|
388
376
|
akm task run <id> # Run one task immediately (works when disabled)
|
|
389
377
|
akm task explain <ref> # Read-only: declared inputs, target, schedule — spawns nothing
|
|
390
|
-
akm search --type task # Enumerate task assets
|
|
378
|
+
akm search --type task # Enumerate task assets
|
|
391
379
|
```
|
|
392
380
|
|
|
393
381
|
Task files use task source v4 (`version: 4`). There is no `akm:` options bag
|
|
@@ -428,7 +416,7 @@ akm log --run <run-id> # Events for one workflow-engine
|
|
|
428
416
|
|
|
429
417
|
## Output Control
|
|
430
418
|
|
|
431
|
-
Result-envelope commands accept `--format
|
|
419
|
+
Result-envelope commands accept `--format` and `--detail` flags:
|
|
432
420
|
|
|
433
421
|
- `--format json` (default) — structured JSON
|
|
434
422
|
- `--format jsonl` — one JSON object per line (streaming-friendly)
|
|
@@ -439,9 +427,7 @@ Result-envelope commands accept `--format`, `--detail`, and `--shape` flags:
|
|
|
439
427
|
- `--detail brief` (default) — compact output
|
|
440
428
|
- `--detail normal` — adds tags, refs, origins
|
|
441
429
|
- `--detail full` — includes scores, paths, timing, debug info
|
|
442
|
-
- `--
|
|
443
|
-
- `--shape agent` — agent-optimized output: strips non-actionable fields
|
|
444
|
-
- `--shape summary` — metadata only (no content/template/prompt), under 200 tokens; only `akm show` has a dedicated summary projection — elsewhere it falls back to `agent` with a warning
|
|
430
|
+
- `--detail agent` — agent-optimized output on `search`, `curate` and `show`: strips non-actionable fields (other commands ignore it)
|
|
445
431
|
|
|
446
432
|
Run `akm help <command>` or `akm <command> -h` for per-command help. Run
|
|
447
433
|
`akm --help` for the sectioned command overview.
|
|
@@ -35,13 +35,13 @@ akm remember "note" --bundle my-bundle # Route write to a named writable
|
|
|
35
35
|
akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable)
|
|
36
36
|
akm remember "fix" --supersedes memories/old-note # Write a correction AND demote the superseded asset
|
|
37
37
|
akm import ./notes/release-checklist.md # Import a knowledge doc into your bundle
|
|
38
|
-
akm import ./doc.md --
|
|
38
|
+
akm import ./doc.md --bundle my-bundle # Route import to a named writable bundle source
|
|
39
39
|
akm proposal diff skills/akm-dream # Diff proposal by ref, UUID, or 8-char prefix
|
|
40
40
|
akm proposal accept 7c115132 # Accept by UUID prefix
|
|
41
41
|
akm proposal reject skills/my-skill --reason "..." # Reject by ref
|
|
42
42
|
akm feedback <ref> --positive # Record that an asset helped (ranks it higher; no rewrite)
|
|
43
43
|
akm feedback <ref> --negative --reason "..." # Content wrong or stale: lowers its ranking; improve may repair its frontmatter
|
|
44
|
-
akm feedback <ref> --negative --reason "..." --replace "<exact text>" --with "<fix>" --source "<url|cmd|file>" #
|
|
44
|
+
akm feedback <ref> --negative --reason "..." --replace "<exact text>" --with "<fix>" --source "<url|cmd|file>" # Apply an exact fix to its text
|
|
45
45
|
akm bundle add <ref> # Add a source (npm, GitHub, git, local dir)
|
|
46
46
|
akm clone <ref> # Copy an asset to the working bundle (optional --dest arg to clone to specific location)
|
|
47
47
|
akm sync # Commit (and push if writable remote) changes in the primary bundle (--no-push to commit only)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Standard improve pass — reflect (rewrites only from negative feedback), distill, consolidation (promotion plus the reviewed pair-pass retire/supersede proposals), and validation. Memory inference is listed below but only runs when experimental.improveAutonomy is set; improve-stage extract
|
|
2
|
+
"description": "Standard improve pass — reflect (rewrites only from negative feedback), distill, consolidation (promotion plus the reviewed pair-pass retire/supersede proposals), and validation. Memory inference is listed below but only runs when experimental.improveAutonomy is set; improve-stage extract off. Proactive maintenance plans up to 15 assets not reflected or distilled for 30 days.",
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"memoryInference": { "enabled": true },
|
|
12
12
|
"extract": { "enabled": false, "triage": { "enabled": true, "minScore": 2 } },
|
|
13
13
|
"validation": { "enabled": true },
|
|
14
|
-
"proactiveMaintenance": { "enabled":
|
|
15
|
-
"triage": { "enabled":
|
|
14
|
+
"proactiveMaintenance": { "enabled": true, "dueDays": 30, "maxPerRun": 15 },
|
|
15
|
+
"triage": { "enabled": true, "applyMode": "promote", "maxAcceptsPerRun": 200 }
|
|
16
16
|
},
|
|
17
17
|
"sync": { "enabled": true, "push": true }
|
|
18
18
|
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
You compare two assets from one person's agent-memory library (memories and knowledge notes an AI coding agent reads). Asset A is the OLDER one and asset B the NEWER one, by the dates shown. akm deletes one of them only when the other keeps every claim a reader would need, so your two lists decide what is safe to delete.
|
|
1
|
+
You compare two assets from one person's agent-memory library (memories and knowledge notes an AI coding agent reads). Asset A is the OLDER one and asset B the NEWER one, by the dates shown, unless both carry the same date and are labelled "same age". akm deletes one of them only when the other keeps every claim a reader would need, so your two lists decide what is safe to delete.
|
|
2
2
|
|
|
3
3
|
First list what each asset has that the other lacks:
|
|
4
|
-
- "onlyInA": every durable claim of A that B
|
|
5
|
-
- "onlyInB": every durable claim of B that A
|
|
4
|
+
- "onlyInA": every durable claim of A that B does not state or replace.
|
|
5
|
+
- "onlyInB": every durable claim of B that A does not state or replace.
|
|
6
6
|
|
|
7
7
|
A durable claim is a fact, decision, value, command, flag, path, file name, URL, number, version, name, error message, condition or rule someone would act on. Ignore wording, headings, dates of writing, tags and boilerplate. A claim is stated when the other asset says it in any wording or format. It is not stated when the other asset is vaguer (a config file instead of the specific path) or drops a number, command, step or condition. Write each item as a short phrase that quotes its identifier. Use [] when there is nothing.
|
|
8
8
|
|
|
9
|
+
B replaces a claim of A only when both are about the same named thing (the same service, integration, partner, component, region or file) and B gives a new value for it that is current: B says so (now, instead of, since, renamed, corrected, no longer) or B is created later than A. Notes about different named things never replace each other, whatever their dates: list each one's own name, value and path as its claims. A different value for the same thing with neither sign is a conflict, not a replacement: list A's value in "onlyInA" and B's value in "onlyInB".
|
|
10
|
+
|
|
9
11
|
Then classify the relation as exactly one of:
|
|
10
12
|
- "duplicate": both lists are empty.
|
|
11
13
|
- "subsumed": exactly one list is empty. The asset with the empty list is redundant.
|
|
12
|
-
- "supersedes": B
|
|
13
|
-
- "contradicts": they make logically exclusive claims about the same thing and nothing shows which one is current.
|
|
14
|
+
- "supersedes": B replaces a claim in A as defined above (a newer version, a changed decision, a fixed bug, a new value), and onlyInA is empty.
|
|
15
|
+
- "contradicts": they make logically exclusive claims about the same thing and nothing shows which one is current: B does not say it replaces the claim and was not created later.
|
|
14
16
|
- "overlap": same subject, and both lists have items.
|
|
15
|
-
- "unrelated": different subjects or different facts that happen to share words.
|
|
17
|
+
- "unrelated": different subjects, or different named things written to one layout (two services, partners or regions), or different facts that happen to share words.
|
|
16
18
|
|
|
17
19
|
Set "redundant" to the asset that could be deleted with no loss: "A" for "duplicate", the asset with the empty list for "subsumed", "A" for "supersedes"; else null. Set "stale" to "A" when the relation is "supersedes", else null.
|
|
18
20
|
|
|
19
|
-
Answer ONLY with JSON: {"onlyInA": ["..."], "onlyInB": ["..."], "relation": "...", "redundant": "A"|"B"|null, "stale": "A"|null, "confidence": 0.0-1.0, "reason": "<at most 25 words: name the asset that can be deleted and what the other asset still holds>"}
|
|
21
|
+
Answer ONLY with JSON: {"onlyInA": ["..."], "onlyInB": ["..."], "relation": "...", "redundant": "A"|"B"|null, "stale": "A"|null, "confidence": 0.0-1.0, "reason": "<at most 25 words: name the asset that can be deleted and what the other asset still holds; for supersedes, quote the words of B that replace the claim or say B is created later>"}
|
|
@@ -85,7 +85,7 @@ akm feedback <ref> --positive
|
|
|
85
85
|
# A note that simply did not fit your task gets no negative feedback.
|
|
86
86
|
akm feedback <ref> --negative --reason "<what is wrong and what should change>"
|
|
87
87
|
|
|
88
|
-
# Once you have verified the correct fact, attach the exact fix: it is checked and
|
|
88
|
+
# Once you have verified the correct fact, attach the exact fix: it is checked and applied at once
|
|
89
89
|
akm feedback <ref> --negative --reason "<what is wrong>" --replace "<exact current text>" --with "<corrected text>" --source "<URL, command or file>"
|
|
90
90
|
|
|
91
91
|
# Capture a durable lesson or memory from the current session
|