Record how every screenshot scene was made - #194
Merged
Conversation
Changing a scene was not possible without reverse-engineering it. generate.mjs stored the 12 base scene prompts, but everything made with `generate.mjs edit` -- which is every "what the camera sees" preview, plus the edits that fixed a scene's staging -- was passed as an argv string and never recorded. 9 of the 16 images manifest.js renders had no recipe. docs/marketing/prompt-pack.md, which the header points at, holds scene concepts, not these. Three additions: CHOSEN records which candidate each base scene kept, since `generate.mjs <id> N` writes <id>_c1..cN and the manifest references one of them. DERIVED records the edits and previews: source images, aspect, prompt. A new `generate.mjs derive <file>` re-runs one. `--as <name>` writes elsewhere so a regeneration can be compared before it replaces the committed asset -- the model is not deterministic, so you always want to look first. `generate.mjs derive` with no argument lists everything and checks that every manifest reference has a recipe, exiting non-zero if one does not. That is the part that keeps this from rotting: the gap was invisible until someone tried to change a scene, and now it fails loudly instead. Also adds the slot3_ipad prompt, which was missing entirely -- the iPad cardinal scene could not be regenerated at all. Honesty about what these are: the DERIVED prompts are RECONSTRUCTED from the committed images, not the original text. They are labelled as such in the file. I validated the mechanism by running slot3_preview end to end: it returned the same subject at the same aspect, framed wider than the committed shot, so I tightened that prompt and mac3_preview's with an explicit framing instruction. An equivalent asset, not the same pixels -- the recipe, not the receipt. Crop boxes are exact, not reconstructed: recovered by matching each committed crop against its parent (mac2_cook_c1_crop is 0,440,1536,2210, mean abs diff 0.34 -- JPEG noise). No scene asset is modified by this commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
📊 Test Coverage Report✅ 626/638 tests passed · ⏭️ 12 skipped
🎥 Capture & session core
📁 Full report — 87 files
Generated from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #192. Changing a scene wasn't possible without reverse-engineering it.
generate.mjsstored the 12 base scene prompts, but everything made withgenerate.mjs edit— every "what the camera sees" preview, plus the edits that fixed a scene's staging — was passed as an argv string and never recorded. 9 of the 16 imagesmanifest.jsrenders had no recipe. (docs/marketing/prompt-pack.md, which the file header points at, turns out to hold scene concepts, not these.)What's added
CHOSEN— which candidate each base scene kept, sincegenerate.mjs <id> Nwrites<id>_c1..cNand the manifest references one of them.DERIVED— the edits and previews: source images, aspect, prompt.node generate.mjs derive <file>re-runs one;--as <name>writes elsewhere so a regeneration can be compared before it replaces the committed asset.node generate.mjs derivewith no argument lists everything and verifies every manifest reference has a recipe, exiting non-zero if one doesn't. This is the part that keeps it from rotting; the gap was invisible until someone tried to change a scene.slot3_ipadprompt, missing entirely — the iPad cardinal scene couldn't be regenerated at all.What these prompts are
Reconstructed from the committed images, not the original text — labelled as such in the file. I validated the mechanism by running
slot3_previewend to end against the API: same subject, same aspect, framed wider than the committed shot. So I tightened that prompt andmac3_preview's with an explicit framing instruction. They produce an equivalent asset, not the same pixels. The recipe, not the receipt.Crop boxes are the exception — those are exact, recovered by matching each committed crop against its parent (
mac2_cook_c1_crop=0,440,1536,2210, mean abs diff 0.34, i.e. JPEG noise).Scope
Two files,
generate.mjsandREADME.md. No scene asset, no screenshot, no metadata is modified — nothing to re-ship. The README gains a worked example for swapping the cardinal for another animal, which is what prompted this.🤖 Generated with Claude Code