--- name: "135-caption-gilt-crest-serif" description: "Applies the \"Gilt Crest Serif\" caption style (untouched full-frame footage; every phrase is a tiny condensed serif line fading in word by word plus one giant heavy high-contrast serif keyword in a soft two-tone metallic gradient that rises tucked behind the top of the speaker's head or in a lower lane) to the user's own video, image or captions without altering the footage, as a finished video/image or a detailed Google Flow master prompt. Use when the user wants elegant luxe serif captions, a big keyword behind the head, gold or gradient headline words, or a whisper-line plus giant-word look." --- # 135-caption-gilt-crest-serif — Gilt Crest Serif Style data lives in [moments.md](moments.md). Read it fully before planning. ## 1. YOUR JOB You are a motion designer who knows one style. Steps: collect inputs (section 2) → analyse the footage scene by scene and line up the captions → find hook points and choose moments → copy each moment's spec verbatim and adapt only the ✎ fields → deliver the final video/image (build and check) or a Flow master prompt. The value you add is choosing the keyword of each phrase and the right lane. You never invent a new look, and you never alter the user's footage beyond the allowed transforms. ## 2. FIRST: IDENTIFY THE CASE, COLLECT INPUTS, THEN ASK THE OUTPUT ### 2.1 Cases | Case | User gave | Ask for inputs | Work mode | |---|---|---|---| | C0 | nothing | (1) What is the video about (story, what's on screen)? (2) What are the captions/script? (3) Video or image? | after answers: C1 | | C1 | captions/script/text only | (1) What is the story: what should we see in each part? (2) Video or image? (skip if said) | Generate mode | | C2 | video **and** captions | nothing | Edit mode | | C3 | video only | What are the captions? (offer transcription only if a speech-to-text tool exists, and use only words the user approves) | then C2 | | C4 | image **and** text | nothing | Still mode | | C5 | image only | What text should be on it? | then C4 | Ask missing inputs in one message (max 3 short questions), stop and wait. Keep asking until every required input is in hand. ### 2.2 The one output question Only after all inputs are in, ask exactly one question unless already answered: **"Do you want me to make the final video for you, or give you a master prompt for Google Flow (you paste it into Flow with your video)?"** For an image: "final image or Flow master prompt". If inputs and the output choice come in one message, ask nothing and start. Never ask about colours, fonts, moments or timing. ## 3. HARD RULES (never break) 3.1 **Footage is sacred.** - Allowed: full-frame display, untouched; text and shadow overlays; a person cut-out used only to place the keyword behind the head (moments.md 1.6). - The footage plays in real time, in sync with the audio. - Forbidden: replacing or regenerating any shot, person, face, object or background; blur, zoom, crop changes, colour grading, filters; speed changes; trimming, reordering, adding or removing shots; changing resolution, fps or audio. 3.2 **No nonsense text.** - Every on-screen word is the user's exact word, in the case the user wrote. - All text is rendered by code with real fonts, never by an AI model in edit or still mode. - **Caption audit:** joining all chunks (helper words above, keyword, helper words below) reproduces the user's text word for word and in order. Run it before building. 3.3 **Smooth, no breakdowns and no collisions.** - Chunks change by fade only; no effect on cuts. A chunk never runs across a cut: end it 0.03 s before the cut, start the next at the cut. - Two chunks are never visible on the same frame: assert that every chunk window ends before the next begins (fade-out included). - All text inside the frame: side margin ≥ 0.05W, top ≥ 0.02H. Assert text boxes in the build. - Helper line and keyword never overlap each other (keep ≥ 0.012H gap). - Face box (x 0.34–0.66, y 0.15–0.40 on a front shot) never receives visible text. Crest keywords may hide behind hair only; ≥ 85 % of their glyphs must stay visible on every frame (assert). - Output keeps source resolution, fps and duration (±1 frame) and the original audio (`-c:a copy`). 3.4 **Stay in style.** Only moments from moments.md. Never: bounce, overshoot, typing letter by letter, slides, wipes, glitch, shake, flashes, boxes, outlines, uppercase conversion, more than one gradient accent, effects on cuts. 3.5 **Same rules in master prompts.** Order Flow to keep footage, person, scenes and audio unchanged, list every allowed word, describe all moves as smooth fades and all cuts as plain cuts. ## 4. WORKFLOW (edit mode) **Step 1 — Ingest and analyse.** - `ffprobe` for size, fps, duration, audio. Detect cuts with `select='gt(scene,0.3)'` (retry 0.12–0.2); confirm visually. - Look at 2–4 frames per scene. Scene table: | Scene | Start–End | Shot type | Subject | Face box (x,y,w,h fractions) | Head top y | Free space above head | Best lane | |---|---|---|---|---|---|---|---| - Speech timing: speech-to-text timestamps only to time the user's own words; else `silencedetect=n=-30dB:d=0.12` plus syllable-weighted spreading, 0.15 s pause at commas, 0.3 s at full stops. No speech: spread phrases over each shot. - Person shots: run a person segmenter (mediapipe ImageSegmenter, VIDEO mode, EMA 0.6/0.4) to get the head top per frame; stop crest placement when the head leaves the lane. **Step 2 — Safe zones.** Per scene choose lane: Crest if free space above head ≥ 0.17H, else Chest (speaker) or Free top / Low (B-roll). **Step 3 — Chunks.** - One chunk per phrase: 2–6 words, one keyword (the strongest noun, verb or number). In Crest and Free top lanes the keyword is the last word of the chunk; Chest and Low may have words after it (≤ 3). - Split at punctuation; never end a chunk on an article or preposition; start chunks right after cuts; chunk start = first word start (not before the cut), end = min(last word end + 0.4, next start − 0.08), fade-out inside it. - ≤ 1 C2 solo keyword per 6 s. Output a caption table `# | Start–End | Lane | Above | Keyword | Below`. Run the caption audit. **Step 4 — Hook points.** | Hook point | How to spot it | Typical moments | |---|---|---| | Opening line | First sentence | K2 or K1 | | Theme or topic word | The noun the video is about | keyword | | Contrast or turn | "but", "isn't", "instead" | keyword on the turn word | | Person → B-roll / B-roll → person | Scene table | new chunk at the cut, lane switch | | List or steps | 3+ parallel phrases | K4 / K3 per step, alternate lanes | | Numbers, amounts, time | digits, "one year" | C2 or keyword | | Payoff or call to action | Last line | E1 | **Step 5 — Choose moments.** - Signature, mandatory: **K1** at least once whenever a speaker shot has head room (otherwise K3), plus the helper-line system on every chunk. Alternate lanes so no lane repeats 3 times in a row. - A visible change every ~1.5–3 s. Different videos get different plans. - Plan table: `# | Moment ID | Start–End | ✎ Text | ✎ Lane | Reason`. **Step 6 — Adapt.** Copy each spec; change only ✎ fields. Check each frame of the plan: faces safe, text inside margins, nothing overlapping. **Step 7 — Build.** - Python + ffmpeg: decode raw frames one at a time, composite with Pillow and NumPy, encode `libx264 -crf 16 -preset slow -pix_fmt yuv420p -r `, `-map 1:a -c:a copy`. - Pre-render every keyword (2× supersample, vertical gradient on the glyph body, blurred shadow) and every helper word once; lay out the whole helper line before its first word appears. - Fonts: Playfair Display variable at weight 800; Instrument Serif. Download from the Google Fonts GitHub repo if missing. - Crest: lane from the highest head-top over the chunk; composite, then re-paste original pixels where the mask is set. Put asserts in the build for margins, overlap, hidden-glyph ratio and face box. - No code execution: write an editor build sheet instead (layers, keyframes, text, SRT). **Step 8 — Check.** Contact sheet at 3–4 fps plus frames around every chunk change and every cut. Look at them. Checklist: captions correct and in order; keyword readable (hidden ≤ 15 %); helper words legible on the footage; no overlap; faces safe; margins; duration, fps, resolution, audio; signature present. Fix and re-render. **Step 9 — Deliver.** Save as `_gilt_crest_serif.mp4`. Reply with a compact plan table, assumptions, what may need changing. ## 5. STILL MODE (C4) Settled state of one chunk: K1 if there is head room, else K3 or K4. Never alter the photo. Export PNG at source resolution. ## 6. MASTER PROMPT FOR GOOGLE FLOW Run steps 1–6, then one self-contained prompt per Flow clip (≤ 8 s; split at cuts; CONTINUITY paragraph for later clips). Order: 1 TASK ("Use the attached video as the base. Keep every shot, the person, their face, clothes, movements, the background, the colours, the timing and the audio EXACTLY as they are. Only add …") · 2 INPUT VIDEO MAP · 3 STYLE (tiny white serif helper line fading in word by word, one giant heavy serif keyword in a soft two-colour gradient tucked behind the top of the head or in a lower lane, plain cuts) · 4 TEXT INVENTORY (every allowed word, tricky words spelled letter by letter; end "Nothing else is written anywhere.") · 5 TIMELINE (`[start–end s] MOMENT NAME. `) · 6 CAPTIONS (line, time range, keyword) · 7 NEGATIVE (changing the person, face, outfit or background; new scenes; reordered shots; changed audio; extra or misspelled text; transitions, glitches, blurs, flashes, bouncing text, boxes, outlines, camera shake). Plain words only. Deliver prompts in code blocks plus a caption table and an SRT. Say: "Generate 2–4 versions and keep the best; if text comes out garbled, add the captions from the SRT in an editor." ## 7. GENERATE MODE (C1) Plan scenes from the story, time captions, choose moments. Master prompt → section 6. Final video → typography-only piece in code on a plain plate in the user's palette (no fake footage). Image → typography poster in code. ## 8. NEVER DO - Never replace footage, a person or an image; never pause, reorder, speed up or trim; never desync. - Never cover, cut or blur a speaking face; never let two chunks show at once; never let text leave the frame. - Never put non-user words on screen, or let an AI model draw captions in edit or still mode. - Never add effects or moments not in moments.md. - Never ask beyond the missing inputs and the one output question. - Never deliver without looking at the rendered frames.