Skip to content
Longterm Wiki
Updated 2026-02-17HistoryData
Page StatusDocumentation
Edited 7 weeks ago667 words2 backlinksUpdated bimonthlyDue in 2 weeks
Content3/13
SummaryScheduleEntityEdit historyOverview
Tables5/ ~3Diagrams11Int. links0/ ~5Ext. links0/ ~3Footnotes0/ ~2References0/ ~2Quotes0Accuracy0Backlinks2

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 *-- ContentSection

Standalone 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 : keyPeople

Estimate & 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 *-- EstimateSource

Resource & 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_id

Graph 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 *-- SubgraphSpec

Relationship Types (45 total)

All relationship types grouped by semantic category. "A → B" means "A [relationship] B".

CategoryTypesSemantics
Causalcauses, cause, drives, driven-by, driver, affects, amplifies, leads-to, contributes-to, shaped-byA influences or produces B
Mitigationmitigates, mitigated-by, mitigation, blocks, addressesA reduces or prevents B
Dependencyrequires, enables, prerequisite, child-of, composed-of, component, supersedesA structurally depends on or contains B
Measurementmeasures, measured-by, analyzes, analyzed-by, models, increases, decreases, supportsA quantifies or tracks B
Classificationrelated, example, mechanism, outcome, consequence, manifestation, key-factor, scenario, sub-scenario, research, vulnerable-techniqueA 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:

GroupTypes
Contentrisk, risk-factor, capability, concept, crux, argument, case-study
Safetysafety-agenda, approach, project, policy
People/Orgsperson, organization, funder
Analysismodel, parameter, metric, analysis, scenario
Otherresource, historical, event, debate, table, diagram, insight, intelligence-paradigm

Legacy aliases (kept for backward compatibility):

AliasResolves to
researcherperson
lab, lab-frontier, lab-research, lab-startup, lab-academicorganization
safety-approachessafety-agenda
policiespolicy
conceptsconcept
eventsevent
modelsmodel

Key Enum Values

EnumValues
Confidencelow, medium, high
Importancelow, medium, high, critical
EntityStatusstub, draft, published, verified
ResearchMaturityNeglected, Emerging, Growing, Mature
OrgTypefrontier-lab, safety-org, academic, government, funder, policy
RiskCategoryaccident, misuse, structural, epistemic
Severitylow, medium, medium-high, high, critical, catastrophic
LikelihoodLevellow, medium, medium-high, high, very-high, near-certain
LikelihoodStatustheoretical, emerging, occurring, established
ResourceTypepaper, blog, report, book, talk, podcast, government, reference, web
PublicationTypeacademic_journal, preprint_server, think_tank, company_blog, government, blog_platform, news, organization, academic, code_repository, + more
Clusterai-safety, biorisks, cyber, epistemics, governance, community
Relationship Strengthweak, moderate, strong
CauseEffect Strengthweak, medium, strong
CauseEffect Effectincreases, 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:#ccffcc

Detailed steps within build-data.mjs:

PhaseSteps
ParseParse all YAML files, scan MDX frontmatter, auto-create entities for MDX pages without YAML
TransformCollect numeric IDs from source files, type and validate against Zod, compute backlinks (invert relatedEntries)
EnrichBuild tag index, build path registry, resolve computed facts (topological sort), generate search index, generate MDX stubs from YAML ContentSections
OutputWrite 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)