akm-cli 0.9.26-alpha.1 → 0.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +189 -0
- package/dist/assets/hints/cli-hints-full.md +18 -8
- package/dist/assets/hints/cli-hints-short.md +6 -5
- package/dist/assets/stash-skeleton/README.md +6 -2
- package/dist/commands/feedback-cli.js +354 -31
- package/dist/commands/improve/distill.js +61 -2
- package/dist/commands/improve/loop-stages.js +16 -1
- package/dist/commands/improve/memory/memory-belief.js +1 -1
- package/dist/commands/improve/preparation.js +46 -0
- package/dist/commands/improve/reflect.js +15 -4
- package/dist/commands/proposal/repository.js +23 -6
- package/dist/core/asset/akm-markdown.js +40 -16
- package/dist/core/asset/frontmatter.js +67 -7
- package/dist/core/config/config-schema.js +1 -1
- package/dist/core/config/config.js +0 -4
- package/dist/core/config/schema/feedback.js +2 -19
- package/dist/output/shapes/helpers.js +2 -0
- package/dist/output/text/proposal-format.js +5 -0
- package/dist/scripts/akm-migrate-node.js +8 -2
- package/dist/scripts/akm-migrate.js +8 -2
- package/dist/storage/repositories/proposals-repository.js +9 -0
- package/docs/reference/cli.md +43 -16
- package/docs/reference/configuration.md +7 -4
- package/docs/reference/data-and-telemetry.md +3 -3
- package/package.json +1 -1
- package/schemas/akm-config.json +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,195 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.26] - 2026-10-05
|
|
10
|
+
|
|
11
|
+
The stable release of the 0.9.26 line: 0.9.26-alpha.1 and alpha.2, and the
|
|
12
|
+
changes in this section. When upgrading from 0.9.25:
|
|
13
|
+
|
|
14
|
+
- **Consolidate retires far fewer notes that hold something the kept note
|
|
15
|
+
lacks.** Its pair judge lists what each note alone holds and akm never
|
|
16
|
+
retires a note with anything listed; on 385 held-out pair proposals, 91% of
|
|
17
|
+
its retirements are safe, against 61% before. A duplicate that a second look
|
|
18
|
+
confirms is accepted by the triage drain (alpha.1).
|
|
19
|
+
- **Negative feedback can carry the fix:** `akm feedback --negative --replace
|
|
20
|
+
"<exact text>" --with "<corrected>" --source "<evidence>"` (alpha.2), and
|
|
21
|
+
`--outdated` or `--superseded-by <ref>` to mark a note's history. Either
|
|
22
|
+
becomes one `feedback` proposal for review.
|
|
23
|
+
- **Negative feedback is for wrong or stale content.** The hints and docs say
|
|
24
|
+
so; a note that did not fit the task records nothing. Each feedback event now
|
|
25
|
+
records the hash of the text it judged, and reflect marks feedback given on
|
|
26
|
+
an earlier version.
|
|
27
|
+
- **Distill no longer accepts a lesson unattended.** A lesson that passes its
|
|
28
|
+
judge waits for review instead of the drain, and distill skips a memory
|
|
29
|
+
flagged wrong since its last edit, one whose only feedback is a positive
|
|
30
|
+
without a reason, and a lesson that already exists.
|
|
31
|
+
- **Fixed:** a proposal no longer rewraps a note's frontmatter to add its
|
|
32
|
+
`type`, and accepting one stamps its provenance as lines of its own instead
|
|
33
|
+
of writing the frontmatter out again; a feedback fix for an asset outside the
|
|
34
|
+
bundle's layout is refused instead of queued at the wrong path.
|
|
35
|
+
- **Removed:** `akm feedback --failure-mode` and `feedback.allowedFailureModes`
|
|
36
|
+
(an old config still loads, naming the key once).
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **`akm feedback --negative --superseded-by <ref>` and `--outdated` mark an
|
|
41
|
+
asset's history, in the same single `feedback` proposal as any `--replace`
|
|
42
|
+
edits.** `--superseded-by` (another asset replaces this one) sets
|
|
43
|
+
`beliefState: superseded` and adds the ref to `supersededBy`; akm resolves it
|
|
44
|
+
through the index first, and it must be indexed and not the asset itself, or
|
|
45
|
+
nothing is recorded. The rules are those of `akm remember --supersedes`: an
|
|
46
|
+
asset that already says so is left as it is, `contradicted` and `archived`
|
|
47
|
+
stay, and a scalar `supersededBy` becomes a list. `--outdated` (the asset
|
|
48
|
+
describes a past state and nothing replaces it) sets `beliefState:
|
|
49
|
+
deprecated`, unless the asset already says superseded, contradicted or
|
|
50
|
+
archived. Like every fix, both are for negative feedback and need `--reason`
|
|
51
|
+
and `--source`; they apply to markdown assets and are not used together. akm
|
|
52
|
+
edits only the `beliefState` and `supersededBy` lines of the text, so
|
|
53
|
+
comments, quoting, key order and line endings stay (it writes the frontmatter
|
|
54
|
+
out again only when a line edit cannot follow how a key is spelled), and `fix`
|
|
55
|
+
in the command's output and in the feedback event says what was set.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- **Each feedback event records the text it judged, and reflect marks feedback
|
|
60
|
+
given on an earlier version of it.** `akm feedback` adds `contentHash`, the
|
|
61
|
+
sha256 of the asset's body without its frontmatter as it stood when the
|
|
62
|
+
feedback was given, to the event and its usage row, for positive and negative
|
|
63
|
+
feedback. It is left out for an env or secret file, whose bytes akm never
|
|
64
|
+
reads, and when the file cannot be read. When reflect gathers an asset's
|
|
65
|
+
recent feedback, a line whose `contentHash` differs from the asset's current
|
|
66
|
+
body ends with ` (given on an earlier version of the text)`, so the model
|
|
67
|
+
knows the text changed since. A line without a `contentHash` (all feedback
|
|
68
|
+
recorded before this change) or with a matching one reads as before, and the
|
|
69
|
+
rest of the prompt is unchanged.
|
|
70
|
+
- **The shipped hints and docs say what negative feedback is for.** Record
|
|
71
|
+
`akm feedback --negative` only when an asset's content is wrong or stale, and
|
|
72
|
+
say what is wrong and what it should say. A note that simply did not fit the
|
|
73
|
+
task is not negative feedback: record nothing for it. Once the correct fact is
|
|
74
|
+
verified, attach the exact fix with `--replace`/`--with`/`--source`. Of the 195
|
|
75
|
+
negative reasons recorded in the last 30 days, 100 named no error in the note,
|
|
76
|
+
and 89 of those only said it did not fit the agent's task, which still lowered
|
|
77
|
+
the note's ranking and sent it to improve. The hints and the guides no longer
|
|
78
|
+
list "unhelpful" among the reasons to flag a note, and their example reasons
|
|
79
|
+
name a wrong fact instead of "wrong framework" or "incomplete-edge-cases". The
|
|
80
|
+
hints also say that an outdated note can be marked with `--outdated`, or
|
|
81
|
+
`--superseded-by <ref>` when another note replaces it.
|
|
82
|
+
- **Distill skips a memory that was flagged wrong and not edited since.** A
|
|
83
|
+
memory with negative feedback in the last 30 days on the text it still has is
|
|
84
|
+
no source for a lesson, so the improve loop skips distill for it: a
|
|
85
|
+
`distill-skipped` action with the reason "flagged wrong since its last edit"
|
|
86
|
+
and an `improve_skipped` event (`distill_flagged_wrong`). The attempt goes in
|
|
87
|
+
the improve ledger as `unchanged`, so the memory waits for newer feedback, and
|
|
88
|
+
reflect still plans it. Feedback records the hash of the body it judged
|
|
89
|
+
(`contentHash`), so a write that leaves the body alone, such as an inference
|
|
90
|
+
stamp or an accepted frontmatter repair, does not lift the flag; changing the
|
|
91
|
+
body does. Feedback recorded without a hash keeps the earlier test: it flags
|
|
92
|
+
the memory while it is newer than the file's last write (its modification
|
|
93
|
+
time, as in the retrieval scope's new-material test), so any later write ends
|
|
94
|
+
it. An explicit `akm improve <ref>` still distills it.
|
|
95
|
+
- **A distill proposal that passes the quality judge goes to review, not to the
|
|
96
|
+
drain.** The gate used to stamp a passing lesson (or knowledge promotion)
|
|
97
|
+
`staged`, and the triage drain accepted it on the next run with no one
|
|
98
|
+
looking. It is now minted `deferred` for a person: gate decision
|
|
99
|
+
`deferred`/`quality-gate` with the reason `distill-review`, carrying the
|
|
100
|
+
judge's per-criterion `scores` and `judgeReason`, so neither the drain nor its
|
|
101
|
+
judgment tier accepts it, and the improve ledger records `review_needed`. The
|
|
102
|
+
`distill_invoked` outcome is still `queued`. On 2026-10-05 the gate had
|
|
103
|
+
staged 12 lessons and 10 were bad (they restated the memory, claimed what it
|
|
104
|
+
does not say, or filed a dated status as a lesson); no judge score separated
|
|
105
|
+
them from the two good ones. A failed judgment behaves as before, and with
|
|
106
|
+
`processes.distill.qualityGate` off nothing is judged, so the proposal is
|
|
107
|
+
minted unstamped for the drain to decide.
|
|
108
|
+
- **Distill skips a memory whose only recent feedback is positive and says
|
|
109
|
+
nothing.** A bare `akm feedback --positive` records that a note helped, which
|
|
110
|
+
gives the writer nothing to distil, so it restated the memory: 10 of the 11
|
|
111
|
+
lessons made from a memory with only that kind of feedback were rejected (the
|
|
112
|
+
11th was good). When every feedback event in the last 30 days that counts as a
|
|
113
|
+
signal is positive with no reason and no note, the improve loop skips distill
|
|
114
|
+
for the memory: a `distill-skipped` action with the reason "only positive
|
|
115
|
+
feedback, without a reason" and an `improve_skipped` event
|
|
116
|
+
(`distill_positive_without_reason`). The attempt goes in the improve ledger as
|
|
117
|
+
`unchanged`, so the memory waits for newer feedback. A reason, a note or a
|
|
118
|
+
negative signal anywhere in the window lets it through, and an explicit
|
|
119
|
+
`akm improve <ref>` still distills it. Record `--reason` with a positive
|
|
120
|
+
signal to say what helped.
|
|
121
|
+
- **Distill no longer regenerates a lesson that already exists.** A lesson's ref
|
|
122
|
+
comes from its memory's name (`memories/deploy` gives
|
|
123
|
+
`lessons/memory-deploy-lesson`), so a second distill of the same memory
|
|
124
|
+
proposed the same ref, and accepting it replaced the lesson. All 5 such
|
|
125
|
+
overwrites recorded by the 2026-10-05 review were rejected. When the stash
|
|
126
|
+
the proposal is filed in already holds a file at the lesson ref, distill now
|
|
127
|
+
returns `skipped` with the reason `lesson_exists` (in the result and the
|
|
128
|
+
`distill_invoked` event) before any model call, mints no proposal and leaves
|
|
129
|
+
the memory untouched, and the improve loop records it in the ledger as
|
|
130
|
+
`unchanged`. A lesson of that name in another bundle does not count, since
|
|
131
|
+
the proposal would not replace it. To change a lesson, edit it.
|
|
132
|
+
|
|
133
|
+
### Removed
|
|
134
|
+
|
|
135
|
+
- **`akm feedback --failure-mode` and the `feedback.allowedFailureModes` config
|
|
136
|
+
key.** The flag labelled negative feedback `incorrect`, `outdated`,
|
|
137
|
+
`dangerous`, `incomplete` or `redundant`. None of the 195 negative feedback
|
|
138
|
+
events of the last 30 days set it, and nothing read it back. It now fails as an
|
|
139
|
+
unknown flag, and `akm feedback`'s output and the `improve_review_needed`
|
|
140
|
+
event no longer carry `failureMode`. A config that still sets
|
|
141
|
+
`feedback.allowedFailureModes` loads, names the key once as unknown, and
|
|
142
|
+
`akm migrate apply` drops it. Events recorded earlier keep their `failureMode`.
|
|
143
|
+
|
|
144
|
+
### Fixed
|
|
145
|
+
|
|
146
|
+
- **`akm feedback --replace` no longer queues a fix that accepting would turn
|
|
147
|
+
into a duplicate file.** A proposal writes the path computed from the ref's
|
|
148
|
+
type and name under the bundle's root, which is not where an asset indexed
|
|
149
|
+
outside that layout lives (a git bundle's `tasks/README.md` is
|
|
150
|
+
`knowledge/tasks/README`; a skill's `references/symptom-map.md` is
|
|
151
|
+
`knowledge/skills/<name>/references/symptom-map`). Accepting such a proposal
|
|
152
|
+
created a second file and left the real one unfixed. akm now refuses before
|
|
153
|
+
recording anything, naming the file and the path the proposal would write, and
|
|
154
|
+
says to edit the file directly. Plain negative feedback on these assets is
|
|
155
|
+
unaffected.
|
|
156
|
+
- **A proposal no longer rewraps, reorders or strips a note's frontmatter to
|
|
157
|
+
add or correct its `type`.** When a proposal's content had no `type:` or a
|
|
158
|
+
different one, akm re-serialized the whole frontmatter block, so the reviewer
|
|
159
|
+
of a one-line correction also saw long values rewrapped, keys reordered and
|
|
160
|
+
YAML comments dropped. In practice 40 of 70 one-line correction proposals did
|
|
161
|
+
this. akm now adds a missing `type:` (and `updated:`) as a line before the
|
|
162
|
+
closing `---`, or replaces the existing `type:` line where it stands, and
|
|
163
|
+
leaves every other byte as written, line endings and body included. It
|
|
164
|
+
re-serializes only when it cannot do that safely, such as a `type` value that
|
|
165
|
+
spans several lines. The same write path serves `akm remember`, `akm import`
|
|
166
|
+
and `akm workflow create`, so a note akm writes without a `type` now carries
|
|
167
|
+
it, and `updated`, as its last frontmatter lines instead of its first.
|
|
168
|
+
Accepting a proposal also stamps its provenance (`generated`, `verified`,
|
|
169
|
+
`provenance`) as lines of its own, the last of the frontmatter, instead of
|
|
170
|
+
writing the whole frontmatter out again; a staging run found the old stamp
|
|
171
|
+
rewrapping 3 of 16 accepted edits. Accept still turns CRLF into LF, and still
|
|
172
|
+
writes the frontmatter out again when it carries bookkeeping keys such as
|
|
173
|
+
`inferenceProcessed` from the live note into a proposal that lacks them.
|
|
174
|
+
- **`akm lint --fix` keeps a CRLF note's line endings** when it adds a missing
|
|
175
|
+
`updated:`. It used to rewrite the whole file to LF, so one added line showed
|
|
176
|
+
as every line changed.
|
|
177
|
+
|
|
178
|
+
## [0.9.26-alpha.2] - 2026-10-05
|
|
179
|
+
|
|
180
|
+
### Added
|
|
181
|
+
|
|
182
|
+
- **`akm feedback --negative` can carry an exact fix of the asset's text:**
|
|
183
|
+
`--replace "<exact current text>" --with "<corrected text>" --source "<URL,
|
|
184
|
+
command or file>"`, repeatable for several edits. akm checks at once that each
|
|
185
|
+
`--replace` text appears exactly once and that the frontmatter still parses,
|
|
186
|
+
records nothing if a check fails (so the caller can correct it and retry), and
|
|
187
|
+
queues the edit as a `feedback` proposal that shows the reason and source to
|
|
188
|
+
the reviewer. Improve has edited only an asset's frontmatter since 0.9.25, so
|
|
189
|
+
this is how a wrong fact in a note's text gets corrected: by the agent that
|
|
190
|
+
found it, with its evidence, instead of by a nightly rewrite.
|
|
191
|
+
|
|
192
|
+
### Changed
|
|
193
|
+
|
|
194
|
+
- **`akm feedback` help, the shipped hints and the docs no longer promise that
|
|
195
|
+
improve proposes a fix of the text from a negative reason;** they say it may
|
|
196
|
+
repair the frontmatter, and point to the exact-fix flags.
|
|
197
|
+
|
|
9
198
|
## [0.9.26-alpha.1] - 2026-10-05
|
|
10
199
|
|
|
11
200
|
### Changed
|
|
@@ -95,19 +95,29 @@ akm workflow create ship-release # Create a workflow asset in the
|
|
|
95
95
|
akm lint --type workflows # Parse and compile every .md/.yml workflow source; list every error
|
|
96
96
|
akm workflow run workflows/ship-release # Start or resume and execute the workflow
|
|
97
97
|
akm feedback skills/code-review --positive # Record that an asset helped (ranks it higher; no rewrite)
|
|
98
|
-
akm feedback agents/reviewer --negative --reason "
|
|
98
|
+
akm feedback agents/reviewer --negative --reason "says to run jest; the suite runs on vitest" # Content wrong or stale: lowers its ranking; improve may repair its frontmatter
|
|
99
|
+
akm feedback knowledge/opencode-server --negative --reason "the default port is 4096, not 8000" --replace "port 8000" --with "port 4096" --source "https://opencode.ai/docs/server/" # Queue an exact fix
|
|
99
100
|
akm feedback memories/deployment-notes --positive # Works for memories too
|
|
100
101
|
akm feedback env/prod --positive # Records env feedback without surfacing values
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
Use `akm feedback`
|
|
104
|
-
|
|
104
|
+
Use `akm feedback --positive` when an asset's content materially helps, so
|
|
105
|
+
future search ranking can learn from actual usage. Record negative feedback only
|
|
106
|
+
when the asset's content is wrong or stale, and say what is wrong and what it
|
|
107
|
+
should say.
|
|
105
108
|
`akm feedback <ref> --negative --reason "<what is wrong and what should change>"`
|
|
106
|
-
flags the asset
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
flags the asset: it ranks lower right away, and the next improve run may repair
|
|
110
|
+
its description, title or `when_to_use` from your reason. A note that simply did
|
|
111
|
+
not fit your task is not negative feedback: record nothing for it. Improve does
|
|
112
|
+
not rewrite an asset's text: once you have verified the correct fact, attach the
|
|
113
|
+
exact fix with `--replace "<exact current text>" --with "<corrected text>"
|
|
114
|
+
--source "<URL, command or file>"`, which akm checks and queues as a proposal.
|
|
115
|
+
A note that is outdated can be marked with `--outdated`, or
|
|
116
|
+
`--superseded-by <ref>` when another note replaces it.
|
|
117
|
+
`--positive` records that an asset helped (it raises its ranking) and does not
|
|
118
|
+
trigger a rewrite; improve no longer rewrites assets from positive signals or on
|
|
119
|
+
a proactive cadence. An akm command that fails says nothing about the asset;
|
|
120
|
+
don't record it as feedback.
|
|
111
121
|
|
|
112
122
|
## LLM Wiki bundles
|
|
113
123
|
|
|
@@ -8,7 +8,7 @@ For any task, follow this loop:
|
|
|
8
8
|
1. `akm curate "<task>"` — find the best matching asset
|
|
9
9
|
2. `akm show <ref>` — read the schema (field names and structure)
|
|
10
10
|
3. Edit the workspace file using schema field names + task-specific values from your README
|
|
11
|
-
4. `akm feedback <ref> --positive` — record that the asset helped (it raises its ranking and does not trigger a rewrite)
|
|
11
|
+
4. `akm feedback <ref> --positive` — record that the asset helped (it raises its ranking and does not trigger a rewrite). Record negative feedback only when the asset's content is wrong or stale, and say what is wrong and what it should say. `akm feedback <ref> --negative --reason "<what is wrong and what should change>"` flags it: the next improve run may repair its description, title or `when_to_use` from your reason, but not its text. A note that simply did not fit your task is not negative feedback: record nothing for it. Once you have verified the correct fact, add the exact fix: `--replace "<exact current text>" --with "<corrected text>" --source "<URL, command or file>"`. A note that is outdated can be marked with `--outdated`, or `--superseded-by <ref>` when another note replaces it. A failed akm command (e.g. `akm show` erroring) is not feedback on the asset — don't record it.
|
|
12
12
|
|
|
13
13
|
For workflow tasks:
|
|
14
14
|
1. `akm show workflows/<name>` — inspect the procedure before executing it
|
|
@@ -40,7 +40,8 @@ akm proposal diff skills/akm-dream # Diff proposal by ref, UUID, or 8
|
|
|
40
40
|
akm proposal accept 7c115132 # Accept by UUID prefix
|
|
41
41
|
akm proposal reject skills/my-skill --reason "..." # Reject by ref
|
|
42
42
|
akm feedback <ref> --positive # Record that an asset helped (ranks it higher; no rewrite)
|
|
43
|
-
akm feedback <ref> --negative --reason "..." #
|
|
43
|
+
akm feedback <ref> --negative --reason "..." # Content wrong or stale: lowers its ranking; improve may repair its frontmatter
|
|
44
|
+
akm feedback <ref> --negative --reason "..." --replace "<exact text>" --with "<fix>" --source "<url|cmd|file>" # Queue an exact fix of its text
|
|
44
45
|
akm bundle add <ref> # Add a source (npm, GitHub, git, local dir)
|
|
45
46
|
akm clone <ref> # Copy an asset to the working bundle (optional --dest arg to clone to specific location)
|
|
46
47
|
akm sync # Commit (and push if writable remote) changes in the primary bundle (--no-push to commit only)
|
|
@@ -64,9 +65,9 @@ akm search "<query>" --from registry # Search all registries (registry
|
|
|
64
65
|
| secret | A single sensitive value for AUTHENTICATION (token, key, cert); name only. Inject with `akm secret run <ref> <VAR> -- <cmd>`. |
|
|
65
66
|
| lesson | A distilled feedback lesson: `content` plus `action` (rendered from the `when_to_use` frontmatter). Read both before applying a related skill. Generated by the improve pipeline and promoted through the proposal queue. |
|
|
66
67
|
|
|
67
|
-
When an asset's content meaningfully helps, or proves wrong
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
When an asset's content meaningfully helps, or proves wrong or stale, record
|
|
69
|
+
that with `akm feedback` so future search ranking can learn from real usage.
|
|
70
|
+
Only negative feedback with a specific reason gets the asset reviewed and
|
|
70
71
|
fixed: improve no longer rewrites assets from positive signals or on a
|
|
71
72
|
proactive cadence. An akm command that fails says nothing about the asset;
|
|
72
73
|
don't record it as feedback.
|
|
@@ -80,10 +80,14 @@ akm search "<query>" --type skill
|
|
|
80
80
|
# Mark an asset as helpful (raises its ranking; does not trigger a rewrite)
|
|
81
81
|
akm feedback <ref> --positive
|
|
82
82
|
|
|
83
|
-
# Flag an asset
|
|
84
|
-
#
|
|
83
|
+
# Flag an asset whose content is wrong or stale: it ranks lower, and the next
|
|
84
|
+
# improve run may repair its description, title or when_to_use from your reason.
|
|
85
|
+
# A note that simply did not fit your task gets no negative feedback.
|
|
85
86
|
akm feedback <ref> --negative --reason "<what is wrong and what should change>"
|
|
86
87
|
|
|
88
|
+
# Once you have verified the correct fact, attach the exact fix: it is checked and queued for review
|
|
89
|
+
akm feedback <ref> --negative --reason "<what is wrong>" --replace "<exact current text>" --with "<corrected text>" --source "<URL, command or file>"
|
|
90
|
+
|
|
87
91
|
# Capture a durable lesson or memory from the current session
|
|
88
92
|
akm remember "<fact or lesson>"
|
|
89
93
|
```
|