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
@@ -1,22 +1,21 @@
1
1
  # Environment & Secrets
2
2
 
3
- Reference for `akm env` and `akm secret` — the two protected-value asset
4
- types. For task-oriented guidance on capturing knowledge in general, see
5
- [Capture Knowledge](../guides/capture-knowledge.md); this page states exact
6
- contract, defaults, and security behavior.
3
+ Reference for `akm env` and `akm secret`, the two asset types for values that
4
+ should not be printed. For task-oriented guidance on capturing knowledge in
5
+ general, see [Capture Knowledge](../guides/capture-knowledge.md); this page
6
+ states the exact behavior and defaults.
7
7
 
8
8
  ## env vs secret
9
9
 
10
10
  `akm env` manages a `.env`-backed group of configuration (a whole `.env` file
11
- loaded wholesale). `akm secret` manages a single standalone sensitive value —
12
- one value per file, mirroring Docker's secret model. There is no `akm vault`
13
- command; use `env` or `secret`.
11
+ loaded wholesale). `akm secret` manages a single standalone sensitive value,
12
+ one value per file, mirroring Docker's secret model.
14
13
 
15
14
  | | `env` | `secret` |
16
15
  | --- | --- | --- |
17
- | Purpose | configuration — related settings for an app/service | authentication — one sensitive value |
16
+ | Purpose | configuration: related settings for an app or service | authentication: one sensitive value |
18
17
  | Holds | a `.env` file of many `KEY=value` pairs | one value per file |
19
- | Discoverable | key *names* (not values) | name only (the whole file is the value) |
18
+ | Listed as | key *names* | name only |
20
19
  | Injects | many vars at once (`env run`) | one var (`secret run <ref> <VAR>`) |
21
20
 
22
21
  ## Addressing: the akm ref
@@ -29,28 +28,30 @@ the full ref (`secrets/<name>`, `env/<name>`). An unqualified ref resolves the
29
28
  way every unqualified ref does: the default bundle first, then installation
30
29
  priority.
31
30
 
32
- ## Core security guarantee
31
+ ## What each command prints
33
32
 
34
- Values never appear in akm's structured output. `env list` and `akm show
35
- env/<name>` surface key names only — comment text is never surfaced either,
36
- since comments routinely contain commented-out credentials and are treated
37
- like values. `secret list` surfaces the secret's name only; the file content
38
- is never shown. Values reach a process only through the safe injection
39
- paths, `akm env run` and `akm secret run`, which pass values directly into
40
- the child process — never through akm's own stdout, the index, or `akm
41
- show`.
33
+ - `akm env list` and `akm show env/<name>` print key names only: no values and
34
+ no comment text.
35
+ - `akm secret list` prints secret names only.
36
+ - `akm env path <ref>` prints the absolute path of the env file.
37
+ - `akm env export <ref> --out <file>` writes a sourceable `export KEY='value'`
38
+ script to the file (mode 0600), single-quoting each value so shell
39
+ substitutions in the source `.env` become literal strings. It requires
40
+ `--out` and prints no values to stdout.
41
+ - Values reach a process through `akm env run` and `akm secret run`, which
42
+ place them in the child process's environment.
42
43
 
43
44
  ```sh
44
45
  akm env create env/prod # create an empty .env group
45
46
  akm env create env/prod --from-file ./.env # or ingest an existing .env
46
47
 
47
- # akm does not manage individual keys — edit the whole file with your own editor:
48
+ # akm does not manage individual keys; edit the whole file with your editor:
48
49
  $EDITOR "$(akm env path env/prod --quiet)"
49
50
 
50
51
  akm env list
51
- akm show env/prod # key names only
52
+ akm show env/prod # key names only (see "Indexing" below)
52
53
 
53
- # Inject the whole .env into a subprocess (never onto stdout):
54
+ # Inject the whole .env into a subprocess:
54
55
  akm env run env/prod -- ./deploy.sh
55
56
  akm env run env/prod -- $SHELL # interactive session with the env loaded
56
57
  akm env run env/prod --only DATABASE_URL -- ./migrate
