Longterm Wiki

About This Wiki

About the Longterm Wiki

The Longterm Wiki is a strategic intelligence platform for AI safety prioritization. It serves as a decision-support tool for funders, researchers, and policymakers asking: "Where should the next marginal dollar or researcher-hour go?"

This page documents the technical side—how the wiki is built, how content is organized, and how to contribute.

For strategic vision and goals, see:


Content Architecture

Major Sections

SectionPurposeExamples
Knowledge BaseCore content on risks, interventions, organizations, peopleDeceptive Alignment, AI Safety Institutes
AI Transition ModelComprehensive factor network with outcomes and scenariosFactors, scenarios, quantitative estimates
ModelsAnalytical frameworks for understanding dynamicsRisk models, cascade models, governance models
ProjectPublic-facing documentation about LongtermWiki itselfVision, strategy, similar projects
InternalContributor documentation, style guides, technical referenceThis page, style guides, automation tools

Content Volume

The wiki contains approximately:

  • ~550 MDX pages across all sections
  • ~100 structured data entities (experts, organizations, cruxes, estimates)
  • ~80 analytical model pages with causal diagrams

Page Types and Templates

The wiki uses a two-level classification system.

Page Types (Validation Behavior)

TypeQuality Scored?Use Case
contentYesAll substantive knowledge base pages (default)
stubNoRedirects, brief profiles, placeholders
documentationNoStyle guides, internal docs (like this page)
overviewNo (auto)Index pages for navigation

Page Templates (Structure)

Templates determine expected structure and applicable style guide:

TemplateStyle Guide
knowledge-base-riskKnowledge Base Style Guide
knowledge-base-responseKnowledge Base Style Guide
knowledge-base-modelModel Style Guide
ai-transition-model-factorATM Style Guide

For complete details, see Page Type System.


Quality System

Rating Dimensions

Content pages are scored on six dimensions (0-10 scale, harsh—7+ is exceptional):

DimensionWhat It Measures
FocusDoes it answer the title's promise?
NoveltyValue beyond obvious sources
RigorEvidence quality and precision
CompletenessThorough coverage of claimed topic
ConcretenessSpecific vs. abstract recommendations
ActionabilityCan readers make different decisions?

These combine into an overall quality score (0-100).

Quality Pipeline

Quality must only be set through the grading pipeline, never manually:

# Grade a specific page
npm run crux -- content grade --page scheming --apply

# Grade all ungraded pages
node scripts/content/grade-content.mjs --skip-graded --apply

For grading criteria and workflows, see Content Quality.


Data Layer

Structured Data Sources

The wiki maintains YAML databases in src/data/:

FileContents
experts.yamlAI safety researchers and their positions on cruxes
organizations.yamlLabs, research orgs, funders
cruxes.yamlKey uncertainties with expert positions
estimates.yamlProbability distributions for key variables
publications.yamlResearch papers and reports
external-links.yamlCurated resource database

Generated Data

Running npm run build:data generates:

OutputPurpose
database.jsonAll entities merged for browser use
pathRegistry.jsonEntity ID → URL path mapping
backlinks.jsonReverse reference indices
tagIndex.jsonSearchable tag index

Data-Aware Components

Components pull from YAML databases to display structured information. For example, EntityLink provides stable cross-references, while DataInfoBox displays expert or organization profiles from YAML.

For database details and component usage, see Content Database.


Cross-Linking System

Entity Links

The wiki uses stable ID-based linking that survives path reorganization:


The <EntityLink id="E274">scheming</EntityLink> risk relates to
<EntityLink id="E93">deceptive alignment</EntityLink>.

Benefits:

  • Automatic title lookup from database
  • Entity type icons
  • Backlink tracking
  • Link validity checked during CI

Backlinks

Every page can display incoming links:

Post-Edit Linking Check

After creating or editing a page, verify cross-linking:

npm run crux -- analyze entity-links <entity-id>

