Production workflow / agent orchestration
Parallel-Agent Game Build With a Contract
The Prompt
Set up a multi-agent build for a browser game of roughly 30,000-40,000 lines, using Claude Code with several parallel agent sessions. The goal is a coherent game, not four incompatible demos. Step 1 — write the contract first: - Create CONTRACT.md before any feature code. It defines module boundaries, file ownership, public interfaces, event names, units, coordinate conventions and the fixed timestep. - List every module with an owner agent and a one-paragraph responsibility. Modules must not import each other except through the declared interface. - Define the scene graph contract: units in metres, Y-up, camera handedness, and which system owns the render loop. Ambiguity here is what produces a game where half the assets face backwards. Step 2 — define integration points: - Each module exposes an init(deps), update(dt), and dispose() surface. No module may reach into another module internals. - All cross-module communication goes through a typed event bus with a published event table. Adding an event requires updating the table in the same commit. - Shared state lives in one store with named slices; nobody writes outside their slice. Step 3 — parallel work rules: - Each agent works only in its owned files. If an agent needs a change outside its files, it writes a request into INTERFACE_REQUESTS.md instead of editing. - Every agent must run the headless test suite before reporting done, and must paste the output into its report. A report without test output is not done. - Integrate in a fixed order: core loop, input, physics, content, audio, UI. Never integrate two unowned modules at once. Step 4 — quality gates: - Gate 1: game boots with no console errors and a placeholder scene. Gate 2: player can move and collide. Gate 3: one complete encounter. Gate 4: all content and audio. Gate 5: performance budget met on a mid-range phone. - At every gate, run a 10-minute headless session and report frame-time p95, memory growth, unreachable states and any console warning. Step 5 — finish: - Produce BUILD_LOG.md with the model names, wall-clock and active hours, line counts by module, test count and what each gate caught. State plainly which parts are machine-generated and which third-party assets are used, with licences. Deliver the contract and the gate checklist as files, then execute the build. Do not start feature code before the contract is reviewed.
What This Prompt Produces
Long Wind is the evidence: about 38,000 lines of JavaScript and GLSL in roughly 151 files, written by Claude Opus 5.5 in Claude Code over about 28 hours wall clock and 19 hours active, with 30 headless tests and a single runtime dependency. The contract is what keeps parallel agents from building four different games.
Modification Tips
- Write the coordinate and timestep conventions into the contract. Most "AI built a broken 3D game" stories are a units disagreement.
- Give every module a single owner and forbid cross-edits. Interface request files are cheaper than merge conflicts between agents.
- Make test output mandatory in every agent report. It is the only reliable signal that work actually landed.
- Integrate one module at a time in a fixed order. Parallel generation plus parallel integration is how a project becomes unbuildable.
The Game This Prompt Produced
Want to try it? Open Claude, paste the prompt, and you'll have a playable game in minutes. When you're happy with the result, submit it to Daily AI Games.