Building with coding agents
How disko supports coding agents with JSON output, exit codes and AGENTS.md.
disko treats a coding agent as its primary user. Everything an agent needs
is available from the terminal, without prompts or a browser.
AGENTS.md
npm create @disko-game writes a short AGENTS.md into every new game and
room project. It covers the import rules and asset imports, the globals and
disko: modules, how to run disko dev --json, and how to publish with a
dry run first. Keep it in the project so agents read it.
No prompts
Every choice has a flag, and disko never waits for keyboard input. A
missing required value fails immediately with exit code 2 and names the flag.
The only human step, the browser sign-in, is optional: set DISKO_TOKEN to a
CLI token.
JSON output
With --json, a one-shot command writes exactly one JSON object on stdout.
Progress stays on stderr.
A failure has error and, for build problems, problems. Each problem has
code, path, line, column, a message that states the fix, and a
docs link to the code's error page.
disko dev --json --no-open runs the game in a test room and writes one event
per line: sign_in_required, room_ready (with the link), reload (ok
with the digest, or failed with problems; the last working game keeps
running), runtime_error (phase, message, stack), host_restarted and
stopped. Set DISKO_TOKEN to a CLI token with the test_rooms permission
to run it without a browser. See Test rooms.
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | build or validation problems, always with problems |
| 2 | usage error |
| 3 | authentication or authorization failure |
| 4 | disko or the registry is unreachable |
| 5 | conflict (such as version_exists) or quota exceeded |
A typical loop
Start
npx disko dev --json --no-openin the background and share thelinkfromroom_readywith the people testing.Edit the game. Each edit produces a
reloadevent; fix every problem a failed one reports, and everyruntime_error.Run
npx disko publish --dry-run --jsonand fix every problem it reports.Publish with
npx disko publish --visibility <visibility> --json.
Docs for agents
/llms.txt indexes every page of these docs, and each page is
also served as plain Markdown at its URL plus .md.