This shows inbound links, missing inbound links (pages that mention but don't link), and outbound links.


Visualizations

Mermaid Diagrams

Flowcharts, sequences, and graphs for static illustrations:

Loading diagram...

See Mermaid Diagrams for guidelines.

Cause-Effect Graphs

Interactive causal diagrams using ReactFlow for complex causal models:


<CauseEffectGraph
  initialNodes={graphNodes}
  initialEdges={graphEdges}
  selectedNodeId="current-factor"
/>

Features: zoom, pan, minimap, node highlighting, path tracing, entity linking.

See Cause-Effect Diagrams for schema and examples.


Automation Tools

Unified CLI

All tools are accessible via the crux CLI:

npm run crux -- --help           # Show all domains
npm run crux -- validate         # Run all validators
npm run crux -- analyze          # Analysis and reporting
npm run crux -- fix              # Auto-fix common issues
npm run crux -- content          # Page management
npm run crux -- generate         # Content generation
npm run crux -- resources        # External resource management

Common Workflows

TaskCommand
Validate before commitnpm run precommit
Full validation suitenpm run validate
Rebuild entity databasenpm run build:data
Grade a specific pagenpm run crux -- content grade --page <id>
Find unlinked mentionsnpm run crux -- analyze mentions
Fix escaping issuesnpm run crux -- fix escaping

Validation Rules

The validation suite includes 20+ rules:

ValidatorWhat It Checks
compileMDX syntax and compilation
frontmatter-schemaYAML frontmatter validity
dollar-signsLaTeX escaping (\$100 not $100)
comparison-operatorsJSX escaping (\<100ms not <100ms)
entitylink-idsAll EntityLink references exist
quality-sourceQuality set by pipeline, not manually
mermaidDiagram syntax validation

For complete tool reference, see Automation Tools.


Technical Stack

Core Technologies

LayerTechnology
FrameworkAstro 5 with Starlight theme
ComponentsReact 19
StylingTailwind CSS 4
Type SafetyTypeScript + Zod schemas
GraphsReactFlow (XYFlow) + Dagre/ELK layout
DiagramsMermaid 11
MathKaTeX
DataYAML sources → JSON build artifacts

Project Structure

apps/longterm/
├── src/
│   ├── content/docs/           # ~550 MDX pages
│   │   ├── knowledge-base/     # Main content (risks, responses, orgs, people)
│   │   ├── ai-transition-model/# Comprehensive factor network
│   │   ├── project/            # Public project documentation
│   │   └── internal/           # Contributor docs and style guides
│   ├── components/
│   │   ├── wiki/               # 50+ content components
│   │   ├── CauseEffectGraph/   # Interactive graph system
│   │   └── ui/                 # shadcn components
│   ├── data/
│   │   ├── *.yaml              # Source data files
│   │   └── *.json              # Generated (build artifacts)
│   └── pages/                  # Astro dynamic routes
├── scripts/
│   ├── crux.mjs                # CLI entry point
│   ├── build-data.mjs          # Data compilation pipeline
│   ├── commands/               # CLI domain handlers
│   └── validate/               # 23 validators
└── astro.config.mjs            # Sidebar and site config

Key Configuration Files

FilePurpose
astro.config.mjsSidebar structure, Starlight setup
src/content.config.tsMDX frontmatter schema
src/data/schema.tsEntity type definitions (Zod)
package.jsonDependencies and npm scripts

Development Workflow

Getting Started

# Install dependencies
npm install

# Start development server (auto-runs build:data)
npm run dev

# Build for production
npm run build

After Editing Content

# After editing YAML data files
npm run build:data

# After editing any content
npm run precommit        # Quick validation
npm run validate         # Full validation

Creating New Content

  1. New pages: Follow the appropriate style guide
  2. New entities: Add to relevant YAML in src/data/, run npm run build:data
  3. New components: Add to src/components/wiki/, use path aliases

For content generation workflows, see Research Reports.


Related Documentation

Project & Strategy

Style Guides

Technical Documentation