akm-cli 0.9.30 → 0.9.31

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 (161) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +10 -10
  3. package/ROADMAP.md +112 -0
  4. package/dist/commands/improve/improve-cli.js +33 -12
  5. package/dist/core/file-lock.js +10 -1
  6. package/dist/llm/client.js +33 -3
  7. package/dist/scripts/akm-migrate-node.js +5 -1
  8. package/dist/scripts/akm-migrate.js +5 -1
  9. package/docs/README.md +42 -41
  10. package/docs/agents/README.md +15 -0
  11. package/docs/agents/agent-install.md +14 -0
  12. package/docs/architecture/README.md +67 -0
  13. package/docs/architecture/adapters.md +272 -0
  14. package/docs/architecture/akm-architecture-decision-history.md +2055 -0
  15. package/docs/architecture/akm-core-principles.md +126 -0
  16. package/docs/architecture/architecture.md +579 -0
  17. package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +550 -0
  18. package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +72 -0
  19. package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +142 -0
  20. package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +189 -0
  21. package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +97 -0
  22. package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +108 -0
  23. package/docs/architecture/decisions/0006-task-source-version-routing.md +124 -0
  24. package/docs/architecture/decisions/0007-workflow-composition-bounds.md +83 -0
  25. package/docs/architecture/decisions/0008-task-binding-normalization.md +88 -0
  26. package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +80 -0
  27. package/docs/architecture/decisions/0010-driver-protocol-cut.md +36 -0
  28. package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +125 -0
  29. package/docs/architecture/decisions/README.md +62 -0
  30. package/docs/architecture/improvement.md +440 -0
  31. package/docs/architecture/internals/classification.md +154 -0
  32. package/docs/architecture/internals/fresh-host-rebuild-runbook.md +40 -0
  33. package/docs/architecture/internals/functional-contract-patterns.md +340 -0
  34. package/docs/architecture/internals/health-advisories.md +110 -0
  35. package/docs/architecture/internals/improve-workflow.md +713 -0
  36. package/docs/architecture/internals/indexing.md +498 -0
  37. package/docs/architecture/internals/registry-network-boundary.md +57 -0
  38. package/docs/architecture/internals/search.md +249 -0
  39. package/docs/architecture/internals/storage-locations.md +943 -0
  40. package/docs/architecture/persisted-data-compat.md +59 -0
  41. package/docs/architecture/reviews/env-secret-access.md +319 -0
  42. package/docs/architecture/runtime-boundary-design.md +153 -0
  43. package/docs/architecture/specs/0.9.0-close-out-plan.md +361 -0
  44. package/docs/architecture/specs/0.9.0-decisions.md +528 -0
  45. package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +745 -0
  46. package/docs/architecture/specs/0.9.0-open-items-register.md +135 -0
  47. package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +740 -0
  48. package/docs/architecture/specs/0.9.0-release-surface-review.md +636 -0
  49. package/docs/architecture/specs/agent-command-engine-model-design.md +513 -0
  50. package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +501 -0
  51. package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +291 -0
  52. package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +2059 -0
  53. package/docs/architecture/specs/di-seams-plan.md +539 -0
  54. package/docs/architecture/specs/driver-protocol-keep-or-cut.md +275 -0
  55. package/docs/architecture/specs/fact-asset-type.md +142 -0
  56. package/docs/architecture/specs/improve-collapse-churn-detector-design.md +634 -0
  57. package/docs/architecture/specs/okf-support.md +148 -0
  58. package/docs/architecture/specs/ref.md +329 -0
  59. package/docs/architecture/specs/reviews/task-workflow-unification/README.md +72 -0
  60. package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +152 -0
  61. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +352 -0
  62. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +300 -0
  63. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +402 -0
  64. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +758 -0
  65. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +645 -0
  66. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +602 -0
  67. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +27 -0
  68. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +27 -0
  69. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +74 -0
  70. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +15 -0
  71. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +132 -0
  72. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +147 -0
  73. package/docs/architecture/specs/stash-conventions-code-spec.md +275 -0
  74. package/docs/architecture/specs/stash-organization-conventions.md +377 -0
  75. package/docs/architecture/specs/task-workflow-format-unification.md +721 -0
  76. package/docs/architecture/specs/workflow-engine-buy-vs-build.md +231 -0
  77. package/docs/architecture/specs/workflow-format-unification.md +437 -0
  78. package/docs/architecture/testing/manual-testing-checklist.md +3420 -0
  79. package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +924 -0
  80. package/docs/architecture/testing/task-workflow-manual-tests.md +1817 -0
  81. package/docs/architecture/testing/testing-workflow.md +446 -0
  82. package/docs/architecture/workflow-engine.md +274 -0
  83. package/docs/guides/README.md +33 -0
  84. package/docs/guides/author-bundles.md +310 -0
  85. package/docs/guides/author-workflows.md +520 -0
  86. package/docs/guides/bundles.md +321 -0
  87. package/docs/guides/capture-knowledge.md +136 -0
  88. package/docs/guides/claude-code-vs-akm-workflows.md +30 -0
  89. package/docs/guides/concepts.md +93 -0
  90. package/docs/guides/discover-and-load.md +158 -0
  91. package/docs/guides/getting-started.md +240 -0
  92. package/docs/guides/improve-the-library.md +246 -0
  93. package/docs/guides/knowledge-management.md +18 -0
  94. package/docs/guides/recipes/headless-install.md +97 -0
  95. package/docs/guides/recipes/website-source.md +28 -0
  96. package/docs/guides/run-workflows.md +279 -0
  97. package/docs/guides/scheduling.md +123 -0
  98. package/docs/guides/use-with-any-agent.md +129 -0
  99. package/docs/guides/wikis.md +81 -0
  100. package/docs/maintainers/README.md +19 -0
  101. package/docs/maintainers/curate-workmap.md +336 -0
  102. package/docs/maintainers/eval.md +3 -0
  103. package/docs/maintainers/local-development.md +108 -0
  104. package/docs/maintainers/release-checklist.md +103 -0
  105. package/docs/migration/README.md +2 -2
  106. package/docs/migration/release-notes/0.0.13.md +1 -1
  107. package/docs/migration/release-notes/0.1.0.md +1 -1
  108. package/docs/migration/release-notes/0.2.0.md +1 -1
  109. package/docs/migration/release-notes/0.3.0.md +1 -1
  110. package/docs/migration/release-notes/0.5.0.md +1 -1
  111. package/docs/migration/release-notes/0.6.0.md +1 -1
  112. package/docs/migration/release-notes/0.7.0.md +1 -1
  113. package/docs/migration/release-notes/0.7.3.md +2 -2
  114. package/docs/migration/release-notes/0.7.4.md +1 -1
  115. package/docs/migration/release-notes/0.7.5.md +1 -1
  116. package/docs/migration/release-notes/0.8.0.md +1 -1
  117. package/docs/migration/release-notes/0.9.0.md +1 -1
  118. package/docs/migration/release-notes/0.9.14.md +1 -1
  119. package/docs/migration/release-notes/0.9.15.md +1 -1
  120. package/docs/migration/release-notes/0.9.16.md +1 -1
  121. package/docs/migration/release-notes/0.9.17.md +1 -1
  122. package/docs/migration/release-notes/0.9.19.md +1 -1
  123. package/docs/migration/release-notes/0.9.2.md +1 -1
  124. package/docs/migration/release-notes/README.md +27 -31
  125. package/docs/migration/v0.5-to-v0.6.md +759 -0
  126. package/docs/migration/v0.8-to-v0.9.md +1 -1
  127. package/docs/plans/0.9.2-agent-command-workflow-plan.md +423 -0
  128. package/docs/posts/README.md +30 -0
  129. package/docs/posts/akm-command-tour.md +495 -0
  130. package/docs/posts/akm-logo-sized.webp +0 -0
  131. package/docs/posts/belief-aware-memory-12.md +139 -0
  132. package/docs/posts/config-v2-lessons-16.md +191 -0
  133. package/docs/posts/improve-loop-autonomous-10.md +225 -0
  134. package/docs/posts/improve-pipeline-debugging-0803.md +179 -0
  135. package/docs/posts/intro-part-01.md +76 -0
  136. package/docs/posts/intro-part-02.md +221 -0
  137. package/docs/posts/intro-part-03.md +190 -0
  138. package/docs/posts/intro-part-04.md +221 -0
  139. package/docs/posts/llm-mode-reflect-13.md +166 -0
  140. package/docs/posts/openpalm-built-on-akm.md +86 -0
  141. package/docs/posts/progressive-disclosure-06.md +129 -0
  142. package/docs/posts/proposal-safety-net-15.md +112 -0
  143. package/docs/posts/release-0.5.0.md +247 -0
  144. package/docs/posts/release-0.6.0.md +117 -0
  145. package/docs/posts/release-0.7.0.md +159 -0
  146. package/docs/posts/release-0.8.0.md +332 -0
  147. package/docs/posts/scattered-skills-05.md +100 -0
  148. package/docs/posts/task-assets-persistent-workflows-11.md +222 -0
  149. package/docs/posts/team-skills-07.md +198 -0
  150. package/docs/posts/wiki-agent-knowledge-08.md +223 -0
  151. package/docs/posts/workflows-vaults-09.md +321 -0
  152. package/docs/product-surface.md +54 -0
  153. package/docs/reference/README.md +1 -2
  154. package/docs/reference/asset-types.md +168 -0
  155. package/docs/reference/cli.md +5 -6
  156. package/docs/reference/env-and-secrets.md +126 -0
  157. package/docs/reference/memory.md +124 -0
  158. package/docs/reference/refs.md +156 -0
  159. package/docs/reference/registry.md +489 -0
  160. package/docs/reference/website-sources.md +141 -0
  161. package/package.json +12 -15
