How scottidler/second-brain works
second-brain is a Rust workspace centered on one shared Obsidian vault: borg captures and distills incoming material, cortex governs and enriches vault notes, and oracle exposes knowledge retrieval through MCP. The principal path runs from a capture source through borg’s ingest pipeline and per-kind distillation into vault notes; users then query those notes through oracle. The README documents transport, governance, intel, embedding, and retrieval capabilities. Some subsystem links reflect README documentation or module responsibilities because their implementation was not sampled.
Main entry points: pipeline.rs Ingest pipeline · cli.rs sb command line · lib.rs Cortex daemon · server.rs Oracle MCP
Components 19
Capture and distill
- HTTP capture
borg/src/routes.rs - Messaging transports
borg/src - Ingest pipeline
borg/src/pipeline.rs - Media handlers
borg/src/pipeline/handlers.rs - Kind distillers
distillers/src/lib.rs
Shared vault
- Obsidian notes
- Vault services
vault/src/lib.rs - Search index
vault/src/search/query.rs - Ingest ledger
borg/src/ledger.rs
Vault governance
- Cortex daemon
cortex/src/lib.rs - Lint and links
cortex/src - Intel and embedding
cortex/src
Knowledge retrieval
- Oracle MCP
oracle/src/server.rs - Retrieval pipeline
oracle/src/server/pipeline.rs - Knowledge tools
oracle/src/tools.rs
CLI operations
- sb command line
sb/src/cli.rs
Other components
- Capture sources
- Fabric patterns
- People and clients
Connections 24
- Capture sources → HTTP capture: submit capture
- Capture sources → Messaging transports: send content
- HTTP capture → Ingest pipeline: dispatch ingest
- Messaging transports → Ingest pipeline: dispatch ingest
- Ingest pipeline → Media handlers: process media
- Ingest pipeline → Kind distillers: distill content
- Media handlers → Kind distillers: distill media
- Kind distillers → Fabric patterns: invoke patterns
- Ingest pipeline → Vault services: write notes
- Ingest pipeline → Ingest ledger: record ingest
- Vault services → Obsidian notes: read and write
- Cortex daemon → Vault services: scan and update
- Cortex daemon → Lint and links: run governance
- Cortex daemon → Intel and embedding: run enrichment
- Intel and embedding → Vault services: enrich notes
- Oracle MCP → Knowledge tools: serve tools
- Oracle MCP → Retrieval pipeline: dispatch search
- Retrieval pipeline → Search index: retrieve notes
- Search index → Obsidian notes: index vault
- People and clients → sb command line: run commands
- sb command line → Ingest pipeline: invoke ingest
- sb command line → Cortex daemon: invoke tasks
- sb command line → Oracle MCP: launch server
- People and clients → Oracle MCP: query via MCP