Migrating your OpenClaw brain to modusbrain v0.41.2.0 (greenfield)
The v0.41.2.0 lens packs ship a one-shot importer that re-ingests your existing OpenClaw brain (~/git/brain/atoms/, concepts/, ideas/)
through the new ingestion cathedral. Pages land in modusbrain with an
imported_from: markdown-greenfield frontmatter marker so the new
extract_atoms + synthesize_concepts cycle phases skip them (lossless
import with provenance).
Before you migrate
-
Upgrade modusbrain to v0.41.2.0+:
-
Activate the creator pack (or modusbrain-everything if you also
want investor + engineer lenses on the same brain):
-
Apply schema migration v94 (take_domain_assignments table):
The dry-run pass
Always start with--dry-run to see what the importer would do
without writing anything:
emitted— atoms/concepts/ideas that would import cleanlyskipped_no_type— files without atype:frontmatter (counted as benign skips; no audit appended)skipped_invalid— files that failed validation (these append to~/.modusbrain/audit/markdown-greenfield-failures-YYYY-Www.jsonl)
- Empty frontmatter — file has
---but no fields. Not a real brain page; safe to leave skipped. - Malformed YAML — fix the file in your OpenClaw then re-run.
- Missing required field — usually means the original OpenClaw skill output a partial page; check whether the file is worth preserving.
The actual import
When the dry-run looks clean, drop the--dry-run and --limit
flags:
- Walks
atoms/{YYYY-MM-DD}/*.md,concepts/*.md,ideas/*.mdin deterministic alphabetical order so partial-run resumes pick up where they left off. - Stamps
imported_from: markdown-greenfield+imported_at: <ISO timestamp>on every page’s frontmatter, preserving ALL original fields verbatim undermetadata.original_frontmatter. - Emits each as an IngestionEvent with
mode: 'migration'(T2), which bypasses the daemon’s 24h DedupWindow. The importer owns its own permanent slug-keyed idempotency. - Routes through
put_pageso pages land with proper FK chains and embedding eligibility.
After the import
Verify counts match:modusbrain dream cycle will:
- Run
extract_atomson NEW transcripts (skips pages with theimported_frommarker — your historical atoms are frozen, not re-extracted). - Run
synthesize_conceptson NEW atoms (skips imported concepts for the same reason). - Run
extract_factsover the imported pages — facts fences in imported atoms/concepts populate the facts table normally.
Retiring your OpenClaw’s parallel crons
After verifying the import, retire your OpenClaw’s parallel atom pipeline cron entries. In~/git/your-openclaw/workspace/cron.json:
- Remove
atom-pipeline-coordinator(every-30-min cron) - Remove
atom-backfill-coordinator(every-10-min cron)
content-atom-extractor→ callsmodusbrain dream --phase extract_atomsconcept-synthesis→ callsmodusbrain dream --phase synthesize_conceptsatom-backfill-coordinator→ DELETED (backfill is now part of extract_atoms via the Source Quote + lesson enrichment in one Haiku call per transcript)
Rolling back
The import is fully reversible:~/git/brain/atoms/ + concepts/ + ideas/ directories
are untouched by the importer — they remain the source of truth for
rollback. The greenfield importer only READS from them.
Re-running after partial failures
The importer is idempotent at the page-slug level: re-running on the same--repo produces zero net-new pages (every page either lands
fresh or matches an existing slug). If you fix some validation
failures in your OpenClaw and want to retry just those: