clawvault 2.3.1 → 2.4.1

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.
Files changed (41) hide show
  1. package/README.md +125 -333
  2. package/bin/register-core-commands.js +25 -2
  3. package/bin/register-task-commands.js +18 -2
  4. package/bin/register-task-commands.test.js +24 -0
  5. package/dist/{chunk-TB3BM2PQ.js → chunk-33GW63WK.js} +4 -35
  6. package/dist/{chunk-JVAWKNIZ.js → chunk-AHGUJG76.js} +1 -1
  7. package/dist/{chunk-TT3FXYCN.js → chunk-BI6SGGZP.js} +1 -1
  8. package/dist/{chunk-NGVAEFT2.js → chunk-DEFBIVQ3.js} +21 -0
  9. package/dist/{chunk-USZU5CBB.js → chunk-DHJPXGC7.js} +1 -1
  10. package/dist/{chunk-2AYPFUGX.js → chunk-FEFPBHH4.js} +286 -11
  11. package/dist/{chunk-K6XHCUFL.js → chunk-FHFUXL6G.js} +8 -1
  12. package/dist/{chunk-RARDNTUP.js → chunk-GBIDDDSL.js} +2 -2
  13. package/dist/chunk-IFTEGE4D.js +361 -0
  14. package/dist/{chunk-VBVEXNI5.js → chunk-JXY6T5R7.js} +1 -1
  15. package/dist/chunk-L3DJ36BZ.js +40 -0
  16. package/dist/{chunk-OTQW3OMC.js → chunk-Q3WBH4P4.js} +97 -0
  17. package/dist/{chunk-6AQZIPLV.js → chunk-SNEMCQP7.js} +12 -5
  18. package/dist/commands/backlog.js +9 -2
  19. package/dist/commands/blocked.js +9 -2
  20. package/dist/commands/canvas.d.ts +11 -3
  21. package/dist/commands/canvas.js +954 -20
  22. package/dist/commands/context.js +4 -3
  23. package/dist/commands/doctor.js +1 -1
  24. package/dist/commands/migrate-observations.js +2 -2
  25. package/dist/commands/observe.d.ts +1 -0
  26. package/dist/commands/observe.js +4 -3
  27. package/dist/commands/rebuild.js +4 -3
  28. package/dist/commands/reflect.js +3 -3
  29. package/dist/commands/replay.js +5 -4
  30. package/dist/commands/setup.d.ts +10 -2
  31. package/dist/commands/setup.js +1 -1
  32. package/dist/commands/sleep.js +5 -4
  33. package/dist/commands/status.js +1 -1
  34. package/dist/commands/task.js +1 -1
  35. package/dist/commands/wake.js +3 -3
  36. package/dist/index.d.ts +5 -0
  37. package/dist/index.js +13 -11
  38. package/dist/lib/task-utils.d.ts +13 -1
  39. package/dist/lib/task-utils.js +3 -1
  40. package/package.json +10 -8
  41. package/dist/chunk-W463YRED.js +0 -97
package/README.md CHANGED
@@ -2,401 +2,193 @@
2
2
 
3
3
  **An elephant never forgets.**
4
4
 
5
- Structured memory system for AI agents. Store, search, and link memories across sessions.
5
+ Structured memory system for AI agents. Typed storage, knowledge graph, task management, and Obsidian-native dashboards all local, all markdown.
6
6
 
