dore-memory 0.2.0 → 0.3.2
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/README.md +32 -41
- package/bin/dore-memory.js +2 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<strong>Memory for Claude Code. Say it once, it remembers in every new session.</strong><br/>
|
|
5
|
-
Runs on your laptop · your notes never leave your machine ·
|
|
5
|
+
Runs on your laptop · your notes never leave your machine · learns with Claude Haiku between sessions
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
@@ -20,35 +20,33 @@ npx dore-memory install # sets up dore and its Claude Code plugin, then open
|
|
|
20
20
|
|
|
21
21
|
## Why dore
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Claude Code forgets everything between sessions, so you explain the same things again and again. dore fixes that:
|
|
24
24
|
|
|
25
|
-
**
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
- 💡 **It reminds.** When you ask about it later, even in a new session, dore hands Claude that note before it answers.
|
|
30
|
-
- 🔄 **It updates.** When a fact changes ("the staging port is now 9443"), the new fact replaces the old one.
|
|
31
|
-
- 🗂️ **It keeps things in place.** Facts about you (your name, how you like to work) are used in every project.
|
|
32
|
-
Facts about one project (its port, its database) stay in that project.
|
|
25
|
+
- 👂 **It listens.** Tell Claude a fact ("our staging server uses port 8443") — no "remember this" needed.
|
|
26
|
+
- 💡 **It reminds.** Ask about it later, even in a new session, and dore puts that note in front of Claude first.
|
|
27
|
+
- 🔄 **It updates.** A new value ("the port is now 9443") replaces the old one.
|
|
28
|
+
- 🗂️ **It keeps things in place.** Facts about you follow you into every project; facts about one project stay there.
|
|
33
29
|
|
|
34
30
|
## How is it different from other memory tools?
|
|
35
31
|
|
|
36
|
-
Most memory tools
|
|
37
|
-
|
|
32
|
+
Most memory tools ask the AI to keep the notebook: it decides what to save, then searches it or loads all of it
|
|
33
|
+
into every message. You pay tokens for both, and the fact is lost when the model forgets to write it down.
|
|
38
34
|
|
|
39
|
-
dore
|
|
35
|
+
**dore keeps that work outside the model:** local rules in a hook decide what to save in ~13 ms for **0 Claude
|
|
36
|
+
tokens**, and Claude only reads the few notes that match your message — nothing when nothing matches.
|
|
40
37
|
|
|
41
38
|
| | Usual memory tools | dore |
|
|
42
39
|
|---|---|---|
|
|
43
|
-
| Who decides what to save | The AI (costs tokens,
|
|
44
|
-
| What Claude receives |
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
| Where it runs | Sometimes a cloud service | On your computer
|
|
40
|
+
| Who decides what to save | The AI (costs tokens, can forget) | Local rules at once, Haiku between sessions |
|
|
41
|
+
| What Claude receives | Everything, or what the AI searched | Only matching notes (plus rules once a session) |
|
|
42
|
+
| Conflicting notes | Old and new may both stay | New beats old; you beat the AI |
|
|
43
|
+
| Where facts belong | No rule | You vs. project, kept apart |
|
|
44
|
+
| Where it runs | Sometimes a cloud service | On your computer; notes stay local |
|
|
48
45
|
|
|
49
|
-
Learning adds a few ms
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
Learning adds a few ms per message. When a session ends
|
|
47
|
+
with enough waiting (about 30 sentences, or 3 hours after you said it), one batch sends what you typed and pasted (not Claude's
|
|
48
|
+
replies) to Haiku to sort it into facts, rules, lists and noise — about 6k tokens a day on one real history (estimate), never
|
|
49
|
+
while you work.
|
|
52
50
|
|
|
53
51
|
## See it work in Claude Code
|
|
54
52
|
|
|
@@ -140,32 +138,25 @@ It also works with opencode and other MCP agents.
|
|
|
140
138
|
|
|
141
139
|
## How it works
|
|
142
140
|
|
|
143
|
-
|
|
144
|
-
2. **If it tells a fact** ("our staging port is 8443"), dore saves it as a note on your machine.
|
|
145
|
-
Questions and requests are not saved.
|
|
146
|
-
3. **If it asks about something dore knows**, the hook adds the matching notes (a few lines) to your
|
|
147
|
-
message, so Claude can answer. If nothing matches, nothing is added (0 tokens).
|
|
148
|
-
4. **If a fact changes** ("the port is now 9443"), the newer note replaces the old one.
|
|
149
|
-
5. **Rules you repeat** ("never use tabs", said in two sessions, in any words) or that Claude keeps following start
|
|
150
|
-
each new session, in a few lines at most; rules you stop repeating fade, like habits, and still come back when a
|
|
151
|
-
message matches them.
|
|
152
|
-
|
|
153
|
-
With Haiku learning on, steps 2 and 4 still happen at once (so it works from your very first session), and Haiku
|
|
154
|
-
reviews them afterwards: after each session dore's background helper sends what you typed (not code, logs, pastes or Claude's replies) to
|
|
155
|
-
Haiku through your own `claude` command. Haiku says which are lasting facts or rules, which repeat or update an
|
|
156
|
-
existing note, and which are noise; a quick note it doesn't agree with is archived. Nothing is deleted; an old note is hidden only when a second check agrees
|
|
157
|
-
it is out of date. Offline or at your plan's limit, the sentences wait and are tried again later.
|
|
141
|
+

