TASK Build a 2D sprite-animation pipeline for a game. An image model draws ONE SHEET per animation; deterministic code does everything that has to be exact. Do not use a video model: each cell of the sheet is one frame. STACK Python 3 (Pillow + numpy) for finishing. Aseprite driven from the command line as the editable source and the exporter. Godot 4 for playback and for the SpriteFrames resource. An image model that can hold a grid (GPT Image 2 works well). STEP 1 — THE SHEET PROMPT (one call per animation) Ask for exactly this, and do not deviate: - 16-bit pixel-art animation sheet, chunky pixels, flat 2-3 tone shading, no antialiasing - Exactly 8 distinct frames in a strict 2x4 grid (left to right, then top to bottom), equal cells - The subject at the SAME position and size in every cell, unless the motion says otherwise - Solid flat #FF00FF magenta in every cell, all pixels opaque - No drawn cell borders, panels, frames or grid lines anywhere - Palette: list the project's colours as hex (keep it to about 16 hex values in the prompt) - No text, labels, numbers, UI, characters or creatures (drop whichever you do not want) - State the motion: for a LOOP say "equally alive in all 8 frames"; for a one-shot say "progresses to a peak and settles" - Then write the motion frame by frame: "Frames: 1 ...; 2 ...; 3 ...", naming what moves AND what must stay still ("the body stays in place; only the lid and the dust move") - Give the native frame size in pixels and say it is a small in-game prop or effect, not an illustration One sheet gets you 8 frames that share a generation, a light direction and a palette. Never ask for one frame at a time. STEP 2 — FINISHING (in code, never by eye) - Read the REAL image size. Do not trust the size the API reports: real files came back 1344x752, 1536x1024, 1774x887, 1983x793 and others. - Slice 8 cells with rounded fractional boundaries: r, c = divmod(i, 4); box = (round(c*w/4), round(r*h/2), round((c+1)*w/4), round((r+1)*h/2)) Odd dimensions are normal, so slice from the file you actually got. - Key the magenta: red > green+35 AND blue > green+35. - Remove the pale panel the model sometimes draws even when borders are forbidden: light low-chroma pixels (min channel >= 185, chroma <= 55) that form full-span lines inside a cell. - Snap every pixel to the project palette. Your gate is 0 off-palette colours. - Force alpha to exactly 0 or 255. Partial alpha is how sheets start looking soft. - Register the frames: translate each frame so its opaque silhouette matches the reference frame (or use the source anchor for effects that must keep a fixed origin), then scale every frame by ONE common factor so they match size. A frame that drifts a pixel reads as broken in motion. - Export per animation: frames/*.png, an editable .aseprite with real tags, a PNG/JSON strip, a portable Godot SpriteFrames .tres, and a GIF preview for review. STEP 3 — THE JITTER PASS (the part everybody misses) The model redraws the whole sprite in every cell, so parts that should be identical change by a pixel or a shade each frame, and the sprite flickers in game. A colour-range threshold cannot separate that from real motion: a screen flickering between two similar blues changes LESS than a wobbling outline does. Separate on SHAPE instead: - per pixel, spread = max minus min of R, G and B across that tag's frames - change mask = spread > 12 - density = the share of a 5x5 window that changed; the animated core is density >= 0.55, plus anything with spread > 90 - dilate that core by 1 pixel so the animated part keeps its own outline - reference frame = the frame with the most opaque pixels - lock = a pixel that is opaque in EVERY frame of the tag AND outside the dilated core; set it to the reference frame's value in all frames - run this per ANIMATION TAG, inside the .aseprite file (a Lua script driven by the Aseprite CLI), so the editable source is what gets fixed and the exported sheets follow from it - never run it across a sheet that packs alternatives instead of animation (autotile masks, decal or material variants, damage states, direction sets): those frames are not a timeline, and averaging them corrupts the art On a real project this found jitter in 22 of 139 sheets already in the game and locked ~4,800 pixels. One prop changed 81 pixels of its own housing every single frame before the fix. STEP 4 — GATES BEFORE ANYTHING SHIPS - 0 off-palette colours across every sheet - alpha values are only {0, 255} - 8 distinct frames per animation (two identical frames means the animation stalls) - pixel-exact round trip: export from the .aseprite and diff it against the sheet - a real AnimatedSprite2D playback test that reaches every frame, not just a file that exists - a headless run of the game with zero errors - loop QA: compare consecutive frames by actual RGBA difference and silhouette overlap. A similar silhouette is NOT a duplicate frame. Measure before you reject a take. STEP 5 — REVIEW BEFORE YOU MASS PRODUCE Build a local review page first: one card per animation showing the animation AND a strip of all frames side by side (a moving preview hides exactly the per-frame defect you are hunting), the spec it was made against, and three buttons per item: approved, fix, re-run. Save every click straight to a JSON file your agent reads. Verdicts that only exist in a chat window are verdicts you have lost. COST GPT Image 2 through a ChatGPT subscription, or Higgsfield at 1k + medium = 1 credit per sheet. A 1k sheet (1344x752) massively oversamples a 32x32 frame, so 1k is the right setting rather than the cheap one. 16 animations = 16 sheets = 16 credits.