claude_memory 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/.claude/.mind.mv2.aLCUZd +0 -0
- data/.claude/memory.sqlite3 +0 -0
- data/.claude/rules/claude_memory.generated.md +7 -1
- data/.claude/settings.json +0 -4
- data/.claude/settings.local.json +4 -1
- data/.claude-plugin/plugin.json +1 -1
- data/.claude.json +11 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +62 -11
- data/CLAUDE.md +87 -24
- data/README.md +76 -159
- data/docs/EXAMPLES.md +436 -0
- data/docs/RELEASE_NOTES_v0.2.0.md +179 -0
- data/docs/RUBY_COMMUNITY_POST_v0.2.0.md +582 -0
- data/docs/SOCIAL_MEDIA_v0.2.0.md +420 -0
- data/docs/architecture.md +360 -0
- data/docs/expert_review.md +1718 -0
- data/docs/feature_adoption_plan.md +1241 -0
- data/docs/feature_adoption_plan_revised.md +2374 -0
- data/docs/improvements.md +1325 -0
- data/docs/quality_review.md +1544 -0
- data/docs/review_summary.md +480 -0
- data/lefthook.yml +10 -0
- data/lib/claude_memory/cli.rb +16 -844
- data/lib/claude_memory/commands/base_command.rb +95 -0
- data/lib/claude_memory/commands/changes_command.rb +39 -0
- data/lib/claude_memory/commands/conflicts_command.rb +37 -0
- data/lib/claude_memory/commands/db_init_command.rb +40 -0
- data/lib/claude_memory/commands/doctor_command.rb +147 -0
- data/lib/claude_memory/commands/explain_command.rb +65 -0
- data/lib/claude_memory/commands/help_command.rb +37 -0
- data/lib/claude_memory/commands/hook_command.rb +106 -0
- data/lib/claude_memory/commands/ingest_command.rb +47 -0
- data/lib/claude_memory/commands/init_command.rb +218 -0
- data/lib/claude_memory/commands/promote_command.rb +30 -0
- data/lib/claude_memory/commands/publish_command.rb +36 -0
- data/lib/claude_memory/commands/recall_command.rb +61 -0
- data/lib/claude_memory/commands/registry.rb +55 -0
- data/lib/claude_memory/commands/search_command.rb +43 -0
- data/lib/claude_memory/commands/serve_mcp_command.rb +16 -0
- data/lib/claude_memory/commands/sweep_command.rb +36 -0
- data/lib/claude_memory/commands/version_command.rb +13 -0
- data/lib/claude_memory/configuration.rb +38 -0
- data/lib/claude_memory/core/fact_id.rb +41 -0
- data/lib/claude_memory/core/null_explanation.rb +47 -0
- data/lib/claude_memory/core/null_fact.rb +30 -0
- data/lib/claude_memory/core/result.rb +143 -0
- data/lib/claude_memory/core/session_id.rb +37 -0
- data/lib/claude_memory/core/token_estimator.rb +33 -0
- data/lib/claude_memory/core/transcript_path.rb +37 -0
- data/lib/claude_memory/domain/conflict.rb +51 -0
- data/lib/claude_memory/domain/entity.rb +51 -0
- data/lib/claude_memory/domain/fact.rb +70 -0
- data/lib/claude_memory/domain/provenance.rb +48 -0
- data/lib/claude_memory/hook/exit_codes.rb +18 -0
- data/lib/claude_memory/hook/handler.rb +7 -2
- data/lib/claude_memory/index/index_query.rb +89 -0
- data/lib/claude_memory/index/index_query_logic.rb +41 -0
- data/lib/claude_memory/index/query_options.rb +67 -0
- data/lib/claude_memory/infrastructure/file_system.rb +29 -0
- data/lib/claude_memory/infrastructure/in_memory_file_system.rb +32 -0
- data/lib/claude_memory/ingest/content_sanitizer.rb +42 -0
- data/lib/claude_memory/ingest/ingester.rb +3 -0
- data/lib/claude_memory/ingest/privacy_tag.rb +48 -0
- data/lib/claude_memory/mcp/tools.rb +174 -1
- data/lib/claude_memory/publish.rb +29 -20
- data/lib/claude_memory/recall.rb +164 -16
- data/lib/claude_memory/resolve/resolver.rb +41 -37
- data/lib/claude_memory/shortcuts.rb +56 -0
- data/lib/claude_memory/store/store_manager.rb +35 -32
- data/lib/claude_memory/templates/hooks.example.json +0 -4
- data/lib/claude_memory/version.rb +1 -1
- data/lib/claude_memory.rb +59 -21
- metadata +55 -1
data/docs/EXAMPLES.md
ADDED
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
# ClaudeMemory Examples
|
|
2
|
+
|
|
3
|
+
Real-world use cases and example conversations showing how ClaudeMemory works in practice.
|
|
4
|
+
|
|
5
|
+
## Example 1: New Project Setup
|
|
6
|
+
|
|
7
|
+
**Scenario:** Starting a new Rails project
|
|
8
|
+
|
|
9
|
+
### The Conversation
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
You: "I'm starting a new Rails 7 project with PostgreSQL and deploying to Heroku"
|
|
13
|
+
|
|
14
|
+
Claude: "Great! Let me help you set up your Rails 7 project. I'll create the initial
|
|
15
|
+
structure with PostgreSQL configuration..."
|
|
16
|
+
|
|
17
|
+
[Claude helps with setup tasks]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Behind the Scenes
|
|
21
|
+
|
|
22
|
+
On session stop, ClaudeMemory automatically extracts and stores:
|
|
23
|
+
- **uses_framework**: Rails 7 (project scope)
|
|
24
|
+
- **uses_database**: PostgreSQL (project scope)
|
|
25
|
+
- **deployment_platform**: Heroku (project scope)
|
|
26
|
+
|
|
27
|
+
**No user action needed!**
|
|
28
|
+
|
|
29
|
+
### Later Session
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
You: "Help me add a new User model"
|
|
33
|
+
|
|
34
|
+
Claude: "Based on my memory, you're using Rails 7 with PostgreSQL. I'll create a
|
|
35
|
+
migration for the users table..."
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**What happened:**
|
|
39
|
+
- Claude called `memory.recall` automatically
|
|
40
|
+
- Retrieved project facts about Rails and PostgreSQL
|
|
41
|
+
- Applied context to the current task
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Example 2: Global Coding Preferences
|
|
46
|
+
|
|
47
|
+
**Scenario:** Establishing personal coding conventions
|
|
48
|
+
|
|
49
|
+
### The Conversation
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
You: "I always prefer 4-space indentation and descriptive variable names over
|
|
53
|
+
abbreviations"
|
|
54
|
+
|
|
55
|
+
Claude: "I'll remember that preference globally and apply it to all your projects."
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Behind the Scenes
|
|
59
|
+
|
|
60
|
+
Stored with **scope: global**:
|
|
61
|
+
- **convention**: "4-space indentation" (global)
|
|
62
|
+
- **convention**: "descriptive variable names over abbreviations" (global)
|
|
63
|
+
|
|
64
|
+
### Later (Different Project)
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
You: "Write a function to calculate the total price with tax"
|
|
68
|
+
|
|
69
|
+
Claude: "Here's a function with 4-space indentation and descriptive variable names:
|
|
70
|
+
|
|
71
|
+
def calculate_total_price_with_tax(subtotal, tax_rate)
|
|
72
|
+
tax_amount = subtotal * tax_rate
|
|
73
|
+
total = subtotal + tax_amount
|
|
74
|
+
total
|
|
75
|
+
end
|
|
76
|
+
"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**What happened:**
|
|
80
|
+
- Claude automatically recalled global conventions
|
|
81
|
+
- Applied 4-space indentation without being asked
|
|
82
|
+
- Used descriptive names (`subtotal`, `tax_rate`, `tax_amount`, `total`)
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Example 3: Architecture Decisions
|
|
87
|
+
|
|
88
|
+
**Scenario:** Recording and recalling design decisions
|
|
89
|
+
|
|
90
|
+
### Initial Decision
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
You: "We decided to use a microservices architecture for this app, with JWT
|
|
94
|
+
authentication and REST APIs"
|
|
95
|
+
|
|
96
|
+
Claude: "Got it. I'll record that architectural decision for future reference."
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Behind the Scenes
|
|
100
|
+
|
|
101
|
+
Stored as decisions:
|
|
102
|
+
- **decision**: "Use microservices architecture" (project scope)
|
|
103
|
+
- **auth_method**: "JWT" (project scope)
|
|
104
|
+
- **decision**: "REST APIs for service communication" (project scope)
|
|
105
|
+
|
|
106
|
+
### Weeks Later
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
You: "What were our architecture decisions for this project?"
|
|
110
|
+
|
|
111
|
+
Claude: [calls memory.decisions]
|
|
112
|
+
|
|
113
|
+
"Here are the architectural decisions I have on record:
|
|
114
|
+
|
|
115
|
+
1. **Architecture Pattern**: Microservices architecture
|
|
116
|
+
2. **Authentication**: JWT authentication
|
|
117
|
+
3. **API Style**: REST APIs for service communication
|
|
118
|
+
|
|
119
|
+
These decisions were made during the initial project planning."
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**What happened:**
|
|
123
|
+
- Semantic shortcut `memory.decisions` provides quick access
|
|
124
|
+
- No need to manually construct search queries
|
|
125
|
+
- Pre-configured to find decision-related facts
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Example 4: Privacy Control
|
|
130
|
+
|
|
131
|
+
**Scenario:** Working with sensitive credentials
|
|
132
|
+
|
|
133
|
+
### The Conversation
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
You: "Our API endpoint is https://api.example.com with key <private>sk-abc123</private>
|
|
137
|
+
and secret <private>secret_xyz</private>"
|
|
138
|
+
|
|
139
|
+
Claude: "I'll configure the API client with those credentials..."
|
|
140
|
+
|
|
141
|
+
[Claude uses the credentials during the session to help set up API calls]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Behind the Scenes
|
|
145
|
+
|
|
146
|
+
**What gets stored:**
|
|
147
|
+
```
|
|
148
|
+
"API endpoint is https://api.example.com with key and secret "
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**What does NOT get stored:**
|
|
152
|
+
- ❌ `sk-abc123`
|
|
153
|
+
- ❌ `secret_xyz`
|
|
154
|
+
|
|
155
|
+
**Privacy tags stripped at ingestion** - zero chance of leaking in future queries.
|
|
156
|
+
|
|
157
|
+
### Later Session
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
You: "What's our API configuration?"
|
|
161
|
+
|
|
162
|
+
Claude: [calls memory.recall]
|
|
163
|
+
|
|
164
|
+
"According to my memory, your API endpoint is https://api.example.com.
|
|
165
|
+
You'll need to provide the key and secret again as I don't store sensitive credentials."
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Example 5: Semantic Shortcuts
|
|
171
|
+
|
|
172
|
+
**Scenario:** Quick access to common information
|
|
173
|
+
|
|
174
|
+
### Conventions Query
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
You: "What coding conventions do I follow?"
|
|
178
|
+
|
|
179
|
+
Claude: [calls memory.conventions]
|
|
180
|
+
|
|
181
|
+
"Here are your coding conventions:
|
|
182
|
+
|
|
183
|
+
• 4-space indentation
|
|
184
|
+
• Descriptive variable names over abbreviations
|
|
185
|
+
• RSpec for testing (not Minitest)
|
|
186
|
+
• Standard Ruby for linting
|
|
187
|
+
• Prefer composition over inheritance"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**What happened:**
|
|
191
|
+
- `memory.conventions` is a semantic shortcut
|
|
192
|
+
- Pre-configured to search for convention-related predicates
|
|
193
|
+
- Returns results instantly without manual query construction
|
|
194
|
+
|
|
195
|
+
### Architecture Query
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
You: "Remind me what frameworks we're using"
|
|
199
|
+
|
|
200
|
+
Claude: [calls memory.architecture]
|
|
201
|
+
|
|
202
|
+
"Your tech stack:
|
|
203
|
+
|
|
204
|
+
**Frontend:**
|
|
205
|
+
• Framework: React 18
|
|
206
|
+
• State Management: Redux Toolkit
|
|
207
|
+
• Styling: Tailwind CSS
|
|
208
|
+
|
|
209
|
+
**Backend:**
|
|
210
|
+
• Framework: Rails 7
|
|
211
|
+
• Database: PostgreSQL
|
|
212
|
+
• Deployment: Heroku"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Decisions Query
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
You: "What architectural decisions have we made?"
|
|
219
|
+
|
|
220
|
+
Claude: [calls memory.decisions]
|
|
221
|
+
|
|
222
|
+
"Key architectural decisions:
|
|
223
|
+
|
|
224
|
+
1. Microservices architecture
|
|
225
|
+
2. JWT authentication
|
|
226
|
+
3. REST APIs for service communication
|
|
227
|
+
4. Event-driven updates with webhooks"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Example 6: Progressive Disclosure
|
|
233
|
+
|
|
234
|
+
**Scenario:** Token-efficient memory searches
|
|
235
|
+
|
|
236
|
+
### Initial Query (Lightweight)
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
Claude: [calls memory.recall_index with query="database"]
|
|
240
|
+
|
|
241
|
+
# Returns lightweight index (~50 tokens per fact):
|
|
242
|
+
# - Fact ID: 42, Preview: "uses_database: PostgreSQL"
|
|
243
|
+
# - Fact ID: 78, Preview: "database_host: AWS RDS"
|
|
244
|
+
# - Fact ID: 103, Preview: "convention: Always use parameterized queries"
|
|
245
|
+
# - Fact ID: 145, Preview: "decision: Use connection pooling"
|
|
246
|
+
# - Fact ID: 189, Preview: "uses_database: Redis for caching"
|
|
247
|
+
|
|
248
|
+
Claude: "I found several facts about databases in your project:
|
|
249
|
+
• PostgreSQL as primary database
|
|
250
|
+
• AWS RDS for hosting
|
|
251
|
+
• Redis for caching
|
|
252
|
+
• Connection pooling enabled
|
|
253
|
+
• Parameterized queries convention
|
|
254
|
+
|
|
255
|
+
Would you like details on any specific item?"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Detailed Query (On Demand)
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
You: "Tell me more about the PostgreSQL setup"
|
|
262
|
+
|
|
263
|
+
Claude: [calls memory.recall_details with fact_id=42]
|
|
264
|
+
|
|
265
|
+
# Returns full details with provenance:
|
|
266
|
+
# - Subject: repo
|
|
267
|
+
# - Predicate: uses_database
|
|
268
|
+
# - Object: PostgreSQL
|
|
269
|
+
# - Quote: "I'm starting a new Rails 7 project with PostgreSQL"
|
|
270
|
+
# - Source: Session abc-123, 2026-01-15
|
|
271
|
+
# - Superseded from: MySQL (Fact ID: 39)
|
|
272
|
+
# - Related: 3 other database facts
|
|
273
|
+
|
|
274
|
+
Claude: "You're using PostgreSQL as your primary database. This decision was made
|
|
275
|
+
on 2026-01-15 when starting the Rails 7 project. It replaced a previous
|
|
276
|
+
MySQL configuration."
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Token Savings:**
|
|
280
|
+
- Initial search: ~250 tokens (5 facts × 50 tokens)
|
|
281
|
+
- Without progressive disclosure: ~2,500 tokens (5 facts × 500 tokens)
|
|
282
|
+
- **10x reduction!**
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Example 7: Conflict Resolution
|
|
287
|
+
|
|
288
|
+
**Scenario:** Handling contradictory information
|
|
289
|
+
|
|
290
|
+
### Day 1
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
You: "We're using PostgreSQL for this project"
|
|
294
|
+
|
|
295
|
+
Claude: "Got it, storing that in memory."
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Stored:** `uses_database: PostgreSQL`
|
|
299
|
+
|
|
300
|
+
### Day 5
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
You: "Actually, we switched to MySQL for better compatibility"
|
|
304
|
+
|
|
305
|
+
Claude: "I'll update my memory to reflect that database change."
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Behind the Scenes
|
|
309
|
+
|
|
310
|
+
ClaudeMemory automatically:
|
|
311
|
+
1. **Creates new fact**: `uses_database: MySQL`
|
|
312
|
+
2. **Marks old fact as superseded**: `uses_database: PostgreSQL` (superseded by Fact #78)
|
|
313
|
+
3. **Maintains temporal validity**:
|
|
314
|
+
- PostgreSQL valid from 2026-01-15 to 2026-01-20
|
|
315
|
+
- MySQL valid from 2026-01-20 onwards
|
|
316
|
+
|
|
317
|
+
### Query Later
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
You: "What database are we using?"
|
|
321
|
+
|
|
322
|
+
Claude: [calls memory.recall]
|
|
323
|
+
|
|
324
|
+
"You're currently using MySQL. You previously used PostgreSQL but switched
|
|
325
|
+
to MySQL on 2026-01-20 for better compatibility."
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**What happened:**
|
|
329
|
+
- Truth maintenance handled supersession automatically
|
|
330
|
+
- No duplicates or conflicts
|
|
331
|
+
- Historical context preserved
|
|
332
|
+
- Current fact returned by default
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## Example 8: Team Workflow
|
|
337
|
+
|
|
338
|
+
**Scenario:** Sharing memory across team members (advanced)
|
|
339
|
+
|
|
340
|
+
### Developer A's Session
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
Developer A: "We decided to use Stripe for payments and store webhooks in the
|
|
344
|
+
payment_events table"
|
|
345
|
+
|
|
346
|
+
Claude: [stores decision]
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Developer B's Session (Same Project)
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
Developer B: "How do we handle payment webhooks?"
|
|
353
|
+
|
|
354
|
+
Claude: [recalls project facts]
|
|
355
|
+
|
|
356
|
+
"According to the project's memory, you're using Stripe for payments and storing
|
|
357
|
+
webhooks in the payment_events table."
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**How it works:**
|
|
361
|
+
- Project-scoped facts stored in `.claude/memory.sqlite3`
|
|
362
|
+
- Committed to git (optional)
|
|
363
|
+
- Shared across team members
|
|
364
|
+
- Provides consistency and context for everyone
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Example 9: Migration Workflow
|
|
369
|
+
|
|
370
|
+
**Scenario:** Migrating from one technology to another
|
|
371
|
+
|
|
372
|
+
### Before Migration
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Memory contains:
|
|
376
|
+
• uses_framework: React (class components)
|
|
377
|
+
• state_management: Redux
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### During Migration
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
You: "We're migrating to React hooks and removing Redux in favor of Context API"
|
|
384
|
+
|
|
385
|
+
Claude: "I'll help with the migration and update my memory accordingly."
|
|
386
|
+
|
|
387
|
+
[Claude helps refactor components]
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### After Migration
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
Memory now contains:
|
|
394
|
+
• uses_framework: React (hooks) [superseded React class components]
|
|
395
|
+
• state_management: Context API [superseded Redux]
|
|
396
|
+
|
|
397
|
+
Historical facts preserved with temporal validity:
|
|
398
|
+
• Redux valid from 2025-06-01 to 2026-01-22
|
|
399
|
+
• Context API valid from 2026-01-22 onwards
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Future Queries
|
|
403
|
+
|
|
404
|
+
```
|
|
405
|
+
You: "What state management do we use?"
|
|
406
|
+
|
|
407
|
+
Claude: "You're using Context API for state management. You previously used Redux
|
|
408
|
+
but migrated to Context API on 2026-01-22."
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Tips for Effective Memory Usage
|
|
414
|
+
|
|
415
|
+
### ✅ Do This
|
|
416
|
+
|
|
417
|
+
- **Be specific**: "We're using PostgreSQL 14" is better than "We're using a database"
|
|
418
|
+
- **State preferences clearly**: "I always prefer X" signals global scope
|
|
419
|
+
- **Use privacy tags**: `<private>sensitive-data</private>` for secrets
|
|
420
|
+
- **Review decisions**: Periodically ask "What do you remember about this project?"
|
|
421
|
+
|
|
422
|
+
### ❌ Avoid This
|
|
423
|
+
|
|
424
|
+
- **Don't repeat facts**: ClaudeMemory handles duplicates automatically
|
|
425
|
+
- **Don't worry about formatting**: Natural conversation works best
|
|
426
|
+
- **Don't manually manage memory**: Let Claude handle extraction
|
|
427
|
+
- **Don't store temporary info**: Only durable facts are worth remembering
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## Next Steps
|
|
432
|
+
|
|
433
|
+
- 📖 [Read the Getting Started Guide](GETTING_STARTED.md) *(coming soon)*
|
|
434
|
+
- 🔧 [Set up the Claude Code Plugin](PLUGIN.md)
|
|
435
|
+
- 🏗️ [Understand the Architecture](architecture.md)
|
|
436
|
+
- 📝 [Check the Changelog](../CHANGELOG.md)
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# ClaudeMemory v0.2.0: Privacy, Performance, Polish
|
|
2
|
+
|
|
3
|
+
**Release Date:** January 22, 2026
|
|
4
|
+
|
|
5
|
+
We're excited to announce ClaudeMemory v0.2.0, a major feature release that brings privacy-first design, 10x performance improvements, and comprehensive polish to your Claude Code memory system.
|
|
6
|
+
|
|
7
|
+
## 🔒 Privacy & Security
|
|
8
|
+
|
|
9
|
+
**Privacy Tag System**
|
|
10
|
+
|
|
11
|
+
Exclude sensitive data from memory with simple tags:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
You: "My API key is <private>sk-abc123</private>"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The key is **never stored** or indexed. Supported tags:
|
|
18
|
+
- `<private>` - Generic sensitive data
|
|
19
|
+
- `<no-memory>` - Explicit memory exclusion
|
|
20
|
+
- `<secret>` - Secrets and credentials
|
|
21
|
+
|
|
22
|
+
**Security Hardening**
|
|
23
|
+
- ReDoS protection with 100-tag limit per ingestion
|
|
24
|
+
- ContentSanitizer module with 100% test coverage
|
|
25
|
+
- Safe handling of malformed or nested tags
|
|
26
|
+
|
|
27
|
+
## ⚡ Token Economics & Performance
|
|
28
|
+
|
|
29
|
+
**Progressive Disclosure Pattern**
|
|
30
|
+
|
|
31
|
+
New two-phase query system reduces token usage by **10x**:
|
|
32
|
+
|
|
33
|
+
1. **`memory.recall_index`** - Lightweight preview (~50 tokens per fact)
|
|
34
|
+
- Quick scan of relevant facts
|
|
35
|
+
- Decide what needs details
|
|
36
|
+
|
|
37
|
+
2. **`memory.recall_details`** - Full provenance on demand
|
|
38
|
+
- Complete fact details
|
|
39
|
+
- Source quotes and relationships
|
|
40
|
+
- Only when needed
|
|
41
|
+
|
|
42
|
+
**Example:**
|
|
43
|
+
```
|
|
44
|
+
Before: 2,500 tokens (5 facts × 500 tokens)
|
|
45
|
+
After: 250 tokens (5 facts × 50 tokens)
|
|
46
|
+
10x reduction!
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Query Optimization**
|
|
50
|
+
- N+1 query elimination (2N+1 → 3 queries)
|
|
51
|
+
- Batch loading for facts, provenance, and entities
|
|
52
|
+
- IndexQuery object for cleaner search logic
|
|
53
|
+
- TokenEstimator with 100% test coverage
|
|
54
|
+
|
|
55
|
+
## 🎯 Semantic Shortcuts
|
|
56
|
+
|
|
57
|
+
Pre-configured queries for common use cases:
|
|
58
|
+
|
|
59
|
+
- **`memory.decisions`** - Architectural decisions and accepted proposals
|
|
60
|
+
- **`memory.conventions`** - Global coding conventions and style preferences
|
|
61
|
+
- **`memory.architecture`** - Framework choices and architectural patterns
|
|
62
|
+
|
|
63
|
+
**Before:**
|
|
64
|
+
```ruby
|
|
65
|
+
memory.recall("decisions OR conventions OR choices OR patterns...")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**After:**
|
|
69
|
+
```ruby
|
|
70
|
+
memory.decisions # Just works!
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 🛠️ Developer Experience
|
|
74
|
+
|
|
75
|
+
**Exit Code Strategy**
|
|
76
|
+
|
|
77
|
+
Standardized hook exit codes for robust integration:
|
|
78
|
+
```ruby
|
|
79
|
+
SUCCESS = 0 # Operation completed
|
|
80
|
+
WARNING = 1 # Completed with warnings (e.g., skipped ingestion)
|
|
81
|
+
ERROR = 2 # Operation failed
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Testing & Quality**
|
|
85
|
+
- **157 new test examples** (426 → 583 total)
|
|
86
|
+
- 100% coverage for security-critical modules (ContentSanitizer)
|
|
87
|
+
- 100% coverage for accuracy-critical modules (TokenEstimator)
|
|
88
|
+
- Comprehensive hook exit code tests (13 test cases)
|
|
89
|
+
|
|
90
|
+
**Code Quality**
|
|
91
|
+
- PrivacyTag value object for type-safe tag handling
|
|
92
|
+
- QueryOptions parameter object for consistent APIs
|
|
93
|
+
- Empty query handling for FTS5 edge cases
|
|
94
|
+
|
|
95
|
+
## 📊 What's Included
|
|
96
|
+
|
|
97
|
+
### New MCP Tools
|
|
98
|
+
- `memory.recall_index` - Lightweight fact previews
|
|
99
|
+
- `memory.recall_details` - Full fact details on demand
|
|
100
|
+
- `memory.decisions` - Quick decision lookup
|
|
101
|
+
- `memory.conventions` - Convention lookup
|
|
102
|
+
- `memory.architecture` - Architecture lookup
|
|
103
|
+
|
|
104
|
+
### Enhanced Features
|
|
105
|
+
- Privacy tag support in all ingestion paths
|
|
106
|
+
- Token estimation for all query results
|
|
107
|
+
- Batch-optimized recall queries
|
|
108
|
+
- Comprehensive error handling
|
|
109
|
+
|
|
110
|
+
## 📦 Installation
|
|
111
|
+
|
|
112
|
+
### New Users
|
|
113
|
+
```bash
|
|
114
|
+
gem install claude_memory
|
|
115
|
+
claude-memory init --global
|
|
116
|
+
claude-memory doctor
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Existing Users
|
|
120
|
+
```bash
|
|
121
|
+
gem update claude_memory
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**No migration needed** - all existing databases are compatible!
|
|
125
|
+
|
|
126
|
+
## 🔄 Upgrade Guide
|
|
127
|
+
|
|
128
|
+
### Breaking Changes
|
|
129
|
+
**None!** This release is fully backward compatible.
|
|
130
|
+
|
|
131
|
+
### Recommended Actions
|
|
132
|
+
1. Update the gem: `gem update claude_memory`
|
|
133
|
+
2. Review the [new examples](https://github.com/codenamev/claude_memory/blob/main/docs/EXAMPLES.md)
|
|
134
|
+
3. Start using privacy tags for sensitive data
|
|
135
|
+
4. Try semantic shortcuts (`memory.decisions`, `memory.conventions`)
|
|
136
|
+
|
|
137
|
+
## 📖 Documentation
|
|
138
|
+
|
|
139
|
+
- 📋 [Comprehensive Examples](https://github.com/codenamev/claude_memory/blob/main/docs/EXAMPLES.md) - 9 real-world scenarios
|
|
140
|
+
- 🔐 [Privacy Guide](https://github.com/codenamev/claude_memory/blob/main/docs/EXAMPLES.md#example-4-privacy-control)
|
|
141
|
+
- ⚡ [Performance Guide](https://github.com/codenamev/claude_memory/blob/main/docs/EXAMPLES.md#example-6-progressive-disclosure)
|
|
142
|
+
- 🏗️ [Architecture](https://github.com/codenamev/claude_memory/blob/main/docs/architecture.md)
|
|
143
|
+
|
|
144
|
+
## 🙏 Credits
|
|
145
|
+
|
|
146
|
+
Built with ❤️ by [Valentino Stoll](https://github.com/codenamev)
|
|
147
|
+
|
|
148
|
+
Special thanks to:
|
|
149
|
+
- Early adopters and testers
|
|
150
|
+
- Claude Code team for hooks and MCP support
|
|
151
|
+
- Ruby community for feedback and ideas
|
|
152
|
+
|
|
153
|
+
## 🚀 What's Next
|
|
154
|
+
|
|
155
|
+
### Planned for v0.3.0
|
|
156
|
+
- Vector embeddings for semantic search (optional)
|
|
157
|
+
- Multi-project memory sharing
|
|
158
|
+
- Memory export/import utilities
|
|
159
|
+
- Web dashboard for memory visualization
|
|
160
|
+
|
|
161
|
+
### Long-term Roadmap
|
|
162
|
+
- Team collaboration features
|
|
163
|
+
- Memory analytics and insights
|
|
164
|
+
- Plugin marketplace integration
|
|
165
|
+
|
|
166
|
+
## 🐛 Known Issues
|
|
167
|
+
|
|
168
|
+
None at this time! Please [report bugs](https://github.com/codenamev/claude_memory/issues) if you find any.
|
|
169
|
+
|
|
170
|
+
## 💬 Feedback & Support
|
|
171
|
+
|
|
172
|
+
- 🐛 [Report a bug](https://github.com/codenamev/claude_memory/issues)
|
|
173
|
+
- 💡 [Request a feature](https://github.com/codenamev/claude_memory/issues)
|
|
174
|
+
- 💬 [Join discussions](https://github.com/codenamev/claude_memory/discussions)
|
|
175
|
+
- 📧 Email: valentino@hanamirb.org
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
**Full Changelog:** [CHANGELOG.md](https://github.com/codenamev/claude_memory/blob/main/CHANGELOG.md)
|