akm-cli 0.9.28-alpha.2 → 0.9.28-alpha.3

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 CHANGED
@@ -6,6 +6,14 @@ 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.28-alpha.3] - 2026-10-08
10
+
11
+ ### Changed
12
+
13
+ - A consolidate pair-pass retire proposal now records the judge's claim lists in its `retirement` metadata as `onlyInRetired` and `onlyInSuccessor`, named by role rather than by the judge's A/B, so what the judge found only on each side survives past the run. Proposals minted before this lack both fields; no row is added for a pair akm keeps.
14
+
15
+ - A distill lesson the quality gate rejects or sends to review now keeps its text: the `distill_invoked` event and the distill result carry `rejectedContent`, cut to 2000 characters (the judge prompt's cap). Before, a rejected lesson left only its score and reason. It stays local in `state.db`.
16
+
9
17
  ## [0.9.28-alpha.2] - 2026-10-08
10
18
 
11
19
  ### Added
@@ -637,6 +637,9 @@ async function judgeOne(ctx, candidate) {
637
637
  cosine: candidate.cosine,
638
638
  judgeLabel: verdict.relation,
639
639
  judgeReason: verdict.reason,
640
+ // The judge's A is the older side and B the newer (see orderByAge); record the lists by role.
641
+ onlyInRetired: retired === older ? verdict.onlyInA : verdict.onlyInB,
642
+ onlyInSuccessor: retired === older ? verdict.onlyInB : verdict.onlyInA,
640
643
  retiredContentHash: retiredHash,
641
644
  successorContentHash: successorHash,
642
645
  reason,
@@ -638,6 +638,8 @@ function rejectDistilled(run, proposalRef, content, score, reason, meta) {
638
638
  ledgerRef: run.ledgerRef,
639
639
  });
640
640
  }
641
+ /** Longest lesson text kept on a rejection, the same cap the quality judge's prompt reads (stage.ts). */
642
+ const REJECTED_CONTENT_MAX_CHARS = 2000;
641
643
  /**
642
644
  * Record a distill quality-gate outcome and return its envelope.
643
645
  * `quality_rejected` lands in the improve ledger under the input's key (its
@@ -673,6 +675,8 @@ export function writeQualityRejection(args) {
673
675
  }
674
676
  }
675
677
  const eligMeta = args.eligibilitySource ? { eligibilitySource: args.eligibilitySource } : {};
678
+ // The text the gate turned away, kept in the local event and the result so a rejection can be audited.
679
+ const rejectedContent = args.content.slice(0, REJECTED_CONTENT_MAX_CHARS);
676
680
  appendEvent({
677
681
  eventType: "distill_invoked",
678
682
  ref: ledgerRef,
@@ -681,6 +685,7 @@ export function writeQualityRejection(args) {
681
685
  proposalRef: args.proposalRef,
682
686
  score: args.score,
683
687
  reason: args.reason,
688
+ rejectedContent,
684
689
  ...meta,
685
690
  ...eligMeta,
686
691
  },
@@ -693,6 +698,7 @@ export function writeQualityRejection(args) {
693
698
  proposalRef: args.proposalRef,
694
699
  score: args.score,
695
700
  reason: args.reason,
701
+ rejectedContent,
696
702
  ...(proposal ? { proposalId: proposal.id, proposal } : {}),
697
703
  ...meta,
698
704
  };
@@ -196,7 +196,7 @@ the set of types the code actually emits at HEAD (verified against every
196
196
  | `reflect_completed` | Reflect phase produced a proposal | `ref` |
197
197
  | `improve_reflect_outcome` | Per-asset reflect result | `ref`, `ok`, `durationMs`, `reason` |
198
198
  | `propose_invoked` | `akm proposal new` | `ref` |
199
- | `distill_invoked` | Distill phase inside the `akm improve`/`akm proposal new` pipeline. **`akm distill` is not a CLI command** — there is no standalone verb by that name | `ref`, outcome (`queued`, `skipped` with a `skipReason` such as `lesson_exists`, `nothing_reusable` or `conflict_noop`, `llm_failed`, `validation_failed`, `quality_rejected`, `review_needed`) |
199
+ | `distill_invoked` | Distill phase inside the `akm improve`/`akm proposal new` pipeline. **`akm distill` is not a CLI command** — there is no standalone verb by that name | `ref`, outcome (`queued`, `skipped` with a `skipReason` such as `lesson_exists`, `nothing_reusable` or `conflict_noop`, `llm_failed`, `validation_failed`, `quality_rejected`, `review_needed`). A `quality_rejected` or `review_needed` event also carries `score`, `reason`, the judge's per-criterion `criteria` when it ran, and `rejectedContent`, the turned-away lesson text cut to 2000 characters (the judge prompt's cap), kept locally in `state.db` |
200
200
  | `extract_invoked` | `akm proposal extract --type <harness>` / `--auto`, or improve-stage session extraction | `outcome`, `sessionId`, `harness` |
201
201
  | `extract_triaged` | The pre-LLM extract triage gate evaluated at least one session | `evaluated`, `passed`, `triagedOut`, `sourceRun` (aggregated) |
202
202
  | `schema_repair_invoked` | The schema-repair pass inside `akm improve` (`runSchemaRepairPass`) attempts to patch missing frontmatter on an asset that failed schema validation. **There is no `akm lint --repair` flag** — `lint` has `--fix`/`--auto-fix`, unrelated to this event | `ref`, outcome |
@@ -313,6 +313,7 @@ Contents:
313
313
  - Source (which process generated it — e.g. `reflect`, `distill`)
314
314
  - Full proposal content (Markdown text)
315
315
  - Created/updated timestamps
316
+ - For a `consolidate-pair` retire proposal, the pair judge's verdict in its `retirement` metadata: label, reason, cosine, and the claims only the retired side holds (`onlyInRetired`) and only the kept side holds (`onlyInSuccessor`), each at most 20 entries of 200 characters
316
317
 
317
318
  Beside it, the `improve_ledger` table records what each improve stage last did
318
319
  with each asset — one row per bundle, asset ref and stage: the outcome
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-cli",
3
- "version": "0.9.28-alpha.2",
3
+ "version": "0.9.28-alpha.3",
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": [