Create · From zero
Start from scratch
No house style, no template — an empty, solver-ready project. Since every asset is code, "bring your own" means writing vectors, palettes and synthesis, not sourcing files.
> npm create hayao@latestWhat stays, whatever you build
The look is yours. The contract isn't.
Scratch drops the style, not the guarantees. Four invariants make a Hayao game something an agent can build and prove, whatever it looks like:
Deterministic, always
All randomness flows through one seeded RNG. No wall-clock, no hidden state — same inputs, same game, on any machine.
Pure rules, machine proofs
The game's logic is a pure state transition, so a solver can search every level to the end and prove it winnable.
The scene tree is the view
Canonical state is plain data; nodes that only display it are marked cosmetic and never pollute the hash.
Verify before you present
npm run verify replays inputs and compares hashes. Your agent proves the game works before showing it to you.
Hand it to your agent
Paste this into Claude Code, Cursor, or any coding agent — it does the rest.
Set up the Hayao game engine and build me a 2D game — my own direction, no template. 1. Scaffold a project: npm create hayao@latest my-game && cd my-game && npm install 2. Read AGENTS.md and docs/CONVENTIONS.md for the invariants. 3. Ask me what we're building AND how it should look — the art direction is mine. Define a palette and draw every asset as code: vectors for art, synthesis for sound. 4. Keep the rules pure, with a solver proof for every level; the scene tree is only the view. 5. Prove it works: npm run verify (deterministic + every level winnable) 6. Run it: npm run dev Start now.
Using Claude Code?
Install the Hayao plugin
The workflow above, packaged and enforced: authoring skills, commands like /hayao:new-game and /hayao:inspect-api, and a determinism gate — a hook that runs the proof harness and blocks the agent from finishing until it passes. Verification stops being a habit and becomes a wall.
/plugin marketplace add hellojanpacan/hayao-js /plugin install hayao@hayao
Prefer to read first?
Quickstart guide
A complete, runnable game in ~40 lines
Documentation
Guides, API & conventions
Example source
Finished games, each with its proof
Want a running start instead?Quickstart with the default style— it's a default, not a wall.