Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
Merge branch 'aldegad/follow-gain-fit-size-hold': video-follow can lower its gain to the largest that does not fold, and the walk size hold compares a pose with itself one cycle on instead of a straight line
Soohong Kimf5175ea45d36
diff --cc CHANGELOG.mdindex 4c691c2,cc41b4f..4d35ad7--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -2,9 -2,11 +2,12 @@@All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.- ## Unreleased+ ## Unreleased - The size hold reads a walk's change of size one cycle on, and a follow-through that would fold its region can take the largest gain that does not+ - **Output change: which walk and run loops are held at their size.** `video-loop --anchor motion-auto` with `--size-hold auto` (the default) reads the clip's change of size one cycle on instead of off a line fitted through the clip (`gait_fallback.cycle_drift`). A clip whose reading crosses 1 % one way or the other is cut differently: one that starts from a standing pose and settles into the walk is no longer held (the line read the settle as a shrinking body), and one whose settle pulled the line under 1 % while the body did grow is now held. A clip held either way is scaled back by the change one cycle on, not by the line's, so its frames differ too: a clip whose first frames zoom in reads its walk's own change, not the zoom, and can find a cycle it did not find scaled by the line. A clip under 1 % both ways, and every clip with `--size-hold off`, is cut exactly as before. `video-follow` with its default `--on-fold refuse` writes what 2.24.0 wrote.+ - **Fix: a first pose that settles into the walk read as a change of size.** The hold fitted a line to the subject's height over the clip, and a clip that stands tall in its first frames and then walks a few pixels lower read as a body shrinking the whole way: at 1 % or more it was scaled back. The hold now finds the lag at which the pose (cut out about its feet) matches itself best, compares each frame's height — to a fraction of a pixel, the rows' coverage summed — with the frames one, two, … of those lags later, and carries the median change per frame over the clip; the few frames of the first pose do not move the median of the rest. On a synthetic walker that stands 6 px taller for its first frames and walks at one size, the line read −2.2 % and, scaled back by it, the clip found no cycle; it now reads 0 and is cut as filmed. A walker that settles and grows 2.5 % read +0.6 % on the line and was not held, and found no cycle either; it is now held and cut. `size_hold` in the report carries the evidence: `method`, `lag`, `pose_match`, `pairs`, `per_lag` and `drift_fitted_line` (what the line would have read). The gait fallback after a failed search still reads the line at 3 %. [docs/video-pipeline.md](docs/video-pipeline.md#4-loop--period-first-seam-second-then-the-gait-floor).+ - **New `video-follow --on-fold lower`**: a move that would fold a region over itself is no longer only refused. The move is the gain times the move at gain 1, so the gain at which a region folds is known (2 · radius / (π · move at gain 1)); `lower` takes the largest gain under it, in steps of 0.01 and no more than `--gain`, one gain for the strip set by the region with the smallest radius, and names it on stderr. It never goes under 1, the mass as measured: a region too small for that is still refused, and the message names the largest gain that would not fold. The record says what was asked and what was used (`gain_requested`, `gain`, `on_fold`, and `fold`: lowered or not, the move asked for, the move at gain 1, per region the smaller radius, how near the used move is to folding it, and the gain at which it folds). The default stays `--on-fold refuse`: the same strip, GIF, WebP and refusal message as 2.24.0, byte for byte; the record only gains those keys. [docs/video-pipeline.md](docs/video-pipeline.md#6-follow-through--video-follow).+- **Docs: a clip from a video MCP on your agent goes through the set stage and the size hold.** That route stopped at `video-loop`, so what `video-set` does for a set was left out. It now cuts a walk or run with `--anchor motion-auto` (the anchor that holds a clip with no end frame at its first frame's size; `video-loop`'s default for a walk, `body`, does not), takes `--fps` from the frames report, and ends with `video-cycle-align --view …` once a walk or run is cut in two or more directions (`SKILL.md` routes, [docs/video-pipeline.md](docs/video-pipeline.md#a-clip-from-a-video-mcp-on-your-agent--zcre) with `Set` and `Size` rows in its ZCRE table, [docs/user-workflow.md](docs/user-workflow.md), the READMEs). `video-cycle-align` is in the pipeline's diagram and verb table. `SKILL.md` forbids replacing any engine stage — extraction, the loop cut, set alignment, loop repair — with a script of your own: the engine's own options first, the defect reported, a new clip only for what no stage can reach. [docs/qa-motion.md](docs/qa-motion.md) says its "regenerate that row" is for image rows; a video loop is repaired and aligned by the engine first. No code or output changes.## v2.25.0 - Every view of an aligned walk starts as the same foot lands, read off the legs, and RIFE leaves no black between crossing legs