7
- 🌐 **Website:** [clawvault.dev](https://clawvault.dev) | 📦 **npm:** [clawvault](https://www.npmjs.com/package/clawvault) | 🛠️ **ClawHub:** [clawvault skill](https://clawhub.com/skills/clawvault)
7
+ [![npm](https://img.shields.io/npm/v/clawvault)](https://www.npmjs.com/package/clawvault) [![tests](https://img.shields.io/badge/tests-361%20passing-brightgreen)]()
8
8
 
9
- > **Built for [OpenClaw](https://openclaw.ai)** the AI agent framework. Works standalone too.
9
+ 🌐 [clawvault.dev](https://clawvault.dev) · 📚 [docs.clawvault.dev](https://docs.clawvault.dev) · 🛠️ [ClawHub Skill](https://clawhub.com/skills/clawvault)
10
10
 
11
- ## Install for OpenClaw Agents
11
+ > Works with [OpenClaw](https://openclaw.ai) agents or standalone. No cloud. No API keys. Just files.
12
12
 
13
- ```bash
14
- # Install the skill (recommended for OpenClaw agents)
15
- clawhub install clawvault
16
-
17
- # Or install the CLI globally
18
- npm install -g clawvault
19
- ```
20
-
21
- ## Requirements
22
-
23
- - **Node.js 18+**
24
- - **[qmd](https://github.com/Versatly/qmd)** — Local semantic search (required)
13
+ ## Install
25
14
 
26
15
  ```bash
27
- # Install qmd first
28
- bun install -g qmd # or: npm install -g qmd
29
-
30
- # Then install clawvault
31
16
  npm install -g clawvault
32
17
  ```
33
18
 
34
- ## Why ClawVault?
35
-
36
- AI agents forget things. Context windows overflow, sessions end, important details get lost. ClawVault fixes that:
37
-
38
- - **Structured storage** — Organized categories, not random notes
39
- - **Local search** — qmd provides BM25 + semantic search with local embeddings (no API quotas)
40
- - **Wiki-links** — `[[connections]]` visible in Obsidian's graph view
41
- - **Session continuity** — Handoff/recap system for context death
42
- - **Token efficient** — Search instead of loading entire memory files
43
-
44
19
  ## Quick Start
45
20
 
46
21
  ```bash
47
- # Initialize vault with qmd collection
48
- clawvault init ~/memory --qmd-collection my-memory
49
-
50
- # Store memories
51
- clawvault remember decision "Use qmd" --content "Local embeddings, no API limits"
52
- clawvault remember lesson "Context death is survivable" --content "Write it down"
53
- clawvault capture "Quick note to process later"
54
-
55
- # Search (uses qmd)
56
- clawvault search "decision" # BM25 keyword search
57
- clawvault vsearch "what did I decide" # Semantic search
58
-
59
- # Session management
60
- clawvault wake
61
- clawvault sleep "build wake/sleep commands" --next "run doctor"
62
- clawvault handoff --working-on "task1" --next "task2" # Manual handoff (advanced)
63
- clawvault recap # Manual recap (advanced)
64
- ```
22
+ # Create a vault
23
+ clawvault init ~/memory --name my-brain
65
24
 
66
- **Tip:** Set `CLAWVAULT_PATH` to skip directory walk (or use `shell-init`):
67
- ```bash
68
- echo 'export CLAWVAULT_PATH="$HOME/memory"' >> ~/.bashrc
69
- eval "$(clawvault shell-init)"
70
- ```
71
-
72
- ## Observational Memory
25
+ # Store memories by type
26
+ clawvault remember decision "Use PostgreSQL" --content "Chose for JSONB support"
27
+ clawvault remember lesson "Always checkpoint" --content "Context death is real"
28
+ clawvault capture "Quick thought to process later"
73
29
 
74
- Automatically compress conversations into prioritized observations:
75
-
76
- ```bash
77
- # One-shot: compress a conversation file
78
- clawvault observe --compress session.md
30
+ # Search
31
+ clawvault search "postgresql" # Keyword (BM25)
32
+ clawvault vsearch "what database?" # Semantic (local embeddings)
79
33
 
80
- # Active sessions: incremental observe from OpenClaw transcripts
81
- clawvault observe --active
34
+ # Session lifecycle
35
+ clawvault wake # Start session, load context
36
+ clawvault sleep "built auth system" \ # End session with handoff
37
+ --next "deploy to staging"
82
38
 
83
- # Watch mode: monitor a directory for new session files
84
- clawvault observe --watch ./sessions/
39
+ # Task management
40
+ clawvault task add "Ship v2" --owner agent --project acme --priority high
41
+ clawvault task list
42
+ clawvault blocked
43
+ clawvault backlog add "Explore caching" --project acme
85
44
 
86
- # Background daemon
87
- clawvault observe --daemon
45
+ # Visual dashboards (Obsidian JSON Canvas)
46
+ clawvault canvas --template brain # System architecture overview
47
+ clawvault canvas --template project-board # Task board by owner
88
48
  ```
89
49
 
90
- Observations use emoji priorities:
91
- - 🔴 **Critical** — decisions, errors, blockers, deadlines
92
- - 🟡 **Notable** — preferences, architecture discussions, people interactions
93
- - 🟢 **Info** — routine updates, deployments, general progress
50
+ ## Features
94
51
 
95
- Critical and notable observations are automatically routed to vault categories (`decisions/`, `lessons/`, `people/`, etc.). The system uses LLM compression (Gemini, Anthropic, or OpenAI) with a rule-based fallback.
96
-
97
- For long-running OpenClaw sessions, `observe --active` tracks per-session byte cursors in `.clawvault/observe-cursors.json` and only compresses new transcript deltas once threshold windows are crossed.
98
-
99
- Integrated into the sleep/wake lifecycle:
100
- ```bash
101
- clawvault sleep "task summary" --session-transcript conversation.md
102
- # → observations auto-generated and routed
52
+ ### 📁 Typed Memory Storage
53
+ Every memory has a category: `decisions/`, `lessons/`, `people/`, `projects/`, `commitments/`. No more dumping everything into one file. "Show me all decisions" actually works.
103
54
 
104
- clawvault wake
105
- # recent 🔴/🟡 observations included in context
106
- ```
55
+ ### 🧠 Knowledge Graph
56
+ Wiki-links (`[[connections]]`) build a typed graph index. Query with graph-aware context that blends semantic search with relationship traversal.
107
57
 
108
- Token-budget-aware context injection:
109
58
  ```bash
110
- clawvault context "what decisions were made" --budget 2000
111
- # blends semantic + graph-neighbor context within budget
112
-
113
- clawvault context "what decisions were made" --format json
114
- # → includes explain metadata (signals + rationale) per entry
115
-
116
- clawvault context "plan database migration" --profile planning
117
- # → profile-tuned ordering for planning, incident, handoff, or default
118
-
119
- clawvault context "URGENT outage: rollback failed" --profile auto
120
- # → auto infers incident/planning/handoff/default from prompt intent
59
+ clawvault graph # Graph summary
60
+ clawvault context "database migration" \ # Graph-aware context
61
+ --profile planning --budget 2000
121
62
  ```
122
63
 
123
- ## Search
124
-
125
- Use `clawvault search` / `qmd` for vault search — it indexes the **entire vault** (decisions/, people/, lessons/, observations/, etc.).
126
-
127
- OpenClaw's built-in `memory_search` only indexes `MEMORY.md` + `memory/**/*.md`. If your vault lives inside `memory/`, it'll work. If your vault is elsewhere, `memory_search` won't find your ClawVault categories.
64
+ ### ✅ Task Management
65
+ Tasks and backlog stored as markdown with frontmatter. Agents and humans share the same system.
128
66
 
129
67
  ```bash
130
- # Full vault search (recommended)
131
- clawvault search "query" # BM25 keyword
132
- clawvault vsearch "what did I decide" # Semantic (local embeddings)
133
-
134
- # OpenClaw memory search (only MEMORY.md + memory/*.md)
135
- # Works if vault is inside memory/, misses vault categories otherwise
68
+ clawvault task add "Fix auth" --owner bot --priority critical
69
+ clawvault task update fix-auth --status blocked --blocked-by "api-key"
70
+ clawvault blocked # Triage blocked work
71
+ clawvault backlog promote explore-caching # Backlog → active task
136
72
  ```
137
73
 
138
- ## Vault Structure
74
+ ### 🎨 Obsidian Dashboards
75
+ Generate visual dashboards as [JSON Canvas](https://jsoncanvas.org) files:
139
76
 
140
- ```
141
- my-memory/
142
- ├── .clawvault.json # Config (includes qmd collection name)
143
- ├── .clawvault/
144
- │ └── graph-index.json # Typed memory graph index (incremental rebuilds)
145
- ├── decisions/ # Choices with reasoning
146
- ├── lessons/ # Things learned
147
- ├── people/ # One file per person
148
- ├── projects/ # Active work
149
- ├── commitments/ # Promises and deadlines
150
- ├── inbox/ # Quick capture (process later)
151
- └── handoffs/ # Session continuity
152
- ```
153
-
154
- ## Commands
155
-
156
- ### Store Memories
77
+ | Template | Description |
78
+ |----------|-------------|
79
+ | `brain` | 4-quadrant architecture: vault structure, direction, agent workspace, knowledge graph |
80
+ | `project-board` | Owner-centric kanban with status columns, priority icons, agent/human cards |
81
+ | `default` | Two-column dashboard with activity metrics and task triage |
82
+ | `sprint` | Weekly focus with sprint metrics and open loops |
157
83
 
158
84
  ```bash
159
- # With type classification (recommended)
160
- clawvault remember <type> <title> --content "..."
161
- # Types: decision, lesson, fact, commitment, project, person
162
-
163
- # Quick capture
164
- clawvault capture "Note to self"
165
-
166
- # Manual store
167
- clawvault store -c decisions -t "Title" --content "..."
85
+ clawvault canvas --template brain
86
+ clawvault canvas --template project-board --owner my-agent
168
87
  ```
169
88
 
170
- **Note:** All write commands auto-update the qmd index. Use `--no-index` to skip.
171
-
172
- ### Search
89
+ ### 🔭 Observational Memory
90
+ Auto-compress conversations into prioritized observations. Critical items route to vault categories automatically.
173
91
 
174
92
  ```bash
175
- clawvault search "query" # BM25 keyword
176
- clawvault search "query" -c people # Filter by category
177
- clawvault vsearch "query" # Semantic (local embeddings)
93
+ clawvault observe --compress session.md # One-shot compression
94
+ clawvault observe --active # Incremental from transcripts
178
95
  ```
179
96
 
180
- ### Browse
97
+ ### 🛡️ Context Death Recovery
98
+ Checkpoint/recover system keeps agents alive across crashes and session resets.
181
99
 
182
100
  ```bash
183
- clawvault list # All documents
184
- clawvault list decisions # By category
185
- clawvault get decisions/title # Specific document
186
- clawvault stats # Vault overview
187
- clawvault graph --refresh # Typed memory graph summary
101
+ clawvault checkpoint --working-on "migration" --focus "step 3"
102
+ clawvault recover # After crash/reset
188
103
  ```
189
104
 
190
- ### Session Continuity
105
+ ### 🌐 Tailscale Networking
106
+ Multi-vault collaboration over Tailscale with trust levels and cross-vault search.
191
107
 
192
108
  ```bash
193
- # Start a session (recover + recap + summary)
194
- clawvault wake
195
-
196
- # End a session with a handoff
197
- clawvault sleep "building CRM, fixing webhook" \
198
- --blocked "waiting for API key" \
199
- --next "deploy to production" \
200
- --decisions "chose Supabase over Firebase" \
201
- --feeling "focused"
202
-
203
- # Manual tools (advanced)
204
- clawvault handoff --working-on "task1" --next "task2"
205
- clawvault recap --brief # Token-efficient recap
206
-
207
- # Health check
208
- clawvault doctor
209
-
210
- # OpenClaw compatibility check
211
- clawvault compat
212
-
213
- # CI/automation-friendly compatibility gate
214
- clawvault compat --strict # exits non-zero on warnings/errors
215
- # validates openclaw CLI readiness, hook events/requirements, handler safety/profile delegation, and SKILL metadata
216
- # flags missing, non-zero, or signal-terminated openclaw CLI checks as warnings
217
- # warns on unsafe handler execution conventions (execSync usage, shell:true options, missing --profile auto delegation)
218
-
219
- # Validate a specific project root (fixtures/CI)
220
- clawvault compat --strict --base-dir ./tests/compat-fixtures/healthy
221
-
222
- # Run strict compatibility fixture matrix (healthy + intentional drift cases)
223
- npm run test:compat-fixtures
224
- # fixture expectations are defined in tests/compat-fixtures/cases.json
225
- # fixture manifest includes schemaVersion for explicit contract evolution (current schemaVersion=2)
226
- # includes expectedCheckLabels to lock compat check-label contract
227
- # supports expected status, detail snippets, and hint snippets per check
228
- # supports openclawExitCode/openclawSignal/openclawMissing for declarative CLI failure simulation cases
229
- # each case also owns its scenario description (README coverage is validated)
230
- # expected check labels are validated against live compat output to catch stale contracts
231
- # includes a fresh build before running fixtures
232
-
233
- # Quick smoke check (healthy fixture only)
234
- npm run test:compat-smoke
235
- # runs fast contract validation + healthy fixture check (requires existing dist build)
236
- # fails fast if build artifacts are stale
237
-
238
- # Validate compatibility fixture contract only (no full matrix execution)
239
- npm run test:compat-contract
240
- # includes manifest/docs/runtime-label parity checks with a fresh build
241
-
242
- # Fast contract-only validation (requires existing dist build)
243
- npm run test:compat-contract:fast
244
- # fails fast if compat source is newer than dist build artifacts
245
-
246
- # Run full local CI gate (typecheck + tests + compat fixtures)
247
- npm run ci
248
- # runs build-backed contract validation, fixture matrix execution, and standalone summary artifact validation
249
-
250
- # Optional: run only specific compatibility fixtures
251
- COMPAT_CASES=healthy,missing-events npm run test:compat-fixtures
252
- # duplicate COMPAT_CASES entries are rejected to prevent ambiguous selection
253
- # empty/whitespace-only COMPAT_CASES values are rejected as invalid selection input
254
- # runner logs resolved case selection before execution for easier verification
255
-
256
- # Optional: run fast fixture checks without building
257
- npm run test:compat-fixtures:fast
258
-
259
- # Optional: write per-fixture JSON reports to a directory
260
- COMPAT_REPORT_DIR=/tmp/clawvault-compat-reports npm run test:compat-fixtures
261
- # includes per-case reports and summary.json (summarySchemaVersion + mode/schemaVersion/selectedCases/selectedTotal + expected/runtime labels + passed/failed case lists + preflight/overall timing + slowest cases)
262
- # summary artifacts are validated for schema/field invariants before write (fail-fast on malformed report generation)
263
- # validator now also enforces result-entry schema and passed/failed list coherence with selected case ordering
264
- # slowestCases telemetry is also validated against case-result durations and sort order
265
- # summary validation is enforced centrally in summary artifact writing, so all emitters share one contract path
266
- # per-case report artifacts are also validated centrally before write
267
-
268
- # Optional: validate an existing compatibility summary artifact set
269
- node scripts/validate-compat-summary.mjs /tmp/clawvault-compat-reports/summary.json
270
- # explicit option form (also supports custom case-report directory)
271
- node scripts/validate-compat-summary.mjs --summary /tmp/clawvault-compat-reports/summary.json --report-dir /tmp/clawvault-compat-reports
272
- # summary-only mode when per-case reports are unavailable
273
- node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --allow-missing-case-reports
274
- # machine-readable success output for automation
275
- node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --json
276
- # json output is schema-versioned and also used for machine-readable error payloads
277
- # success payload includes summary/fixture schema versions for downstream compatibility checks
278
- # write validator result payload (success/error) to a file
279
- node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --json --out /tmp/validator-result.json
280
- # in CI, compat-summary artifacts now include summary.json + report-schema-validator-result.json + validator-result.json + schema-validator-result.json + validator-result-verifier-result.json + artifact-bundle-validator-result.json + artifact-bundle-manifest-validator-result.json
281
- # validator payload schema/validation is centralized in scripts/lib/compat-summary-validator-output.mjs
282
- # JSON schema artifacts for payload contracts live in /schemas (including json-schema-validator-output)
283
- # generic schema checker CLI lives at scripts/validate-json-schema.mjs
284
- # schema-validator result payload is written to schema-validator-result.json in compat report dirs
285
- # summary/case-report artifacts can also be schema-validated via scripts/validate-compat-report-schemas.mjs
286
- # see validator usage/help
287
- node scripts/validate-compat-summary.mjs --help
288
- # equivalent npm wrapper (supports arg passthrough, env fallback)
289
- npm run test:compat-summary:verify -- /tmp/clawvault-compat-reports/summary.json
290
- # validate previously emitted validator-result payload directly
291
- npm run test:compat-validator-result:verify -- /tmp/clawvault-compat-reports/validator-result.json
292
- # npm verifier wrapper enforces --require-ok by default
293
- # validate validator-result payload against its JSON schema contract
294
- npm run test:compat-validator-result:schema
295
- # validate schema-validator-result payload against its own schema contract
296
- npm run test:compat-schema-validator-result:verify
297
- # validate summary.json and per-case report artifacts against schema documents
298
- npm run test:compat-report-schemas:verify
299
- # emit report-schema validator output payload + validate its schema contract
300
- npm run test:compat-report-schemas:verify:report
301
- npm run test:compat-report-schemas:verify:schema
302
- # emit verifier output payload + validate verifier payload schema
303
- npm run test:compat-validator-result:verify:report
304
- npm run test:compat-validator-result:verify:schema
305
- # verify full compat artifact bundle contract + emit schema-validated bundle result
306
- npm run test:compat-artifact-bundle:verify
307
- npm run test:compat-artifact-bundle:verify:report
308
- npm run test:compat-artifact-bundle:verify:schema
309
- npm run test:compat-artifact-bundle:manifest:schema
310
- npm run test:compat-artifact-bundle:manifest:verify
311
- npm run test:compat-artifact-bundle:manifest:verify:report
312
- npm run test:compat-artifact-bundle:manifest:verify:schema
313
- # bundle result now includes an artifactContracts manifest (artifact path + schema id + expected/actual schema version), now including artifact-bundle-manifest-validator-result.json
314
- # bundle validator supports --manifest <path> to override the default contract manifest
315
- # manifest verifier emits artifact-bundle-manifest-validator-result.json with schemaId/version-field contract checks
316
- # explicit verifier CLI options:
317
- node scripts/validate-compat-validator-result.mjs --validator-result /tmp/clawvault-compat-reports/validator-result.json --json --out /tmp/verifier-result.json
318
- # enforce success-only validator-result status in strict automation paths
319
- node scripts/validate-compat-validator-result.mjs --validator-result /tmp/clawvault-compat-reports/validator-result.json --require-ok
320
- # use --help for verifier usage and path-resolution rules
321
- # or run fixture generation + standalone summary validation together
322
- npm run test:compat-summary:fast
323
- # debug stack wrappers individually when isolating compat contract drift
324
- npm run test:compat-report-stack:fast
325
- npm run test:compat-validator-stack:fast
326
- npm run test:compat-artifact-stack:fast
327
- # script behavior is covered by dedicated unit tests (success + failure + env fallback)
328
- # validator exits with a clear error when no summary path/source input is provided
329
- # summary scripts respect COMPAT_REPORT_DIR (defaults to .compat-reports when unset)
330
- # report parsing now validates per-check schema and warning/error count coherence before artifact evaluation
109
+ clawvault serve # Start API server
110
+ clawvault peers # Manage vault peers
111
+ clawvault net-search "query" # Search across vaults
331
112
  ```
332
113
 
114
+ ## Setup & Customization
333
115
 
334
- ## Agent Setup (AGENTS.md)
335
-
336
- Add this to your `AGENTS.md` to ensure proper memory habits:
337
-
338
- ```markdown
339
- ## Memory
116
+ ```bash
117
+ # Full setup with neural graph theme + Obsidian Bases views
118
+ clawvault setup --theme neural --canvas brain
340
119
 
341
- **Write everything down. Memory doesn't survive session restarts.**
120
+ # Minimal agent vault
121
+ clawvault init ./memory --minimal
342
122
 
343
- ### Search (use qmd, not memory_search)
344
- \`\`\`bash
345
- qmd search "query" -c your-memory # Fast keyword
346
- qmd vsearch "query" -c your-memory # Semantic
347
- \`\`\`
123
+ # Custom categories
124
+ clawvault init ./memory --categories "notes,research,code"
348
125
 
349
- ### Store
350
- \`\`\`bash
351
- clawvault remember decision "Title" --content "..."
352
- clawvault remember lesson "Title" --content "..."
353
- \`\`\`
126
+ # Skip visual config
127
+ clawvault setup --no-graph-colors --no-bases
128
+ ```
354
129
 
355
- ### Session Start
356
- \`\`\`bash
357
- clawvault wake
358
- \`\`\`
130
+ ### Graph Themes
359
131
 
360
- ### Session End
361
- \`\`\`bash
362
- clawvault sleep "..." --next "..."
363
- \`\`\`
132
+ | Theme | Description |
133
+ |-------|-------------|
134
+ | `neural` | Dark background, colored nodes by category, green network links, golden glow |
135
+ | `minimal` | Subtle category colors, no background changes |
136
+ | `none` | Skip graph theming |
364
137
 
365
- ### Checkpoint (during heavy work)
366
- \`\`\`bash
367
- clawvault checkpoint --working-on "..." --focus "..." --blocked "..."
368
- \`\`\`
138
+ ## Vault Structure
369
139
 
370
140
  ```
141
+ memory/
142
+ ├── .clawvault.json # Vault config
143
+ ├── .clawvault/
144
+ │ └── graph-index.json # Knowledge graph
145
+ ├── tasks/ # Active tasks (markdown + frontmatter)
146
+ ├── backlog/ # Ideas and future work
147
+ ├── decisions/ # Choices with reasoning
148
+ ├── lessons/ # Things learned
149
+ ├── people/ # One file per person
150
+ ├── projects/ # Active work
151
+ ├── commitments/ # Promises and deadlines
152
+ ├── inbox/ # Quick captures
153
+ ├── handoffs/ # Session continuity
154
+ ├── ledger/
155
+ │ ├── raw/ # Raw session transcripts
156
+ │ ├── observations/ # Compressed observations
157
+ │ └── reflections/ # Weekly reflections
158
+ ├── all-tasks.base # Obsidian Bases view
159
+ ├── by-owner.base # Tasks by owner
160
+ └── dashboard.canvas # Generated dashboard
161
+ ```
162
+
163
+ ## For OpenClaw Agents
371
164
 
372
- ## Templates
373
-
374
- ClawVault includes templates for common memory types:
165
+ ```bash
166
+ # Install as a skill
167
+ clawhub install clawvault
375
168
 
376
- - `decision.md` Choices with context and reasoning
377
- - `lesson.md` Things learned
378
- - `person.md` — People you work with
379
- - `project.md` — Active work
380
- - `handoff.md` — Session state before context death
381
- - `daily.md` — Daily notes
169
+ # Or add to your agent's tools
170
+ npm install -g clawvault
171
+ ```
382
172
 
383
- Use with: `clawvault store -c category -t "Title" -f decision`
173
+ Add to your `AGENTS.md`:
384
174
 
385
- ## Library Usage
175
+ ```markdown
176
+ ## Memory
177
+ - `clawvault wake` on session start
178
+ - `clawvault sleep "summary" --next "next steps"` on session end
179
+ - `clawvault checkpoint` every 10-15 min during heavy work
180
+ - `clawvault remember <type> "title" --content "..."` for important items
181
+ - `clawvault search "query"` before asking questions
182
+ ```
386
183
 
387
- ```typescript
388
- import { ClawVault, createVault, findVault } from 'clawvault';
184
+ ## Requirements
389
185
 
390
- const vault = await createVault('./memory', { qmdCollection: 'my-memory' });
186
+ - **Node.js 18+**
187
+ - **[qmd](https://github.com/Versatly/qmd)** — Local semantic search (optional but recommended)
391
188
 
392
- await vault.store({
393
- category: 'decisions',
394
- title: 'Use ClawVault',
395
- content: 'Decided to use ClawVault for memory.',
396
- });
189
+ ## Docs
397
190
 
398
- const results = await vault.find('memory', { limit: 5 });
399
- ```
191
+ Full documentation at **[docs.clawvault.dev](https://docs.clawvault.dev)**
400
192
 
401
193
  ## License
402
194
 
@@ -404,4 +196,4 @@ MIT
404
196
 
405
197
  ---
406
198
 
407
- *"An elephant never forgets."Now neither do you.* 🐘
199
+ *Built by [Versatly](https://versatly.com)autonomous AI employees for businesses.* 🐘
@@ -13,6 +13,13 @@ export function registerCoreCommands(
13
13
  .option('-n, --name <name>', 'Vault name')
14
14
  .option('--qmd', 'Set up qmd semantic search collection')
15
15
  .option('--qmd-collection <name>', 'qmd collection name (defaults to vault name)')
16
+ .option('--no-bases', 'Skip Obsidian Bases file generation')
17
+ .option('--no-tasks', 'Skip tasks/ and backlog/ directories')
18
+ .option('--no-graph', 'Skip initial graph build')
19
+ .option('--categories <list>', 'Comma-separated list of custom categories to create')
20
+ .option('--canvas <template>', 'Generate a canvas dashboard on init (default, brain, project-board, sprint)')
21
+ .option('--theme <style>', 'Graph color theme to apply (neural, minimal, none)', 'none')
22
+ .option('--minimal', 'Create minimal vault (memory categories only, no tasks/bases/graph)')
16
23
  .action(async (vaultPath, options) => {
17
24
  const targetPath = vaultPath || '.';
18
25
  console.log(chalk.cyan(`\n🐘 Initializing ClawVault at ${path.resolve(targetPath)}...\n`));
@@ -67,10 +74,26 @@ export function registerCoreCommands(
67
74
  program
68
75
  .command('setup')
69
76
  .description('Auto-discover and configure a ClawVault')
70
- .action(async () => {
77
+ .option('--graph-colors', 'Set up graph color scheme for Obsidian')
78
+ .option('--no-graph-colors', 'Skip graph color configuration')
79
+ .option('--bases', 'Generate Obsidian Bases views for task management')
80
+ .option('--no-bases', 'Skip Bases file generation')
81
+ .option('--canvas [template]', 'Generate canvas dashboard (default, brain, project-board, sprint)')
82
+ .option('--no-canvas', 'Skip canvas generation')
83
+ .option('--theme <style>', 'Graph color theme (neural, minimal, none)', 'neural')
84
+ .option('--force', 'Overwrite existing configuration files')
85
+ .option('-v, --vault <path>', 'Vault path')
86
+ .action(async (options) => {
71
87
  try {
72
88
  const { setupCommand } = await import('../dist/commands/setup.js');
73
- await setupCommand();
89
+ await setupCommand({
90
+ graphColors: options.graphColors,
91
+ bases: options.bases,
92
+ canvas: options.canvas,
93
+ theme: options.theme,
94
+ force: options.force,
95
+ vault: options.vault
96
+ });
74
97
  } catch (err) {
75
98
  console.error(chalk.red(`Error: ${err.message}`));
76
99
  process.exit(1);
@@ -242,12 +242,28 @@ export function registerTaskCommands(
242
242
  .description('Generate Obsidian canvas dashboard')
243
243
  .option('-v, --vault <path>', 'Vault path')
244
244
  .option('--output <path>', 'Output file path (default: dashboard.canvas)')
245
+ .option('--template <id>', 'Canvas template ID (default, project-board, brain, sprint)')
246
+ .option('--project <project>', 'Project filter for template-aware canvases')
247
+ .option('--owner <owner>', 'Filter tasks by owner (agent name or human)')
248
+ .option('--width <pixels>', 'Canvas width in pixels', parseInt)
249
+ .option('--height <pixels>', 'Canvas height in pixels', parseInt)
250
+ .option('--include-done', 'Include completed tasks (default: limited)')
251
+ .option('--list-templates', 'List available canvas templates and exit')
245
252
  .action(async (options) => {
246
253
  try {
247
- const vaultPath = resolveVaultPath(options.vault);
254
+ const vaultPath = options.listTemplates
255
+ ? (options.vault || '.')
256
+ : resolveVaultPath(options.vault);
248
257
  const { canvasCommand } = await import('../dist/commands/canvas.js');
249
258
  await canvasCommand(vaultPath, {
250
- output: options.output
259
+ output: options.output,
260
+ template: options.template,
261
+ project: options.project,
262
+ owner: options.owner,
263
+ width: options.width,
264
+ height: options.height,
265
+ includeDone: options.includeDone,
266
+ listTemplates: options.listTemplates
251
267
  });
252
268
  } catch (err) {
253
269
  console.error(chalk.red(`Error: ${err.message}`));
@@ -0,0 +1,24 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { Command } from 'commander';
3
+ import { registerTaskCommands } from './register-task-commands.js';
4
+ import { chalkStub, stubResolveVaultPath } from './test-helpers/cli-command-fixtures.js';
5
+
6
+ describe('register-task-commands', () => {
7
+ it('adds canvas template and listing flags', () => {
8
+ const program = new Command();
9
+ registerTaskCommands(program, {
10
+ chalk: chalkStub,
11
+ resolveVaultPath: stubResolveVaultPath
12
+ });
13
+
14
+ const canvasCommand = program.commands.find((command) => command.name() === 'canvas');
15
+ expect(canvasCommand).toBeDefined();
16
+
17
+ const optionFlags = canvasCommand?.options.map((option) => option.flags) ?? [];
18
+ expect(optionFlags).toEqual(expect.arrayContaining([
19
+ '--template <id>',
20
+ '--list-templates',
21
+ '--project <project>'
22
+ ]));
23
+ });
24
+ });