@basicmemory/openclaw-basic-memory 0.24.1 → 1.1.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.
- package/README.md +28 -16
- package/bm-client.ts +461 -140
- package/commands/cli.ts +5 -6
- package/commands/slash.ts +4 -4
- package/config.ts +5 -0
- package/context-engine/basic-memory-context-engine.ts +74 -9
- package/context-engine/types.ts +21 -0
- package/dist/bm-client.d.ts +101 -32
- package/dist/bm-client.js +346 -108
- package/dist/commands/cli.d.ts +1 -1
- package/dist/commands/cli.js +5 -5
- package/dist/commands/slash.d.ts +1 -1
- package/dist/commands/slash.js +4 -3
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -0
- package/dist/context-engine/basic-memory-context-engine.d.ts +20 -1
- package/dist/context-engine/basic-memory-context-engine.js +50 -2
- package/dist/context-engine/types.d.ts +9 -0
- package/dist/context-engine/types.js +1 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.js +78 -69
- package/dist/memory/basic-memory-capability.d.ts +19 -0
- package/dist/memory/basic-memory-capability.js +196 -0
- package/dist/tools/build-context.d.ts +1 -1
- package/dist/tools/build-context.js +12 -4
- package/dist/tools/delete-note.d.ts +1 -1
- package/dist/tools/delete-note.js +2 -1
- package/dist/tools/edit-note.d.ts +1 -1
- package/dist/tools/edit-note.js +22 -12
- package/dist/tools/list-memory-projects.d.ts +1 -1
- package/dist/tools/list-memory-projects.js +2 -1
- package/dist/tools/list-workspaces.d.ts +1 -1
- package/dist/tools/list-workspaces.js +4 -4
- package/dist/tools/move-note.d.ts +1 -1
- package/dist/tools/move-note.js +2 -1
- package/dist/tools/read-note.d.ts +1 -1
- package/dist/tools/read-note.js +2 -1
- package/dist/tools/schema-diff.d.ts +1 -1
- package/dist/tools/schema-diff.js +7 -4
- package/dist/tools/schema-infer.d.ts +1 -1
- package/dist/tools/schema-infer.js +3 -2
- package/dist/tools/schema-validate.d.ts +1 -1
- package/dist/tools/schema-validate.js +7 -5
- package/dist/tools/search-notes.d.ts +1 -1
- package/dist/tools/search-notes.js +13 -6
- package/dist/tools/write-note.d.ts +1 -1
- package/dist/tools/write-note.js +11 -12
- package/index.ts +92 -84
- package/memory/basic-memory-capability.ts +259 -0
- package/openclaw.plugin.json +1 -3
- package/package.json +6 -5
- package/scripts/setup-bm.sh +1 -4
- package/skills/manifest.json +10 -5
- package/skills/memory-agents/SKILL.md +23 -10
- package/skills/memory-capture/SKILL.md +29 -18
- package/skills/memory-comark/SKILL.md +17 -6
- package/skills/memory-continue/SKILL.md +47 -27
- package/skills/memory-curate/SKILL.md +40 -24
- package/skills/memory-defrag/SKILL.md +18 -7
- package/skills/memory-doctor/SKILL.md +93 -0
- package/skills/memory-ingest/SKILL.md +35 -18
- package/skills/memory-lifecycle/SKILL.md +35 -22
- package/skills/memory-literary-analysis/SKILL.md +112 -75
- package/skills/memory-metadata-search/SKILL.md +39 -28
- package/skills/memory-notes/SKILL.md +75 -50
- package/skills/memory-okf/SKILL.md +27 -15
- package/skills/memory-quest/SKILL.md +24 -8
- package/skills/memory-reflect/SKILL.md +25 -13
- package/skills/memory-research/SKILL.md +28 -13
- package/skills/memory-schema/SKILL.md +36 -24
- package/skills/memory-start/SKILL.md +116 -0
- package/skills/memory-tasks/SKILL.md +34 -22
- package/tools/build-context.ts +14 -5
- package/tools/delete-note.ts +2 -2
- package/tools/edit-note.ts +27 -14
- package/tools/list-memory-projects.ts +6 -2
- package/tools/list-workspaces.ts +8 -5
- package/tools/move-note.ts +2 -2
- package/tools/read-note.ts +2 -2
- package/tools/schema-diff.ts +9 -5
- package/tools/schema-infer.ts +3 -3
- package/tools/schema-validate.ts +7 -6
- package/tools/search-notes.ts +18 -7
- package/tools/write-note.ts +12 -12
- package/dist/tools/memory-provider.d.ts +0 -15
- package/dist/tools/memory-provider.js +0 -275
- package/skills/memory-onboarding/SKILL.md +0 -142
- package/skills/memory-onboarding/evals/evals.json +0 -29
- package/skills/memory-onboarding/references/assistant-setup.md +0 -72
- package/skills/memory-onboarding/references/conventions.md +0 -118
- package/skills/memory-onboarding/references/domain-playbooks.md +0 -159
- package/skills/memory-onboarding/references/schema-guide.md +0 -136
- package/tools/memory-provider.ts +0 -336
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-doctor
|
|
3
|
+
description: "Check local Basic Memory projects with bm doctor, explain the findings, and run the suggested fixes once the user agrees. Use when search misses or repeats notes, or a save looks lost."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory Doctor
|
|
7
|
+
|
|
8
|
+
`bm doctor` checks the user's local Basic Memory projects and reports what is
|
|
9
|
+
wrong. Each problem comes with the command that fixes it, when one exists.
|
|
10
|
+
Doctor's checks only read; they never change a project's notes or index. The
|
|
11
|
+
fixes it suggests do change things, so run them only after the user agrees.
|
|
12
|
+
|
|
13
|
+
This skill needs a shell with the `bm` (or `basic-memory`) command.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- Search misses a note the user knows exists, or returns the same note twice
|
|
18
|
+
- A note was saved but its file did not change, or the reverse
|
|
19
|
+
- The user asks whether Basic Memory is working, or to "check" or "fix" it
|
|
20
|
+
- After a crash, an interrupted import, or moving a project's folder
|
|
21
|
+
|
|
22
|
+
## Run It
|
|
23
|
+
|
|
24
|
+
Start with the report alone. It is fast and has a stable JSON shape:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bm doctor --skip-self-test --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add `--project NAME` to check one project. Without `--skip-self-test`, doctor
|
|
31
|
+
also runs a self-test: it writes, indexes and searches a note in a throwaway
|
|
32
|
+
sandbox, which takes a few seconds and proves the install itself works. Run it
|
|
33
|
+
when the report is clean but something still seems broken.
|
|
34
|
+
|
|
35
|
+
## Read the Report
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"projects": [
|
|
40
|
+
{
|
|
41
|
+
"name": "work",
|
|
42
|
+
"findings": [
|
|
43
|
+
{
|
|
44
|
+
"check": "search_index",
|
|
45
|
+
"severity": "error",
|
|
46
|
+
"summary": "1 search row does not match a current note, observation or relation.",
|
|
47
|
+
"evidence": ["entity id=99, entity_id=99"],
|
|
48
|
+
"action": {"kind": "reindex_search", "full": true},
|
|
49
|
+
"command": "bm reindex --search --full --project work"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"has_errors": true
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"skipped_cloud_projects": ["research"],
|
|
56
|
+
"self_test": {"outcome": "skipped"},
|
|
57
|
+
"has_errors": true
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
| Severity | Meaning | What to do |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `error` | Will not go away without a fix | Offer the `command`; if it is null, explain the evidence |
|
|
64
|
+
| `warning` | Needs attention, may recover on its own | Offer the `command` if there is one |
|
|
65
|
+
| `info` | Expected while work is in progress | Mention it; a running server finishes it, and the `command` finishes it now |
|
|
66
|
+
|
|
67
|
+
Indexing catches up in the background. A duplicate, missing or extra search row
|
|
68
|
+
is a `warning` while file indexing is still running, because the pass may clear
|
|
69
|
+
it, and becomes an `error` once indexing has settled. If the report has only `info` findings, nothing is wrong. When no
|
|
70
|
+
Basic Memory server is running, nothing indexes in the background, so offer the
|
|
71
|
+
`command` on an `info` finding too.
|
|
72
|
+
|
|
73
|
+
Cloud projects are listed under `skipped_cloud_projects`: they are indexed on the
|
|
74
|
+
server, and local commands cannot fix them.
|
|
75
|
+
|
|
76
|
+
## Fix
|
|
77
|
+
|
|
78
|
+
1. Summarize the findings for the user in plain words: which project, what is
|
|
79
|
+
wrong, and what the fix does. Group findings that share a command.
|
|
80
|
+
2. Show each `command` exactly as doctor printed it and ask before running it.
|
|
81
|
+
`bm reindex --search --full` re-reads every file in the project and can take
|
|
82
|
+
a while on a large one.
|
|
83
|
+
3. Run the commands the user approves.
|
|
84
|
+
4. Run `bm doctor --skip-self-test --json` again and confirm the findings are gone.
|
|
85
|
+
|
|
86
|
+
When a finding has no `command`, do not invent one. Say what the evidence shows
|
|
87
|
+
(for example, which files changed on disk while a newer save was waiting) and
|
|
88
|
+
let the user decide.
|
|
89
|
+
|
|
90
|
+
## Exit Codes
|
|
91
|
+
|
|
92
|
+
`bm doctor` exits 0 when there are no errors and the self-test passed (or was
|
|
93
|
+
skipped), and 1 otherwise. Warnings and info never fail it.
|
|
@@ -7,6 +7,17 @@ description: "Turn meeting transcripts, conversation logs, or pasted documents i
|
|
|
7
7
|
|
|
8
8
|
Turn raw, unstructured input into structured Basic Memory entities. Meeting transcripts, conversation logs, pasted documents, email threads — anything with information worth preserving gets parsed, cross-referenced against existing knowledge, and written as proper notes.
|
|
9
9
|
|
|
10
|
+
## Project scope
|
|
11
|
+
|
|
12
|
+
If the project is unknown, discover it with `bm_project_list()`.
|
|
13
|
+
Pass a nonempty `project` on every note, folder, context and schema call, even
|
|
14
|
+
with one project or a qualified `memory://` URL. Use the chosen project's name,
|
|
15
|
+
`workspace/project`, or external ID; `<project>` below is a placeholder for it.
|
|
16
|
+
Recent activity also requires `project`. Search accepts `project` for one
|
|
17
|
+
project, `projects` for selected projects, or `all_projects=True` explicitly.
|
|
18
|
+
Discovery and bundled manuals need no project. Keep the same scope when following
|
|
19
|
+
returned paths, paginating, or recovering from a refusal.
|
|
20
|
+
|
|
10
21
|
## When to Use
|
|
11
22
|
|
|
12
23
|
- User pastes a meeting transcript or conversation log
|
|
@@ -70,16 +81,16 @@ For each extracted entity, search Basic Memory with multiple query variations:
|
|
|
70
81
|
|
|
71
82
|
```python
|
|
72
83
|
# Person — try full name, last name
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
bm_search(query="Sarah Chen", project="<project>")
|
|
85
|
+
bm_search(query="Chen", project="<project>")
|
|
75
86
|
|
|
76
87
|
# Organization — try full name, abbreviation, acronym
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
bm_search(query="National Renewable Energy Laboratory", project="<project>")
|
|
89
|
+
bm_search(query="NREL", project="<project>")
|
|
79
90
|
|
|
80
91
|
# Topic — try the full term and keywords
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
bm_search(query="edge computing", project="<project>")
|
|
93
|
+
bm_search(query="edge inference", project="<project>")
|
|
83
94
|
```
|
|
84
95
|
|
|
85
96
|
Classify each entity as:
|
|
@@ -124,7 +135,7 @@ Create the primary note for the ingested content. This is the "record of what ha
|
|
|
124
135
|
### Meeting / Conversation Note
|
|
125
136
|
|
|
126
137
|
```python
|
|
127
|
-
|
|
138
|
+
bm_write(
|
|
128
139
|
title="NovaTech Meeting - Jordan Rivera - Feb 22, 2026",
|
|
129
140
|
directory="meetings/2026",
|
|
130
141
|
note_type="meeting",
|
|
@@ -150,14 +161,15 @@ Brief one-sentence summary of what this meeting was about.
|
|
|
150
161
|
- with [[NovaTech]]
|
|
151
162
|
- discussed [[Federated Learning]]
|
|
152
163
|
- follow_up [[Send NovaTech Technical Spec]]
|
|
153
|
-
"""
|
|
164
|
+
""",
|
|
165
|
+
project="<project>",
|
|
154
166
|
)
|
|
155
167
|
```
|
|
156
168
|
|
|
157
169
|
### Document / Article Note
|
|
158
170
|
|
|
159
171
|
```python
|
|
160
|
-
|
|
172
|
+
bm_write(
|
|
161
173
|
title="Edge Computing Architecture Whitepaper",
|
|
162
174
|
directory="references",
|
|
163
175
|
note_type="reference",
|
|
@@ -177,7 +189,8 @@ write_note(
|
|
|
177
189
|
## Relations
|
|
178
190
|
- relates_to [[Edge Computing]]
|
|
179
191
|
- relates_to [[Model Optimization]]
|
|
180
|
-
"""
|
|
192
|
+
""",
|
|
193
|
+
project="<project>",
|
|
181
194
|
)
|
|
182
195
|
```
|
|
183
196
|
|
|
@@ -204,13 +217,14 @@ Invent categories as needed — these are suggestions, not a fixed list.
|
|
|
204
217
|
|
|
205
218
|
For each entity the user approved, create a structured note. Match the entity type to an appropriate template.
|
|
206
219
|
|
|
207
|
-
If `
|
|
208
|
-
the
|
|
220
|
+
If `bm_write` reports similar existing notes, treat that as a match Step 3 missed. Ask the
|
|
221
|
+
user whether to merge the new note into the existing one or link the two, and keep both
|
|
222
|
+
notes until they decide.
|
|
209
223
|
|
|
210
224
|
### Person
|
|
211
225
|
|
|
212
226
|
```python
|
|
213
|
-
|
|
227
|
+
bm_write(
|
|
214
228
|
title="Jordan Rivera",
|
|
215
229
|
directory="people",
|
|
216
230
|
note_type="person",
|
|
@@ -232,14 +246,15 @@ VP of Engineering at NovaTech. Met during integration partnership discussion.
|
|
|
232
246
|
## Relations
|
|
233
247
|
- works_at [[NovaTech]]
|
|
234
248
|
- discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
|
|
235
|
-
"""
|
|
249
|
+
""",
|
|
250
|
+
project="<project>",
|
|
236
251
|
)
|
|
237
252
|
```
|
|
238
253
|
|
|
239
254
|
### Organization
|
|
240
255
|
|
|
241
256
|
```python
|
|
242
|
-
|
|
257
|
+
bm_write(
|
|
243
258
|
title="NovaTech",
|
|
244
259
|
directory="organizations",
|
|
245
260
|
note_type="organization",
|
|
@@ -262,14 +277,15 @@ SaaS platform company. Series B stage.
|
|
|
262
277
|
## Relations
|
|
263
278
|
- employs [[Jordan Rivera]]
|
|
264
279
|
- discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
|
|
265
|
-
"""
|
|
280
|
+
""",
|
|
281
|
+
project="<project>",
|
|
266
282
|
)
|
|
267
283
|
```
|
|
268
284
|
|
|
269
285
|
### Concept / Topic
|
|
270
286
|
|
|
271
287
|
```python
|
|
272
|
-
|
|
288
|
+
bm_write(
|
|
273
289
|
title="Federated Learning",
|
|
274
290
|
directory="concepts",
|
|
275
291
|
note_type="concept",
|
|
@@ -286,7 +302,8 @@ write_note(
|
|
|
286
302
|
|
|
287
303
|
## Relations
|
|
288
304
|
- discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
|
|
289
|
-
"""
|
|
305
|
+
""",
|
|
306
|
+
project="<project>",
|
|
290
307
|
)
|
|
291
308
|
```
|
|
292
309
|
|
|
@@ -7,6 +7,17 @@ description: "Manage note status transitions in Basic Memory: archive completed
|
|
|
7
7
|
|
|
8
8
|
Manage how entities move through status stages in Basic Memory. The core principle: **archive, never delete.** Completed work is valuable context — move it out of the active view, but keep it in the knowledge graph.
|
|
9
9
|
|
|
10
|
+
## Project scope
|
|
11
|
+
|
|
12
|
+
If the project is unknown, discover it with `bm_project_list()`.
|
|
13
|
+
Pass a nonempty `project` on every note, folder, context and schema call, even
|
|
14
|
+
with one project or a qualified `memory://` URL. Use the chosen project's name,
|
|
15
|
+
`workspace/project`, or external ID; `<project>` below is a placeholder for it.
|
|
16
|
+
Recent activity also requires `project`. Search accepts `project` for one
|
|
17
|
+
project, `projects` for selected projects, or `all_projects=True` explicitly.
|
|
18
|
+
Discovery and bundled manuals need no project. Keep the same scope when following
|
|
19
|
+
returned paths, paginating, or recovering from a refusal.
|
|
20
|
+
|
|
10
21
|
## When to Use
|
|
11
22
|
|
|
12
23
|
- User says something is "done", "finished", "completed", "submitted", "missed", or "cancelled"
|
|
@@ -20,10 +31,10 @@ Deleting a note removes it from the knowledge graph — its observations and rel
|
|
|
20
31
|
|
|
21
32
|
```
|
|
22
33
|
# Good — entity stays in the knowledge graph
|
|
23
|
-
|
|
34
|
+
bm_move → active/ to archive/
|
|
24
35
|
|
|
25
36
|
# Bad — knowledge is lost
|
|
26
|
-
|
|
37
|
+
bm_delete
|
|
27
38
|
```
|
|
28
39
|
|
|
29
40
|
The only exception: notes created by mistake (typos, true duplicates) can be deleted.
|
|
@@ -77,8 +88,8 @@ When the user mentions completion or status change, extract the intent:
|
|
|
77
88
|
Search Basic Memory with multiple variations to locate the entity:
|
|
78
89
|
|
|
79
90
|
```python
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
bm_search(query="quarterly report", project="<project>")
|
|
92
|
+
bm_search(query="Q1 report", project="<project>")
|
|
82
93
|
```
|
|
83
94
|
|
|
84
95
|
If multiple matches come back, present options and ask which one.
|
|
@@ -87,12 +98,13 @@ If no match is found, ask for clarification — don't guess.
|
|
|
87
98
|
|
|
88
99
|
### 2. Move the File
|
|
89
100
|
|
|
90
|
-
Use `
|
|
101
|
+
Use `bm_move` to relocate the entity to the appropriate status folder:
|
|
91
102
|
|
|
92
103
|
```python
|
|
93
|
-
|
|
104
|
+
bm_move(
|
|
94
105
|
identifier="tasks/active/quarterly-report",
|
|
95
|
-
|
|
106
|
+
destination="tasks/completed/quarterly-report.md",
|
|
107
|
+
project="<project>",
|
|
96
108
|
)
|
|
97
109
|
```
|
|
98
110
|
|
|
@@ -101,15 +113,15 @@ By default the permalink stays the same after a move, so links keep resolving. P
|
|
|
101
113
|
### 3. Update Frontmatter
|
|
102
114
|
|
|
103
115
|
After moving, merge the new status (and completion date, if the type tracks one) into
|
|
104
|
-
frontmatter with
|
|
105
|
-
the
|
|
116
|
+
frontmatter with `command="set_metadata"` and the `metadata` parameter; this leaves
|
|
117
|
+
the body unchanged:
|
|
106
118
|
|
|
107
119
|
```python
|
|
108
|
-
|
|
109
|
-
identifier="quarterly-report",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
bm_edit(
|
|
121
|
+
identifier="tasks/completed/quarterly-report.md",
|
|
122
|
+
command="set_metadata",
|
|
123
|
+
metadata={"status": "completed", "completed": "2026-02-22"},
|
|
124
|
+
project="<project>",
|
|
113
125
|
)
|
|
114
126
|
```
|
|
115
127
|
|
|
@@ -149,16 +161,17 @@ status is unchanged. Only the user can unlock it, by editing the file.
|
|
|
149
161
|
If something was archived by mistake, move it back:
|
|
150
162
|
|
|
151
163
|
```python
|
|
152
|
-
|
|
164
|
+
bm_move(
|
|
153
165
|
identifier="tasks/completed/quarterly-report",
|
|
154
|
-
|
|
166
|
+
destination="tasks/active/quarterly-report.md",
|
|
167
|
+
project="<project>",
|
|
155
168
|
)
|
|
156
169
|
|
|
157
|
-
|
|
158
|
-
identifier="quarterly-report",
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
170
|
+
bm_edit(
|
|
171
|
+
identifier="tasks/active/quarterly-report.md",
|
|
172
|
+
command="set_metadata",
|
|
173
|
+
metadata={"status": "active"},
|
|
174
|
+
project="<project>",
|
|
162
175
|
)
|
|
163
176
|
```
|
|
164
177
|
|
|
@@ -176,7 +189,7 @@ Some status changes don't require a folder move — "paused" or "blocked" items
|
|
|
176
189
|
|
|
177
190
|
- **Archive, never delete.** The knowledge graph benefits from historical context.
|
|
178
191
|
- **Move first, then update frontmatter.** This order ensures the file is in the right place even if the edit step fails.
|
|
179
|
-
- **Permalinks survive moves by default.** Links to the entity keep working after a `
|
|
192
|
+
- **Permalinks survive moves by default.** Links to the entity keep working after a `bm_move` unless the project enables `update_permalinks_on_move`.
|
|
180
193
|
- **Be concise in confirmations.** The user knows their system — just report what changed.
|
|
181
194
|
- **Ask when ambiguous.** If multiple entities match or the target folder isn't clear, ask rather than guess.
|
|
182
195
|
- **Batch operations are fine.** If the user says "archive all completed tasks", find them all, confirm the list, then move them in sequence.
|