akm-cli 0.10.261016-beta → 0.10.261017-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.
Files changed (104) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/README.md +8 -10
  3. package/SECURITY.md +7 -99
  4. package/STABILITY.md +57 -98
  5. package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +2 -2
  6. package/dist/assets/stash-skeleton/facts/conventions/organization.md +11 -17
  7. package/dist/cli.js +32 -41
  8. package/dist/commands/feedback-cli.js +5 -4
  9. package/dist/commands/health.js +15 -16
  10. package/dist/commands/proposal/proposal-cli.js +1 -1
  11. package/dist/commands/read/registry-search.js +4 -1
  12. package/dist/commands/read/search.js +6 -6
  13. package/dist/commands/sources/self-update.js +9 -5
  14. package/dist/commands/tasks/tasks.js +12 -13
  15. package/dist/core/adapter/adapters/agent-skills-adapter.js +7 -7
  16. package/dist/core/adapter/adapters/akm-task-adapter.js +1 -1
  17. package/dist/core/adapter/adapters/akm-workflow-adapter.js +1 -1
  18. package/dist/core/adapter/adapters/claude-adapter.js +1 -1
  19. package/dist/core/adapter/adapters/dotenv-adapter.js +1 -1
  20. package/dist/core/adapter/adapters/generic-files-adapter.js +1 -1
  21. package/dist/core/adapter/adapters/llm-wiki-adapter.js +1 -1
  22. package/dist/core/adapter/adapters/opencode-adapter.js +1 -1
  23. package/dist/core/adapter/adapters/website-snapshot-adapter.js +1 -1
  24. package/dist/core/bundle-rename.js +17 -7
  25. package/dist/indexer/bundle-identity-guard.js +6 -6
  26. package/dist/indexer/index-written-assets.js +3 -3
  27. package/dist/indexer/indexer.js +12 -8
  28. package/dist/indexer/materialize-embeddings.js +12 -2
  29. package/dist/indexer/passes/metadata.js +103 -46
  30. package/dist/indexer/search/ranking.js +7 -3
  31. package/dist/indexer/search/search-fields.js +1 -1
  32. package/dist/indexer/usage/usage-events.js +30 -8
  33. package/dist/indexer/walk/walker.js +1 -1
  34. package/dist/output/shapes/helpers.js +3 -3
  35. package/dist/output/text/command-format.js +5 -6
  36. package/dist/scripts/akm-migrate-node.js +31 -3
  37. package/dist/scripts/akm-migrate.js +31 -3
  38. package/dist/sources/providers/git-provider.js +2 -4
  39. package/dist/sources/providers/provider-utils.js +8 -13
  40. package/dist/sources/snapshot-fetchers/website-ingest.js +6 -7
  41. package/dist/storage/repositories/events-repository.js +15 -0
  42. package/dist/storage/repositories/improve-ledger-repository.js +13 -0
  43. package/dist/storage/repositories/index-entries-repository.js +43 -5
  44. package/dist/storage/repositories/outcome-repository.js +12 -0
  45. package/dist/storage/repositories/proposals-repository.js +5 -5
  46. package/dist/storage/repositories/salience-repository.js +13 -0
  47. package/dist/storage/repositories/task-history-repository.js +8 -7
  48. package/dist/storage/repositories/workflow-runs-repository.js +10 -8
  49. package/docs/README.md +24 -60
  50. package/docs/agents/README.md +3 -8
  51. package/docs/architecture/README.md +18 -20
  52. package/docs/architecture/adapters.md +40 -43
  53. package/docs/architecture/architecture.md +171 -151
  54. package/docs/architecture/improvement.md +95 -91
  55. package/docs/architecture/internals/classification.md +101 -119
  56. package/docs/architecture/internals/fresh-host-rebuild-runbook.md +33 -35
  57. package/docs/architecture/internals/health-advisories.md +59 -46
  58. package/docs/architecture/internals/improve-workflow.md +166 -693
  59. package/docs/architecture/internals/indexing.md +65 -465
  60. package/docs/architecture/internals/storage-locations.md +301 -848
  61. package/docs/architecture/persisted-data-compat.md +6 -6
  62. package/docs/architecture/specs/okf-support.md +67 -95
  63. package/docs/architecture/specs/ref.md +67 -125
  64. package/docs/architecture/testing/testing-workflow.md +107 -167
  65. package/docs/architecture/workflow-engine.md +34 -33
  66. package/docs/guides/README.md +5 -5
  67. package/docs/guides/author-bundles.md +72 -98
  68. package/docs/guides/author-workflows.md +11 -18
  69. package/docs/guides/bundles.md +91 -123
  70. package/docs/guides/capture-knowledge.md +10 -9
  71. package/docs/guides/concepts.md +45 -30
  72. package/docs/guides/discover-and-load.md +39 -32
  73. package/docs/guides/getting-started.md +24 -24
  74. package/docs/guides/improve-the-library.md +98 -80
  75. package/docs/guides/recipes/headless-install.md +4 -4
  76. package/docs/guides/recipes/website-source.md +9 -5
  77. package/docs/guides/run-workflows.md +10 -11
  78. package/docs/guides/scheduling.md +11 -17
  79. package/docs/guides/use-with-any-agent.md +15 -14
  80. package/docs/guides/wikis.md +6 -9
  81. package/docs/integration/bundling-akm.md +21 -26
  82. package/docs/maintainers/README.md +2 -2
  83. package/docs/maintainers/local-development.md +3 -16
  84. package/docs/migration/README.md +2 -1
  85. package/docs/migration/release-notes/0.10.0.md +167 -22
  86. package/docs/migration/release-notes/README.md +2 -2
  87. package/docs/migration/v0.9-to-v0.10.md +47 -7
  88. package/docs/product-surface.md +10 -8
  89. package/docs/reference/README.md +26 -15
  90. package/docs/reference/asset-types.md +11 -12
  91. package/docs/reference/bundle-types.md +6 -5
  92. package/docs/reference/cli.md +52 -28
  93. package/docs/reference/configuration.md +46 -60
  94. package/docs/reference/data-and-telemetry.md +204 -421
  95. package/docs/reference/env-and-secrets.md +80 -83
  96. package/docs/reference/memory.md +1 -1
  97. package/docs/reference/refs.md +23 -36
  98. package/docs/reference/registry.md +138 -348
  99. package/docs/reference/supported-formats.md +8 -8
  100. package/docs/reference/tasks.md +13 -19
  101. package/docs/reference/website-sources.md +23 -15
  102. package/docs/reference/workflow-schema.md +28 -47
  103. package/docs/reference/workflows.md +33 -37
  104. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,95 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.261017] - 2026-10-27