@@ -63,11 +64,6 @@ akm secret run secrets/deploy-token GITHUB_TOKEN -- gh release create v1.0.0
63
64
  akm secret set secrets/deploy-token --bundle team --from-file ./token
64
65
  ```
65
66
 
66
- `env export --out <file>` writes a safe, sourceable `export KEY='value'`
67
- script (re-serialised single-quoted, so shell substitutions in the source
68
- `.env` become literal strings) — it requires `--out` and never prints values
69
- to stdout.
70
-
71
67
  ## The `${ref}` token
72
68
 
73
69
  Wherever akm substitutes a reference into a string it hands to a process or a
@@ -119,16 +115,40 @@ env file is bundle content and is not rewritten; write the full ref.
119
115
  config still reads it as `${secrets/name}` and names the key once, and `akm
120
116
  migrate apply` rewrites the file.
121
117
 
122
- ## File modes and storage
118
+ ## Running commands
119
+
120
+ `akm env run <ref> -- <command>` and `akm secret run <ref> <VAR> -- <command>`
121
+ spawn the command directly (no shell) with the values added to its environment.
122
+ They exit with the command's status and are exempt from `--format`.
123
+
124
+ - `env run` takes `--only KEY,KEY` or `--except KEY,KEY` to choose which
125
+ variables are injected.
126
+ - `--clean` starts the child with a minimal inherited environment (`PATH`,
127
+ `HOME`, locale and terminal basics) instead of the full parent environment;
128
+ `--inherit NAME,NAME` adds parent variables back (only with `--clean`).
129
+ - A value in an env file may contain a `${ref}` token, which `env run` replaces
130
+ (see [The `${ref}` token](#the-ref-token)).
131
+ - Injected values stay in the child's environment for its whole lifetime, so its
132
+ own subprocesses can read them, and the child decides what it writes to
133
+ stdout and stderr. For a long-lived process, point it at the secret file
134
+ (`<bundle>/secrets/<name>`) directly instead.
135
+ - Installing a bundle is the trust decision: `env run`, `secret run` and
136
+ workflow `env:` bindings inject what the bundle's files define, including
137
+ keys such as `PATH` or `LD_PRELOAD`, from any bundle, with no warning, block
138
+ or flag. `akm lint` still reports such keys (`dangerous-env-key`,
139
+ non-blocking) so an author can review their own files.
140
+ - Each run records an `env_access` or `secret_access` event with the key or
141
+ variable names.
142
+
143
+ ## Files and storage
123
144
 
124
- `.env` files are stored at mode 0600 under `env/` in the target bundle;
125
- standalone secrets are stored at mode 0600 under `secrets/`. A secret write
126
- is atomic under an exclusive per-secret lock held in akm's data directory;
127
- maximum secret size is 5 MB.
128
- Values never cross argv (no `/proc/cmdline` exposure). An `env` file or
129
- secret can carry a sibling `.sensitive` marker that excludes it from `list`
130
- output and from the search index entirely; the value remains usable via
131
- `run`.
145
+ Env files live under `env/` and secrets under `secrets/` in the target bundle,
146
+ with mode 0600. A secret is written under an exclusive per-secret lock held in
147
+ akm's data directory. `akm secret set` reads the value from stdin by default,
148
+ or from `--from-file` (byte-exact, multi-line allowed) or `--from-env <VAR>`,
149
+ so the value is not on the command line. `akm env create --sensitive` adds a
150
+ sibling `.sensitive` marker; an env file or secret with that marker is left
151
+ out of `list` output and the search index, and `run` still works on it.
132
152
 
133
153
  An env file or secret may be a symlink to a file anywhere else, such as a
134
154
  container's `/run/secrets/<name>`: `akm env`, `akm secret`, `${secrets/name}`
@@ -136,59 +156,36 @@ substitution and a workflow `env:` binding follow it. A name still cannot climb
136
156
  out of `env/` or `secrets/` with `..` or an absolute path. Writes never follow
137
157
  a symlink out of the bundle.
138
158
 
139
- ## Write-target resolution
159
+ ### Indexing
140
160
 
141
- Env/secret **mutations** (`env create`, `env remove`, `secret set`) choose
142
- their write destination like every other write command: an explicit
143
- `--bundle <source>` wins, else `defaultWriteTarget`, else the working
144
- bundle. The chosen source must be writable — a non-writable target fails
145
- with a `ConfigError` before anything is written — and a git-backed writable
146
- target commits the mutation at a single operation boundary. Reads (`list`,
147
- `show`, `path`, `run`, `export`) still span all configured sources.
148
-
149
- ## Subprocess residency
150
-
151
- `akm env run` and `akm secret run` inject values directly into the child
152
- process — never through a shell — but the child controls its own
153
- stdout/stderr, so a command that prints its own environment will still leak
154
- values into your terminal or agent transcript. Injected values live in the
155
- child process environment for its entire lifetime and are visible to every
156
- subprocess the child spawns.
157
-
158
- - Prefer `akm secret run secrets/<name> <VAR> -- <command>` over `akm env
159
- run` when a command only needs one value.
160
- - Avoid `env run` / `secret run` for long-lived daemon or server processes;
161
- for those, point the process at the secret file directly
162
- (`<bundle>/secrets/<name>`) so the value never sits in a process
163
- environment variable at all.
164
- - Avoid running commands that print the environment (`env`, `printenv`,
165
- shell tracing, verbose diagnostics) in agent contexts unless you
166
- explicitly intend to expose the child environment.
167
- - Installing a bundle is the trust decision: `env run`, `secret run` and
168
- workflow `env:` bindings inject what the bundle's files define, including
169
- keys such as `PATH` or `LD_PRELOAD`, from any bundle, with no warning, block
170
- or flag. `akm lint` still reports such keys (`dangerous-env-key`,
171
- non-blocking) so an author can review their own files.
161
+ `akm bundle create` makes the bundle a git repository whose `.gitignore` lists
162
+ `env/` and `secrets/`, so those files are never committed. The indexer skips
163
+ git-ignored files everywhere else, but it still indexes the files under a
164
+ bundle's `env/` and `secrets/` directories when git ignores them: `akm search
165
+ --type env` and `akm show env/<name>` find an env file of a default bundle after
166
+ `akm index`. The index holds key names only for an env file and the name for a
167
+ secret; values are never indexed. `env list`, `env path`, `env export`,
168
+ `env run`, `secret list` and `secret run` read the files directly and do not
169
+ need the index.
172
170
 
173
- ## Stability
171
+ ## Write-target resolution
174
172
 
175
- `env list`, `env path`, `env export`, `env run`, `secret list`, and `secret
176
- run` — the read-and-inject surface — are Stable. `env create`, `env remove`,
177
- and `secret set` — the write verbs — are Experimental. Check
178
- [STABILITY.md](../../STABILITY.md) for the current tier of any command
179
- before depending on its exact output shape.
173
+ Env and secret mutations (`env create`, `env remove`, `secret set`) choose their
174
+ destination like every other write command: an explicit `--bundle <source>`,
175
+ else `defaultWriteTarget`, else the working bundle. The chosen source must be
176
+ writable, or the command fails with a `ConfigError` before anything is written;
177
+ a git-backed writable target commits the mutation at a single operation
178
+ boundary. Reads (`list`, `show`, `path`, `run`, `export`) span all configured
179
+ sources.
180
180
 
181
- ## What this page does not cover
181
+ ## Stability
182
182
 
183
- This page documents akm's own guarantees for these two asset types, not the
184
- broader threat model (what a compromised bundle or malicious script could
185
- still do, what filesystem-level exposure remains, how this compares to a
186
- dedicated secrets manager). See [SECURITY.md](../../SECURITY.md) for that
187
- fuller picture, including plaintext-at-rest scope and rotation guidance.
183
+ `env list`, `env path`, `env export`, `env run`, `secret list` and `secret run`
184
+ are Stable. `env create`, `env remove` and `secret set` are Experimental. See
185
+ [STABILITY.md](../../STABILITY.md).
188
186
 
189
187
  ## See also
190
188
 
191
- - [Capture Knowledge](../guides/capture-knowledge.md) — `remember`, `import`,
192
- and when to reach for each
193
- - [CLI Reference](cli.md) — full flag documentation for `env` and `secret`
194
- - [SECURITY.md](../../SECURITY.md) — full threat model
189
+ - [Capture Knowledge](../guides/capture-knowledge.md): `remember`, `import`, and
190
+ when to reach for each
191
+ - [CLI Reference](cli.md): the `env` and `secret` commands
@@ -115,7 +115,7 @@ automation keeps working — agents that want the deeper summary follow
115
115
  - `akm search --belief` and `akm curate --belief` default to `current`; pass
116
116
  `--belief all` (API `belief: "all"`) for every belief state.
117
117
 
118
- ## Security / persistence implications
118
+ ## Storage
119
119
 
120
120
  - Memories are plain markdown files inside a bundle directory; there is no
121
121
  separate memory store. `akm improve` and `akm lint` only operate on
@@ -6,10 +6,9 @@ rename semantics, and namespacing conventions.
6
6
  ## Contract
7
7
 
8
8
  A **ref** is a compact handle identifying one capability. Agents should
9
- treat refs as opaque tokens — get them from search or curate, pass them to
10
- show. The structured `conceptId` and `bundle` fields in search results
11
- provide the same information in parseable form; never parse a ref string by
12
- hand.
9
+ treat refs as opaque tokens: get them from search or curate, pass them to
10
+ show. Search hits do not carry the bundle and conceptId as separate fields;
11
+ pass `ref` to `akm show` as it is instead of parsing it by hand.
13
12
 
14
13
  ## Grammar
15
14
 
@@ -21,21 +20,18 @@ hand.
21
20
  | --- | --- | --- |
22
21
  | `bundle` | no | Narrows lookup to one installed bundle, separated from the rest of the ref by `//`. Omit it and the ref resolves against the workspace `defaultBundle`, then the remaining bundles in installation-priority order. |
