Skip to content

Commit c4e29b6

Browse files
committed
docs(readme)!: update documentation for v2.3 breaking changes
Update README to reflect removal of user-scoped memories and scope parameter. Simplify feature descriptions, consolidate configuration examples, and streamline API documentation by moving detailed content to wiki. Add migration guide for v2.3 breaking changes. BREAKING CHANGE: scope parameter removed from all memory operations. All memories are now project-scoped by default. Configuration options renamed: userMemoryAnalysisInterval → userProfileAnalysisInterval, maxProjectMemories removed in favor of unified maxMemories.
1 parent 992f029 commit c4e29b6

File tree

3 files changed

+48
-112
lines changed

3 files changed

+48
-112
lines changed

README.md

Lines changed: 47 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ OpenCode Memory provides AI coding agents with the ability to remember and recal
1111
## Key Features
1212

1313
- **Local Vector Database**: SQLite-based storage with sqlite-vec extension
14-
- **Dual Memory Scopes**: Separate user-level and project-level memory contexts
14+
- **Project Memory System**: Persistent storage for project-specific knowledge
15+
- **User Profile System**: Automatic learning of preferences, patterns, and workflows
1516
- **Unified Timeline**: Browse memories and prompts together with linking support
16-
- **Prompt-Memory Linking**: Bidirectional links between prompts and generated memories
17-
- **User Profile System**: Structured learning with preferences, patterns, workflows, and skill assessment
1817
- **Web Interface**: Full-featured UI for memory management and search
1918
- **Auto-Capture System**: Intelligent prompt-based memory extraction
2019
- **Multi-Provider AI**: Support for OpenAI, Anthropic, and OpenAI-compatible APIs
@@ -52,12 +51,18 @@ bun run build
5251
### Basic Usage
5352

5453
```typescript
55-
memory({ mode: "add", content: "Project uses microservices", scope: "project" })
56-
memory({ mode: "search", query: "architecture decisions", scope: "project" })
54+
// Add project memory
55+
memory({ mode: "add", content: "Project uses microservices architecture" })
56+
57+
// Search memories
58+
memory({ mode: "search", query: "architecture decisions" })
59+
60+
// View user profile
5761
memory({ mode: "profile" })
58-
```
5962

60-
**Note**: User-scoped `add` is deprecated in v2.2+. Use profile system instead.
63+
// List recent memories
64+
memory({ mode: "list", limit: 10 })
65+
```
6166

6267
### Web Interface
6368

@@ -71,7 +76,7 @@ Access at `http://127.0.0.1:4747` to browse memories, view prompt-memory links,
7176

7277
![User Profile Viewer](.github/screenshot-user-profile.png)
7378

74-
### Configuration
79+
## Configuration
7580

7681
Configuration file: `~/.config/opencode/opencode-mem.jsonc`
7782

@@ -86,38 +91,48 @@ Configuration file: `~/.config/opencode/opencode-mem.jsonc`
8691
"memoryModel": "gpt-4",
8792
"memoryApiUrl": "https://api.openai.com/v1",
8893
"memoryApiKey": "sk-...",
89-
"userMemoryAnalysisInterval": 10,
90-
"userProfileMaxPreferences": 20,
91-
"userProfileMaxPatterns": 15,
92-
"userProfileMaxWorkflows": 10,
93-
"userProfileConfidenceDecayDays": 30,
94-
"userProfileChangelogRetentionCount": 5
94+
"userProfileAnalysisInterval": 10,
95+
"maxMemories": 10
9596
}
9697
```
9798

98-
## Breaking Changes (v2.2)
99+
See [Configuration Guide](https://github.com/tickernelz/opencode-mem/wiki/Configuration-Guide) for all options.
99100

100-
**User-scoped memories deprecated in favor of structured user profiles:**
101+
## Breaking Changes (v2.3)
101102

102-
- Removed: User-scoped `addMemory` (now returns error)
103-
- Changed: `memory({ mode: "profile" })` returns new structure (preferences/patterns/workflows/skillLevel)
104-
- Added: 5 new config options for profile management
105-
- New behavior: User learning creates/updates structured profile instead of individual memories
106-
- Migration: Existing user memories remain readable but new ones cannot be created
103+
**User-scoped memories completely removed:**
107104

108-
**Migration required**: Update code using `mode: "profile"` to handle new structure.
105+
- **Removed**: `scope` parameter from all memory operations
106+
- **Removed**: `maxProjectMemories` config (use `maxMemories` instead)
107+
- **Renamed**: `userMemoryAnalysisInterval``userProfileAnalysisInterval`
108+
- **Renamed**: `performUserMemoryLearning()``performUserProfileLearning()`
109+
- **Changed**: All memories are now project-scoped by default
110+
- **Changed**: User preferences managed exclusively through automatic profile system
109111

110-
## Breaking Changes (v2.0)
112+
**Migration required:**
113+
```jsonc
114+
// OLD
115+
{
116+
"userMemoryAnalysisInterval": 10,
117+
"maxMemories": 5,
118+
"maxProjectMemories": 10
119+
}
111120

