Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
docs: describe reference and side-video facing controls
Soohong Kimdb5d6f7f25e9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 97471f5..a73fab4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,13 @@All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.+## v2.5.3 - Consistent reference and video facing++- Reference edits can opt into `gen --facing right|left` and `--facing-fix mirror|regen|none`. The default `preserve` leaves existing generation callers unchanged. Regeneration runs once, rechecks direction and mirrors a remaining opposite result.+- `video --direction side` and batch side inputs inspect the still before animation. Batch uses one shared check per side still and matches the corrected canvas with the motion prompt. Original inputs stay intact; cached canvases and prompts must match the requested facing.+- Direction reports include model-reported confidence and correction evidence. Failed or uncertain vision calls record `unknown` with a reason and continue without correction. Front-facing observations are unchanged; accessory handedness is not corrected.+- Synthetic tests cover direction parsing, exact mirrored pixels, regeneration rechecks, prompt/canvas agreement and existing callers.+## v2.5.2 - Cleaner video spill correction- Automatic spill selection distinguishes the key hue from yellow/cyan or red/blue material and discounts dark contamination in the reference matte edge band. Bright key-coloured details still count as material.diff --git a/README.ko.md b/README.ko.mdindex 4ae290c..4359a99 100644--- a/README.ko.md+++ b/README.ko.md@@ -26,6 +26,8 @@`sprite-gen` 은 그 간극을 메우는 Codex/Claude 스킬이자 Python CLI 다. **기본 이미지 한 장**을 주면 행 단위로 생성을 이끌고, 캐릭터의 아이덴티티를 고정하고, 크로마 배경을 벗겨 진짜 알파로 만들고, 각 포즈를 깨끗한 투명 프레임으로 추출한 뒤, **기계가 읽을 수 있는 `manifest.json.frame_layout`** 과 함께 런타임 아틀라스를 굽는다. 또는 같은 정지 이미지를 비디오 모델에 넘겨 모션 상태별로 이음매 없는 투명 루프를 받을 수도 있다. 생성이 끝내 해결하지 못하는 마지막 10% 를 위해, **큐레이션 웹뷰**가 굽기 전에 비교·거부·미세 조정하고 루프를 실시간으로 확인하게 해준다.+측면 스프라이트는 `video-set`이 기본으로 방향을 검사하고 반대 방향이면 사본을 좌우 반전해 캔버스와 클립 프롬프트의 `--facing right|left`를 맞춘다. 참고 이미지 편집부터 맞추려면 `gen --ref image.png --facing right --facing-fix mirror`를 쓴다. `gen`의 기본값은 방향 보존이다. [방향 옵션](SKILL.md#side-view-facing).+## 요청으로 시작하기**스프라이트**나 **이미지**를 요청하면 된다. 에이전트가 접근 권한을 확인하고, 빠진 프로바이더/모션 선택만 물어보고, 기존 파이프라인을 실행해 파일을 전달한다. 큐레이션 뷰는 선택 사항이다. 선택을 한 번 저장해 두면 스프라이트와 이미지 기본값을 따로 재사용할 수 있고, 일회성 요청은 그 값을 덮어쓰지 않는다. [사용자 워크플로와 기본값](docs/user-workflow.md).diff --git a/README.md b/README.mdindex dbf8634..4fc5a1a 100644--- a/README.md+++ b/README.md@@ -26,6 +26,8 @@ Ask an image model for a "sprite sheet" and you know what you get: a character w`sprite-gen` is a Codex/Claude skill and a Python CLI that closes that gap. Give it **one base image** — it drives generation row by row, locks the character's identity, strips the chroma background to real alpha, extracts each pose as a clean transparent frame, and bakes a runtime atlas **with a machine-readable `manifest.json.frame_layout`**. Or hand the same still to a video model and get back a seamless, transparent loop per motion state. For the last 10% that generation never gets right, a **curation webview** lets you compare, reject, nudge and watch the loop live before you bake.+For side sprites, `video-set` checks and mirrors opposite-facing inputs by default, keeping `--facing right|left` consistent across canvas and clip prompts. Use `gen --ref image.png --facing right --facing-fix mirror` to normalize a reference edit; `gen` otherwise preserves orientation. See [facing options](SKILL.md#side-view-facing).+## Start with a requestAsk for **sprites** or **an image**. The agent checks access, asks only for missing provider/motion choices, runs the existing pipeline, and delivers the files. The curation view is optional. Save your choices once to reuse separate sprite and image defaults; a one-off request does not overwrite them. [User workflow and defaults](docs/user-workflow.md).diff --git a/SKILL.md b/SKILL.mdindex c0daaeb..5272155 100644--- a/SKILL.md+++ b/SKILL.md@@ -59,6 +59,25 @@ $SPRITE_GEN_ROOT/.venv/bin/sprite-gen workflow --kind imagePass choices already stated in the request. The guide checks access, combines explicit choices with saved defaults, and returns only missing questions. Follow its start and finish stages. Always pass the resolved provider explicitly to generation tools. Deliver checked files before offering the curation view; save defaults only when the user agrees. The complete conversation and settings contract is owned by the linked document, not duplicated in individual pipeline docs.+## Side-view facing++Keep the side still, canvas placement and motion prompt facing the same direction.+`video-set` checks each side input once before canvas placement, mirrors an opposite-facing copy,+and uses `--facing` for both the canvas and clip prompt. The source image stays intact.++| Command option | Values and default | Behavior |+|---|---|---|+| `gen --facing` | `preserve` (default), `right`, `left` | With `--ref`, an explicit direction adds a prompt requirement and checks the generated still. |+| `gen --facing-fix` | `mirror` (default), `regen`, `none` | Mirror an opposite result, regenerate once and recheck, or record without correction. A still-opposite regeneration is mirrored. |+| `video --direction` | `side`, `front`, `back`; unset by default | `side` opts into facing inspection and a matching prompt requirement; front/back skip it. |+| `video --facing`, `video-set --facing` | `right` (default), `left` | Required side direction. |+| `video --facing-fix`, `video-set --facing-fix` | `mirror` (default), `none` | Correct an opposite side input or only record the observation. Batch side inspection is enabled by default. |++Generation reports record direction, model-reported confidence and correction under `extra.facing`;+video reports and batch items use `facing`.+An uncertain or failed inspection records `unknown` and its reason and continues without correction;+front-facing observations also remain unchanged. Mirroring does not preserve left/right accessory handedness.+## Execution routes| Task | Entry | Contract |