Install
openclaw skills install @space-cadet/mb-db-workflowRecord and read Memory Bank state via mb-cli. Use for projects with memory-bank/database/ and a memory_bank.db. Triggers on: db workflow, record session work, regenerate memory bank, update tasks.
openclaw skills install @space-cadet/mb-db-workflowUse the mb CLI to read and write project memory banks that use the SQLite backend. Do not hand-edit generated markdown files — they are overwritten on regeneration.
mb CLI is installed and on PATHmemory-bank/database/ (create with mb init --database)memory-bank/database/memory_bank.db (create with mb db init)# List tasks
mb task list
mb task list --status in_progress
# Show task details
mb task show T25
# Query DB directly (table output)
mb db query "SELECT * FROM task_items WHERE status = 'in_progress'"
# Query DB (JSON output)
mb db query "SELECT * FROM edit_entries ORDER BY timestamp DESC LIMIT 5" --json
# List sessions
mb session list
# Show session cache
mb session cache
# Record edit entry + file changes + optional status update
mb workflow --task T3 --description "Implemented feature X" \
--files "Created:src/feature.js,Modified:src/app.js" \
--status in_progress --period afternoon
# Same, but also regenerate all markdown files immediately
mb workflow --record --regenerate --task T3 \
--description "Implemented feature X" \
--files "Created:src/feature.js" --status completed
# Regenerate markdown without recording new work
mb workflow --regenerate
mb task create "Build quantum simulator" --id T26 --priority high
mb task update T26 --status in_progress
mb task delete T26 --yes
mb session start --focus T26 --period afternoon
mb session complete --notes "Finished core logic"
When mb-core template files change, update the project's DB files:
mb db sync --all # Sync everything
mb db sync --libs # Sync lib/ only (workflow.js, inserts.js, regenerate.js, sqlite.js)
mb db sync --parsers # Sync parser scripts only
mb db sync --dry-run # Preview what would change
The DB workflow automates the chronological layer (edit entries, tasks, sessions). You must still maintain the knowledge layer manually:
implementation-details/ — architecture, design decisionstechContext.md — system architecture, dependenciesproductContext.md — goals, user storiessystemPatterns.md — established patternsAnti-pattern: "The DB workflow handled the update, so I'm done." It only writes the timeline. The knowledge layer requires manual attention.
--files uses comma-separated action:path pairs:
Created:src/index.jsModified:lib/util.jsUpdated:package.jsonDeleted:old-file.jsExample:
mb workflow --task T1 --description "Setup project" \
--files "Created:package.json,Modified:README.md,Deleted:legacy.py"
mb workflow — Low-level: record work, optionally regenerate. Explicit flags for each action.mb update — High-level: combines record + regenerate in one shot. Simpler but less granular.Use mb workflow when you need precise control. Use mb update for quick session wraps.
edit_history.md, tasks.md, session_cache.md) — they are overwritten on regenerationmemory-bank/database/schema.sql--files with spaces around the colon — use action:path exactlymb db init then mb init --databasemb db sync --libsmb db sync --database-files to refresh schema.sqlreferences/api-reference.md — Full JS library API (recordSessionWork, regenerateAll, etc.)references/schema.sql — Full SQLite schemareferences/integrated-rules-v6.12.md — Complete v6.12 protocol rules