The format
The .grid file.
First of its kind.
People look at our logo and see a hashtag. It isn't a hashtag. It's a grid. The symbol on every .grid file the format produces, on disk, in Finder, in every place a file is rendered. The brand is the icon is the substrate of the language.
A .grid file is not a text file with a different extension. It is its own format. Single file. Native binary. Self-describing. First of its kind.
On the .grid extension
Grid Theory's .grid is the first specified binary file format to use the .grid extension.
The three-letter extension has appeared informally for decades on text files: window-management configs, numerical tables, word-puzzle layouts, build manifests. None of those uses defines a binary structure, a magic header, a chain construction, or a reference implementation. They are text files that happen to be named .grid.
The two well-known commercial grid formats in industry use different extensions on purpose. ESRI's Arc/Info Binary Grid is a directory of .adf files, not a single .grid file. Golden Software Surfer uses .grd. GRIB meteorological data uses .grib. None of them claim the .grid extension as their canonical binary surface.
The Grid format claims it. The first published file of the format is hello.grid at github.com/gridtheory/grid. Magic bytes GRID at offset 0. 128-byte header. Content-addressed by GHA-1024. Chain-verifiable.
If anyone publishes an earlier file with the same format under the same extension, that file would predate ours. We have not found one.
What's inside a .grid file
Open one with a hex viewer and you'll see four bytes at the top: GRID. Magic bytes the way PNG and PDF have magic bytes. Then a 128-byte header carrying everything you need to understand the grid without reading any of its content:
- Format version and flags (sealed? locked?)
- Total cell count and live cell count
- The grid's master coordinate
[x, y, z] - The chain tip hash, a 64-byte SHA-512 / GHA-1024 digest covering the entire append-only log
- A pointer to the index region
Past the header: an append-only log of cells. Each cell carries an address, type, written-by, written-at, body, sensitivity level, and a chain hash computed as SHA-512(previous_chain || GHA-1024(this_cell) || topology_hash_of_all_prior_cells). The topology hash mixes in the digest of every prior cell, so tampering with any past cell breaks every subsequent chain link. Nothing is ever deleted. New writes supersede old ones; the old ones stay in the chain.
At the file's tail: a sorted index mapping address hashes to byte offsets. O(log n) random access to any cell by address.
The format is wire-native. The bytes on disk are the bytes on a socket. Streaming works because cells are length-prefixed. Cell-level encryption can encrypt one body without rewriting the whole file. Grid-level encryption can wrap the whole thing as one opaque blob while still exposing the coordinate.
It's a database, an audit log, a schema, an access-control system, and a query target, all in one file you can cp, rsync, or attach to an email.
What a .grid file replaces
Most stacks split state across half a dozen systems. A SQL database holds the rows. A schema-migration tool tracks the columns. A permissions layer gates who reads what. An audit log records who did what. A session store decides who's logged in. An OpenAPI spec describes the surface. The stack is held together by glue you write yourself.
A .grid file holds all of it:
- Data → cells with bodies
- Schema → cell types and slot conventions (themselves cells)
- Access control → capability cells at
@/system/capabilities/<name> - Audit log → the chain. Every write, who, when, hash. Free.
- Identity registry → identity cells at
@/system/identities/<name> - Structural map →
@/system/gridmaterialized on demand - Reference index →
@/system/refsbuilt from&@sigils
You don't add an audit log. The chain IS the audit log. You don't add row-level security. Capability cells project a different view of the same file to each identity. You don't write a migration when the shape changes. You write new cells.
Co-residence: the multi-identity file
Two or more identities can write into the same .grid file. The append-only chain serializes their writes; the capability system projects each identity's view of the file.
Two identities in the same .grid file can see each other or not, by their capability cells, without the file changing. Alice writes to @/A/**. Bob writes to @/B/**. They share @/shared/**. The chain records every write under its author. Each identity's study: returns only what their capability cell permits, different grids projected out of the same bytes on disk.
This is the load-bearing claim of Grid Theory: the agent's cognition and the system's state are the same artifact. The artifact is a .grid file. Multiple cognitions, one substrate. For the spectrum of resident kinds that can co-reside, see the Bases.
Identity by content, not by path
A .grid file's identity isn't its filename. It isn't its location on disk. It's the GHA-1024 hash of its genesis cell, the first cell ever written to the file. That hash produces a deterministic 3D coordinate: [x, y, z], a triple of 48-bit integers.
Same genesis bytes → same coordinate, forever. Move the file, rename it, copy it across machines, send it through email; the coordinate is unchanged. The file knows what it is.
Two people who construct genesis from the same recipe arrive at the same coordinate without coordinating. Two people who construct different genesis cells get different coordinates, even if every other byte of the file is identical. The genesis cell is immutable after the grid's first write; the kernel refuses to overwrite it. That immutability is the anchor for the file's permanent identity.
The master grid is itself a .grid file
The catalog of all grids (the registry, the directory, the discovery layer) is one more .grid file. Its cells live at addresses like @/grids/<x>/<y>/<z>, one per registered grid. Same primitives. Same rules. Same chain integrity.
This is recursive in a clean way. The format that holds your data also holds the index of every grid registered on the network. Adding a grid to the registry is the same operation as writing any cell:
write @/grids/182473615824907/94862175839204/226815439728601 type: grid-entry body: ...Retracting a grid is writing a tombstone. Tampering with the registry breaks the chain hash, and the break is detectable by any reader. The integrity comes from the file format itself, not from a trusted server. No consensus, no mining, no central authority. Just a file whose every cell is hashed against the one before it.
The grid file is the substrate. The master grid is a grid file. So the substrate catalogs itself. Full doctrine: see The master grid.
Why "first of its kind"
There are file formats that do one of these things. There isn't another that does all of them.
| One file = one app | Content-addressed identity | Append-only chain | Capability projection | Native query grammar | Per-cell + per-file encryption | |
|---|---|---|---|---|---|---|
| SQLite | ✓ | (SQL, external) | (none) | |||
| Git packfile | (per-object) | ✓ | (none) | (none) | ||
| ✓ | (DRM only) | (none) | (DRM only) | |||
| Blockchain block | ✓ | ✓ | (none) | (none) | ||
.grid file | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
The combination is the novelty, not any single column. A single file you can rsync that carries its own audit log, its own access control, its own query language, its own identity, and works the same whether one person writes to it or many.
What this unlocks
- Audit comes free. Every state change is a cell. Every cell carries who and when. Nothing to wire up.
- Schema changes are writes. Add a new type, add a new slot, the change is one more cell. No migrations.
- Access control is data. A capability is a cell. Granting access is writing the cell. Revoking is superseding it. The history of who could see what is queryable.
- The file IS the database. Copy it, mail it, drop it in S3, every property goes with it. No connection string. No restore.
- Two people can share the file and see different grids. Without copies. Without splits. Without divergence.
- Multi-machine identity without a server. The coordinate is derived from the file's content, not its hostname. The master grid catalogs coordinates, not file paths.
What's on the next disk you reach for
A .grid file. The icon is the substrate. The substrate is the language. The language is everything Grid does.
People will look at it and see a hashtag. You'll know it's a grid.