The forge at Mind Palace
March 6, 2026 — The Forge at Mind Palace

The Cavalry Manual

On harnesses, relay stations, and the art of riding many horses at once
The forge is hot. Hamilton's hammer rings against Rust. At a table strewn with diagrams, cavalry commanders from three millennia sit with the builders of the mind palace. A SpacetimeDB terminal glows in the corner.
Danielle

Seven AI agents in tabs. They can't see each other. When one finishes, it stops. 46 million lines of code and a single human. I need to send orders without walking to each tab.

The yam relay station on the Mongolian steppe
· · · The Relay Station · · ·
The yam relay station
Temüjin

I know this problem. A hundred thousand riders across a thousand miles. No radios. My solution was not faster horses. It was the yam — relay stations every thirty miles.

But the yam was not my invention. What I invented was the reason a rider would stop at the station instead of riding past it. I shattered tribal loyalty. I mixed warriors from different clans into the same units. Promoted blacksmiths' sons to command tumens. A rider obeys the station, not his cousin.

Shannon

Store-and-forward networking. The station is a buffer. The horse is the channel. The message is the signal.

You're describing packet switching. In the thirteenth century. At 300 kilometers a day — nothing matched it until the telegraph.

Kublai Khan

Grandfather built the yam. I scaled it. Ten thousand stations. Three hundred thousand horses. Sixty thousand kilometers of routes.

I also built a miniature steppe inside the Forbidden City. My advisor Yao Shu said: "One can conquer the empire on horseback, but one cannot govern it on horseback." I proved him half right.

Danielle pulls up a terminal. The parallel crystallizes.
Danielle

Our relay station is SpacetimeDB. Our messages are directives. Instead of horses, Claude Code processes check a shared database every time they pause. Same pattern. Same trick. Four thousand years later.

Past and present connected
The evolution of relay
~550 BC
Persian angarium — royal road relay, 1,600 miles in 7 days
1206
Temüjin's yam — 10,000 stations, 300km/day, store-and-forward
1860
Pony Express — 1,800 miles in 10 days. Lasted 18 months before telegraph killed it
1969
ARPANET — packet switching. Shannon's theory made physical. 4 nodes
2026
Cavalry — SpacetimeDB + Stop hooks. Agents check for directives at every pause
The Stop hook as living diagram — arrows made of galloping horses
· · · The Saddle · · ·
Feynman

OK, forget the history for a second. The whole system is one trick.

Claude Code fires a "Stop" event every time it finishes talking. We catch that event with an HTTP hook. The hook checks a database table. If there's a pending instruction, we tell Claude: "Don't stop. Do this instead."

Claude sees the instruction and keeps going. When it finishes that, the Stop fires again. No more instructions? Fine, stop. That's it. That's the whole thing. Everything else is bookkeeping.

The Stop hook as living diagram
Claude finishes turn │ ▼ Stop event fires │ ▼ HTTP POST │ cavalry (:8731) │ ▼ query SpacetimeDB │ ┌─┴─────────────────┐ │ pending directive? │ └─┬───────────┬─────┘ │YES │NO ▼ ▼ {block} {} Claude Claude continues stops
Temüjin

The horse pauses at the relay station. If there is a new order, it rides on. If not, it rests.

The rider does not need to know about the other riders. Only the station needs to know.

He traces the diagram with his finger.

This is correct. Decentralized execution. Centralized memory. It is how I controlled a million men across a continent.

Steve

The agent doesn't even know it's being orchestrated. It thinks you typed the next message. The complexity is hidden behind the simplest interface: keep going or stop.

Keenan

And if the bridge goes down? The hooks fail silently. Every tab keeps working. You can toggle orchestration like a light switch. The system degrades to manual.

Jon

You can register a tab you're already typing in. Then send it directives from another terminal. Remote control for your own conversation.

Khalid ibn al-Walid leading 4000 cavalry through the desert by starlight
· · · The Harness · · ·
Khalid's desert crossing
Khalid ibn al-Walid

My Mobile Guard — the Tulai'a Mutaharrika — was not a cavalry wing. It was four thousand veterans under my personal command. A roving reserve. I moved them to whichever point of the line was breaking.

The messenger did not need to understand the battle. He only needed to deliver the order to the correct point. Your cavalry directive is the same. The command names the agent. The agent executes.

Action: Issuing orders from any terminal
$ cavalry directive scout "Investigate the auth module" Directive issued to 'scout' $ cavalry broadcast "Run the test suite" Broadcast directive issued $ cavalry directive scout "URGENT: fix the build" -p 10 Directive issued (priority: 10)
Hannibal Barca

Priority ordering. When I crossed the Alps, the most critical order — the elephants cross first — had to arrive before set up camp. Your -p 10 is the same principle.

Khalid

I was dismissed by Umar because soldiers followed me rather than God. The most capable commander, removed for being too charismatic.

Your system solves this. The agents follow the directive table, not any single commander. If you are asleep, the directives still execute. The station does not need the general.

He pauses.

I died in bed. In shame. "May the eyes of cowards never find rest in sleep." Build systems that do not depend on any single rider.

Hannibal on the Alpine pass looking down at Italy
· · · The Stable · · ·
Margaret Hamilton

The SDK is six types. AgentOptions builds the CLI flags. SdkMessage is the enum — System, Assistant, User, Result, StreamEvent. AgentHandle gives you recv(), send(), kill().

