@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.
@@ -42,24 +42,26 @@ settings:
42
42
 
43
43
  ## Creating a Task
44
44
 
45
- When work qualifies, create a note in `memory/tasks/YYYY-MM-DD-short-name.md`:
46
-
47
- ```markdown
48
- ---
49
- title: Descriptive task name
50
- type: Task
51
- status: active
52
- created: YYYY-MM-DD
53
- current_step: 1
54
- ---
55
-
56
- # Descriptive task name
45
+ When work qualifies, create a task note. Use `write_note` with `note_type="Task"` and put queryable fields in `metadata`:
46
+
47
+ ```python
48
+ write_note(
49
+ title="Descriptive task name",
50
+ directory="tasks",
51
+ note_type="Task",
52
+ metadata={
53
+ "status": "active",
54
+ "priority": "high",
55
+ "current_step": 1,
56
+ "steps": ["First step", "Second step", "Third step"]
57
+ },
58
+ tags=["task"],
59
+ content="""# Descriptive task name
57
60
 
58
61
  ## Observations
59
62
  - [description] What needs to be done, concisely
60
63
  - [status] active
61
- - [assigned_to] claw
62
- - [started] YYYY-MM-DD
64
+ - [assigned_to] claude
63
65
  - [current_step] 1
64
66
 
65
67
  ## Steps
@@ -72,23 +74,27 @@ What future-you needs to pick up this work. Include:
72
74
  - Key file paths and repos involved
73
75
  - Decisions already made and why
74
76
  - What was tried and what worked/didn't
75
- - Where to look for related context
77
+ - Where to look for related context"""
78
+ )
76
79
  ```
77
80
 
81
+ **Why both frontmatter and observations?** Fields in `metadata` (stored as frontmatter) power `search_notes` with `metadata_filters`. Fields as observations (`- [status] active`) power `schema_validate`. Include queryable fields in both places for full coverage.
82
+
78
83
  ### Key Principles
79
84
 
80
85
  - **Steps are concrete and checkable** — "Implement X in file Y", not "figure out stuff"
81
86
  - **Context is for post-amnesia resumption** — Write it as if explaining to a smart person who knows nothing about what you've been doing
82
- - **Use observations for BM-queryable fields** — `[status]`, `[description]`, `[assigned_to]` etc. become searchable in the knowledge graph
83
87
  - **Relations link to other entities** — `parent_task [[Other Task]]`, `related_to [[Some Note]]`
88
+ - **`note_types` is case-sensitive** — `write_note(note_type="Task")` stores the type as lowercase `task` in frontmatter. Use `note_types=["task"]` (lowercase) in search queries.
84
89
 
85
90
  ## Resuming After Compaction
86
91
 
87
92
  On session start or after compaction:
88
93
 
89
94
  1. **Search for active tasks:**
90
- - Via BM: `search_notes("type:Task status:active")` or `search_notes("[status] active")`
91
- - Via memory_search: query "active tasks" (composited search includes task scanning)
95
+ ```python
96
+ search_notes(note_types=["task"], status="active")
97
+ ```
92
98
 
93
99
  2. **Read the task note** to get full context
94
100
 
@@ -129,7 +135,7 @@ Add a brief summary of what was accomplished and any follow-up needed.
129
135
 
130
136
  When a compaction event is imminent:
131
137
 
132
- 1. Find all active tasks: `search_notes("type:Task status:active")`
138
+ 1. Find all active tasks: `search_notes(note_types=["task"], status="active")`
133
139
  2. For each, update:
134
140
  - `current_step` to reflect actual progress
135
141
  - `context` with everything needed to resume
@@ -142,16 +148,14 @@ With BM's schema system, tasks are fully queryable:
142
148
 
143
149
  | Query | What it finds |
144
150
  |-------|--------------|
145
- | `search_notes("type:Task")` | All tasks |
146
- | `search_notes("[status] active")` | Active tasks |
147
- | `search_notes("[status] blocked")` | Blocked tasks |
148
- | `search_notes("[assigned_to] claw")` | My tasks |
149
- | `search_notes("type:Task [blockers]")` | Tasks with blockers |
151
+ | `search_notes(note_types=["task"])` | All tasks |
152
+ | `search_notes(note_types=["task"], status="active")` | Active tasks |
153
+ | `search_notes(note_types=["task"], status="blocked")` | Blocked tasks |
154
+ | `search_notes(note_types=["task"], metadata_filters={"assigned_to": "claude"})` | My tasks |
155
+ | `search_notes("blockers", note_types=["task"])` | Tasks with blockers |
150
156
  | `schema_validate(noteType="Task")` | Validate all tasks against schema |
151
157
  | `schema_diff(noteType="Task")` | Detect drift between schema and actual task notes |
152
158
 
153
- > **Plugin tools vs BM CLI**: The `schema_validate`, `schema_infer`, and `schema_diff` tools are available when using the `@openclaw/basic-memory` plugin. The raw `search_notes(...)` queries also work and are useful for ad-hoc filtering. `memory_search` composites results from all sources including active task scanning.
154
-
155
159
  ## Guidelines
156
160
 
157
161
  - **One task per unit of work** — Don't cram multiple projects into one task
@@ -159,4 +163,4 @@ With BM's schema system, tasks are fully queryable:
159
163
  - **Context > steps** — Steps tell you what to do; context tells you why and how
160
164
  - **Close finished tasks** — Don't leave completed work as `active`
161
165
  - **Link related tasks** — Use `parent_task [[X]]` or relations to connect related work
162
- - **Schema validation is your friend** — Run `bm schema validate Task` periodically to catch incomplete tasks
166
+ - **Schema validation is your friend** — Run `schema_validate(noteType="Task")` periodically to catch incomplete tasks