akm-cli 0.9.25-alpha.2 → 0.9.25-alpha.4

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,108 @@ 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.25-alpha.4] - 2026-10-04
10
+
11
+ ### Changed
12
+
13
+ - **The reflect quality judge's rubric is written for the frontmatter-only
14
+ revisions reflect makes, and says what drove each one.** A revision answering
15
+ negative feedback (any `[negative]` line) is judged only on the fields it
16
+ changes, since it cannot change the body and need not resolve feedback about
17
+ it. A field change is justified when the field is missing or broken, claims
18
+ more than the body covers, or, for a note the feedback calls stale, needs to
19
+ name the version or date the body records. A maintenance revision needs a
20
+ missing or broken field, and rewording a sound one is churn. New values are
21
+ checked as claims against the body. On 113 frontmatter-only proposals
22
+ reviewed by Claude Opus, the production model passed 78 of the 95 good ones
23
+ and 3 of the 18 bad ones, against 53 and 7 under the previous rubric, which
24
+ was tuned on body rewrites. The agent judge's tool paragraph drops its
25
+ feedback-points check, which contradicted that rule.
26
+
27
+ ## [0.9.25-alpha.3] - 2026-10-04
28
+
29
+ ### Added
30
+
31
+ - **akm learns from Codex sessions.** `akm proposal extract --type codex` reads
32
+ the rollout files Codex writes under `$CODEX_HOME/sessions` (`~/.codex/sessions`
33
+ by default), as it reads Claude Code's and opencode's session files. `--auto`
34
+ and `akm improve`'s session extraction include Codex on a machine that has
35
+ them, and a session is extracted once, as for the other harnesses. The model
36
+ sees what the person and Codex said and the tool calls and results between
37
+ them, without Codex's own instructions or injected context (AGENTS.md, the
38
+ environment, an invoked skill). The reader lists a person's sessions,
39
+ `codex exec` runs included. It leaves out the rollouts Codex writes for
40
+ subagents and its other internal agents, which are not sessions of their own, and
41
+ unlike a Claude Code subagent transcript it does not fold them into their
42
+ parent.
43
+
44
+ ### Changed
45
+
46
+ - **Reflect changes only an asset's `description`, `when_to_use` and title;
47
+ akm keeps the body byte for byte.** On 396 labelled reflect edits, those that
48
+ fixed a frontmatter defect and left the body alone were good 24 times in 26;
49
+ those that also rewrote the body were bad 175 times in 224. The reply is now
50
+ `confidence` and a `frontmatterPatch` of `description`, `when_to_use` and
51
+ `title` (each a non-empty single-line string, or `null` for no change), plus
52
+ `ref` when no target was given, and no body: the JSON Schema, both output
53
+ contracts and the repair prompt say so, and the framed reply for an endpoint
54
+ that rejects JSON Schema has no content markers. akm applies the patch to the
55
+ asset it read by rewriting only the changed keys' frontmatter lines, so every
56
+ other line, including a list beside a description the YAML parser cannot read,
57
+ stays as it was; a source whose closing `---` is fused onto a value gets no
58
+ proposal. A non-null `title` becomes a
59
+ `# <title>` heading and one blank line at the top of the body, only when the
60
+ body has no level-1 heading; otherwise it is ignored. A patch that changes
61
+ nothing, whether every field is `null` or equal to the source's, creates no
62
+ proposal (`no_change`); an asset that requires a `description` and has none
63
+ still gets one derived from its own text, as before (#636).
64
+ - **Reflect may answer "nothing to change."** Its prompt forbade it: "your
65
+ proposal must correct or add something the source lacks", "must meaningfully
66
+ differ" from a rejected proposal, "do not return the same content
67
+ unchanged", and "you MUST generate" a `when_to_use`. On the same edits, those
68
+ that fixed no defect were bad 86 times in 93, and those driven by negative
69
+ feedback 50 times in 53; most of that feedback says the asset did not help
70
+ with an unrelated task. One goal sentence now covers every asset type: check
71
+ the three fields against the body and the feedback, and return `null` for
72
+ each that needs no fix. The feedback caveat says that feedback about a task
73
+ the asset never claims to cover needs no change, and with no feedback the
74
+ prompt says to fix only a missing or broken field. A rejected proposal is not
75
+ to be proposed again, and the engine returns `null` when no other change is
76
+ justified.
77
+ - **Reflect's prompt names the frontmatter problems akm can see** (a
78
+ description split by a stray period or carrying an escaped quote, no
79
+ `when_to_use`, no title) and asks for a repair that keeps the description's
80
+ wording, names, numbers and paths rather than a rewrite. Without the list the
81
+ model fixed 51 of 122 broken descriptions and 93 of 193 missing titles; with
82
+ it, 120 and 189. When the feedback calls a note stale or historical, a new
83
+ `when_to_use` names the version or date the body records, or stays as it is.
84
+ On an 80-case sample of the labelled set, Claude Opus reviewers judged 64 of
85
+ the new reflect's 78 proposals good; the old reflect's edits in the set are
86
+ good 81 times in 396.
87
+ - **`akm proposal accept` warns about an echoed "Avoid These Patterns"
88
+ section instead of refusing.** Reflect keeps a body as it is, so a proposal
89
+ for an asset that already carries the section (a leftover of the run-only
90
+ prompt text) would never be accepted, and the person accepting cannot edit
91
+ the proposal.
92
+
93
+ ### Removed
94
+
95
+ - **Everything reflect needed to rewrite a body.** The prompt's "Content
96
+ preservation rules" and the size bounds computed for them; the related
97
+ distilled lessons section and the companion-doc
98
+ (`knowledge/skills/<skill>/references/<topic>`) option, with the gathering
99
+ behind them and the `derived_from_reflect` marker it read; the size guard and
100
+ the truncation-marker check on reflect's output, and their review reasons
101
+ `reflect-size-ratio` and `reflect-truncation-leak`; the stripping of an
102
+ appended frontmatter block and of an echoed "Avoid These Patterns" section
103
+ from a body; and the restore of identity fields, which a patch cannot name.
104
+ The accept-time size advisory and truncation-marker block stay.
105
+ - **The `body-edit` review reason.** A reflect revision no longer changes the
106
+ body, so one the judge passed is stamped `staged` and the triage drain
107
+ accepts it, as before 0.9.24; with `processes.reflect.qualityGate` off it is
108
+ minted unstamped for the drain to decide. A proposal already deferred as
109
+ `body-edit` stays deferred.
110
+
9
111
  ## [0.9.25-alpha.2] - 2026-10-03
