akm-cli 0.9.27-alpha.2 → 0.9.27-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,25 @@ 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.27-alpha.3] - 2026-10-07
10
+
11
+ ### Fixed
12
+
13
+ - **The drain's judge rejects a promotion that is a status snapshot, a plan or
14
+ something retired, not only a duplicate.** Its rubric for a promotion (a memory
15
+ proposed as a new knowledge note) said to reject a note that is wrong, a
16
+ duplicate or contradicts the live asset, and to accept a correct, valuable one,
17
+ so it judged only whether the note was new: the reasons it gave for accepting a
18
+ note pinned to commits and versions, a rollout status or a retired host were
19
+ "distinct from the existing notes". The reject line now also names a note that
20
+ reports the state of something that changes (a status, rollout, branch, commit,
21
+ version, test count, "as of <date>"), a plan not yet carried out, or something
22
+ already retired, replaced or superseded, and says a lesson drawn from an
23
+ incident is durable. On the owner's 65 labelled promotions (chat/qwen3.8-27b,
24
+ two runs each) the judge accepted 7 and 8 of the 14 stale ones and 4 and 5 of
25
+ the 7 ephemeral ones before, and 1 and 3, 0 and 1 after. Other proposals keep
26
+ the old rubric. No new settings.
27
+
9
28
  ## [0.9.27-alpha.2] - 2026-10-07
10
29
 
11
30
  ### Removed
@@ -144,6 +144,8 @@ export function fencedBlock(text) {
144
144
  }
145
145
  /** The judgment prompt: the proposal, the live asset it would overwrite, same-ref siblings, and for a promotion the nearest knowledge notes. */
146
146
  export function buildJudgmentPrompt(proposal, reason, ctx) {
147
+ // A promotion (a memory proposed as a new knowledge note) must also be durable.
148
+ const promotion = proposal.source === "consolidate" && ctx.liveAsset === undefined;
147
149
  const sections = [
148
150
  "You are adjudicating a pending knowledge-base proposal no quality judge has",
149
151
  "passed yet. Decide whether to accept, reject, or defer it.",
@@ -174,7 +176,9 @@ export function buildJudgmentPrompt(proposal, reason, ctx) {
174
176
  }
175
177
  sections.push("", "Reject the promotion if these notes already cover what it says, even in other words.");
176
178
  }
177
- sections.push("", "## Your task", 'Return ONLY a JSON object: {"decision": "accept" | "reject" | "defer", "reason": "<short reason>"}.', "- accept: the proposed content is a correct, valuable update worth committing.", "- reject: the proposal is wrong, a duplicate, or contradicts the live asset.", "- defer: you cannot decide from the provided context (leave it pending).", "Output the JSON object and nothing else.");
179
+ sections.push("", "## Your task", 'Return ONLY a JSON object: {"decision": "accept" | "reject" | "defer", "reason": "<short reason>"}.', "- accept: the proposed content is a correct, valuable update worth committing.", promotion
180
+ ? '- reject: the proposal is wrong, a duplicate, contradicts the live asset, or is not durable: it reports the state of something that changes (a status, rollout, branch, commit, version, test count, "as of <date>"), is a plan not yet carried out, or describes something already retired, replaced or superseded. A lesson drawn from an incident is durable.'
181
+ : "- reject: the proposal is wrong, a duplicate, or contradicts the live asset.", "- defer: you cannot decide from the provided context (leave it pending).", "Output the JSON object and nothing else.");
178
182
  return sections.join("\n");
179
183
  }
180
184
  /** A verdict from raw runner output (the first JSON object), or null. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-cli",
3
- "version": "0.9.27-alpha.2",
3
+ "version": "0.9.27-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": [