@basicmemory/openclaw-basic-memory 0.1.2 → 0.1.4

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.
@@ -0,0 +1,309 @@
1
+ ---
2
+ name: memory-ingest
3
+ description: "Process unstructured external input (meeting transcripts, conversation logs, pasted documents) into structured Basic Memory entities. Extracts entities, searches for existing matches, proposes new entities with approval, creates notes with observations and relations, and captures action items."
4
+ ---
5
+
6
+ # Memory Ingest
7
+
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
+
10
+ ## When to Use
11
+
12
+ - User pastes a meeting transcript or conversation log
13
+ - User says "process these notes" or "add this to Basic Memory"
14
+ - User pastes a document, article, or email for knowledge extraction
15
+ - Any time raw external text needs to become structured knowledge
16
+
17
+ ## Workflow Overview
18
+
19
+ ```
20
+ 1. Parse raw input → identify structure, extract key info
21
+ 2. Extract entities → people, orgs, topics, action items
22
+ 3. Search existing entities → multi-variation queries
23
+ 4. Research new entities → optional web research (see memory-research)
24
+ 5. Present entity proposal → get approval before creating
25
+ 6. Create source note → verbatim content + observations + relations
26
+ 7. Create approved entities → structured notes for each new entity
27
+ 8. Extract action items → follow-ups and commitments
28
+ ```
29
+
30
+ ## Step 1: Parse Raw Input
31
+
32
+ Read the pasted content and identify its structure:
33
+
34
+ - **Format**: Meeting transcript, email thread, conversation log, article, freeform notes
35
+ - **Date**: When this happened (extract from content or ask)
36
+ - **Participants**: Who was involved (names, roles, organizations)
37
+ - **Sections**: Any existing structure (headings, speaker labels, timestamps)
38
+
39
+ Don't rewrite or summarize the source content. Preserve it verbatim in the note — you'll add structured observations alongside it.
40
+
41
+ ## Step 2: Extract Entities
42
+
43
+ Scan the content for entities worth tracking in the knowledge graph:
44
+
45
+ | Entity Type | Signals |
46
+ |-------------|---------|
47
+ | **Person** | Names with roles, titles, or affiliations mentioned |
48
+ | **Organization** | Company names, agencies, institutions |
49
+ | **Topic/Concept** | Technical domains, methodologies, standards discussed substantively |
50
+ | **Action Item** | Commitments, deadlines, "I'll do X by Y" statements |
51
+
52
+ **Infer type from context.** If someone is introduced as "CTO of Acme Corp", that's both a Person and an Organization entity. If a technology is discussed in depth, it might warrant a Concept entity.
53
+
54
+ **Exclude noise.** Not every name mentioned is worth an entity. Filter for:
55
+ - People with substantive roles or interactions (not passing mentions)
56
+ - Organizations discussed in business/technical context
57
+ - Topics with enough detail to warrant their own note
58
+
59
+ ## Step 3: Search Existing Entities
60
+
61
+ For each extracted entity, search Basic Memory with multiple query variations:
62
+
63
+ ```python
64
+ # Person — try full name, last name
65
+ search_notes(query="Sarah Chen")
66
+ search_notes(query="Chen")
67
+
68
+ # Organization — try full name, abbreviation, acronym
69
+ search_notes(query="National Renewable Energy Laboratory")
70
+ search_notes(query="NREL")
71
+
72
+ # Topic — try the full term and keywords
73
+ search_notes(query="edge computing")
74
+ search_notes(query="edge inference")
75
+ ```
76
+
77
+ Classify each entity as:
78
+ - **Existing** — found in Basic Memory. Will link to it with `[[wiki-link]]`.
79
+ - **Proposed** — not found. Will propose creation pending approval.
80
+
81
+ ## Step 4: Research New Entities (Optional)
82
+
83
+ For proposed entities where more context would be valuable, do a brief web search (2-3 queries max per entity):
84
+
85
+ - **Organizations**: What they do, size, public/private, key products
86
+ - **People**: Current role, background, expertise
87
+ - **Topics**: Brief definition, relevance
88
+
89
+ Use hedging language ("appears to be", "estimated", "based on public information"). Never fabricate details.
90
+
91
+ This step is optional — skip it if the source material provides enough context, or if the user is in a hurry. See the **memory-research** skill for deeper research workflows.
92
+
93
+ ## Step 5: Present Entity Proposal
94
+
95
+ Before creating anything, present what you found and what you'd like to create:
96
+
97
+ ```
98
+ Entities found in Basic Memory:
99
+ - [[Sarah Chen]] (Person — existing)
100
+ - [[Acme Corp]] (Organization — existing)
101
+
102
+ Proposed new entities:
103
+ - Jordan Rivera (Person — VP Engineering at NovaTech, mentioned as project lead)
104
+ - NovaTech (Organization — SaaS platform, Series B, discussed as integration partner)
105
+ - Federated Learning (Concept — core technical topic of the discussion)
106
+
107
+ Approve all / select individually / skip entity creation?
108
+ ```
109
+
110
+ Include enough context with each proposed entity for the user to make a quick decision.
111
+
112
+ ## Step 6: Create the Source Note
113
+
114
+ Create the primary note for the ingested content. This is the "record of what happened" — it preserves the raw material and adds structured metadata.
115
+
116
+ ### Meeting / Conversation Note
117
+
118
+ ```python
119
+ write_note(
120
+ title="NovaTech Meeting - Jordan Rivera - Feb 22, 2026",
121
+ directory="meetings/2026",
122
+ note_type="meeting",
123
+ tags=["meeting", "novatech", "federated-learning"],
124
+ metadata={"date": "2026-02-22"},
125
+ content="""
126
+ # NovaTech Meeting - Jordan Rivera - Feb 22, 2026
127
+
128
+ Brief one-sentence summary of what this meeting was about.
129
+
130
+ ## Transcript
131
+ [Preserve all source content verbatim — do not summarize or rewrite]
132
+
133
+ ## Observations
134
+ - [opportunity] NovaTech interested in integration partnership
135
+ - [insight] Their platform handles 10K concurrent sessions, relevant to our scale needs
136
+ - [next_step] Send technical spec document by Friday
137
+ - [sentiment] Strong enthusiasm from their engineering team
138
+ - [decision] Agreed to start with a proof-of-concept integration
139
+
140
+ ## Relations
141
+ - attended [[Jordan Rivera]]
142
+ - with [[NovaTech]]
143
+ - discussed [[Federated Learning]]
144
+ - follow_up [[Send NovaTech Technical Spec]]
145
+ """
146
+ )
147
+ ```
148
+
149
+ ### Document / Article Note
150
+
151
+ ```python
152
+ write_note(
153
+ title="Edge Computing Architecture Whitepaper",
154
+ directory="references",
155
+ note_type="reference",
156
+ tags=["edge-computing", "architecture", "reference"],
157
+ metadata={"source": "https://example.com/whitepaper.pdf", "date_ingested": "2026-02-22"},
158
+ content="""
159
+ # Edge Computing Architecture Whitepaper
160
+
161
+ ## Source Content
162
+ [Preserve relevant content — for long documents, include key sections rather than the entire text]
163
+
164
+ ## Observations
165
+ - [key_finding] Latency drops 40% with edge inference vs cloud-only
166
+ - [technique] Model sharding across heterogeneous edge nodes
167
+ - [limitation] Requires minimum 8GB RAM per edge node
168
+
169
+ ## Relations
170
+ - relates_to [[Edge Computing]]
171
+ - relates_to [[Model Optimization]]
172
+ """
173
+ )
174
+ ```
175
+
176
+ ### Observation Categories
177
+
178
+ Use categories that capture the nature of the information. Common categories for ingested content:
179
+
180
+ | Category | Use For |
181
+ |----------|---------|
182
+ | `opportunity` | Business or collaboration opportunities identified |
183
+ | `decision` | Decisions made or agreed upon |
184
+ | `insight` | Non-obvious understanding gained |
185
+ | `next_step` | Concrete action items or follow-ups |
186
+ | `sentiment` | Enthusiasm, concerns, hesitations expressed |
187
+ | `risk` | Risks or concerns identified |
188
+ | `requirement` | Requirements or constraints discovered |
189
+ | `key_finding` | Important facts from reference material |
190
+ | `technique` | Methods, approaches, or patterns described |
191
+ | `context` | Background information that may be useful later |
192
+
193
+ Invent categories as needed — these are suggestions, not a fixed list.
194
+
195
+ ## Step 7: Create Approved Entities
196
+
197
+ For each entity the user approved, create a structured note. Match the entity type to an appropriate template.
198
+
199
+ ### Person
200
+
201
+ ```python
202
+ write_note(
203
+ title="Jordan Rivera",
204
+ directory="people",
205
+ note_type="person",
206
+ tags=["person", "novatech", "engineering"],
207
+ content="""
208
+ # Jordan Rivera
209
+
210
+ ## Overview
211
+ VP of Engineering at NovaTech. Met during integration partnership discussion.
212
+
213
+ ## Background
214
+ [Role, expertise, context from meeting + any web research]
215
+
216
+ ## Observations
217
+ - [role] VP Engineering at NovaTech
218
+ - [expertise] Distributed systems, federated learning
219
+ - [met] 2026-02-22 during integration discussion
220
+
221
+ ## Relations
222
+ - works_at [[NovaTech]]
223
+ - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
224
+ """
225
+ )
226
+ ```
227
+
228
+ ### Organization
229
+
230
+ ```python
231
+ write_note(
232
+ title="NovaTech",
233
+ directory="organizations",
234
+ note_type="organization",
235
+ tags=["organization", "saas", "integration-partner"],
236
+ content="""
237
+ # NovaTech
238
+
239
+ ## Overview
240
+ SaaS platform company. Series B stage.
241
+ [Additional context from meeting + web research]
242
+
243
+ ## Products & Services
244
+ [What they offer, if discussed or researched]
245
+
246
+ ## Observations
247
+ - [stage] Series B, ~200 employees
248
+ - [relevance] Potential integration partner for our platform
249
+ - [first_contact] 2026-02-22
250
+
251
+ ## Relations
252
+ - employs [[Jordan Rivera]]
253
+ - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
254
+ """
255
+ )
256
+ ```
257
+
258
+ ### Concept / Topic
259
+
260
+ ```python
261
+ write_note(
262
+ title="Federated Learning",
263
+ directory="concepts",
264
+ note_type="concept",
265
+ tags=["concept", "machine-learning", "distributed-systems"],
266
+ content="""
267
+ # Federated Learning
268
+
269
+ ## Overview
270
+ [Brief description of the concept from the discussion context]
271
+
272
+ ## Observations
273
+ - [definition] Machine learning approach where models train across decentralized data sources
274
+ - [relevance] Core technique discussed in NovaTech integration
275
+
276
+ ## Relations
277
+ - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
278
+ """
279
+ )
280
+ ```
281
+
282
+ Adapt templates to your domain. The key elements are: type and tags as parameters, an overview section, observations with categories, and relations linking back to the source.
283
+
284
+ ## Step 8: Extract Action Items
285
+
286
+ Review the source content for commitments and follow-ups:
287
+
288
+ ```
289
+ Action Items:
290
+ - Send NovaTech technical spec document by Friday (your commitment)
291
+ - Jordan will share their API documentation by next week (their commitment)
292
+
293
+ Follow-Up Reminders:
294
+ - 1 week: Check if Jordan sent API docs
295
+ - 2 weeks: Schedule follow-up call to discuss POC scope
296
+ ```
297
+
298
+ If using the **memory-tasks** skill, create Task notes for your action items. Otherwise, capture them as observations in the source note.
299
+
300
+ ## Guidelines
301
+
302
+ - **Preserve source content verbatim.** The original text is the ground truth. Structure and observations are your interpretation layered on top.
303
+ - **Search before creating.** Always check if entities already exist (see memory-notes search-before-create pattern). Update existing entities with new information rather than creating duplicates.
304
+ - **Get approval for new entities.** Present proposed entities and let the user decide which to create. Don't silently populate the knowledge graph.
305
+ - **Infer, don't interrogate.** Extract entity types and relationships from context. Only ask the user when genuinely ambiguous.
306
+ - **Be selective about entities.** Not every name mentioned deserves its own note. Focus on entities the user will want to reference again.
307
+ - **Use hedging for researched info.** Web research supplements — don't present it as fact. "Appears to be", "estimated", "based on public information".
308
+ - **Link everything back.** Every created entity should relate back to the source note. The source note should link to all entities discussed.
309
+ - **Prose and observations together.** Notes work best with both narrative context and structured observations. Prose gives meaning and tells the story; observations make individual facts searchable. Use the body for context, then distill key facts into categorized observations.
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: memory-lifecycle
3
+ description: "Manage entity status transitions in Basic Memory: archive completed work, move notes between status folders, update frontmatter, and handle edge cases. Use when marking items complete, archiving old entities, or managing any folder-based status workflow."
4
+ ---
5
+
6
+ # Memory Lifecycle
7
+
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
+
10
+ ## When to Use
11
+
12
+ - User says something is "done", "finished", "completed", "submitted", "missed", or "cancelled"
13
+ - Moving entities between status folders (active → archive, pipeline → active, etc.)
14
+ - Reverting a mistaken completion
15
+ - Periodic cleanup of stale active items
16
+
17
+ ## Core Principle: Archive, Never Delete
18
+
19
+ Deleting a note removes it from the knowledge graph — all its observations, relations, and history disappear. Archiving preserves everything while signaling the entity is no longer active.
20
+
21
+ ```
22
+ # Good — entity stays in the knowledge graph
23
+ move_note → active/ to archive/
24
+
25
+ # Bad — knowledge is lost
26
+ delete_note
27
+ ```
28
+
29
+ The only exception: notes created by mistake (typos, true duplicates) can be deleted.
30
+
31
+ ## Folder Conventions
32
+
33
+ Organize entities by status using folders. The exact folder names depend on your domain, but follow a consistent pattern:
34
+
35
+ ```
36
+ entities/
37
+ active/ # Currently relevant, in-progress
38
+ archive/ # Completed, no longer active, but worth keeping
39
+ pipeline/ # Future items, not yet started
40
+ ```
41
+
42
+ For tasks specifically:
43
+
44
+ ```
45
+ tasks/
46
+ active/ # Work in progress
47
+ completed/ # Finished work
48
+ ```
49
+
50
+ For any entity type with a clear lifecycle:
51
+
52
+ ```
53
+ [type]/
54
+ active/ # Current
55
+ [end-state]/ # Whatever "done" means for this type
56
+ ```
57
+
58
+ Pick folder names that match your domain. The pattern matters more than the specific names.
59
+
60
+ ## Status Detection
61
+
62
+ When the user mentions completion or status change, extract the intent:
63
+
64
+ | Signal | Status | Action |
65
+ |--------|--------|--------|
66
+ | "finished", "done", "completed", "shipped" | Complete | Move to archive/completed folder |
67
+ | "submitted", "sent", "delivered" | Complete | Move to archive/completed folder |
68
+ | "missed", "passed", "skipped", "expired" | Missed | Move to archive or missed folder |
69
+ | "cancelled", "abandoned", "killed" | Cancelled | Move to archive folder |
70
+ | "paused", "on hold", "deferred" | Paused | Update frontmatter status, keep in place |
71
+ | "restarting", "reopening", "reviving" | Reactivate | Move back to active folder |
72
+
73
+ ## Workflow
74
+
75
+ ### 1. Find the Entity
76
+
77
+ Search Basic Memory with multiple variations to locate the entity:
78
+
79
+ ```python
80
+ search_notes(query="quarterly report")
81
+ search_notes(query="Q1 report")
82
+ ```
83
+
84
+ If multiple matches come back, present options and ask which one.
85
+
86
+ If no match is found, ask for clarification — don't guess.
87
+
88
+ ### 2. Move the File
89
+
90
+ Use `move_note` to relocate the entity to the appropriate status folder:
91
+
92
+ ```python
93
+ move_note(
94
+ identifier="tasks/active/quarterly-report",
95
+ destination_path="tasks/completed/quarterly-report.md"
96
+ )
97
+ ```
98
+
99
+ The permalink stays the same, so all existing `[[wiki-links]]` and `memory://` URLs continue to resolve.
100
+
101
+ ### 3. Update Frontmatter
102
+
103
+ After moving, update the status in frontmatter to match:
104
+
105
+ ```python
106
+ edit_note(
107
+ identifier="quarterly-report",
108
+ operation="find_replace",
109
+ find_text="status: active",
110
+ content="status: completed"
111
+ )
112
+ ```
113
+
114
+ If there's a completion date field, set it:
115
+
116
+ ```python
117
+ edit_note(
118
+ identifier="quarterly-report",
119
+ operation="find_replace",
120
+ find_text="completed:",
121
+ content="completed: 2026-02-22"
122
+ )
123
+ ```
124
+
125
+ ### 4. Confirm
126
+
127
+ Report what was done concisely:
128
+
129
+ ```
130
+ Marked complete: Quarterly Report
131
+ Moved to: tasks/completed/quarterly-report.md
132
+ Status: completed
133
+ ```
134
+
135
+ ## Edge Cases
136
+
137
+ ### Already Archived
138
+
139
+ If the entity is already in an archive/completed folder, notify the user:
140
+
141
+ > "Quarterly Report is already in tasks/completed/. Want me to update anything on it?"
142
+
143
+ ### Partial Completion
144
+
145
+ Sometimes only part of an entity is done. Don't move it — instead, update observations or status notes within the entity to reflect partial progress.
146
+
147
+ ### Revert / Reactivate
148
+
149
+ If something was archived by mistake, move it back:
150
+
151
+ ```python
152
+ move_note(
153
+ identifier="tasks/completed/quarterly-report",
154
+ destination_path="tasks/active/quarterly-report.md"
155
+ )
156
+
157
+ edit_note(
158
+ identifier="quarterly-report",
159
+ operation="find_replace",
160
+ find_text="status: completed",
161
+ content="status: active"
162
+ )
163
+ ```
164
+
165
+ ### Status Without Movement
166
+
167
+ Some status changes don't require a folder move — "paused" or "blocked" items often stay in `active/` with just a frontmatter update. Reserve folder moves for terminal or major state transitions.
168
+
169
+ ## Relationship to Other Skills
170
+
171
+ - **memory-tasks**: Tasks are a specific lifecycle case. This skill covers the general pattern; memory-tasks covers task-specific fields (steps, current_step, context).
172
+ - **memory-notes**: Use search-before-create (from memory-notes) to find the entity before transitioning it.
173
+ - **memory-defrag**: Periodic defrag can identify stale active items that should be archived.
174
+
175
+ ## Guidelines
176
+
177
+ - **Archive, never delete.** The knowledge graph benefits from historical context.
178
+ - **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.** Links to the entity keep working after a `move_note`.
180
+ - **Be concise in confirmations.** The user knows their system — just report what changed.
181
+ - **Ask when ambiguous.** If multiple entities match or the target folder isn't clear, ask rather than guess.
182
+ - **Batch operations are fine.** If the user says "archive all completed tasks", find them all, confirm the list, then move them in sequence.
@@ -16,16 +16,9 @@ Find notes by their structured frontmatter fields instead of (or in addition to)
16
16
  - **Tag-based filtering** — find notes tagged with specific frontmatter tags