10
112
 
11
113
  ### Added
@@ -1 +1 @@
1
- Feedback describes what a reader found missing or wrong. It is a signal to investigate, not a fact to insert. Do not add claims, numbers, dates, paths, ports, or incidents that are not already present in the asset content. If feedback asks for information the asset lacks, leave the section unchanged.
1
+ Feedback describes what a reader found missing or wrong, often that the asset did not help with a task it was retrieved for. It is a signal, not a fact to insert. Change a field only when it is missing or broken, or when it claims more than the body covers, and then only to describe what the body covers. Feedback about a task the asset never claims to cover, or asking for information the asset lacks, needs no change. When the feedback says the asset is stale, outdated, superseded or historical, a `when_to_use` names the version or date the body records ("When working with the 0.1.0 client"), or stays as it is.
@@ -1,13 +1,6 @@
1
1
  Respond with exactly this plain-text frame, with no prose or code fence around it:
2
2
 
3
3
  {{REF_LINE}}AKM_REFLECT_CONFIDENCE: <number from 0 to 1>
4
- AKM_REFLECT_FRONTMATTER_PATCH: {"description": null, "when_to_use": null}
5
- AKM_REFLECT_CONTENT_BEGIN
6
- <complete improved markdown body>
7
- AKM_REFLECT_CONTENT_END
4
+ AKM_REFLECT_FRONTMATTER_PATCH: {"description": null, "when_to_use": null, "title": null}
8
5
 
