claude-recall 0.15.21 → 0.15.23
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.
- package/.claude/skills/auto-corrections/SKILL.md +5 -1
- package/.claude/skills/auto-corrections/manifest.json +7 -3
- package/.claude/skills/auto-preferences/SKILL.md +11 -1
- package/.claude/skills/auto-preferences/manifest.json +13 -3
- package/dist/hooks/memory-stop-hook.js +40 -17
- package/dist/services/memory.js +7 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ source: claude-recall
|
|
|
8
8
|
|
|
9
9
|
# Corrections
|
|
10
10
|
|
|
11
|
-
Auto-generated from
|
|
11
|
+
Auto-generated from 37 memories. Last updated: 2026-03-04.
|
|
12
12
|
|
|
13
13
|
## Rules
|
|
14
14
|
|
|
@@ -41,10 +41,14 @@ Auto-generated from 33 memories. Last updated: 2026-03-04.
|
|
|
41
41
|
- CORRECTION: Memory with complex metadata
|
|
42
42
|
- CORRECTION: Memory with complex metadata
|
|
43
43
|
- CORRECTION: Memory with complex metadata
|
|
44
|
+
- CORRECTION: Memory with complex metadata
|
|
45
|
+
- CORRECTION: Memory with complex metadata
|
|
44
46
|
- CORRECTION: Replace expired access token with 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
|
|
45
47
|
- CORRECTION: use spaces not tabs for indentation
|
|
46
48
|
- CORRECTION: cited (loaded 5+ times): 19
|
|
47
49
|
- CORRECTION: cited (loaded 5+ times): 19
|
|
50
|
+
- CORRECTION: cited (loaded 5+ times): 19
|
|
51
|
+
- CORRECTION: cited (loaded 5+ times): 19
|
|
48
52
|
|
|
49
53
|
---
|
|
50
54
|
*Auto-generated by Claude Recall. Regenerate: `npx claude-recall skills generate`*
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"topicId": "corrections",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"memoryCount":
|
|
5
|
-
"generatedAt": "2026-03-04T14:
|
|
3
|
+
"sourceHash": "31bbc9eb9c5bb61836e1e3f792015b6869ba438e6479b7d7f7b62a125d7777a3",
|
|
4
|
+
"memoryCount": 37,
|
|
5
|
+
"generatedAt": "2026-03-04T14:58:18.652Z",
|
|
6
6
|
"memoryKeys": [
|
|
7
|
+
"memory_1772636298639_oc6lg22ca",
|
|
8
|
+
"memory_1772635945155_9oqbrai8h",
|
|
7
9
|
"memory_1772635613268_apcn3dq5c",
|
|
8
10
|
"memory_1772634933409_we0m7iyol",
|
|
9
11
|
"memory_1772634708297_fr1o1ntp1",
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
"memory_1770507226809_fjwrtohkj",
|
|
36
38
|
"hook_correction_1772101108419_le80cln1w",
|
|
37
39
|
"hook_correction_1771112125882_99ihypf8x",
|
|
40
|
+
"hook_correction_1772636083381_th3eluwzv",
|
|
41
|
+
"hook_correction_1772635851763_y91ugnjgy",
|
|
38
42
|
"hook_correction_1772633504532_l6yo1jvun",
|
|
39
43
|
"hook_correction_1772633492812_0iqsrgnl2"
|
|
40
44
|
]
|
|
@@ -8,10 +8,20 @@ source: claude-recall
|
|
|
8
8
|
|
|
9
9
|
# Preferences
|
|
10
10
|
|
|
11
|
-
Auto-generated from
|
|
11
|
+
Auto-generated from 177 memories. Last updated: 2026-03-04.
|
|
12
12
|
|
|
13
13
|
## Rules
|
|
14
14
|
|
|
15
|
+
- Session test preference 1772636298747
|
|
16
|
+
- Test preference 1772636298657-2
|
|
17
|
+
- Test preference 1772636298657-1
|
|
18
|
+
- Test preference 1772636298657-0
|
|
19
|
+
- Test memory content
|
|
20
|
+
- Session test preference 1772635945251
|
|
21
|
+
- Test preference 1772635945172-2
|
|
22
|
+
- Test preference 1772635945172-1
|
|
23
|
+
- Test preference 1772635945172-0
|
|
24
|
+
- Test memory content
|
|
15
25
|
- Session test preference 1772635613347
|
|
16
26
|
- Test preference 1772635613281-2
|
|
17
27
|
- Test preference 1772635613281-1
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"topicId": "preferences",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"memoryCount":
|
|
5
|
-
"generatedAt": "2026-03-04T14:
|
|
3
|
+
"sourceHash": "71c28a173990216774eb41bc8ed9f625d614429fb3c2aafeea8a06168fee7a42",
|
|
4
|
+
"memoryCount": 177,
|
|
5
|
+
"generatedAt": "2026-03-04T14:58:18.769Z",
|
|
6
6
|
"memoryKeys": [
|
|
7
|
+
"memory_1772636298749_w9lr1po07",
|
|
8
|
+
"memory_1772636298706_0afqnnods",
|
|
9
|
+
"memory_1772636298685_ydhq6lzwe",
|
|
10
|
+
"memory_1772636298659_doju71g3w",
|
|
11
|
+
"memory_1772636298588_uahpbbc4s",
|
|
12
|
+
"memory_1772635945253_t8cs9pa41",
|
|
13
|
+
"memory_1772635945217_7z3ikn5f2",
|
|
14
|
+
"memory_1772635945197_6rayagk4c",
|
|
15
|
+
"memory_1772635945174_3dxfznf99",
|
|
16
|
+
"memory_1772635945097_h3oc64frv",
|
|
7
17
|
"memory_1772635613349_kdtq7nf7e",
|
|
8
18
|
"memory_1772635613316_75rcykp05",
|
|
9
19
|
"memory_1772635613298_30r879m6m",
|
|
@@ -100,10 +100,14 @@ function scanForCitations(transcriptPath) {
|
|
|
100
100
|
return;
|
|
101
101
|
(0, shared_1.hookLog)('memory-stop', `Found ${citations.length} citation(s) in transcript`);
|
|
102
102
|
const memoryService = memory_1.MemoryService.getInstance();
|
|
103
|
-
// Get all loaded rules
|
|
104
|
-
const
|
|
105
|
-
const loadedRules = report.rules;
|
|
103
|
+
// Get all loaded rules across all projects — citations may reference rules from any project
|
|
104
|
+
const loadedRules = memoryService.getAllLoadedRules();
|
|
106
105
|
(0, shared_1.hookLog)('memory-stop', `Matching citations against ${loadedRules.length} loaded rules`);
|
|
106
|
+
// Log first 3 rules for diagnostics
|
|
107
|
+
for (let di = 0; di < Math.min(loadedRules.length, 3); di++) {
|
|
108
|
+
const r = loadedRules[di];
|
|
109
|
+
(0, shared_1.hookLog)('memory-stop', `Rule[${di}] key=${r.key} type=${r.type} valType=${typeof r.value} val="${String(r.value).substring(0, 100)}"`);
|
|
110
|
+
}
|
|
107
111
|
for (const cite of citations) {
|
|
108
112
|
(0, shared_1.hookLog)('memory-stop', `Citation text: "${cite.substring(0, 80)}"`);
|
|
109
113
|
let bestScore = 0;
|
|
@@ -111,24 +115,12 @@ function scanForCitations(transcriptPath) {
|
|
|
111
115
|
let bestContent = '';
|
|
112
116
|
for (const rule of loadedRules) {
|
|
113
117
|
// Extract clean text content — value may be JSON string with content/value fields
|
|
114
|
-
|
|
115
|
-
if (typeof rule.value === 'string') {
|
|
116
|
-
try {
|
|
117
|
-
const parsed = JSON.parse(rule.value);
|
|
118
|
-
ruleContent = parsed?.content ?? parsed?.value ?? rule.value;
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
ruleContent = rule.value;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
ruleContent = String(rule.value);
|
|
126
|
-
}
|
|
118
|
+
const ruleContent = extractRuleContent(rule.value);
|
|
127
119
|
const score = (0, shared_1.jaccardSimilarity)(cite, ruleContent);
|
|
128
120
|
if (score > bestScore) {
|
|
129
121
|
bestScore = score;
|
|
130
122
|
bestKey = rule.key;
|
|
131
|
-
bestContent =
|
|
123
|
+
bestContent = ruleContent.substring(0, 60);
|
|
132
124
|
}
|
|
133
125
|
}
|
|
134
126
|
(0, shared_1.hookLog)('memory-stop', `Best match: "${bestContent}" jaccard=${bestScore.toFixed(3)} key=${bestKey}`);
|
|
@@ -145,3 +137,34 @@ function scanForCitations(transcriptPath) {
|
|
|
145
137
|
(0, shared_1.hookLog)('memory-stop', `Citation scan error: ${error}`);
|
|
146
138
|
}
|
|
147
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Extract plain text content from a rule value (may be JSON string, object, or plain string).
|
|
142
|
+
*/
|
|
143
|
+
function extractRuleContent(value) {
|
|
144
|
+
if (typeof value === 'string') {
|
|
145
|
+
try {
|
|
146
|
+
const parsed = JSON.parse(value);
|
|
147
|
+
if (typeof parsed === 'string')
|
|
148
|
+
return parsed;
|
|
149
|
+
if (typeof parsed?.content === 'string')
|
|
150
|
+
return parsed.content;
|
|
151
|
+
if (typeof parsed?.value === 'string')
|
|
152
|
+
return parsed.value;
|
|
153
|
+
// content might be an object — stringify it
|
|
154
|
+
if (parsed?.content)
|
|
155
|
+
return JSON.stringify(parsed.content);
|
|
156
|
+
return value;
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return value;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (typeof value === 'object' && value !== null) {
|
|
163
|
+
if (typeof value.content === 'string')
|
|
164
|
+
return value.content;
|
|
165
|
+
if (typeof value.value === 'string')
|
|
166
|
+
return value.value;
|
|
167
|
+
return JSON.stringify(value);
|
|
168
|
+
}
|
|
169
|
+
return String(value ?? '');
|
|
170
|
+
}
|
package/dist/services/memory.js
CHANGED
|
@@ -393,6 +393,13 @@ class MemoryService {
|
|
|
393
393
|
this.storage.incrementCiteCount(memory.id);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Get all loaded rules across all projects (no project filter).
|
|
398
|
+
* Used by citation scanner which needs to match against any rule Claude may have cited.
|
|
399
|
+
*/
|
|
400
|
+
getAllLoadedRules() {
|
|
401
|
+
return this.storage.getRulesWithCompliance();
|
|
402
|
+
}
|
|
396
403
|
/**
|
|
397
404
|
* Get compliance report showing load vs cite rates for rules.
|
|
398
405
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-recall",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.23",
|
|
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": {
|