Skip to content

Commit fe6ce36

Browse files
committed
docs: prepare v1.3.0 release notes
1 parent 3cc6dff commit fe6ce36

7 files changed

Lines changed: 132 additions & 61 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# AGENTS.md - OpenCode Working Memory Plugin Development Guide
1+
# AGENTS.md - OpenCode Working Memory Development Guide
22

33
## Project Overview
44

5-
The **OpenCode Working Memory Plugin** provides a **three-layer memory architecture** for AI agents:
5+
**OpenCode Working Memory** provides a **three-layer memory architecture** for AI agents:
66

77
1. **Workspace Memory** - Long-term memory that persists across sessions (decisions, project info, references)
88
2. **Hot Session State** - Automatic tracking of active files, open errors, and recent decisions
@@ -325,4 +325,4 @@ See `docs/architecture.md` for detailed technical documentation including:
325325
---
326326

327327
**Last Updated**: April 2026
328-
**Plugin Status**: Production (Memory V2 architecture)
328+
**Plugin Status**: Production (Memory V2 architecture)

CHANGELOG.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,63 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Accounting-aware deduplication (`dedupeLongTermEntriesWithAccounting`).
1414
- Accounting-aware normalization (`normalizeWorkspaceMemoryWithAccounting`).
1515
- Promotion classification: promoted, absorbed, superseded, rejected.
16-
- Clear terminal low-value compaction candidates after promotion review.
16+
- Remove absorbed/superseded keys from rejected set to avoid duplicate rejection tracking.
17+
- Memory quality evaluation fixtures covering accepted durable facts and rejected noisy facts.
18+
- Sharper compaction memory extraction prompt with concrete good/bad memory examples.
1719

1820
### Fixed
1921

22+
- Promotion accounting now clears only pending memories that survive workspace normalization/cap limits.
23+
- `session.deleted` now uses shared session ID extraction, matching `session.compacted` behavior.
24+
- Absorbed duplicate pending memories are accounted for instead of retrying forever.
2025
- Active vs superseded boundary when promoting pending memories (superseded entries no longer block promotion of same-key active memories).
2126
- Removed unused `rejected_duplicate_lower_quality` type.
2227

2328
### Changed
2429

2530
- Deferred pending journal safety cap implementation (see TODO in `src/pending-journal.ts`).
2631
- Clarified superseded accounting semantics: P0 emits events only, does not archive newly superseded records.
32+
- README structure was streamlined around the automatic memory flow and ongoing memory-quality work.
33+
- Architecture docs now describe `Memory candidates:` as the primary extraction format and XML candidate blocks as legacy.
34+
- Superpowers implementation plans are no longer tracked in git.
2735

2836
## [1.2.3] - 2026-04-26
2937

38+
### Added
39+
40+
- Frozen workspace memory snapshot in `system[1]` for better OpenCode prompt-cache stability.
41+
- Ephemeral hot session state and pending memories in later system messages.
42+
- Durable pending journal so explicit memories survive until promotion.
43+
3044
### Fixed
3145

32-
- Account for absorbed pending memories in promotion accounting.
33-
- Clarify cache epoch semantics and add regression tests.
46+
- Explicit memories no longer mutate the frozen workspace snapshot mid-session.
47+
- Pending memories are promoted at safe cache-epoch boundaries.
3448

3549
## [1.2.0] - 2026-04-25
3650

3751
### Added
3852

39-
- Memory quality evaluation fixtures (5 accepted, 7 rejected cases).
40-
- Compaction prompt examples for better memory extraction.
41-
- Promotion accounting for pending memories.
53+
- Memory V2 three-layer architecture.
54+
- Workspace memory for durable cross-session decisions, preferences, project facts, and references.
55+
- Hot session state for active files, open errors, and recent context.
56+
- Hook-based memory extraction during OpenCode compaction.
57+
58+
### Changed
59+
60+
- Removed manual memory tools in favor of automatic prompt injection.
61+
- Moved storage to `~/.local/share/opencode-working-memory/`.
4262

4363
## [1.1.0] - 2026-04-24
4464

45-
### Added
65+
### Changed
4666

