Omnigraph
Guides

Second Brain

A personal-life ontology. People, places, notes, tasks, projects, habits, and media. For individuals, not industries.

The second-brain cookbook is a minimal-but-comprehensive Omnigraph graph for individuals. 13 node types, 43 edge types, designed to feel light when you start and scale up gracefully. Ships with the fictional Alex Chen reference seed, 121 nodes across 12 types, 229 edges across 36 types.

This is the first non-SPIKE cookbook in the repo. There is no pattern / insight layer. That's industry-analysis machinery and gets in the way for personal use. The strategy layer can come back later as an extension if you want belief and decision tracking.

What this answers

The questions a personal-knowledge graph should actually answer:

  • Who haven't I talked to in a while that I want to?
  • What did Sarah recommend that I haven't read yet?
  • What do I still owe Theo?
  • What's on my mind about parenting / work / health?
  • Which projects are blocking which goals?
  • Where do my principles, habits, and decisions actually connect?

Layered architecture

Five clusters of node types, each addressing one slice of life:

  • People & Roles, Person, Organization
  • World & Time, Place, Event
  • Capture, Note with a kind enum (idea, journal, reflection, insight, principle, preference, quote, dream, question, decision)
  • Action & Structure, TaskProjectAreaGoal, plus Habit (combines GTD, PARA, and Atomic Habits)
  • Media + Provenance, Media (book / podcast / paper / etc.), Artifact (email / WhatsApp / voice memo / meeting note), Chunk for embedding-driven semantic search

Design choices worth knowing

  • Mandatory slug prefixes, per-, org-, pl-, ev-, nt-, tk-, proj-, area-, goal-, hab-, med-, art-. The graph relies on stable external identity.
  • "Me" convention, per-self with relation = self. All edges from yourself use that slug.
  • Email and conversation collapse into Artifact, thread_id property handles threading; InReplyTo edges for replies. No separate Email or Conversation types.
  • Habit completions are a [Date] array on the Habit node. No separate HabitCompletion node. Promote to a node only if per-completion notes become valuable.
  • Task.direction = i-owe / they-owe / mutual. Relationship-debt tracking without a separate Commitment node.
  • Cadence as a single cadence_days field on Person. Desired contact frequency. Drives "stale close friends" queries.
  • Health, finance, hobbies live as Area nodes with Notes attached, not their own node types. Domain-specific cookbooks (a health graph, say) can extend later.

Wow queries the seed lights up

# Close friends and their preferred cadence
omnigraph read --alias close-friends

# What did Theo and I do recently, and what do I owe him
omnigraph read --alias person-recent-events per-theo
omnigraph read --alias person-tasks-i-owe per-theo
omnigraph read --alias preferences-for-person per-theo

# Open relationship debts across everyone
omnigraph read --alias tasks-i-owe
omnigraph read --alias tasks-they-owe

# My operating principles + the habits motivated by them
omnigraph read --alias principles
omnigraph read --alias habit-principle hab-morning-pages

# What's on my mind right now
omnigraph read --alias open-questions
omnigraph read --alias notes-by-kind reflection

# Reading queue + who recommended what
omnigraph read --alias reading-queue
omnigraph read --alias person-recommendations per-kenji

Running it

git clone https://github.com/ModernRelay/omnigraph-cookbooks.git
cd omnigraph-cookbooks/second-brain

cp .env.omni.example .env.omni
set -a && source ./.env.omni && set +a

omnigraph query lint --schema ./schema.pg --query ./queries/people.gq

omnigraph init --schema ./schema.pg s3://omnigraph-local/repos/second-brain
omnigraph load --data ./seed.jsonl --mode overwrite s3://omnigraph-local/repos/second-brain

omnigraph-server --config ./omnigraph.yaml

omnigraph read --alias close-friends
omnigraph read --alias tasks-i-owe

Extending

The schema is the minimal core. Common extensions:

  • Strategy layer. Add Belief / OpenQuestion / Decision as first-class nodes (as in Pharma Intelligence) with SupportsBelief / ContradictsBelief / InformsQuestion edges from Note or Artifact. Turns this into a thinking partner, not just a data store.
  • Health cookbook. A sibling cookbook with full FHIR-grade HealthRecord / Measurement / Condition ontology.
  • Writing style / tone. A WritingStyle node per channel/audience for "draft a message in my voice."
  • Pattern emergence. Add a Theme node + NoteFormsTheme edge if you want explicit emergent-theme tracking without going full SPIKE.

When in doubt, prefer extending in a sibling cookbook over bloating this one.

Reference

On this page