claude-recall 0.11.2 → 0.11.4

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.
@@ -26,9 +26,10 @@ Persistent memory system that ensures Claude never repeats mistakes and always a
26
26
 
27
27
  1. **ALWAYS load rules before acting** - Call `load_rules` before Write, Edit, or significant Bash operations
28
28
  2. **Apply what you find** - Use retrieved preferences, patterns, and corrections
29
- 3. **Capture corrections immediately** - User fixes are highest priority
30
- 4. **Store learning cycles** - When you fail then succeed, that's valuable knowledge
31
- 5. **Never store secrets** - No API keys, passwords, tokens, or PII
29
+ 3. **Ask before storing** - Before calling `store_memory`, briefly tell the user what you plan to store and ask for confirmation. Example: *"I'd like to remember that you prefer tabs over spaces. Store this?"* Only call the tool after the user agrees.
30
+ 4. **Capture corrections immediately** - User fixes are highest priority (still ask first)
31
+ 5. **Store learning cycles** - When you fail then succeed, that's valuable knowledge
32
+ 6. **Never store secrets** - No API keys, passwords, tokens, or PII
32
33
 
33
34
  ## Quick Reference
34
35
 
@@ -141,13 +142,17 @@ Safe to store:
141
142
 
142
143
  3. Fix the code
143
144
 
144
- 4. Store the correction:
145
+ 4. Ask: "I'd like to remember: always use httpOnly cookies for auth tokens, never localStorage. Store this?"
146
+
147
+ 5. User: "Yes"
148
+
149
+ 6. Store the correction:
145
150
  mcp__claude-recall__store_memory({
146
151
  "content": "CORRECTION: Always use httpOnly cookies for auth tokens, never localStorage",
147
152
  "metadata": { "type": "correction" }
148
153
  })
149
154
 
150
- 5. Response includes activeRule - apply it immediately
155
+ 7. Response includes activeRule - apply it immediately
151
156
  ```
152
157
 
153
158
  ### Overcoming a Challenge
@@ -160,7 +165,11 @@ Safe to store:
160
165
 
161
166
  3. Implemented JWT -> Works!
162
167
 
163
- 4. Store the learning:
168
+ 4. Ask: "I'd like to remember: Redis sessions fail in k8s due to sync issues; use stateless JWT instead. Store this?"
169
+
170
+ 5. User: "Yes"
171
+
172
+ 6. Store the learning:
164
173
  mcp__claude-recall__store_memory({
165
174
  "content": "Auth in k8s: Redis sessions failed (sync issues). JWT stateless tokens work correctly.",
166
175
  "metadata": { "type": "failure", "learning_cycle": true }
package/README.md CHANGED
@@ -13,200 +13,231 @@ Your preferences, project structure, workflows, corrections, and coding style ar
13
13
 
14
14
  ---
15
15
 
16
- ## 🚀 Features
16
+ ## Features
17
17
 
18
- ### 🌱 Continuous Learning (Local SQLite)
18
+ - **Continuous Learning** captures coding patterns, tool preferences, corrections, architectural decisions, and workflow habits in local SQLite
19
+ - **Native Claude Skills** — no hooks required; Claude decides when to search/store based on built-in skill guidance
20
+ - **User-Confirmed Storage** — Claude asks for your permission before storing any memory
21
+ - **Project-Scoped Knowledge** — each project gets its own memory namespace; switch projects and Claude switches memory
22
+ - **Failure Learning** — captures failures with counterfactual reasoning (what failed, why, what to do instead)
23
+ - **Memory Evolution** — tracks agent progression over time across sophistication levels (L1–L4)
24
+ - **Zero Cloud Storage** — all memory stored locally, no telemetry, works fully offline
25
+ - **Process Management** — automatic server lifecycle management with stale process cleanup
19
26
 
20
- Claude learns your:
27
+ ---
21
28
 
22
- * coding patterns
23
- * tool preferences
24
- * corrections
25
- * architectural decisions
26
- * workflow habits
29
+ ## Quick Start
27
30
 
28
- Everything stays **local**.
31
+ ### Requirements
29
32
 
30
- ---
33
+ | Component | Version | Notes |
34
+ | --------- | ----------------------- | --------------------------- |
35
+ | Node.js | **20+** | required for better-sqlite3 |
36
+ | OS | macOS / Linux / Windows | WSL supported |
31
37
 
32
- ## 🎯 Native Claude Skills Integration
38
+ ### Install
33
39
 
34
- Claude Recall uses Claude Code's native Skills system for seamless memory guidance.
40
+ ```bash
41
+ cd your-project
42
+ npm install claude-recall
35
43
 