17
17
  - **Schema-aware queries** — filter by nested schema fields using dot notation
18
18
 
19
- ## Tool
19
+ ## The Tool
20
20
 
21
- Use the `search_notes` tool with the optional `metadata_filters`, `tags`, and `status` parameters.
22
-
23
- | Parameter | Type | Description |
24
- |-----------|------|-------------|
25
- | `query` | string | Text search query (can be empty for filter-only searches) |
26
- | `metadata_filters` | object | Filter by frontmatter fields (see filter syntax below) |
27
- | `tags` | string[] | Filter by frontmatter tags (all must match) |
28
- | `status` | string | Filter by frontmatter status field |
21
+ All metadata searching uses `search_notes`. Pass filters via `metadata_filters`, or use the `tags` and `status` convenience shortcuts. Omit `query` (or pass `None`) for filter-only searches.
29
22
 
30
23
  ## Filter Syntax
31
24
 
@@ -87,71 +80,52 @@ Numeric values use numeric comparison; strings use lexicographic comparison.
87
80
  - `$in` and array-contains require non-empty lists
88
81
  - `$between` requires exactly `[min, max]`
89
82
 
90
- ## Examples
91
-
92
- ### Metadata-only search (empty query)
93
-
94
- ```
95
- search_notes(query="", metadata_filters={"status": "in-progress", "type": "spec"})
96
- ```
97
-
98
- ### Text search narrowed by metadata
83
+ ## Using `search_notes` with Metadata
99
84
 
