claude_memory 0.3.0 → 0.4.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.
@@ -0,0 +1,71 @@
1
+ ---
2
+ keep-coding-instructions: true
3
+ ---
4
+
5
+ # Memory-Aware Output Style
6
+
7
+ This output style helps Claude format responses in a way that makes knowledge easy to capture and recall from memory.
8
+
9
+ ## Stating Decisions and Conventions
10
+
11
+ When making or documenting decisions, use clear declarative language:
12
+
13
+ **Good examples:**
14
+ - "We decided to use PostgreSQL for the main database"
15
+ - "We agreed to use 4-space indentation for Ruby files"
16
+ - "Convention: All API responses include a `meta` object"
17
+ - "Standard: Test files go in `spec/` matching the source structure"
18
+
19
+ **Why this helps:** Clear statements are easier to extract and recall later.
20
+
21
+ ## Signaling Changes and Supersession
22
+
23
+ When replacing or updating previous decisions, make the change explicit:
24
+
25
+ **Good examples:**
26
+ - "We're switching from Redis to Memcached for caching"
27
+ - "This supersedes our earlier decision to use REST APIs—we're now using GraphQL"
28
+ - "We no longer validate email format server-side; client-side only"
29
+
30
+ **Why this helps:** Memory can track supersession and resolve conflicts.
31
+
32
+ ## Acknowledging Contradictions
33
+
34
+ When encountering conflicting information, call it out explicitly:
35
+
36
+ **Good examples:**
37
+ - "This contradicts our earlier decision to use MySQL"
38
+ - "I found conflicting information: the README says Postgres, but the config uses SQLite"
39
+ - "Two facts conflict: authentication was JWT, now seeing sessions"
40
+
41
+ **Why this helps:** Explicit contradictions help memory identify conflicts to resolve.
42
+
43
+ ## Citing Sources
44
+
45
+ When referencing previous knowledge, distinguish memory from code exploration:
46
+
47
+ **Good examples:**
48
+ - "From memory: We use RSpec for testing (fact #42)"
49
+ - "According to earlier conversations: PostgreSQL is the primary database"
50
+ - "From code exploration: Found 3 additional test frameworks in Gemfile"
51
+
52
+ **Why this helps:** Clear attribution makes it easier to verify and explain facts.
53
+
54
+ ## Response Format
55
+
56
+ Use structured language that makes facts extractable:
57
+
58
+ **Technology choices:**
59
+ - "This project uses [technology] for [purpose]"
60
+ - "We chose [X] over [Y] because [reason]"
61
+
62
+ **Architectural patterns:**
63
+ - "The architecture follows [pattern]"
64
+ - "Components communicate via [method]"
65
+
66
+ **Rules and constraints:**
67
+ - "Rule: [statement]"
68
+ - "Constraint: [limitation]"
69
+ - "Requirement: [need]"
70
+
71
+ **Why this helps:** Structured statements are easier to parse and store.
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: debug-memory
3
+ description: Diagnose ClaudeMemory installation and configuration issues. Use when memory tools fail or setup seems broken.
4
+ user_invocable: true
5
+ ---
6
+
7
+ # Debug Memory Setup
8
+
9
+ When invoked with `/debug-memory`, this skill runs comprehensive diagnostics on your ClaudeMemory installation.
10
+
11
+ ## What This Checks
12
+
13
+ This skill will verify:
14
+ - ✅ Database existence (global and project)
15
+ - ✅ Schema version compatibility
16
+ - ✅ Hook configuration
17
+ - ✅ CLAUDE.md setup
18
+ - ✅ Published snapshot status
19
+ - ✅ MCP server connectivity
20
+ - ✅ Recent ingest activity
21
+
22
+ ## Step 1: Run Setup Check
23
+
24
+ First, check the memory system status using the MCP tool:
25
+
26
+ ```
27
+ memory.check_setup
28
+ ```
29
+
30
+ This returns:
31
+ - **initialized**: true/false
32
+ - **version**: ClaudeMemory version
33
+ - **issues**: List of problems found
34
+ - **recommendation**: Actionable next steps
35
+
36
+ ## Step 2: Analyze Results
37
+
38
+ Based on the check results:
39
+
40
+ ### If initialized = true
41
+ ✅ System is healthy! Show the user:
42
+ - Version information
43
+ - Database stats
44
+ - Last successful operations
45
+
46
+ ### If initialized = false
47
+ ⚠️ System needs setup. Check for:
48
+ - **Missing database**: Run `claude-memory init`
49
+ - **Missing CLAUDE.md**: Not importing memory snapshot
50
+ - **Missing hooks**: Hooks not configured in settings.json
51
+ - **Version mismatch**: Need to upgrade with `gem update claude-memory`
52
+
53
+ ## Step 3: Provide Recommendations
54
+
55
+ Give the user clear next steps:
56
+
57
+ **For missing setup:**
58
+ ```bash
59
+ # Initialize ClaudeMemory
60
+ claude-memory init
61
+
62
+ # Or use the setup skill
63
+ /setup-memory
64
+ ```
65
+
66
+ **For configuration issues:**
67
+ ```bash
68
+ # Check system health
69
+ claude-memory doctor
70
+
71
+ # View current status
72
+ claude-memory status
73
+ ```
74
+
75
+ **For version issues:**
76
+ ```bash
77
+ # Upgrade to latest version
78
+ gem update claude-memory
79
+ claude-memory init # Re-run init after upgrade
80
+ ```
81
+
82
+ ## Step 4: Verify Fix
83
+
84
+ After user follows recommendations, run `memory.check_setup` again to confirm the issue is resolved.
85
+
86
+ ## Common Issues
87
+
88
+ ### "Database not found"
89
+ - **Cause**: ClaudeMemory not initialized
90
+ - **Fix**: Run `claude-memory init` or `/setup-memory`
91
+
92
+ ### "Hooks not configured"
93
+ - **Cause**: `.claude/settings.json` missing hook definitions
94
+ - **Fix**: Run `claude-memory init` to add hooks
95
+
96
+ ### "CLAUDE.md not importing snapshot"
97
+ - **Cause**: Missing `@.claude/rules/claude_memory.generated.md` import
98
+ - **Fix**: Add import to `.claude/CLAUDE.md`
99
+
100
+ ### "Version mismatch"
101
+ - **Cause**: Old ClaudeMemory version installed
102
+ - **Fix**: Run `gem update claude-memory`
103
+
104
+ ### "No recent ingest activity"
105
+ - **Cause**: Hooks not triggering or failing silently
106
+ - **Fix**: Check hook configuration with `claude-memory doctor`
107
+
108
+ ## Example Output
109
+
110
+ ```
111
+ Running ClaudeMemory diagnostics...
112
+
113
+ ✅ Global database: healthy
114
+ - Location: ~/.claude/memory.sqlite3
115
+ - Schema: v7
116
+ - Facts: 42
117
+
118
+ ✅ Project database: healthy
119
+ - Location: .claude/memory.sqlite3
120
+ - Schema: v7
121
+ - Facts: 127
122
+ - Last ingest: 2026-01-29T21:47:41Z
123
+
124
+ ✅ Hooks: configured
125
+ ✅ Snapshot: published
126
+ ✅ CLAUDE.md: importing snapshot
127
+
128
+ All systems operational! Memory is working correctly.
129
+ ```
130
+
131
+ ## When to Use This Skill
132
+
133
+ Use `/debug-memory` when:
134
+ - Memory tools are failing with errors
135
+ - Unsure if ClaudeMemory is properly installed
136
+ - Hooks don't seem to be running
137
+ - Facts aren't being captured
138
+ - After upgrading ClaudeMemory
139
+ - Setting up a new project
140
+
141
+ ## Related Commands
142
+
143
+ - `/setup-memory` - Install or upgrade ClaudeMemory
144
+ - `claude-memory doctor` - CLI health check
145
+ - `claude-memory status` - View system status
146
+ - `memory.check_setup` - The underlying MCP tool
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: memory-first-workflow
3
+ description: Workflow for checking memory before code exploration. Auto-loaded when answering questions about code, architecture, or patterns.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Memory-First Research Pattern
8
+
9
+ When answering questions about code, architecture, patterns, decisions, or technical choices, follow this workflow:
10
+
11
+ ## Step 1: Query Memory First
12
+
13
+ Before reading files or exploring code, check if memory already has the answer:
14
+
15
+ ```
16
+ memory.recall "<topic>"
17
+ ```
18
+
19
+ **Example queries:**
20
+ - `memory.recall "authentication flow"`
21
+ - `memory.recall "database choice"`
22
+ - `memory.recall "error handling patterns"`
23
+
24
+ ## Step 2: Use Specialized Shortcuts
25
+
26
+ For specific types of questions, use targeted memory tools:
27
+
28
+ ### Before Implementing Features
29
+ ```
30
+ memory.decisions
31
+ ```
32
+ Returns architectural decisions and constraints that may affect implementation.
33
+
34
+ ### Before Working with Frameworks/Databases
35
+ ```
36
+ memory.architecture
37
+ ```
38
+ Returns framework choices, database selection, and architectural patterns.
39
+
40
+ ### Before Writing Code
41
+ ```
42
+ memory.conventions
43
+ ```
44
+ Returns coding style, naming conventions, and project standards.
45
+
46
+ ### If Finding Contradictions
47
+ ```
48
+ memory.conflicts
49
+ ```
50
+ Returns open disputes that need resolution.
51
+
52
+ ## Step 3: Evaluate Memory Results
53
+
54
+ **If memory has sufficient information:**
55
+ - Answer using recalled facts
56
+ - Cite fact IDs or sources: "From memory (fact #42): ..."
57
+ - Avoid unnecessary file reads
58
+
59
+ **If memory has partial information:**
60
+ - Share what memory knows
61
+ - Note what needs investigation: "Memory shows we use PostgreSQL, but I need to check the connection pooling setup..."
62
+ - Proceed to file exploration for missing details
63
+
64
+ **If memory has no information:**
65
+ - Note explicitly: "Memory has no prior knowledge about [topic]"
66
+ - Proceed to file exploration
67
+ - After learning, consider if this should be stored in memory
68
+
69
+ ## Step 4: Explore Code (Only If Needed)
70
+
71
+ When memory is insufficient, use file exploration tools:
72
+ - `Read` for specific files
73
+ - `Grep` for searching content
74
+ - `Glob` for finding files by pattern
75
+ - `Task` (Explore agent) for broad investigations
76
+
77
+ ## Step 5: Distinguish Sources
78
+
79
+ When presenting findings, clearly separate:
80
+ - **Recalled knowledge:** "From memory: We use RSpec for testing"
81
+ - **Discovered information:** "From code exploration: Found additional test helper in `spec/support/`"
82
+
83
+ ## Why This Pattern Matters
84
+
85
+ ### Saves Time
86
+ Memory provides instant access to distilled knowledge without re-reading hundreds of files.
87
+
88
+ ### Provides Context
89
+ Past decisions, lessons learned, and rationale are preserved in memory.
90
+
91
+ ### Reduces Tokens
92
+ Recalled facts are concise compared to reading entire files.
93
+
94
+ ### Ensures Consistency
95
+ Prevents contradicting previous decisions or duplicating solved problems.
96
+
97
+ ### Improves Quality
98
+ Understanding past context leads to better decisions aligned with project history.
99
+
100
+ ## Anti-Patterns to Avoid
101
+
102
+ ❌ **Don't skip memory checks:**
103
+ ```
104
+ User: "What database do we use?"
105
+ Bad: *immediately reads config files*
106
+ Good: *checks memory.architecture first*
107
+ ```
108
+
109
+ ❌ **Don't assume memory is wrong:**
110
+ ```
111
+ Bad: "Memory says PostgreSQL, let me verify by reading the config..."
112
+ Good: "Memory says PostgreSQL. Need any specific config details?"
113
+ ```
114
+
115
+ ❌ **Don't ignore memory conflicts:**
116
+ ```
117
+ Bad: *finds conflict, picks one arbitrarily*
118
+ Good: "memory.conflicts shows authentication method disputed—let me investigate and resolve"
119
+ ```
120
+
121
+ ## Example Workflow
122
+
123
+ **User asks:** "How do we handle errors in API responses?"
124
+
125
+ **Step 1:** Check memory
126
+ ```
127
+ memory.recall "error handling API"
128
+ memory.conventions
129
+ ```
130
+
131
+ **Step 2:** Evaluate results
132
+ - Memory shows: "Convention: API errors return JSON with `error` and `message` keys"
133
+ - Memory shows: "Decision: 4xx for client errors, 5xx for server errors"
134
+
135
+ **Step 3:** Answer with citations
136
+ "From memory: We handle API errors by returning JSON with `error` and `message` keys. Client errors use 4xx status codes, server errors use 5xx. Is there a specific error case you're working with?"
137
+
138
+ **Step 4:** Only if needed, explore code
139
+ If user asks: "Show me the error middleware"
140
+ *Then* use Read/Grep to find the implementation.
141
+
142
+ ---
143
+
144
+ This workflow is automatically loaded when you ask technical questions. You don't need to invoke it manually—it guides Claude's research process behind the scenes.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentino Stoll
@@ -49,24 +49,27 @@ files:
49
49
  - ".claude-plugin/marketplace.json"
