TLDR: Before you touch a committed sprite (or any binary asset), run
git log -- <path>. The generator script sitting in your repo is a hypothesis, not the source of truth. I learned this the expensive way.
The Setup
My workout app is something I'm building — the kind of thing that only makes sense at 11pm when you're half-distracted.
The whole gag is a 12-stage pixel-art dad character who starts skinny and gets jacked as you level up. Shirtless throughout. Red hair. Arms down. By L12 he's got a deep tan and a yellow headband because of course he does.
The sprites were good. Like, genuinely good — I had Apollo (my AI agent, Claude Code) generate them through PixelLab (pixellab.ai, an AI pixel-art API), and the result was miles ahead of what code-drawn pixel math produces.
The Task
I asked Apollo to reshape the muscle curve. The original sprites were getting jacked too early — I wanted him skinny and lanky through L5, then a real slow ramp up to a full peak at L12.
Simple enough change.
What Actually Happened
There was a file sitting in the repo: sprites/gen_sprites.py.
A parametric, code-drawn sprite generator. It looked capable. It was right there.
Apollo ran it.
What came back was… bad. The kind of bad where you don't even need to zoom in. Flat, blocky, procedural junk. PNGs that dropped from ~7KB down to 1.5KB each — if you ever need a tell that your "regenerated" art is way worse, that's it right there.
I opened the app.
"This looks horrible. You dropped the API-generated sprites and did WHAT?"
What We Got Wrong
gen_sprites.py was the OLD pipeline. Months ago it was how I drew the dad character in code. Then I replaced the whole thing with PixelLab — and that replacement even had its own commit message: 3bdd914 "replace code-drawn dad with PixelLab AI sprite set".
The script was a superseded decoy. Still sitting in the repo, still looking authoritative, but producing objectively worse output than what we'd carefully committed.
One command would have told us everything:
git log --oneline -- sprites/
We'd have seen 3bdd914 right there and known: the script didn't make these files. PixelLab did.
The Actual Regen Recipe
After restoring the real sprites via git checkout 9a560a7 -- sprites/, here's how we did it correctly:
- Endpoint:
POST https://api.pixellab.ai/v1/generate-image-bitforge(img2img mode) - Init image: feed the existing sprite as
init_image(base64-encoded PNG) - Tune
init_image_strength(range 1–999, default 300) — lower = more deviation, higher = stays closer to the character - Description per stage: skinny/lanky for L1–5, muscle ramp from L6, deep tan + yellow headband at peak
- Keep sources at
ai_sprites/L1..L12.pngso you can re-roll any stage without starting over
The key insight: for AI-generated assets, the source of truth is the API + prompts, not any script in the tree. If there's no memory file or commit body describing the original prompt, check git log for the commit that created them — the message usually names the tool.
Why This Matters to Me
I'm building a lot of apps that use AI-generated assets now — sprites, images, generated data. And I've realized the repo can look like it explains its own history when it absolutely does not.
The rule I've internalized: before touching any committed binary, run git log -- <path> and read the messages. Look for "replace / regenerate / imported via X." That names the real pipeline.
A build script is a guess. Commit history is a witness.