Metadata-Version: 2.4
Name: anime-production-mcp
Version: 3.6.0
Summary: Turn finished illustrations into an animated video cut to music with local LTX video generation on your own GPU, as an MCP server.
Author: Tobias Fong
License-Expression: MIT
Project-URL: Homepage, https://tobiasfong.github.io/projects/anime-production.html
Project-URL: Repository, https://github.com/tobiasfong/webcomic-toolkit/tree/master/servers/anime-production-mcp
Project-URL: Changelog, https://github.com/tobiasfong/webcomic-toolkit/blob/master/servers/anime-production-mcp/CHANGELOG.md
Keywords: mcp,anime,animation,video,ltx,comfyui,webcomic
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp<2,>=1.2.0
Requires-Dist: requests>=2.31.0
Requires-Dist: Pillow>=10.0.0
Requires-Dist: numpy>=1.24.0

# anime-production-mcp

<!-- mcp-name: io.github.tobiasfong/anime-production -->

Turn finished illustrations into an animated video cut to music — entirely
locally, no subscription, no watermark.

Companion to [`music-generation-mcp`](../music-generation-mcp): that server makes
the track and its beat grid, this one animates the artwork and cuts to it.

Verified on a 6 GB RTX 3060 Laptop.

**Paid upgrade (optional).** If LTX-2.5 cannot give you a shot — an action
that has to actually happen, or faces and hands that have to survive the
motion — `animate_shot_cloud` and `edit_shot_cloud` send it to Seedance or
Kling on Higgsfield instead. Each take is billed to your own Higgsfield
account and priced before it is submitted. Without a Higgsfield key nothing
changes: the free local chain never calls them, and they refuse to run.

---

## The rule that decides whether a shot will work at all

> **LTX relocates what EXISTS. It cannot RE-IMAGINE it.**

| works | fails |
|---|---|
| Arm swings, head turns, a fist moving down | **Blinks** — the eyelid was never drawn |
| Hair, cloth, drifting snow, rotating runes | **Mouth shapes** — teeth and tongue don't exist |
| **Fire** — existing pixels churning | **Growing crystals** — new geometry |
| Camera drift | **Foreshortening** — a punch toward the viewer needs knuckles redrawn at a new angle |

⚠ **This table was measured on LTX-2.3, and 2.5 moved the line.** On 2.5 a
punch came toward the viewer, two people talked, and a blink landed on one seed
in three once the prompt described it (see the workflow section), and ice grew
from a raised hand — visible in the video, though easy to miss in still frames.
So on 2.5 every shot goes to `animate_shot` first, eyes and mouths
included; the right column below is now where a shot goes after rewording and
more seeds have failed, not where it starts.

The 2.3 column is also not a fair verdict on 2.3. Every 2.3 take behind it was
25 frames at 0.5–0.8 MP (832x576, later 768x1088), one pass; the 2.5 takes that
beat it were 49–97 frames at ~1.8 MP, half size then refined. On 2.5, 17 frames
alone tore faces. How much of the gain is the model and how much is the settings
was never separated — 2.3 was removed before it was run at 2.5's settings.

Everything about this server follows from that line, and choosing the wrong tool
is what wastes GPU-hours:

- Left column → `animate_shot`
- Eye- and mouth-scale features → `edit_frame` + `composite_patch`
- Anything that must **appear** → the drawn effects (`add_streaks`, `grow_layer`,
  `add_water`, `add_impact`)

Re-rolling seeds on an impossible ask never works. Seed variance is real *only*
when the request is achievable.

## The second rule: resolution, and the two curves that cross

*The measurements in this section and the next were made on LTX-2.3, removed
2026-10-22. The resolution rule held on 2.5; the length rule flipped (see
the CHANGELOG, 2.3.0).*

**Do not pick a size by hand.** `animate_shot` derives it from the artwork via
`lw.pick_size`, which matches the source's own aspect and aims at ~2.2 MP.
`LTXVImgToVideo` silently resizes the input to whatever it is given — no
letterboxing, no warning — so a hardcoded default stretches every panel of a
different shape, and a vertical panel comes out crushed into landscape.