50
50
  - ".claude-plugin/plugin.json"
51
51
  - ".claude.json"
52
- - ".claude/.mind.mv2.o2N83S"
53
52
  - ".claude/CLAUDE.md"
54
53
  - ".claude/output-styles/memory-aware.md"
55
54
  - ".claude/rules/claude_memory.generated.md"
56
55
  - ".claude/settings.json"
57
56
  - ".claude/settings.local.json"
57
+ - ".claude/skills/check-memory/DEPRECATED.md"
58
58
  - ".claude/skills/check-memory/SKILL.md"
59
+ - ".claude/skills/debug-memory"
59
60
  - ".claude/skills/improve/SKILL.md"
60
61
  - ".claude/skills/improve/feature-patterns.md"
62
+ - ".claude/skills/memory-first-workflow"
61
63
  - ".claude/skills/quality-update/SKILL.md"
62
64
  - ".claude/skills/quality-update/implementation-guide.md"
63
65
  - ".claude/skills/review-commit/SKILL.md"
64
66
  - ".claude/skills/review-for-quality/SKILL.md"
65
67
  - ".claude/skills/review-for-quality/expert-checklists.md"
66
- - ".claude/skills/setup-memory/SKILL.md"
68
+ - ".claude/skills/setup-memory"
67
69
  - ".claude/skills/study-repo/SKILL.md"