10
+
11
+ ### Changed
12
+
13
+ - `akm search` finds knowledge whose answer sits in fenced code (#1260). The
14
+ `content` search projection now keeps the identifiers of fenced code (names,
15
+ CLI flags, config keys, paths, dotted references such as `process.env.CI`)
16
+ and still drops their literal values (quoted strings, assignment values, URLs,
17
+ long token-like strings). On akm-eval's code-lookup set nDCG@10 rose from
18
+ 0.530 to 0.764 (keyword) and 0.494 to 0.614 (semantic); the library set
19
+ improved slightly and the prose-only books set is unchanged. Search results
20
+ carry no `content`, so what search hands an agent is the same size. Fragments,
21
+ fragment ids and `akm show` are unchanged. The next `akm index` (including the
22
+ one `akm upgrade` runs) re-projects every directory once and re-embeds only
23
+ the entries whose embedded text changed; no `--full` needed.
24
+
25
+ ### Fixed
26
+
27
+ - The first `akm index` after upgrading re-embeds only the entries whose
28
+ embedded text changed (follow-up to #1260). The fenced-code identifiers now in
29
+ the search text come after the prose, past the first `embedding.maxInputTokens`
30
+ (default 512, about 2,048 characters) that are embedded, so a longer document
31
+ keeps its vector and only its keyword row is rewritten. The index prints how
32
+ many entries it is embedding (`Embedding 3,712 changed entries (15,050
33
+ unchanged)`), and `akm upgrade` shows that line and the rest of the index's
34
+ progress instead of waiting silently.
35
+ - Documentation sentences that were false on 0.10 are corrected (review of
36
+ #1273, #1251 follow-up). `asset-types.md` lists every way an env or secret
37
+ value reaches a process. `classification.md` says that `akm`, `okf`, `claude`,
38
+ `opencode` and `generic-files` reserve `index.md` and `log.md` at every depth
39
+ and `llm-wiki` reserves `schema.md`, `index.md` and `log.md` only at the wiki
40
+ root (`adapters.md` agrees), and that a `.yml` under `workflows/` is typed
41
+ `workflow`, then skipped at index time. `ref.md`, `workflow-engine.md` (no
42
+ isolated units; a plan from a newer akm is refused unread) and `workflows.md`
43
+ say 0.10. `configuration.md` and the stash skeleton's `backlinks.md` no longer
44
+ call `content` the lowest-weight search field: BM25 weighs the five fields
45
+ equally. The skeleton's `organization.md` no longer calls the name the
46
+ highest-weighted field or promises repo-match, tag-match or per-project
47
+ ranking boosts, which search does not have. `persisted-data-compat.md` has its
48
+ downgrade warning for retire proposals back. A bare `akm proposal drain`
49
+ follows the apply mode of `improve.strategy` (`default`, which promotes,
50
+ unless set); the `--promote` help text, `cli.md` and the improve guide said it
51
+ queues (whether it should is #1274). The feedback pages and
52
+ `akm feedback --help` say that in keyword-only search one vote moves a hit
53
+ one place whatever the keyword margin, and that with embeddings it breaks
54
+ only near-ties, where they said feedback does not override relevance. The
55
+ `AKM_REGISTRY_URL` rows say it replaces the configured registries in every
56
+ registry search. The migration guide and the 0.10.0 release notes name the
57
+ full refs `akm env` and `akm secret` now require, the removed
58
+ `akm search --assets`, the end of the index's bundle refresh, the retired
59
+ `secret://` and `${secret:NAME}`, the `--belief current` default, the
60
+ Codex and Aider flags akm no longer passes, 0.9 retire proposals, the
61
+ `akm health` warning where local embeddings are not offered, the dropped JSON
62
+ fields, the workflow redaction scope, and (in the notes) the frontmatter date
63
+ keys, symlinked and trimmed secrets, the SIGINT-first stop and the Claude Code
64
+ and Codex plugin branches, and no longer list `GET /api/config` as a breaking
65
+ change (`akm ui` is new in 0.10). The fixture READMEs match the code.
66
+ - **`akm bundle rename` keeps the bundle's recorded feedback** (#1250). It rewrote
67
+ proposals, task history and workflow refs but left `usage_events` under the old
68
+ prefix, so after a rename no feedback counted in search ranking for any asset
69
+ in the bundle, improve stopped reading its feedback, and the next `akm index`
70
+ cut the events off from their entries. It now moves the bundle's
71
+ `usage_events`, `events`, `improve_ledger`, `asset_salience` and
72
+ `asset_outcome` rows to the new name too, and matches the old name
73
+ case-sensitively, so renaming `team` no longer moves or overwrites the rows of
74
+ a bundle named `Team`.
75
+ - A negative whose exact fix was applied no longer keeps demoting the corrected
76
+ asset in `akm search` and `akm curate` (#1249). A negative recorded with
77
+ `--replace`/`--with`, `--superseded-by` or `--outdated` stops counting against
78
+ the asset once its fix is accepted, the same "already acted on" rule
79
+ `akm improve` uses; reverting the fix with `akm proposal revert` makes the
80
+ negative count again. A fix the accept refused, and every negative without a
81
+ fix, still lower the asset's ranking.
82
+ - **The architecture and CLI reference pages now say that feedback reorders search hits
83
+ (#1251).** They said a hit's `score` was its fused score and that nothing else changed the
84
+ order. They now say that after fusion the score is multiplied by
85
+ `1 + 0.03 × (ln(1 + positives) − ln(1 + negatives))` over the user's recorded feedback for
86
+ the asset, the list is re-sorted (equal scores by fully qualified ref), and
87
+ one-hit-per-file and identical-content deduplication then drop entries without reordering
88
+ it. They also say filters drop ineligible entries from each candidate list before its 100
89
+ candidates are taken, not from the fused list afterwards. The storage, indexing, registry
90
+ and improve-guide pages no longer say that search ranking reads the utility score: improve
91
+ and `akm metrics` read it, search does not.
92
+ - `AKM_REGISTRY_URL` now takes effect in `akm search` and `akm curate` with
93
+ `--from registry` or `--from all` (#1275). The variable is meant to replace the
94
+ configured registries, but search always passed the configured list, which
95
+ won, so a mirror or CI override was never read and your `registries` were
96
+ queried instead. When it is set, only its comma-separated URLs are searched.
97
+
9
98
  ## [0.10.261016] - 2026-10-27
10
99
 
11
100
  ### Added
@@ -1558,6 +1647,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1558
1647
  schema rejection: one retry without the schema, remembered for the connection. `gpt-oss:120b` through the lab
1559
1648
  gateway needed `supportsJsonSchema: false` set by hand. Other 5xx answers keep the transient-retry path. (#1150)
1560
1649
 
1650
+ ## [0.9.32] - 2026-10-13
1651
+
1652
+ A patch release: `akm feedback` no longer reports success for feedback it could not store.
1653
+
1654
+ ### Fixed
1655
+
1656
+ - **`akm feedback` fails when it cannot record the feedback.** When `state.db` was read-only to the process, as it is
1657
+ inside an agent sandbox that only allows writes in the workspace, the feedback row was silently dropped and the
1658
+ command still printed `"ok": true`. It now fails with a `DATA_DIR_NOT_WRITABLE` config error (exit 78) and records
1659
+ nothing, so an agent knows its feedback was lost. Add akm's data directory to the sandbox's writable paths.
1660
+
1561
1661
  ## [0.9.31] - 2026-10-09
1562
1662
 
1563
1663
  A patch release: concurrent config writes no longer lose a change, OpenAI's reasoning models work as `llm`
package/README.md CHANGED
@@ -69,14 +69,12 @@ akm show scripts/deploy.sh # View details and run command
69
69
  - **One library for every agent** -- Use the same capability library from Claude Code, OpenCode, Cursor, Aider, Windsurf, or any assistant that can run shell commands.
70
70
  - **Load only what the task needs** -- Search or curate a shortlist, then load full content by ref. No giant startup prompt is required.
71
71
  - **Package complete capabilities** -- Install and share bundles containing skills, scripts, workflows, agents, instructions, memories, and knowledge -- not just prompt snippets.
72
- - **Improve through evidence, with review** -- Feedback re-ranks assets right away. A negative report can carry an exact text fix, and `akm improve` repairs metadata; every edit lands as a diffable proposal you accept, reject or revert, and only writable bundles are changed.
73
- - **Turn knowledge into repeatable work** -- Run persisted workflows with dispatch, gates, retries, budgets, and resume instead of reconstructing a process from prose every session.
72
+ - **Improve through evidence, with review** -- Feedback re-ranks assets right away. A negative report can carry an exact text fix, and `akm improve` repairs metadata. Edits land as diffable proposals: the default improve strategy accepts the ones its quality judge passed, the rest wait for you to accept or reject, and any accept can be reverted. Only writable bundles are changed.
73
+ - **Turn knowledge into repeatable work** -- Run persisted workflows with dispatch, gates, retries, budgets, and resume instead of reconstructing a process from prose every session. Workflows are Experimental.
74
74
 
75
- akm retrieves every supported capability type. It directly orchestrates
76
- defined execution surfaces such as workflows, agent dispatch, tasks, and
77
- guarded subprocess injection -- it does not blindly execute arbitrary indexed
78
- content merely because that content appears in search results. It
79
- complements MCP and assistant-native skills rather than replacing them.
75
+ Search and show only return content; running a workflow, task, script, or
76
+ agent is a separate command. akm complements MCP and assistant-native skills
77
+ rather than replacing them.
80
78
 
81
79
  ## Agent Integration
82
80
 
@@ -90,7 +88,7 @@ knowledge, instructions, memories, workflows, env files, secrets, lessons, tasks
90
88
  sessions, and facts via the `akm` CLI. Use `akm -h` for details.
91
89
  ```
92
90
 
93
- Or generate it directly: `akm help agents >> AGENTS.md`
91
+ Or generate it directly: `akm hints --detail brief >> AGENTS.md`
94
92
 
95
93
  ## Documentation
96
94
 
@@ -99,8 +97,8 @@ Full docs, CLI reference, and guides are at **[akm.fwdslsh.dev](https://akm.fwds
99
97
  - [Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/)
100
98
  - [Supported Formats](https://akm.fwdslsh.dev/docs/reference/supported-formats/)
101
99
  - [CLI Reference](https://akm.fwdslsh.dev/docs/reference/cli/)
102
- - [Task v3 Reference](https://akm.fwdslsh.dev/docs/reference/tasks/)
103
- - [0.9.2 Migration Guide](https://akm.fwdslsh.dev/docs/migration/v0.9.1-to-v0.9.2/)
100
+ - [Tasks Reference](https://akm.fwdslsh.dev/docs/reference/tasks/)
101
+ - [Migration guides](https://akm.fwdslsh.dev/docs/migration/README/)
104
102
  - [Configuration](https://akm.fwdslsh.dev/docs/reference/configuration/)
105
103
  - [Bundle Authoring Guide](https://akm.fwdslsh.dev/docs/guides/author-bundles/)
106
104
  - [Registry](https://akm.fwdslsh.dev/docs/reference/registry/)
package/SECURITY.md CHANGED
@@ -2,108 +2,16 @@
2
2
 
3
3
  ## Supported versions
4
4
 
5
- Security fixes are made on the latest minor release line of `akm-cli`. The
6
- 0.x line is pre-1.0 — please upgrade promptly when a fix lands.
7
-
8
5
  | Version | Supported |
9
6
  | --- | --- |
10
- | 0.9.x | ✅ active |
11
- | 0.8.x | ❌ no longer maintained |
12
- | < 0.8 | ❌ no longer maintained |
7
+ | 0.10.x | Yes |
8
+ | Older | No |
13
9
 
14
10
  ## Reporting a vulnerability
15
11
 
16
- Please report security issues **privately** via GitHub Security Advisories:
17
-
18
- - https://github.com/itlackey/akm/security/advisories/new
19
-
20
- If GitHub Security Advisories is unavailable, email `itlackey@gmail.com`
21
- with the word `SECURITY` in the subject. Please include reproduction steps,
22
- the impacted akm version, and your operating environment.
23
-
24
- We will acknowledge receipt within 72 hours and aim to ship a fix or a
25
- mitigation guidance within two weeks, depending on severity.
26
-
27
- ## Threat model
28
-
29
- `akm` is a local CLI that reads and writes user files, executes user-authored
30
- shell commands (via scripts, workflows, and agent dispatch), and talks to
31
- explicitly configured external services (LLM endpoints, git remotes, npm,
32
- HTTP sources). It does **not** ship telemetry, send data to anyone by
33
- default, or open network listeners. See
34
- [`docs/reference/data-and-telemetry.md`](docs/reference/data-and-telemetry.md) for the on-disk
35
- inventory.
36
-
37
- Several akm surfaces execute user-controlled code or data with the full
38
- permissions of the akm process. These are documented design decisions, not
39
- bugs, but you should be aware of them:
40
-
41
- ### Workflows execute shell commands with full environment access
42
-
43
- Workflow steps run in your shell with your PATH and your environment
44
- variables — including any secrets you have exported or loaded via
45
- `akm env run` / `akm secret run`. **Only add workflow sources you trust.** See
46
- [`docs/guides/run-workflows.md` — "Security: workflow sources are executed
47
- code"](docs/guides/run-workflows.md#security-workflow-sources-are-executed-code)
48
- for the full discussion.
49
-
50
- ### Scripts execute shell commands
51
-
52
- `akm show scripts/<name>` returns a `run:` command line the user (or an
53
- integrating agent) then executes. The same trust model applies: scripts you
54
- install from third-party stashes are third-party code.
55
-
56
- ### Agents and commands embed user-authored prompts
57
-
58
- `akm show agents/<name>` and `akm show commands/<name>` return prompt
59
- templates and system prompts that an LLM will execute. A malicious stash
60
- maintainer could write a system prompt that instructs the LLM to read
61
- sensitive files in your working tree and exfiltrate them via the LLM
62
- response. Audit the prompt body the same way you'd audit a script.
63
-
64
- ### Installing a stash means trusting its code
65
-
66
- Installing a stash is not a data-only operation: **`<stashDir>/scripts/wiki-fetchers/*.{ts,js,mjs}` is imported and EXECUTED during `akm index`** (when a website-snapshot source in that stash is synced), with no gate, no prompt, and no allowlist. Every file in that directory is dynamically `import()`ed, and only *after* the module has fully evaluated does akm check that its default export looks like a fetcher (`{ name, matches, fetch }`) — module-level code (anything outside the exported functions) runs unconditionally before that check ever happens, and a file that fails the check still ran. There is no sandboxing: a wiki-fetcher script executes with the full permissions of the akm process, exactly like the scripts and workflow steps documented above.
67
-
68
- This is a deliberate design decision (owner ruling), not an oversight, and it will not change without a separate decision to add a gate. **If you install a stash from a source you do not trust, you are trusting its code to run on your machine at index time** — audit `scripts/wiki-fetchers/` the same way you would audit any other executable you're about to run, before installing.
69
-
70
- The built-in YouTube snapshot fetcher (`src/sources/snapshot-fetchers/youtube.ts`) deliberately **impersonates the YouTube Android app's InnerTube client** (`clientName: "ANDROID"`, a spoofed `clientVersion`) when calling YouTube's private `youtubei/v1/player` endpoint, because the public web client's caption URLs are Proof-of-Origin-Token gated and return empty bodies. This is known, intentional behavior needed to fetch captions at all, not a bug — documented here so it isn't mistaken for one.
71
-
72
- ### Environment and secret assets are plaintext on disk
73
-
74
- `env` and `secret` assets are owner-permissioned plaintext under `<stash>/env/`
75
- and `<stash>/secrets/`. They are protected against other local users by
76
- filesystem permissions but are not encrypted at rest. Do not commit these
77
- files to source control. Normal `akm env` and `akm secret` output never echoes
78
- values; materialize values only at the command boundary with `akm env run`
79
- or `akm secret run`.
80
-
81
- The knowledge graph extracted from your assets (entities/relations) lives
82
- only in `$DATA/index.db` and is surfaced as aggregate counts via `akm health`
83
- (`--report` for the full breakdown) — there is no export command that writes
84
- graph content to an arbitrary path.
85
-
86
- ### Improve / propose send asset content to the configured LLM
87
-
88
- `akm improve` (whose strategies run processes such as reflect, distill, and
89
- consolidate) and `akm proposal new` can send asset frontmatter and body to the
90
- connection (or harness) selected by the command, strategy, or current defaults.
91
- Connections live under `connections.<name>` in `~/.config/akm/config.json`,
92
- with their keys in the environment or in `~/.config/akm/credentials.json`. If you
93
- configure a third-party LLM, your asset content goes to that third party, and a
94
- harness you enable (Claude Code, Codex, ...) sends it wherever it is configured
95
- to. Use a local endpoint (for example, `http://localhost:11434/v1` via Ollama)
96
- for assets containing secrets or private notes.
97
-
98
- ## Known non-issues
12
+ Report security issues privately through GitHub Security Advisories:
13
+ <https://github.com/itlackey/akm/security/advisories/new>
99
14
 
100
- - **The `akm-cli` npm package requires Node.js >= 22 as its bootstrap.** A
101
- working Bun >= 1.0 is preferred for execution when it is also on `PATH`; old,
102
- unusable, or absent Bun installations fall back to Node.js. Bun does not
103
- remove the package's Node.js requirement. Standalone binaries are
104
- runtime-free. This is a compatibility limitation, not a security risk.
105
- - **Workflows can read any file the akm process can read.** This is not a
106
- bug — see "Threat model" above.
107
- - **Installing `akm-cli` runs no install script.** Neither `akm-cli` nor any
108
- package it depends on declares one. The Node.js version is checked when akm
109
- starts, not when it installs.
15
+ If that is unavailable, email `itlackey@gmail.com` with `SECURITY` in the
16
+ subject. Include reproduction steps, the akm version, and your operating
17
+ environment.
package/STABILITY.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Stability policy
2
2
 
3
3
  `akm-cli` follows [Semantic Versioning](https://semver.org/) on the 0.x line
4
- **with one caveat**: until 1.0, minor releases (0.x → 0.x+1) may include
5
- breaking changes.
4
+ **with one caveat**: while the version is 0.x, minor releases (0.x → 0.x+1)
5
+ may include breaking changes.
6
6
 
7
7
  **0.9.x series exception.** The 0.9.x releases are a deliberate refactoring
8
8
  and clean-up series: the goal is to pay off all remaining technical debt and
@@ -87,23 +87,15 @@ please file it.
87
87
  | --- | --- |
88
88
  | **Stable** | Scripted use is supported. Changes are additive within a minor release; breaking changes are called out in the CHANGELOG with a migration note. |
89
89
  | **Evolving** | Available across minor releases, but flag names, prompts, and payload shapes may shift. Breaking changes are flagged in the CHANGELOG. |
90
- | **Experimental** | Subject to change without notice. Not recommended for scripted use. Some experimental surfaces additionally require an explicit opt-in — see [`akm improve` autonomy](#akm-improve-autonomy--opt-in-in-090). |
90
+ | **Experimental** | Subject to change without notice. Not recommended for scripted use. Some experimental surfaces additionally require an explicit opt-in — see [`akm improve` autonomy](#akm-improve-autonomy). |
91
91
  | **Internal** | Not a public interface. May change or disappear in any release, without a CHANGELOG note. Listed here only so you can recognize it. |
92
92
 
93
93
  ## Command tier index
94
94
 
95
95
  The canonical index: every command and subcommand group in the current tree
96
96
  (enumerated from `main.subCommands` in `src/cli.ts` and each group's own
97
- `subCommands`), with its tier. The prose sections below remain the detailed
98
- explanation of *why*; this table is the lookup. Two spots have no single
99
- explicit sentence naming their tier and were resolved by reading neighbors:
100
- `akm bundle show` is assigned Evolving because it is discussed only inside
101
- the Evolving "Bundles & the workspace model" bullet, alongside the still-
102
- shifting adapter set, unlike its sibling `akm bundle list`, which the Stable
103
- section names explicitly; and `akm proposal list` is assigned Stable — the
104
- Stable section names it explicitly ("list filters"), which takes precedence
105
- over its incidental mention inside the Evolving "Improvement loop" bullet's
106
- enumeration of the whole `proposal` noun group.
97
+ `subCommands`), with its tier. The sections below explain what each tier
98
+ covers beyond the table.
107
99
 
108
100
  | Command | Tier | Notes |
109
101
  | --- | --- | --- |
@@ -116,10 +108,11 @@ enumeration of the whole `proposal` noun group.
116
108
  | `akm bundle create` | Stable | |
117
109
  | `akm bundle add` | Stable | |
118
110
  | `akm bundle list` | Stable | |
119
- | `akm bundle show` | Evolving | See note above. |
111
+ | `akm bundle show` | Evolving | |
112
+ | `akm bundle rename` | Stable | |
120
113
  | `akm bundle remove` | Stable | |
121
114
  | `akm bundle update` | Stable | |
122
- | `akm upgrade` | Stable | Including the plugin step and `--next` (0.9.28), verified on real hosts, in empty containers and on failure paths (#1099). |
115
+ | `akm upgrade` | Stable | Including the plugin step and `--next`. Checksum verification is not optional; the recovery hatch is the `AKM_UPGRADE_SKIP_CHECKSUM` environment variable (Internal), not a flag. |
123
116
  | `akm search` | Stable | |
124
117
  | `akm curate` | Stable | |
125
118
  | `akm show` | Stable | |
@@ -137,14 +130,14 @@ enumeration of the whole `proposal` noun group.
137
130
  | `akm registry list` | Evolving | |
138
131
  | `akm registry add` | Evolving | |
139
132
  | `akm registry remove` | Evolving | |
140
- | `akm migrate status` | Internal | Forwards to the standalone `akm-migrate` tool; renders its result through the normal `--format` pipeline (not exempt — see below). Listed (not hidden) in `--help`/completions. |
141
- | `akm migrate apply` | Internal | Forwards to the standalone `akm-migrate` tool; renders its result through the normal `--format` pipeline (not exempt — see below). Listed (not hidden) in `--help`/completions. |
133
+ | `akm migrate status` | Internal | Forwards to the standalone `akm-migrate` tool and renders its result through the normal `--format` pipeline. |
134
+ | `akm migrate apply` | Internal | Forwards to the standalone `akm-migrate` tool and renders its result through the normal `--format` pipeline. |
142
135
  | `akm config path` | Stable | |
143
136
  | `akm config list` | Stable | |
144
- | `akm config get` | Stable | Default bare-value shape unchanged; `--show-source` (0.9.15, opt-in) wraps it as `{ value, source }`. |
137
+ | `akm config get` | Stable | Default bare-value shape unchanged; `--show-source` (opt-in) wraps it as `{ value, source }`. |
145
138
  | `akm config set` | Stable | |
146
139
  | `akm config unset` | Stable | |
147
- | `akm config diff` | Evolving | New in 0.9.15; compares effective (post-`extends`) configs, secrets redacted. |
140
+ | `akm config diff` | Evolving | Compares effective (post-`extends`) configs. |
148
141
  | `akm feedback` | Stable | |
149
142
  | `akm log` | Evolving | |
150
143
  | `akm agent` | Evolving | |
@@ -154,12 +147,12 @@ enumeration of the whole `proposal` noun group.
154
147
  | `akm improve` | Evolving | Review-first by default; mutating lanes require `experimental.improveAutonomy` — see below. |
155
148
  | `akm improve report` | Evolving | Subcommand since 0.10 (was a magic `scope` value); owns `--run` and `--since`. |
156
149
  | `akm improve judge` | Evolving | Subcommand since 0.10 (was a magic `scope` value); reads one revision as JSON on stdin and writes nothing. |
157
- | `akm proposal list` | Stable | See reconciliation note above. |
150
+ | `akm proposal list` | Stable | |
158
151
  | `akm proposal show` | Evolving | |
159
152
  | `akm proposal diff` | Evolving | |
160
153
  | `akm proposal accept` | Evolving | |
161
154
  | `akm proposal reject` | Evolving | |
162
- | `akm proposal reopen` | Evolving | New in 0.9.19; undoes a rejection. |
155
+ | `akm proposal reopen` | Evolving | Undoes a rejection. |
163
156
  | `akm proposal revert` | Evolving | |
164
157
  | `akm proposal drain` | Evolving | |
165
158
  | `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. |
@@ -178,9 +171,12 @@ enumeration of the whole `proposal` noun group.
178
171
  | `akm secret run` | Stable | Read-and-inject surface. |
179
172
  | `akm secret set` | Experimental | Write verb. |
180
173
  | `akm task add` | Evolving | |
174
+ | `akm task enable` | Evolving | |
175
+ | `akm task disable` | Evolving | |
181
176
  | `akm task run` | Evolving | |
182
177
  | `akm task history` | Evolving | |
183
178
  | `akm task sync` | Evolving | |
179
+ | `akm task prune` | Evolving | |
184
180
  | `akm task doctor` | Evolving | |
185
181
  | `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). |
186
182
 
@@ -202,12 +198,11 @@ enumeration of the whole `proposal` noun group.
202
198
  the core resolves it as a section selector — `akm show <ref>#<heading-slug>`
203
199
  returns that one section, no fragment returns the whole item, and an
204
200
  unmatched fragment lists the available slugs. A whole document's `show`
205
- carries `toc`, every heading with the slug that selects it. Elsewhere it is an
206
- adapter-owned selector opaque to the core. See
201
+ carries `toc`, every heading with the slug that selects it. On any other item
202
+ `akm show` ignores the fragment with a warning and shows the whole item. See
207
203
  [`docs/architecture/specs/ref.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/ref.md).
208
204
  - **Refs in prose** must be fully qualified (`bundle//conceptId`) or a native
209
- adapter link form. A bare conceptId in prose is ordinary text, not a ref,
210
- and no akm tool rewrites it.
205
+ adapter link form. A bare conceptId in prose is ordinary text, not a ref.
211
206
  - **ConceptId-prefix enumeration** — `akm search "memories/"`,
212
207
  `"memories/projecta/"`, `"bundle//"`, `"bundle//skills/"`. A trailing `/` is
213
208
  required. The prefix matches the **conceptId** — the spelling every emitted
@@ -228,16 +223,11 @@ enumeration of the whole `proposal` noun group.
228
223
  `akm bundle create`, `akm setup`, `akm remember`, `akm feedback`,
229
224
  `akm config set`, `akm config unset`.
230
225
  - **Renames are delete + create** — moving or renaming an item gives it a new
231
- identity; learned state does not follow it. Cross-bundle movement is
232
- copy/import plus delete. The procedure is a plain filesystem move, then
226
+ identity; learned state (feedback, usage, salience) does not follow it.
227
+ Cross-bundle movement is copy/import plus delete. Move the file, then run
233
228
  `akm index`, then `akm lint` to catch inbound refs the move left dangling.
234
- `akm mv` was **removed in 0.9.0**: it claimed to preserve identity across a
235
- rename, but its inbound-ref rewriting targeted bare conceptIds rather than
236
- the anchored `bundle//conceptId` prose form, so it could rewrite non-refs
237
- while leaving real refs dangling. To carry an asset's earned signal
238
- (feedback, usage, salience/outcome history) across a rename, the maintainer
239
- script `scripts/rekey-asset-ref.ts` re-keys those rows old -> new; it is
240
- Internal tooling, not a supported command surface.
229
+ There is no `akm mv`; `scripts/rekey-asset-ref.ts` re-keys earned signal from
230
+ an old ref to a new one and is Internal tooling.
241
231
  - **Asset `type` is a free-form, open string** — `--type` filtering is an
242
232
  exact match against an open set and is deliberately **not validated**: an
243
233
  unrecognized type returns zero hits, not an error. Adapters emit types
@@ -288,14 +278,11 @@ enumeration of the whole `proposal` noun group.
288
278
  | `2` | Usage / bad input |
289
279
  | `4` | Health warning (`akm health` only) |
290
280
  | `70` | Internal / unclassified |
291
- | `75` | Transient — retry shortly (`TransientError`, sysexits `EX_TEMPFAIL`); another akm process holds a lock or is writing `state.db` right now |
281
+ | `75` | Transient — retry shortly (`TransientError`, sysexits `EX_TEMPFAIL`); another akm process holds a lock or is writing `state.db` or `index.db` right now |
292
282
  | `78` | Configuration error |
293
283
 
294
- **From 0.9.12**, every success envelope produced by the passthrough stamp
295
- (`config`, `clone`, `models`, `task-*`, `workflow-*`, `registry-*`, …) also
296
- carries `ok: true`; a command that already computes its own `ok` keeps it.
297
- - **Install scripts** — `install.sh` and `install.ps1` URLs; the `--prefix`
298
- / `AKM_INSTALL_DIR` environment override.
284
+ - **Install scripts** — the `install.sh` and `install.ps1` URLs and the
285
+ `AKM_INSTALL_DIR` environment override.
299
286
  - **Runtime** — the npm package requires Node.js >= 22 as its bootstrap and
300
287
  prefers a working Bun >= 1.0 for execution when both are available; old,
301
288
  unusable, or absent Bun installations fall back to Node.js. Standalone
@@ -323,7 +310,7 @@ CHANGELOG with a migration note.
323
310
  options or tighten validation across releases. `akm improve` stays on by
324
311
  default and is **review-first**: the lanes that mutate assets without review
325
312
  require `experimental.improveAutonomy` — see
326
- [`akm improve` autonomy](#akm-improve-autonomy--opt-in-in-090).
313
+ [`akm improve` autonomy](#akm-improve-autonomy).
327
314
  `--auto-accept` was removed in 0.9.0 and is an unknown flag (a usage error,
328
315
  exit 2) since 0.10. The replacement is
329
316
  `akm improve && akm proposal drain --promote --yes`, or a `triage` block
@@ -333,9 +320,9 @@ CHANGELOG with a migration note.
333
320
  routine sessions left empty, planted instructions refused) is its gate. It
334
321
  is Evolving, not Stable, because 0.10 is still settling the improve
335
322
  defaults; what it extracts and its output may still be tuned.
336
- - **Tasks** — `akm task` subcommand surface (`add | run | sync | doctor |
337
- history | explain | validate`; no alias, no
338
- `list`/`remove`/`init`/`enable`/`disable`); task source v4 YAML (typed
323
+ - **Tasks** — `akm task` subcommand surface (`add | enable | disable | run |
324
+ explain | history | sync | prune | doctor`; no alias, no
325
+ `list`/`remove`/`init`/`validate`); task source v4 YAML (typed
339
326
  `inputs:`, optional `schedule:`) is the only accepted version — task v3 and
340
327
  task v2 sources are converted by `akm migrate apply`. Command tasks use
341
328
  a named connection or harness, and task history metadata is versioned. Schema additions in
@@ -367,7 +354,7 @@ CHANGELOG with a migration note.
367
354
  `akm bundle list` / `akm bundle show <name>` and enumerated through
368
355
  `akm search "bundle//"`. (An earlier `akm bundle items` noun group was
369
356
  removed in 0.9.0 as duplicative of `akm search`; the current `akm bundle`
370
- group — `create | add | list | show | remove | update` — is the
357
+ group — `create | add | list | show | rename | remove | update` — is the
371
358
  lifecycle-management surface consolidated from the former top-level
372
359
  `init`/`add`/`list`/`remove`/`update` commands, not a revival of that one.)
373
360
  OKF is the
@@ -397,11 +384,6 @@ CHANGELOG with a migration note.
397
384
  `akm search --from registry` (0.9.0: `registry search` was folded into
398
385
  `search`). Building a registry index is maintainer tooling (Internal) and
399
386
  lives outside the CLI, in `scripts/build-registry-index.ts`.
400
- - **Upgrade** — `akm upgrade`. Checksum verification is not optional; the
401
- recovery hatch is the `AKM_UPGRADE_SKIP_CHECKSUM` environment variable
402
- (Internal), not a flag. The harness plugin step and `--next` (new in 0.9.28)
403
- are targeted to become Stable before the 0.9 series ends, once verified on
404
- real hosts.
405
387
  - **Lint** — `akm lint`. The rule set and finding shapes iterate; the
406
388
  `--fail-on-flagged` CI contract and the exit codes are stable.
407
389
  - **Health** — `akm health` and its exit codes (0 pass / 4 warn / 1 fail) are
@@ -457,8 +439,8 @@ for scripted use.
457
439
  **write** verbs (`create`, `set`, `unset`, `remove`) are Experimental; the
458
440
  `list` / `path` / `run` / `export` read-and-inject surface is Stable.
459
441
  - **Memory belief-state transitions** — `captureMode`, `beliefState`,
460
- contradiction edges, and the consolidate journal are observable but
461
- the algorithm that writes them is tuning across patch releases.
442
+ contradiction edges, and the consolidate journal are observable, but the
443
+ algorithm that writes them is tuning across patch releases.
462
444
  - **Improve built-in strategies and lanes** — the built-in strategies other
463
445
  than `default` and `consolidate` and the proactive-maintenance lane. 0.10 measures each and keeps, folds or removes it
464
446
  (#1094). `quick`, `reflect-distill`, `thorough` and `catchup` were removed
@@ -470,17 +452,18 @@ for scripted use.
470
452
  added, renamed, or dropped in any 0.9.x or 0.10.x release**. The `akm
471
453
  improve` *command* surface is Evolving (above); its tuning config is not.
472
454
 
473
- ### `akm improve` autonomy — opt-in in 0.9.0
455
+ ### `akm improve` autonomy
474
456
 
475
- **`akm improve` is review-first by default in 0.9.0.** The command itself is ON
476
- — its schedules and reflect/distill proposals all run — but the lanes that
477
- mutate assets *without* review require an explicit opt-in:
457
+ `akm improve` is review-first by default. The command is on — its schedules and
458
+ reflect/distill proposals all run — but the lanes that change assets *without*
459
+ review require an explicit opt-in:
478
460
 
479
461
  ```sh
480
462
  akm config set experimental.improveAutonomy true
481
463
  ```
482
464
 
483
- Without it, these three lanes are downgraded (the triage lane only when its
465
+ An absent `experimental` section, an absent key and an explicit `false` all
466
+ read as off. Without the opt-in, these three lanes are downgraded (the triage lane only when its
484
467
  judgment tier is on), and each downgrade is **reported,
485
468
  not silent**: it warns on stderr naming the lane and the key, appends an
486
469
  `improve_skipped` event with `reason: "autonomy_gated"`, is counted in
@@ -517,39 +500,28 @@ Because the gate is applied before the LLM preflight, a review-first workspace
517
500
  also needs fewer connections or harnesses configured: a strategy whose only
518
501
  model-backed process is a gated lane resolves without one at all.
519
502
 
520
- **Three direct writes are deliberately NOT gated**, because they are additive or
521
- already independently controlled:
503
+ Reflect, distill, extract candidates, validation and proactive-maintenance
504
+ selection only stage proposals. These writes are not gated by the opt-in:
522
505
 
523
- | Write | Why it stays ungated |
506
+ | Write | What it does |
524
507
  | --- | --- |
525
- | `extract` session indexing | Additive `sessions/**` writes; nothing is overwritten or deleted |
526
- | distill's encoding-salience stamp | Frontmatter metadata only |
527
- | `sync.push` | Publishes already-committed content to a remote the user configured for that purpose, and has its own `improve.strategies.<name>.sync.push: false` and `--no-push` |
528
-
529
- Autonomy is never inferred: an absent `experimental` section, an absent key, and
530
- an explicit `false` all read as off, so a partially-written or older config is
531
- review-first rather than accidentally permissive.
532
-
533
- Reflect, distill, extract candidates, validation, and proactive-maintenance
534
- selection are proposal-only and never write assets directly. Two further
535
- direct writes are ungated by design: `extract`'s session
536
- indexing (additive `sessions/**` writes,
537
- `processes.extract.indexSessions`, default on) and distill's
538
- encoding-salience frontmatter stamp (metadata only).
508
+ | `extract` session indexing | Writes `sessions/**` assets (`processes.extract.indexSessions`, default on) |
509
+ | distill's encoding-salience stamp | Writes a salience score to asset frontmatter |
510
+ | Graced archive purge | At the start of every improve run, removes retirement archives past the grace period |
511
+ | Accept commits | Accepting a proposal commits its paths when the bundle is a git repository |
512
+ | `sync.push` | Pushes already-committed content to the configured remote; turn it off with `improve.strategies.<name>.sync.push: false` or `--no-push` |
539
513
 
540
514
  ## Internal
541
515
 
542
516
  Not public interfaces. Listed so you can recognize them, not so you can rely
543
517
  on them.
544
518
 
545
- - **Migration surfaces** — the standalone `akm-migrate` tool owns the one-time
546
- 0.8→0.9 cutover, storage migration, and recovery backups (`akm-migrate
547
- backup` / `restore`). `akm migrate` is a thin process forwarder; `akm backup`
548
- and `akm config migrate` are removed. `akm help migrate <version>` is Stable
549
- and only renders release notes.
519
+ - **Migration surfaces** — the standalone `akm-migrate` tool (`status`,
520
+ `apply`) rewrites config, `state.db`, task files and old on-disk residue to
521
+ the current shape, taking a backup first. `akm migrate` is a thin process
522
+ forwarder for it.
550
523
  - **`bun scripts/build-registry-index.ts`** — maintainer tooling for building a
551
- registry index. It is a repository script, not a CLI command (the former
552
- `akm registry build-index` subcommand was removed).
524
+ registry index. It is a repository script, not a CLI command.
553
525
  - **Environment variables** — see the table below.
554
526
 
555
527
  ### Environment variables
@@ -560,10 +532,9 @@ on them.
560
532
  | --- | --- |
561
533
  | `AKM_BUNDLE_DIR`, `AKM_CONFIG_DIR`, `AKM_DATA_DIR`, `AKM_CACHE_DIR` | Filesystem layout overrides |
562
534
  | `AKM_VERBOSE`, `AKM_DEBUG` | Diagnostics |
563
- | `AKM_REGISTRY_URL` | akm registry mirror override |
564
- | `AKM_NPM_REGISTRY` | npm mirror override — redirects BOTH the trusted-tarball host allowlist and package metadata lookups (`npm view`-equivalent resolution) to the given registry base, replacing `registry.npmjs.org` wholesale rather than merging with it |
535
+ | `AKM_REGISTRY_URL` | Comma-separated registry URL override; replaces the configured registries in every registry search akm performs (`akm registry list` and `akm info` still show the configured list) |
536
+ | `AKM_NPM_REGISTRY` | npm mirror base URL; replaces `registry.npmjs.org` for package lookups |
565
537
  | `AKM_SQLITE_JOURNAL_MODE` | SQLite journal mode (network filesystems) |
566
- | `AKM_BIN` | Absolute `akm` path for scheduler registration |
567
538
  | `AKM_INSTALL_DIR` | Install-script prefix |
568
539
  | `AKM_UPGRADE_SKIP_CHECKSUM` | Recovery hatch for a broken upgrade checksum |
569
540
 
@@ -572,18 +543,6 @@ on them.
572
543
  `AKM_EMBED_DETERMINISTIC`, `AKM_CLAUDE_PROJECTS_DIR`,
573
544
  `AKM_FORCE_INIT_TMP_STASH`, `AKM_STATE_DIR`.
574
545
 
575
- Anything matching `AKM_TEST_*` is test-only fault injection. Never set it.
576
- `AKM_VERSION` is the only variable actually stripped from release builds, via
577
- `bun build --define` (see `.github/workflows/release.yml`); no `src/` code
578
- reads an `AKM_TEST_*` variable, so the compiled `akm` binary itself carries
579
- none. That said, three fault-injection hooks are NOT compiled out and DO ship
580
- in every install: `AKM_TEST_MIGRATION_FAIL_INDEX_QUARANTINE`,
581
- `AKM_TEST_MIGRATION_FAIL_WORKFLOW_DELETE`, and
582
- `AKM_TEST_MIGRATION_FAIL_RESTORE_AFTER` (`scripts/akm-migrate/`). The migration
583
- tool ships separately from the compiled `akm` binary, so these throw-only hooks
584
- remain physically present. At rest they are runtime-guarded no-ops unless the
585
- exact internal test value is set. Never set them.
586
-
587
546
  ## On the horizon
588
547
 
589
548
  These changes are planned and will land in a known future release. They
@@ -619,8 +578,8 @@ worth fixing.
619
578
  ## See also
620
579
 
621
580
  - [`CHANGELOG.md`](./CHANGELOG.md) — every release's behavior changes.
622
- - [`SECURITY.md`](./SECURITY.md) — security supported-version policy
623
- (independent of the feature-stability policy above).
581
+ - [`SECURITY.md`](./SECURITY.md) — supported versions and how to report a
582
+ vulnerability.
624
583
  - [`docs/architecture/specs/ref.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/ref.md) — the
625
584
  normative ref grammar.
626
585
  - [`docs/reference/data-and-telemetry.md`](./docs/reference/data-and-telemetry.md) — what
@@ -72,8 +72,8 @@ xrefs:
72
72
  ## Self-situating headers and canonical naming
73
73
 
74
74
  Put the one-line orientation in `description:` and the trigger conditions in
75
- `when_to_use:` — those remain the higher-weight indexed fields. Bounded body
76
- prose is indexed in the lowest-weight `content` field, so
75
+ `when_to_use:`; both are indexed, and search weighs every indexed field
76
+ equally. Bounded body prose is indexed in the `content` field.
77
77
  `description:`/`when_to_use:` remain the primary orientation channel. Then
78
78
  open the body with a plain title plus a one-line
79
79
  orientation naming what it is, its scope/domain, and its key entities in