akm-cli 0.9.20 → 0.9.22
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 +113 -1
- package/dist/assets/hints/cli-hints-full.md +9 -4
- package/dist/assets/hints/cli-hints-short.md +7 -4
- package/dist/assets/improve-strategies/default.json +2 -2
- package/dist/assets/improve-strategies/proactive-maintenance.json +1 -1
- package/dist/assets/improve-strategies/thorough.json +1 -1
- package/dist/assets/stash-skeleton/README.md +5 -1
- package/dist/commands/feedback-cli.js +14 -6
- package/dist/commands/health/improve-metrics.js +1 -1
- package/dist/commands/improve/distill.js +3 -1
- package/dist/commands/improve/improve-cli.js +1 -1
- package/dist/commands/improve/improve.js +3 -27
- package/dist/commands/improve/preparation.js +35 -29
- package/dist/commands/improve/proactive-maintenance.js +2 -9
- package/dist/commands/improve/reflect.js +3 -2
- package/dist/commands/improve/stage.js +36 -31
- package/dist/commands/proposal/repository.js +14 -11
- package/dist/commands/proposal/validators/proposals.js +8 -2
- package/dist/commands/remember.js +7 -1
- package/dist/core/improve-result.js +4 -1
- package/dist/core/write-source.js +28 -5
- package/dist/scripts/akm-migrate-node.js +4 -4
- package/dist/scripts/akm-migrate.js +4 -4
- package/dist/sources/providers/git-stash.js +16 -9
- package/dist/storage/repositories/improve-runs-repository.js +1 -3
- package/docs/reference/cli.md +41 -15
- package/package.json +1 -1
package/docs/reference/cli.md
CHANGED
|
@@ -1395,6 +1395,8 @@ value also looks like a format token.
|
|
|
1395
1395
|
| Git repo, no remote | Stage and commit only |
|
|
1396
1396
|
| Git repo, has remote, not writable | Stage and commit only |
|
|
1397
1397
|
| Git repo, has remote, `writable: true` | Stage, commit, and push |
|
|
1398
|
+
| Writable with a remote, but no upstream branch, or behind or diverged from it | Stage and commit; the push is skipped and `reason` says `not pushed: ...` |
|
|
1399
|
+
| Writable with a remote and ahead of its upstream | Stage, commit, and push, unpushed commits included |
|
|
1398
1400
|
| Any writable repo with `--no-push` | Stage and commit only (push suppressed) |
|
|
1399
1401
|
|
|
1400
1402
|
**Primary bundle writable config:**
|
|
@@ -1592,9 +1594,12 @@ preserves it byte-for-byte.
|
|
|
1592
1594
|
|
|
1593
1595
|
### feedback
|
|
1594
1596
|
|
|
1595
|
-
Record positive or negative feedback for any indexed bundle asset.
|
|
1596
|
-
|
|
1597
|
-
|
|
1597
|
+
Record positive or negative feedback for any indexed bundle asset.
|
|
1598
|
+
`akm feedback <ref> --negative --reason "<what is wrong and what should change>"`
|
|
1599
|
+
flags the asset for review: the next improve run proposes a fix based on your
|
|
1600
|
+
reason, so be specific. `--positive` records that an asset helped (it raises
|
|
1601
|
+
its ranking) and does not trigger a rewrite. Both signals update the asset's
|
|
1602
|
+
utility score right away, so highly-rated assets rank higher in search results.
|
|
1598
1603
|
|
|
1599
1604
|
```sh
|
|
1600
1605
|
akm feedback scripts/deploy.sh --positive
|
|
@@ -1608,9 +1613,9 @@ akm feedback skills/code-review --negative --reason "flaky" --tag slice:train --
|
|
|
1608
1613
|
|
|
1609
1614
|
| Flag | Description |
|
|
1610
1615
|
| --- | --- |
|
|
1611
|
-
| `--positive` | Record
|
|
1612
|
-
| `--negative` |
|
|
1613
|
-
| `--reason` | What
|
|
1616
|
+
| `--positive` | Record that an asset helped: it raises its ranking and does not trigger a rewrite |
|
|
1617
|
+
| `--negative` | Flag the asset for review: the next improve run proposes a fix based on `--reason`, so be specific |
|
|
1618
|
+
| `--reason` | What is wrong with the asset's content and what should change; not for `akm` command errors. Attached to the feedback event and read by the next improve run's fix proposal (required for negative feedback by default) |
|
|
1614
1619
|
| `--failure-mode` | Structured failure-mode taxonomy for negative feedback: `incorrect`, `outdated`, `dangerous`, `incomplete`, `redundant`. Stored alongside `--reason` in event metadata for the distill pipeline. |
|
|
1615
1620
|
| `--tag` | Tag to attach to the feedback (repeatable, e.g. `--tag slice:train --tag team:platform`) |
|
|
1616
1621
|
| `--applied-to <ref>` | Credit a `lessons/<name>` lesson that helped resolve this task. When combined with `--positive`, appends this feedback ref to the target lesson's `lessonStrength[]` frontmatter array (dedup, idempotent). A non-lesson target, or a missing `--positive`, produces a warning rather than silently doing nothing. |
|
|
@@ -1618,6 +1623,11 @@ akm feedback skills/code-review --negative --reason "flaky" --tag slice:train --
|
|
|
1618
1623
|
Specify exactly one of `--positive` or `--negative`. The ref must already be
|
|
1619
1624
|
present in the current local index.
|
|
1620
1625
|
|
|
1626
|
+
Only negative feedback with a specific reason gets an asset reviewed and fixed:
|
|
1627
|
+
`akm improve` plans a rewrite (reflect) only for an asset with fresh negative
|
|
1628
|
+
feedback, or for an explicit ref. A positive or note-only signal never plans
|
|
1629
|
+
one, and improve no longer rewrites assets on a proactive cadence.
|
|
1630
|
+
|
|
1621
1631
|
The `--applied-to` flag records the lesson-strength signal: each credit is
|
|
1622
1632
|
kept in the lesson's `lessonStrength[]` frontmatter. Search ranking does not
|
|
1623
1633
|
use it.
|
|
@@ -2432,7 +2442,7 @@ akm improve report --since 7d # ...aggregated over every real run start
|
|
|
2432
2442
|
| `--bundle` | Select the bundle the run improves and writes to (default: `defaultWriteTarget`, else the working bundle); only that bundle's assets are planned. When the ref scope is bundle-qualified, it must name the same bundle |
|
|
2433
2443
|
| `--limit <n>` | Cap the refs the run processes, highest salience first (refs routed to distill only come last). Overrides the strategy's `processes.reflect.limit` and `limit` |
|
|
2434
2444
|
| `--timeout-ms <ms>` | Wall-clock budget for the run (default: `7200000` = 2 hours) |
|
|
2435
|
-
| `--require-feedback-signal` |
|
|
2445
|
+
| `--require-feedback-signal` | Turn the fallback lanes (high salience, proactive maintenance) off for the run: they only select and score assets, and a rewrite needs negative feedback |
|
|
2436
2446
|
| `--strategy <name>` | Override the active improve strategy (a built-in or entry under `improve.strategies`) |
|
|
2437
2447
|
| `--json-to-stdout` | Also emit the full persisted JSON result on stdout for a live run. Without this flag, stdout stays empty. Dry-runs always emit their result and are never persisted. |
|
|
2438
2448
|
| `--skip-if-locked` | If another improve run already holds the lock, skip gracefully (exit 0) instead of failing with "already running" (exit 75, `TransientError`, code `IMPROVE_LOCK_HELD` — field follow-up to #948: two legitimate `improve` invocations colliding on this lock is ordinary, retryable contention, not a broken config file). Use for high-frequency scheduled runs so they don't pile up failures while a longer run is in progress. |
|
|
@@ -2481,7 +2491,8 @@ vector (semantic search off, or the memory not indexed yet) that check does
|
|
|
2481
2491
|
nothing and the exact slug and whole-body checks still apply.
|
|
2482
2492
|
|
|
2483
2493
|
No built-in strategy turns the improve-stage extract process on, and only
|
|
2484
|
-
`proactive-maintenance` turns proactive maintenance on
|
|
2494
|
+
`proactive-maintenance` turns proactive maintenance on, which selects and
|
|
2495
|
+
scores due assets but plans no rewrite. Use that strategy or
|
|
2485
2496
|
set the selected strategy's process `enabled: true` to opt in. The stage toggle does not disable a direct
|
|
2486
2497
|
`akm proposal extract --type <harness>` or `akm proposal extract --auto`
|
|
2487
2498
|
invocation.
|
|
@@ -2502,16 +2513,22 @@ the drain engine. Reflect still emits a `confidence` score (0..1) in its JSON
|
|
|
2502
2513
|
response schema; it is recorded on the proposal for triage and ranking, but no
|
|
2503
2514
|
threshold auto-accepts anything.
|
|
2504
2515
|
|
|
2505
|
-
Selection
|
|
2506
|
-
days
|
|
2507
|
-
|
|
2516
|
+
Selection plans a reflect (a proposed rewrite) only for refs with negative
|
|
2517
|
+
feedback in the last 30 days newer than the stage's last ledger attempt, or for
|
|
2518
|
+
an explicit ref scope. A positive or note-only signal never plans one, so
|
|
2519
|
+
improve does not rewrite an asset from a positive signal. Distill keeps its own
|
|
2520
|
+
trigger: a memory with feedback of any kind (a signal or a note) in that window,
|
|
2521
|
+
newer than distill's last attempt. Two fallback lanes pick refs with no such
|
|
2522
|
+
feedback: high salience (content-scored refs at or above
|
|
2508
2523
|
`improve.salience.salienceThreshold`, default `0.75`, that were never reflected,
|
|
2509
2524
|
capped at 10% of the limit, at least one ref) and, in a strategy that enables
|
|
2510
|
-
`proactiveMaintenance`, refs due for a revisit.
|
|
2525
|
+
`proactiveMaintenance`, refs due for a revisit. They only select and score refs
|
|
2526
|
+
(salience and outcome) and plan nothing, so improve does not rewrite on a
|
|
2527
|
+
proactive cadence; they pick only refs in the
|
|
2511
2528
|
[retrieval scope](https://github.com/itlackey/akm/blob/main/docs/architecture/improvement.md#retrieval-scope): returned by
|
|
2512
2529
|
`search`, `curate` or `show`, or named by feedback, in the last 90 days, or new
|
|
2513
|
-
material no improve stage has processed. The
|
|
2514
|
-
cut to the limit; an explicit ref scope bypasses every gate. Use
|
|
2530
|
+
material no improve stage has processed. The planned refs are ranked by salience
|
|
2531
|
+
and cut to the limit; an explicit ref scope bypasses every gate. Use
|
|
2515
2532
|
`--require-feedback-signal` to turn the fallback lanes off for the run.
|
|
2516
2533
|
|
|
2517
2534
|
When the active strategy enables a process (or the triage judgment engine)
|
|
@@ -2818,6 +2835,14 @@ Bulk-accept all pending proposals from one generator with `--generator <name>`
|
|
|
2818
2835
|
(e.g. `reflect`, `distill`) and no positional id. Bulk accept requires
|
|
2819
2836
|
`-y`/`--yes` in non-interactive shells.
|
|
2820
2837
|
|
|
2838
|
+
When the destination bundle is a git repository (a `.git` directory, whatever
|
|
2839
|
+
its source kind), each accept is committed as it happens, with exactly the paths
|
|
2840
|
+
it wrote or removed and the subject `akm accept: <generator> <proposal-id-8>
|
|
2841
|
+
<ref>`. A retirement's archived copy and tombstone, and the source memory a
|
|
2842
|
+
consolidate promotion retires, are part of the same commit. The commit is local:
|
|
2843
|
+
`akm sync`, or the end-of-run sync of `akm improve`, pushes it. A commit that
|
|
2844
|
+
fails warns and the accept stands.
|
|
2845
|
+
|
|
2821
2846
|
#### proposal reject
|
|
2822
2847
|
|
|
2823
2848
|
Reject a proposal and archive the reason. Accepts a full UUID, an 8-character
|
|
@@ -3039,7 +3064,8 @@ akm proposal drain --strategy default --promote -y # Read the triage block from
|
|
|
3039
3064
|
|
|
3040
3065
|
`akm feedback` accepts an optional `--reason <text>` flag whose value is
|
|
3041
3066
|
forwarded into feedback metadata and consumed by improve/distill proposal
|
|
3042
|
-
prompts. Negative feedback requires a reason by default
|
|
3067
|
+
prompts. Negative feedback requires a reason by default: the next improve run
|
|
3068
|
+
proposes a fix from it, so say what is wrong and what should change.
|
|
3043
3069
|
|
|
3044
3070
|
Write the reason about the asset's content. Reflect treats it as an unverified
|
|
3045
3071
|
report to investigate, not a fact to insert, and is told to leave the section
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|