9
- The first begin marker and final end marker delimit the body; marker lines between them are literal content. Put the complete markdown body between those outer markers. Quotes, Markdown fences, and backslashes inside the body are literal content; do not JSON-escape them. Emit the body only, without YAML frontmatter, because AKM preserves and merges the source frontmatter itself.
10
-
11
- The frontmatter patch must be a one-line JSON object with exactly `description` and `when_to_use`. Keep a field `null` when it should not change. Supply a non-empty string only when adding or correcting that field; AKM merges those values through its existing sanitizer.
12
-
13
- Never include the truncation marker (the literal text `{{TRUNCATION_MARKER}}`) or any other text from outside the fenced asset content shown to you, anywhere in the body.
6
+ The frontmatter patch must be a one-line JSON object with exactly `description`, `when_to_use` and `title`. Keep a field `null` when it should not change; otherwise give a non-empty single-line string. `title` is the text of a level-1 heading, without the leading `#`; AKM adds it only when the body has none. AKM applies the patch to the source asset and keeps the body itself.
@@ -1,5 +1,3 @@
1
1
  Respond only through the provider's native JSON schema. {{FIELD_RULE}}
2
2
 
3
- `content` must contain the complete improved markdown body only, without YAML frontmatter. `frontmatterPatch` must contain exactly `description` and `when_to_use`; set either field to `null` when it should not change, or to a non-empty string when adding or correcting it. AKM merges that narrow patch with the source frontmatter and preserves target identity itself. `confidence` is your honest self-rated quality confidence from 0 to 1. Do not add prose or Markdown fences around the JSON response.
4
-
5
- Never include the truncation marker (the literal text `{{TRUNCATION_MARKER}}`) or any other text from outside the quoted asset content shown to you, anywhere in `content`.
3
+ `frontmatterPatch` must contain exactly `description`, `when_to_use` and `title`; set a field to `null` when it should not change, or to a non-empty single-line string. `title` is the text of a level-1 heading, without the leading `#`; AKM adds it only when the body has none. AKM applies the patch to the source asset, keeps the body itself, and preserves target identity. `confidence` is your honest self-rated quality confidence from 0 to 1. Do not add prose or Markdown fences around the JSON response.
@@ -1,3 +1,3 @@
1
- Your previous response could not be extracted using the required output contract. Reformat that response exactly once using the contract below. Preserve its proposed markdown verbatim: do not revise, summarize, or add content. Return only the repaired envelope.
1
+ Your previous response could not be extracted using the required output contract. Reformat that response exactly once using the contract below. Keep its proposed values as they are: do not revise or add to them. Return only the repaired envelope.
2
2
 
3
3
  {{OUTPUT_CONTRACT}}
@@ -10,6 +10,7 @@
10
10
  * akm proposal extract --type claude --session-id <id>
11
11
  * akm proposal extract --type claude --since 24h
12
12
  * akm proposal extract --type opencode --since 7d --dry-run
13
+ * akm proposal extract --type codex --since 24h
13
14
  * akm proposal extract --auto # iterate all available harnesses
14
15
  * akm proposal extract --type claude --location /custom/path --session-id <id>
15
16
  *
@@ -25,12 +26,12 @@ import { akmExtract, resolveStandaloneExtractPlan } from "./extract.js";
25
26
  export const extractCommand = defineJsonCommand({
26
27
  meta: {
27
28
  name: "extract",
28
- description: "Extract durable insights from native session files (claude, opencode) and queue them as proposals.",
29
+ description: "Extract durable insights from native session files (claude, codex, opencode) and queue them as proposals.",
29
30
  },
30
31
  args: {
31
32
  type: {
32
33
  type: "string",
33
- description: "Harness name (claude, opencode). Required unless --auto.",
34
+ description: "Harness name (claude, codex, opencode). Required unless --auto.",
34
35
  },
35
36
  "session-id": {
36
37
  type: "string",
@@ -2,7 +2,7 @@
2
2
  // License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  // file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
4
  /**
5
- * `akm extract` — read native session logs (claude, opencode) through the
5
+ * `akm extract` — read native session logs (claude, codex, opencode) through the
6
6
  * session-log harnesses, pre-filter the noise, and ask the model for
7
7
  * memory/lesson/knowledge candidates the agent did not already save. Each
8
8
  * candidate is queued as a proposal (`source: "extract"`), never written.