← Reports

SecondBrain + 2ndbrain Wiki Architecture

How the Obsidian vault, structured wiki, and PKA operational vault work together · refreshed 2026-04-20 · replaces 2026-04-15 snapshot

What changed since 2026-04-15: GBrain hybrid-retrieval adapter wired into /search-brain and /wiki-query (2026-04-18). vault.db grew from 197 → 1,577 edges across 614 files. Added wiki-compiler skill (compiles SecondBrain notes → synthesized wiki pages with 2× retrieval boost). Clarified SecondBrain folder layout to match what GBrain actually indexes. Mac path is ~/cowork/SecondBrain; Luci sees PKA only via git pull.
System Topology (2026-04-20)
Elmar Obsidian app + mobile + Telegram Lucienne (Mac) Chief of Staff · owns vault.db SecondBrain Obsidian vault · ~/cowork/SecondBrain/ 2ndbrain Wiki ~/.claude/vault/wiki/ + SB/wiki/ PKA Vault vault.db + memory/ · ~/PKA/Vault/ Luci (Cloud) Hetzner server · owns mc.db GBrain — hybrid retrieval (keyword + vector + RRF) indexes both wikis + all SecondBrain · sub-second · 2× boost on compiled pages Skills (API Layer) Git Transport (15 min) on the Mac browses via Obsidian Telegram writes /wiki-compiler owns vault.db reads (git pull) /search-brain, /wiki-query indexes read-only
SecondBrain
~/cowork/SecondBrain/ (on Mac)
Personal Obsidian vault. Browsable on desktop + mobile. Human-optimized. Source of truth for all knowledge.
Folders (what GBrain indexes)
  • Meetings/ transcribed meeting notes
  • people/ contact notes
  • projects/ active project notes
  • tasks/ action items + due dates
  • daily/ YYYY-MM-DD daily notes
  • ideas/ captured thoughts (brain dumps)
  • inbox/ raw capture, awaiting sort
  • sources/emails/ email envelopes
  • sources/email-attachments/ PDF/DOCX → md
  • sources/exco/ weekly Exco reports
  • sources/family-docs/ Travel, Werda, etc.
  • wiki/projects/ compiled pages (2× boost)
Note Format
--- type: task|person|meeting status: active|done|pending tags: [topic, area] due: YYYY-MM-DD --- Body with [[wiki-links]]
Obsidian Features
  • Graph View (visual connections)
  • Backlinks (auto-generated)
  • Daily Notes
  • Mobile Sync (Obsidian Sync)
  • Obsidian CLI access
2ndbrain Wiki
~/.claude/vault/wiki/ + SecondBrain/wiki/
Synthesis layer. Compiled from raw SecondBrain notes; never hand-edited. 2× retrieval boost in GBrain.
_master-index.md
Top-level navigation across compiled wiki sections (identity, entities, contacts, work, etc.)
wiki/projects/
One page per project, synthesized from meeting notes + ideas + emails by /wiki-compiler
vault/wiki/ (sections)
identity / entities / contacts / work / preferences / infrastructure / references — durable reference content
How It's Built
  • /wiki-compiler reads raw notes
  • Synthesizes per-entity wiki pages
  • Updates only stale or named pages
  • Wikilinks cross-reference sources
  • Synced via conrelma/claude repo
Why "synthesis = 2× boost"
  • Raw notes = lots of duplication, hard to rank
  • Compiled wiki = one canonical answer per topic
  • GBrain weighs wiki-synthesis higher than source chunks
PKA Vault (Operational)
~/PKA/Vault/ (Mac) · ~/workspace/PKA/Vault/ (Luci)
Operational knowledge graph. Lucienne writes; Luci reads via git pull every 15 min.
Contents
  • vault.db SQLite + FTS5 index
  • memory/ durable reference knowledge
  • tasks/ YAML frontmatter tasks
  • projects/ project tracking
  • notes/ general notes (incl. arch docs)
  • entities/ people + orgs
  • config/ vault config
  • schema.sql DB definition
vault.db Stats (live)
  • files — 614 indexed
  • edges — 1,577 (knowledge graph)
  • search_fts — 660 docs (FTS5)
  • activity_log — 1,124 entries
  • tags / tag_assignments — topic index
  • relation_types — advised_by, assigned_to, blocks, attended_meeting, …
Key Tools
  • index.py — scans markdown, builds DB
  • vault_mcp.py — MCP query tools
  • gbrain — hybrid-retrieval frontend
Skills (API Layer)
Never edit files directly — skills are the interface between human and vaults. /search-brain + /wiki-query route through GBrain since 2026-04-18.
/brain Capture & auto-classify input into SecondBrain
/search-brain Hybrid keyword+vector search via GBrain (RRF fusion)
/wiki-query Cross-wiki search + synthesized answers via GBrain
/wiki-ingest Document → source + entity + concept pages
/wiki-compiler Raw notes → compiled wiki pages (2× boost)
/wiki-lint Health checks: broken links, orphans, stale pages
Actors & Transport
Who reads, who writes, and how data moves between machines.
Elmar (Human)
Browses SecondBrain via Obsidian desktop + mobile (Obsidian Sync). Sends tasks to Luci via Telegram. Talks to Lucienne in terminal on Mac.
Lucienne (Local Mac)
Chief of Staff. Owns SecondBrain + vault.db. Runs /brain, /wiki-compiler, /wiki-ingest, /search-brain. Assigns work to Luci by writing tasks to PKA repo.
Luci (Hetzner)
Pulls PKA repo every 15 min (read-only on vault.db). Owns Mission Control (mc.db, port 3001). Spawns ticket workers. Reachable via Telegram.
Git Repos (Transport)
  • conrelma/cowork → SecondBrain vault
  • conrelma/PKA → vault.db, memory/, tasks/, notes/
  • conrelma/claude → portable vault, skills
Data Flows
How information moves through the system today.
1
Capture
User input → /brain → classifies as task/person/idea/meeting/decision → writes markdown to SecondBrain/ with [[wiki-links]] → Obsidian detects change.
~/cowork/SecondBrain/{type}/ → .md with YAML frontmatter
2
Search (hybrid)
/search-brain calls gbrain.query() → hybrid keyword + vector + RRF → top 3-5 chunks → gbrain.get(slug) for full pages → prose answer with [[citations]].
GBrain MCP tool → ranked chunks across SB + wikis
3
Compile (synthesis)
/wiki-compiler reads raw notes for an entity (project / person / org) → synthesizes a single canonical wiki page in wiki/projects/. Pages get a 2× boost in GBrain ranking.
SB/{Meetings,ideas,sources}/* → SB/wiki/projects/{slug}.md
4
Index & Sync
index.py populates vault.db (614 files, 1577 edges, FTS5). GBrain re-indexes on file changes. Git syncs PKA vault.db every 15 min → Luci pulls read-only.
index.py --rebuild → vault.db · gbrain reindex → vector + keyword index
Source of Truth
Markdown files
Databases
Derived & rebuildable
Interface
Skills → GBrain
Transport
Git (every 15 min)