@@ -0,0 +1,321 @@
1
+ ---
2
+ title: Agents That Remember Where They Were
3
+ cover_image: 'https://raw.githubusercontent.com/itlackey/akm/main/docs/posts/akm-logo-sized.webp'
4
+ series: akm-workflows
5
+ description: 'akm 0.5.0 adds workflow assets, vault assets, and a writable synced stash.'
6
+ tags:
7
+ - ai
8
+ - agents
9
+ - cli
10
+ - workflows
11
+ published: true
12
+ id: 3538935
13
+ date: '2026-05-05T02:19:50Z'
14
+ ---
15
+
16
+ > This is a dated article from AKM's publishing archive. For current product behavior, see the
17
+ > [documentation index](https://github.com/itlackey/akm/blob/main/docs/README.md).
18
+
19
+ This is part nine in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. [Part one](https://dev.to/itlackey/your-ai-agents-skill-list-is-getting-out-of-hand-32ck) introduced progressive disclosure. [Part two](https://dev.to/itlackey/you-already-have-dozens-of-agent-skills-you-just-cant-find-them-bpo) unified your local assets across platforms. [Part seven](https://dev.to/itlackey) covered shared team skills via Git repos.
20
+
21
+ Ask an agent to ship a release and it will start confidently. It runs the build, opens the changelog, checks the branch. Then something interrupts the session — you close the terminal, the context window fills up, you need to switch tasks. When you come back, the agent has no idea where it left off. You either restart from scratch or spend time reconstructing what happened.
22
+
23
+ This is the central problem with agents and multi-step work. They're good at individual tasks. They're not naturally good at procedures — sequences of steps that span time, accumulate state, and need to be resumable when interrupted.
24
+
25
+ `akm` ships three features that address this directly: workflow assets for stored, resumable procedures; vault assets for secret-aware environment config; and a writable git stash that keeps your skill collection in sync across machines. This post explains what each one does and how they fit together.
26
+
27
+ ## The Problem: Tasks Versus Procedures
28
+
29
+ A task is "write this function." A procedure is "ship this release." Tasks have a beginning and end that fit inside a single context window. Procedures have steps, dependencies between steps, and state that persists across sessions.
30
+
31
+ When agents handle procedures today, the state lives only in the conversation. That's fine for a five-minute task. It breaks down for anything that takes an hour, involves multiple sessions, or needs to be audited later. If something fails at step four of seven, there's no standard way to resume at step five without replaying the whole context.
32
+
33
+ The workaround most developers reach for is a checklist in a markdown file. The agent checks off items as it goes. This works, but it's manual, fragile, and the state isn't queryable. You can't ask "which deployments are currently in-progress" if the state is scattered across markdown checkboxes in different files.
34
+
35
+ Workflow assets are the structured version of that checklist.
36
+
37
+ ## Workflow Assets: Stored Procedures Your Agent Can Step Through
38
+
39
+ Workflows live in `workflows/` in your stash. Each workflow is a markdown file with frontmatter declaring the procedure's parameters and a standard step format. You write the workflow once; the agent follows it on every run.
40
+
41
+ Here's what a release workflow looks like:
42
+
43
+ ```markdown
44
+ ---
45
+ description: Ship a production release
46
+ params:
47
+ version: "The version to release (e.g. 1.2.3)"
48
+ ---
49
+ # Workflow: Ship Release
50
+
51
+ ## Step: Validate inputs
52
+ Step ID: validate
53
+ ### Instructions
54
+ Check that version follows semver and that the release branch exists.
55
+ ### Completion Criteria
56
+ - Version matches x.y.z
57
+ - Branch release/{{ version }} exists
58
+
59
+ ## Step: Build
60
+ Step ID: build
61
+ ### Instructions
62
+ Run `bun run build` and verify dist/ was generated.
63
+
64
+ ## Step: Deploy to staging
65
+ Step ID: staging
66
+ ### Instructions
67
+ Run `./scripts/deploy.sh staging` and verify the health check passes.
68
+
69
+ ## Step: Deploy to production
70
+ Step ID: production
71
+ ### Instructions
72
+ Run `./scripts/deploy.sh production` after staging health check is green.
73
+ ```
74
+
75
+ The workflow defines the procedure. To run it, the agent creates a *run* — an instance of that procedure with a specific set of params:
76
+
77
+ ```sh
78
+ akm workflow start workflow:ship-release --params '{"version":"1.2.3"}' # doclint:ignore (historical workflow lifecycle removed in 0.9)
79
+ # Returns a run ID: run-abc123
80
+ ```
81
+
82
+ Now the procedure has state. The agent calls `akm workflow next` to get the current actionable step:
83
+
84
+ ```sh
85
+ akm workflow next workflow:ship-release # doclint:ignore (historical workflow lifecycle removed in 0.9)
86
+ # Returns: Step "validate" — Check that version follows semver...
87
+ ```
88
+
89
+ When the agent completes a step, it marks it done with notes:
90
+
91
+ ```sh
92
+ akm workflow complete run-abc123 --step validate --state completed --notes "Version 1.2.3, branch release/1.2.3 confirmed" # doclint:ignore (historical workflow lifecycle removed in 0.9)
93
+ ```
94
+
95
+ `--state` defaults to `completed` when omitted, so the `--state completed` above is redundant but explicit.
96
+
97
+ And the next call to `akm workflow next` returns the following step. The run persists independently of the conversation. If the session ends, a new agent picks up exactly where the previous one left off:
98
+
99
+ ```sh
100
+ akm workflow next workflow:ship-release # doclint:ignore (historical workflow lifecycle removed in 0.9)
101
+ # Returns: Step "build" — still in progress from the interrupted session
102
+ ```
103
+
104
+ Want to see the full state of a run?
105
+
106
+ ```sh
107
+ akm workflow status run-abc123
108
+ ```
109
+
110
+ `workflow status` also accepts a workflow ref directly, resolving to the most-recently-updated run:
111
+
112
+ ```sh
113
+ akm workflow status workflow:ship-release
114
+ ```
115
+
116
+ Ref-based workflow commands are scoped to the current working context, not all
117
+ workflow runs on the machine. In practice akm groups runs by the current
118
+ project/worktree/directory, so an active run in one repo or sandbox does not
119
+ block a different directory from starting its own run of the same workflow.
120
+
121
+ That shows each step with its status and any notes the agent recorded. You can list all active runs:
122
+
123
+ ```sh
124
+ akm workflow list --active
125
+ ```
126
+
127
+ The procedure is now auditable. You know which step failed, when, and what the agent noted. You can hand the run off to a different agent or a different developer. The state is outside the context window where it's durable.
128
+
129
+ If you need a starting point, `akm workflow template` prints a starter workflow doc you can adapt.
130
+
131
+ ### Resuming blocked or failed runs
132
+
133
+ Sometimes a run gets blocked — a step requires human input, an external dependency is unavailable, or a tool call fails. When that happens, the run transitions to `blocked` or `failed`. Use `workflow resume` to flip it back to `active` without discarding progress:
134
+
135
+ ```sh
136
+ akm workflow resume run-abc123
137
+ ```
138
+
139
+ Completed runs cannot be resumed. Use `workflow list` to find runs by status.
140
+
141
+ ## Vault Assets: The Agent Knows What It Needs, Not What the Values Are
142
+
143
+ Procedures that touch production environments need secrets — database URLs, API keys, deploy tokens. Putting those secrets in a skill file or a prompt is an obvious problem. But the agent still needs to know *which* secrets a given procedure requires.
144
+
145
+ Vault assets solve this. A vault is a `.env` file stored in `vaults/` in your stash. The design has one rule: values are never surfaced in structured output. The agent can inspect a vault and learn what keys exist. It never sees what those keys are set to.
146
+
147
+ ```sh
148
+ akm show vault:production
149
+ # Returns keys/comments only, never values
150
+ ```
151
+
152
+ This is enough for the agent to confirm "yes, the right secrets are configured for this environment" without the secrets appearing anywhere in the conversation or the context window.
153
+
154
+ When a script actually needs the values — at runtime, not at planning time — the agent runs the command through `vault run`:
155
+
156
+ ```sh
157
+ akm vault run vault:production -- ./deploy.sh # doclint:ignore (historical — akm 0.5.0 release-era post; `vault` type removed in 0.9.0, see `env`/`secret`)
158
+ ```
159
+
160
+ The values are loaded into the child process environment. They never pass through the agent's structured output. The agent's conversation log is clean.
161
+
162
+ Combined with a workflow, this fits naturally into an environment verification step. The agent calls `akm show vault:production` to confirm all required keys are present, marks the step complete, then later calls `akm vault run vault:production -- <command>` when a command actually needs the secrets. The workflow knows what's required. The agent confirms it. The command gets what it needs.
163
+
164
+ ## Writable Git Stash: Your Skills Sync Like Code
165
+
166
+ So far in this series, stashes have been read-only: you pull in a team repo or a remote source, and `akm` indexes it. In 0.5.0, a stash can be writable.
167
+
168
+ When you create a stash with `--writable`, `akm save` will stage, commit, and push your changes back to the remote:
169
+
170
+ ```sh
171
+ akm add git@github.com:your-org/skills.git --provider git --name team-skills --writable # doclint:ignore (historical — pre-0.9.0 command spelling)
172
+ ```
173
+
174
+ ```sh
175
+ # After editing or adding an asset
176
+ akm save team-skills -m "Add deploy workflow" # doclint:ignore (historical — akm 0.5.0 release-era post; `save` renamed `sync` in 0.9.0, `-m` survives as `sync`'s own alias)
177
+ ```
178
+
179
+ The behavior depends on the stash configuration:
180
+
181
+ | State | What happens |
182
+ | --- | --- |
183
+ | Not a git repo | Skipped |
184
+ | Git repo, no remote | Stage and commit only |
185
+ | Git repo, has remote, writable: false | Stage and commit only |
186
+ | Git repo, has remote, writable: true | Stage, commit, and push |
187
+
188
+ Your default stash — the one `akm init` creates — is auto-initialized as a local git repo. So by default, `akm save` gives you a commit history of every change you've made to your skill collection, without requiring a remote. Add a remote and flip `writable: true` when you're ready to sync across machines.
189
+
190
+ This changes how you think about managing your personal stash. It's not a pile of files in `~/.akm`. It's a versioned repository. You can see when you wrote a skill, what it looked like before you changed it, and whether your teammates have made updates since you last pulled.
191
+
192
+ ## How These Three Features Work Together
193
+
194
+ Consider a deployment procedure that a team runs regularly. Before 0.5.0, you'd write a deploy skill and hope the agent followed the steps in the right order. With 0.5.0:
195
+
196
+ **Step 1: Write the workflow once.**
197
+
198
+ ```sh
199
+ akm workflow create ship-release
200
+ # Edit workflows/ship-release.md with your team's exact steps
201
+ ```
202
+
203
+ **Step 2: Add a vault with the production secrets.**
204
+
205
+ The vault file lives at `vaults/production.env` in your stash. The keys are there; the values are managed separately through whatever secret management you use.
206
+
207
+ **Step 3: Save both to the team stash.**
208
+
209
+ ```sh
210
+ akm save team-skills -m "Add ship-release workflow and production vault" # doclint:ignore (historical — akm 0.5.0 release-era post; `save` renamed `sync` in 0.9.0, `-m` survives as `sync`'s own alias)
211
+ ```
212
+
213
+ Every developer on the team pulls the update with `akm update --all`. Now everyone has the same workflow and the same vault definition.
214
+
215
+ **Step 4: When it's time to deploy, the agent runs the procedure.**
216
+
217
+ ```sh
218
+ # Agent starts a run
219
+ akm workflow start workflow:ship-release --params '{"version":"2.0.0"}' # doclint:ignore (historical workflow lifecycle removed in 0.9)
220
+
221
+ # Gets the first step
222
+ akm workflow next workflow:ship-release # doclint:ignore (historical workflow lifecycle removed in 0.9)
223
+ # → "Validate inputs: confirm version and vault keys"
224
+
225
+ # Checks the vault without reading secrets
226
+ akm show vault:production
227
+ # → keys/comments only, never values
228
+
229
+ # Marks the step complete
230
+ akm workflow complete run-xyz --step validate --notes "All keys present" # doclint:ignore (historical workflow lifecycle removed in 0.9)
231
+
232
+ # Gets the next step
233
+ akm workflow next workflow:ship-release # doclint:ignore (historical workflow lifecycle removed in 0.9)
234
+ # → "Build: run bun run build..."
235
+ ```
236
+
237
+ If the session ends at the staging step, a fresh agent picks up with:
238
+
239
+ ```sh
240
+ akm workflow next workflow:ship-release # doclint:ignore (historical workflow lifecycle removed in 0.9)
241
+ # → "Deploy to staging" — still pending from the previous session
242
+ ```
243
+
244
+ No context reconstruction. No "where did we leave off?" The procedure state is in the workflow run, not the conversation.
245
+
246
+ When the deploy is done, commit any skill or workflow improvements back to the team repo:
247
+
248
+ ```sh
249
+ akm save team-skills -m "Improve staging health check step" # doclint:ignore (historical — akm 0.5.0 release-era post; `save` renamed `sync` in 0.9.0, `-m` survives as `sync`'s own alias)
250
+ ```
251
+
252
+ The team gets the improvement on next `akm update`.
253
+
254
+ ## Security Model
255
+
256
+ Vault assets have a clear security contract. Understanding it prevents both
257
+ false confidence and unnecessary alarm.
258
+
259
+ **Values never leave disk via akm commands.** This is the core invariant.
260
+ `akm show`, `akm vault list`, `akm search`, and every other structured output
261
+ command expose only key names and comments — never values. The two supported
262
+ paths that actually use values are `source "$(akm vault path vault:name)"` (the
263
+ shell loads the file directly) and `akm vault run vault:name -- <command>`
264
+ (values are injected into the child process environment). Neither path passes
265
+ values through akm's structured output.
266
+
267
+ **Key names are metadata — they are intentionally discoverable.** Key names
268
+ appear in `vault list`, `vault show`, search results, and agent context by
269
+ design. This is how an agent can confirm "yes, `DATABASE_URL` is configured in
270
+ this vault" without seeing its value. Do not treat key names as secrets.
271
+
272
+ **The `--sensitive` flag hides a vault from `vault list` only.** Creating a
273
+ vault with `akm vault create prod --sensitive` prevents it from appearing in
274
+ the default `vault list` output. It does not prevent key names from showing up
275
+ in search results or when the vault is shown directly with `akm show
276
+ vault:prod`. Use `--sensitive` to reduce noise, not to enforce secrecy.
277
+
278
+ **Dangerous key detection.** Vault keys with names like `LD_PRELOAD`, `PATH`,
279
+ `DYLD_INSERT_LIBRARIES`, or `NODE_OPTIONS` can be used to hijack process
280
+ execution when the vault is loaded via `akm vault run`. `akm add` and
281
+ `akm lint` both scan for these names. During install, `akm add` pauses and
282
+ asks for confirmation when dangerous keys are found (non-interactive mode fails
283
+ unless `--allow-dangerous-env-keys` is passed). The full list of 23 flagged key names is
284
+ documented in the [CLI reference](../reference/cli.md#dangerous-env-key-audit).
285
+
286
+ **When to use `--allow-dangerous-env-keys`.** Pass it to `akm bundle add` when
287
+ you have reviewed a bundle manually and confirmed that a dangerous environment
288
+ key is legitimate (for example, a hermetic toolchain that overrides `PATH`).
289
+ Plain-HTTP transport is a separate decision and requires
290
+ `--allow-insecure-transport`. Neither flag is a global config setting; each
291
+ applies only to the single invocation.
292
+
293
+ ## Getting Started
294
+
295
+ If you're on `akm` already, upgrade to the latest version:
296
+
297
+ ```sh
298
+ npm install -g akm-cli@latest
299
+ # or
300
+ akm upgrade
301
+ ```
302
+
303
+ The npm package requires Node.js >= 22. It prefers a working Bun >= 1.0 on
304
+ `PATH` and otherwise uses Node.js; the standalone binary is runtime-free.
305
+
306
+ To try workflows:
307
+
308
+ ```sh
309
+ akm workflow template # doclint:ignore (historical — akm 0.5.0 release announcement; `template` folded into `workflow create --print` in the 0.9.0 CLI overhaul)
310
+ # Copy the output to workflows/your-first-workflow.md and edit it
311
+ akm workflow create your-first-workflow
312
+ akm workflow start workflow:your-first-workflow # doclint:ignore (historical workflow lifecycle removed in 0.9)
313
+ ```
314
+
315
+ To add a vault, drop a `.env` file in `vaults/` in your stash. The format is standard `.env` — one `KEY=value` per line, comments with `#`.
316
+
317
+ To make your default stash writable, add a remote to the git repo in `~/.akm/stash` and update your stash config with `--writable`. Run `akm save -m "Initial commit"` to verify it pushes.
318
+
319
+ The repo is at [github.com/itlackey/akm](https://github.com/itlackey/akm). The [Getting Started guide](../guides/getting-started.md) covers initial setup if you're coming in new.
320
+
321
+ Agents are most useful when they can handle real work end-to-end. Real work usually involves multiple steps, sensitive configuration, and sessions that get interrupted. Workflows, vaults, and a writable stash close those gaps. Give them a try on the next multi-step task you'd normally hand off with a checklist.
@@ -0,0 +1,54 @@
1
+ # Product Surface
2
+
3
+ Every akm feature, with its status. Status meanings are in
4
+ [STABILITY.md](../STABILITY.md).
5
+
6
+ > [!NOTE]
7
+ > The 0.10 series makes every feature Stable or removes it.
8
+
9
+ ## Library
10
+
11
+ - [Bundles](guides/bundles.md): add local folders, git repos, npm packages and websites. *Stable*
12
+ - [Supported formats](reference/supported-formats.md): akm bundles, Claude Code and OpenCode folders, Agent Skills, wikis, websites. *Evolving*
13
+ - [Registries](reference/registry.md): find bundles others publish. *Evolving*
14
+ - Sync: commit and push a git-backed bundle. *Stable*
15
+
16
+ ## Find and load
17
+
18
+ - [Search, curate, show](guides/discover-and-load.md): find assets and load one by ref. *Stable*
19
+
20
+ ## Capture
21
+
22
+ - [Remember, import, clone](guides/capture-knowledge.md). *Stable*
23
+ - Feedback: rate an asset or attach a fix. *Stable*
24
+ - Lessons. *Experimental*
25
+
26
+ ## Improve
27
+
28
+ - [`akm improve` and proposals](guides/improve-the-library.md): reviewable changes from feedback and usage. *Evolving*
29
+ - Improve settings and strategies other than `default` and `consolidate`. *Experimental*
30
+ - Automatic acceptance (opt-in). *Experimental*
31
+ - Session extraction. *Experimental*
32
+
33
+ ## Monitor
34
+
35
+ - Health. *Evolving*
36
+ - Metrics. *Experimental*
37
+ - Log, lint. *Evolving*
38
+
39
+ ## Run work
40
+
41
+ - [Tasks and scheduling](guides/scheduling.md). *Evolving*
42
+ - [Workflows](guides/run-workflows.md). *Experimental*
43
+ - Agent dispatch and harnesses (Claude Code, Codex, OpenCode and others). *Evolving*
44
+ - Model aliases. *Evolving*
45
+
46
+ ## Environment and secrets
47
+
48
+ - [Read and inject](reference/env-and-secrets.md). *Stable*
49
+ - Create and change. *Experimental*
50
+
51
+ ## Setup and maintenance
52
+
53
+ - Install, setup, config, help, completions. *Stable*
54
+ - Upgrade, including agent plugins and `--next`. *Evolving*
@@ -2,7 +2,7 @@
2
2
 
3
3
  Authoritative reference documentation for the akm CLI and its data.
4
4
 
5
- - [Bundle Types](bundle-types.md) -- Pointer page: where the bundle-format compatibility table and adapter internals now live
5
+ - [Bundle Types](bundle-types.md) -- Supported bundle formats and compatibility
6
6
  - [CLI](cli.md) -- All `akm` commands and flags
7
7
  - [Configuration](configuration.md) -- Engines, strategies, bundles, and settings
8
8
  - [Supported Formats](supported-formats.md) -- Formats akm can index, from its own bundle layout to other tools' existing asset directories
@@ -17,4 +17,3 @@ Authoritative reference documentation for the akm CLI and its data.
17
17
  - [Website Sources](https://github.com/itlackey/akm/blob/main/docs/reference/website-sources.md) -- The pluggable fetcher API behind `akm import <url>` and other URL-based knowledge reads
18
18
  - [Data & Telemetry](data-and-telemetry.md) -- Exactly what akm reads and writes on your machine (no remote telemetry)
19
19
 
20
- See also: [akm-eval](https://github.com/itlackey/akm-eval) -- the evals and benchmarks for measuring whether `akm improve` is working, and the repo-root [Roadmap](https://github.com/itlackey/akm/blob/main/ROADMAP.md) -- high-level focus for upcoming releases.
@@ -0,0 +1,168 @@
1
+ # Asset Types
2
+
3
+ Reference for the capability taxonomy the native `akm` adapter recognizes,
4
+ the bundle directory layout, and the metadata every asset carries.
5
+
6
+ ## Contract
7
+
8
+ - akm's own native format (the `akm` adapter) recognizes **fourteen asset
9
+ types**: script, skill, command, agent, knowledge, instruction, env,
10
+ secret, workflow, lesson, memory, task, session, and fact.
11
+ - Scripts, knowledge, commands, agents, skills, and workflows are classified
12
+ by **file extension and content**, not by directory name. A `.sh` file is
13
+ a script whether it lives in `scripts/`, `deploy/`, or the bundle root; for
14
+ these types the conventional directory names below are an **opt-in
15
+ convention that improves indexing confidence**. The remaining types are
16
+ **directory-required**: env, secret, memory, lesson, fact, session, task,
17
+ and instruction assets are only discovered under their placement
18
+ directories (a memory-shaped `.md` outside `memories/` indexes as plain
19
+ knowledge).
20
+ - `type` is not part of an asset's ref — the placement subdirectory carries
21
+ that signal. See [Refs](refs.md).
22
+ - Ten additional *bundle formats* beyond akm's own (Claude Code and OpenCode
23
+ tool directories, OKF, LLM wikis, and more) are recognized, indexed, and
24
+ validated in place by their own adapters — see
25
+ [Bundle Types](bundle-types.md) for the full type-by-type table (purpose,
26
+ what the agent gets, and example ref) and the other-format read/write
27
+ picture.
28
+
29
+ ## Directory layout
30
+
31
+ There's no required structure, but this skeleton is the opt-in convention:
32
+
33
+ ```text
34
+ my-bundle/
35
+ scripts/ # Executable scripts (.sh, .ts, .js, .py, .rb, .go, etc.)
36
+ skills/ # Skill definitions (directories with SKILL.md)
37
+ commands/ # Slash commands (.md with $ARGUMENTS or agent frontmatter)
38
+ agents/ # Agent definitions (.md with model/tools frontmatter)
39
+ knowledge/ # Reference documents (.md)
40
+ instructions/ # Project guidance (.md)
41
+ env/ # Environment files (.env) — groups of related config, loaded whole
42
+ secrets/ # Secrets — one sensitive value per file (auth tokens, keys, certs)
43
+ workflows/ # Peer workflow sources (.md and .yml)
44
+ lessons/ # Distilled lessons (.md, see akm improve / proposals)
45
+ memories/ # Recalled context fragments (.md, see Memory reference)
46
+ facts/ # Durable bundle-level facts (.md)
47
+ tasks/ # Task source v4 scheduled or on-demand automation (.yml only)
48
+ sessions/ # Machine-placed indexed session summaries (.md)
49
+ .meta/ # Optional bundle orientation, not indexed (see "Bundle orientation" below)
50
+ ```
51
+
52
+ LLM Wikis are a related but separate concept: a wiki is its own installable
53
+ bundle (`akm bundle add github:team/research-wiki`), not a type-subdirectory
54
+ inside a regular bundle. See [Wikis](../guides/wikis.md) for how akm
55
+ recognizes and indexes them.
56
+
57
+ ## Classification taxonomy
58
+
59
+ Scripts and knowledge are classified by **what they are**: a `.sh` file is a
60
+ script; a plain `.md` file is knowledge. Commands and agents are classified
61
+ by **how an LLM should use them**: a `.md` file with `$ARGUMENTS`
62
+ placeholders is a command template; one with `tools` in its frontmatter is an
63
+ agent definition. Workflow assets may be `.md` or `.yml`: Markdown is
64
+ classified by `type: workflow` or placement, while the GitHub-shaped YAML
65
+ adapter validates the closed workflow subset. These are peer workflow sources,
66
+ not an md-only surface. Skills are a
67
+ **packaging convention**: a directory containing a `SKILL.md` file.
68
+
69
+ See [Classification](../architecture/internals/classification.md) for the
70
+ full specificity-based matching system.
71
+
72
+ ## Metadata field reference
73
+
74
+ Metadata lives with the asset itself, not in a separate sidecar file:
75
+ frontmatter for markdown assets, and structured comments for scripts. The
76
+ indexer derives metadata from filenames, code comments, frontmatter, and
77
+ `package.json`.
78
+
79
+ See [Filesystem Layout](../architecture/internals/storage-locations.md) for
80
+ the full field reference.
81
+
82
+ ### Bundle orientation: the `.meta/` convention
83
+
84
+ A bundle may carry an optional `.meta/` directory at its root holding
85
+ human-authored orientation for the bundle *as a whole* — purpose, key
86
+ assets, conventions, maintainer. This is distinct from per-asset metadata,
87
+ which still lives with each asset: `.meta/` never describes individual
88
+ assets, only the bundle itself.
89
+
90
+ ```text
91
+ my-bundle/
92
+ .meta/
93
+ index.md # shown by `akm show meta` — the default orientation doc
94
+ about.md # shown by `akm show meta:about`
95
+ conventions.md # shown by `akm show meta:conventions`
96
+ ```
97
+
98
+ Because `.meta/` is a dot-directory, the indexer skips it — these docs never
99
+ appear in `akm search` and never compete for ranking. They are **direct-read
100
+ on demand**:
101
+
102
+ ```sh
103
+ akm show meta # working bundle's .meta/index.md
104
+ akm show meta:about # working bundle's .meta/about.md
105
+ akm show akm//meta # the primary bundle explicitly
106
+ ```
107
+
108
+ `akm show <origin>//meta:<name>` resolves `<name>.md` first, then an
109
+ extensionless `<name>`. The convention is open-ended: bundle owners add new
110
+ docs by dropping files into `.meta/` — no configuration or code changes
111
+ required. `akm bundle create` scaffolds a starter `.meta/index.md`.
112
+
113
+ **Known gap:** an install-ref origin (`akm show github:owner/repo//meta`)
114
+ does not currently resolve even for an installed bundle — origin resolution
115
+ matches only derived installation ids, not raw install refs. Use `akm//meta`
116
+ for the primary bundle, or the bundle key you gave it in `bundles`
117
+ (`config.json`), not the original install ref.
118
+
119
+ ## Script execution (ExecHints)
120
+
121
+ For script assets, akm resolves execution hints in this order:
122
+
123
+ 1. Header comment tags (`@run`, `@setup`, `@cwd`)
124
+ 2. Auto-detection from extension and nearby dependency files
125
+
126
+ ## Defaults
127
+
128
+ - Directory placement is advisory for scripts, knowledge, commands, agents,
129
+ skills, and workflows; it is required for env, secret, memory, lesson,
130
+ fact, session, task, and instruction discovery.
131
+ - A memory asset with no source directory pointed at it is written to the
132
+ working bundle by `akm remember`.
133
+ - `facts/` holds durable bundle-level facts, including the organization,
134
+ backlink, and domain convention facts the bundle skeleton ships with (see
135
+ [Refs — namespacing](refs.md#namespacing)).
136
+
137
+ ## Security / persistence implications
138
+
139
+ - `env` and `secret` assets carry protected values: key names are
140
+ discoverable, but values are never written to stdout, the index, or
141
+ structured output. See `STABILITY.md`'s "Protected env & secret values"
142
+ entry for the exact contract and the safe injection path
143
+ (`akm env run` / `akm secret run`).
144
+ - All asset content is plain files inside the bundle directory — the search
145
+ index (`index.db`) is a derived, regenerable cache rebuilt by `akm index`;
146
+ it is never the source of truth for asset content.
147
+ - `akm lint` only operates on writable sources, and `akm improve` on one of
148
+ them: the bundle it writes to (`--bundle`, else `defaultWriteTarget`, else the
149
+ working bundle). Read-only registry caches (`git`, `npm`, `website`) are
150
+ excluded from improvement and lint passes even when they are indexed.
151
+
152
+ ## Stability
153
+
154
+ Per `STABILITY.md`: asset `type` is a free-form, open string — `--type`
155
+ filtering is exact-match against an open set and deliberately unvalidated
156
+ (an unrecognized type returns zero hits, not an error). The `lesson` asset
157
+ type's schema (`when_to_use`, `description`) is stable, but its
158
+ distillation triggers and ranking are Experimental tuning targets. See
159
+ `STABILITY.md` for the full command- and surface-level tier index.
160
+
161
+ ## See also
162
+
163
+ - [Concepts](../guides/concepts.md) — the four core ideas asset types fit into
164
+ - [Refs](refs.md) — how a conceptId is built from an asset's placement
165
+ - [Memory](memory.md) — the memory asset type's belief-state and derived-memory model
166
+ - [Bundle Types](bundle-types.md) — every bundle format akm recognizes, not just its own
167
+ - [Classification](../architecture/internals/classification.md) — the specificity-based matcher
168
+ - [Filesystem Layout](../architecture/internals/storage-locations.md) — full metadata field reference
@@ -614,9 +614,8 @@ assembled into the shape registry by the `src/output/shapes.ts` barrel:
614
614
  | `full` | full hit object (includes `ref`, `origin`, `tags`, `whyMatched`, optional `warnings`, optional `quality`, timings, bundle metadata) | full hit object |
615
615
  | `--shape agent` | `name`, `ref`, `type`, `path`, `editable`, conditional `editHint`, `description`, `action`, `score`, optional `estimatedTokens`/`keys` | no local access fields |
616
616
 
617
- `--shape summary` is **not valid on `search`** — see
618
- [`--shape summary`](#--shape-summary) above; it is a usage error (exit 2)
619
- everywhere except `akm show`.
617
+ `--shape summary` is **not valid on `search`** — see the `--shape summary`
618
+ section above; it is a usage error (exit 2) everywhere except `akm show`.
620
619
 
621
620
  There is no registry `curated` boolean. Renderers surface an optional
622
621
  `warnings: string[]` field on hits when a provider has non-fatal issues to
@@ -720,8 +719,8 @@ akm show memories/retro --filter user=alice --filter agent=claude
720
719
  human-authored orientation doc from a bundle's optional `.meta/` directory
721
720
  (`<name>` defaults to `index`; `.meta/<name>.md` is tried before an
722
721
  extensionless `.meta/<name>`). These files are never indexed, so they do not
723
- appear in `akm search`. See [concepts.md](https://github.com/itlackey/akm/blob/main/docs/guides/concepts.md#bundle-orientation-the-meta-convention)
724
- for the full convention.
722
+ appear in `akm search`. See [Concepts](../guides/concepts.md) for the full
723
+ convention.
725
724
 
726
725
  `--filter` accepts the same `<key>=<value>` shape as `akm search --filter` — one
727
726
  spelling for the scope-narrowing axis on both commands (`--scope` was removed
@@ -1350,7 +1349,7 @@ akm upgrade --next # Install the newest prerelease (@next) instead of the
1350
1349
  | `--check` | Report pending updates (CLI and per-harness plugins) without changing anything |
1351
1350
  | `--force` | Force upgrade even if on latest version |
1352
1351
  | `--skip-post-upgrade` | Skip the post-upgrade index rebuild |
1353
- | `--next` | Follow the `next` prerelease channel: install the newest prerelease of akm (and of the OpenCode plugin, see [Prereleases](#prereleases-next)). Works with `--check`, `--force` and `-q` |
1352
+ | `--next` | Follow the `next` prerelease channel: install the newest prerelease of akm (and of the OpenCode plugin, see the Prereleases section below). Works with `--check`, `--force` and `-q` |
1354
1353
 
1355
1354
  Offline, or to migrate without a release check, run `akm migrate apply`
1356
1355
  directly: it is the same step.