# Make your own CLanimation (feed this file to Claude)

You are going to author a **CLanimation** — a looping ASCII animation for
[CLEmotions](https://github.com/Fnordcorps/CLEmotions), the widget that visualises what
Claude Code is feeling. The person talking to you will give you **an image and/or a
description** of what they want. Your job is to produce **one `.clanim` file** they can
drop into their `clanimations/` folder.

## Output rules (strict)

Produce exactly one JSON file and nothing else — no scripts, no HTML, no executable
anything. A `.clanim` is pure data:

```json
{
  "v": 1,
  "state": "wait",
  "name": "my-animation",
  "fps": 12,
  "cols": 44,
  "rows": 22,
  "palette": ["#0d0221", "#ff2975", "#ff9e00", "#fff700", "#ffffff"],
  "frames": ["<row><\n><row>...", "..."]
}
```

| Field | Rules |
|---|---|
| `state` | one of: `boot` `wait` `think` `read` `write` `run` `ask` `swarm` `done` `glitch` — pick what the person asks for, or the best fit |
| `name` | lowercase letters, digits, hyphens only, max 64 chars |
| `fps` | 1–30 (8–14 feels right for most loops) |
| `cols` × `rows` | use **44 × 22** (the standard grid; hard caps 96 × 48) |
| `palette` | 2–8 hex colours, **darkest → brightest**. Characters are coloured by their "ink weight" along this gradient |
| `frames` | 2–600 strings. Every frame must be exactly `rows` lines of exactly `cols` characters, joined with `\n`. **Printable ASCII only** (0x20–0x7E) — no unicode, no control characters |

**Filename**: `<state>__<name>.clanim` (double underscore). The file must be saved with
exactly that name or the widget ignores it.

## Style guide (this is what makes them good)

- **Bulky beats spindly.** Character cells are twice as tall as wide, so vertical and
  diagonal strokes must be **at least 2 characters wide** or they look thin. Fill shapes;
  don't just outline them.
- **Fill the frame.** Use the whole 44×22 canvas — timid, centered little drawings look
  lost on the widget.
- **Ink ramp**: light → heavy roughly ` . : - = + * # % @`. The heavier the character,
  the brighter its colour from the palette. Use `@`/`#`/`%` for cores and highlights,
  `.`/`:` for faint trails and glows.
- **Loop seamlessly.** The last frame must flow back into the first. Drive motion with
  full sine cycles (position = sin(2π × k × frame/frameCount) with whole-number k), or
  make travel distances wrap exactly. A visible "jump" at the loop point ruins it.
- **Vibrant palettes.** 5 stops, dark background colour first, hot highlight last.
  Claude-orange `#d97757` is the house accent if unsure.
- **Personality over precision**: HAL 9000 × GERTY from Moon × Portal-turret humour.
  No emoji — build everything from raw ASCII.
- 24–90 frames is the sweet spot. More frames = smoother but bigger; keep the file
  under 2 MB.

## Working from an image

Downscale the image mentally to 44×22 cells (remember cells are 1:2, so the image's
height maps to half as many rows as you'd think). Map dark areas to ` `/`.`/`:` and
bright areas to `#`/`%`/`@`. Then animate it: a brightness pulse, a shimmer sweep, a
flicker, drifting particles around it — even a subtle 2-frame breathe brings it alive.

## Before you hand it over — validate

Check every one of these; the widget's validator rejects violations:

- [ ] every frame is exactly `rows` lines × `cols` chars
- [ ] only printable ASCII in frames
- [ ] `fps`, `cols`, `rows`, `palette` within limits
- [ ] filename is `<state>__<name>.clanim`
- [ ] loop is seamless (frame 1 follows naturally from the last frame)
- [ ] strokes ≥ 2 chars wide, frame well filled

Then tell the person: drop the file into the CLEmotions `clanimations/` folder (or
`%APPDATA%/CLEmotions/clanimations/` for the installed app), and it appears in Settings
immediately. Share it with the world via a pull request to the CLEmotions repo's
`clanimations/community/` folder.