112-
**Token-based auto-capture has been replaced with prompt-based system:**
121+
// NEW
122+
{
123+
"userProfileAnalysisInterval": 10,
124+
"maxMemories": 10
125+
}
126+
```
113127

114-
- Removed: `autoCaptureTokenThreshold`, `autoCaptureMinTokens`, `autoCaptureMaxMemories`, `autoCaptureSummaryMaxLength`, `autoCaptureContextWindow`
115-
- Added: `memoryProvider`, `userMemoryAnalysisInterval`, `autoCaptureMaxIterations`, `autoCaptureIterationTimeout`
116-
- New behavior: Triggers on session idle, analyzes last uncaptured prompt
117-
- Automatic skip logic for non-technical conversations
118-
- Prompt-memory linking with cascade delete support
128+
Remove `scope` parameter from all `memory()` calls:
129+
```typescript
130+
// OLD
131+
memory({ mode: "add", content: "...", scope: "project" })
119132

120-
**Migration required**: Remove deprecated config options and add new ones.
133+
// NEW
134+
memory({ mode: "add", content: "..." })
135+
```
121136

122137
## Documentation
123138

@@ -126,88 +141,13 @@ For detailed documentation, see the [Wiki](https://github.com/tickernelz/opencod
126141
- [Installation Guide](https://github.com/tickernelz/opencode-mem/wiki/Installation-Guide)
127142
- [Quick Start](https://github.com/tickernelz/opencode-mem/wiki/Quick-Start)
128143
- [Configuration Guide](https://github.com/tickernelz/opencode-mem/wiki/Configuration-Guide)
129-
- [User Profile System](https://github.com/tickernelz/opencode-mem/wiki/User-Profile)
144+
- [User Profile System](https://github.com/tickernelz/opencode-mem/wiki/User-Profile-System)
130145
- [Memory Operations](https://github.com/tickernelz/opencode-mem/wiki/Memory-Operations)
131146
- [Auto-Capture System](https://github.com/tickernelz/opencode-mem/wiki/Auto-Capture-System)
132147
- [Web Interface](https://github.com/tickernelz/opencode-mem/wiki/Web-Interface)
133-
- [Embedding Models](https://github.com/tickernelz/opencode-mem/wiki/Embedding-Models)
134-
- [Performance Tuning](https://github.com/tickernelz/opencode-mem/wiki/Performance-Tuning)
148+
- [API Reference](https://github.com/tickernelz/opencode-mem/wiki/API-Reference)
135149
- [Troubleshooting](https://github.com/tickernelz/opencode-mem/wiki/Troubleshooting)
136150

137-
## Features Overview
138-
139-
### Memory Scopes
140-
141-
- **User Scope**: Cross-project preferences, coding style, communication patterns
142-
- **Project Scope**: Architecture decisions, technology stack, implementation details
143-
144-
### Auto-Capture System
145-
146-
Automatically extracts memories from conversations:
147-
148-
1. Triggers on session idle
149-
2. Analyzes last uncaptured prompt and response
150-
3. Links memory to source prompt
151-
4. Skips non-technical conversations
152-
153-
### User Profile System
154-
155-
Builds structured user profile from conversation history (default: every 10 prompts):
156-
157-
- **Preferences**: Code style, communication style, tool preferences (with confidence scores)
158-
- **Patterns**: Recurring topics, problem domains, technical interests (with frequency tracking)
159-
- **Workflows**: Development sequences, habits, learning style
160-
- **Skill Level**: Overall and per-domain assessment
161-
162-
Profile includes versioning, changelog, and confidence decay mechanism.
163-
164-
### Web Interface
165-
166-
- Unified timeline of memories and prompts
167-
- User profile viewer with changelog
168-
- Visual prompt-memory link indicators
169-
- Cascade delete for linked items
170-
- Bulk operations
171-
- Search and filters
172-
- Maintenance tools (cleanup, deduplication)
173-
174-
## API Reference
175-
176-
### Memory Tool
177-
178-
```typescript
179-
memory({ mode: "add", content: "...", scope: "project" })
180-
memory({ mode: "search", query: "...", scope: "user|project" })
181-
memory({ mode: "list", scope: "user|project", limit: 10 })
182-
memory({ mode: "profile" })
183-
memory({ mode: "forget", memoryId: "..." })
184-
memory({ mode: "auto-capture-toggle" })
185-
memory({ mode: "auto-capture-stats" })
186-
memory({ mode: "capture-now" })
187-
```
188-
189-
**Note**: `scope: "user"` for `add` mode is deprecated in v2.2+.
190-
191-
### REST API
192-
193-
**Memory & Prompt Management:**
194-
- `GET /api/memories?scope=project&includePrompts=true` - List memories/prompts
195-
- `POST /api/memories` - Create memory
196-
- `PUT /api/memories/:id` - Update memory
197-
- `DELETE /api/memories/:id?cascade=true` - Delete memory (and linked prompt)
198-
- `DELETE /api/prompts/:id?cascade=true` - Delete prompt (and linked memory)
199-
- `POST /api/search` - Vector search
200-
201-
**User Profile:**
202-
- `GET /api/profile` - Get user profile
203-
- `GET /api/profile/changelog?limit=5` - Get profile changelog
204-
- `GET /api/profile/snapshot/:changelogId` - Get profile snapshot
205-
- `POST /api/profile/refresh` - Force profile refresh
206-
207-
**Maintenance:**
208-
- `POST /api/cleanup` - Run cleanup
209-
- `POST /api/deduplicate` - Run deduplication
210-
211151
## Development
212152

213153
```bash

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-mem",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "OpenCode plugin that gives coding agents persistent memory using local vector database",
55
"type": "module",
66
"main": "dist/plugin.js",

src/services/api-handlers.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ export async function handleSearch(
505505
}
506506
}
507507
} else {
508-
509508
const projectShards = shardManager.getAllShards("project", "");
510509
const allShards = [...projectShards];
511510

@@ -586,7 +585,6 @@ export async function handleStats(): Promise<
586585
try {
587586
await embeddingService.warmup();
588587

589-
590588
const projectShards = shardManager.getAllShards("project", "");
591589
const allShards = [...projectShards];
592590

@@ -631,7 +629,6 @@ export async function handlePinMemory(id: string): Promise<ApiResponse<void>> {
631629
return { success: false, error: "id is required" };
632630
}
633631

634-
635632
const projectShards = shardManager.getAllShards("project", "");
636633
const allShards = [...projectShards];
637634

@@ -658,7 +655,6 @@ export async function handleUnpinMemory(id: string): Promise<ApiResponse<void>>
658655
return { success: false, error: "id is required" };
659656
}
660657

661-
662658
const projectShards = shardManager.getAllShards("project", "");
663659
const allShards = [...projectShards];
664660

0 commit comments

Comments
 (0)