100
- ```
101
- search_notes(query="authentication", metadata_filters={"status": "draft"})
102
- ```
85
+ Pass `metadata_filters`, `tags`, or `status` to `search_notes`. Omit `query` for filter-only searches, or combine text and filters together.
103
86
 
104
- ### Filter by tags
87
+ ```python
88
+ # Filter-only — find all notes with a given status
89
+ search_notes(metadata_filters={"status": "in-progress"})
105
90
 
106
- ```
107
- search_notes(query="", tags=["security", "oauth"])
108
- ```
91
+ # Filter-only — high-priority specs in a specific project
92
+ search_notes(
93
+ metadata_filters={"type": "spec", "priority": {"$in": ["high", "critical"]}},
94
+ project="research",
95
+ page_size=10,
96
+ )
109
97
 
110
- ### Filter by status shortcut
98
+ # Filter-only — notes with confidence above a threshold
99
+ search_notes(metadata_filters={"confidence": {"$gt": 0.7}})
111
100
 
112
- ```
113
- search_notes(query="planning", status="active")
114
- ```
101
+ # Convenience shortcuts for tags and status
102
+ search_notes(status="active")
103
+ search_notes(tags=["security", "oauth"])
115
104
 
116
- ### Combined text + metadata + tags
105
+ # Text search narrowed by metadata
106
+ search_notes("authentication", metadata_filters={"status": "draft"})
117
107
 
118
- ```
108
+ # Mix text, tag shortcut, and advanced filter
119
109
  search_notes(
120
- query="oauth flow",
121
- metadata_filters={"confidence": {"$gt": 0.7}},
110
+ "oauth flow",
122
111
  tags=["security"],
123
- status="in-progress",
124
- )
125
- ```
126
-
127
- ### High-priority notes in a specific project
128
-
129
- ```
130
- search_notes(
131
- query="",
132
- metadata_filters={"priority": {"$in": ["high", "critical"]}},
133
- project="research",
134
- limit=10,
112
+ metadata_filters={"confidence": {"$gt": 0.7}},
135
113
  )