36
- ### How it works
44
+ # Check installed version:
45
+ npx claude-recall --version
37
46
 
38
- * **No hooks required** — Skills are built into Claude Code
39
- * **Non-blocking** — Claude decides when to search/store based on skill guidance
40
- * **Self-directed** — Claude understands when memory is relevant to the task
41
- * **Zero latency** — No external processes or enforcement overhead
47
+ # Show activation instructions:
48
+ npx claude-recall setup
49
+ ```
42
50
 
43
- ### What the Skill teaches Claude
51
+ ### Activate
44
52
 
45
- * Search memory before writing/editing code
46
- * Apply learned conventions and avoid past mistakes
47
- * Capture corrections when users fix mistakes
48
- * Store learning cycles (fail → fix → success)
53
+ Register MCP server with Claude Code:
49
54
 
50
- The skill is automatically installed to `.claude/skills/memory-management/SKILL.md` on package install.
55
+ ```bash
56
+ claude mcp add claude-recall -- npx -y claude-recall@latest mcp start
57
+ ```
51
58
 
52
- ---
59
+ Then restart your terminal or Claude Code session.
53
60
 
54
- ## 📂 Project-Scoped Knowledge
61
+ Already registered? Remove first:
55
62
 
56
- Each project gets its own memory namespace:
63
+ ```bash
64
+ claude mcp remove claude-recall
65
+ ```
57
66
 
58
- * architecture
59
- * tech stack
60
- * conventions
61
- * past decisions
62
- * known pitfalls
63
- * previous fixes
64
- * preferences unique to that codebase
67
+ ### Verify
65
68
 
66
- Switch projects Claude switches memory.
69
+ In Claude Code, ask: *"Load my rules"*
67
70
 
68
- ---
71
+ Claude should call `mcp__claude-recall__load_rules`. If it works, you're ready.
69
72
 
70
- ## 🔌 Zero Cloud Storage
73
+ ### Upgrade
71
74
 
72
- * All memory stored locally in SQLite
73
- * No cloud sync
74
- * No telemetry
75
- * Entire system works offline
75
+ ```bash
76
+ npm uninstall claude-recall && npm install claude-recall
77
+ ```
76
78
 
77
79
  ---
78
80
 
79
- ## 💻 Claude Code–Native Integration
81
+ ## How It Works
80
82
 
81
- Claude Recall integrates via:
83
+ Claude Recall has three layers:
82
84
 
83
- * **MCP server** search, store, retrieve memories
84
- * **Native Skills** — guides Claude on when to use memory tools
85
- * **Automatic capture** — extracts preferences from conversations
85
+ ### 1. Local Memory Engine (SQLite)
86
86
 
87
- Claude knows to search memory before significant actions, with no enforcement overhead.
87
+ Stores and evolves preferences, patterns, decisions, corrections, and failure learnings. Uses WAL mode for concurrency, content-hash deduplication, and automatic compaction.
88
88
 
89
- ---
89
+ ### 2. MCP Server (2 tools)
90
90
 
91
- ## Quick Start
91
+ Exposes two tools to Claude Code:
92
92
 
93
- ### Requirements
93
+ | Tool | Purpose |
94
+ | ---- | ------- |
95
+ | `load_rules` | Load all active rules (preferences, corrections, failures, devops) at the start of a task |
96
+ | `store_memory` | Save new knowledge — preferences, corrections, devops rules, failures |
94
97
 
95
- | Component | Version | Notes |
96
- | --------- | ----------------------- | --------------------------- |
97
- | Node.js | **20+** | required for better-sqlite3 |
98
- | OS | macOS / Linux / Windows | WSL supported |
98
+ ### 3. Native Claude Skill
99
99
 
100
- ---
100
+ Installed automatically to `.claude/skills/memory-management/SKILL.md`. Teaches Claude:
101
+ - Load rules before writing/editing code
102
+ - Apply learned conventions and avoid past mistakes
103
+ - **Ask the user for confirmation before storing any memory**
104
+ - Capture corrections when users fix mistakes
105
+ - Store learning cycles (fail → fix → success)
101
106
 
102
- ### Install (per project)
107
+ ---
103
108
 
104
- ```bash
105
- cd your-project
106
- npm install claude-recall
109
+ ## CLI Reference
107
110
 
