One day, forty agents: how Duskbound was built
A Diablo II style co-op ARPG built in one day by one orchestrating Claude directing 41 Opus 5.5 agents, from a 10:14 brief to six acts, an endgame, companions, admin, mobile and a trailer by evening.

Contents
- A plan that could be split
- Wave 1: five agents, five directories
- Wave 2: a game
- The afternoon queue
- How forty agents share one working tree
- Ownership by directory
- Tagged hunks in shared files
- Contracts in code, validated at runtime
- A living map instead of shared memory
- Checkpoints, and why prod ships from a worktree
- Verification is part of the brief
- Two numbers the tests didn't catch
- What I did versus what the agents did
- By the numbers
- Read next
Duskbound went from a one-paragraph brief at 10:14 to six acts, an endgame, AI companions, an admin console, mobile support and a trailer by evening. I wrote the plan and the briefs; 41 Opus 5.5 agents wrote most of the code.
The brief: an online co-op action RPG in the spirit of Diablo II, in the browser, with 40-player drop-in rooms, three classes, skill trees, items, quests, towns and procedural maps, on Colyseus and TypeScript, dressed in Kenney's free 3D assets. Four setup answers fixed the rest: 3D with an isometric camera, hosted on Drydock, drop-in sign-in with an optional password, pure co-op.
By 19:00 the repo held about 98,000 lines of TypeScript and 545 passing tests, and production was live.

