This repo is a mixed-format workspace for developing AI-generated films with a simplified creative workflow.
CREATIVE_AGENTS.md: creative chatbot workflow and behaviorAGENTS.md: coding-agent instructionsCAMERA_VOCABULARY.json: fixed camera shot, position, angle, and movement ids for sidecarsMODEL_OPTIONS.json: fixed model-card options used by the config dialog
- Local projects live under the gitignored
projects/<project-name>/folders. workspace/remains the stable runtime path, but it is now expected to be the active-project mount point.- Use
bun run switch <project-name>to activate an existing project. - Use
bun run switchwithout a name to list local projects and choose one interactively when running in a TTY. - Use
bun run new <project-name>to create an empty local project folder and activate it immediately. - On a fresh clone, activate or create a project before running the app or other workspace-aware tooling.
workspace/IDEA.mdworkspace/CONFIG.jsonworkspace/STATUS.jsonworkspace/STORY.mdworkspace/CHARACTERS.mdworkspace/CHARACTERS/workspace/STORYBOARD/STORYBOARD.jsonworkspace/STORYBOARD/workspace/KEYFRAMES/workspace/SHOTS.jsonworkspace/SHOTS/workspace/FINAL-CUT.json
- Treat
workspace/as the active project surface. The actual files may live underprojects/<project-name>/through the active symlink. - Start from
workspace/IDEA.md. - When a canonical workspace file is missing, copy the matching template first.
workspace/CONFIG.jsonstores the active agent, image, fast-image, and video model cards plus the default visualvariantCountfor the current project.workspace/STATUS.jsonis a flat array of visible creative milestones, ordered from first step to last step.- Keep harness setup and other bookkeeping out of
workspace/STATUS.json. workspace/CHARACTERS.mdstores textual character definitions, and each character section should include a stableCharacter ID:.workspace/CHARACTERS/stores character-sheet sidecar JSON files plus the generated.pngsheets beside them.workspace/STORYBOARD/STORYBOARD.jsonis the canonical storyboard plan. It stores an orderedimagesarray where each image ownsframeType,prompt, optionalcamera, and nullableimagePath. StoryboardcamerausesCAMERA_VOCABULARY.jsonids with the still-image shapeshotSize,cameraPosition,cameraAngle. Shot ids and storyboard image ids are derived from board order.workspace/STORYBOARD/stores one generated.pngper planned storyboard image, such asworkspace/STORYBOARD/SHOT-01-START.png.workspace/KEYFRAMES/stores one sidecar JSON and one generated.pngper keyframe, grouped under eachshotId. Keyframe sidecars may include acamerablock beforepromptusingCAMERA_VOCABULARY.jsonids; theirreferencesremain the source of truth for still-image generation inputs and must be authored in the exact intended priority order.- By default, plan one
startkeyframe per storyboard shot. Add anendkeyframe only when the closing anchor needs to differ materially from the opening anchor; one-anchorstartorendshots remain valid. workspace/SHOTS.jsonis the planning manifest for shots and keyframe anchors and should use the shape{ shotId, status, videoPath, durationSeconds, endFrameMode?, keyframes: [{ keyframeId, frameType, imagePath }] }.- Use optional
endFrameMode: "bridge"only when a shot omits its ownendkeyframe and instead reuses the next shot's plannedstartkeyframe as a single shared bridge frame on the timeline. workspace/SHOTS/stores one sidecar JSON and one generated.mp4per shot, sharing the sameshotIdbasename. Shot sidecars may include acamerablock beforepromptusingCAMERA_VOCABULARY.jsonids plus optionalreferences.workspace/FINAL-CUT.jsonstores the saved Remotion edit manifest for the final assembly step and should use the exact shape{ version, shots, soundtrack }.workspace/HISTORY.jsonstores the app's persisted chat/session state for the current project.- Visual artifacts retain linear history under nearby
HISTORY/folders. The public artifact path is always the current version, and older retained media files are stored asvN.pngorvN.mp4. - Use
TBDfor unresolved creative information andTODOfor coding work.
bun run switch <project-name>repointsworkspace/to the chosen local project underprojects/.bun run new <project-name>createsprojects/<project-name>/and makes it the activeworkspace/.bun validate-workflow-data.tsvalidates required workflow files, explicit sidecarreferences, and the simplified JSON schemas.bun generate-character-sheets.tssyncs missingworkspace/CHARACTERS/*.pngfiles from their sidecar JSON files, rendersworkspace/CONFIG.json.variantCountvariants in sequence when the stable public PNG is missing, stores earlier variants inHISTORY/, and keeps the last new variant at the public PNG path.bun generate-storyboard.tssyncs missingworkspace/STORYBOARD/*.pngfiles fromworkspace/STORYBOARD/STORYBOARD.json, renders one storyboard image at a time withworkspace/CONFIG.json.fastImageModel, keeps image-local retained versions underworkspace/STORYBOARD/HISTORY/, and preserves idempotent skip behavior when the public PNG already exists.bun generate-keyframes.tssyncs missingworkspace/KEYFRAMES/**/*.pngfiles from their sidecar JSON files and the planned anchors inworkspace/SHOTS.json, uses the explicit typedreferencesdeclared in each keyframe sidecar without silently appending storyboard, character, or continuity refs at runtime, rendersworkspace/CONFIG.json.variantCountvariants in sequence when a stable public keyframe is missing, and keeps the last new variant at the public PNG path.bun generate-shots.tssyncs missingworkspace/SHOTS/*.mp4files fromworkspace/SHOTS.jsonandworkspace/SHOTS/*.json, uses the lone anchor or the start frame as the image-to-video input, the end frame as the last-frame control only when present, and whenendFrameModeisbridgeit reuses the next shot's planned start frame as the current shot's last-frame control, rendersworkspace/CONFIG.json.variantCountvariants in sequence when a stable public shot is missing, stores earlier variants inHISTORY/, and keeps the last new variant at the public MP4 path.bun run remotion:studiobootstrapsworkspace/FINAL-CUT.jsonwhen needed, serves repo media to Remotion Studio, and opens the stock Studio against the saved final-cut manifest.bun run remotion:renderuses the sameworkspace/FINAL-CUT.jsonmanifest to render thefinal-cutcomposition tooutputs/final.mp4by default.artifact-review-server.tsis now the lightweight artifact-control surface for retained history, source reference editing, approval, and manual reselection back to the public artifact path.generate-imagen-options.tspreserves the direct CLI contract, uses the Vercel AI Gateway through the AI SDK, supportsAI_GATEWAY_API_KEY, and appends generation records toworkspace/GENERATION-LOG.jsonl. Storyboard prompt rewrites also append their own JSONL records there.
- PostHog telemetry is optional. Set
POSTHOG_KEYand optionallyPOSTHOG_HOSTto enable it. - The app stores a stable anonymous local install ID outside the repo and adds a fresh session ID for each run plus a trace ID for each agent turn.
- v1 PostHog LLM analytics targets the text agent path in
app.tsxandvideo-agent-core.ts. Full prompt and completion traces are sent for those agent turns. - Image generation, video generation, and Remotion still use lightweight custom workflow events only in v1. They are not wired into PostHog LLM analytics or model-cost reporting yet.
- The existing workflow events remain available for coarse product telemetry such as config saves, milestone resets, generation success/failure, and render starts.
.current-commit-messageis a local scratch file that the coding agent updates after successful validation with a terse commit subject suffix.git commit -m fixand similar short type-only subjects are expanded by the hook intofix: <agent summary>.- Longer manual subjects such as
git commit -m "refactor auth flow"are left untouched. - If the commit starts with an empty subject, the hook falls back to
wip: <agent summary>orwip: update project fileswhen no scratch message is available. - On normal commit attempts, the hook consumes and clears
.current-commit-messageso stale suggestions do not linger.