You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add behavior changes section and expand AI assistant guide
v0.19.0 What's New:
- Replace scattered "Configuration Changes" table and "Upgrade Notes" with
consolidated "Behavior Changes" section
- Each change has before/after tables and restore instructions
- Covers: write_note overwrite guard, semantic search default, frontmatter on
sync, project-prefixed permalinks, build_context JSON default, hybrid scoring,
search_by_metadata removal, config format migration
AI Assistant Guide:
- Rename "Entity types" → "Note types" for frontmatter type field
- Expand search section with separate subsections for note type, date, tag, and
frontmatter metadata filtering with filter operators table
- Expand schema section with schema format example, tool descriptions
(schema_infer, schema_validate, schema_diff), and discovery/evolution workflow
- Add "Note Already Exists" error handling for overwrite guard
- Note build_context JSON default and semantic search enabled by default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@@ -13,7 +13,7 @@ Knowledge bases grow organically, and over time note structure drifts — some `
13
13
14
14
The workflow is conversational — just ask your AI assistant:
15
15
16
-
```
16
+
```yml
17
17
You: "I've been writing a lot of person notes. Can you figure out
18
18
what they have in common and create a schema?"
19
19
@@ -56,12 +56,12 @@ See the full [Schema System](/concepts/schema-system) guide for syntax, resoluti
56
56
57
57
## Semantic Search
58
58
59
-
When semantic dependencies are installed, Basic Memory automatically uses hybrid search — combining keyword matching with meaning-based retrieval. Search for "login security improvements" and find notes about "authentication hardening" even though the exact words don't match.
59
+
Basic Memory now includes semantic search by default — hybrid search combines keyword matching with meaning-based retrieval out of the box. Search for "login security improvements" and find notes about "authentication hardening" even though the exact words don't match.
60
60
61
61
Three search modes are available:
62
62
63
-
-**`hybrid`** (default when semantic deps installed) — Combines keyword and semantic search with rank fusion
64
-
-**`text`** — Keyword-only search (the fallback without semantic deps)
63
+
-**`hybrid`** (default) — Combines keyword and semantic search with score-based fusion
64
+
-**`text`** — Keyword-only search
65
65
-**`vector`** — Pure semantic similarity search
66
66
67
67
```python
@@ -75,14 +75,9 @@ search_notes(query="how to speed up the app", search_type="vector")
Semantic dependencies are included in Homebrew installs. For uv, install with extras:
78
+
Semantic search is included in all standard installs (Homebrew and uv). On first startup, Basic Memory automatically generates embeddings for existing notes.
79
79
80
-
```bash
81
-
uv tool install 'basic-memory[semantic]'
82
-
bm reindex --embeddings
83
-
```
84
-
85
-
Vector and hybrid search return observation-level results — individual facts and relations, not just whole notes — so you find the specific piece of information you need.
80
+
Search results default to entity-level — whole notes ranked by relevance, with matched chunk text showing which part was most relevant. Use the `entity_types` parameter to get observation-level results when needed.
86
81
87
82
See the full [Semantic Search](/concepts/semantic-search) guide for configuration, embedding providers, and how it works under the hood.
88
83
@@ -94,8 +89,8 @@ You can now route individual projects through cloud while keeping others local.
94
89
95
90
```bash
96
91
# Save or create a cloud API key
97
-
bm cloud set-key bmc_...
98
-
bm cloud create-key "my-laptop"
92
+
bm cloud api-key save bmc_...
93
+
bm cloud api-key create"my-laptop"
99
94
100
95
# Route a specific project through cloud
101
96
bm project set-cloud research
@@ -124,13 +119,52 @@ This makes cross-project references unambiguous. Within notes, the `project::not
124
119
125
120
---
126
121
127
-
## Output Format Improvements
122
+
## Unified Metadata Search
123
+
124
+
`search_by_metadata` has been merged into `search_notes` — one tool for all searches. The `query` parameter is now optional, so you can search purely by frontmatter metadata.
Search by tag using convenient shorthand syntax instead of structured filters:
139
+
140
+
```python
141
+
search_notes("tag:security")
142
+
search_notes("tag:coffee AND tag:brewing")
143
+
```
144
+
145
+
---
146
+
147
+
## `write_note` Overwrite Guard
148
+
149
+
`write_note` is now non-idempotent by default. If a note already exists at the target path, the tool returns an error instead of silently overwriting. This prevents accidental data loss.
150
+
151
+
- Pass `overwrite=True` to explicitly replace an existing note
152
+
- Use `edit_note` for incremental updates to existing notes
153
+
- Set `write_note_overwrite_default: true` in config to restore the old upsert behavior
154
+
155
+
---
156
+
157
+
## JSON Output Mode
158
+
159
+
All MCP tools now support `output_format="json"` for machine-readable responses. The default remains `"text"` for human-readable output — no breaking changes for existing usage.
160
+
161
+
`build_context` defaults to `"json"` with slimmed payloads (redundant fields stripped).
128
162
129
-
`search_notes` and `read_note` now support an `output_format` parameter:
163
+
CLI tool commands support `--format json`:
130
164
131
-
-**`default`** — Structured data (for programmatic use)
132
-
-**`ascii`** — Plain text table (for terminal display)
@@ -153,40 +187,171 @@ The `note_type` sets the `type` frontmatter field (used for schema resolution an
153
187
154
188
---
155
189
156
-
## `bm watch` Command
190
+
## Score-Based Hybrid Fusion
157
191
158
-
A new standalone watch command runs the file watcher as a dedicated long-running process:
192
+
The hybrid search scoring algorithm has been replaced. The old Reciprocal Rank Fusion (RRF) compressed all fused scores to ~0.016, destroying ranking differentiation. The new formula preserves dominant signals and rewards dual-source agreement:
159
193
160
-
```bash
161
-
bm watch
162
-
bm watch --project main
163
194
```
195
+
score = max(vec, fts) + 0.3 * min(vec, fts)
196
+
```
197
+
198
+
Zero-score results now produce zero fused score instead of receiving a weight floor. Search result ordering may differ from v0.18 — results should be more accurate with better score differentiation.
164
199
165
-
Use this when you're editing notes in an external editor (Obsidian, VS Code, etc.) and want the database index updated in real-time without running the full MCP server.
200
+
---
201
+
202
+
## Dashboard (`bm project info`)
203
+
204
+
`bm project info` now displays an htop-inspired compact dashboard with:
205
+
206
+
- Horizontal bar charts for note types (top 5)
207
+
- Embedding coverage bar with Unicode block characters
208
+
- Colored status dots for at-a-glance health
166
209
167
210
---
168
211
169
-
## Upgrade Notes
212
+
## Entity User Tracking
213
+
214
+
Entities now track `created_by` and `last_updated_by` fields for attribution, so you can see whether a note was created by a human or an AI assistant.
170
215
171
-
### Project config migration
216
+
---
217
+
218
+
## Improved Search Results
172
219
173
-
Project configuration now uses structured entries with `path`, `mode`, and sync metadata. Legacy config formats (string-valued `projects`, `project_modes`, `cloud_projects`) are migrated automatically when Basic Memory loads your config. The migrated config is re-saved in the new format.
220
+
Search results now surface more relevant context:
174
221
175
-
### `default_project_mode` removal
222
+
-`matched_chunk_text` populated for FTS-only hybrid results (no more fallback to truncated content)
223
+
- Top chunks per result increased from 3 to 5, catching answers deeper in large notes
224
+
- Content display limit doubled from 2,000 to 4,000 characters for results without matched chunks
176
225
177
-
The `default_project_mode` setting is no longer used. `default_project` is the fallback when no project is explicitly passed to a tool or command.
226
+
---
178
227
179
-
### Semantic extras
228
+
##`--json` CLI Flags
180
229
181
-
Semantic search dependencies are optional extras. Install them explicitly if you want vector or hybrid search:
230
+
Five additional CLI commands now support `--json` for machine-readable output:
182
231
183
232
```bash
184
-
uv tool install 'basic-memory[semantic]'
233
+
bm status --json
234
+
bm project list --json
235
+
bm schema validate --json
236
+
bm schema infer --json
237
+
bm schema diff --json
238
+
```
239
+
240
+
This complements the existing `bm project info --json` and `bm tool --format json` support, making all major CLI commands scriptable for CI pipelines and automation.
241
+
242
+
---
243
+
244
+
## Behavior Changes
245
+
246
+
v0.19.0 changes several defaults and removes deprecated features. Each change is explained below with instructions for restoring the previous behavior where applicable.
247
+
248
+
### `write_note` is non-destructive by default
249
+
250
+
`write_note` no longer silently overwrites existing notes. If a note already exists at the target path, the tool returns an error instead of replacing it.
251
+
252
+
|| Before (v0.18) | After (v0.19) |
253
+
|---|---|---|
254
+
| Writing to an existing path | Silently overwrites | Returns an error |
255
+
| Explicit overwrite | Not needed | Pass `overwrite=True`|
256
+
| Incremental edits |`write_note` or `edit_note`| Use `edit_note`|
257
+
258
+
This prevents accidental data loss when an AI assistant writes a note without realizing one already exists.
259
+
260
+
**Restore old behavior:** Set `write_note_overwrite_default: true` in `~/.basic-memory/config.json`.
261
+
262
+
### Semantic search enabled by default
263
+
264
+
Semantic search is now on out of the box. Embeddings are generated automatically on first startup — no opt-in or manual setup required. If `sqlite-vec` fails to load, search gracefully falls back to text-only mode.
265
+
266
+
|| Before (v0.18) | After (v0.19) |
267
+
|---|---|---|
268
+
|`semantic_search_enabled`|`false`|`true`|
269
+
| Embedding generation | Manual | Automatic on first startup |
**Restore old behavior:** Set `semantic_search_enabled: false` in config, or set `BASIC_MEMORY_SEMANTIC_SEARCH_ENABLED=false`.
273
+
274
+
### Frontmatter added on sync
275
+
276
+
Files without YAML frontmatter now get it added automatically during sync. This ensures all notes have proper metadata for search, permalinks, and schema resolution.
277
+
278
+
|| Before (v0.18) | After (v0.19) |
279
+
|---|---|---|
280
+
|`ensure_frontmatter_on_sync`|`false`|`true`|
281
+
| Files without frontmatter | Left untouched | Frontmatter injected |
282
+
283
+
**Restore old behavior:** Set `ensure_frontmatter_on_sync: false` in config.
284
+
285
+
### Project-prefixed permalinks
286
+
287
+
Generated permalinks now include the project slug by default, making cross-project references unambiguous.
288
+
289
+
|| Before (v0.18) | After (v0.19) |
290
+
|---|---|---|
291
+
|`permalinks_include_project`|`false`|`true`|
292
+
| Example permalink |`docs/authentication`|`main/docs/authentication`|
293
+
294
+
Existing permalinks without a project prefix still resolve correctly — resolution tries project-prefixed first, then falls back to bare path.
295
+
296
+
**Restore old behavior:** Set `permalinks_include_project: false` in config.
297
+
298
+
### `build_context` defaults to JSON output
299
+
300
+
`build_context` now returns JSON by default instead of text. The JSON response strips redundant fields for a slimmer payload. All other tools still default to `"text"`.
301
+
302
+
|| Before (v0.18) | After (v0.19) |
303
+
|---|---|---|
304
+
|`build_context` default format |`"text"`|`"json"`|
305
+
| Other tools default format |`"text"`|`"text"` (unchanged) |
306
+
307
+
**Get text output:** Pass `output_format="text"` explicitly.
308
+
309
+
### Hybrid search scoring algorithm
310
+
311
+
The hybrid search scoring formula changed from Reciprocal Rank Fusion (RRF) to score-based fusion. The old RRF formula compressed all fused scores to ~0.016, destroying ranking differentiation. The new formula preserves dominant signals and rewards dual-source agreement.
312
+
313
+
Search result ordering may differ from v0.18. Results should be more accurate with better score differentiation. Zero-score results now produce zero fused score instead of receiving a weight floor.
314
+
315
+
### `search_by_metadata` removed
316
+
317
+
`search_by_metadata` is no longer a standalone tool. Use `search_notes` with `metadata_filters` instead — same parameters, same behavior.
The `default_project_mode` setting is no longer used. Use `default_project` as the fallback when no project is explicitly passed to a tool or command. Per-project routing (`set-cloud` / `set-local`) replaces the global mode toggle.
330
+
331
+
### Project config format changed
332
+
333
+
Project configuration now uses structured entries with `path`, `mode`, and sync metadata. Legacy config formats (string-valued `projects`, `project_modes`, `cloud_projects`) are migrated automatically when Basic Memory loads your config and re-saved in the new format.
334
+
335
+
```json
336
+
// Before (v0.18)
337
+
{
338
+
"projects": {
339
+
"main": "/Users/you/basic-memory"
340
+
}
341
+
}
342
+
343
+
// After (v0.19)
344
+
{
345
+
"projects": {
346
+
"main": {
347
+
"path": "/Users/you/basic-memory",
348
+
"mode": "local"
349
+
}
350
+
}
351
+
}
352
+
```
188
353
189
-
Legacy configuration keys (`project_modes`, `cloud_projects`, `default_project_mode`) are migrated automatically and can be safely removed from your config file.
354
+
Legacy configuration keys (`project_modes`, `cloud_projects`, `default_project_mode`) can be safely removed from your config file after migration.
0 commit comments