68
70
  - ".claude/skills/study-repo/analysis-template.md"
69
71
  - ".claude/skills/study-repo/focus-examples.md"
72
+ - ".lefthook/map_specs.rb"
70
73
  - ".ruby-version"
71
74
  - CHANGELOG.md
72
75
  - CLAUDE.md
@@ -74,6 +77,7 @@ files:
74
77
  - LICENSE.txt
75
78
  - README.md
76
79
  - Rakefile
80
+ - WEEK2_COMPLETE.md
77
81
  - commands/analyze.md
78
82
  - commands/recall.md
79
83
  - commands/remember.md
@@ -84,7 +88,6 @@ files:
84
88
  - db/migrations/005_add_incremental_sync.rb
85
89
  - db/migrations/006_add_operation_tracking.rb
86
90
  - db/migrations/007_add_ingestion_metrics.rb
87
- - docs/.claude/mind.mv2.lock
88
91
  - docs/EXAMPLES.md
89
92
  - docs/GETTING_STARTED.md
90
93
  - docs/RELEASE_NOTES_v0.2.0.md
@@ -92,7 +95,11 @@ files:
92
95
  - docs/SOCIAL_MEDIA_v0.2.0.md
93
96
  - docs/architecture.md
94
97
  - docs/auto_init_design.md