108
- # Check installed version:
109
- npx claude-recall --version
111
+ ### Core Commands
110
112
 
111
- # Show activation instructions:
112
- npx claude-recall setup
113
+ ```bash
114
+ npx claude-recall stats # Memory statistics
115
+ npx claude-recall search "query" # Search memories
116
+ npx claude-recall store "content" # Store memory directly
117
+ npx claude-recall export backup.json # Export memories to JSON
118
+ npx claude-recall import backup.json # Import memories from JSON
119
+ npx claude-recall clear --force # Clear all memories
113
120
  ```
114
121
 
115
- ### Upgrade
122
+ ### Analysis
116
123
 
117
124
  ```bash
118
- npm uninstall claude-recall && npm install claude-recall
125
+ npx claude-recall evolution # Memory evolution metrics (L1-L4)
126
+ npx claude-recall evolution --days 60 # Custom time window
127
+ npx claude-recall failures # View failure memories
128
+ npx claude-recall failures --limit 20 # Limit results
129
+ npx claude-recall monitor # Memory search monitoring stats
119
130
  ```
120
131
 
121
- ---
132
+ ### MCP Server Management
122
133
 
123
- ### Activate
134
+ ```bash
135
+ npx claude-recall mcp status # Current project's server status
136
+ npx claude-recall mcp ps # List all running servers
137
+ npx claude-recall mcp stop # Stop server
138
+ npx claude-recall mcp stop --force # Force stop
139
+ npx claude-recall mcp restart # Restart server
140
+ npx claude-recall mcp cleanup # Remove stale PID files
141
+ npx claude-recall mcp cleanup --all # Stop all servers
142
+ ```
124
143
 
125
- Register MCP server:
144
+ ### Project Management
126
145
 
127
146
  ```bash
128
- claude mcp add claude-recall -- npx -y claude-recall@latest mcp start
147
+ npx claude-recall project show # Current project info
148
+ npx claude-recall project list # All registered projects
149
+ npx claude-recall project register # Register current project
150
+ npx claude-recall project clean # Remove stale registry entries
129
151
  ```
130
152
 
131
- Then restart your terminal or Claude Code session.
132
-
133
- Already registered? Remove first:
153
+ ### Setup & Diagnostics
134
154
 
135
155
  ```bash
136
- claude mcp remove claude-recall
156
+ npx claude-recall setup # Show activation instructions
157
+ npx claude-recall status # Installation and system status
158
+ npx claude-recall repair # Clean up old hooks, install skills
137
159
  ```
138
160
 
139
161
  ---
140
162
 
141
- ### Verify
142
-
143
- In Claude Code, ask: *"Search my memories"*
144
-
145
- Claude should call `mcp__claude-recall__search`. If it works → you're ready.
146
-
147
- ---
163
+ ## How Project Scoping Works
148
164
 
149
- ## 🧠 How It Works (High-Level)
165
+ Each project gets isolated memory based on its working directory:
150
166
 
151
- Claude Recall consists of:
167
+ - **Project ID** is derived from the `cwd` that Claude Code passes to the MCP server
168
+ - **Universal memories** (no project scope) are available everywhere
169
+ - **Project memories** are only returned when working in that project
170
+ - Switching projects switches memory automatically — no configuration needed
152
171
 