47-
- Workspace memory cache optimization with frozen snapshots.
48-
- Pending journal durability for same-session visibility.
49-
- Credential redaction always-on.
67+
- Improved pre-V2 memory documentation and installation flow.
5068

5169
## [1.0.0] - 2026-04-23
5270

5371
### Added
5472

5573
- Initial release with three-layer memory architecture.
56-
- Hot session state, workspace memory, pending journal.
57-
- Memory extraction from user messages and compaction summaries.
74+
- Initial OpenCode memory integration.
75+
- Basic memory extraction and prompt injection.

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# OpenCode Working Memory Plugin
1+
# OpenCode Working Memory
22

33
[![npm version](https://img.shields.io/npm/v/opencode-working-memory.svg)](https://www.npmjs.com/package/opencode-working-memory)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
55

66
Automatic memory for OpenCode agents.
77

8-
This plugin helps your agent keep useful context across compactions and sessions: project decisions, preferences, important references, active files, and unresolved errors.
8+
OpenCode Working Memory helps your agent keep useful context across compactions and sessions: project decisions, preferences, important references, active files, and unresolved errors.
99

1010
It works automatically, without manual memory tools or extra LLM/API calls.
1111

1212
## Why This Exists
1313

1414
OpenCode compaction keeps conversations manageable, but important context can still get lost over time.
1515

16-
This plugin adds a workspace-aware memory layer so your agent can remember durable facts while keeping short-term session state fresh and lightweight.
16+
It adds a workspace-aware memory layer so your agent can remember durable facts while keeping short-term session state fresh and lightweight.
1717

1818
Use it when you want your agent to remember things like:
1919

@@ -34,15 +34,15 @@ Use it when you want your agent to remember things like:
3434

3535
## Installation
3636

37-
Add the plugin to your OpenCode config:
37+
Add OpenCode Working Memory to your OpenCode config:
3838

3939
```json
4040
{
4141
"plugin": ["opencode-working-memory"]
4242
}
4343
```
4444

45-
Then restart OpenCode. The plugin activates automatically.
45+
Then restart OpenCode. It activates automatically.
4646

4747
## How It Works
4848

@@ -89,7 +89,7 @@ OpenCode Working Memory adds durable memory without making extra LLM/API calls.
8989
└──────────────────────────────────────┘
9090
```
9191

92-
**Zero extra API calls:** the plugin does not call the model on its own. Memory extraction is folded into OpenCode's built-in compaction request.
92+
**Zero extra API calls:** OpenCode Working Memory does not call the model on its own. Memory extraction is folded into OpenCode's built-in compaction request.
9393

9494
**Cache-friendly layout:** durable workspace memory is rendered as a stable frozen snapshot for the session, while fast-changing hot session state is appended separately. Compaction starts a new cache epoch, refreshing the workspace snapshot after pending memories are promoted.
9595

@@ -161,21 +161,22 @@ Avoid saving:
161161

162162
## Quality Guards
163163

164-
The plugin tries to keep memory useful and low-noise.
164+
OpenCode Working Memory tries to keep memory useful and low-noise.
165165

166166
It includes guards for:
167167

168168
- Credential redaction
169169
- Duplicate memory cleanup
170170
- Superseding older decisions with newer ones
171+
- Consolidation accounting so promoted, absorbed, superseded, and rejected memories are handled differently
171172
- Filtering stack traces, git hashes, raw errors, and noisy path-heavy facts
172173
- Rejecting temporary project progress snapshots
173174

174175
The goal is to remember durable facts, not every detail.
175176

176177
## Configuration
177178

178-
The plugin works out of the box.
179+
OpenCode Working Memory works out of the box.
179180

180181
Default behavior:
181182

RELEASE_NOTES.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,53 @@
11
# Release Notes
22

3+
## 1.3.0 (2026-04-27)
4+
5+
### Better Memory Consolidation
6+
7+
This release makes OpenCode Working Memory smarter about what happens to saved memories after compaction. Instead of treating every pending memory as simply "kept" or "not kept", it now understands four outcomes:
8+
9+
- **Promoted** — a new memory was saved to workspace memory.
10+
- **Absorbed** — the memory was a duplicate of something already remembered.
11+
- **Superseded** — a newer same-topic decision or preference replaced an older one.
12+
- **Rejected** — the memory was stale, noisy, or over the workspace memory limit.
13+
14+
### What This Improves
15+
16+
- **Fewer repeated pending memories**: duplicate or superseded memories no longer keep coming back for promotion.
17+
- **Cleaner long-term memory**: old same-topic decisions are replaced more predictably.
18+
- **Safer promotion accounting**: pending memories are only cleared when the final normalized workspace memory confirms what happened to them.
19+
- **More useful compaction output**: the compaction prompt now includes clearer examples of what should and should not become durable memory.
20+
21+
### Also Included
22+
23+
- Memory quality regression fixtures: 5 examples that should be kept and 7 noisy examples that should be rejected.
24+
- Fix for `session.deleted` session ID extraction so cleanup and promotion use the same event parsing path.
25+
- Fix for active-vs-superseded promotion behavior: archived superseded entries no longer block a fresh active memory.
26+
- README and architecture documentation updates.
27+
28+
### Upgrade Notes
29+
30+
- No user migration is required.
31+
- Existing workspace memory files remain compatible.
32+
- The OpenCode config entry stays the same:
33+
34+
```json
35+
{
36+
"plugin": ["opencode-working-memory"]
37+
}
38+
```
39+
40+
### Tests
41+
42+
- **135 tests pass**.
43+
44+
---
45+
346
## 1.2.3 (2026-04-27)
447

548
### Prompt Cache Optimization — Frozen Snapshot + Ephemeral Delta
649

7-
This release optimizes the plugin's impact on OpenCode's prompt cache, following Hermes-style architecture patterns.
50+
This release optimizes OpenCode Working Memory's impact on OpenCode's prompt cache, following Hermes-style architecture patterns.
851

952
### Key Features
1053

@@ -219,4 +262,4 @@ LICENSE
219262
- Core Memory blocks (goal/progress/context)
220263
- Working Memory with slots and pool
221264
- Pressure monitoring with interventions
222-
- Smart pruning of tool outputs
265+
- Smart pruning of tool outputs

docs/architecture.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
The Working Memory Plugin implements a **three-layer memory architecture** designed to preserve context across OpenCode session compactions.
5+
OpenCode Working Memory implements a **three-layer memory architecture** designed to preserve context across OpenCode session compactions.
66

77
```
88
┌─────────────────────────────────────────────────────────────┐
@@ -73,40 +73,47 @@ Long-term memory that persists across sessions within the same workspace. Perfec
7373

7474
### Memory Extraction
7575

76-
During compaction, the plugin scans for `Memory candidates:` sections:
76+
During compaction, OpenCode Working Memory scans for `Memory candidates:` sections:
7777

7878
```
7979
Memory candidates:
8080
- [decision] Use npm cache for plugin loading
8181
- [project] This repo uses TypeScript with strict mode
8282
```
8383

84-
**Legacy Format**: The plugin also accepts `<workspace_memory_candidates>` XML blocks for backward compatibility, but this format is deprecated.
84+
**Legacy Format**: OpenCode Working Memory also accepts `<workspace_memory_candidates>` XML blocks for backward compatibility, but this format is deprecated.
8585

86-
**Quality Gate**: Not all candidates become memories. The plugin rejects:
86+
**Quality Gate**: Not all candidates become memories. OpenCode Working Memory rejects:
8787
- Git commit hashes (e.g., `abc1234`)
8888
- Raw errors (e.g., `Error: something failed`)
8989
- Stack traces
9090
- Path-heavy facts (>50% paths)
9191
- Very short text (<20 chars)
9292

93-
### Deduplication
93+
### Consolidation and Deduplication
9494

95-
Memories are deduplicated using **canonical text matching**:
96-
1. Normalize: lowercase, strip punctuation, collapse whitespace
97-
2. Hash the canonical text
98-
3. Keep the entry with highest confidence
95+
Memories are deduplicated and consolidated with accounting:
96+
97+
1. Normalize exact text: lowercase, strip punctuation, collapse whitespace.
98+
2. Group project/reference entries by identity where possible.
99+
3. Group decisions and feedback by topic where possible.
100+
4. Keep the best surviving entry by source, confidence, type, and freshness rules.
101+
5. Emit accounting events so pending memories can be classified as promoted, absorbed, superseded, or rejected.
102+
103+
This prevents absorbed or superseded pending memories from retrying forever while still preserving the active surviving memory.
99104

100105
### System Prompt Injection
101106

102107
Workspace memory is injected at the top of every message:
103108

104109
```
105-
<workspace_memory>
106-
- [decision] Use npm cache for plugin loading, not npm link
107-
- [project] This repo uses opencode-agenthub plugin system
108-
- [reference] Storage: ~/.local/share/opencode-working-memory/...
109-
</workspace_memory>
110+
Workspace memory (cross-session, verify if stale):
111+
decision:
112+
- Use npm cache for plugin loading, not npm link
113+
project:
114+
- This repo uses the opencode-agenthub plugin system
115+
reference:
116+
- Storage: ~/.local/share/opencode-working-memory/...
110117
```
111118

112119
## Layer 2: Hot Session State
@@ -211,7 +218,7 @@ Delegate task tracking to OpenCode's native features.
211218

212219
## Plugin Hooks
213220

214-
The plugin hooks into OpenCode lifecycle events:
221+
OpenCode Working Memory hooks into OpenCode lifecycle events:
215222

216223
### `experimental.chat.system.transform`
217224

@@ -227,13 +234,15 @@ Injects workspace memory and hot session state into system prompt.
227234
### `experimental.session.compacting`
228235

229236
Extracts workspace memory candidates from conversation.
230-
Applies quality gate, deduplication, and source priority.
237+
Applies quality gate, redaction, migration, consolidation accounting, deduplication, and source priority.
231238

232239
### `event` (session.compacted, session.deleted)
233240

234241
- `session.compacted`: Promote session decisions to workspace memory
235242
- `session.deleted`: Clean up session state files
236243

244+
Promotion uses accounting results from workspace memory normalization. Pending memories that are kept are promoted; duplicate memories are absorbed; obsolete same-topic memories are superseded; stale or over-capacity compaction memories are rejected.
245+
237246
## Quality Guarantees
238247

239248
### No False Positive Errors
@@ -349,9 +358,9 @@ Modify `src/extractors.ts` to add new extraction patterns.
349358

350359
### Memory V1 to V2
351360

352-
The plugin automatically migrates old format files to the new three-layer architecture. No manual intervention needed.
361+
OpenCode Working Memory automatically migrates old format files to the new three-layer architecture. No manual intervention needed.
353362

354363
---
355364

356365
**Last Updated**: April 2026
357-
**Implementation**: `src/plugin.ts`, `src/extractors.ts`, `src/workspace-memory.ts`, `src/session-state.ts`
366+
**Implementation**: `src/plugin.ts`, `src/extractors.ts`, `src/workspace-memory.ts`, `src/session-state.ts`

docs/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
The Working Memory Plugin works out-of-the-box with sensible defaults. Configuration is defined in `src/types.ts` as constants.
5+
OpenCode Working Memory works out-of-the-box with sensible defaults. Configuration is defined in `src/types.ts` as constants.
66

77
## Workspace Memory Limits
88

@@ -192,21 +192,21 @@ rm ~/.local/share/opencode-working-memory/workspaces/*/sessions/*.json
192192
## Best Practices
193193

194194
1. **Workspace Memory Hygiene**:
195-
- Let the plugin extract memories automatically
195+
- Let OpenCode Working Memory extract memories automatically
196196
- Use explicit "remember this" for important information
197197
- Don't manually edit memory files unless testing
198198

199199
2. **Session State**:
200-
- Let the plugin track active files automatically
200+
- Let OpenCode Working Memory track active files automatically
201201
- Errors are cleared when commands succeed
202202
- No manual intervention needed
203203

204204
3. **Memory Extraction**:
205-
- Use `<workspace_memory_candidates>` during compaction
205+
- Use `Memory candidates:` during compaction
206206
- Follow the pattern: `- [type] text`
207207
- Quality gate rejects invalid candidates
208208

209209
---
210210

211211
**Last Updated**: April 2026
212-
**Configuration File**: `src/types.ts`
212+
**Configuration File**: `src/types.ts`

0 commit comments

Comments
 (0)