Spielerando

A starter game your AI keeps correct

A tiny browser game in TypeScript to build on with Claude Code, Cursor or any AI that reads AGENTS.md. Its jump comes from three tested blueprints and is written down as a model with a checker. The files for your AI make it change the model first, and show you what the tests and the check printed before it says done.

Download the zip (53 KB)

Free, no sign-in. Needs Node.js 22.18 or newer, and nothing else.

What you get

How to start

  1. Install Node.js, version 22.18 or newer. There is no npm install: the project needs nothing else.
  2. Unzip the file and open the folder in your AI tool.
    • Claude Code: open a terminal in the folder and type claude. It reads CLAUDE.md, which brings in AGENTS.md. Type /model-first before a change, or just ask: the skill also starts on its own when a request fits it.
    • Cursor: open the folder with File, Open Folder. Cursor reads AGENTS.md in the project's folder by itself.
    • Another AI: many coding tools read AGENTS.md too; the list on agents.md names Codex, Gemini CLI, GitHub Copilot's coding agent, Windsurf and others. In a plain chat window, paste AGENTS.md at the start.
  3. Type npm run dev in a terminal in the folder, open http://localhost:8080 and play once.
  4. Paste the text below into your AI, with the change you want.

Paste this to your AI

It makes your AI show you the tests and the check working before the first change, and then work the loop from AGENTS.md.

This folder is Spielerando's jump starter. Read AGENTS.md and follow it for the whole session.

Before we change anything:
1. Run npm test and npm run check, and paste the summary of each exactly as printed.
2. Run npm run check -- --plant double-jump and show me that the check fails on the planted mistake.
3. Explain model/jump.json to me in plain words: its states, its moves and its two rules.

Then I want this change: [describe it, for example "add a double jump"].
Change model/jump.json first and show me the check's output on it. Ask me before you change a rule. Then change the code and run npm test. Only call it done with the output of both commands in the same message, and if you do not know something, say so.

What the files for your AI say

AGENTS.md sets one loop for every change to how the game plays: change the model, run npm run check and paste its output, change the code, run npm test and paste its summary, and only then say it is done, with both outputs in the same message. It also tells your AI to ask before it changes a rule, to keep the blueprints' tests green instead of editing them, and to say "I don't know" instead of guessing.

The skill runs the same loop step by step in Claude Code. Its header follows the Claude Code docs on skills as we read them on 26 November 2026, with only the fields that claude.ai and the Skills API accept as well, and npm test checks the header and that every command and file the skill names exists. How skills work, and how to write your own: Claude Code game development skills. This is the file as it is in the zip:

---
name: model-first
description: Changes how the game plays the safe way, model first. Updates model/jump.json, runs npm run check and npm test, and shows their output before calling anything done. Use when adding or changing a mechanic, a jump, movement, a state, a rule, the level, or a value that changes how the game plays.
allowed-tools: Bash(npm run check) Bash(npm test)
---

Follow these steps for every change in this session that alters how the game plays.

1. Read `model/jump.json` and every other file in `model/`. Say which states, moves and rules the change touches. If you cannot tell, say "I don't know" and ask.
2. Change the model first. New behaviour becomes states and moves; a new promise becomes a rule. Changing or removing a rule that is already there is the person's decision: ask first.
3. Run `npm run check` and paste its output exactly as printed. Do not summarise it and do not judge the model yourself.
4. If it fails, show the path it printed, fix the model, and run it again, until it passes or the person decides.
5. Change the code to match the model, and `src/jump-states.ts` with every state you add or remove.
6. Run `npm test` and paste the lines with tests, pass and fail. If a test in `src/mechanics/` fails, fix your change, not the test.
7. Tell the person what changed, in plain words, with both outputs. If a command did not run, say so and stop: never report a check that did not run.

What the check printed

When this page was built, the check ran on the model as it comes in the zip, and again with a double jump planted into a copy. This is what it printed, word for word (Node v24.15.0).

The model as it comes

npm run check

