Schema Diagrams
Visual reference for how the data schema fits together. All diagrams are derived from data/schema.ts.
Entity-Relationship Overview
This ER diagram shows the core data types and how they reference each other. Primary keys are marked; foreign key references show how entities cross-link.
Diagram (loading…)
erDiagram
Entity ||--o{ RelatedEntry : "relatedEntries"
Entity ||--o{ EntitySource : "sources"
Entity ||--o{ ContentSection : "content.sections"
Entity ||--o| EntityContent : "content"
Entity ||--o| ParameterDistinctions : "parameterDistinctions"
Entity }o--o{ Resource : "resources (by ID)"
Entity }o--o| CauseEffectGraph : "embedded graph"
Expert ||--o{ ExpertPosition : "positions"
Expert }o--o| Organization : "affiliation"
Organization ||--o{ Expert : "keyPeople"
Estimate ||--o{ EstimateSource : "estimates"
Crux ||--o{ CruxPosition : "positions"
Graph ||--o{ GraphNode : "nodes"
Graph ||--o{ GraphEdge : "edges"
MasterGraph ||--o{ MasterGraphNode : "nodes"
MasterGraph ||--o{ MasterGraphEdge : "edges"
MasterGraph ||--o{ SubgraphSpec : "subgraphs"
CauseEffectGraph ||--o{ CauseEffectNode : "nodes"
CauseEffectGraph ||--o{ CauseEffectEdge : "edges"
FactsFile ||--o{ Fact : "facts"
Entity {
string id PK
EntityType type
string title
string description
string status
string wikiId UK
}
RelatedEntry {
string id FK
EntityType type
RelationshipType relationship
string strength
}
Expert {
string id PK
string name
string affiliation FK
string role
}
Organization {
string id PK
string name
OrgType type
string founded
}
Resource {
string id PK
string url
string title
ResourceType type
number importance
}
Fact {
string entity FK
string factId PK
string value
number numeric
string compute
}Entity Base Fields (Class Diagram)
Every entity shares these fields. Type-specific fields (like severity for risks or orgType for organizations) are layered on top.
Diagram (loading…)
classDiagram
class Entity {
+String id
+EntityType type
+String title
String description
String[] aliases
EntityContent content
EntityStatus status
String lastUpdated
String[] tags
Cluster[] clusters
String severity
Likelihood likelihood
Timeframe timeframe
ResearchMaturity maturity
String website
CustomField[] customFields
String[] relatedTopics
RelatedEntry[] relatedEntries
EntitySource[] sources
String[] resources
ParameterDistinctions parameterDistinctions
}
class EntityContent {
String intro
ContentSection[] sections
String footer
}
class ContentSection {
+String heading
String body
String mermaid
ContentTable table
String component
Record componentProps
}
class RelatedEntry {
+String id
+EntityType type
RelationshipType relationship
String strength
}
class CustomField {
+String label
+String value
}
class EntitySource {
+String title
String url
String author
String date
}
Entity *-- EntityContent
Entity *-- RelatedEntry
Entity *-- CustomField
Entity *-- EntitySource
EntityContent *-- ContentSectionStandalone Data Types
These types have their own YAML files and are separate from the entity system.
Expert & Organization
Diagram (loading…)
classDiagram
class Expert {
+String id
+String name
String affiliation
String role
String website
ExpertPosition[] positions
}
class ExpertPosition {
+String topic
+String view
String estimate
Confidence confidence
String date
}
class Organization {
+String id
+String name
+OrgType type
String founded
String headquarters
String[] keyPeople
String funding
}
Expert *-- ExpertPosition
Expert --> Organization : affiliation
Organization --> Expert : keyPeopleEstimate & Crux
Diagram (loading…)
classDiagram
class Estimate {
+String id
+String variable
String unit
String category
EstimateSource[] estimates
}
class EstimateSource {
+String source
+String value
String date
Confidence confidence
}
class Crux {
+String id
+String question
+Importance importance
String resolvability
CruxPosition[] positions
String[] relatedCruxes
}
Estimate *-- EstimateSourceResource & Publication
Diagram (loading…)
classDiagram
class Resource {
+String id
+String url
+String title
ResourceType type
String[] authors
Number importance
String summary
String review
String publication_id
}
class Publication {
+String id
+String name
+PublicationType type
+Number credibility
Boolean peer_reviewed
}
Resource --> Publication : publication_idGraph Systems
The wiki has three distinct graph systems for different purposes.
1. Cause-Effect Graphs (Entity-embedded)
Used on individual entity pages to show causal factors. Rendered with React Flow.
Diagram (loading…)
classDiagram
class CauseEffectGraph {
String title
String description
String primaryNodeId
CauseEffectNode[] nodes
CauseEffectEdge[] edges
}
class CauseEffectNode {
+String id
+String label
String description
NodeType type
Number confidence
String details
String entityRef
NodeScores scores
String color
}
class CauseEffectEdge {
String id
+String source
+String target
Strength strength
Confidence confidence
Effect effect
String label
}
class NodeScores {
Number novelty
Number sensitivity
Number changeability
Number certainty
}
CauseEffectGraph *-- CauseEffectNode
CauseEffectGraph *-- CauseEffectEdge
CauseEffectNode *-- NodeScores
note for CauseEffectNode "type: leaf | cause | intermediate | effect"
note for CauseEffectEdge "effect: increases | decreases | mixed"2. Risk Dependency Graphs (Standalone)
Used for modeling risk dependencies across the system.
Diagram (loading…)
classDiagram
class Graph {
+String id
+String title
String description
GraphNode[] nodes
GraphEdge[] edges
}
class GraphNode {
+String id
+String label
+Category category
String description
String entityRef
}
class GraphEdge {
+String from
+String to
+EdgeType type
String label
Importance strength
}
Graph *-- GraphNode
Graph *-- GraphEdge
note for GraphNode "category: crux | risk | outcome | capability | intervention"
note for GraphEdge "type: causes | mitigates | requires | enables | blocks"3. Master Graph (Unified causal model)
A single large graph that entity pages extract subgraphs from. Supports multi-page views with per-entity highlighting.
Diagram (loading…)
classDiagram
class MasterGraph {
+String id
+String title
String version
MasterGraphNode[] nodes
MasterGraphEdge[] edges
SubgraphSpec[] subgraphs
Group[] groups
}
class MasterGraphNode {
+String id
+String label
+NodeType type
String ownerEntityId
String entityRef
String group
Number confidence
}
class SubgraphSpec {
+String entityId
+String centerNode
Number depth
String[] includeNodes
String[] excludeNodes
}
MasterGraph *-- MasterGraphNode
MasterGraph *-- SubgraphSpecRelationship Types (45 total)
All relationship types grouped by semantic category. "A → B" means "A [relationship] B".
| Category | Types | Semantics |
|---|---|---|
| Causal | causes, cause, drives, driven-by, driver, affects, amplifies, leads-to, contributes-to, shaped-by | A influences or produces B |
| Mitigation | mitigates, mitigated-by, mitigation, blocks, addresses | A reduces or prevents B |
| Dependency | requires, enables, prerequisite, child-of, composed-of, component, supersedes | A structurally depends on or contains B |
| Measurement | measures, measured-by, analyzes, analyzed-by, models, increases, decreases, supports | A quantifies or tracks B |
| Classification | related, example, mechanism, outcome, consequence, manifestation, key-factor, scenario, sub-scenario, research, vulnerable-technique | A is categorically related to B |
How relationships flow through the system:
Diagram (loading…)
flowchart TD A[Entity A] -->|"relatedEntries"| B[Entity B] B -.->|"backlink<br/>(auto-computed)"| A style A fill:#cceeff style B fill:#cceeff
Enum Reference
EntityType (24 canonical + 11 aliases)
Canonical types by group:
| Group | Types |
|---|---|
| Content | risk, risk-factor, capability, concept, crux, argument, case-study |
| Safety | safety-agenda, approach, project, policy |
| People/Orgs | person, organization, funder |
| Analysis | model, parameter, metric, analysis, scenario |
| Other | resource, historical, event, debate, table, diagram, insight, intelligence-paradigm |
Legacy aliases (kept for backward compatibility):
| Alias | Resolves to |
|---|---|
researcher | person |
lab, lab-frontier, lab-research, lab-startup, lab-academic | organization |
safety-approaches | safety-agenda |
policies | policy |
concepts | concept |
events | event |
models | model |
Key Enum Values
| Enum | Values |
|---|---|
| Confidence | low, medium, high |
| Importance | low, medium, high, critical |
| EntityStatus | stub, draft, published, verified |
| ResearchMaturity | Neglected, Emerging, Growing, Mature |
| OrgType | frontier-lab, safety-org, academic, government, funder, policy |
| RiskCategory | accident, misuse, structural, epistemic |
| Severity | low, medium, medium-high, high, critical, catastrophic |
| LikelihoodLevel | low, medium, medium-high, high, very-high, near-certain |
| LikelihoodStatus | theoretical, emerging, occurring, established |
| ResourceType | paper, blog, report, book, talk, podcast, government, reference, web |
| PublicationType | academic_journal, preprint_server, think_tank, company_blog, government, blog_platform, news, organization, academic, code_repository, + more |
| Cluster | ai-safety, biorisks, cyber, epistemics, governance, community |
| Relationship Strength | weak, moderate, strong |
| CauseEffect Strength | weak, medium, strong |
| CauseEffect Effect | increases, decreases, mixed |
Data Flow: Build Pipeline
How build-data.mjs transforms raw data into the runtime database.
Diagram (loading…)
flowchart TD
subgraph Input["Source Files"]
YAML["YAML data"]
MDX["MDX pages"]
end
subgraph Parse["1. Parse & Merge"]
P1["Parse YAML"]
P2["Scan frontmatter"]
P3["Auto-create entities"]
end
subgraph Transform["2. Transform"]
T1["Assign numeric IDs"]
T2["Validate with Zod"]
T3["Compute backlinks"]
end
subgraph Enrich["3. Enrich"]
E1["Resolve facts"]
E2["Build indices"]
E3["Generate search"]
end
subgraph Output["Output"]
DB["database.json"]
end
Input --> Parse
Parse --> Transform
Transform --> Enrich
Enrich --> Output
style Input fill:#fff4e1
style Parse fill:#cceeff
style Transform fill:#e1f5ff
style Enrich fill:#cceeff
style Output fill:#ccffccDetailed steps within build-data.mjs:
| Phase | Steps |
|---|---|
| Parse | Parse all YAML files, scan MDX frontmatter, auto-create entities for MDX pages without YAML |
| Transform | Collect numeric IDs from source files, type and validate against Zod, compute backlinks (invert relatedEntries) |
| Enrich | Build tag index, build path registry, resolve computed facts (topological sort), generate search index, generate MDX stubs from YAML ContentSections |
| Output | Write database.json, individual JSON files, search index |
Facts System
Facts are canonical, referenceable values that can be computed from expressions referencing other facts.
Diagram (loading…)
classDiagram
class FactsFile {
+String entity
+Record facts
}
class Fact {
String value
Number numeric
String asOf
String source
String note
Boolean noCompute
String compute
String format
Number formatDivisor
}
FactsFile *-- Fact
note for Fact "compute: expression referencing other facts
e.g. {anthropic.valuation} * {rate}
Resolved via topological sort at build time"Example fact file (data/facts/anthropic.yaml):
entity: anthropic
facts:
founding-year:
value: "2021"
numeric: 2021
source: "Wikipedia"
valuation:
compute: "{anthropic.funding} * 1.5"
format: "$%.1f billion"
formatDivisor: 1e9
Content Freshness Tracking
MDX frontmatter can include freshness metadata to track content staleness:
reviewBy: "2026-06-26" # When content should be reviewed
contentDependencies: # Entity IDs that affect this content
- deceptive-alignment
- mesa-optimization
lastReviewed: "2025-12-26"
reviewedBy: "ozzie"
stalenessRisk: "low" # low | medium | high
Source of truth: data/schema.ts (834 lines)