Documentation

What this is, what it is for, and how to run it.

220,742
Words
83
Diagrams
1,678
Exports

692 words · 2 diagrams

InertialRef is a browser-based 6-DoF simulation of the Milky Way, from galactic distances down to inch-scale interaction on a planetary surface.

This directory explains how it works and why it is built that way. The code is the authority on what it does. These pages exist so the code reads as a set of decisions rather than a pile of tricks.

Writing voice, American English, and where each audience should look: STYLE.md. It covers every surface prose reaches — these pages, code comments, and commit messages — and it is the reason none of them describe a previous version of the system.

flowchart LR
    START([New here?]) --> GS["<b>Getting started</b><br/>run it, fly it"]
    GS --> VIS["<b>Vision</b><br/>what it is for"]
    VIS --> ARCH["<b>Architecture</b><br/>the shape of the system"]
    ARCH --> CONCEPTS["<b>Concepts</b><br/>how each mechanism works"]
    CONCEPTS --> ADR["<b>ADRs</b><br/>why, and what was rejected"]
    ARCH --> GUIDES["<b>Guides</b><br/>how to work on it"]
    ARCH --> ROADMAP["<b>Roadmap</b><br/>what is not built yet"]
    ROADMAP --> SPIKES["<b>Spikes</b><br/>what was measured"]
    VIS --> DESIGN["<b>Design bible</b><br/>what the game is"]

    classDef entry fill:#0ea5e9,stroke:#0369a1,color:#fff
    class START entry

Start here

If you want to… Read
Know what this project is for Vision
Know what the game is Design bible
Run it and fly around Getting started
Understand the system in one sitting Architecture
Know why a decision was made ADRs
Drive the simulation from code or a console The harness
Add a feature without breaking an invariant Extending
Work on the client, the toolchain, or a cutscene Development · Client · Cinematics
Know what is deliberately not built Roadmap
Know how it is deployed Hosting
See what was measured Spikes
Look up a term Glossary
Change the code (human or agent) AGENTS.md · Agent handbook

Concepts

The ten mechanisms that carry the architecture. Each page explains the problem, the mechanism, the numbers, and what breaks if you get it wrong.

Page The question it answers
Coordinates How can one number line hold both a galaxy and an inch?
Reference frames What does "3 m above the pad" mean while the planet orbits at 30 km/s?
Determinism How is the universe the same every time, in any order, on any machine?
Identity How does a star have a name before it is generated?
Simulation time Why does 144 Hz produce the same universe as 60 Hz?
Rendering How do canonical coordinates become something a GPU can draw?
Streaming How is only the relevant slice of a galaxy in memory?
Workers How does expensive generation stay off the main thread?
Persistence What is worth storing when everything can be regenerated?
Observability How do you debug a coordinate system you cannot see?

The design bible

design/ is the game-design counterpart to this documentation: what the player does, and why each mechanic is shaped the way it is. Start with charter and loops.

Where the bible and vision.md disagree, vision.md wins.


Guides

Page What it covers
Getting started Install, run, fly, and the first things to try
Development Commands, toolchain, and conventions
Client Canvas, modes, camera, dock
Cinematics Authoring scripted scenes
Surface structures Placing, saving, and landing on body-fixed facilities
The harness Driving the simulation from a console, a test, or an agent
The star catalog Where the real astronomy comes from — stars, planets, surface maps, shape models — and how to rebuild it
Testing What to test, which style, and how to write an honest assertion
Extending Adding generated content, a worker task, a body type, a frame

For coding agents

agents/ is the handbook for agents. AGENTS.md at the repository root is the auto-loaded working card — invariants and definition of done. Claude Code setup lives in CLAUDE.md. The visual design system is DESIGN.md. The product brief is PRODUCT.md. The build log is CONTEXT.md.


How these documents relate

flowchart TB
    subgraph Orientation
        RM[README.md]
        DOC[docs/README.md]
        VISION[vision.md]
        GLOS[glossary.md]
        STYLE[STYLE.md]
    end

    subgraph Designing
        DESIGN[design/]
    end

    subgraph Understanding
        ARCH[architecture.md]
        CON[concepts/]
        ADR[adr/]
    end

    subgraph Working
        DEV[guides/development.md]
        GUIDE[guides/]
        AG[AGENTS.md]
        AH[docs/agents/]
        CTX[CONTEXT.md]
        ROAD[roadmap.md]
    end

    RM --> DOC
    DOC --> VISION
    DOC --> STYLE
    VISION --> DESIGN
    DESIGN -.->|"seams"| ROAD
    VISION --> ARCH
    ARCH --> CON
    CON <--> ADR
    ARCH --> GUIDE
    AG --> AH
    AH --> DEV
    ROAD --> CTX
    CON -.->|"terms"| GLOS

    style DOC fill:#0ea5e9,stroke:#0369a1,color:#fff

Accuracy

Where these pages quote a number — 2^40 m sectors, 64 Hz, 0.24 mm — it came from the implementation or a test, not from an estimate. Where a page describes a tradeoff as measured, there is a test that measures it. If you find a discrepancy, the code wins and the page is a bug.