And do NOT pad the input to reach a target aspect. Bars eat the pixel budget,
and LTX has no concept of a border, so it drifts and bleeds into them. Letterbox
at ASSEMBLY, on a finished clip, where nothing can smear into it.

### The measurement that set the target

One panel (a hand-raise that needed 15 repaired frames in v1), same seed, same
one-sentence prompt, three sizes, reviewed frame by frame:

| size | anatomy | prompt fidelity |
|---|---|---|
| 0.50 MP `864x576` | f10-12 fingers **fused**, hand deformed, face warped | on prompt |
| 1.01 MP `1216x832` | f7-8 fingers slightly fused — "just need to draw a line" | on prompt |
| 2.18 MP `1792x1216` | **perfect, zero defects** | **wandered off** — a spell-cast became the character styling his hair |

Two curves cross, which is why "bigger is better" fails as a rule:

- **Anatomy improves monotonically with resolution.** Too few latent pixels and
  the model cannot render what it is moving. Settled.
- **Prompt fidelity degrades with it.** Spare capacity is spare freedom, and a
  one-sentence prompt doesn't constrain it, so the model invents motion.

~1 MP is where they cross **for a short prompt** — and that clause matters,
because upstream guidance is 4-8 descriptive sentences and the wandering at
2.18 MP is exactly what a longer prompt should suppress. If prompts get longer,
re-measure; the target may move up. Pinning the last frame with `LTXVAddGuide`
is the other candidate fix, and is untested.

### The old default, for the record

`832x576` was this server's default for two days because it was fast. That is
the single most expensive mistake in its history: on one 15-panel scene it cost
**65 hand-repaired frames**, and the seven panels that came back clean were the
ones that barely moved.

At 832x576 a hand occupies ~40 px, which after the VAE's 8x compression is ~5
latent pixels — not enough to draw fingers. Any hand that **moves** turns to
mush. That is a resolution problem, not a seed problem, and no amount of
re-rolling fixes it.

| knob | recommended | this project's default | verdict |
|---|---|---|---|
| resolution | 1280x720 minimum, 1080p+ better | now per-panel via `pick_size` | **fixed** |
| prompt | 4–8 descriptive sentences | now 5, motion-only | **fixed** |
| frames | 121, 257 | 17 (the 8n+1 floor) | tested and rejected — see below |
| steps | 8 on `distilled` | 8 | correct all along |
| motion density | fewer, readable beats | now one beat per panel | **fixed** |

**And resolution is nearly free.** A ceiling sweep on the 6 GB card found **no
out-of-memory point at all**, with steady-state cost of ~90-140 s a take across
the entire range once the model is resident. The first take of a session pays
the model load and reads much slower — never benchmark on it. The low default
bought speed that was immediately spent on repairs.

⚠ **The negative prompt does nothing on `distilled`.** It runs at cfg 1.0, and
classifier-free guidance discards the negative branch entirely at cfg 1.0.
Verified: full negative vs. empty string gave **pixel-identical** output (mean
absolute difference 0.000, against ~67 between two seeds). Do not tune it —
raise the resolution instead. It applies only on `dev`, at cfg 3.0.

### Verified by eye, not by metric (2026-08-09 ceiling sweep)

| config | artist's verdict |
|---|---|
| 1216x832 len17 | **usable** |
| 1408x800 len17 | six fingers throughout; hand deforms in the last 2 frames |
| 1920x1088 len17 | **good, no problems** |
| 1216x832 len25 | smears and *missing* fingers; mostly okay |
| 1216x832 len33 | frames 12-17 bad (smears, extra fingers, deformed hands) — **every other frame fine, including the tail** |

### Length is its own failure mode — resolution does not fix it

Re-run at 1920x1088, same seed and prompt, changing only length. The hypothesis
was that the length defects were really resolution defects. **They were not.**
At 1216x832 the len-33 bad window was frames 12-17; at 1920x1088 it was frames
11-13. Same place, more pixels.

