akm-opencode 0.8.0-rc.8 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -30
- package/agent/akm-curator.md +4 -4
- package/commands/akm-improve-asset.md +9 -0
- package/commands/akm-propose-asset.md +1 -1
- package/commands/akm-review-proposals.md +2 -1
- package/index.ts +1056 -534
- package/package.json +10 -3
- package/shared/feedback-signals.ts +74 -0
- package/shared/memory-candidates.ts +196 -0
- package/shared/memory-events.ts +122 -0
- package/shared/recall-policy.ts +70 -0
- package/shared/redaction.ts +292 -0
- package/shared/ref-extraction.ts +261 -0
- package/commands/akm-distill-lesson.md +0 -7
- package/commands/akm-reflect-on-failure.md +0 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# akm-opencode
|
|
2
2
|
|
|
3
|
-
OpenCode plugin for the [AKM](https://github.com/itlackey/akm) CLI (v0.
|
|
3
|
+
OpenCode plugin for the [AKM](https://github.com/itlackey/akm) CLI (v0.8.0+). Registers tools that let your AI agent **search**, **show**, and **manage** stash assets — skills, commands, agents, knowledge, memories, lessons, tasks, scripts, workflows, vaults, secrets, and wikis — **operate the v0.8.0 proposal queue** and **improve assets** through dedicated tools, plus **agentic hooks** that auto-load relevant assets into each turn, record feedback when assets are used (skipping proposed-quality drafts), and harvest session memories so the stash improves with every session.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -14,28 +14,28 @@ Add to your OpenCode config (`opencode.json`):
|
|
|
14
14
|
|
|
15
15
|
## Tools
|
|
16
16
|
|
|
17
|
-
The plugin exposes **
|
|
17
|
+
The plugin exposes **21 high-value tools**. Long-tail verbs (`add`, `save`, `import`, `clone`, `update`, `remove`, `list`-sources, `registry-search`, `index`-reindex, `config`, `upgrade`, `tasks`, ad-hoc `run`, raw `agent`, vault writes, secret writes/run) are reachable via `akm_help` plus the raw `akm` CLI through the `bash` tool.
|
|
18
18
|
|
|
19
19
|
| Tool | Description |
|
|
20
20
|
|------|-------------|
|
|
21
21
|
| `akm_info` | Show `akm info` output together with the installed `akm-opencode` plugin version and install location |
|
|
22
|
-
| `akm_search` | Search the local stash, the registry, or both. Type filter accepts `skill`, `command`, `agent`, `knowledge`, `lesson`, `memory`, `script`, `workflow`, `vault`, `wiki`, `any`; proposed hits can be included explicitly |
|
|
22
|
+
| `akm_search` | Search the local stash, the registry, or both. Type filter accepts `skill`, `command`, `agent`, `knowledge`, `lesson`, `memory`, `script`, `task`, `workflow`, `vault`, `secret`, `wiki`, `any`; proposed hits can be included explicitly |
|
|
23
23
|
| `akm_show` | Show a stash asset by its ref |
|
|
24
24
|
| `akm_agent` | Dispatch a stash `agent:*` into OpenCode using the stash prompt and metadata |
|
|
25
25
|
| `akm_cmd` | Execute a stash `command:*` template in OpenCode via SDK session prompting |
|
|
26
26
|
| `akm_remember` | Record a memory in the default stash |
|
|
27
|
-
| `akm_feedback` | Record positive or negative feedback for a stash asset (skipped automatically for `memory:`, `vault:`, `lesson:`, and proposed-quality refs) |
|
|
27
|
+
| `akm_feedback` | Record positive or negative feedback for a stash asset (skipped automatically for `memory:`, `vault:`, `secret:`, `lesson:`, and proposed-quality refs) |
|
|
28
28
|
| `akm_curate` | Curate the stash for a task or topic and return ranked matches the agent can use |
|
|
29
29
|
| `akm_evolve` | Dispatch the AKM curator subagent into a child session, capture the report as a memory, and seed the curator-context cache so it survives compaction |
|
|
30
30
|
| `akm_parent_messages` | Summarize the parent OpenCode session so dispatched stash subagents can inherit upstream context |
|
|
31
31
|
| `akm_session_messages` | Summarize a specific OpenCode session (arbitrary IDs restricted to `akm-curator`) |
|
|
32
|
-
| `akm_vault` | Vault `list` / `show` (key names) / `
|
|
32
|
+
| `akm_vault` | Vault `list` / `show` (key names) / `load` (writes the shell snippet to a temp file path without surfacing values inline). **Values never surface** through tool output |
|
|
33
|
+
| `akm_secret` | Secret `list` / `path` only. Returns refs or the absolute file path for `_FILE`-style consumers without reading contents |
|
|
33
34
|
| `akm_wiki` | Manage wikis (`create`, `register`, `list`, `show`, `pages`, `search`, `stash`, `lint`, `ingest`, `remove`) |
|
|
34
35
|
| `akm_workflow` | Drive workflow runs (`start`, `next`, `complete`, `status`, `list`, `create`, `template`, `resume`) |
|
|
35
|
-
| `akm_proposal` | Operate the v0.
|
|
36
|
-
| `
|
|
36
|
+
| `akm_proposal` | Operate the v0.8.0 proposal queue (`list` / `show` / `diff` / `accept` / `reject`). Always confirm with the user before `accept`/`reject` — those operations require explicit approval |
|
|
37
|
+
| `akm_improve` | Generate improvement proposals for an existing ref, a whole asset type, or the current stash scope; output lands in the proposal queue only |
|
|
37
38
|
| `akm_propose` | Generate a new-asset proposal via the configured agent CLI; the result is `quality:"proposed"` until accepted |
|
|
38
|
-
| `akm_distill` | Distill an AKM ref (typically `memory:*` or `knowledge:*`) into a proposed `lesson` (gated by `llm.features.feedback_distillation`) |
|
|
39
39
|
| `akm_init` | Initialize AKM's working stash directory and persist `stashDir` in config. This is the agent-safe initialization path; interactive `akm setup` is human-facing |
|
|
40
40
|
| `akm_help` | Discover the right `akm` CLI invocation for non-first-class verbs. Returns a curated quick-reference table plus live `akm <subcommand> --help` output |
|
|
41
41
|
|
|
@@ -43,25 +43,78 @@ The plugin exposes **20 high-value tools**. Long-tail verbs (`add`, `save`, `imp
|
|
|
43
43
|
|
|
44
44
|
The plugin subscribes to OpenCode lifecycle events so AKM participates in the
|
|
45
45
|
session loop instead of waiting to be called. Every hook is non-blocking and
|
|
46
|
-
fails silently when `akm` is not
|
|
46
|
+
fails silently when a compatible `akm` is not resolvable — the TUI is never affected.
|
|
47
47
|
|
|
48
48
|
| Event | What happens |
|
|
49
49
|
| --- | --- |
|
|
50
|
-
| **`session.created`** (event hook) | Sets
|
|
50
|
+
| **`session.created`** (event hook) | Sets the AKM default agent in `~/.config/akm/config.json` to `opencode` when missing, warms the stash index in the background, caches `akm hints` plus active workflow status, and runs a scoped `akm curate --run <sessionID>` so fresh sessions start with relevant stash context. |
|
|
51
51
|
| **`chat.message`** | Records user feedback/memory intent and appends a short reminder to use `akm_search` / `akm_curate` when more stash context is needed. It does not auto-run AKM CLI lookups on every message. |
|
|
52
52
|
| **`experimental.chat.system.transform`** | Appends cached hints, active workflow state, pending proposal summaries, the last curator report, and the current prompt's curated context to the model's system prompt. Hints and workflow state are re-injected after transcript compaction. |
|
|
53
|
-
| **`tool.execute.before`** (`akm_*` tools) | Blocks destructive or sensitive operations until `confirm:true` is provided. |
|
|
54
|
-
| **`permission.ask`** / **`command.execute.before`** | Detects risky raw `akm` CLI commands executed through shell/commands and denies them until the user explicitly approves the exact operation. |
|
|
53
|
+
| **`tool.execute.before`** (`akm_*` tools) | Blocks destructive or sensitive operations on the plugin's own typed tools (`akm_vault show/load`, `akm_secret path`, `akm_proposal accept`, etc.) until `confirm:true` is provided. This contract is per-tool, not a generic shell-command gate. |
|
|
55
54
|
| **`tool.execute.after`** (`akm_*` tools) | Logs asset usage, accumulates refs into the session buffer, records `akm feedback <ref> --positive` / `--negative` asynchronously with per-call dedupe, checkpoints memories every `AKM_MEMORY_CHECKPOINT_EVERY` successful asset-touching tool calls, and scans child-agent free text for additional refs. |
|
|
56
55
|
| **`experimental.session.compacting`** | Pushes hints, curated context, active workflows, and the last curator report into the compaction prompt so they survive transcript shrinking. |
|
|
57
|
-
| **`shell.env`** | Exposes `
|
|
58
|
-
| **`stop`** / **`session.idle`** / **`session.compacted`** / **`session.deleted`** | Flushes the per-session buffer into a `memory:opencode-session-YYYYMMDD-<sid>` memory so every meaningful session contributes durable context for future searches. Requires at least two observations before persisting. When `AKM_INDEX_ON_SESSION_END=1`, the hook follows a successful flush with `akm index` so upstream inference/graph passes run immediately. |
|
|
56
|
+
| **`shell.env`** | Exposes `AKM_PROJECT`, `AKM_PLUGIN_VERSION`, and the resolved `AKM_STASH_DIR` to shell tools so raw shell checks and plain `akm` invocations see the same stash path as the plugin. |
|
|
57
|
+
| **`stop`** / **`session.idle`** / **`session.compacted`** / **`session.deleted`** | Flushes the per-session buffer into a `memory:opencode-session-YYYYMMDD-<sid>` memory so every meaningful session contributes durable context for future searches. The persisted memory now includes compact event/candidate summaries plus explicit file paths to the full-detail plugin state and OpenCode host logs so `akm improve` can inspect deeper evidence when needed. Requires at least two observations before persisting. When `AKM_INDEX_ON_SESSION_END=1`, the hook follows a successful flush with `akm index` so upstream inference/graph passes run immediately. |
|
|
58
|
+
|
|
59
|
+
### Locking down destructive commands
|
|
60
|
+
|
|
61
|
+
Earlier versions of this plugin shipped `permission.ask` and
|
|
62
|
+
`command.execute.before` hooks that tokenized each raw `akm` CLI invocation
|
|
63
|
+
and **denied** a hard-coded list of risky subcommands (vault writes,
|
|
64
|
+
`save --push`, `accept` / `reject` / `revert`, `tasks add` / `tasks run`,
|
|
65
|
+
`upgrade`, `update --all`, etc.) until the user re-approved them inline.
|
|
66
|
+
That gate has been removed in 0.8.0. The tokenized matcher was brittle — it
|
|
67
|
+
produced false positives on commit messages, heredoc bodies, and other
|
|
68
|
+
prose that happened to contain `akm <verb>` substrings — and gating
|
|
69
|
+
destructive shell calls is fundamentally the host platform's job, not a
|
|
70
|
+
plugin's.
|
|
71
|
+
|
|
72
|
+
OpenCode does not currently expose a first-class declarative permission
|
|
73
|
+
DSL equivalent to Claude Code's `permissions.ask` / `permissions.deny`.
|
|
74
|
+
For the verbs that historically tripped the plugin's gate, lock things
|
|
75
|
+
down at the OS level instead:
|
|
76
|
+
|
|
77
|
+
- **Run `akm` under a wrapper script** that prompts (or denies) on the
|
|
78
|
+
destructive subcommands you care about. Put the wrapper earlier on
|
|
79
|
+
`PATH` than the real `akm`. For example:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
#!/usr/bin/env bash
|
|
83
|
+
# ~/bin/akm — wraps the real akm to confirm destructive verbs
|
|
84
|
+
case "$1 $2 $3" in
|
|
85
|
+
"vault set "*|"vault unset "*|"vault load "*|"vault create "*|\
|
|
86
|
+
"save --push"*|"sync "*|"sync"|"remove "*|\
|
|
87
|
+
"accept "*|"reject "*|"revert "*|\
|
|
88
|
+
"proposal accept "*|"proposal reject "*|"proposal revert "*|"proposal drain "*|\
|
|
89
|
+
"tasks add "*|"tasks remove "*|"tasks enable "*|"tasks disable "*|\
|
|
90
|
+
"tasks run "*|"upgrade"*|"update --all"*|"config set "*)
|
|
91
|
+
read -rp "Run 'akm $*' ? [y/N] " ans
|
|
92
|
+
[[ "$ans" == "y" || "$ans" == "Y" ]] || { echo "aborted"; exit 1; } ;;
|
|
93
|
+
esac
|
|
94
|
+
exec /usr/local/bin/akm-real "$@"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- **Use OS-level access controls** (`sudo`, `chmod`, mount restrictions,
|
|
98
|
+
AppArmor / SELinux profiles) when running OpenCode in shared or
|
|
99
|
+
sandboxed environments.
|
|
100
|
+
- **Vault and secret writes still bypass the chat turn entirely.** Use the typed
|
|
101
|
+
`akm_vault` tool only for read paths (`list`, `show` of key names,
|
|
102
|
+
`load` when you need a temporary shell-file path without surfacing
|
|
103
|
+
values inline), and the typed `akm_secret` tool only for `list` / `path`.
|
|
104
|
+
To create vaults or set/unset values, or to set/run/remove whole-file
|
|
105
|
+
secrets, run `akm env …` / `akm secret …` directly in the shell so
|
|
106
|
+
secret material never passes through the chat turn.
|
|
107
|
+
|
|
108
|
+
The plugin's typed `akm_*` tools (`akm_vault show`, `akm_proposal accept`,
|
|
109
|
+
etc.) still apply their per-tool `confirm:true` contracts at
|
|
110
|
+
`tool.execute.before`. Only the raw-shell tokenized gate has been removed.
|
|
59
111
|
|
|
60
112
|
### Environment overrides
|
|
61
113
|
|
|
62
114
|
| Variable | Default | Purpose |
|
|
63
115
|
| --- | --- | --- |
|
|
64
116
|
| `AKM_AUTO_CURATE` | `1` | Set to `0` to disable automatic `akm curate` on user messages. Session start no longer auto-curates. |
|
|
117
|
+
| `AKM_LOCAL_BUILD_CLI` | _(unset)_ | Optional absolute path to a locally built AKM CLI entrypoint such as `/abs/path/to/akm/dist/cli.js`. When set, the OpenCode plugin runs that build through Bun before falling back to bundled or PATH-based `akm` binaries. |
|
|
65
118
|
| `AKM_AUTO_FEEDBACK` | `1` | Set to `0` to disable automatic `akm feedback` on tool success/failure. |
|
|
66
119
|
| `AKM_AUTO_HINTS` | `1` | Set to `0` to skip injecting `akm hints` at session start. |
|
|
67
120
|
| `AKM_AUTO_MEMORY` | `1` | Set to `0` to disable automatic session-summary memories. |
|
|
@@ -76,7 +129,6 @@ fails silently when `akm` is not on PATH — the TUI is never affected.
|
|
|
76
129
|
| `AKM_RETROSPECTIVE_NEGATIVE_PATTERN` | `\b(wrong|failed|broken|didn't work|did not work|bad)\b` | Case-insensitive regex used for negative retrospective feedback signals. |
|
|
77
130
|
| `AKM_SCOPE_KEYS` | `user,agent,run,channel` | Comma-separated list of scope fields to attach on every `akm_remember`, `akm_curate`, and `akm_feedback` call. Remove a key to opt out of that dimension. |
|
|
78
131
|
| `AKM_PENDING_PROPOSAL_TIMEOUT` | `2` | Seconds allowed for lightweight pending-proposal count checks during context injection. |
|
|
79
|
-
| `AKM_PACKAGE_REF` | `akm-cli@latest` | Override the npm/bun package spec used for auto-install (e.g. pin to `akm-cli@0.7.0` in CI). |
|
|
80
132
|
|
|
81
133
|
### Curator agent
|
|
82
134
|
|
|
@@ -96,14 +148,13 @@ The plugin injects a concise AKM workflow instruction pack into context so agent
|
|
|
96
148
|
- record feedback after the result is known;
|
|
97
149
|
- treat `lesson:*` as first-class durable assets;
|
|
98
150
|
- treat proposed-quality assets as uncurated until accepted;
|
|
99
|
-
- use `akm_help` to route `proposal`, `
|
|
100
|
-
- require explicit user approval before proposal acceptance/rejection, push saves, source removal, CLI upgrades, update-all,
|
|
151
|
+
- use `akm_help` to route `proposal`, `improve`, `propose`, and `tasks` CLI workflows;
|
|
152
|
+
- require explicit user approval before proposal acceptance/rejection, push saves, source removal, CLI upgrades, update-all, vault value access, or secret-path access.
|
|
101
153
|
|
|
102
154
|
The package also ships OpenCode command docs for common workflows:
|
|
103
155
|
|
|
104
156
|
- `/akm-review-proposals`
|
|
105
|
-
- `/akm-
|
|
106
|
-
- `/akm-reflect-on-failure`
|
|
157
|
+
- `/akm-improve-asset`
|
|
107
158
|
- `/akm-propose-asset`
|
|
108
159
|
- `/akm-evolve-session`
|
|
109
160
|
- `/akm-workflow-status`
|
|
@@ -120,7 +171,7 @@ Inputs:
|
|
|
120
171
|
- `ref` (optional): stash ref like `agent:coach.md`
|
|
121
172
|
- `query` (optional): resolve best matching stash agent when `ref` is omitted
|
|
122
173
|
- `task_prompt` (required): user task to run
|
|
123
|
-
- `dispatch_agent` (optional): OpenCode agent name (defaults to `general`)
|
|
174
|
+
- `dispatch_agent` (optional): OpenCode agent name, or a `provider/model` override like `openai/gpt-5.3-codex` (defaults to `general`)
|
|
124
175
|
- `as_subtask` (optional): create child session (defaults to `true`)
|
|
125
176
|
|
|
126
177
|
At least one of `ref` or `query` is required.
|
|
@@ -128,6 +179,7 @@ At least one of `ref` or `query` is required.
|
|
|
128
179
|
Behavior:
|
|
129
180
|
- Loads the stash agent via `akm show`
|
|
130
181
|
- Uses stash `prompt` verbatim as OpenCode `system`
|
|
182
|
+
- Treats `dispatch_agent` values in `provider/model` form as model overrides and keeps a valid OpenCode agent in the `agent` field
|
|
131
183
|
- Applies stash `modelHint` when in `provider/model` format
|
|
132
184
|
- Applies stash `toolPolicy` when it maps to boolean tool flags
|
|
133
185
|
|
|
@@ -139,25 +191,25 @@ Inputs:
|
|
|
139
191
|
- `ref` (optional): stash ref like `command:review.md`
|
|
140
192
|
- `query` (optional): resolve best matching stash command when `ref` is omitted
|
|
141
193
|
- `arguments` (optional): raw command arguments for `$ARGUMENTS`, `$1`, `$2`, etc.
|
|
142
|
-
- `dispatch_agent` (optional): OpenCode agent name (defaults to current agent)
|
|
194
|
+
- `dispatch_agent` (optional): OpenCode agent name, or a `provider/model` override like `openai/gpt-5.3-codex` (defaults to current agent)
|
|
143
195
|
- `as_subtask` (optional): create child session (defaults to `false`)
|
|
144
196
|
|
|
145
197
|
At least one of `ref` or `query` is required.
|
|
146
198
|
|
|
147
199
|
## Prerequisites
|
|
148
200
|
|
|
149
|
-
When the plugin loads, it
|
|
201
|
+
When the plugin loads, it resolves the bundled `akm-cli` dependency installed with the plugin and requires an `akm` version that satisfies `^0.8.0`. It prefers that bundled binary first, falls back to an existing `akm` on PATH only when it also satisfies the same range, and otherwise returns a structured error telling you to reinstall or update the plugin so OpenCode/Bun installs the dependency. It does not run global installers from plugin runtime.
|
|
150
202
|
|
|
151
203
|
```sh
|
|
152
204
|
# macOS / Linux
|
|
153
205
|
curl -fsSL https://raw.githubusercontent.com/itlackey/akm/main/install.sh | bash
|
|
154
206
|
# PowerShell (Windows)
|
|
155
207
|
irm https://raw.githubusercontent.com/itlackey/akm/main/install.ps1 -OutFile install.ps1; ./install.ps1
|
|
156
|
-
|
|
157
|
-
# Or via Bun
|
|
158
|
-
bun install -g akm-cli@latest
|
|
159
208
|
```
|
|
160
209
|
|
|
210
|
+
Reinstall or update the plugin to let OpenCode/Bun install the bundled `akm-cli`
|
|
211
|
+
dependency automatically.
|
|
212
|
+
|
|
161
213
|
## Stash model
|
|
162
214
|
|
|
163
215
|
The stash directory is resolved automatically via a three-tier fallback: `AKM_STASH_DIR` env var (optional override) → `stashDir` in `config.json` → platform default. Set it persistently with:
|
|
@@ -176,14 +228,16 @@ stash/
|
|
|
176
228
|
├── agents/ # markdown files
|
|
177
229
|
├── knowledge/ # markdown files
|
|
178
230
|
├── memories/ # markdown memory files (akm remember)
|
|
179
|
-
├── lessons/ # first-class durable learnings (lesson:<name>) — produced by akm
|
|
231
|
+
├── lessons/ # first-class durable learnings (lesson:<name>) — often produced by akm improve, accepted via akm proposal accept
|
|
232
|
+
├── tasks/ # scheduled task definitions (task:<name>) managed via akm tasks ...
|
|
180
233
|
├── workflows/ # multi-step procedures (workflow:<name>)
|
|
181
234
|
├── vaults/ # .env secret stores (vault:<name>) — values never surface through structured output
|
|
235
|
+
├── secrets/ # whole-file secrets (secret:<name>) — contents never surface through structured output
|
|
182
236
|
├── wikis/ # per-wiki directories <name>/{schema,index,log}.md + raw/ + pages
|
|
183
|
-
└── .akm/proposals/ # v0.
|
|
237
|
+
└── .akm/proposals/ # v0.8.0 proposal queue — drafts that never leak into search or commits
|
|
184
238
|
```
|
|
185
239
|
|
|
186
|
-
## Vaults
|
|
240
|
+
## Vaults And Secrets
|
|
187
241
|
|
|
188
242
|
`akm_vault` is the one tool in this plugin with a hard contract on output. The
|
|
189
243
|
AKM CLI itself guarantees vault values never appear in JSON, the search index,
|
|
@@ -196,8 +250,14 @@ AKM CLI itself guarantees vault values never appear in JSON, the search index,
|
|
|
196
250
|
`eval "$(…)"` — do not log it, do not pass it through another tool, and do
|
|
197
251
|
not let the agent inspect it.
|
|
198
252
|
|
|
199
|
-
Automatic feedback recording (`tool.execute.after`) skips `vault:*`
|
|
200
|
-
|
|
253
|
+
Automatic feedback recording (`tool.execute.after`) skips `vault:*` and `secret:*`
|
|
254
|
+
refs so usage signals can't leak which sensitive asset was touched.
|
|
255
|
+
|
|
256
|
+
`akm_secret` mirrors the same safety boundary for whole-file secrets:
|
|
257
|
+
|
|
258
|
+
- `action: "list"` returns secret refs only.
|
|
259
|
+
- `action: "path"` returns the absolute file path without reading or surfacing contents.
|
|
260
|
+
- `action: "set"`, `"run"`, and `"remove"` are intentionally absent from the typed tool surface. Use raw `akm secret …` through the shell only after explicit user approval.
|
|
201
261
|
|
|
202
262
|
Assets are resolved from three source types: **working** (local stash), **search paths** (additional dirs via `searchPaths` config), and **installed** (registry kits via `akm add` — see `akm_help` topic="add").
|
|
203
263
|
|
package/agent/akm-curator.md
CHANGED
|
@@ -4,7 +4,7 @@ description: AKM stash curator. Reviews session activity and proposes stash impr
|
|
|
4
4
|
permission:
|
|
5
5
|
task: deny
|
|
6
6
|
tools:
|
|
7
|
-
|
|
7
|
+
akm_env: deny
|
|
8
8
|
write: deny
|
|
9
9
|
bash: deny
|
|
10
10
|
---
|
|
@@ -20,14 +20,14 @@ Inputs you should inspect:
|
|
|
20
20
|
Signals to act on:
|
|
21
21
|
- Hot refs: assets repeatedly appearing in positive tool outcomes. Call akm_feedback <ref> positive --note "curator: consistently useful" to reinforce.
|
|
22
22
|
- Cold refs: assets tied to failures or user complaints. Record akm_feedback <ref> negative --note "<excerpt>" and open the asset for review.
|
|
23
|
-
- Lesson candidates: repeated memories or failures that should become a proposed lesson. Use akm_help topic="
|
|
23
|
+
- Lesson candidates: repeated memories or failures that should become a proposed lesson. Use akm_help topic="improve" to surface the v0.8.0 improve flow (which replaces the old reflect/distill split) and propose an akm_improve <ref> call.
|
|
24
24
|
- Missing coverage: recurring user prompts with no matching asset. Draft a new skill, command, knowledge doc, wiki page, or workflow in the working stash and reindex via the akm CLI (see akm_help topic="reindex").
|
|
25
25
|
- Pending proposals: list or diff them via akm_help topic="proposal" and recommend accept, reject, or revise. Never accept or reject without explicit user approval.
|
|
26
26
|
- Duplicates / drift: near-identical descriptions or overlapping responsibilities. Propose a consolidation.
|
|
27
27
|
- Stale memories: session summaries that never get recalled. Propose removal (see akm_help topic="remove") once distilled into a durable knowledge doc or wiki page.
|
|
28
28
|
- Wiki hygiene: for each wiki returned by akm_wiki list, run akm_wiki lint <name> and report orphans, broken xrefs, uncited raws, and stale indexes as fix candidates.
|
|
29
29
|
- Stuck workflows: run akm_workflow list --active and surface any runs in blocked or failed state with their step ids. Propose whether to resume or escalate.
|
|
30
|
-
- Never touch
|
|
30
|
+
- Never touch env or secret values: do not call akm_env run or akm_secret path unless the user explicitly asks. Values must never appear in reports.
|
|
31
31
|
|
|
32
32
|
Rules of engagement:
|
|
33
33
|
- Never apply destructive changes without explicit user approval.
|
|
@@ -45,7 +45,7 @@ Output shape: end every run with a markdown report that has these sections:
|
|
|
45
45
|
- <ref> — failure signal — proposed fix
|
|
46
46
|
|
|
47
47
|
## Lesson candidates
|
|
48
|
-
- <theme> — evidence refs —
|
|
48
|
+
- <theme> — evidence refs — `akm improve <ref>` or `akm propose <type> <name> --task "..."` command to run
|
|
49
49
|
|
|
50
50
|
## Coverage gaps
|
|
51
51
|
- <theme> — proposed asset (type, name, one-line description)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Improve existing AKM assets or distill repeated evidence into proposals.
|
|
2
|
+
|
|
3
|
+
1. Identify the strongest evidence refs or the asset type that needs work.
|
|
4
|
+
2. Record negative feedback when justified.
|
|
5
|
+
3. Call `akm_help` with `topic: "improve"`.
|
|
6
|
+
4. Run `akm improve [<type>|<ref>] [--task "..."]`.
|
|
7
|
+
5. List resulting pending proposals and do not accept or reject them without explicit user approval.
|
|
8
|
+
|
|
9
|
+
Improve-profile config (`profiles.improve.<name>`) shapes the run: `processes.triage` is a triage PRE-pass that drains the pending backlog by a deterministic policy (`{ enabled, applyMode: queue|promote, policy, maxAcceptsPerRun, maxDiffLines, rejectEmpty, judgment }`, same engine as `akm proposal drain`); `sync` (`{ enabled, push, message }`, with `{timestamp}{date}{time}{scope}{refs}{accepted}` message tokens) commits/pushes a git-backed stash at end of run. Override sync with `akm improve --sync/--no-sync` and `--push/--no-push`. Triage + `akm proposal drain` is the built-in replacement for the old manual proposal-management agent session.
|
|
@@ -4,5 +4,5 @@ Create a proposed AKM asset for a coverage gap.
|
|
|
4
4
|
2. Confirm the gap is real.
|
|
5
5
|
3. Call `akm_help` with `topic: "propose"`.
|
|
6
6
|
4. Choose the smallest suitable asset type.
|
|
7
|
-
5. Run `akm propose <type> <name> --task "..."`.
|
|
7
|
+
5. Run `akm propose <type> <name> --task "..."` or `akm propose <type> <name> --file ./prompt.md`.
|
|
8
8
|
6. Show proposal review commands and remind the user that proposed assets are not curated until accepted.
|
|
@@ -2,6 +2,7 @@ Review pending AKM proposals safely.
|
|
|
2
2
|
|
|
3
3
|
1. Call `akm_help` with `topic: "proposal"`.
|
|
4
4
|
2. Run `akm proposal list --status pending --format json`.
|
|
5
|
-
3. For relevant proposals, run `akm proposal show <id>` and `akm proposal diff <id
|
|
5
|
+
3. For relevant proposals, run `akm proposal show <id>` and `akm proposal diff <id>` (positional id).
|
|
6
6
|
4. Summarize the likely accept, reject, or revise outcome.
|
|
7
7
|
5. Do not run `akm proposal accept` or `akm proposal reject` unless the user explicitly approves the exact command.
|
|
8
|
+
6. For a large backlog, suggest the deterministic bulk path: `akm proposal drain --policy <personal-stash|conservative|manual> --dry-run` to preview, then `--promote --yes` only after explicit approval (mutating; commits to git, no batch revert). This — plus the automatic `processes.triage` pre-pass inside `akm improve` — is the built-in replacement for the old manual proposal-management agent session.
|