Skip to content

Commit af6c203

Browse files
authored
fix: buildPrompt — enforce labeled diagrams, ban abstract art
Mirror diagram-enforcing language from check-research (PR #658) into ingest buildPrompt. Ban abstract art, enforce labeled components with specific technologies.
1 parent 4be21c1 commit af6c203

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

app/api/cron/ingest/route.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,22 @@ CRITICAL: This video will be a visual infographic explainer. There will be NO te
337337
338338
For EACH scene, generate an "imagePrompts" array with 2-5 image generation prompts. Each prompt should follow this exact template:
339339
340-
"Infographic 2D architecture style, pure black background. [SPECIFIC VISUAL FOR THIS SCENE]. Highlighted elements filled with vivid purple (#7c3aed). White lines connecting components and white text annotations. Color palette: ONLY black, purple (#7c3aed), and white — no blue, no green, no gradients."
340+
"Infographic 2D architecture diagram, black (#000000) background. Labeled diagram showing [SPECIFIC NAMED COMPONENTS FROM THIS SCENE]: [Component A] → [Component B] → [Component C] with data flow arrows. Each component is a labeled box filled with purple (#7c3aed). White arrows connecting components, white text labels on every element. NO abstract art, NO geometric shapes, NO glowing orbs."
341341
342342
Replace [SPECIFIC VISUAL FOR THIS SCENE] with a detailed description of what the infographic should show for that particular scene. Be specific — reference the actual technical concepts, comparisons, or workflows being discussed.
343343
344344
Guidelines for image prompts:
345345
- Each scene needs Math.ceil(durationEstimate / 4) prompts (one image every ~4 seconds)
346346
- A 15-second scene needs 4 prompts, a 20-second scene needs 5
347347
- Each prompt should show a DIFFERENT aspect or angle of the scene's content
348-
- For code scenes: show architecture diagrams, data flow, or system diagrams (NOT the code itself)
349-
- For comparison scenes: show side-by-side comparison charts or feature matrices
350-
- For list scenes: show each item as a distinct visual element in the infographic
348+
- For code scenes: show labeled architecture diagrams with named components, data flow arrows, and text annotations (NOT the code itself, NOT abstract art)
349+
- For comparison scenes: show labeled side-by-side comparison diagrams with named components and feature annotations
350+
- For list scenes: show each item as a labeled box/node in a diagram layout with connecting arrows
351351
- Make prompts visually varied — don't repeat the same layout
352-
- STRICT color palette: pure black background (#000000), vivid purple (#7c3aed) for highlighted elements, white for lines and text annotations. Do NOT use blue, green, orange, red, or gradient backgrounds
353-
- FIRST SCENE image prompts must be purely visual and eye-catching — NO text labels, NO annotations, NO words. This is the thumbnail/hook frame that needs to stop the scroll. Show a striking visual metaphor for the topic
352+
- STRICT color palette: pure black background (#000000), vivid purple (#7c3aed) for highlighted elements, white for lines, arrows, and text annotations. Do NOT use blue, green, orange, red, or gradient backgrounds
353+
- BANNED in imagePrompts: spheres, orbs, waves, particles, abstract shapes, geometric patterns, glowing effects without labels, artistic metaphors. Every visual element MUST have a text label identifying what it represents
354+
- Each imagePrompt must reference SPECIFIC technologies, APIs, functions, or concepts mentioned in that scene's narration. Generic visuals are rejected
355+
- FIRST SCENE imagePrompts should be a striking architectural overview diagram of the main topic — labeled components showing the system/concept at a high level. This is the thumbnail/hook frame
354356
355357
## JSON Schema
356358
@@ -371,7 +373,7 @@ Return ONLY a JSON object matching this exact schema:
371373
"visualDescription": "string - what to show on screen (fallback for all types)",
372374
"bRollKeywords": ["keyword1", "keyword2"],
373375
"durationEstimate": 15,
374-
"imagePrompts": ["Infographic 2D architecture style, pure black background. [specific visual]. Highlighted elements filled with vivid purple (#7c3aed). White lines and text annotations. ONLY black, purple, white colors."],
376+
"imagePrompts": ["Infographic 2D architecture diagram, black (#000000) background. Labeled diagram showing [Component A] → [Component B] → [Component C] with data flow arrows. Each component is a labeled box filled with purple (#7c3aed). White arrows and white text labels. NO abstract art, NO glowing orbs."],
375377
"code": {
376378
"snippet": "string - actual code to display (only for sceneType: code)",
377379
"language": "typescript | javascript | jsx | tsx | css | html | json | bash",
@@ -406,8 +408,8 @@ Requirements:
406408
- Only include the type-specific field that matches the sceneType (e.g., only include "code" when sceneType is "code")
407409
- For "code" scenes, provide real, syntactically correct code
408410
- The qualityScore should be your honest self-assessment (0-100)
409-
- Each scene MUST include an "imagePrompts" array with 2-5 image generation prompts
410-
- Image prompts must follow the template: "Infographic 2D architecture style, pure black background. [specific]. Highlighted elements filled with vivid purple (#7c3aed). White lines connecting components and white text annotations. Color palette: ONLY black, purple (#7c3aed), and white."
411+
- Each scene MUST include an "imagePrompts" array with 2-5 image generation prompts. Every prompt MUST describe a LABELED ARCHITECTURAL DIAGRAM with named components, arrows, and text annotations
412+
- Follow this structure for every imagePrompt: "Infographic 2D architecture diagram, black (#000000) background. Labeled diagram showing [specific named components from the narration]: [Component A] → [Component B] → [Component C]. Each component is a labeled box/node filled with purple (#7c3aed). White directional arrows showing data/control flow. White text labels on every element. NO abstract art, NO geometric shapes, NO glowing orbs, NO artistic metaphors."
411413
- Do NOT include any text overlays, titles, or script words in the video — narration audio carries all words
412414
- Calculate prompt count per scene: Math.ceil(durationEstimate / 4)
413415
- Return ONLY the JSON object, no markdown or extra text`;

0 commit comments

Comments
 (0)