23
22
  | `conceptId` | yes | Subdir-qualified within its bundle: the placement subdirectory followed by the item's canonical name (extension stripped for markdown-like types; scripts and secrets keep their natural filename). `type` is not part of a ref — the subdirectory carries that signal. |
24
- | `fragment` | no | A selector for part of the item. Input-only — never stored. |
23
+ | `fragment` | no | A selector for part of the item, such as a markdown heading. `akm show` is the only command that accepts it; every other command rejects a ref that carries one. Input-only, never stored. |
25
24
 
26
25
  Examples: `scripts/deploy.sh`, `agents/reviewer`, `knowledge/api-guide`,
27
26
  `workflows/ship-release`, `team-catalog//scripts/deploy.sh`,
28
27
  `personal//knowledge/guide`, `knowledge/api-guide#authentication`.
29
28
 
30
29
  Source locators like `github:owner/repo` and `npm:@scope/pkg` are **install
31
- refs**, a distinct grammar accepted only by `akm bundle add` and `akm
32
- clone`. They are not asset refs and are never addressable through `akm
33
- show`.
30
+ refs**, a distinct grammar for `akm bundle add` and `akm clone`. They are not
31
+ asset refs and `akm show` does not accept them.
34
32
 
35
- This reference page is deliberately non-normative prose over the same
36
- grammar; [`docs/architecture/specs/ref.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/ref.md)
37
- is the normative spec, including the `parseBundleRef` grammar, fragment
38
- resolution rules, and reserved-name handling.
33
+ The full grammar, fragment resolution rules and reserved names are in
34
+ [`docs/architecture/specs/ref.md`](../architecture/specs/ref.md).
39
35
 
40
36
  ## Namespacing
41
37
 
@@ -51,8 +47,8 @@ knowledge/clientX/api-guide.md → knowledge/clientX/api-guide
51
47
  ```
52
48
 
53
49
  This works for **any** asset type. The subpath segments become part of the
54
- conceptId, so `akm search "projectA" --type memory` narrows results to that
55
- subtree, and `akm show memories/projectA/auth-tip` resolves the full ref.
50
+ conceptId, so `akm search "memories/projectA/"` lists that subtree and
51
+ `akm show memories/projectA/auth-tip` resolves the full ref.
56
52
 
57
53
  There is also a **ref-prefix query syntax** — a query that is a conceptId
58
54
  prefix ending in `/` enumerates that subtree instead of keyword-matching:
@@ -72,8 +68,7 @@ output and paste it back as a query. A complete ref
72
68
  (`memories/projectA/auth-tip`, no trailing `/`) stays an ordinary keyword
73
69
  search — resolving a single ref is `akm show`'s job.
74
70
 
75
- **Recommendation:** use physical subdirectories now to organize multi-project
76
- or multi-team bundles. They sort cleanly on disk and require no
71
+ Use physical subdirectories to organize multi-project or multi-team bundles. They sort cleanly on disk and require no
77
72
  configuration.
78
73
 
79
74
  **Which subdirectory?** Choose the partition axis by asset **type**:
@@ -84,8 +79,7 @@ current **project/client** slug; reuse-born types (`knowledge`, `skill`,
84
79
  limits, no-volatile-facets, off-axis facets as tags, and how to cross-link
85
80
  for retrieval — ship as the `facts/conventions/organization`,
86
81
  `facts/conventions/backlinks`, and `facts/conventions/domains` convention
87
- facts in the bundle skeleton, and are surfaced to agents automatically at
88
- authoring time.
82
+ facts in the bundle skeleton.
89
83
 
90
84
  ## Renames and moves
91
85
 
@@ -102,16 +96,13 @@ akm lint # confirms nothing dangles
102
96
  ```
103
97
 
104
98
  Moving an item between bundles is copy/import followed by deletion from the
105
- source — both the bundle and the concept identity change. `akm mv`, which
106
- promised identity-preserving renames, was removed in 0.9.0: its inbound-ref
107
- rewriting targeted bare conceptIds rather than the anchored
108
- `bundle//conceptId` prose form, so it could rewrite non-refs while leaving
109
- real refs dangling. The procedure above is the only supported path today.
99
+ source; both the bundle and the concept identity change. There is no
100
+ `akm mv`.
110
101
 
111
- To carry an asset's earned signal (feedback, usage, salience/outcome
112
- history) across a rename, the maintainer script `scripts/rekey-asset-ref.ts`
113
- re-keys those rows onto the new ref before `akm index` runs; it is Internal
114
- tooling, not a supported command surface.
102
+ To carry an asset's earned signal (feedback, usage, salience/outcome history)
103
+ across a rename, the maintainer script `scripts/rekey-asset-ref.ts` re-keys
104
+ those rows onto the new ref before `akm index` runs. It is internal tooling,
105
+ not a supported command.
115
106
 
116
107
  ## Refs in prose
117
108
 
@@ -122,18 +113,14 @@ conceptId in prose is ordinary text, not a ref, and no akm tool rewrites it.
122
113
 
123
114
  ## Stability
124
115
 
125
- Per `STABILITY.md`, this is **Stable** surface: the
126
- `[bundle//]conceptId[#fragment]` grammar (durable state always stores the
127
- fully-qualified `bundle//conceptId`; the short form is accepted input only),
128
- conceptId-prefix enumeration, and the rename-is-delete-plus-create procedure
129
- are all named explicitly in the Stable tier, and the ref grammar is called
130
- out as frozen at 1.0 alongside the supported source model, search behavior,
131
- and write-target rules. See `STABILITY.md` for the full command- and
132
- surface-level tier index.
116
+ The `[bundle//]conceptId[#fragment]` grammar, conceptId-prefix enumeration and
117
+ the rename procedure are Stable per [STABILITY.md](../../STABILITY.md). Durable
118
+ state always stores the fully-qualified `bundle//conceptId`; the short form is
119
+ accepted input only.
133
120
 
134
121
  ## See also
135
122
 
136
123
  - [Concepts](../guides/concepts.md) — where refs fit in the retrieval loop
137
124
  - [Asset Types](asset-types.md) — how a conceptId's subdirectory maps to an asset type
138
125
  - [Memory](memory.md) — parent/derived-memory provenance backrefs
139
- - [`docs/architecture/specs/ref.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/ref.md) — the normative ref grammar spec
126
+ - [`docs/architecture/specs/ref.md`](../architecture/specs/ref.md) — the ref grammar spec