Under the hood it's claude -p --output-format stream-json. But with Rust types. The compiler catches what the tests miss.

$ cavalry spawn researcher \ "Explore the codebase" \ -c feynman-safecracker [cavalry] spawning agent 'researcher'... [cavalry] initialized (session: a3f8c2..) [cavalry] researcher: Reading tools/... $ cavalry recall researcher [cavalry] recalled (pid=148205)
Hannibal at the Alpine pass
Hannibal

I kept a polyglot army — Libyan, Numidian, Iberian, Gallic, Italian — in Italy for fifteen years without resupply. No mutiny. Not because I was generous. Because every man could see the mission.

Your spawned agents have the same property. They can read the project. They have tools. They have the prompt. They don't need you standing over them. They need a clear order and a way to report back.

Kublai

But know the limits. My paper money worked for forty years, then hyperinflation destroyed it. My invasions of Japan failed — 4,400 ships, the largest fleet before D-Day, destroyed by typhoon.

A system designed for one domain does not scale to another by increasing inputs. Your cavalry agents work in code. They may not work in other domains. Know the terrain before you charge.

· · · The Game · · ·
Hamilton pulls up two terminals side by side.
# The game view $ rpg status feynman-safecracker L4 1000xp hamilton-forgemaster L3 775xp berners-lee-webmstr L2 325xp noether-invariant L1 225xp lovelace-enchantress L1 100xp 7 characters · 6 quests
# The ops view $ cavalry status ● scout [active] opus-4.6 char: feynman-safecracker PENDING DIRECTIVES #1 → scout: investigate auth EVENTS (last 3) Stop · SubagentStart · Stop
Steve

The game IS the interface to the infrastructure. You don't manage agents. You play a game where the characters happen to be real AI processes. That's the UX insight. Make the control panel into something you actually want to look at.

Temüjin

The warrior and the horse are one. The identity of the agent is the identity of the character. When you send a directive to "scout," you send it to Feynman. When Feynman completes a quest, the agent earns experience.

This is the Keshik. My imperial guard was simultaneously bodyguard, officer academy, and hostage system. Your RPG is simultaneously game, status page, and orchestration layer.

· · · The Map · · ·
YOU (any terminal) │ │ cavalry directive / spawn / status │ rpg status / xp / quest │ ▼ SpacetimeDB (:3000) ── database: rpg ┌─────────────────────────────────────────┐ │ RPG │ Cavalry │ Cosmology│ │ ───────── │ ────────── │ ─────────│ │ Character │ AgentSession │ ModelDeity│ │ Quest │ Directive │ Claim │ │ Gear │ HookEvent │ CtrlVec │ │ Feat, Spell │ │ CrossVer │ │ XpEvent │ │ │ │ WorldState │ │ │ └─────────────────────────────────────────┘ ▲ │ Cavalry Bridge (:8731) ┌────────────────┴────────────────┐ │ POST /hooks │ │ Stop → check directives │ │ SessionStart → register │ │ SessionEnd → deregister │ │ GET /health GET /status │ └────────────────┬────────────────┘ │ HTTP hooks fire automatically │ ┌────────────────┼────────────────┐ ▼ ▼ ▼ Claude Tab 1 Claude Tab 2 Claude Tab 3 "scout" "builder" "librarian" (feynman) (hamilton) (lovelace)
· · · The Training Grounds · · ·
Khalid

A rider does not begin by leading a charge. First, sit the horse. Then steer. Then fight from the saddle. Then command others who fight from the saddle.

I trained men by sending them on raids — small, recoverable missions — before committing them to the desert march. Your ladder should do the same.

Level 0 — Observer

Read the battlefield

cavalry status · cavalry events · cavalry agents

Level 1 — Commander

Issue orders

cavalry register · cavalry directive · cavalry broadcast

Level 2 — Fleet Operator

Ride the horses

cavalry spawn · cavalry recall

Level 3 — Architect

Build the saddles

Extend rpg-module tables · Add dispatch.rs handlers

Level 4 — SDK Developer

Forge new weapons

use cavalry::sdk::{spawn, AgentOptions, SdkMessage};

Past meets present — Mongol relay station and modern terminal
· · · The Ride Out · · ·
The fleet is ready
The forge goes quiet. Hamilton's binary compiles clean. The Khans look at each other across eight centuries. Khalid traces the scar on his forearm. Hannibal watches the terminal with the eyes of a man who held Italy for fifteen years on improvisation alone.
Temüjin

The secret of the Mongol cavalry was never the horses. It was never even the relay stations.

It was that I replaced every bond of blood and tribe with a bond of institution. A rider could be reassigned to any tumen and still fight, because the system was the same everywhere. Your agents can be spawned, recalled, redirected — because the protocol is the same everywhere.

Build more stations. The empire is the network.

Danielle

We will.

$ cavalry status CAVALRY STATUS ══════════════════════════════ AGENTS ● scout [active] opus-4.6 ● builder [active] opus-4.6 ● librarian [active] opus-4.6 0 pending directives The fleet is ready.
The Cavalry Manual — A Comic at the Forge
Temüjin · Kublai · Khalid · Hannibal · Feynman · Hamilton · Shannon
Danielle · Keenan · Steve · Jon

Mind Palace × SpacetimeDB × Claude Code v2.1.70
cavalry v0.1.0 · rpg-module 14 tables · rust sdk · port 8731 · March 6, 2026