# For AI agents: start here

> **Note.** Coldwave is in private development: there is no public download yet. These steps apply from the first public release.

This page is for an AI agent making or changing a Coldwave game, and for the person
setting one up. Everything an agent needs is offline, in `frost`, and every page of this
site is also Markdown at its own address with `.md` (this page: `agents/index.md`).
[llms.txt](../llms.txt) lists every page; [llms-full.txt](../llms-full.txt) is all of
them in one file.

If you are a person: [Claude Code and Codex](harnesses.md) shows how to point
your agent at a game. The rest of this page is written to the agent.

## Read in this order

1. **The core**: `frost reference` (or [reference/core](../reference/core.md)). About
   2,600 tokens: project shape, the everyday calls, the rules that save a run, and the
   page index. Read it once per session.
2. **One page when the task needs it**: `frost reference 3d`, `frost reference physics`, ...
   Each page is held under 7,000 tokens. [The index](../reference/index.md) says what
   each is for.
3. **One call or field**: `frost reference sound.play`, `frost reference --search point light`.
4. **One protocol command**: `frost protocol frame.at`, or `reference.read {name:
   "protocol.frame.at"}` over MCP.
5. **A recipe** below, for a whole task with its checks.

Inside a game made by `frost new`, the same pages are installed as skills
(`.claude/skills/ven-*/SKILL.md`), with an `AGENTS.md` and an `.mcp.json` that serves
`frost mcp game.toml`. `frost skills --here` installs or updates them in any game. See
[Claude Code and Codex](harnesses.md).

## The loop

Every change, however small:

```sh
frost check game.toml                                  # loads? FILE:LINE: CODE: fix
frost run --headless --steps 600 --shot shot.png game.toml   # look at the picture
frost test game.toml                                   # the recorded run still holds
```

A successful load is not a working game: play it and look at a shot. When a change is
meant to alter the run, accept it with `frost test --write` only after looking, and never
write over a kept shot picture without its owner's approval.

## Recipes

Each is a task with the exact commands, a sample project that is tested with every
build of these docs, and the checks that prove it worked.

| Recipe | Task |
| --- | --- |
| [Third-person 3D game](recipes/third-person.md) | A hero to walk with the camera behind it, under a sky with shadows |
| [Profile a frame](recipes/profile-a-frame.md) | Find what a slow step spends its time on, and prove a fix |
| [Debug a script](recipes/debug-a-script.md) | Stop at a line, read values, find who wrote a field |
| [Prove a change](recipes/prove-a-change.md) | Prove a behaviour change when the recorded run no longer holds |
| [Stream a world](recipes/streaming.md) | Cut a big world into cells that enter near the player and leave behind |
| [Export](recipes/export.md) | Export to the web, desktop, iPhone and Android, and prove it is the same game |
| [C# or Luau?](recipes/csharp-or-luau.md) | Choose the language for a game's scripts |

## Rules that hold everywhere

- Gameplay state lives in components or `state`, never in a script's outer `local`.
- Read input by action (`input.get(0, "move")`), never by device.
- Random is seeded `math.random`; use `math.pow` for a power other than a written 2, 3 or 0.5.
- Never hand-write what the engine generates. Fetch a declaration before using it: its
  required fields, trust and limits are there.
- Errors have stable codes: the [error index](../reference/errors.md) links each to where
  it is explained.
