@basicmemory/openclaw-basic-memory 0.2.3 → 0.23.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 +49 -19
- package/bm-client.ts +55 -21
- package/commands/cli.ts +1 -2
- package/commands/skills.ts +71 -10
- package/commands/slash.ts +4 -2
- package/config.ts +0 -16
- package/context-engine/basic-memory-context-engine.ts +22 -90
- package/dist/bm-client.d.ts +179 -0
- package/dist/bm-client.js +582 -0
- package/dist/commands/cli.d.ts +4 -0
- package/dist/commands/cli.js +116 -0
- package/dist/commands/skills.d.ts +2 -0
- package/dist/commands/skills.js +86 -0
- package/dist/commands/slash.d.ts +3 -0
- package/dist/commands/slash.js +92 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +99 -0
- package/dist/context-engine/basic-memory-context-engine.d.ts +34 -0
- package/dist/context-engine/basic-memory-context-engine.js +176 -0
- package/dist/hooks/capture.d.ts +24 -0
- package/dist/hooks/capture.js +88 -0
- package/dist/hooks/recall.d.ts +24 -0
- package/dist/hooks/recall.js +56 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +135 -0
- package/dist/logger.d.ts +13 -0
- package/dist/logger.js +34 -0
- package/dist/schema/conversation-schema.d.ts +5 -0
- package/dist/schema/conversation-schema.js +33 -0
- package/dist/schema/task-schema.d.ts +5 -0
- package/dist/schema/task-schema.js +34 -0
- package/dist/tools/build-context.d.ts +3 -0
- package/dist/tools/build-context.js +100 -0
- package/dist/tools/delete-note.d.ts +3 -0
- package/dist/tools/delete-note.js +52 -0
- package/dist/tools/edit-note.d.ts +3 -0
- package/dist/tools/edit-note.js +81 -0
- package/dist/tools/list-memory-projects.d.ts +3 -0
- package/dist/tools/list-memory-projects.js +86 -0
- package/dist/tools/list-workspaces.d.ts +3 -0
- package/dist/tools/list-workspaces.js +64 -0
- package/dist/tools/memory-provider.d.ts +15 -0
- package/dist/tools/memory-provider.js +274 -0
- package/dist/tools/move-note.d.ts +3 -0
- package/dist/tools/move-note.js +56 -0
- package/dist/tools/read-note.d.ts +3 -0
- package/dist/tools/read-note.js +57 -0
- package/dist/tools/schema-diff.d.ts +3 -0
- package/dist/tools/schema-diff.js +81 -0
- package/dist/tools/schema-infer.d.ts +3 -0
- package/dist/tools/schema-infer.js +66 -0
- package/dist/tools/schema-validate.d.ts +3 -0
- package/dist/tools/schema-validate.js +73 -0
- package/dist/tools/search-notes.d.ts +3 -0
- package/dist/tools/search-notes.js +97 -0
- package/dist/tools/write-note.d.ts +3 -0
- package/dist/tools/write-note.js +80 -0
- package/index.ts +27 -17
- package/openclaw.plugin.json +27 -20
- package/package.json +27 -8
- package/scripts/fetch-skills.ts +62 -67
- package/scripts/setup-bm.sh +27 -10
- package/skills/manifest.json +25 -0
- package/skills/memory-capture/SKILL.md +275 -0
- package/skills/memory-ci-capture/SKILL.md +56 -0
- package/skills/memory-continue/SKILL.md +148 -0
- package/skills/memory-curate/SKILL.md +243 -0
- package/skills/memory-literary-analysis/SKILL.md +15 -12
- package/skills/memory-notes/SKILL.md +22 -6
- package/skills/memory-onboarding/SKILL.md +142 -0
- package/skills/memory-onboarding/evals/evals.json +29 -0
- package/skills/memory-onboarding/references/assistant-setup.md +64 -0
- package/skills/memory-onboarding/references/conventions.md +118 -0
- package/skills/memory-onboarding/references/domain-playbooks.md +159 -0
- package/skills/memory-onboarding/references/schema-guide.md +136 -0
- package/skills/memory-schema/SKILL.md +7 -5
- package/skills/memory-tasks/SKILL.md +1 -1
- package/tools/build-context.ts +1 -1
- package/tools/delete-note.ts +1 -1
- package/tools/edit-note.ts +1 -1
- package/tools/list-memory-projects.ts +3 -2
- package/tools/list-workspaces.ts +1 -1
- package/tools/memory-provider.ts +1 -1
- package/tools/move-note.ts +1 -1
- package/tools/read-note.ts +1 -1
- package/tools/schema-diff.ts +1 -1
- package/tools/schema-infer.ts +1 -1
- package/tools/schema-validate.ts +1 -1
- package/tools/search-notes.ts +1 -1
- package/tools/write-note.ts +1 -1
- package/context-engine/basic-memory-context-engine.test.ts +0 -398
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-continue
|
|
3
|
+
description: "Resume prior work by rebuilding context from the Basic Memory knowledge graph — pick up where you left off using memory:// URLs, recent activity, and search. Use when starting a session or when the user says 'continue with...', 'back to...', or 'where were we?'"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory Continue
|
|
7
|
+
|
|
8
|
+
Resume previous work by reconstructing context from the Basic Memory knowledge graph, so the assistant can pick up across sessions instead of starting cold.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Starting a new session and you need to pick up where you left off
|
|
13
|
+
- The user references earlier work: "continue with...", "back to...", "where were we on...?"
|
|
14
|
+
- You need context about an ongoing project or spec
|
|
15
|
+
- The user asks about something discussed in a previous conversation
|
|
16
|
+
- You're working on a task that spans multiple sessions
|
|
17
|
+
|
|
18
|
+
## Building Context
|
|
19
|
+
|
|
20
|
+
### 1. Identify What to Continue
|
|
21
|
+
|
|
22
|
+
If it's unclear, ask:
|
|
23
|
+
- What topic or project should you resume?
|
|
24
|
+
- What timeframe matters?
|
|
25
|
+
- Any specific aspect to focus on?
|
|
26
|
+
|
|
27
|
+
### 2. Gather Context with MCP Tools
|
|
28
|
+
|
|
29
|
+
**Known topic — use `build_context`.** Navigate the graph from a starting point, following relations outward:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
build_context(
|
|
33
|
+
url="memory://topic-or-note-name",
|
|
34
|
+
depth=2, # how many relation hops to follow
|
|
35
|
+
timeframe="7d", # bias toward recent changes
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**No clear starting point — use `recent_activity`.** See what's changed and let it surface the thread:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
recent_activity(timeframe="3d", depth=1)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Looking for something specific — use `search_notes`.** Find candidate notes by keyword:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
search_notes(query="async client refactor", page_size=10)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Read the Key Notes
|
|
52
|
+
|
|
53
|
+
Once you've identified the relevant notes, read them in full:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
read_note(identifier="note-title-or-permalink")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 4. Present Context to the User
|
|
60
|
+
|
|
61
|
+
Summarize what you found, incrementally:
|
|
62
|
+
- Current state of the work
|
|
63
|
+
- Recent changes or progress
|
|
64
|
+
- Open items and next steps
|
|
65
|
+
- Related context that might help
|
|
66
|
+
|
|
67
|
+
## Memory URL Reference
|
|
68
|
+
|
|
69
|
+
`build_context` and `read_note` both accept `memory://` URLs, which address notes by permalink and support wildcards for gathering groups of notes.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
memory://note-title # a single note by permalink
|
|
73
|
+
memory://folder/* # all notes in a folder
|
|
74
|
+
memory://specs/SPEC-24* # pattern / prefix match
|
|
75
|
+
memory://project/*/requirements # path wildcards
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use a specific note URL to anchor on one starting point; use a wildcard to pull in a whole folder or family of related notes at once.
|
|
79
|
+
|
|
80
|
+
## Timeframe Reference
|
|
81
|
+
|
|
82
|
+
`build_context` and `recent_activity` accept natural-language timeframes:
|
|
83
|
+
|
|
84
|
+
| Timeframe | Meaning |
|
|
85
|
+
|-----------|---------|
|
|
86
|
+
| `"today"` | Current day |
|
|
87
|
+
| `"yesterday"` | Previous day |
|
|
88
|
+
| `"3d"` or `"3 days"` | Last 3 days |
|
|
89
|
+
| `"1 week"` or `"7d"` | Last week |
|
|
90
|
+
| `"2 weeks"` | Last 2 weeks |
|
|
91
|
+
| `"1 month"` | Last month |
|
|
92
|
+
|
|
93
|
+
## Scenario Playbooks
|
|
94
|
+
|
|
95
|
+
### Resuming a Spec or Project
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
# 1. Read the spec / project note
|
|
99
|
+
read_note(identifier="SPEC-24: Postgres Database Migration")
|
|
100
|
+
|
|
101
|
+
# 2. Pull in related context and recent changes via the graph
|
|
102
|
+
build_context(url="memory://SPEC-24*", timeframe="7d")
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Then summarize: the goals, what's completed, what's pending, and any blockers or open decisions.
|
|
106
|
+
|
|
107
|
+
### Continuing General Work
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
# 1. Check recent activity
|
|
111
|
+
recent_activity(timeframe="3d")
|
|
112
|
+
|
|
113
|
+
# 2. Read notes from the recent sessions it surfaces
|
|
114
|
+
read_note(identifier="relevant-note")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Then list the modified notes with brief descriptions and ask which thread to dive into.
|
|
118
|
+
|
|
119
|
+
### Following Up on a Topic
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
# 1. Find the topic
|
|
123
|
+
search_notes(query="topic keywords")
|
|
124
|
+
|
|
125
|
+
# 2. Build context from the best match, following its relations
|
|
126
|
+
build_context(url="memory://found-note-permalink", depth=2)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Then present the full picture — the note plus its connected context.
|
|
130
|
+
|
|
131
|
+
## Project Discovery
|
|
132
|
+
|
|
133
|
+
Project names are user-specific. To discover what's available before scoping a search or `memory://` URL:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
list_memory_projects()
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
In multi-project setups, prefix a `memory://` URL with the project name (e.g. `memory://research/papers/crdt`) to scope it.
|
|
140
|
+
|
|
141
|
+
## Guidelines
|
|
142
|
+
|
|
143
|
+
1. **Start broad, then narrow.** Get an overview with `recent_activity` or a wildcard `build_context`, then drill into specific notes.
|
|
144
|
+
2. **Present incrementally.** Share what you find as you go rather than holding everything until the end.
|
|
145
|
+
3. **Follow relations.** The graph's connections are the point — `build_context` with `depth` surfaces context you wouldn't find by reading one note.
|
|
146
|
+
4. **Check multiple projects.** Specs may live separately from implementation notes; discover projects with `list_memory_projects`.
|
|
147
|
+
5. **Confirm understanding.** Verify the reconstructed context is what the user actually needs before acting on it.
|
|
148
|
+
6. **Capture new progress.** As the resumed work advances, write it back to the graph (see the **memory-notes** skill) so the next session can continue too.
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-curate
|
|
3
|
+
description: "Curate the Basic Memory knowledge graph: find orphan notes and suggest links, propose typed relations, merge duplicates, audit tags and folders, and build hub notes. Use to organize, connect, and improve a knowledge base as notes accumulate."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory Curate
|
|
7
|
+
|
|
8
|
+
Maintain a healthy, well-connected knowledge graph. As notes accumulate, it pays to periodically organize, link, and curate the knowledge base so isolated notes become a connected graph.
|
|
9
|
+
|
|
10
|
+
This skill curates the **knowledge graph** — the notes, relations, and tags that make up the knowledge base. (For hygiene on an agent's own memory *files* — splitting bloated files, pruning stale entries — see **memory-defrag**.)
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Asked to organize, clean up, or improve the knowledge base
|
|
15
|
+
- Asked to find connections between notes, or what isn't linked yet
|
|
16
|
+
- Orphan or unlinked notes are mentioned
|
|
17
|
+
- Asked about duplicate or similar notes
|
|
18
|
+
- Asked for help with folder organization or tag consistency
|
|
19
|
+
- Phrases like "help me organize", "find related notes", "what's not linked", "clean up my notes"
|
|
20
|
+
|
|
21
|
+
## Curation Capabilities
|
|
22
|
+
|
|
23
|
+
### 1. Find Orphan Notes
|
|
24
|
+
|
|
25
|
+
Orphans have no relations to other notes — they're islands in the graph.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
# List notes, then read each to inspect its Relations section
|
|
29
|
+
search_notes(query="*", page_size=50)
|
|
30
|
+
read_note(identifier="note-to-check")
|
|
31
|
+
# Orphans have an empty (or missing) Relations section
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**What to do with orphans:**
|
|
35
|
+
- Suggest relations based on content similarity
|
|
36
|
+
- Ask whether they should connect to existing topics
|
|
37
|
+
- Propose hub notes to gather related orphans (see capability 6)
|
|
38
|
+
|
|
39
|
+
### 2. Suggest Typed Relations
|
|
40
|
+
|
|
41
|
+
Analyze a note's content and propose meaningful connections.
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
read_note(identifier="note-to-analyze")
|
|
45
|
+
# Pull out key terms, then search for related notes
|
|
46
|
+
search_notes(query="key terms from the note")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Suggest relations based on shared topics, complementary content (problem/solution,
|
|
50
|
+
question/answer), sequence (part 1 → part 2), or hierarchy (parent concept → detail).
|
|
51
|
+
|
|
52
|
+
**Relation-type vocabulary:**
|
|
53
|
+
- `relates_to` — general topical connection
|
|
54
|
+
- `extends` — builds upon or elaborates
|
|
55
|
+
- `implements` — realizes a concept or spec
|
|
56
|
+
- `depends_on` — requires understanding of
|
|
57
|
+
- `part_of` — hierarchy or composition
|
|
58
|
+
- `contrasts_with` — presents an alternative view
|
|
59
|
+
- `inspired_by` — source of insight
|
|
60
|
+
- `enables` — makes something possible
|
|
61
|
+
|
|
62
|
+
Custom relation types are fine — use whatever verb is descriptive.
|
|
63
|
+
|
|
64
|
+
Add a confirmed relation with `edit_note`:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
edit_note(
|
|
68
|
+
identifier="API Design Decisions",
|
|
69
|
+
operation="append",
|
|
70
|
+
section="Relations",
|
|
71
|
+
content="- depends_on [[Rate Limiter]]",
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Identify Similar / Duplicate Notes
|
|
76
|
+
|
|
77
|
+
Find notes that may cover the same ground.
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
search_notes(query="topic keywords")
|
|
81
|
+
# Compare results for: similar titles, overlapping observations,
|
|
82
|
+
# shared tags, close-together timestamps
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Actions for duplicates:**
|
|
86
|
+
- **Merge** into a single comprehensive note, then redirect the loser with a relation
|
|
87
|
+
- Link with `supersedes` / `updates` when one revises the other
|
|
88
|
+
- **Differentiate** by adding context that clarifies each note's distinct focus
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
# Point an older note at the one that replaces it
|
|
92
|
+
edit_note(
|
|
93
|
+
identifier="DB Schema v1",
|
|
94
|
+
operation="append",
|
|
95
|
+
section="Relations",
|
|
96
|
+
content="- updates [[DB Schema v2]]",
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. Folder Organization Review
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
list_directory(dir_name="/", depth=3)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Look for overcrowded folders, single-note folders, inconsistent naming, and notes
|
|
107
|
+
that belong elsewhere. Suggest grouping related notes into topic folders, adding
|
|
108
|
+
subfolders for large categories, and a consistent naming convention. Move misplaced
|
|
109
|
+
notes with `move_note` — the permalink stays stable, so wiki-links keep resolving.
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
move_note(
|
|
113
|
+
identifier="API Design Decisions",
|
|
114
|
+
destination_path="architecture/api-design-decisions.md",
|
|
115
|
+
)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 5. Tag Consistency
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
search_notes(query="*", page_size=100)
|
|
122
|
+
# Inspect tag patterns across results
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Look for:
|
|
126
|
+
- **Variant tags** — `architecture` vs `arch`; pick one and standardize
|
|
127
|
+
- **Unused tags** — present on a single note, no longer carrying weight
|
|
128
|
+
- **Over-used generic tags** — so broad they don't aid discovery
|
|
129
|
+
- **Missing tags** — relevant notes lacking an obvious tag
|
|
130
|
+
|
|
131
|
+
### 6. Create Index / Hub Notes
|
|
132
|
+
|
|
133
|
+
After finding a cluster of related notes, build a navigation hub.
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
write_note(
|
|
137
|
+
title="Architecture Decisions Index",
|
|
138
|
+
directory="indexes",
|
|
139
|
+
tags=["architecture", "index"],
|
|
140
|
+
note_type="index",
|
|
141
|
+
content="""# Architecture Decisions Index
|
|
142
|
+
|
|
143
|
+
A hub linking architecture-related decisions and patterns.
|
|
144
|
+
|
|
145
|
+
## Decisions
|
|
146
|
+
- [[Database Selection Decision]]
|
|
147
|
+
- [[API Design Patterns]]
|
|
148
|
+
- [[Authentication Architecture]]
|
|
149
|
+
|
|
150
|
+
## Patterns
|
|
151
|
+
- [[Repository Pattern]]
|
|
152
|
+
- [[Async Client Pattern]]
|
|
153
|
+
|
|
154
|
+
## Observations
|
|
155
|
+
- [index] Central hub for architecture knowledge #navigation
|
|
156
|
+
|
|
157
|
+
## Relations
|
|
158
|
+
- indexes [[Architecture]]""",
|
|
159
|
+
)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 7. Enrich Sparse Notes
|
|
163
|
+
|
|
164
|
+
Find notes lacking structure and fill them in.
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
read_note(identifier="sparse-note")
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
If the note is missing an Observations section, suggest categories. If it has no
|
|
171
|
+
Relations, suggest links. If it has no tags, suggest relevant ones. If it lacks
|
|
172
|
+
context, suggest adding background. Apply with `edit_note`.
|
|
173
|
+
|
|
174
|
+
## Curation Workflows
|
|
175
|
+
|
|
176
|
+
### Quick Health Check
|
|
177
|
+
|
|
178
|
+
A fast overview of knowledge base status:
|
|
179
|
+
|
|
180
|
+
1. Count total notes
|
|
181
|
+
2. Identify orphan count
|
|
182
|
+
3. List recently modified (`recent_activity`)
|
|
183
|
+
4. Check for obvious duplicates
|
|
184
|
+
5. Report folder distribution
|
|
185
|
+
|
|
186
|
+
### Deep Organization Session
|
|
187
|
+
|
|
188
|
+
Thorough review and improvement:
|
|
189
|
+
|
|
190
|
+
1. **Audit** — catalog all notes, identify issues
|
|
191
|
+
2. **Orphans** — address unlinked notes
|
|
192
|
+
3. **Relations** — suggest new connections
|
|
193
|
+
4. **Duplicates** — merge or differentiate similar notes
|
|
194
|
+
5. **Structure** — reorganize folders if needed
|
|
195
|
+
6. **Index** — create hub notes for major topics
|
|
196
|
+
|
|
197
|
+
### Topic-Focused Organization
|
|
198
|
+
|
|
199
|
+
Organize around a specific subject:
|
|
200
|
+
|
|
201
|
+
1. Find all notes related to the topic (`search_notes`)
|
|
202
|
+
2. Map existing relations with `build_context(url="memory://...")`
|
|
203
|
+
3. Identify gaps in the topic graph
|
|
204
|
+
4. Suggest new notes to fill them
|
|
205
|
+
5. Create a topic index note
|
|
206
|
+
|
|
207
|
+
## Best Practices
|
|
208
|
+
|
|
209
|
+
1. **Work incrementally.** Don't reorganize everything at once.
|
|
210
|
+
2. **Confirm before changing.** Always ask before moving, merging, or editing notes.
|
|
211
|
+
3. **Preserve permalinks.** Moving a note is fine; changing its permalink breaks inbound links.
|
|
212
|
+
4. **Explain suggestions.** Say *why* a relation or merge makes sense.
|
|
213
|
+
5. **Respect the existing system.** Enhance the user's organization — don't impose a new taxonomy.
|
|
214
|
+
6. **Show the graph.** Use `build_context` to help the user see how notes connect.
|
|
215
|
+
|
|
216
|
+
## Example Conversations
|
|
217
|
+
|
|
218
|
+
**User:** "Help me organize my notes"
|
|
219
|
+
|
|
220
|
+
The assistant:
|
|
221
|
+
1. Runs a health check on the knowledge base
|
|
222
|
+
2. Reports: "You have 47 notes. I found 12 orphans and 3 potential duplicates."
|
|
223
|
+
3. Asks: "Want to start by connecting the orphans, or review the duplicates first?"
|
|
224
|
+
|
|
225
|
+
**User:** "Find notes that should link to my API design note"
|
|
226
|
+
|
|
227
|
+
The assistant:
|
|
228
|
+
1. Reads the API design note
|
|
229
|
+
2. Searches for related content
|
|
230
|
+
3. Suggests: "5 notes could relate —
|
|
231
|
+
- 'REST Best Practices' → `relates_to`
|
|
232
|
+
- 'Authentication Flow' → `implements`
|
|
233
|
+
- 'Rate Limiting Decision' → `extends`
|
|
234
|
+
Should I add any of these relations?"
|
|
235
|
+
|
|
236
|
+
**User:** "Are there notes on similar topics?"
|
|
237
|
+
|
|
238
|
+
The assistant:
|
|
239
|
+
1. Analyzes titles and content for clusters
|
|
240
|
+
2. Reports: "Possible overlaps —
|
|
241
|
+
- 'Auth Flow' and 'Authentication Design' cover similar ground
|
|
242
|
+
- 'DB Schema v1' and 'DB Schema v2' likely want a `supersedes` relation
|
|
243
|
+
Want to review either?"
|
|
@@ -23,7 +23,7 @@ Phase 1: Seed → stub notes for known major entities
|
|
|
23
23
|
Phase 2: Process → chapter-by-chapter notes in batches
|
|
24
24
|
Phase 3: Cross-ref → enrich arcs, add parallels, write analysis
|
|
25
25
|
Phase 4: Validate → schema checks, drift detection, consistency
|
|
26
|
-
Phase 5: Visualize → canvas files for character webs, timelines
|
|
26
|
+
Phase 5: Visualize → Obsidian canvas files for character webs, timelines
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Phase 0: Setup
|
|
@@ -451,19 +451,22 @@ Spot-check bidirectional relations: if Chapter X `features [[Character]]`, does
|
|
|
451
451
|
|
|
452
452
|
## Phase 5: Visualization
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
454
|
+
Write [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) into the project directory for visual exploration in Obsidian. Query the graph first (`search_notes`, `build_context`), then lay out the results as canvas nodes and edges:
|
|
455
|
+
|
|
456
|
+
```json
|
|
457
|
+
{
|
|
458
|
+
"nodes": [
|
|
459
|
+
{"id": "ahab", "type": "file", "file": "characters/captain-ahab.md", "x": 0, "y": 0, "width": 400, "height": 300},
|
|
460
|
+
{"id": "ishmael", "type": "file", "file": "characters/ishmael.md", "x": 500, "y": 0, "width": 400, "height": 300}
|
|
461
|
+
],
|
|
462
|
+
"edges": [
|
|
463
|
+
{"id": "e1", "fromNode": "ishmael", "toNode": "ahab", "label": "narrates"}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
465
466
|
```
|
|
466
467
|
|
|
468
|
+
Useful canvases: character relationship web (protagonist/antagonist/supporting), theme connections, chapter timeline with key events.
|
|
469
|
+
|
|
467
470
|
## Adapting to Other Genres
|
|
468
471
|
|
|
469
472
|
This pipeline works for any literary text. Adjust schemas for genre:
|
|
@@ -276,26 +276,42 @@ Basic Memory auto-generates frontmatter (including the permalink and memory URL)
|
|
|
276
276
|
|
|
277
277
|
### Editing an Existing Note
|
|
278
278
|
|
|
279
|
-
Use `edit_note` to
|
|
279
|
+
Use `edit_note` to update a note in place — four operations:
|
|
280
280
|
|
|
281
281
|
```python
|
|
282
|
-
#
|
|
282
|
+
# append / prepend — add to the end or start (use for time-ordered logs)
|
|
283
283
|
edit_note(
|
|
284
284
|
identifier="API Design Decisions",
|
|
285
285
|
operation="append",
|
|
286
286
|
section="Observations",
|
|
287
287
|
content="- [decision] Use OpenAPI 3.1 for spec generation #api"
|
|
288
288
|
)
|
|
289
|
+
edit_note(
|
|
290
|
+
identifier="API Design Decisions",
|
|
291
|
+
operation="prepend",
|
|
292
|
+
content="> Updated 2026-05-28: auth approach finalized.\n"
|
|
293
|
+
)
|
|
289
294
|
|
|
290
|
-
#
|
|
295
|
+
# replace_section — rewrite a named section (use for living content that stays current)
|
|
291
296
|
edit_note(
|
|
292
297
|
identifier="API Design Decisions",
|
|
293
|
-
operation="
|
|
294
|
-
section="
|
|
295
|
-
content="
|
|
298
|
+
operation="replace_section",
|
|
299
|
+
section="Summary",
|
|
300
|
+
content="Concise, current summary of the decision and its rationale."
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
# find_replace — swap specific text
|
|
304
|
+
edit_note(
|
|
305
|
+
identifier="API Design Decisions",
|
|
306
|
+
operation="find_replace",
|
|
307
|
+
find_text="OpenAPI 3.0",
|
|
308
|
+
content="OpenAPI 3.1"
|
|
296
309
|
)
|
|
297
310
|
```
|
|
298
311
|
|
|
312
|
+
When an edit is destructive (`replace_section`, `find_replace`), it's good practice to
|
|
313
|
+
read the note first and confirm the change before applying it.
|
|
314
|
+
|
|
299
315
|
### Moving a Note
|
|
300
316
|
|
|
301
317
|
Use `move_note` to reorganize notes into different directories:
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-onboarding
|
|
3
|
+
description: "Guide someone new to Basic Memory through designing and building a complete personal knowledge system — interview them about what they want to track, propose a structure, build it with schemas and instruction notes, teach them to use it, and set up their AI assistant to load it automatically. Use this skill whenever a user says they're new to Basic Memory, wants to 'get started', 'set up', or 'onboard' with Basic Memory, doesn't know what to use it for, asks how to organize their memory project or knowledge base, wants help designing folders/schemas/conventions, or asks how to make their assistant remember context between sessions. Also use it when a user has an empty or messy Basic Memory project and wants structure."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Basic Memory Onboarding
|
|
7
|
+
|
|
8
|
+
You are guiding a person who is new to Basic Memory through building a knowledge system that fits *their* life — then teaching them to use it and wiring it into their AI assistant so every future session starts already knowing the rules.
|
|
9
|
+
|
|
10
|
+
This skill works with any LLM or assistant platform. Where platform-specific setup is needed (system prompts, project instructions), identify what YOUR environment supports and adapt the generic patterns in `references/assistant-setup.md`.
|
|
11
|
+
|
|
12
|
+
## Why this approach
|
|
13
|
+
|
|
14
|
+
Basic Memory is markdown files parsed into a knowledge graph. A pile of unstructured notes is barely better than a folder of text files. The compounding value comes from four things this skill installs from day one:
|
|
15
|
+
|
|
16
|
+
1. **Schemas** — note types with defined fields, so every task/contact/expense note looks the same and can be queried structurally.
|
|
17
|
+
2. **Observations and relations** — categorized facts (`- [status] active`) and typed links (`- depends_on [[Other Note]]`) that turn prose into a graph.
|
|
18
|
+
3. **Instruction notes** — the rules of the system live *inside* the system, as notes the assistant loads at session start. The knowledge base becomes self-describing.
|
|
19
|
+
4. **A startup router** — one small note that tells any assistant, on any platform, exactly what to load for each kind of task.
|
|
20
|
+
|
|
21
|
+
**Two of these are never optional, at any scale:** every note type in the blueprint gets a schema, and every note written carries an Observations section with at least one `[category]` fact. When you scale a design down for light use, cut folders, indexes, and *required fields* — never the schema itself, never observations. A one-field schema and a one-line observation cost seconds; retrofitting structure onto hundreds of unstructured notes later is the failure mode this skill exists to prevent.
|
|
22
|
+
|
|
23
|
+
## Speak Plainly — the User Doesn't Know the Jargon
|
|
24
|
+
|
|
25
|
+
The person you're onboarding has likely never heard the words "schema", "observation", "frontmatter", or "knowledge graph" — and they never need to learn them to benefit from any of them. The structure is for you; the conversation is for them.
|
|
26
|
+
|
|
27
|
+
- Introduce each concept in plain words at the moment it becomes relevant: a schema is "a template that keeps every note of the same kind consistent, so I can reliably answer things like 'what's overdue?'"; observations are "the key facts on a note, tagged so they're easy to find later"; relations are "links between notes, so one thing leads to the next".
|
|
28
|
+
- **The user never writes syntax.** You handle the `[category]` lines, wiki-links, and validation under the covers — they just talk. Say this explicitly; it's reassuring.
|
|
29
|
+
- One concept at a time, and only when it earns its place. If you catch yourself defining three terms in one breath, stop explaining and build something with their data instead — the example teaches better than the definition.
|
|
30
|
+
|
|
31
|
+
## Workflow overview
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Phase 0 Preflight — verify tools, pick/create project, assess existing content
|
|
35
|
+
Phase 1 Interview — what do they want to track? (suggest if they don't know)
|
|
36
|
+
Phase 2 Blueprint — propose full structure; iterate until approved
|
|
37
|
+
Phase 3 Build — schemas → templates → instruction notes → indexes → seed notes
|
|
38
|
+
Phase 4 Assistant setup — persistent instructions that load the router every session
|
|
39
|
+
Phase 5 Teach — hands-on exercises with their real data
|
|
40
|
+
Phase 6 Grow — suggest expansions and a maintenance cadence
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Do not skip the approval gate between Phase 2 and Phase 3. Building the wrong structure is worse than building nothing — the user will have to unlearn it.
|
|
44
|
+
|
|
45
|
+
## Phase 0 — Preflight
|
|
46
|
+
|
|
47
|
+
Before asking the user anything:
|
|
48
|
+
|
|
49
|
+
1. Confirm Basic Memory tools are available (`write_note`, `read_note`, `search_notes`, `list_directory`, and ideally `schema_infer`/`schema_validate`). If they aren't, stop and help the user connect Basic Memory first.
|
|
50
|
+
2. List their projects (`list_memory_projects`). Ask which project to build in, or whether to create a fresh one. **Every subsequent call must pass this project explicitly** — mixed-project writes are one of the most common and painful setup errors.
|
|
51
|
+
3. Check for existing content (`list_directory` at root, depth 2). Three situations:
|
|
52
|
+
- **Empty** — greenfield, proceed normally.
|
|
53
|
+
- **A few scattered notes** — proceed, and plan to fold existing notes into the new structure during Phase 3.
|
|
54
|
+
- **Substantial existing content** — this is a restructure, not an onboarding. Still use this skill, but Phase 1 becomes "what's working and what isn't", and Phase 2 must map old → new locations before anything moves.
|
|
55
|
+
4. **Check the live docs when unsure.** Basic Memory's documentation is agent-readable: fetch `https://docs.basicmemory.com/llms.txt` for an index, and any page as clean markdown via its `raw/....md` URL (e.g. `raw/reference/mcp-tools-reference.md`, `raw/concepts/schema-system.md`). Tool names and parameters evolve — when this skill and the docs disagree, the docs are canonical.
|
|
56
|
+
|
|
57
|
+
## Phase 1 — Interview
|
|
58
|
+
|
|
59
|
+
Ask **one question at a time**, conversationally. Never present a wall of questions. What you need to learn:
|
|
60
|
+
|
|
61
|
+
1. **Domains** — what do they want to keep track of? If they have ideas, dig into each: what specifically, how often, what does "done" look like?
|
|
62
|
+
2. **If they have no idea**, offer a concrete menu and ask what resonates (multi-select). Good starting domains, roughly in order of broad appeal:
|
|
63
|
+
- **Tasks & projects** — todos, deadlines, multi-step projects
|
|
64
|
+
- **Notes & journal** — daily notes, ideas, things learned
|
|
65
|
+
- **People & contacts** — who they know, context per person, follow-ups
|
|
66
|
+
- **Research** — topics they're digging into, sources, findings
|
|
67
|
+
- **Finances** — subscriptions, expenses, accounts, renewals
|
|
68
|
+
- **Procedures** — how-tos they keep re-figuring-out (home, work, tech)
|
|
69
|
+
- **Health & habits** — workouts, symptoms, routines
|
|
70
|
+
- **Assets** — home inventory, devices, warranties, serial numbers
|
|
71
|
+
For each domain they pick, `references/domain-playbooks.md` has a starter kit: folders, a schema, naming conventions, and an example note. Read it before proposing the blueprint.
|
|
72
|
+
3. **Volume and cadence** — a system for 5 notes a week looks different from one for 50. Light use → fewer folders, fewer required fields.
|
|
73
|
+
4. **One real example per domain** — "tell me about a task on your plate right now" / "one subscription you pay for". These become the seed notes in Phase 3 and make every later phase concrete instead of hypothetical.
|
|
74
|
+
5. **What they've tried before** — if a previous system failed, find out why. Design against that failure.
|
|
75
|
+
|
|
76
|
+
Start with 2–3 domains even if they're excited about six. A small system that works grows; a sprawling empty scaffold dies. Note the deferred domains for Phase 6.
|
|
77
|
+
|
|
78
|
+
## Phase 2 — Blueprint
|
|
79
|
+
|
|
80
|
+
Read `references/conventions.md` and `references/schema-guide.md` now if you haven't. Then present ONE document (in chat, not yet written anywhere) containing:
|
|
81
|
+
|
|
82
|
+
1. **Folder tree** — the full proposed directory structure with one-line purpose per folder. Include `Schemas/`, `Templates/`, and an `Instructions/` (or `Meta/`) folder alongside the domain folders.
|
|
83
|
+
2. **Schemas table** — one row per note type: schema name, note_type, required observations, optional observations, status enum values.
|
|
84
|
+
3. **Naming conventions** — title format per note type, date formats, status vocabularies.
|
|
85
|
+
4. **Instruction notes** — the startup router plus one instruction note per domain (see `references/conventions.md` for anatomy).
|
|
86
|
+
5. **The discipline rules** they'll live by — search before create, exact-casing paths, changelog rows, index updates, bidirectional links — each with a one-line "why".
|
|
87
|
+
|
|
88
|
+
Walk through it, invite pushback, and iterate. Scale to their answers — but scaling means fewer folders, fewer indexes, and fewer *required* fields, never dropping schemas or observations (see the non-negotiables above). Get an explicit "yes, build it" before Phase 3.
|
|
89
|
+
|
|
90
|
+
## Phase 3 — Build
|
|
91
|
+
|
|
92
|
+
Build in this order — later items reference earlier ones:
|
|
93
|
+
|
|
94
|
+
1. **Schemas** → `Schemas/` folder, one note per type, `validation: warn`. Syntax in `references/schema-guide.md`.
|
|
95
|
+
2. **Templates** → `Templates/`, one per note type, matching the schema exactly.
|
|
96
|
+
3. **Instruction notes** → per-domain rules notes, then the **startup router** last (it links everything). Full anatomy and a worked example in `references/conventions.md`.
|
|
97
|
+
4. **Index notes** → one per domain that needs one (tables of contents; not every domain does).
|
|
98
|
+
5. **Migrate existing notes** *(restructure path)* → execute the approved old→new mapping from Phase 2 before seeding anything: move each existing note to its new home, set its note type, add the observations its schema requires, and update indexes as notes land. Archive what doesn't fit — never delete. Phase 3 is not done while anything still sits unorganized at the root.
|
|
99
|
+
6. **Seed notes** → 2–3 REAL notes per domain using the examples collected in Phase 1. Never seed with placeholder data — real notes teach the format and are immediately useful; fake ones are noise the user must delete.
|
|
100
|
+
7. **Validate** → run `schema_validate` on the seed notes AND any migrated notes; fix anything it flags. Read back the router and one instruction note to confirm links resolve.
|
|
101
|
+
|
|
102
|
+
Follow the write discipline in `references/conventions.md` throughout — most importantly: search before creating anything, use exact folder casing, and watch write results for duplicate-suffixed permalinks (`-1`, `-2`).
|
|
103
|
+
|
|
104
|
+
## Phase 4 — Assistant setup
|
|
105
|
+
|
|
106
|
+
The system only works if the assistant loads the rules every session — otherwise the user is the only one who knows the conventions, which defeats the point.
|
|
107
|
+
|
|
108
|
+
Read `references/assistant-setup.md` and set up (or hand the user exact text for) a **persistent instruction stub**: a short block in whatever always-loaded mechanism their platform provides (project instructions, custom instructions, system prompt, agent context file) that says, in essence: *"Before any knowledge-base work, read the startup router note in project X and follow its dispatch table."*
|
|
109
|
+
|
|
110
|
+
Identify what mechanism YOUR platform offers and give concrete, platform-specific steps. If you cannot determine the platform, present the generic stub and the common placements from the reference file. End Phase 4 with the verification test described there (simulate a fresh session; confirm the router gets loaded and followed).
|
|
111
|
+
|
|
112
|
+
## Phase 5 — Teach
|
|
113
|
+
|
|
114
|
+
Teach by doing, with their data — not by lecturing. Run short exercises:
|
|
115
|
+
|
|
116
|
+
1. **Capture** — "Tell me something that came up today" → create the note together, narrating the schema fields and observations as you fill them.
|
|
117
|
+
2. **Retrieve** — have them ask for something ("what's on my plate?", "what do I know about X?") → demonstrate `search_notes` and reading via `memory://` links; explain title-search vs semantic search for names.
|
|
118
|
+
3. **Update** — change a status, append an observation, add a changelog row — showing `edit_note` for targeted changes vs full overwrites.
|
|
119
|
+
4. **Connect** — add a relation between two of their notes; show how `build_context` walks the graph.
|
|
120
|
+
|
|
121
|
+
Then write a **cheat-sheet note** into their KB (`Instructions/` folder): the phrases they can say, what happens for each, and the core rules. This note is theirs — written for a human, not an assistant.
|
|
122
|
+
|
|
123
|
+
## Phase 6 — Grow
|
|
124
|
+
|
|
125
|
+
Close the onboarding by opening doors:
|
|
126
|
+
|
|
127
|
+
- **Suggest 2–3 specific expansions** drawn from their deferred Phase 1 domains or natural neighbors of what they built (built tasks → suggest meetings; built finances → suggest renewals calendar; built research → suggest a reading log). Frame each as "when you're ready" — never build unrequested.
|
|
128
|
+
- **Maintenance cadence** — suggest a periodic (weekly/monthly) review: `schema_diff` for drift, scan for duplicate or orphaned notes, prune stale statuses. If their platform supports scheduled/recurring tasks, offer to set this up.
|
|
129
|
+
- **Evolution rule** — when a convention starts to chafe, change the instruction note (with a changelog row), don't silently deviate. The system stays self-describing only if the rules in it stay true.
|
|
130
|
+
|
|
131
|
+
## Reference files
|
|
132
|
+
|
|
133
|
+
| File | Read when |
|
|
134
|
+
|:--|:--|
|
|
135
|
+
| `references/conventions.md` | Before Phase 2. Startup router anatomy, instruction notes, changelogs, indexes, linking, write discipline, failure modes. |
|
|
136
|
+
| `references/schema-guide.md` | Before Phase 2. Picoschema syntax, observations, relations, validation workflow. |
|
|
137
|
+
| `references/domain-playbooks.md` | Phase 1–2, for each domain the user picks. Starter folders, schemas, naming, example notes per domain. |
|
|
138
|
+
| `references/assistant-setup.md` | Phase 4. Persistent-instruction stub patterns per platform + verification test. |
|
|
139
|
+
|
|
140
|
+
## Related Skills
|
|
141
|
+
|
|
142
|
+
When companion skills are installed alongside this one, hand off instead of duplicating: **memory-notes** and **memory-schema** for note-writing and schema mechanics, **memory-tasks** for agent-side task tracking, **memory-lifecycle** for archival on the restructure path, **memory-defrag** / **memory-curate** / **memory-reflect** for the Phase 6 maintenance cadence, and **memory-continue** for resuming work from the graph — a natural first thing to teach after onboarding.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "memory-onboarding",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 0,
|
|
6
|
+
"eval_name": "no-idea-newbie",
|
|
7
|
+
"prompt": "I just connected Basic Memory to my assistant but honestly I have no idea what to actually use it for. People talk about 'second brains' but I don't know where to start. Can you help me get set up with something useful?",
|
|
8
|
+
"persona": "Sam, marketing coordinator. When offered suggestions, is drawn to: tasks (loses track of follow-ups) and subscriptions (pays for services they forgot about). Light volume — maybe 5-10 notes a week. Real examples when asked: task 'send the Q3 sponsorship deck to Rivera Media by Friday'; subscriptions: Netflix $15.49/mo, Adobe CC $59.99/mo renews annually in March, a gym membership $40/mo they keep meaning to cancel. Uses a chat assistant that supports projects with custom instructions. Never tried a note system before.",
|
|
9
|
+
"expected_output": "Interview → blueprint scaled small (2 domains) → built KB with Task + Subscription schemas, Task Board and Subscriptions Index, instruction notes + startup router, seed notes using Sam's real examples, assistant stub for project instructions, cheat-sheet.",
|
|
10
|
+
"files": []
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": 1,
|
|
14
|
+
"eval_name": "freelance-photographer",
|
|
15
|
+
"prompt": "I want to use Basic Memory to run my freelance photography business — keeping track of my clients, upcoming shoots, what I've invoiced, and all my camera gear. Set me up with a good structure that my AI assistant can work with consistently.",
|
|
16
|
+
"persona": "Priya, wedding/portrait photographer. ~3 shoots a month. Clients: couples and a few corporate accounts. Wants per-client history. Invoices tracked simply: date, client, amount, paid/unpaid (accounting itself stays in her accounting software). Gear: 2 bodies (Canon R5 serial 0482xx, R6), 6 lenses, lighting kit — wants serials and purchase dates for insurance. Real examples: upcoming shoot 'Chen-Okafor wedding Sept 12 at Maple Grove Estate, second shooter booked'; unpaid invoice 'Hartley corporate headshots $850 sent July 2'. Uses a desktop AI app with per-project custom instructions.",
|
|
17
|
+
"expected_output": "Blueprint with Clients/People, Shoots (project-like), Invoices (finance playbook adapted: no secrets, amounts from user only), Gear (assets playbook: serials, insurance index), schemas + router + instruction notes, seeds from her real examples, stub for project instructions, bidirectional client↔shoot links.",
|
|
18
|
+
"files": []
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": 2,
|
|
22
|
+
"eval_name": "messy-restructure",
|
|
23
|
+
"prompt": "My Basic Memory project is a mess — like 30 random notes dumped in the root folder, no organization, half of them are ideas for my blog and the rest are random todos. I want an actual system: task tracking, and proper research organization for my blog posts. And I want my assistant to actually follow the same rules every session instead of doing something different each time.",
|
|
24
|
+
"persona": "Jordan, writes a woodworking blog. Existing project 'main' has ~30 root-level notes with inconsistent naming (some lowercase, some dated, e.g. 'bandsaw jig idea', '2026-05-02 misc', 'todo dump', 'japanese joinery links'). Wants: tasks, and blog research (topic → sources → draft outline). Blog posts monthly. Real examples: active research topic 'hand-cut dovetails vs router jigs' with 4 saved links; task 'edit the shop-tour video by end of July'. Uses a CLI assistant that auto-loads a context file from the home directory.",
|
|
25
|
+
"expected_output": "Restructure path: assess existing notes, propose old→new mapping BEFORE moving, build tasks + research structure (topic hubs), schemas + router with known-failure-modes seeded from their actual mess (casing, duplicates), stub written for an agent context file, verification test described.",
|
|
26
|
+
"files": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|