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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/.mind.mv2.aLCUZd +0 -0
  3. data/.claude/memory.sqlite3 +0 -0
  4. data/.claude/rules/claude_memory.generated.md +7 -1
  5. data/.claude/settings.json +0 -4
  6. data/.claude/settings.local.json +4 -1
  7. data/.claude-plugin/plugin.json +1 -1
  8. data/.claude.json +11 -0
  9. data/.ruby-version +1 -0
  10. data/CHANGELOG.md +62 -11
  11. data/CLAUDE.md +87 -24
  12. data/README.md +76 -159
  13. data/docs/EXAMPLES.md +436 -0
  14. data/docs/RELEASE_NOTES_v0.2.0.md +179 -0
  15. data/docs/RUBY_COMMUNITY_POST_v0.2.0.md +582 -0
  16. data/docs/SOCIAL_MEDIA_v0.2.0.md +420 -0
  17. data/docs/architecture.md +360 -0
  18. data/docs/expert_review.md +1718 -0
  19. data/docs/feature_adoption_plan.md +1241 -0
  20. data/docs/feature_adoption_plan_revised.md +2374 -0
  21. data/docs/improvements.md +1325 -0
  22. data/docs/quality_review.md +1544 -0
  23. data/docs/review_summary.md +480 -0
  24. data/lefthook.yml +10 -0
  25. data/lib/claude_memory/cli.rb +16 -844
  26. data/lib/claude_memory/commands/base_command.rb +95 -0
  27. data/lib/claude_memory/commands/changes_command.rb +39 -0
  28. data/lib/claude_memory/commands/conflicts_command.rb +37 -0
  29. data/lib/claude_memory/commands/db_init_command.rb +40 -0
  30. data/lib/claude_memory/commands/doctor_command.rb +147 -0
  31. data/lib/claude_memory/commands/explain_command.rb +65 -0
  32. data/lib/claude_memory/commands/help_command.rb +37 -0
  33. data/lib/claude_memory/commands/hook_command.rb +106 -0
  34. data/lib/claude_memory/commands/ingest_command.rb +47 -0
  35. data/lib/claude_memory/commands/init_command.rb +218 -0
  36. data/lib/claude_memory/commands/promote_command.rb +30 -0
  37. data/lib/claude_memory/commands/publish_command.rb +36 -0
  38. data/lib/claude_memory/commands/recall_command.rb +61 -0
  39. data/lib/claude_memory/commands/registry.rb +55 -0
  40. data/lib/claude_memory/commands/search_command.rb +43 -0
  41. data/lib/claude_memory/commands/serve_mcp_command.rb +16 -0
  42. data/lib/claude_memory/commands/sweep_command.rb +36 -0
  43. data/lib/claude_memory/commands/version_command.rb +13 -0
  44. data/lib/claude_memory/configuration.rb +38 -0
  45. data/lib/claude_memory/core/fact_id.rb +41 -0
  46. data/lib/claude_memory/core/null_explanation.rb +47 -0
  47. data/lib/claude_memory/core/null_fact.rb +30 -0
  48. data/lib/claude_memory/core/result.rb +143 -0
  49. data/lib/claude_memory/core/session_id.rb +37 -0
  50. data/lib/claude_memory/core/token_estimator.rb +33 -0
  51. data/lib/claude_memory/core/transcript_path.rb +37 -0
  52. data/lib/claude_memory/domain/conflict.rb +51 -0
  53. data/lib/claude_memory/domain/entity.rb +51 -0
  54. data/lib/claude_memory/domain/fact.rb +70 -0
  55. data/lib/claude_memory/domain/provenance.rb +48 -0
  56. data/lib/claude_memory/hook/exit_codes.rb +18 -0
  57. data/lib/claude_memory/hook/handler.rb +7 -2
  58. data/lib/claude_memory/index/index_query.rb +89 -0
  59. data/lib/claude_memory/index/index_query_logic.rb +41 -0
  60. data/lib/claude_memory/index/query_options.rb +67 -0
  61. data/lib/claude_memory/infrastructure/file_system.rb +29 -0
  62. data/lib/claude_memory/infrastructure/in_memory_file_system.rb +32 -0
  63. data/lib/claude_memory/ingest/content_sanitizer.rb +42 -0
  64. data/lib/claude_memory/ingest/ingester.rb +3 -0
  65. data/lib/claude_memory/ingest/privacy_tag.rb +48 -0
  66. data/lib/claude_memory/mcp/tools.rb +174 -1
  67. data/lib/claude_memory/publish.rb +29 -20
  68. data/lib/claude_memory/recall.rb +164 -16
  69. data/lib/claude_memory/resolve/resolver.rb +41 -37
  70. data/lib/claude_memory/shortcuts.rb +56 -0
  71. data/lib/claude_memory/store/store_manager.rb +35 -32
  72. data/lib/claude_memory/templates/hooks.example.json +0 -4
  73. data/lib/claude_memory/version.rb +1 -1
  74. data/lib/claude_memory.rb +59 -21
  75. metadata +55 -1
