akm-opencode 0.7.6 → 0.8.0-rc.8

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.
Files changed (2) hide show
  1. package/index.ts +15 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -74,7 +74,7 @@ const AKM_WORKFLOW_INSTRUCTION = [
74
74
  "Use AKM as a reusable knowledge and workflow stash.",
75
75
  "",
76
76
  "Before writing from scratch:",
77
- "1. Use `akm_search` or `akm_curate`.",
77
+ "1. Use `akm_curate` with a query that includes the current project name/domain (primary discovery). Fall back to `akm_search` only when you already know an asset exists and need its exact ref.",
78
78
  "2. Use `akm_show <ref>` before relying on an asset.",
79
79
  "3. Record `akm_feedback` after the result is known.",
80
80
  "4. Use the dedicated v0.7.0 tools for the proposal flow: `akm_proposal` (list/show/diff/accept/reject), `akm_reflect`, `akm_propose`, and `akm_distill`. Fall back to `akm_help` for any verb without a dedicated tool.",
@@ -1135,7 +1135,16 @@ function extractToolRefs(
1135
1135
  const AKM_HINTS_PREFIX = [
1136
1136
  "# AKM is available in this session",
1137
1137
  "",
1138
- "You have an AKM stash on this machine. Before writing anything from scratch, call `akm_search` or `akm_curate` to see if the stash already covers it. Record `akm_feedback <ref> positive|negative` whenever an asset materially helps or misses, and use `akm_remember` to persist durable learnings so future sessions inherit them.",
1138
+ "You have an AKM stash on this machine. Before writing anything from scratch, call `akm_curate` with a task description that includes the current project name to find relevant assets with LLM-reranked relevance scores.",
1139
+ "",
1140
+ "**Choosing the right lookup command:**",
1141
+ "",
1142
+ "- **`akm_curate` (query including project name)** — use this when starting any new task, looking for patterns, docs, skills, or workflows. Always include the current project name or domain in the query so the reranker can filter cross-project noise. This is the PRIMARY lookup command.",
1143
+ ' - Good: `akm_curate("akm CLI improve command performance analysis")`',
1144
+ ' - Bad: `akm_curate("improve performance analysis")` (missing project context — pulls unrelated stash noise)',
1145
+ "- **`akm_search` (known name)** — use ONLY when you already know an asset exists (e.g. after `akm_show` returned \"not found\") and need to locate its exact ref. Do not use as a discovery tool.",
1146
+ "",
1147
+ "Record `akm_feedback <ref> positive|negative` whenever an asset materially helps or misses, and use `akm_remember` to persist durable learnings so future sessions inherit them.",
1139
1148
  "",
1140
1149
  AKM_WORKFLOW_INSTRUCTION,
1141
1150
  ].join("\n")
@@ -2288,6 +2297,8 @@ export const AkmPlugin: Plugin = async ({ client, worktree, directory }) => {
2288
2297
  ref: captured,
2289
2298
  })
2290
2299
  await maybeIndexSessionMemory(logClient, sid, type, captured)
2300
+ // Auto-signal so improve picks up this session memory on the next run.
2301
+ runCliSyncRaw(["feedback", captured, "--positive", "--note", "session checkpoint: auto-signal for improve eligibility"], AKM_CURATE_TIMEOUT_MS)
2291
2302
  }
2292
2303
  if (type === "session.compacted") {
2293
2304
  writeStructuredEvent({
@@ -2335,6 +2346,8 @@ export const AkmPlugin: Plugin = async ({ client, worktree, directory }) => {
2335
2346
  ref: captured,
2336
2347
  })
2337
2348
  await maybeIndexSessionMemory(logClient, sid, "stop", captured)
2349
+ // Auto-signal so improve picks up this session memory on the next run.
2350
+ runCliSyncRaw(["feedback", captured, "--positive", "--note", "session checkpoint: auto-signal for improve eligibility"], AKM_CURATE_TIMEOUT_MS)
2338
2351
  }
2339
2352
  } catch (error: unknown) {
2340
2353
  await logHookFailure(logClient, "stop", error)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-opencode",
3
- "version": "0.7.6",
3
+ "version": "0.8.0-rc.8",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for AKM v0.7.0 - search, show, and manage extension assets via the akm CLI, including vaults, wikis, workflows, the proposal queue, lesson assets, and reflect/propose/distill commands, with agentic hooks that auto-load relevant stash assets, record feedback, and harvest session memories so the stash improves every session.",
6
6
  "keywords": [