Longterm Wiki
Updated 2026-03-13HistoryData
Page StatusDocumentation
Edited today1.1k words4 backlinksUpdated monthlyDue in 4 weeks
55QualityAdequate11.5ImportancePeripheral9ResearchMinimal
Summary

Technical documentation for the Longterm Wiki platform covering content architecture (~550 MDX pages, ~100 entities), quality scoring system (6 dimensions on 0-10 scale), data layer (YAML databases generating JSON artifacts), cross-linking system with stable entity IDs, and development workflows using unified CLI tools. Provides comprehensive reference for contributors on page types, validation rules, and automation commands.

Content6/13
LLM summaryScheduleEntityEdit history2Overview
Tables10/ ~4Diagrams2Int. links33/ ~9Ext. links0/ ~5Footnotes0/ ~3References0/ ~3Quotes0Accuracy0RatingsN:2 R:6.5 A:6 C:8Backlinks4
Change History2
Add PageStatus and info boxes to internal pages#1853 weeks ago

Enabled PageStatus rendering, Data links, and Feedback widgets on internal pages by removing the `isInternal` guards in the wiki page renderer. Added `evergreen`, `update_frequency`, and `lastEdited` frontmatter to all ~40 internal pages so update schedules and staleness indicators are visible.

Internal pages entity infrastructure#1424 weeks ago

Added full entity infrastructure to internal pages (style guides, architecture docs, research reports, schema docs). Internal pages now have the `internal` entity type, get auto-assigned E* numeric IDs (E698-E731), are included in the search index, and participate in backlinks/related graph computation. Includes review fixes: filtering internal pages from public explore/home, converting all 7 remaining .md files, adding `internal` to data/schema.ts, and updating all `shouldSkipValidation`/`pageType === 'documentation'` checks.

About This 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
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

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

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


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

Benefits:

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

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)
│   │   ├── 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.


Project & Strategy

Style Guides

  • Knowledge Base Style Guide — For risk and response pages
  • Model Style Guide — For analytical model pages
  • Stub Style Guide — For minimal reference pages

Technical Documentation

  • System Architecture — Data flow, pipelines, design decisions
  • Page Type System — Complete classification reference
  • Rating System — Quality scoring system
  • Content Database — Storage architecture (PostgreSQL, caching, YAML)
  • Automation Tools — All scripts and workflows
  • Cause-Effect Diagrams — Graph schema and examples
  • Mermaid Diagrams — Diagram guidelines
  • Documentation Maintenance — Keeping docs updated