@@ -0,0 +1,420 @@
1
+ # Social Media Snippets for ClaudeMemory v0.2.0
2
+
3
+ ## Twitter/X (280 characters)
4
+
5
+ ### Option 1: Feature Focus
6
+ ```
7
+ πŸš€ ClaudeMemory v0.2.0 is out!
8
+
9
+ βœ… Privacy tags for sensitive data
10
+ βœ… 10x faster queries (progressive disclosure)
11
+ βœ… Semantic shortcuts (decisions, conventions)
12
+ βœ… 157 new tests (583 total)
13
+
14
+ Give Claude Code long-term memoryβ€”automatic, intelligent, zero-config.
15
+
16
+ gem install claude_memory
17
+
18
+ https://github.com/codenamev/claude_memory
19
+ ```
20
+
21
+ ### Option 2: Privacy Focus
22
+ ```
23
+ πŸ”’ ClaudeMemory v0.2.0: Privacy-first memory for Claude Code
24
+
25
+ Use <private>tags</private> to exclude sensitive data from memory.
26
+ Your API keys stay private, but Claude still remembers context.
27
+
28
+ 10x query performance + semantic shortcuts included!
29
+
30
+ gem install claude_memory
31
+
32
+ https://github.com/codenamev/claude_memory
33
+ ```
34
+
35
+ ### Option 3: Performance Focus
36
+ ```
37
+ ⚑ ClaudeMemory v0.2.0: 10x faster memory queries!
38
+
39
+ New progressive disclosure:
40
+ β€’ recall_index: Quick previews (~50 tokens)
41
+ β€’ recall_details: Full context on demand
42
+
43
+ Plus: Privacy tags, semantic shortcuts, 157 new tests
44
+
45
+ gem install claude_memory
46
+
47
+ https://github.com/codenamev/claude_memory
48
+ ```
49
+
50
+ ---
51
+
52
+ ## LinkedIn (Professional, 2-3 paragraphs)
53
+
54
+ ### Version 1: Professional Announcement
55
+
56
+ ```
57
+ I'm excited to announce ClaudeMemory v0.2.0, a major update to the long-term memory system for Claude Code that brings privacy-first design and significant performance improvements.
58
+
59
+ ClaudeMemory enables Claude Code to maintain persistent memory across conversationsβ€”automatically extracting facts about your tech stack, architectural decisions, and coding preferences. Version 0.2.0 introduces three major capabilities:
60
+
61
+ πŸ”’ Privacy Tag System: Use <private> tags to exclude sensitive data like API keys and credentials from memory. Content is sanitized at ingestion with ReDoS protection and 100% test coverage for security-critical code.
62
+
63
+ ⚑ 10x Query Performance: New progressive disclosure pattern reduces token usage from 2,500 to 250 tokens by showing lightweight previews first, then full details on demand. This makes memory queries practical for production use.
64
+
65
+ 🎯 Semantic Shortcuts: Pre-configured queries (memory.decisions, memory.conventions, memory.architecture) eliminate manual search construction and provide instant access to common information.
66
+
67
+ Built with Ruby 3.2+, backed by SQLite, with 583 test examples and zero external dependencies. Ready to use today:
68
+
69
+ gem install claude_memory
70
+ claude-memory init --global
71
+
72
+ Full release notes: https://github.com/codenamev/claude_memory/releases/tag/v0.2.0
73
+
74
+ #Ruby #AI #ClaudeAI #DeveloperTools #OpenSource
75
+ ```
76
+
77
+ ### Version 2: Technical Deep Dive
78
+
79
+ ```
80
+ ClaudeMemory v0.2.0 is now available with significant architectural improvements for privacy, performance, and developer experience.
81
+
82
+ Key Technical Achievements:
83
+
84
+ **Privacy & Security**
85
+ Implemented ContentSanitizer module with support for <private>, <no-memory>, and <secret> tags. Content is sanitized at ingestion with protection against ReDoS attacks (100-tag limit). Security-critical modules have 100% test coverage.
86
+
87
+ **Query Optimization**
88
+ Reduced N+1 queries from 2N+1 to 3 through batch loading of facts, provenance, and entities. New progressive disclosure pattern (recall_index + recall_details) achieves 10x token reduction while maintaining full context availability.
89
+
90
+ **Domain Design**
91
+ Introduced semantic shortcuts (decisions, conventions, architecture) using predicate-based query builder. Value objects (PrivacyTag, QueryOptions) and exit code strategy (SUCCESS/WARNING/ERROR) improve type safety and integration robustness.
92
+
93
+ **Testing & Quality**
94
+ Added 157 test examples (583 total). Achieved 100% coverage for TokenEstimator and ContentSanitizer modules. Comprehensive hook integration tests with all event types.
95
+
96
+ Built as a Ruby gem with SQLite storage, MCP tools, and Claude Code hooks for seamless integration. No external dependencies or API keys required.
97
+
98
+ Installation: gem install claude_memory
99
+
100
+ GitHub: https://github.com/codenamev/claude_memory
101
+
102
+ #Ruby #SoftwareEngineering #AI #ClaudeAI #Architecture
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Mastodon / Fediverse
108
+
109
+ ### Version 1: Technical Community
110
+
111
+ ```
112
+ πŸ“’ ClaudeMemory v0.2.0 released!
113
+
114
+ Long-term memory for Claude Code with privacy, performance, and polish.
115
+
116
+ πŸ”’ Privacy tags: <private>secret</private> never gets stored
117
+ ⚑ 10x token reduction with progressive disclosure
118
+ 🎯 Semantic shortcuts for decisions, conventions, architecture
119
+ βœ… 583 test examples (157 new)
120
+
121
+ Built with Ruby 3.2+ and SQLite. Zero external dependencies.
122
+
123
+ gem install claude_memory
124
+
125
+ Full details: https://github.com/codenamev/claude_memory
126
+
127
+ #Ruby #ClaudeCode #OpenSource #DeveloperTools #AI
128
+ ```
129
+
130
+ ### Version 2: Ruby Community Focus
131
+
132
+ ```
133
+ πŸš€ New Ruby gem alert: ClaudeMemory v0.2.0
134
+
135
+ Give Claude Code persistent memory across all conversations. Built with:
136
+ β€’ Ruby 3.2+
137
+ β€’ Sequel ORM
138
+ β€’ SQLite3 storage
139
+ β€’ Standard Ruby linting
140
+ β€’ RSpec (583 examples)
141
+
142
+ New in v0.2.0:
143
+ β€’ Privacy tag system
144
+ β€’ Progressive disclosure (10x faster)
145
+ β€’ Semantic shortcuts
146
+ β€’ Exit code strategy for hooks
147
+ β€’ 100% test coverage for critical modules
148
+
149
+ Clean architecture with Domain-Driven Design, value objects, and SOLID principles.
150
+
151
+ Installation: gem install claude_memory
152
+
153
+ https://github.com/codenamev/claude_memory
154
+
155
+ #Ruby #RubyGems #ClaudeCode #SQLite #OpenSource
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Hacker News (Title + Comment)
161
+
162
+ ### Title Option 1
163
+ ```
164
+ ClaudeMemory v0.2.0 – Privacy-first long-term memory for Claude Code
165
+ ```
166
+
167
+ ### Title Option 2
168
+ ```
169
+ Show HN: ClaudeMemory v0.2.0 with privacy tags and 10x query performance
170
+ ```
171
+
172
+ ### Comment (First Comment in Thread)
173
+
174
+ ```
175
+ Hi HN! Author here.
176
+
177
+ I'm releasing ClaudeMemory v0.2.0, a Ruby gem that gives Claude Code persistent memory across conversations. It extracts facts about your tech stack, decisions, and preferences automaticallyβ€”no API keys or configuration needed.
178
+
179
+ This release focuses on three areas:
180
+
181
+ 1. Privacy: New <private> tag system strips sensitive data at ingestion. Your API keys never get stored, but Claude still remembers the context around them.
182
+
183
+ 2. Performance: Progressive disclosure pattern reduces token usage by 10x. Quick previews first (recall_index), full details on demand (recall_details).
184
+
185
+ 3. Developer Experience: Semantic shortcuts (memory.decisions, memory.conventions) eliminate manual query construction. Exit code strategy for robust hook integration.
186
+
187
+ Architecture highlights:
188
+ β€’ Ruby 3.2+ with Sequel ORM and SQLite3
189
+ β€’ Domain-Driven Design with rich models
190
+ β€’ 583 test examples (157 new in this release)
191
+ β€’ Zero external dependencies
192
+ β€’ No embedding models or vector databases (uses SQLite FTS5)
193
+
194
+ The system uses Claude Code's hooks and MCP tools for seamless integration. Facts are extracted using Claude's own intelligence during session stop hooksβ€”no separate LLM API needed.
195
+
196
+ GitHub: https://github.com/codenamev/claude_memory
197
+
198
+ Happy to answer questions!
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Reddit r/ruby
204
+
205
+ ### Title
206
+ ```
207
+ [Release] ClaudeMemory v0.2.0 - Long-term memory for Claude Code with privacy and performance
208
+ ```
209
+
210
+ ### Post Body
211
+
212
+ ```
213
+ Hi r/ruby! I'm excited to share ClaudeMemory v0.2.0, a Ruby gem that provides persistent memory for Claude Code.
214
+
215
+ ## What It Does
216
+
217
+ ClaudeMemory gives Claude Code the ability to remember facts across conversationsβ€”your tech stack, architectural decisions, coding preferences, etc. It extracts knowledge automatically and makes it available in future sessions.
218
+
219
+ ## What's New in v0.2.0
220
+
221
+ **Privacy Tag System**
222
+ ```ruby
223
+ # Content like this:
224
+ "API key is <private>sk-abc123</private>"
225
+
226
+ # Gets sanitized to:
227
+ "API key is "
228
+
229
+ # The key is never stored or indexed
230
+ ```
231
+
232
+ **Progressive Disclosure (10x Performance)**
233
+ ```ruby
234
+ # Phase 1: Lightweight previews
235
+ memory.recall_index(query: "database")
236
+ # Returns ~50 tokens per fact
237
+
238
+ # Phase 2: Full details on demand
239
+ memory.recall_details(fact_id: 42)
240
+ # Returns complete provenance
241
+ ```
242
+
243
+ **Semantic Shortcuts**
244
+ ```ruby
245
+ memory.decisions # Quick decision lookup
246
+ memory.conventions # Coding standards
247
+ memory.architecture # Framework choices
248
+ ```
249
+
250
+ ## Technical Details
251
+
252
+ - **Language:** Ruby 3.2+
253
+ - **Storage:** SQLite3 with FTS5 for full-text search
254
+ - **ORM:** Sequel
255
+ - **Testing:** RSpec with 583 examples
256
+ - **Linting:** Standard Ruby
257
+ - **Architecture:** Domain-Driven Design with value objects
258
+
259
+ No external dependencies. No API keys. No embedding models. Just SQLite and Ruby.
260
+
261
+ ## Installation
262
+
263
+ ```bash
264
+ gem install claude_memory
265
+ claude-memory init --global
266
+ claude-memory doctor
267
+ ```
268
+
269
+ ## Links
270
+
271
+ - **GitHub:** https://github.com/codenamev/claude_memory
272
+ - **RubyGems:** https://rubygems.org/gems/claude_memory
273
+ - **Examples:** https://github.com/codenamev/claude_memory/blob/main/docs/EXAMPLES.md
274
+ - **Changelog:** https://github.com/codenamev/claude_memory/blob/main/CHANGELOG.md
275
+
276
+ Happy to answer questions or hear feedback!
277
+ ```
278
+
279
+ ---
280
+
281
+ ## Ruby Weekly Submission
282
+
283
+ ### Email Subject
284
+ ```
285
+ [Submission] ClaudeMemory v0.2.0 - Long-term memory for Claude Code
286
+ ```
287
+
288
+ ### Email Body
289
+
290
+ ```
291
+ Hi Ruby Weekly team,
292
+
293
+ I'd like to submit ClaudeMemory v0.2.0 for consideration in an upcoming edition.
294
+
295
+ **Title:** ClaudeMemory v0.2.0 – Privacy-first long-term memory for Claude Code
296
+
297
+ **Description:**
298
+ A Ruby gem that gives Claude Code persistent memory across conversations. Version 0.2.0 introduces privacy tags for sensitive data, progressive disclosure (10x token reduction), and semantic shortcuts. Built with Ruby 3.2+, Sequel, and SQLite. 583 test examples, zero external dependencies.
299
+
300
+ **Link:** https://github.com/codenamev/claude_memory
301
+
302
+ **Release Notes:** https://github.com/codenamev/claude_memory/blob/main/docs/RELEASE_NOTES_v0.2.0.md
303
+
304
+ Thanks for your consideration!
305
+
306
+ Valentino Stoll
307
+ https://github.com/codenamev
308
+ ```
309
+
310
+ ---
311
+
312
+ ## Bluesky
313
+
314
+ ### Version 1: Feature Highlights
315
+
316
+ ```
317
+ πŸš€ ClaudeMemory v0.2.0 is here!
318
+
319
+ Long-term memory for Claude Code with:
320
+ πŸ”’ Privacy tags: <private>secrets</private> never stored
321
+ ⚑ 10x faster queries (progressive disclosure)
322
+ 🎯 Semantic shortcuts (decisions, conventions)
323
+ βœ… 583 tests, zero dependencies
324
+
325
+ Built with Ruby + SQLite. Zero config.
326
+
327
+ gem install claude_memory
328
+
329
+ github.com/codenamev/claude_memory
330
+ ```
331
+
332
+ ### Version 2: Ruby Community
333
+
334
+ ```
335
+ New Ruby gem: ClaudeMemory v0.2.0
336
+
337
+ Give Claude Code persistent memory. Built with Ruby 3.2+, Sequel, and SQLite.
338
+
339
+ Major features:
340
+ β€’ Privacy tag system for sensitive data
341
+ β€’ Progressive disclosure (10x token savings)
342
+ β€’ Semantic shortcuts for common queries
343
+ β€’ 583 RSpec examples
344
+ β€’ Domain-Driven Design architecture
345
+
346
+ gem install claude_memory
347
+
348
+ github.com/codenamev/claude_memory
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Dev.to Article (Optional Extended Format)
354
+
355
+ ### Title
356
+ ```
357
+ ClaudeMemory v0.2.0: Building a Privacy-First Memory System for AI Agents
358
+ ```
359
+
360
+ ### Tags
361
+ ```
362
+ ruby, ai, claude, sqlite, opensource
363
+ ```
364
+
365
+ ### Article Outline
366
+ ```markdown
367
+ # Introduction
368
+ - What is ClaudeMemory
369
+ - Why persistent memory matters for AI coding assistants
370
+
371
+ # The Privacy Challenge
372
+ - Why API keys and secrets are dangerous in memory systems
373
+ - The privacy tag solution
374
+ - Implementation details (ContentSanitizer)
375
+
376
+ # Token Economics
377
+ - The cost of context in LLM queries
378
+ - Progressive disclosure pattern
379
+ - 10x performance improvement analysis
380
+
381
+ # Architecture Decisions
382
+ - Why SQLite instead of vector databases
383
+ - Domain-Driven Design in Ruby
384
+ - Value objects and null objects
385
+
386
+ # Lessons Learned
387
+ - Testing security-critical code (100% coverage)
388
+ - ReDoS protection
389
+ - Hook integration patterns
390
+
391
+ # Try It Yourself
392
+ - Installation instructions
393
+ - Example usage
394
+ - Links to documentation
395
+
396
+ # Conclusion
397
+ - What's next for ClaudeMemory
398
+ - Call for feedback and contributions
399
+ ```
400
+
401
+ ---
402
+
403
+ ## Usage Notes
404
+
405
+ 1. **Twitter/X**: Use Option 1 for broad audience, Option 2 for privacy focus, Option 3 for performance focus
406
+ 2. **LinkedIn**: Use Version 1 for general professional audience, Version 2 for technical deep dive
407
+ 3. **Mastodon**: Use Version 1 for general tech community, Version 2 for Ruby-specific communities
408
+ 4. **Hacker News**: Choose title based on current HN trends (privacy vs. performance vs. Show HN)
409
+ 5. **Reddit**: Post to r/ruby first, then cross-post to r/programming if it gets traction
410
+ 6. **Ruby Weekly**: Send submission email after GitHub release is live
411
+ 7. **Bluesky**: Similar to Twitter but can be slightly more technical
412
+ 8. **Dev.to**: Consider writing full article after initial announcement settles
413
+
414
+ ## Recommended Posting Schedule
415
+
416
+ 1. **Day 1 (Release Day)**: GitHub Release, Twitter/X, Mastodon, Bluesky
417
+ 2. **Day 2**: LinkedIn (professional announcement), Reddit r/ruby
418
+ 3. **Day 3**: Hacker News (mid-week for best visibility)
419
+ 4. **Week 1**: Ruby Weekly submission, Dev.to article (if time permits)
420
+ 5. **Week 2**: Follow up with lessons learned posts based on feedback