# Shot별 등장 요소 판정 (변형 형태 확정)

씬 내에서 shot 순서에 따라 각 shot 에 **카메라 프레임 안에 물리적으로 보이는** 요소를 결정합니다.

## Frame Visibility SOT

Decide visible_entity_ids from the shot's frame meaning,
not from fixed grammar patterns or phrase lists.
Do not rely on Korean particles, fixed off-camera phrases,
or closed examples.
A mentioned entity is visible only when it is physically
inside the camera frame.

## 핵심 원칙

- **visible_entity_ids = 카메라 프레임 안에 물리적으로 보이는 entity SOT.**
- 단순히 씬 안에 존재하거나 beat 와 관련 있다고 해서 포함하지 않습니다.
- 프레임 밖에 있는 entity 는 (씬 맥락상 관련 있더라도) 제외합니다.
- character / location / prop **모두 동일 기준** — 프레임 안 가시성.

## 핵심 규칙

### 일반 요소 (변형 아닌 것)
- 해당 shot 의 설명(description)과 등장 인물(characters)을 기준으로 판단
- shot 에 언급되지 않은 캐릭터는 visible 에서 제외
- **단, 시신/무의식/부상/잠든 인물이 카메라에 보이면 반드시 포함** (살아있든 죽었든 무관)

### 배경(L) / 소품(P) — frame-visible 만 포함

- shot description 에 **언급되었다는 이유만으로** 포함하지 **않는다**.
- **카메라 프레임 안에 실제로 보이는 경우에만** visible_entity_ids 에 포함.
- **ECU / CU / macro shot** 에서 프레임 밖에 있는 scene-relevant prop / location 은 제외.
- **WS / MS / two-shot** 등 넓은 framing 에서는 frame 에 보이는 L/P 모두 포함.
- 판단 기준은 항상 "이 shot 의 카메라가 실제로 잡는 것" — scene 상위 맥락 아님.

### Off-camera / Gaze target 제외 (중요)

description 안에 등장하지만 **카메라 프레임 밖**에 있는 인물은 visible_entity_ids 에서 **반드시 제외**합니다. 다음 의미적 기준으로 판단:

- **Gaze target close-up**: shot 의 framing 이 인물 A 의 얼굴/표정/시선/뒷모습 close-up 이면서, A 가 다른 인물 B 를 보고 있다고 묘사된 경우 — B 는 시선의 대상으로 **frame 밖** 가능성이 높음. A 만 visible 에 포함.

- **Off-camera 명시**: description 또는 staging 단서에 인물이 frame 밖 / off-camera / off-screen 임이 명시되어 있으면 그 인물 제외 (언어 무관, 의미적 판단).

- **차단(blocking)**: 한 인물이 다른 인물을 차단하여 보이지 않게 한다고 명시되면, 차단된 인물 제외.

- **Reaction-only**: description 이 한 인물의 표정/시선 close-up 만 잡고 다른 인물은 그 인물에 대한 반응 trigger 로만 언급되면, 반응을 부른 인물은 frame 밖 — 제외.

- **Body-part / posture guard (false-positive guard)**: 한 인물에게 속한 신체 부위(어깨/손/팔/얼굴/등/허리 등) 또는 그 인물의 자세/상태가 다른 인물의 시선/접촉/지지 동작과 함께 묘사된 경우, 그 신체 부위를 off-frame gaze target 으로 해석하지 **않습니다**. description 이 두 인물을 같은 frame 안의 shared posture/contact moment 로 구성하면, 명시적 off-frame 표시가 없는 한 two-shot 으로 간주하고 두 인물 모두 visible_entity_ids 에 **반드시 포함**합니다. 이 guard 는 위 모든 off-frame exclusion rule 보다 먼저 적용합니다.

판단 기준: 한국어 문법 패턴 / 고정 phrase list / 닫힌 예시 의존 X. shot description 의 frame meaning 으로 의미적 판단.

### 추상 case 예시 (문장형 한국어 grammar example 0, 언어 중립 추상 case)

- 예: Frame shows Character A in close-up of face/eyes; Character B is described only as A's gaze target → include A in visible_entity_ids, exclude B (B is off-frame gaze target).
- 예: One character (the blocker) physically blocks another character from camera view → include blocker, exclude blocked character (blocked is off-frame from camera).
- 예: Frame shows one character's reaction-only close-up; another character is mentioned only as the trigger of that reaction → include reactor, exclude trigger character (trigger is off-frame).
- 예: A character is mentioned with explicit off-camera/off-screen indication → exclude that character regardless of mention.
- 예: Frame shows Character A and Character B in a shared posture/contact moment; Character A's own body part or posture is touched, held, or supported while Character B looks at or supports A → treat it as a two-shot and include both A and B unless one is explicitly off-frame. Do not exclude A merely because A's body part appears near a gaze/action phrase.

### 변형 캐릭터/소품/배경
- 변형 전환은 씬 텍스트에서 명확한 변신/변형 묘사가 있는 시점에 발생
- **전환 이후 shot들은 모두 변형된 형태를 유지** (매 shot마다 바뀌지 않음)
- 다시 원래 형태로 돌아오는 묘사가 없으면 변형 형태를 끝까지 유지
- 동시 존재(분신, 클론, 환각)인 경우에만 둘 다 포함

### visible_entity_ids에 넣을 ID 규칙
- **변형된 형태이면 변형 ID를 넣으세요** (원본 ID 아님)
  - 예: 캐릭터A 가 변형된 후이면 → C01 대신 C02를 visible_entity_ids에 넣음
- **원본 형태이면 원본 ID를 넣으세요**
  - 예: 캐릭터A 가 아직 변형 전이면 → C01을 visible_entity_ids에 넣음
- 한 shot에서 원본과 변형이 동시에 보이는 경우 둘 다 넣으세요

### variant_resolved 규칙
- 변형 쌍이 있는 경우, 해당 shot에서 실제로 보이는 형태를 기록
- base_short_id를 key로, 실제 사용할 short_id를 value로
- 원본 형태이면: `{"C01": "C01"}` (base 그대로)
- 변형 형태이면: `{"C01": "C02"}` (variant로 교체)
- 해당 shot에 등장하지 않으면 key 자체를 생략
