The agent loop
A coding agent is only as good as what it can check. Most game platforms give an agent source code and a server log. Minekube gives it the same loop a developer has, and every step of it returns data the agent can read.
The loop
Section titled “The loop”- Read the rules of the project.
AGENTS.mdand theminekube-gamesskill say how a game is structured and which checks to run. See Build with a coding agent. - Change the rules and prove them in Bun. The agent edits the rules component, writes a Story, and runs
bun run checkandbun test. This takes seconds and needs no server. - Install on the live server.
mk dev .builds the game on every save, and the dev server swaps it on the next tick. A broken bundle never replaces a working one, so the agent cannot take the server down. - Play it with a bot. The agent starts a bot client through the daemon. The bot is a real Minecraft client with an Effect bundle that walks, clicks and reports what it saw.
- Read what happened. Both the server’s and the bot’s recordings stream into the devtools. The agent reads them through MCP:
list_entriesfor what happened,get_chainfor why, anddiff_statefor what changed. - Keep the evidence. A session that shows the behavior goes into
recordings/, andbun testreplays it from then on.
Why this works for agents
Section titled “Why this works for agents”- Everything is data. Messages, Models and Command arguments have Schemas. A recording is JSON that any tool can read, not a screenshot or a log line to parse.
- Causes are recorded. Every entry points to the entry that caused it. An agent does not guess why a score reset; it follows the chain back to the event.
- The agent cannot cheat. The devtools’
dispatchtool is off, so an agent cannot send messages the game would never get from a player. It acts through a real client, like a person. - Two sides, one clock. Server and client entries carry the world’s game time (
tick), so a test can line up what the server decided with what the player saw. - Mistakes fail fast. One command,
bun run check, runs the type checker and Effect’s strict lint rules, so code that ignores an Effect or a nullable value fails before the agent installs it.
What each step returns
Section titled “What each step returns”| Step | Returns | Where |
|---|---|---|
bun run check |
Type errors and Effect lint errors | The terminal |
bun test |
Failing Stories, and the first message where a replay diverges | The terminal |
mk dev . |
Installed or Reloaded with the revision, or why the bundle was rejected |
The server log |
| A bot client | The bot’s own recording, frame by frame | The daemon’s event stream |
| The devtools | Entries, cause chains and Model diffs | MCP at http:// |
Today and next
Section titled “Today and next”The check, the tests, the dev server, the devtools and MCP ship with every project today. Bot bundles need a Minekube checkout until @minekube/client is part of the release. The minekube-games skill does not cover bot clients yet.
Was this helpful?
Thanks for the feedback.