About This Wiki
About the Longterm Wiki
Section titled “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:
- Project Overview — Quick summary of what LongtermWiki is
- Vision Document — Full 2-person-year scope, architecture, milestones
- Similar Projects Analysis — Lessons from Arbital, Stampy, MIT Risk Repository, and others
Content Architecture
Section titled “Content Architecture”Major Sections
Section titled “Major Sections”| Section | Purpose | Examples |
|---|---|---|
| Knowledge Base | Core content on risks, interventions, organizations, people | Deceptive AlignmentRiskDeceptive AlignmentComprehensive analysis of deceptive alignment risk where AI systems appear aligned during training but pursue different goals when deployed. Expert probability estimates range 5-90%, with key empir...Quality: 75/100, AI Safety InstitutesPolicyAI Safety Institutes (AISIs)Analysis of government AI Safety Institutes finding they've achieved rapid institutional growth (UK: 0→100+ staff in 18 months) and secured pre-deployment access to frontier models, but face critic...Quality: 69/100 |
| AI Transition Model | Comprehensive factor network with outcomes and scenarios | Factors, scenarios, quantitative estimates |
| Models | Analytical frameworks for understanding dynamics | Risk models, cascade models, governance models |
| Project | Public-facing documentation about LongtermWiki itself | Vision, strategy, similar projects |
| Internal | Contributor documentation, style guides, technical reference | This page, style guides, automation tools |
Content Volume
Section titled “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
Section titled “Page Types and Templates”The wiki uses a two-level classification system.
Page Types (Validation Behavior)
Section titled “Page Types (Validation Behavior)”| Type | Quality Scored? | Use Case |
|---|---|---|
content | Yes | All substantive knowledge base pages (default) |
stub | No | Redirects, brief profiles, placeholders |
documentation | No | Style guides, internal docs (like this page) |
overview | No (auto) | Index pages for navigation |
Page Templates (Structure)
Section titled “Page Templates (Structure)”Templates determine expected structure and applicable style guide:
| Template | Style Guide |
|---|---|
knowledge-base-risk | Knowledge Base Style Guide |
knowledge-base-response | Knowledge Base Style Guide |
knowledge-base-model | Model Style Guide |
ai-transition-model-factor | ATM Style Guide |
For complete details, see Page Type System.
Quality System
Section titled “Quality System”Rating Dimensions
Section titled “Rating Dimensions”Content pages are scored on six dimensions (0-10 scale, harsh—7+ is exceptional):
| Dimension | What It Measures |
|---|---|
| Focus | Does it answer the title’s promise? |
| Novelty | Value beyond obvious sources |
| Rigor | Evidence quality and precision |
| Completeness | Thorough coverage of claimed topic |
| Concreteness | Specific vs. abstract recommendations |
| Actionability | Can readers make different decisions? |
These combine into an overall quality score (0-100).
Quality Pipeline
Section titled “Quality Pipeline”Quality must only be set through the grading pipeline, never manually:
# Grade a specific pagenpm run crux -- content grade --page scheming --apply
# Grade all ungraded pagesnode scripts/content/grade-content.mjs --skip-graded --applyFor grading criteria and workflows, see Content Quality.
Data Layer
Section titled “Data Layer”Structured Data Sources
Section titled “Structured Data Sources”The wiki maintains YAML databases in src/data/:
| File | Contents |
|---|---|
experts.yaml | AI safety researchers and their positions on cruxes |
organizations.yaml | Labs, research orgs, funders |
cruxes.yaml | Key uncertainties with expert positions |
estimates.yaml | Probability distributions for key variables |
publications.yaml | Research papers and reports |
external-links.yaml | Curated resource database |
Generated Data
Section titled “Generated Data”Running npm run build:data generates:
| Output | Purpose |
|---|---|
database.json | All entities merged for browser use |
pathRegistry.json | Entity ID → URL path mapping |
backlinks.json | Reverse reference indices |
tagIndex.json | Searchable tag index |
Data-Aware Components
Section titled “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
Section titled “Cross-Linking System”Entity Links
Section titled “Entity Links”The wiki uses stable ID-based linking that survives path reorganization:
import {EntityLink} from '@components/wiki';
The <EntityLink id="scheming">scheming</EntityLink> risk relates to<EntityLink id="deceptive-alignment">deceptive alignment</EntityLink>.Benefits:
- Automatic title lookup from database
- Entity type icons
- Backlink tracking
- Link validity checked during CI
Backlinks
Section titled “Backlinks”Every page can display incoming links:
import {Backlinks} from '@components/wiki';
<Backlinks entityId="deceptive-alignment" />Post-Edit Linking Check
Section titled “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
Section titled “Visualizations”Mermaid Diagrams
Section titled “Mermaid Diagrams”Flowcharts, sequences, and graphs for static illustrations:
flowchart LR A[Training] --> B[Alignment Techniques] B --> C{Robust?} C -->|Yes| D[Safe AI] C -->|No| E[Misalignment Risk]See Mermaid Diagrams for guidelines.
Cause-Effect Graphs
Section titled “Cause-Effect Graphs”Interactive causal diagrams using ReactFlow for complex causal models:
import {CauseEffectGraph} from '@components/CauseEffectGraph';
<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
Section titled “Automation Tools”Unified CLI
Section titled “Unified CLI”All tools are accessible via the crux CLI:
npm run crux -- --help # Show all domainsnpm run crux -- validate # Run all validatorsnpm run crux -- analyze # Analysis and reportingnpm run crux -- fix # Auto-fix common issuesnpm run crux -- content # Page managementnpm run crux -- generate # Content generationnpm run crux -- resources # External resource managementCommon Workflows
Section titled “Common Workflows”| Task | Command |
|---|---|
| Validate before commit | npm run precommit |
| Full validation suite | npm run validate |
| Rebuild entity database | npm run build:data |
| Grade a specific page | npm run crux -- content grade --page <id> |
| Find unlinked mentions | npm run crux -- analyze mentions |
| Fix escaping issues | npm run crux -- fix escaping |
Validation Rules
Section titled “Validation Rules”The validation suite includes 20+ rules:
| Validator | What It Checks |
|---|---|
compile | MDX syntax and compilation |
frontmatter-schema | YAML frontmatter validity |
dollar-signs | LaTeX escaping (\$100 not $100) |
comparison-operators | JSX escaping (\<100ms not <100ms) |
entitylink-ids | All EntityLink references exist |
quality-source | Quality set by pipeline, not manually |
mermaid | Diagram syntax validation |
For complete tool reference, see Automation Tools.
Technical Stack
Section titled “Technical Stack”Core Technologies
Section titled “Core Technologies”| Layer | Technology |
|---|---|
| Framework | Astro 5 with Starlight theme |
| Components | React 19 |
| Styling | Tailwind CSS 4 |
| Type Safety | TypeScript + Zod schemas |
| Graphs | ReactFlow (XYFlow) + Dagre/ELK layout |
| Diagrams | Mermaid 11 |
| Math | KaTeX |
| Data | YAML sources → JSON build artifacts |
Project Structure
Section titled “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 configKey Configuration Files
Section titled “Key Configuration Files”| File | Purpose |
|---|---|
astro.config.mjs | Sidebar structure, Starlight setup |
src/content.config.ts | MDX frontmatter schema |
src/data/schema.ts | Entity type definitions (Zod) |
package.json | Dependencies and npm scripts |
Development Workflow
Section titled “Development Workflow”Getting Started
Section titled “Getting Started”# Install dependenciesnpm install
# Start development server (auto-runs build:data)npm run dev
# Build for productionnpm run buildAfter Editing Content
Section titled “After Editing Content”# After editing YAML data filesnpm run build:data
# After editing any contentnpm run precommit # Quick validationnpm run validate # Full validationCreating New Content
Section titled “Creating New Content”- New pages: Follow the appropriate style guide
- New entities: Add to relevant YAML in
src/data/, runnpm run build:data - New components: Add to
src/components/wiki/, use path aliases
For content generation workflows, see Research Reports.
Related Documentation
Section titled “Related Documentation”Project & Strategy
Section titled “Project & Strategy”- Project Overview — What LongtermWiki is, core components
- Vision Document — 2-person-year scope, architecture, milestones
- Similar Projects — Lessons from Arbital, Stampy, MIT Risk Repository
- Strategy Brainstorm — Failure modes and strategic options
Style Guides
Section titled “Style Guides”- Knowledge Base Style Guide — For risk and response pages
- Model Style Guide — For analytical model pages
- ATM Style Guide — For AI Transition Model pages
- Stub Style Guide — For minimal reference pages
Technical Documentation
Section titled “Technical Documentation”- System Architecture — Data flow, pipelines, design decisions
- Page Type System — Complete classification reference
- Rating System — Quality scoring system
- Content Database — SQLite caching, source fetching, AI summaries
- Automation Tools — All scripts and workflows
- Cause-Effect Diagrams — Graph schema and examples
- Mermaid Diagrams — Diagram guidelines
- Documentation Maintenance — Keeping docs updated