Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
release: 3.2.0 — the CHANGELOG section named for the release, pyproject and SKILL.md at 3.2.0
Soohong Kimf99cdd4874c2
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 66205d9..bd346a7 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,16 +2,7 @@All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.-## Unreleased--**Upgrading from 3.1.0: `video-loop-repair` can now restore damaged cells on held fixed cuts by reading source frames through recorded frame holds.** Fixed cuts held with `--size-hold auto` now record per-frame holds in `size_hold.cut_frames`. A 3.1.0 report of a held fixed cut lacks this record and stays `source-processing-unsupported`; cut it again with this version to enable repair. A report of a cut that was not held restores as before.--- **Held fixed cuts can now be restored from source frames.** Source projection applies each cut frame's recorded move and `padding_ltrb` before scrub, small-component cleanup, optional integer body ramp, one shared integer crop, and standard resampling. Unmodified cells must reproduce exactly, and cut frames must match `source_projection` hashes; a changed move on a replaced cell is refused as `source-processing-receipt-mismatch`. Reports without `cut_frames` stay `unknown` and `source-processing-unsupported`. Malformed `cut_frames` exit nonzero without writing a candidate. Cuts with `--anchor motion`, `motion-auto`, cycle alignment, wrap blends, or follow warps remain unprojected.-- `<name>.loop.report.json`: `size_hold` records `cut_frames` on held fixed cuts, giving an ordered list of exact float entries with `scale`, `foot_point_px` (`[x, y]`), and `lift_px` (or `null`).-- Repair records: `projection` in repair reports and candidate `restoration` receipts gain `size_hold` (`padding_ltrb`, `cut_frames`) on held cuts, binding proposal IDs to recorded moves.-- Python callers: new `gait_fallback.frame_hold(k, measured, lift=None)` returns a frame's move dict, and `gait_fallback.hold_frame(frame, move, pad)` applies it to one frame. `gait_fallback.undo_scale` uses both and preserves previous byte outputs.-- Output changes: on a synthetic walk away (15.0 % smaller over 73 frames, feet 20 px higher) cut on frames 24 to 47 with `--anchor body`, projection reproduces 24 of 24 cells. Restoring smeared cell 9 (25 pixels) yields verdict `improved` and recovers the cell byte for byte: 119 px tall with feet on row 129 (held loop cells run 119 to 120 px tall, feet on rows 129 to 130; cut with `--size-hold off`, cell 9 is 111 px tall on row 120, and the loop spans 107 to 113 px tall, feet on rows 116 to 122). In 3.1.0 this request ended `unknown`, `source-processing-unsupported` with no candidate. For six synthetic cuts (174 files), `video-loop` matches 3.1.0 except `producer` and `size_hold.cut_frames`. For five non-held cuts (110 files), `video-loop-repair` matches 3.1.0 except `measurement_engine` and candidate report digests.-- **Tests**: `tests/video/test_held_cut_restoration.py` checks that the synthetic walk away cut on frames 24 to 47 with `--anchor body` restores smeared cell 9 byte for byte with verdict `improved`, matching first-cell height and row while the filmed source frame is under 0.95 height and 8 px or more higher; checks exact cell reproduction; checks that reports lacking `cut_frames` stay `source-processing-unsupported`; checks that four malformed records exit nonzero with no candidate; checks that a 1 % scale alteration triggers `source-processing-receipt-mismatch`; and checks that `frame_hold` round-trips through JSON to match `undo_scale` with and without feet held.+## v3.2.0 - Cycle alignment hole and doubled faults, and loop repair for size held cuts**Upgrading from 3.1.0: `video-cycle-align` now gives way to the nearer source frame on made frames with enclosed limb holes under `--between auto`, changing only alignment outputs with such holes while made frames without them and all outputs from `video-loop`, `video-loop-compare`, and `video-loop-repair` keep their bytes.**@@ -29,6 +20,15 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the- Output changes: an alignment whose made frame shows a double outline over 3 % of its body height now delivers the nearer source frame at that cell instead, counted in `replaced` and `nearest_at` rather than `made_by_rife` and `made_at`. Other made frames are delivered as before with the same bytes; the report gains `doubled` on every made frame. A frame RIFE cross-fades so that both drawings' lines stay at part strength inside the silhouette over a long enough run now gives way too, still named to look at for its cross-fade (`look`); such frames were kept before because the cross-fade reading is no fault (it also reads over its line on a clean drawing between far-apart drawings, which reads no double outline and is kept). Synthetic numbers (the figure of the tests): a coat over two legs in boots outlined 3 px in near-black, the near boot lifted 18 px in one source frame and planted in the other; the frame drawn between with the first source frame's near-boot lines laid over it at 0.45 of their strength reads `outline_loss` 0, `outline_shift` 0, `ghost` 0, `hole` 0, `crossfade` 0 and `doubled` 0.102; in 3.1.0 it is kept, now the nearer source frame is taken. The frame drawn between, blurred, or smeared along the step, a hand moving 60 px over the coat, boots drawn with a second line, a hem drawn with two lines and softened, and a light crease carried at its own strength read `doubled` 0 and are kept. The jump repair of `video-loop`, its eased retime and overlapped wrap, `video-loop-compare`, and `video-loop-repair` do not read `doubled`; their measures and outputs are as before. A `--between-cache` directory written before this version is not taken from: the code of `rife.py` is part of what a kept frame is keyed by, so those frames are made again.- **Tests**: new `tests/video/test_inbetween_doubled.py`, synthetic only: the figure above; checks that the line left at 0.45 passes every earlier reading and reads `doubled` 0.102, as do both source frames' lines left at half and the colour blended inside the drawing's coverage; that resampling two frames to four under `--between auto` takes the nearer source frame at both made cells with the fault in the warning's words, while `--between rife` keeps them named; that a crease only one source frame draws, left at 0.3 to 0.6, gives way, left at 0.25 reads 0, and the frames that draw it or not keep their bytes; that nine clean, soft or source-drawn frames read 0 and are delivered as the very frame made; that the walker of `tests/video/test_crossfade.py` keeps its drawing between far-apart legs (16 to 3 degrees) in grey and black outlines, reading 0, while its cross-fade gives way, and its 10 to 5 degree cross-fade reads 0.0195 and is kept; and where each bound turns (seen at 0.30 of the line's contrast, not at 0.28; part strength up to 0.80, not 0.82; a boot moved 9 px, not 8; a stroke 3 px wide, not a patch 10 px square; a run over 7 columns, 0.0343, not 6, 0.0294), and that a hand smeared back over a source frame's line reads as that line left (0.063). `tests/video/test_crossfade.py`: the alignment test of the cross-fading stand-in now expects its frames across the legs' long steps to give way under `auto` as double outlines, still named to look at, and to be kept and named to look at under `--between rife`; its 10 to 5 degree cross-fade under `auto` is kept with `doubled` under the line.+**Upgrading from 3.1.0: `video-loop-repair` can now restore damaged cells on held fixed cuts by reading source frames through recorded frame holds.** Fixed cuts held with `--size-hold auto` now record per-frame holds in `size_hold.cut_frames`. A 3.1.0 report of a held fixed cut lacks this record and stays `source-processing-unsupported`; cut it again with this version to enable repair. A report of a cut that was not held restores as before.++- **New: Held fixed cuts can now be restored from source frames.** Source projection applies each cut frame's recorded move and `padding_ltrb` before scrub, small-component cleanup, optional integer body ramp, one shared integer crop, and standard resampling. Unmodified cells must reproduce exactly, and cut frames must match `source_projection` hashes; a changed move on a replaced cell is refused as `source-processing-receipt-mismatch`. Reports without `cut_frames` stay `unknown` and `source-processing-unsupported`. Malformed `cut_frames` exit nonzero without writing a candidate. Cuts with `--anchor motion`, `motion-auto`, cycle alignment, wrap blends, or follow warps remain unprojected.+- Report fields (`<name>.loop.report.json`): `size_hold` records `cut_frames` on held fixed cuts, giving an ordered list of exact float entries with `scale`, `foot_point_px` (`[x, y]`), and `lift_px` (or `null`).+- Repair records: `projection` in repair reports and candidate `restoration` receipts gain `size_hold` (`padding_ltrb`, `cut_frames`) on held cuts, binding proposal IDs to recorded moves.+- Python callers: new `gait_fallback.frame_hold(k, measured, lift=None)` returns a frame's move dict, and `gait_fallback.hold_frame(frame, move, pad)` applies it to one frame. `gait_fallback.undo_scale` uses both and preserves previous byte outputs.+- Output changes: on a synthetic walk away (15.0 % smaller over 73 frames, feet 20 px higher) cut on frames 24 to 47 with `--anchor body`, projection reproduces 24 of 24 cells. Restoring smeared cell 9 (25 pixels) yields verdict `improved` and recovers the cell byte for byte: 119 px tall with feet on row 129 (held loop cells run 119 to 120 px tall, feet on rows 129 to 130; cut with `--size-hold off`, cell 9 is 111 px tall on row 120, and the loop spans 107 to 113 px tall, feet on rows 116 to 122). In 3.1.0 this request ended `unknown`, `source-processing-unsupported` with no candidate. For six synthetic cuts (174 files), `video-loop` matches 3.1.0 except `producer` and `size_hold.cut_frames`. For five non-held cuts (110 files), `video-loop-repair` matches 3.1.0 except `measurement_engine` and candidate report digests.+- **Tests**: `tests/video/test_held_cut_restoration.py` checks that the synthetic walk away cut on frames 24 to 47 with `--anchor body` restores smeared cell 9 byte for byte with verdict `improved`, matching first-cell height and row while the filmed source frame is under 0.95 height and 8 px or more higher; checks exact cell reproduction; checks that reports lacking `cut_frames` stay `source-processing-unsupported`; checks that four malformed records exit nonzero with no candidate; checks that a 1 % scale alteration triggers `source-processing-receipt-mismatch`; and checks that `frame_hold` round-trips through JSON to match `undo_scale` with and without feet held.+## v3.1.0 - Walk and run loop gates for held animation and seam pops, size hold for fixed cuts, talking face layer and default chroma decontamination**Upgrading from 3.0.0: Fixed walk or run cuts and clips whose feet climb or sink now hold size and feet before cutting, changing bytes when size changes by 1 % or more.** Application scan numbers change for held clips, and held fixed cuts are not restored by `video-loop-repair`. Loops cut with `--size-hold off`, clips changing size by under 1 %, held `motion-auto` cuts on one row, and non-walk cuts keep their bytes. The report records `size_hold` on fixed walk or run cuts, `size_hold.feet` when size is held, `size_hold.anchor_regions` under `--anchor motion`, and `size_hold.at_cut` on fixed cuts; `producer` names the new version.diff --git a/SKILL.md b/SKILL.mdindex 9f3677f..c82ff3b 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,6 +1,6 @@---name: sprite-gen-version: 3.1.0+version: 3.2.0description: "Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation. Handles sprite requests, ordinary image generation/editing, typography logos (로고, 타이포그래피, 타이틀 글자, 타이틀 로고, wordmark, logo, title lettering: a title screen drawn with the title in it, its lettering lifted out transparent), standalone image-to-video clips (i2v, animate this still, 그록 영상, 이매진 비디오, 스틸 움직여줘, first/last frame, reference-to-video, 영상 이어붙이기, 영상 편집, extend/edit a clip), clips from a video MCP on the agent (ZCRE, 지크 MCP), chroma removal, animation atlases, video loops, 큐레이션뷰, image candidates, 팔레트 스왑, palette swap, recolor, engine exports, repeating backgrounds, projected shadows, talking face layers over body motions (말하는 얼굴, 입 맞추기, 얼굴 층, lip sync, face pack), motion/contact inspection and optional scene composition from existing assets."license: Apache-2.0depends_on:diff --git a/pyproject.toml b/pyproject.tomlindex c7a0fbc..2160ef7 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"name = "sprite-gen"# Release discipline: keep this package metadata version synchronized with# SKILL.md's `version:` field in the same release commit.-version = "3.1.0"+version = "3.2.0"description = "Component-row pipeline for clean 2D game sprites and animation atlases"readme = "README.md"license = "Apache-2.0"