| length | bad frames (artist's eye) | usable after a cut | duration | cost |
|---|---|---|---|---|
| 17 | none | 17 | 1.4 s | 141 s |
| 25 | 18-19 — smears | 23 | 1.9 s | 199 s |
| 33 | 11-13 — a finger vanishes | 30 | 2.5 s | 229 s |
| 49 | **all of them** — an extra arm, present from frame 0 | 0 | — | 446 s |

Two things to take from this:

**Defects scale with length: 0, 2, 3 bad frames at 17/25/33, then structural.**

Cutting the bad window back out does NOT rescue these takes, and it is worth
being precise about why, because "only 3 bad frames out of 33" sounds cheap:

| take | drop | kept | seam vs. the clip's own median motion |
|---|---|---|---|
| len 25 | 18-19 | 23 | **3.6x** — marginal |
| len 33 | 11-13 | 30 | **5.2x** — reads as a skip |

The len-33 shot is slow: its typical frame-to-frame change is 2.33, so removing
three frames leaves a jump five times larger than any real motion in it. A cut
is only invisible when the motion under it is slow relative to the cut — and a
slow clip is exactly where a cut shows most. **Longer takes were wanted for
CONTINUITY, and a cut is precisely what spends continuity.** Length 17 clean
beats length 33 with a pop in it.

⚠ THE SEAM RATIOS ABOVE OVERSTATE THE PROBLEM, and the threshold behind them
was invented rather than measured. The ratio divides by the clip's own median,
so it punishes slow clips: len-33's seam had a SMALLER absolute jump (12.0) than
len-25's (18.6) yet scored worse. In practice **dropping 2-3 frames mid-clip is
fine** — 0.17-0.25 s at 12 fps reads as a faster action, and limited animation
runs on twos and threes. `cut_frames` keys its verdict off the number of frames
dropped for that reason, and reports both `jump` and `ratio` so neither number
stands alone. What sinks long takes is not the cut; it is that a longer take was
wanted for CONTINUITY in the first place.

**Length 49 fails STRUCTURALLY, not by drift.** An extra limb present in frame 0
is a broken composition, not accumulated error, and no cut recovers it.

⚠ CAVEAT ON THE LENGTH NUMBERS: this sweep used `EmptyLTXVLatentVideo` — it is
**text-to-video**, with no source illustration. `animate_shot` is image-to-video,
where frame 0 is the artist's drawing. The len-49 extra arm in particular is a
t2v failure that i2v conditioning would likely prevent. The resolution findings
transfer (latent-pixels-per-hand is the same arithmetic); the long-length
findings need one i2v confirmation on real art before being trusted.

Two rules die here:

⚠ **"The tail degrades" is a length-17 observation, not a law.** At len 33 the
damage sat in the MIDDLE — frames 12-17 — and the clip RECOVERED after it. Do
not blind-truncate long takes; find the bad window and cut that.

⚠ **Height may need to be divisible by 64, not 32.** `validate()` enforces 32.
1408x800 is the only size tested whose height fails 64 (800/64 = 12.5) and the
only one with extra fingers. The VAE compresses 8x and the transformer
patchifies 2x2 on top, so 64 is a plausible true alignment unit and a
half-patch would smear precisely at fine detail. UNCONFIRMED — one take at
1408x832 settles it. Until then, prefer heights divisible by 64: 704, 832, 896,
1088.

### The v2 result — the same scene, both levers fixed

The 15-panel scene that cost 65 hand-redrawn frames was rerun with per-panel
sizing and 5-sentence i2v prompts, everything else held constant (distilled,
length 17, strength 0.9, 3 seeds a panel, same artwork, same artist reviewing
every frame):

| | v1 | v2 |
|---|---|---|
| frames redrawn by hand | **65** | **0** |
| frames trimmed | — | 1 |
| panels truncated for damage | 13 of 14 | 0 |
| resolution | 864x576 for everything | per-panel, 1.12–2.18 MP |
| prompt | 1 sentence | 5 sentences, i2v style |

v1 needed a `TRUNCATE` table with an entry for almost every panel because almost
every panel fell apart before its end. v2's is one frame.

Three things that only showed up at scene scale:

- **The pixel target is softer than one panel suggested.** Panels landed
  anywhere from 1.12 to 2.18 MP — aspect and the 2x upscale cap decide, not
  preference — and all were usable. p02 was clean at 1.12 MP where p08 failed at
  1.01 MP, because p02 is a calm shot of a hand GRIPPING a hilt and p08 is an
  OPEN hand raising. Grips and small motions survive ~1 MP; open hands, fast
  motion and close faces want 2 MP+.
- **LTX declines rather than smears.** Asked for a fast kick it scored
  3.6/5.8/8.2 against a scene typical of 11–48 and simply did not move the leg.
  The same panel asked to "raise her leg a little higher" worked first try. An
  unusually LOW score is the one signal that reliably means trouble.
- **More motion is not better motion.** On the last panel the artist chose the
  take scoring 7.9 over one scoring 14.8. Never pick by score.

### When LTX is worth it at all

The v1 accounting was damning: traditional limited animation would have been
45–75 drawings for that scene, each a cheap lasso-and-rotate, so 65 repairs on
top of generation was *more* work than drawing it — and each repair was harder
than a fresh drawing.

**v2 reverses that**, at 0 redrawn frames and one trim, for ~3 GPU-hours
unattended. What made the difference was not the model; it was giving it enough
pixels and a real prompt.

Two things still true. **Shot selection still decides everything** — the works
/fails table above has not moved, and asking for a motion LTX cannot do wastes
GPU no matter the resolution. And **the seed hunt is load-bearing**: v2 ran 3
seeds a panel and the artist rejected several for tail smears. The zero is the
count for *selected* takes, not for all takes.

## Working notes that cost real time to learn

- **Ask for the largest motion that reads, and put it FIRST.** The leading
  request gets the motion budget. "Blinks slowly" froze on four seeds; the same
  shot asked to "turn her head gently" moved — and the eyes closed along with it.
  On 2.3, feature-scale motion only ever arrived as a passenger. On 2.5 it can
  lead when it is described rather than named: "blink" closed the eyes for good,
  "her eyes close, then open wide, then close again" blinked.
- **Negative instructions are ignored by both models.** "Do not close her eyes"
  closed them; "without turning" turned. Phrase everything positively.
- **Seeds do not transfer across configs.** Change `length` or the prompt and the
  space reshuffles. Re-hunt after any parameter change.
- **Judge the 12 fps preview.** The take is 24 fps real-time motion; the
  preview keeps every other frame, so it plays at true speed on twos, the way
  the cut will. `animate_shot` writes it for you.
- **The motion score is not quality, and it is wrong more often than it looks.**
  It measures *change*. A take whose faces dissolve scores very high; a take that
  barely moves scores low even when it is the only clean one. In a config
  comparison it ranked the artist's only acceptable take **last**, because that
  take had the most motion. Edge-energy artifact scanning has its own blind
  spots — it missed a face melting inside hair (hair edges mask it), a sword
  vanishing (outside the face box), eyes disappearing (0.2% of the frame), and —
  on a 33-frame take — it reported failure at frame 3 when the real damage was
  frames 12-17 and frame 3 was fine. On the length sweep it went fully useless:
  it called failure at frame 1, frame 0 and frame 16 on three takes whose real
  defects were at 18-19, 11-13, and everywhere. Every time the numbers disagreed with the
  artist's eye, the eye was right.
  Treat all scores as a *sort order for what to look at*, never as a verdict.
- **Freezing is as useful as animating.** If the hands go wrong, a `hold` scene
  beats another twenty seeds.
- **ComfyUI runs prompts serially.** The seed hunt is a sequential loop by
  design; stacking jobs just burns timeouts in the queue.
- ⚠ **Never run LTX and Klein at once on a small card.** One edit submitted
  while an LTX batch was running made a 22B video model and FLUX fight over
  6 GB; it thrashed until the job hung and cost **five hours** and two finished
  takes. They now live on two ComfyUIs, so neither queue can order them —
  `animate_shot` and `edit_frame` each refuse to start while the other side has
  a job in, and otherwise unload its model first: an idle ComfyUI still holds
  its weights in system RAM, and one LTX take with Klein resident ran 694 s
  against 176 s without.
- ⚠ **No machine repair of an LTX hand has ever shipped. Plan to draw them.**
  Every repaired hand in the test scene's final cut was finished by the
  artist's hand: one over a Kontext base, the rest drawn outright.
  Klein, given a sword hand LTX had blurred to a smudge, gave 0 usable takes in
  three seeds (the closest had a bad thumb), and its crisp inking stood out
  against the soft LTX frames around it. FLUX.1 Kontext before it did no
  better: its best takes were bases the artist still drew on. Run a repair only
  as a base, while there is other work to do in the meantime.

## The workflow: Klein-generated art and hand-drawn art

**0. Lock every first frame before animating any of them.** Generated pictures
are not yet "existing art" -- they are candidates. Render all the first frames,
send each to the author at full size, reroll or repair whatever he flags, and
animate only the frames he has locked, in one pass at the end. Hands nearly
always need a repair. Do it with a boxed edit, but ERASE the box first
(`klein_workflow.edit_region(..., erase=True)` in the character server;
`edit_frame` has no erase option): Klein builds on whatever is already inside a
box, and an unerased edit asked to shrink an oversized machine returned the
same machine at the same size.

Learned 2026-10-25 on a 51-shot short, where a batch was started on unreviewed
frames. Its first take was rejected for the FRAME, not the motion (the city read
as present-day), and that frame then went through seven revisions: flying cars
out, a tower moved twice, rails rerouted, a machine shrunk, a billboard
replaced. Each revision would have thrown away an animated take. A frame costs
~50 s and a take 4-20 min, so fix the cheap thing first.

**1. Image-to-video for every shot, whatever made the picture.** 49 or 97 frames
at 24 fps, ~3 seeds, motion-only prompts: the camera, the motion, then what
stays still. On an eight-scene teaser of hand-drawn panels this alone did a
punch toward the viewer, a waltz turn, a prayer pose and two people talking.

**2. If a shot fails, reword before anything else.** Wording fixed both
failures met so far: "blink" closed the eyes for good, while "her eyes close,
then open wide, then close again" blinked; a profile head turned to the camera
until the prompt said it stays in profile. Then try more seeds.

**3. Only if it still fails** — and the route depends on where the picture came
from:

- **Klein-generated art: first-and-last-frame.** Render the END pose with Klein
  (`edit_frame` on the panel itself, e.g. "her raised leg fully extended in a
  kick toward his chest", keeps the composition), then animate between the two
  with `last_frame_path` (or `ltx_run.py --last`).
- **Hand-drawn art: no one draws extra poses, and Klein makes the end pose in
  two steps, gentlest first.**
  1. A BOXED edit (`edit_frame` with `box` around only the part that moves):
     Klein redraws that region and every pixel outside it stays the original
     drawing. Watch the redrawn part for inking that stands out.
  2. If the box doesn't work, an UNBOXED edit of the whole panel — the last
     resort. ⚠ Klein then redraws the WHOLE picture: even a boxed edit changes
     the rest of the frame by a mean of ~18.5 before the paste-back, and unboxed
     that all stays, so expect the drawing re-inked in Klein's style.

No shot is left as a still: a still is a failed shot, with no reason to be in an
animation. (`animate_shot_cloud`, paid models on Higgsfield, is a separate
option outside this chain.)

**4. Review as video, not contact sheets.** Approve, trim a tail that runs too
far, add drawn effects, then assemble — every scene plays once, with no loops
and no holds on the last frame.

## Install

### From PyPI (simplest)

With [uv](https://docs.astral.sh/uv/) installed, there is nothing to clone:

```bash
claude mcp add -s user anime-production -- uvx anime-production-mcp
```

or `pip install anime-production-mcp` and register the `anime-production-mcp`
command. The package is the server only. **It does not include ComfyUI or any
model**: the Klein ComfyUI, the LTX-2.5 and FLUX 3 Klein files (see "Models"
below) and an ffmpeg for `assemble_video` still have to be installed on your
machine, and the `WEBCOMIC_ANIME_*` variables below point the server at them.
The paid Higgsfield tools need `HF_API_KEY_ID` and `HF_API_KEY_SECRET` (add
them with `-e` on the command above); nothing else is required. Installed this
way, the shot library goes to `~/anime-production-mcp/output`.

### From the repo

```bash
python -m venv .venv
.venv/Scripts/python.exe -m pip install -r requirements.txt
.venv/Scripts/python.exe test_tools.py            # 13 GPU-free checks
```

Register it (paths must be absolute):

```bash
claude mcp add anime-production -- /abs/path/.venv/Scripts/python.exe /abs/path/server.py
```

## Models

Everything this server renders runs on the **Klein ComfyUI** (v0.41+, port
8189, `C:\AI\ComfyUI_flux3`), started on first use. No custom nodes are needed.

### LTX-2.5, for `animate_shot`

From Lightricks' gated `Lightricks/LTX-2.5` repo (accept its license on Hugging
Face first). INT8 is the build for an RTX 30-series card:

| file | folder |
|---|---|
| `ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors` | `models/diffusion_models/` |
| `gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors` | `models/text_encoders/` |
| `ltx-2.5-video-vae-bf16.safetensors`, `ltx-2.5-audio-vae-bf16.safetensors` | `models/vae/` |
| `ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors` | `models/latent_upscale_models/` |

About 40 GB, against 32 GB of RAM on the machine it was built on: ComfyUI drops
the text encoder after reading the prompt, and takes ran ~3.5 min (49 frames)
on a 6 GB card. ⚠ A 97-frame take is about SIX times slower, not twice: two at
1920x1088 ran 21 and 23 min (2026-10-25), where 49 frames at the same size took
3.6. An earlier "~7 min a 97" here did not hold at that size.
Run it at 24 fps and 49 or 97 frames,
never 17 — see the CHANGELOG.

LTX-2.3 (GGUF, on the main ComfyUI with city96's ComfyUI-GGUF) was this
server's model until 2026-10-22. The measurements in the sections above were
made on it.

### Klein, for `edit_frame`

`edit_frame` runs FLUX 3 Image Klein on a **separate** ComfyUI (v0.41+, port
8189, `C:\AI\ComfyUI_flux3`), the same install the character and background
servers use, started on first use. The main ComfyUI is deliberately not
upgraded: the music model and matting run there through add-ons never tested on
v0.41. Files, from BFL's gated `black-forest-labs/flux-3-image-klein-comfy`
repo (each BFL repo needs its own license click):

| file | folder |
|---|---|
| `flux3_image_klein_sd_int8_convrot.safetensors` | `models/diffusion_models/` |
| `qwen3vl_4b_int8_convrot.safetensors` | `models/text_encoders/` |
| `flux2-vae.safetensors` | `models/vae/` |

INT8, not FP8: an Ampere card has INT8 tensor cores and no native FP8.
`check_status` reports whether Klein is up and which of these are missing.
FLUX.1 Kontext, the model this replaced, is retired; see the CHANGELOG.

## Environment

| variable | default |
|---|---|
| `COMFY_URL` | `http://127.0.0.1:8188` |
| `WEBCOMIC_ANIME_COMFY_DIR` | `C:\AI\ComfyUI_windows_portable` |
| `WEBCOMIC_ANIME_AUTOLAUNCH` | `1` |
| `WEBCOMIC_ANIME_TIMEOUT` | `1800` |
| `WEBCOMIC_ANIME_OUTPUT` | `./output` (`~/anime-production-mcp/output` when installed from PyPI) |
| `WEBCOMIC_ANIME_FFMPEG` | first on `PATH` — only `assemble_video` needs it |
| `WEBCOMIC_ANIME_KLEIN_URL` | `http://127.0.0.1:8189` |
| `WEBCOMIC_ANIME_KLEIN_DIR` | `C:\AI\ComfyUI_flux3` |
| `WEBCOMIC_ANIME_KLEIN_AUTOLAUNCH` | `1` |
| `HF_API_KEY_ID`, `HF_API_KEY_SECRET` | unset — only `animate_shot_cloud` needs them; a Higgsfield API key pair from console.higgsfield.ai (or both as `HF_CREDENTIALS=id:secret`) |
| `WEBCOMIC_ANIME_HF_URL` | `https://api.higgsfield.ai` |
| `WEBCOMIC_VOICEVOX_URL` | `http://127.0.0.1:50021` — only `tools/voice.py` needs it |
| `WEBCOMIC_VOICEVOX_ENGINE` | the winget install's `VOICEVOX\vv-engine\run.exe`, started if nothing answers |

**Japanese dialogue (optional).** `tools/voice.py` renders lines to .wav through
a local [VOICEVOX](https://voicevox.hiroshiba.jp/) engine (free, Japanese only):
`say(text, voice, out_wav, speed=, pitch=, intonation=)`, with `find_voice()`
and `speakers()` to pick a voice. Every voice needs a `VOICEVOX:<character>`
credit, which `credits()` builds, and each character has its own terms; read
them before a voice's first use.

## Tools

**Generate** — `animate_shot` (the seed hunt: N takes, retimed, scored, recorded)
· `animate_shot_cloud` (PAID: Seedance or Kling on Higgsfield, the model named
on every call, priced before submitting, one take per call by default, for
actions LTX refuses; `kling-4.0` for Kling) · `edit_shot_cloud` (PAID: hands an existing take to a
video-edit model to redraw, keeping its motion — for a take whose motion is
right but whose faces or hands smear) · `edit_frame` (Klein keyframe or boxed edit) · `composite_patch` (bring back
the region only)

**Judge** — `measure_motion` · `retime_clip` · `contact_sheet`

**Repair** — `inspect_moment` (a slowed clip with frame numbers burned in,
suspect frames bordered red) · `repair_frames` (replace named frames with a
hold of the clean frame before them)

**Draw** — `add_impact` · `grow_layer` · `add_streaks` · `add_water`

**Frame** — `measure_frame_slot` · `frame_clip`

**Assemble** — `assemble_video` · `write_srt`

**Library** — `list_shots` · `get_shot` · `approve_shot` · `forget_shot` ·
`forget_rejected` · `check_status`

### Scene kinds — most of the edit is picking these

`assemble_video` takes `[{"clip": ..., "kind": ..., "name": ...}]`:

| kind | timing | for |
|---|---|---|
| `loop` | whole panel | ambient with no natural end — drifting cloth, an argument, falling snow |
| `pong` | whole panel, forward-then-back | oscillatory motion; no seam at the turnaround |
| `once` | **exactly its clip** | an event that can't repeat; ping-ponging would un-grow the ice |
| `hold` | clip, then freezes | play the motion, then rest — contemplation |

`once` gets no static hold on purpose. Holding a still frame *before* an event
reads, to a viewer who doesn't know one is coming, as the video having frozen.
The stationary time is cut and handed to the end card. `hold` works because the
stillness comes *after* the motion, so the viewer has just watched something
happen.

### Frames and slots

⚠ **The alpha bounding box is not the slot.** Decoration drawn on transparency
makes the gaps between leaves count as transparent, so the bbox comes out far
too wide — on the reference frame, 1180px against a true 802px, which left a
background-colored line along the bottom of every panel.
`measure_frame_slot` measures the columns clear for the *full height*, which is
the only region artwork can show through.

## Scope guard

Generation, framing, drawn effects and assembly. **Not** music (that's
`music-generation-mcp`), **not** image generation, **not** color grading or
compositing beyond what's here. If those appear, stop and split.

## Privacy

`output/` is gitignored, and deliberately: shot recipes embed prompts, and an
assembled video's config embeds credits and subtitle cues — i.e. unreleased
lyrics. Do not add an exception to "keep the manifest". The source artwork is
the author's own; the machinery is the open-source deliverable, the art is not.
