Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

fix(prompts): remove illustration and rendering style bans

Soohong Kimdecc53e8feb0
diff --git a/sprite_gen/gen/prepare.py b/sprite_gen/gen/prepare.py
index 112e927..0a41c0c 100644
--- a/sprite_gen/gen/prepare.py
+++ b/sprite_gen/gen/prepare.py
@@ -56,9 +56,7 @@ STYLE_DEFAULT = (
"match the attached base/anchor reference image EXACTLY: same pixel density "
"(logical pixel block size), same body proportions, same outline weight, same "
"palette, same shading style, same level of detail. Do not restyle, do not "
- "change proportions, do not add or remove detail density. Avoid polished "
- "illustration, painterly rendering, anime key art, 3D render, vector app-icon "
- "polish, glossy lighting, soft gradients, and anti-aliased high-detail edges."
+ "change proportions, do not add or remove detail density."
)
TRANSPARENCY_ARTIFACT_RULES = [
@@ -960,7 +958,7 @@ def row_prompt(request: dict[str, Any], state: str, entry: dict[str, Any]) -> st
Character: {character.get("description") or character["id"]}.
Style contract: {request["style"]}.
-Use this prompt as an authoritative sprite-production spec. Do not expand it into a polished illustration, painterly character image, anime key art, 3D render, vector mascot, glossy app icon, realistic portrait, or marketing artwork.
+Use this prompt as an authoritative sprite-production spec.
Animation action: {entry["action"]}.
diff --git a/tests/curate/test_directions.py b/tests/curate/test_directions.py
index c484cf2..e3159b4 100644
--- a/tests/curate/test_directions.py
+++ b/tests/curate/test_directions.py
@@ -90,3 +90,16 @@ def test_directions_mirror_source_must_be_generated(tmp_path: Path) -> None:
out_dir, result = _prepare(tmp_path, "--directions", "down,side,up", "--mirror", "left=right")
assert result.returncode != 0
assert "not in directions.set" in (result.stdout + result.stderr)
+
+
+def test_prepared_prompts_preserve_reference_style_without_medium_bans(tmp_path: Path) -> None:
+ out_dir, result = _prepare(tmp_path, "--directions", "down,side,up")
+ assert result.returncode == 0, result.stdout + result.stderr
+ request = json.loads((out_dir / "sprite-request.json").read_text(encoding="utf-8"))
+ assert "same body proportions" in request["style"]
+ for path in (out_dir / "prompts").rglob("*.txt"):
+ prompt = path.read_text(encoding="utf-8")
+ assert "same shading style" in prompt
+ assert "Exactly" in prompt and "full-body frames" in prompt
+ for removed in ("polished illustration", "painterly", "anime key art", "3D render", "vector mascot", "glossy"):
+ assert removed not in prompt, (path, removed)