Skip to content

Importing Memories

Daniel Nevoigt edited this page Jul 18, 2026 · 3 revisions

Importing Memories

🇬🇧 English

Your other AI tools already know you — bastra import brings that head start along instead of starting cold. Three paths, one gate: candidates land as checkbox lines in import-review.md at the vault root, and your next AI session distills accepted ones with you — proper type, concrete triggers, deduped against what the vault already holds. Nothing is ever saved without your accept.

0. No exports? The onboarding interview

A fresh vault offers to seed itself even without anything to import: pick what your memory will mainly hold — code & projects, company & decisions, life & knowledge, or a mix — and answer a handful of persona-aware questions (7 total, 3 optional). Every answer becomes a profile memory immediately (write_origin: "user-directed" — you answered in person, no review gate needed). Three surfaces, one interview: the vault map auto-opens it on a fresh vault, bastra onboard runs it in the terminal, and your AI session offers it conversationally — the most adaptive of the three. bastra onboard skip stops the nudge; re-running the interview overwrites your profile memories in place.

1. Memory lists

bastra import memories.txt             # a file
pbpaste | bastra import - chatgpt      # or paste via stdin

Where to get the list:

Tool Path
ChatGPT Settings → Personalization → Manage memories → copy
Claude Settings → memory text → copy
Gemini Settings → Saved Info → copy

One fact per line; bullets, numbering and JSON string arrays are all fine. The source label (chatgpt, claude, gemini, text) is detected from the filename or passed as the second argument. The vault map carries a visual sibling of this path: the import dialog behind the ↓ button in the topbar.

2. Full chat history (conversations.json)

bastra import conversations.json       # the official ChatGPT/Claude data export

This never stages raw chat history. The CLI keeps only your own messages (assistant turns are dropped), and queues them locally under ~/.bastra/ — the queue never leaves the machine, is deleted when mining completes, and bastra import clear discards it anytime.

Your AI session does the actual extraction — a session-grade model, not a local 4b one. The session hook announces a pending queue, so you can just say "mine the imported chat history": the session runs bastra import mine (one chunk of ~16k characters, newest conversations first), distills durable lessons, decisions and preferences, stages them as candidates, and repeats until the queue is drained. This is where years of chat history pay out.

3. Local rules files

bastra import rules

Scans the working directory for CLAUDE.md, AGENTS.md, .cursorrules and .cursor/rules/, plus the global ~/.claude/CLAUDE.md, and stages their list lines (prose, headings and fenced code stay out — rules files encode one rule per bullet). Rules files are dense with durable preferences; the review step is where project-specific noise gets filtered.

4. Whole folders (no review gate)

bastra import vault <dir> [label]

Imports a whole folder of foreign memory files in one command — the exception to the review gate, meant for bulk migrations of an existing vault-like collection. A tolerant Claude-Code adapter reads both frontmatter variants, files with or without wikilinks, and frontmatter-less legacy notes; everything else falls back to a generic markdown adapter (title from the first H1 or filename). The set lands isolated under memories/imported/<label>/ with namespaced ids and its own scope: nothing existing is read or modified, re-import is idempotent, and deleting that one folder removes the whole set. Hand-maintained index files are recognized as navigation and skipped. The map's import dialog has a matching folder section with a directory picker.

The review gate

Foreign memories are exactly what the vault's admission rules warn about: stale facts, negative capability claims, imperative self-directives. That's why every path stages instead of saving. Your next AI session sees the open candidates via the session hook and offers to distill them: accepted items become real memories (typed, triggered, deduped, stamped write_origin: "capture-review"); rejected ones are ticked off and never resurface — the staging file dedupes against every entry, including rejected ones.


🇩🇪 Deutsch

Deine anderen AI-Tools kennen dich schon — bastra import nimmt diesen Vorsprung mit, statt bei null anzufangen. Drei Wege, ein Gate: Kandidaten landen als Checkbox-Zeilen in import-review.md im Vault-Root, und deine nächste AI-Session destilliert akzeptierte gemeinsam mit dir — richtiger Typ, konkrete Trigger, dedupliziert gegen den Bestand. Nichts wird je ohne dein Okay gespeichert.

0. Keine Exporte? Das Onboarding-Interview