|
|
158
142
|
|
|
159
|
-
|
|
143
|
+
- **Learn:** dore reads each message before Claude does and keeps facts and rules. It skips questions and requests.
|
|
144
|
+
- **Recall:** it adds only the notes that match your message. Nothing matches, nothing is added.
|
|
145
|
+
- **Update:** a new value replaces the old one. The old note is hidden, never deleted.
|
|
146
|
+
- **Rules like habits:** a rule you repeat or Claude follows gets stronger and starts each session; unused ones fade.
|
|
147
|
+
- **Haiku review:** at a session end, Haiku checks what you typed and pasted (not Claude's replies)
|
|
148
|
+
and keeps, merges or archives notes; a pasted list is kept whole, a log or error is dropped. Until it runs (or
|
|
149
|
+
when `claude` can't be reached), local word rules keep what you say.
|
|
160
150
|
|
|
161
151
|
## Privacy
|
|
162
152
|
|
|
163
153
|
- **Stays on your machine:** every note, everything you type, your projects and the search model's work.
|
|
164
154
|
dore has no account, no server and no telemetry.
|
|
165
|
-
- **
|
|
166
|
-
|
|
167
|
-
you send Claude. Your notes stay on your
|
|
168
|
-
|
|
155
|
+
- **Haiku learning:** at a session end,
|
|
156
|
+
what you typed since the last batch, and the start and end of anything long you pasted (code and logs included),
|
|
157
|
+
go to Claude Haiku through your own `claude` login, like any message you send Claude. Your notes stay on your
|
|
158
|
+
machine.
|
|
159
|
+
- **Besides Haiku, the only thing dore sends:** once a day, one request for the public page
|
|
169
160
|
`https://registry.npmjs.org/dore-memory/latest` to see the newest version number. It carries nothing about
|
|
170
161
|
you or your memory; npm sees an ordinary request from your IP address. When there is a newer version, the
|
|
171
162
|
update downloads it from npm and GitHub. Off with `DORE_NO_AUTO_UPDATE=1`.
|
package/bin/dore-memory.js
CHANGED
|
@@ -141,36 +141,17 @@ function recordVersion() {
|
|
|
141
141
|
fs.writeFileSync(path.join(DATA, "install.json"), JSON.stringify({ version }) + "\n");
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
// Learning with Haiku uses the user's own Claude Code login, so it is on only after a clear yes (default no; no
|
|
145
|
-
// terminal = no). The choice is kept in data/learner ("haiku" or "rules"); DORE_LEARN overrides it.
|
|
146
|
-
function chooseLearner() {
|
|
147
|
-
const file = path.join(DATA, "learner");
|
|
148
|
-
if (fs.existsSync(file) || process.env.DORE_LEARN) return;
|
|
149
|
-
let yes = false;
|
|
150
|
-
if (process.stdin.isTTY && has("claude")) {
|
|
151
|
-
console.log("dore-memory: dore can learn better with Claude Haiku: about once a day it sends the sentences you");
|
|
152
|
-
console.log(" typed (not code, logs, pastes or Claude's replies) to Haiku through your own `claude` command and");
|
|
153
|
-
console.log(" login, about 5-10k tokens a day. Without it, dore learns with local word rules only.");
|
|
154
|
-
process.stdout.write(" Use Haiku for learning? [y/N] ");
|
|
155
|
-
const buf = Buffer.alloc(256);
|
|
156
|
-
try { yes = buf.toString("utf8", 0, fs.readSync(0, buf, 0, 256, null)).trim().toLowerCase().startsWith("y"); } catch {}
|
|
157
|
-
}
|
|
158
|
-
fs.mkdirSync(DATA, { recursive: true });
|
|
159
|
-
fs.writeFileSync(file, (yes ? "haiku" : "rules") + "\n");
|
|
160
|
-
}
|
|
161
|
-
|
|
162
144
|
function install(upgrade) {
|
|
163
145
|
say(`setting up in ${HOME} (first run downloads ~200 MB of packages and models)`);
|
|
164
146
|
installPython(upgrade);
|
|
165
147
|
recordVersion();
|
|
166
|
-
chooseLearner();
|
|
167
148
|
const plugin = installPlugin(upgrade);
|
|
168
149
|
say("done.");
|
|
169
150
|
console.log(` memory: ${DATA}`);
|
|
170
151
|
console.log(` plugin: ${plugin ? PLUGIN + " installed" : "not installed (see above)"}`);
|
|
171
152
|
console.log(" Start a new Claude Code session; dore learns from what you tell it.");
|
|
172
|
-
console.log(" Your memory stays on this computer
|
|
173
|
-
console.log("
|
|
153
|
+
console.log(" Your memory stays on this computer. At a session end, what you typed goes to Claude Haiku through your");
|
|
154
|
+
console.log(" own `claude` login to sort it into facts and rules. Once a day dore asks npm for a newer version and updates");
|
|
174
155
|
console.log(" itself in the background (nothing about you is sent); turn that off with DORE_NO_AUTO_UPDATE=1.");
|
|
175
156
|
}
|
|
176
157
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dore-memory",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Local long-term memory for Claude Code. Say it once, it remembers in every new session. Installs the dore Python package and its Claude Code plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|