You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/plugin.ts
+21-29Lines changed: 21 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -108,45 +108,37 @@ function buildCompactionPrompt(privateContext: string): string {
108
108
"",
109
109
"## Relevant Files",
110
110
"",
111
-
"At the end of the summary, extract durable memory entries for future sessions.",
111
+
"At the end of the summary, include a Memory candidates section only if there are durable facts that will change future behavior.",
112
112
"",
113
-
"Memory quality bar:",
114
-
"Extract only durable facts that will change future behavior: user preferences, decisions with rationale, stable constraints, or hard-to-rediscover references.",
115
-
"",
116
-
"Do not extract trivia: transient IDs/revisions, task progress, test/file counts, bare status updates, local UI details, or facts easily rediscovered from the repo.",
117
-
"",
118
-
"When unsure, skip it. Fewer high-signal memories are better than many low-value ones.",
113
+
"CRITICAL MEMORY RULES:",
114
+
"- Most compactions should produce ZERO memories. Empty is correct when nothing durable changed.",
115
+
"- NO completion or progress statements: do not extract completed work, passing tests, commits, PR status, wave/task/phase completion, or current state.",
116
+
"- NO session-internal implementation notes: do not extract what files were edited, what bug was just fixed, what command just ran, or what the assistant reviewed.",
117
+
"- feedback ONLY means stable user preferences or user instructions, written in imperative/future-facing form.",
118
+
"- decision ONLY means rules that apply to FUTURE work, not decisions already implemented in this session.",
119
+
"- project/reference ONLY when the fact is stable across sessions and hard to rediscover from the repository.",
120
+
"- If unsure, skip it.",
119
121
"",
120
122
"Good memory examples:",
121
123
"- [feedback] User prefers architecture reviews in Traditional Chinese.",
122
-
"- [decision] Use frozen workspace memory snapshots plus ephemeral hot state for cache stability.",
123
-
"- [project] The plugin should piggyback memory extraction on OpenCode compaction and avoid extra LLM calls.",
124
-
"- [reference] Workspace memory appears in frozen system[1]; pending memories appear in hot session state until compaction.",
124
+
"- [decision] Do not add semantic merge to memory dedupe.",
125
+
"- [project] This repository is an OpenCode plugin using local JSON stores.",
126
+
"- [reference] Workspace memory is rendered as frozen system[1]; pending memories remain in hot state until compaction.",
125
127
"",
126
128
"Bad memory examples to skip:",
127
-
"- 42 tests passed.",
128
129
"- Wave 2 completed successfully.",
129
-
"- Modified 5 files.",
130
-
"- commit 4309cb8 contains the latest fix.",
131
-
"- TypeError: Cannot read properties of undefined.",
132
-
"- Currently running npm test.",
133
-
"",
134
-
"A memory should still be useful if a new agent opens this workspace next week.",
135
-
"",
136
-
"Only extract facts that are likely to stay true across sessions.",
137
-
"Do not extract session-specific progress like exact test counts, file counts, or phase numbers.",
138
-
"For progress, extract the stable goal or durable milestone, not the current number.",
139
-
"For references, extract configuration values that do not usually change between sessions.",
140
-
"For feedback, extract unresolved issues or user preferences that future sessions need to know.",
141
-
"Use exactly this candidate format, including square brackets around the type:",
130
+
"- 180 tests passed and CI is green.",
131
+
"- Implemented owner-aware cleanup in plugin.ts.",
132
+
"- The assistant reviewed code reviewer feedback and updated the plan.",
0 commit comments