Model: model/jump.json (5 states, 11 moves, 2 rules)
Checker: tools/state-machine-check/code.ts, from https://spielerando.com/en/recipes/state-machine-check
A round is one airtime, from leaving the ground until the feet are back on it. "ground (again)" marks its end.
The answers rest on the walk over states, which covers every state a round can reach. The walk over paths only matters for rules about the order of moves; the rules here are about states.

1. The shape of a round: stuck states, endless circles, missing or unreachable states
No problems found.
States: walked 6 of those reachable, limit 100,000. Every reachable state was walked.
Paths: walked 154 paths, each up to 32 moves. 149 ended by themselves and 5 were still going at the limit. What the paths say holds only that far.

2. The rules, tested in every state a round can reach
- "one take-off per airtime": at most 1 move tagged takeoff per round
- "a jump closes the extra moment": never in grace after a move tagged takeoff, in the same round
No problems found.
States: walked 9 of those reachable, limit 100,000. Every reachable state was walked.
Paths: walked 154 paths, each up to 32 moves. 149 ended by themselves and 5 were still going at the limit. What the paths say holds only that far.
Your rules tested: 2.

PASSED: no problems in model/jump.json.
Diagram: model/jump.diagram.md

With a planted double jump

npm run check -- --plant double-jump

Planted mistake "double-jump": A press while falling starts a second jump, so the player can climb anywhere.
The file itself is not changed.

Model: model/jump.json (5 states, 12 moves, 2 rules)
Checker: tools/state-machine-check/code.ts, from https://spielerando.com/en/recipes/state-machine-check
A round is one airtime, from leaving the ground until the feet are back on it. "ground (again)" marks its end.
The answers rest on the walk over states, which covers every state a round can reach. The walk over paths only matters for rules about the order of moves; the rules here are about states.

1. The shape of a round: stuck states, endless circles, missing or unreachable states
No problems found.
States: walked 6 of those reachable, limit 100,000. Every reachable state was walked.
Paths: walked 200,000 paths, each up to 32 moves. 110,560 ended by themselves and 89,440 were still going at the limit. It stopped at the limit of 200,000 paths. What the paths say holds only that far.

2. The rules, tested in every state a round can reach
- "one take-off per airtime": at most 1 move tagged takeoff per round
- "a jump closes the extra moment": never in grace after a move tagged takeoff, in the same round
Found 1 problem.
States: walked 13 of those reachable, limit 100,000. Every reachable state was walked.
Paths: walked 200,000 paths, each up to 32 moves. 110,560 ended by themselves and 89,440 were still going at the limit. It stopped at the limit of 200,000 paths. What the paths say holds only that far.
Your rules tested: 2.
rule-broken: Rule broken: "one take-off per airtime" is false in state rising [takeoff 2].
  Path: ground > [press, or a kept press] rising [takeoff 1] > [reaches the top] falling [takeoff 1] > [press in the air, planted] rising [takeoff 2]

FAILED: 1 problem in model/jump.json. First path: ground > [press, or a kept press] rising > [reaches the top] falling > [press in the air, planted] rising

What it proves, and what it does not

The check walks every state an airtime can reach, so what it says holds for the whole model. The model is only as true as its match with the code: that part is tested on random runs, the same ones each time, not proven for every run. The check knows two kinds of rule, "at most so many moves of one kind per airtime" and "never in this state after a move of that kind". A rule of another kind needs new code in tools/model.ts, with a test that it can fail. And nothing here tells you whether the game is fun: that is for you to play and find out.

Licence

Use it, change it, and publish or sell the games you make with it. Please do not republish the starter itself, or Spielerando's code, as a collection or a template pack. The blueprints' code and the checker are under the MIT licence; LICENSE.md in the zip says which part is under what. This is general information and has not been reviewed by a lawyer yet.

Using Godot?

This starter is for the browser. The pages of the three blueprints also carry their code in GDScript, with tests, to build the same jump in Godot.

Next step

Blueprint

Double Jump

The starter's example change is a double jump, which its rule of one take-off per airtime forbids; this blueprint shows how an air jump shares a press with the coyote time and buffering already there.