Ein frischer Vault bietet an, sich auch ohne Import-Material zu befüllen: Du wählst, was dein Gedächtnis hauptsächlich halten soll — Code & Projekte, Firma & Entscheidungen, Leben & Wissen oder ein Mix — und beantwortest eine Handvoll persona-bewusster Fragen (7 insgesamt, 3 optional). Jede Antwort wird sofort ein Profil-Memory (write_origin: "user-directed" — du hast selbst geantwortet, kein Review-Gate nötig). Drei Oberflächen, ein Interview: Die Vault-Map öffnet es bei frischem Vault automatisch, bastra onboard führt es im Terminal, und deine AI-Session bietet es im Gespräch an — die adaptivste der drei. bastra onboard skip beendet die Erinnerung; ein erneuter Durchlauf überschreibt die Profil-Memories an Ort und Stelle.

1. Memory-Listen

bastra import memories.txt             # eine Datei
pbpaste | bastra import - chatgpt      # oder Paste via stdin

Wo du die Liste findest:

Tool Pfad
ChatGPT Settings → Personalization → Manage memories → kopieren
Claude Settings → Memory-Text → kopieren
Gemini Settings → Saved Info → kopieren

Ein Fakt pro Zeile; Bullets, Nummerierung und JSON-String-Arrays funktionieren alle. Das Quell-Label (chatgpt, claude, gemini, text) wird aus dem Dateinamen erkannt oder als zweites Argument übergeben. Die Vault-Map trägt das visuelle Pendant dieses Wegs: den Import-Dialog hinter dem ↓-Button in der Topbar.

2. Komplette Chat-History (conversations.json)

bastra import conversations.json       # der offizielle ChatGPT-/Claude-Daten-Export

Hier wird nie rohe Chat-History gestaged. Die CLI behält nur deine eigenen Messages (Assistant-Antworten fliegen raus) und queued sie lokal unter ~/.bastra/ — die Queue verlässt nie die Maschine, wird nach dem Mining gelöscht, und bastra import clear verwirft sie jederzeit.

Die eigentliche Extraktion macht deine AI-Session — ein Session-Modell, kein lokales 4b-Modell. Der Session-Hook meldet eine wartende Queue, du sagst einfach „durchsuche die importierte Chat-History": Die Session ruft bastra import mine auf (ein Chunk mit ~16k Zeichen, neueste Conversations zuerst), destilliert dauerhafte Lessons, Entscheidungen und Präferenzen, staged sie als Kandidaten und wiederholt das, bis die Queue leer ist. Hier zahlen sich Jahre an Chat-History aus.

3. Lokale Rules-Dateien

bastra import rules

Scannt das Arbeitsverzeichnis nach CLAUDE.md, AGENTS.md, .cursorrules und .cursor/rules/ plus das globale ~/.claude/CLAUDE.md und staged deren Listen-Zeilen (Prosa, Überschriften und Code-Fences bleiben draußen — Rules-Dateien codieren eine Regel pro Bullet). Rules-Dateien sind dicht an dauerhaften Präferenzen; im Review-Schritt wird projekt-spezifisches Rauschen gefiltert.

4. Ganze Ordner (ohne Review-Gate)

bastra import vault <dir> [label]

Importiert einen ganzen Ordner fremder Memory-Dateien in einem Befehl — die Ausnahme vom Review-Gate, gedacht für Bulk-Migrationen einer bestehenden vault-artigen Sammlung. Ein toleranter Claude-Code-Adapter liest beide Frontmatter-Varianten, Dateien mit und ohne Wikilinks sowie frontmatter-lose Legacy-Notizen; alles andere fängt ein generischer Markdown-Adapter ab (Titel aus erster H1 oder Dateiname). Das Set landet isoliert unter memories/imported/<label>/ mit namespaced ids und eigenem Scope: Nichts Bestehendes wird gelesen oder verändert, Re-Import ist idempotent, und das Löschen dieses einen Ordners entfernt das ganze Set. Hand-gepflegte Index-Dateien werden als Navigation erkannt und übersprungen. Der Import-Dialog der Map hat eine passende Ordner-Sektion mit Verzeichnis-Picker.

Das Review-Gate

Fremde Memories sind genau das, wovor die Admission-Rules des Vaults warnen: veraltete Fakten, negative Capability-Claims, imperative Selbst-Anweisungen. Deshalb staged jeder Weg, statt zu speichern. Deine nächste AI-Session sieht die offenen Kandidaten über den Session-Hook und bietet die Destillation an: Akzeptierte werden echte Memories (typisiert, mit Triggern, dedupliziert, gestempelt mit write_origin: "capture-review"); abgelehnte werden abgehakt und tauchen nie wieder auf — die Staging-Datei dedupliziert gegen jeden Eintrag, auch abgelehnte.

Clone this wiki locally