136
114
  ```
137
115
 
138
- ### Numeric range query
139
-
140
- ```
141
- search_notes(query="", metadata_filters={"score": {"$between": [0.3, 0.8]}})
142
- ```
116
+ **Merging rules:** `tags` and `status` are convenience shortcuts merged into `metadata_filters` via `setdefault`. If the same key exists in `metadata_filters`, the explicit filter wins.
143
117
 
144
118
  ## Tag Search Shorthand
145
119
 
146
120
  The `tag:` prefix in a query converts to a tag filter automatically:
147
121
 
148
- ```
122
+ ```python
149
123
  # These are equivalent:
150
- search_notes(query="tag:tier1")
151
- search_notes(query="", tags=["tier1"])
124
+ search_notes("tag:tier1")
125
+ search_notes("", tags=["tier1"])
152
126
 
153
127
  # Multiple tags (comma or space separated) — all must match:
154
- search_notes(query="tag:tier1,alpha")
128
+ search_notes("tag:tier1,alpha")
155
129
  ```
156
130
 
157
131
  ## Example: Custom Frontmatter in Practice
@@ -180,29 +154,29 @@ confidence: 0.85
180
154
 
181
155
  Queries that find it:
182
156
 
183
- ```
157
+ ```python
184
158
  # By status and type
