How Lucienne and Luci share knowledge, store data, and recall past work
Date: 2026-04-07 | Implemented during MC-232 resolution
Lucienne OWNS Luci READS via git
| Table | Purpose |
|---|---|
| files | Index of all markdown files (PKA + personal vault) |
| edges | Typed relationships between files (belongs_to, references, assigned_to) |
| tags / tag_assignments | Tag taxonomy and file-tag mappings |
| sessions_index / sessions_fts | Indexed session transcripts with FTS5 search |
| activity_log | Lucienne's activity audit trail |
| search_fts | Full-text search across all indexed files |
Rebuilt by: python index.py --rebuild
Sessions indexed by: python session_indexer.py
Location: PKA/Vault/vault.db
Luci OWNS Lucienne READS via API
| Table | Purpose |
|---|---|
| tickets | MC ticket board (242 tickets) |
| ticket_comments / messages | Ticket conversation history |
| task_runs | Scheduler execution log (5,067 runs) |
| sessions_index / sessions_fts | Luci's indexed session transcripts (378) |
| heartbeats | Server health checks every 15 min |
| activity_log | Luci's activity audit trail |
Written by: mc_pickup.py, scheduler.py, heartbeat.py
Sessions indexed by: python session_indexer.py
Location: ~/workspace/mission-control/mc.db
The vault MCP server runs as a stdio process with each Claude Code session. Configured in .mcp.json on both local and Luci.
Memory files, tasks, projects, notes in PKA/Vault/. Personal vault data in ~/.claude/vault/.
Parses frontmatter, extracts wikilinks, creates typed edges, populates FTS5. Runs on each dashboard refresh.
Git-sync task on Luci pulls the repo. vault.db is included in git (Luci reads it). Luci never pushes vault.db changes back — .git/info/exclude prevents it.
Any Luci session can search Lucienne's memories, files, edges, and sessions via the same MCP tools.
mc_pickup.py, scheduler.py, heartbeat.py all write to mc.db. Session transcripts accumulate in ~/.claude/projects/.
378 sessions indexed with user requests, assistant summaries, tools used, files touched. Searchable via FTS5.
/api/v1/activity — Luci's activity log
/api/v1/sessions/search?q=... — search Luci's session transcripts
/api/v1/tickets — ticket board, comments, messages
session_search("telegram") returns 3 local + 3 Luci results merged. activity_log() merges both sides. luci_status() shows live Luci state.
Claude Code stores every conversation as JSONL files. The session indexer parses these and extracts structured data into SQLite with FTS5 search — turning raw transcripts into searchable institutional memory.
| Field | Source | Example |
|---|---|---|
| session_id | JSONL filename | 789e09ec-f299-... |
| started_at | First message timestamp | 2026-04-07T09:35:25Z |
| branch | Git branch at session start | master |
| user_requests | First line of each user message | "have a look at MC232" | "set everything up" |
| summary | First lines of assistant responses | "Let me boot up and pull that ticket..." |
| tools_used | All tool_use blocks | Bash, Read, Edit, Agent, SSH |
| key_files | File paths from Read/Edit/Write | vault_mcp.py, schema.sql, mc_pickup.py |
Run: python session_indexer.py (incremental) or python session_indexer.py --rebuild (full)
Local: indexes from ~/.claude/projects/-Users-elmar-PKA/ → vault.db
Luci: indexes from ~/.claude/projects/-home-lucienne-workspace/ → mc.db
| File | Location | Purpose |
|---|---|---|
vault.db | PKA/Vault/vault.db | Knowledge graph + session index (Lucienne owns) |
mc.db | Luci: ~/workspace/mission-control/mc.db | MC ops + session index (Luci owns) |
vault_mcp.py | PKA/vault_mcp.py + Luci: ~/workspace/vault_mcp.py | MCP server — 8 tools for memory recall |
session_indexer.py | PKA/session_indexer.py + Luci: ~/workspace/session_indexer.py | Mines JSONL transcripts into DB |
index.py | PKA/index.py | Markdown file indexer — builds vault.db knowledge graph |
schema.sql | PKA/Vault/schema.sql | Canonical vault.db schema (v2) |
mc_pickup.py | Luci: ~/workspace/mc_pickup.py | MC ticket dispatcher — now uses mc.db |
git-sync.md | Luci: ~/workspace/tasks/git-sync.md | Every 15 min — pull/push PKA, excludes vault.db |
.mcp.json | PKA/.mcp.json + Luci: ~/.claude/.mcp.json | MCP server configuration |
| Rule | Why |
|---|---|
| Lucienne NEVER writes to mc.db | mc.db is Luci's operational database — accessed via API only |
| Luci NEVER writes to vault.db | vault.db is in git — binary merge conflicts cause data loss (MC-232) |
| vault.db stays in git | Luci needs to read it (memories, knowledge graph) via git pull |
| vault.db excluded from Luci git staging | .git/info/exclude prevents Luci from pushing vault.db changes |
| Git-sync excludes vault.db, mc.db, .bak files | Prevents binary file conflicts and backup file noise |
| MCP tools merge both sides transparently | session_search, activity_log query local + Luci via API |
| Markdown is source of truth, DB is index | vault.db is rebuildable from files via index.py --rebuild |
python session_indexer.py periodically to index new sessions. Consider adding it as a scheduled task on Luci for automatic indexing.