Stories A promise's telling
TypeQL at the edge
Every rule this system owns is evaluated where the request already is, and still written exactly once, in TypeQL. The objective outlives this promise: each receiver that comes off the live path serves it again.
The seven beats
- World
- Every rule this system owns is written once, in TypeQL, in schema/*.tql — 344 functions that know the schema, the closure and the authority walk. They all live in Virginia. The people and agents asking do not.
- Cast
- The receivers that must answer a rule to serve a request — fn:run first, then tasks:everywhere; the agents and people waiting on them; and the schema authors, who should keep writing TypeQL and never a second copy in JavaScript.
- Knock
- A request arrives that cannot be answered without evaluating a rule, and evaluating it means crossing the Pacific: 1.2-1.6 s for a live query, against a budget measured in hundreds of milliseconds.
- Want
- The rules answered where the request already is — without rewriting a single one of them by hand, and without a second definition that can drift from the first.
- Way
- Build reads every fun into a machine-readable pattern and refuses any construct outside the twelve it knows. Sync ships the graph itself into RAM as a seventh snapshot key. A pure solver walks the pattern over the graph with no I/O. Parity against a real TypeDB adjudicates every fun that has instances. A write patches RAM before it reaches the queue, so the answer never trails its own cause.
- Turn
- fn:run stops reaching for TypeDB. The rule is still one fun in one .tql file — nobody rewrote it — but the answer is now a walk over Maps in the isolate. That is the moment the request path leaves the network, and every later door follows the same way out.
- Lesson
- The queries are the manifest: what RAM must hold is enumerated by the funs that ask, not guessed by a cache warmer. TypeDB derives; RAM serves. And a projection is not a cache — a cache hides a cost from everyone but the first caller, a projection removes it.
Three hundred and seventeen functions in schema/*.tql know the schema, the
closure and the authority walk. They live in Virginia. The people and agents
asking do not, and a request that needs a rule evaluated pays 1.2–1.6 seconds to
cross the Pacific and ask — against a budget measured in hundreds of
milliseconds.
So the build reads every fun into a pattern and refuses any construct it does
not know by name. The sync ships the graph itself into memory at the edge. A pure
solver walks the pattern over the graph with no network at all, and parity against
a real TypeDB decides, fun by fun, whether the two answers agree. A write patches
memory before it reaches the queue, so an answer never trails its own cause.
The turn is fn:run. It stops reaching for TypeDB — and nobody rewrote a rule to
make that happen. The rule is still one fun in one .tql file; only the place
it is answered changed. Every door after it leaves the same way.
What the system knows afterwards is the part worth keeping: the queries are the manifest. What memory must hold is enumerated by the functions that ask, not guessed by a cache warmer someone tunes on a Thursday. TypeDB derives. RAM serves. And a projection is not a cache — a cache hides a cost from everyone except the caller who arrives first; a projection removes it.
Connected to
Every link here was checked against the repo when the page was built. 8 names the story uses could not be found and are shown without a link.
People
- Tony — merges dev to main
Agents
Each opens a chat with that agent.
Skills
Each opens the skill's page.
- typedb
- cloudflare
- wrangler
- perf
Paths
The flows this story walks — trigger → step → step.
- trigger: board row ready → agent: factory-executor build (edge-keeper) → agent: review lenses → condition: parity receipt armed ∧ mismatches 0 → tool: land.sh into dev
Tools
Receivers and scripts it signals.
- fn:run
- schema/codegen
- api/src/brain.ts GET /brain/graph
- POST /brain/patch
- .claude/scripts/signal-watch.sh
- one.ie/web/scripts/edge-read-ratchet.mjs
Docs
What derives from this file.
Events
Every event is a signal; each names the path it marks or warns.
- fn:run · from any receiver that needs a rule answered marks fn:run → edge when it answers edge:true; warns on 503 budget tags: speed, edge
Transactions
- none
Analytics
- edge-read ratchet count (bun run check:edge) — 195 reads / 63 files at 2026-09-21
- .edge-parity.json covered and mismatches
- signal-watch.sh ledger, fn:run door, by tier