185
- search_notes(query="", metadata_filters={"status": "in-progress", "type": "spec"})
159
+ search_notes(metadata_filters={"status": "in-progress", "type": "spec"})
186
160
 
187
161
  # By numeric threshold
188
- search_notes(query="", metadata_filters={"confidence": {"$gt": 0.7}})
162
+ search_notes(metadata_filters={"confidence": {"$gt": 0.7}})
189
163
 
190
164
  # By priority set
191
- search_notes(query="", metadata_filters={"priority": {"$in": ["high", "critical"]}})
165
+ search_notes(metadata_filters={"priority": {"$in": ["high", "critical"]}})
192
166
 
193
167
  # By tag shorthand
194
- search_notes(query="tag:security")
168
+ search_notes("tag:security")
195
169
 
196
170
  # Combined text + metadata
197
- search_notes(query="OAuth", metadata_filters={"status": "in-progress"})
171
+ search_notes("OAuth", metadata_filters={"status": "in-progress"})
198
172
  ```
199
173
 
200
174
  ## Guidelines
201
175
 
202
- - **Use metadata filters for structured queries.** If you're looking for notes by a known field value (status, priority, type), metadata filters are more precise than text search.
176
+ - **Use metadata search for structured queries.** If you're looking for notes by a known field value (status, priority, type), metadata filters are more precise than text search.
203
177
  - **Use text search for content queries.** If you're looking for notes *about* something, text search is better. Combine both when you need precision.
204
178
  - **Custom fields are free.** Any YAML key you put in frontmatter becomes queryable — no schema or configuration required.
205
179
  - **Multiple filters are AND.** `{"status": "active", "priority": "high"}` requires both conditions.
206
- - **Use empty query for filter-only searches.** Pass `query=""` with `metadata_filters` when you only need structured filtering.
180
+ - **Omit `query` for filter-only searches.** `search_notes(metadata_filters={"status": "active"})` works without a text query.
207
181
  - **Dot notation for nesting.** Access nested YAML structures with dots: `{"schema.version": "2"}` queries the `version` key inside a `schema` object.
208
- - **Tags and status are convenient shortcuts.** Use the dedicated `tags` and `status` parameters for common fields, or `metadata_filters` for anything else.
182
+ - **Tags shortcut is convenient but limited.** `tags` and `status` are sugar for common fields. For anything else, use `metadata_filters` directly.