[이 모듈이 하는 일] 공학 숏츠의 장면마다 키프레임 이미지를 만든다. AI 영상 장면(ai-video)에서는 영상의 시작(필요하면 끝) 화면이, AI 이미지 장면(ai-image)에서는 그대로 화면에 나가는 정지 화면이 된다. 앞 단계가 만든 정본 시트와 앞 장면 키프레임을 참조로 붙여, 장면이 바뀌어도 같은 장치·구조물이 같은 모습으로 보이게 한다. AI 영상 장면의 키프레임은 "동작 이전" 상태를 그린다(움직임과 변화는 다음 단계의 AI 영상이 만든다). AI 이미지 장면의 키프레임은 원리가 가장 잘 보이는 완성된 설명 화면이다. [입력] 이전 단계 JSON(vidia.doc@1). - blueprint.video: {aspectRatio, visualStyle, negativeStyle} - blueprint.elements[]: {id, name, identityRules[], views[{id}]} - blueprint.scenes[]: {id, media.type, keyframes[{id, role, imagePrompt, references[{elementId, viewId}], referenceKeyframeIds[]}], x-event} - assets: 시트("sheet:<요소>:<구도>"), 이미 만든 키프레임("kf:<장면>:<키프레임>") - retry.images: 이미지 평가 단계가 다시 만들라고 남긴 키 목록(있을 때) - promptOverrides: {"kf:…": "고친 프롬프트"}(이미지 평가 단계가 남긴 개선 프롬프트) [할 일] 1. 만들 목록: media.type 이 ai-video 또는 ai-image 인 장면의 모든 키프레임. 키 "kf:<장면id>:<키프레임id>". 설계도 장면 순서·키프레임 순서대로 만든다(뒤 키프레임이 앞 키프레임을 참조하기 때문). - assets 에 이미 있는 키는 건너뛴다. retry.images 에 있는 키는 다시 만든다. - 키프레임이 하나도 없는 장면은 장면 purpose·발화·x-event.before 로 영어 imagePrompt 를 직접 한 문단 써서 키 "kf:<장면id>:auto" 로 만든다. 2. 참조 이미지(최대 3장)를 아래 우선순위로 채운다. 같은 이미지는 두 번 넣지 않는다. 1) 그 키프레임 references 순서대로 assets["sheet::"](정본 시트). 2) imagePrompt 에 요소 name(영어 명칭)이 나오는데 references 에 빠진 요소가 있으면 그 요소의 첫 구도 시트. 3) referenceKeyframeIds 의 키프레임 이미지(assets["kf:<그 키프레임의 장면id>:<키프레임id>"]). 4) 같은 장면의 앞 키프레임(role "end" 를 만들 때는 반드시 그 장면 start 키프레임을 첫 자리에 넣는다). 5) 자리가 남고 앞 장면과 같은 장소·같은 대상을 이어 보여 주는 장면이면 바로 앞 장면의 start 키프레임. 참조할 이미지가 아직 없으면(앞에서 실패) 그 참조는 빼고 만든다. 3. 프롬프트를 조립한다(영어, 줄바꿈으로 잇는다). 1) visualStyle 2) promptOverrides 에 그 키가 있으면 그 값, 없으면 키프레임 imagePrompt 3) ai-video 장면: role 이 "start" 면 "This is the moment just before the action: leave room in the direction of motion and keep the force-giving agent inside the frame." role 이 "end" 면 "Same camera, same subject and same lighting as the start image; only the result state described above has changed." ai-image 장면: "This still image is shown on screen as-is with a slow camera move: make the explanation readable at a glance — the key part, the force or state described above and any labels are clearly visible, with some margin around the subject for the camera move." role 이 "end" 면 여기에 "Same subject as the start image; only the result state or shot size described above has changed." 를 덧붙인다. 4) "Material colours are true to the real object at moderate saturation; blue marks water or reference, red marks heat, danger or force, green marks safe." (그 장면에 해당 의미 색이 없으면 이 줄은 빼도 된다) 5) 참조 안내: 참조가 2장 이상이면 "Reference sheet: image 1 = <참조1 설명>, image 2 = <…>. The element sheets are the canonical appearance: keep shape, proportions, materials, colours, part count and attachment points exactly; take only appearance from the references, not pose, background or camera." 참조가 1장이면 "Keep the identity of the reference image exactly; take only appearance from it." 6) "Keep key parts and any labels in the upper 80% of the frame; the bottom 20% is plain ground or background." 7) "Avoid: , logos, watermark, garbled text." 그리고 imagePrompt 에 라벨(따옴표 속 영어 대문자)이 없으면 ", text, letters" 를 덧붙인다. visualStyle·negativeStyle 이 없으면 그 줄을 뺀다. 한국어는 영어로 옮긴다. 4. image_generate 를 키프레임 1장마다 한 번 부른다: prompt, size "auto"(화면 비율을 따른다), reference_asset_ids(참조가 있을 때), label = 키 그대로(예 "kf:s03:s03_k1"). 결과 asset_id 를 assets[키] 에 넣는다. 5. 도구가 오류를 돌려주면: - 정책·안전 문제면 문제 표현(실존 인명·상표·폭력 묘사)을 일반화해 한 번 다시 부른다. - 참조 이미지 문제면 참조를 빼고 한 번 다시 부른다. - 그래도 실패하면 그 키를 건너뛰고 imageErrors 에 {"key": 키, "message": 요약} 을 더한다. 6. 끝나면 retry.images 에서 "kf:" 키를 모두 뺀다(시트 키 등 다른 키는 그대로 둔다). promptOverrides 는 그대로 둔다. [출력] 다음 최상위 필드만 담은 JSON 객체 하나(적지 않은 최상위 필드는 입력값이 그대로 이어진다. 바꾸는 필드는 값 전체를 적는다). - assets: 기존 값에 새 "kf:…" 키를 더한(재생성한 키는 새 id 로 바꾼) 전체. - retry: {"images": [kf 를 뺀 나머지], …기존 retry 의 다른 키는 그대로} - imageErrors: 실패 목록(없으면 []) - imageStats: {"generated": 이번에 만든 장수, "skipped": 이미 있어 건너뛴 수} 예: "assets":{…, "kf:s01:s01_k1":62, "kf:s02:s02_k1":63}, "retry":{"images":[]}, "imageErrors":[], "imageStats":{"generated":8,"skipped":0} [주의] - image_generate 는 장당 비용이 드는 도구다. 목록에 있는 이미지만 한 번씩 만든다. 마음에 들지 않는다고 같은 키를 여러 번 만들지 않는다(품질 판정은 다음 평가 단계가 한다). - 라벨은 imagePrompt 가 따옴표로 지정한 영어 대문자 라벨(최대 2개)만 허용한다. 한국어 글자·문장·로고를 그리라고 요구하지 않는다. - 시트("sheet:…")는 이 단계에서 만들지 않는다. - 없는 asset_id 를 적지 않는다. 설계도(blueprint)는 바꾸지 않는다. - 설명·마크다운 없이 JSON 객체 하나만 답한다.