98
+ - docs/ci_integration.md
95
99
  - docs/demo.md
100
+ - docs/eval_week1_summary.md
101
+ - docs/eval_week2_summary.md
102
+ - docs/evals.md
96
103
  - docs/expert_review.md
97
104
  - docs/improvements.md
98
105
  - docs/influence/.gitkeep
@@ -171,6 +178,7 @@ files:
171
178
  - lib/claude_memory/domain/entity.rb
172
179
  - lib/claude_memory/domain/fact.rb
173
180
  - lib/claude_memory/domain/provenance.rb
181
+ - lib/claude_memory/embeddings/fastembed_adapter.rb
174
182
  - lib/claude_memory/embeddings/generator.rb
175
183
  - lib/claude_memory/embeddings/similarity.rb
176
184
  - lib/claude_memory/hook/exit_codes.rb
@@ -207,9 +215,13 @@ files:
207
215
  - lib/claude_memory/templates/hooks.example.json
208
216
  - lib/claude_memory/templates/output-styles/memory-aware.md
209
217
  - lib/claude_memory/version.rb
218
+ - output-styles/memory-aware.md
210
219
  - sig/claude_memory.rbs
211
220
  - skills/analyze/SKILL.md
221
+ - skills/debug-memory/SKILL.md
222
+ - skills/memory-first-workflow/SKILL.md
212
223
  - skills/memory/SKILL.md
224
+ - skills/setup-memory/SKILL.md
213
225
  homepage: https://github.com/codenamev/claude_memory
214
226
  licenses:
215
227
  - MIT
Binary file
@@ -1,21 +0,0 @@
1
- ---
2
- keep-coding-instructions: true
3
- ---
4
-
5
- # Memory-Aware Output Style
6
-
7
- When making decisions or establishing conventions:
8
- - State decisions clearly with "We decided to..." or "We agreed to..."
9
- - Be explicit about technology choices: "We use PostgreSQL for..."
10
- - Clarify when replacing previous decisions: "We no longer use X, switching to Y"
11
- - Note conventions with "Convention:" or "Standard:"
12
-
13
- When recalling past context:
14
- - Use the memory.recall MCP tool to find relevant past decisions
15
- - Cite specific facts when referencing previous work
16
- - If unsure, use memory.explain to get provenance for a fact
17
-
18
- When conflicts arise:
19
- - Acknowledge contradictions explicitly
20
- - Use memory.conflicts to see open disputes
21
- - Help resolve conflicts by providing clear supersession signals
File without changes
File without changes