Context
Even with Codex selected, OWS needs a precise contract for the clean-image step. The agent must create a real file at assets/plot-NN/cut-XX-clean.webp, and OWS must update cleanImagePath only when the file actually exists and is valid.
The Claude pilot proved that prompt-only behavior is not enough: Claude created planning files and image prompts, but no image files. Cartoon MVP requires actual clean-image assets before lettering can work.
QuadWork Reference
Use QuadWork only for session/provider launch mechanics, not for the image workflow itself.
Reference paths:
/Users/cho/Projects/quadwork/server/index.js
- Provider-specific launch args via
buildAgentArgs().
- Codex launch supports provider-specific flags and session lifecycle.
/Users/cho/Projects/quadwork/src/components/TerminalPanel.tsx
- Terminal attach/replay/reconnect behavior.
This ticket must add the OWS-specific asset contract on top of the Codex session. QuadWork does not by itself prove that Codex will generate files in the correct OWS asset path.
Required Work
Implement the Codex cartoon clean-image workflow end to end.
Agent instructions
For Codex cartoon stories, generated story instructions should say:
- Use Codex image generation to create the clean image for the requested cut.
- Save the generated image as
assets/plot-NN/cut-XX-clean.webp.
- Do not include text, captions, bubbles, SFX lettering, readable signage, watermark, or signature.
- After saving, verify the file exists, is WebP/JPEG, and is under 1MB.
- Do not say the image was generated unless the file exists.
App-side detection/import
Add a Sync assets or automatic watcher step:
- If
assets/plot-NN/cut-XX-clean.webp exists and cleanImagePath is null, validate and record cleanImagePath.
- If the file is over 1MB or invalid mime, show a clear error and do not update cuts.json.
- Keep manual
Upload clean image as fallback.
UX
For a missing cut, show:
Ask Codex to generate clean image
Copy prompt
Upload clean image
For a generated file not yet synced, show:
Found local clean image — sync to cut plan
Pilot Validation
This ticket is not complete until a real local pilot proves:
- OWS starts a Codex cartoon terminal session.
- The user asks Codex to generate one clean cut.
- A real image file is created at
assets/plot-01/cut-01-clean.webp or equivalent.
- OWS detects/syncs that file into
plot-01.cuts.json.
- The preview shows the clean image while preserving no-text/bubble-free generation rules.
If Codex image generation produces an image attachment but cannot write directly into the story folder, implement the smallest fallback flow that imports the generated image into assets/plot-NN/ without faking state.
Stable-area restrictions
This ticket is cartoon asset workflow only.
Do not change:
- OWS wallet selection/signing logic.
/api/publish/* publish/upload transaction logic, except reading already-recorded final uploaded URLs if existing code requires it.
/api/dashboard stats/royalty reads.
/api/settings/register-agent, /generate-binding, or /link-status.
- Royalty claim or AI-agent/human account binding behavior.
- Fiction story preview/editor behavior.
Do not upload to IPFS, publish, sign transactions, claim royalties, or call PlotLink indexing as part of clean-image generation. Those remain separate existing flows.
Acceptance Criteria
- In cartoon/Codex mode, the user can ask the agent for cut 1 and get a real
cut-01-clean.webp file or a clearly guided import path from the generated image artifact.
- OWS records
cleanImagePath only after validating that file.
- Manual upload remains available.
- No publish/upload state is faked.
- Tests cover asset sync and invalid file rejection.
- The implementation relies on QuadWork-style provider/session mechanics but validates the OWS-specific image-file contract independently.
- No wallet, publish transaction, dashboard, royalty, claim, account-binding, or fiction behavior changes are included.
Context
Even with Codex selected, OWS needs a precise contract for the clean-image step. The agent must create a real file at
assets/plot-NN/cut-XX-clean.webp, and OWS must updatecleanImagePathonly when the file actually exists and is valid.The Claude pilot proved that prompt-only behavior is not enough: Claude created planning files and image prompts, but no image files. Cartoon MVP requires actual clean-image assets before lettering can work.
QuadWork Reference
Use QuadWork only for session/provider launch mechanics, not for the image workflow itself.
Reference paths:
/Users/cho/Projects/quadwork/server/index.jsbuildAgentArgs()./Users/cho/Projects/quadwork/src/components/TerminalPanel.tsxThis ticket must add the OWS-specific asset contract on top of the Codex session. QuadWork does not by itself prove that Codex will generate files in the correct OWS asset path.
Required Work
Implement the Codex cartoon clean-image workflow end to end.
Agent instructions
For Codex cartoon stories, generated story instructions should say:
assets/plot-NN/cut-XX-clean.webp.App-side detection/import
Add a
Sync assetsor automatic watcher step:assets/plot-NN/cut-XX-clean.webpexists andcleanImagePathis null, validate and recordcleanImagePath.Upload clean imageas fallback.UX
For a missing cut, show:
Ask Codex to generate clean imageCopy promptUpload clean imageFor a generated file not yet synced, show:
Found local clean image — sync to cut planPilot Validation
This ticket is not complete until a real local pilot proves:
assets/plot-01/cut-01-clean.webpor equivalent.plot-01.cuts.json.If Codex image generation produces an image attachment but cannot write directly into the story folder, implement the smallest fallback flow that imports the generated image into
assets/plot-NN/without faking state.Stable-area restrictions
This ticket is cartoon asset workflow only.
Do not change:
/api/publish/*publish/upload transaction logic, except reading already-recorded final uploaded URLs if existing code requires it./api/dashboardstats/royalty reads./api/settings/register-agent,/generate-binding, or/link-status.Do not upload to IPFS, publish, sign transactions, claim royalties, or call PlotLink indexing as part of clean-image generation. Those remain separate existing flows.
Acceptance Criteria
cut-01-clean.webpfile or a clearly guided import path from the generated image artifact.cleanImagePathonly after validating that file.