A plan that could be split
The first artifact was plans/2026-09-27-gloamreach-master-plan.md (the game was still Gloamreach): 295 lines every agent read first. Ten sections: pitch, fixed stack, repo layout with an owner per directory, world model, procgen contract, design numbers, networking contract, persistence schema, visual direction, wave plan.
The contracts mattered most. The renderer and the map generator couldn't wait on each other, so the plan pinned the shape they'd meet at:
interface ZoneMap {
zoneId: string
seed: number
w: number; h: number
tiles: Uint8Array // w*h, TileKind enum (floor, wall, void/cliff, water, path, …)
variant: Uint8Array // per-tile visual variant 0..255 (renderer picks mesh/rotation)
props: PropPlacement[] // { kind: PropKind; x; y; rot; scale; blocks: boolean }
lights: LightPlacement[] // torches/braziers { x, y, color, intensity, radius }
spawns: SpawnPoint[] // { x, y, packSize, kind: 'pack'|'champion'|'boss' }
exits: ExitPlacement[] // { exitId, x, y, kind, facing }
playerStart: { x: number; y: number }
}
generateZone(def: ZoneDef, seed: number): ZoneMap // PURE + DETERMINISTIC (Rng only)generateZone is pure and seeded, so server and clients build the same map from (zoneId, seed) and maps never cross the wire. The renderer started on day zero against a fake map of the right shape. See procedural worlds.
The shared numbers went into code before any agent started:
// Shared vocabulary between procgen, data, server sim, renderer and asset manifest.
// Adding a key here is cheap; renaming one breaks the asset manifest — don't.
export const TICK_MS = 50 // 20 Hz server sim
export const PATCH_MS = 50
export const ROOM_MAX_CLIENTS = 40
export const PLAYER_SPEED = 7 // tiles per second, base run speed (was 5 — felt like walking)
export const INV_W = 10
export const INV_H = 4Wave 1: five agents, five directories
At 10:24 five agents launched, each owning directories nobody else wrote to:
- A, assets: Kenney kits to GLB, a typed manifest, a gallery at
/dev/assets - B, foundation: the starter template into a game server; Colyseus on the same HTTP server, guest-token auth, Prisma schema, a skeleton zone room
- C, procgen and nav: town, wilderness and dungeon generators, A*, line of sight, a map-to-PNG CLI
- D, data and rules: classes, skills, items, affixes, monsters, zones, quests, combat formulas, as pure data plus tests
- G, UI kit: the stone-and-brass design system, every panel as a pure component, a gallery at
/dev/ui
The cut follows the data flow, not job titles. Procgen emits ZoneMap; data emits ZoneDefs and monster tables; assets emit a manifest keyed by the ids in shared/constants.ts. Nobody needed anyone else's code, only the names.
| Agent | Reported | Result |
|---|---|---|
| B | 10:43 | two browser profiles in one room, seeing each other walk |
| C | 10:50 | all generators deterministic and connected over 50 seeds per zone |
| A | 10:57 | 7.0 MB of assets from fourteen Kenney packs |
| G | 11:04 | UI kit done |
Wave 2: a game
Wave 2 started before wave 1 finished, because the contracts made it safe: renderer (F) at 10:59, server sim (E) and UI adapters (G2) at 11:05, landing (H) at 11:06.
E had the biggest brief: a complete authoritative ZoneRoom with movement, skills, combat, AI, loot, XP, inventory, vendors, quests, travel, parties and a 40-bot load test. It came back at 11:41 with 120 tests and, for 40 bots and ~160 monsters in one room, a 1.23 ms average tick, 3.98 ms worst-window p95 against a 50 ms budget, and 10.4 KB/s per client. See the server-authoritative sim.
First commit: 11:59, wave 1+2.
The afternoon queue
From noon the plan became a queue. Each item became a quick fix or a new agent.
- Exits nobody could find. Hollowmere's exit was on the north gate with no marker. Fix: clickable gold labels for exits within 18 tiles; walking onto an edge exit travels.
- Z-fighting houses. Every Kenney wall panel carries its own corner posts, so adjacent panels stacked identical posts. East/west panels and gable halves shrank to 99.4% about their cell centres; a coplanar scan of
house.glbwent from 328 overlapping faces to 0. - A max-out button. The dev-only
dev.maxOutprocedure, later the "Go crazy" hero, to test every system without grinding. - 12:37, five agents in five minutes: Act 2–3 assets, Act 2–3 worldgen and rendering, Act 2–3 content and server, housing, pets. All back by 13:33, suite at 261.
- 13:34, polish and multiplayer QA. QA drove three browser profiles plus a headless websocket harness and fixed eleven bugs. Worst: a second tab could load a stale save and duplicate stash items; now the old session is evicted and loads wait on queued saves.
- 14:27–14:30, five more: deploy, controller, Acts 4–6, endgame. Production live at 14:57.
The rest of the day:
| Time | Work | Post |
|---|---|---|
| 15:36 | Trailer: in-engine 1080p60 capture, Remotion edit, procedural score | making the trailer |
| 15:57 | Gloamreach renamed Duskbound; "the Gloam" stays in-world | landing and intro |
| 16:32 | Admin console | admin |
| 16:46 | AI companions as real heroes in the sim | companions |
| 16:56 | 40 maxed heroes through Act 6 | forty players |
| 17:37 | Early-game damage taper | combat math |
| 17:59 | Touch, mobile layouts, PWA | controller and touch |
| 19:07 | This blog |
Smaller items in between: walk-in homes, clickable travel markers, a 3D landing page with a lore intro, a party panel with open town portals, a public item database with an admin editor.
How forty agents share one working tree
Up to ten agents ran at once in the same directory. Four rules.
Ownership by directory
Each brief named the folders the agent owned. New features got new folders: server/game/endgame/, server/game/companions/, src/game/pets/, src/admin/. Read anything; write only your own.
Tagged hunks in shared files
The bootstrap, zone room and tick loop belong to everyone, so every edit there carries a feature tag:
export async function createGameServer(httpServer: HttpServer): Promise<GameServer> {
await matchMaker.setup()
await riftsReady() // endgame: resume open Gloam Rift runs before any room can ask for one
await startAdminRecorder() // admin: play sessions, game events, metrics
await itemOverridesReady() // items: admin item overrides into the catalog before any room rolls loot
await startItemTally() // items: drop / craft countersCurrent counts: 140 // endgame:, 92 // mobile:, 89 // admin:, 63 // items:, 55 // companions:, 50 // acts:, 49 // pets:. They answer "what did X touch?" with one grep, and they make selective releases possible.
Contracts in code, validated at runtime
Every boundary is a zod schema in shared/. Client messages are declared once and parsed before the sim sees them:
export const ClientMessageSchemas = {
/** click-to-move destination (`walk`: a lightly pushed gamepad stick moves at walking pace) */
move: z.object({ x: coord, y: coord, walk: z.boolean().optional() }), // pad: + walk
/** attack a monster with the basic attack (left-click on a monster) */
attackTarget: z.object({ id }),
/** use a skill at a point / on a target */
cast: z.object({ skill: id, x: coord, y: coord, targetId: id.optional() }),// pad: + walk is the controller agent adding one optional field without breaking anyone. Strict mode, noUncheckedIndexedAccess, no any: with this many writers, the type checker reads every line.
A living map instead of shared memory
Agents start cold, so the repo explains itself: CLAUDE.md (briefing), cliffnotes.md (map of systems and routes), decisions.md, features/*.md (one spec per feature), updates.md (one entry per task). Every brief ended with "update the map". The endgame agent hooked into the sim by reading its cliffnotes.md section.
Checkpoints, and why prod ships from a worktree
From about 13:00 a loop committed the tree every 20 minutes:
while true; do sleep 1200
if [ -n "$(git status --porcelain)" ]; then
git add -A && git commit -qm "wip: auto-checkpoint $(date +%H:%M) (agents in flight)"
fi
doneCheckpoints sweep up half-written work, and every push to master deploys (Drydock CI builds, runs prisma migrate deploy, rolls the service). So releases were cut in a separate worktree from a known-good commit, carrying only the finished feature's hunks, pushed after typecheck, tests and a production build passed there.
Example: release/controller at 15:48 took the two controller folders plus only the // pad: hunks from 14 shared files, leaving in-flight endgame, acts and housing hunks behind. CI deployed it in 6 min 17 s.
Verification is part of the brief
"It compiles" was never accepted. Every brief required a clean repo-wide typecheck, passing tests, and a real-browser check with the bx CLI, usually with two profiles to exercise multiplayer.
scripts/bots.ts joins 40 websocket clients to one room. Rerun while writing this, with other agents loading the machine:
| Metric (40 bots, one wilderness room, ~180 monsters) | Value |
|---|---|
| Server tick, average | 1.57 ms |
| Server tick, worst-window p95 | 5.37 ms |
| Downstream per client, average | 11.2 KB/s |
| Messages per client | 25/s |
Full suite: 545 tests, 45 files, 46 seconds.

Two numbers the tests didn't catch
Balance tested the wrong thing. The test asserted a level-1 hero survived "at least 5 swings", counting misses. It passed; the first two-player session died constantly. Monster damage carried a flat 1.4× from level 1, so a level-1 Emberwright died to about six landed wolf bites, 1.4 seconds against a pack. Fix: hostile damage tapers from 0.4× at level 1 to 1.0× at level 16, where Act 2 starts. The new test counts landed hits: at least 15 for every class, 25 for the Warden.
Forty heroes broke the tick; forty bots didn't. Level-99 heroes spamming maxed area spells pushed Hollow Sanctum to a 56 ms p95 and the boss to hundreds of ms. The sim wasn't the cost: every event was msgpack-encoded per recipient and sent as its own frame. Encode once, one batched frame per client per tick, a byte budget for other heroes' cosmetics: 56 ms → 4.4 ms. See forty players.
The house z-fighting came back once when homes became walk-in at 15:19 (timber top plate and plaster wall shared a plane). Fixed by moving one surface 2 cm.
What I did versus what the agents did
The agents wrote the systems. My job was in between: turning a one-line scope item into a brief an agent with no context could build right, picking seams so five features could land in parallel, and refusing to push when the tree wasn't green.
By the numbers
| Brief to first commit | 1 h 45 min |
| Brief to production | 4 h 43 min |
| Opus 5.5 agents launched | 41 (up to 10 at once) |
| TypeScript, excluding generated files | ~98,400 lines in 522 files |
| Tests | 545 across 45 files |
| Zones | 63: 6 towns, 20 wilderness, 37 dungeon floors |
| Biomes | 34 |
| Monsters / bosses | 109 / 18 |
| Skills | 54 across 9 trees |
| Item bases / affixes / uniques / set items | 300 / 161 / 83 / 15 |
| Shipped 3D and audio assets | about 15 MB, all Kenney CC0 |

Read next
- One process, one port, forty players: Express, tRPC and Colyseus on one Bun server
- Worlds from a seed: deterministic procgen, never sending the map
- Six acts in an afternoon: level design, biomes and act mechanics
- From Kenney kits to a cohesive world: the asset pipeline
- Plain Three.js, pushed hard: the renderer
- Twenty ticks a second: the authoritative server simulation