Deep Dive ยท Knowledge Graph

Connecting Knowledge

22 relation types, path finding and context traversal โ€” how the graph works.

01
5 Categories, 22 Relation Types

Each relation has a direction and an automatic reverse. 'A depends on B' also creates 'B required by A'.

๐Ÿ”—
Structural
depends_on โ†” required_by
part_of โ†” contains
โšก
Causal
caused_by โ†” causes
fixed_by โ†” fixes
โš™๏ธ
Semantic
implements, supersedes
related_to
๐Ÿ“
Knowledge
validates, contradicts
documents, extends
โฉ
Workflow
precedes โ†” follows
blocks โ†” blocked_by
02
Finding Paths โ€” How Does A Connect to B?

The graph finds the shortest path between any two nodes. This reveals connections you wouldn't see immediately.

You: "Context Memory: How does the cache bug connect to the book structure?"

Claude: ๐Ÿ›ค๏ธ Path (3 hops):
  ๐Ÿ“Œ Cache Bug
  โ†“ caused by
  ๐Ÿ“Œ Multi-Tenant Decision
  โ†“ required by
  ๐Ÿ“Œ API Architecture
  โ†“ documents
  ๐Ÿ“Œ Book Structure
03
Context Retrieval โ€” Everything in N Hops

Before working on a topic, load all related context. Depth 1 = direct neighbors. Depth 2 = their neighbors too.

You: "Context Memory: Show me everything connected to the DB decision."

Claude: ๐ŸŒ Context for dec-001 (2 hops):
  โ—โ—‹ arch-001: REST API (architecture)
  โ—โ—‹ bug-001: Race Condition (bug)
  โ—โ—‹ pat-001: Repository Pattern (pattern)
  โ—โ— cfg-001: Redis Cache (config) โ† 2 hops
  โ—โ— les-001: N+1 Query Fix (lesson) โ† 2 hops
04
Mermaid โ€” See Your Graph

Export as Mermaid diagram for visual rendering. Color-coded by type, different arrow styles per relation. Open in Obsidian, GitHub, or mermaid.live.

graph LR
  dec_001["PostgreSQL"]:::dec
  arch_001["REST API"]:::arch
  bug_001["Race Condition"]:::bug
  arch_001 -->|depends on| dec_001
  bug_001 -.->|caused by| dec_001
  les_001 ==>|fixes| bug_001