Create · Design first

Design the game before you build it

“Make it fun” is not a spec. The Design Codex turns a vague idea into a coherent, buildable concept — composed from parts that are known to work, twisted until it's yours.

Spark — a composed starting point

Walking Sim / Vignette, but perspective” — anchored on Vampire Survivors, built around portal / linked doors.

Anchor

Vampire Survivors One-stick horde survival where you only move — weapons fire themselves — and the whole game is your multiplying build racing an escalating swarm.

Genre

Walking Sim / Vignette Story delivered by moving through space — atmosphere and environmental narrative over mechanics; pace is the design.

Verb

Portal / Linked Doors Two openings become one — carry momentum and sightlines through folded space.

Twist

perspectiveflip who the player is — invert the point of view on the loop

seed 576079902 — reproduce it: npm run design:spark -- --seed 576079902

That's the codex composing, live — a real anchor, genre, verb and twist sampled from the shelves below. A spark is a starting point to bend, never a design to obey.

Tension first

Every design hangs on a spine

Before shelves and twists, the codex asks one question: what tension does the player live inside? One objective, one scarcity, one verb that spends the scarce thing — find that loop and every other module has something to hold onto. The engine can even prove the coupling is load-bearing: remove a system andthe ablation gatechecks the game actually gets worse.

IntentSpineAnchorComposeTwistShapeHandoff

The Design Codex

217 composable modules, indexed for machines

Not a book of advice — a parts bin. Every module carries tags, “use when” guidance and a list of what it composes with, so an agent can actually assemble a design from it.

Browse every module

Straight off the shelf

What a module actually looks like

Hand it to your agent

Paste this into Claude Code, Cursor, or any coding agent. It interviews you first — the building comes after the brief.

Help me design an original game with the Hayao Design Codex, then prototype it.

1. Read the codex index — 217 composable design modules:
   https://github.com/hellojanpacan/hayao-js/tree/main/design
   (start with design/INDEX.md, then design/00-process/the-spine.md)
2. Interview me. Turn my intent into a one-page brief:
   player fantasy, scope, constraints, pillars.
3. Find the spine first — the tension the whole game hangs on —
   then compose: an anchor + a genre template + the systems they
   imply, and one twist ("X but Y").
   Check design/70-antipatterns/ before locking anything in.
4. Show me the brief. Iterate until I sign off — the concept is mine,
   the composition is yours.
5. Then prototype it in the default Regalia style:
   npm create hayao@latest my-game && cd my-game && npm install
   Read AGENTS.md and docs/CONVENTIONS.md, build the core loop first.
6. Prove it works: npm run verify. Run it: npm run dev.

Start with the interview.

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

Concept already clear in your head?Take the quickstart— gofully from scratch— or, if all you have is something you made and can't put down,start from a spark.