153
- ### 1. Local Memory Engine (SQLite)
172
+ Database location: `~/.claude-recall/claude-recall.db` (shared file, scoped by `project_id` column).
154
173
 
155
- Stores and evolves preferences, patterns, decisions, corrections.
174
+ ---
156
175
 
157
- ### 2. MCP Server
176
+ ## WSL Users
158
177
 
159
- Exposes memory tools to Claude Code:
160
- - `mcp__claude-recall__search` — find relevant memories
161
- - `mcp__claude-recall__store_memory` — save new knowledge
162
- - `mcp__claude-recall__retrieve_memory` — get specific memories
178
+ If you hit "invalid ELF header" errors from mixed Windows/WSL `node_modules`, use a global install:
163
179
 
164
- ### 3. Native Claude Skill
180
+ ```bash
181
+ # From WSL:
182
+ npm install -g claude-recall
183
+
184
+ # Update ~/.claude.json to use the global binary:
185
+ {
186
+ "claude-recall": {
187
+ "type": "stdio",
188
+ "command": "claude-recall",
189
+ "args": ["mcp", "start"],
190
+ "env": {}
191
+ }
192
+ }
193
+ ```
165
194
 
166
- Teaches Claude when and how to use memory:
167
- - Search before writing/editing code
168
- - Store corrections and learning cycles
169
- - Apply preferences and patterns
195
+ Global installation does **not** affect project scoping — project ID is still detected from Claude Code's working directory.
170
196
 
171
197
  ---
172
198
 
173
- ## 🔐 Security & Privacy
199
+ ## Security & Privacy
174
200
 
175
- Claude Recall is built for local-first workflows:
201
+ - SQLite memory never leaves your machine
202
+ - No external services required
203
+ - No prompts, code, or memory content is transmitted
204
+ - Full transparency via CLI (`stats`, `search`, `export`)
205
+ - Never stores secrets (API keys, passwords, tokens)
176
206
 
177
- * SQLite memory never leaves your machine
178
- * No external services required
179
- * No prompts, code, or memory content is transmitted
180
- * Full transparency via CLI (`list`, `inspect`, `export`)
181
-
182
- Full details in `/docs/security.md`.
207
+ Details in [docs/security.md](docs/security.md).
183
208
 
184
209
  ---
185
210
 
186
- ## 📚 Full Documentation
211
+ ## Documentation
187
212
 
188
- All docs in `/docs`:
213
+ All docs in [`/docs`](docs/):
189
214
 
190
- * Installation
191
- * Quickstart
192
- * Architecture
193
- * Learning Loop
194
- * Memory Types
195
- * CLI Reference
196
- * Skills Integration
197
- * Project Scoping
198
- * Troubleshooting
199
- * Security
200
- * FAQ
215
+ - [Installation](docs/installation.md)
216
+ - [Quickstart](docs/quickstart.md)
217
+ - [CLI Reference](docs/cli.md)
218
+ - [Memory Types](docs/memory-types.md)
219
+ - [Learning Loop](docs/learning-loop.md)
220
+ - [Project Scoping](docs/project-scoping.md)
221
+ - [Content Hashing](docs/content-hashing.md)
222
+ - [Troubleshooting](docs/troubleshooting.md)
223
+ - [Security](docs/security.md)
224
+ - [FAQ](docs/faq.md)
201
225
 
202
226
  ---
203
227
 
204
- ## 🛠 Development & Contributions
228
+ ## Development & Contributions
205
229
 
206
230
  PRs welcome — Claude Recall is open to contributors.
207
231
 
232
+ ```bash
233
+ npm run build # Compile TypeScript
234
+ npm test # Run all tests
235
+ npm run test:watch # Watch mode
236
+ npm run mcp:dev # Start MCP server in dev mode
237
+ ```
238
+
208
239
  ---
209
240
 
210
- ## 📝 License
241
+ ## License
211
242
 
212
243
  MIT.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "Persistent memory for Claude Code with native Skills integration, automatic capture, failure learning, and project scoping via MCP server",
5
5
  "main": "dist/index.js",
6
6
  "bin": {