---
title: Area #7a — Visual World Rules SOT + scene_director A047 Absorption (Track B Tier 3 #1, v1)
date: 2026-05-18
status: closed (Codex iter 5 APPROVED_FOR_PLAN + W0-W3 atomic execution + Codex per-wave APPROVED)
roadmap_ref: docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md §5.7
prerequisites:
  - Area #3 (Visibility / physical presence SOT, closed 2026-05-18, commit `97c4471`) — boundary preserved (shot_director.py mutation 폐기 + Path 1/2 분리), post-W2 logger.warning audit log monitoring carry 가 본 area SOT enforcement 의 downstream cross-check 후보
  - Area #5 (Reference phrase / phantom guard, closed 2026-05-18+, commit `fe300bf`) — boundary preserved (`reference_phrase_kinds` sidecar)
  - Hygiene v1 (closed 2026-05-15, commit `91d1dfd`) — P-1 ~ P-6 fix 보존 (P-1 orphan 분리 후 P-2~P-6 only)
non_supersedes:
  - Area #7b (11-site VWR downstream prompt cascade — entity_all / entity_character_list / entity_relation / outlook_extractor phase1+2 / entity_extractor_v2 system+turn0_style / scene_verify / scene_detail / shot_extract) — 본 area 의 SOT enforcement 보존 의무, follow-up area 로 분리
  - Area #7c (t2i_review v6 placeholder example abstraction) — 별도 small area
  - Area #7d (cinematography closed-list SOT, variation_recommender + scene_extractor_v2 turn_scene_detail dual-site) — 별도 area, cinematography domain 별개
  - Carry-P021 (scene_consistency 7 enumeration broad) — source unresolved, low-priority carry
---

# Area #7a — Visual World Rules SOT + scene_director A047 Absorption (v1)

## 1. Purpose + Scope

### 1.1 Purpose

`prompts/_base/visual_world_rules/6.202605021400/{system.md, rules_schema.json}` 의 producer 가 `rule_type` 도메인을 system.md:30-46 본문 (10-token: `possession / transformation / ghost / projection / superpower / body_deformation / time_period / costume / technology / other`) 으로 LLM 에게 가르치지만, `rules_schema.json:9` 는 `{"type": "string", "description": "규칙 유형 (possession, transformation, ghost, time_period, costume, technology 등)"}` — **JSON Schema `enum` 미사용 + description 6-token + "등"** (4 enum 누락: `projection / superpower / body_deformation / other`). 결과:

1. **Schema enum 미강제 (gate 3 violation)** — 어떤 string 도 통과. invalid `rule_type` 가 silent miss 로 downstream cascade (scene_director / scene_detail / entity_extractor_v2 / scene_verify / shot_extract 등 11 site) 에 흘러감.
2. **Schema description drift (gate 1 violation)** — 6-token + "등" 표현이 4 enum 을 description 에서 누락. LLM 이 schema description 만 보고 emit 시 4 enum 학습 결손 risk.

같은 "비물리/매개 physical presence" 축에서 `scene_director/8.202604081200/system.md:6-25` 가 별도 4-item closed list ("편집 기법 / 원격 접속/매개 = 영상통화/CCTV/방송 화면/홀로그램/VR/원격 조종/빙의 / 목소리만 / 정체 대체") 로 LLM 에게 사례 분류를 가르침. visual_world_rules SOT 와 중복 + 사례 enumeration 자체가 G6 closed-list LLM instruction 위반 (gate 1).

본 area = **VWR v7 producer schema enum strict 화 (10-token exactly) + description 정합 sync + STEP_MANIFEST `schema_version` field 신설** (현재 production 에 field 없음, current None → 1) + **scene_director v9 consumer A047 사례 리스트 폐기 + VWR director_notes / rules[] 참조 principle-only rewrite**. v1 scope = producer (1 module) + consumer (1 module) 만. 11-site downstream cascade = Area #7b 분리. helper 신설 0 (Codex iter 2 verdict Q5). `prompt_version` field 신설 = deferred decision (W0).

### 1.2 In-scope

**Prompt (2 surface group / 2 module / 3 file)**:

> `HHMM` placeholders are implementation-time timestamp placeholders; W1/W2 must replace them with the actual prompt directory timestamp before commit.

| Surface | Path | Lines | Action |
|---|---|---|---|
| VWR producer schema (rule_type enum) — **A096** | `prompts/_base/visual_world_rules/6.202605021400/rules_schema.json` | line 9 (`rule_type` field def) | new `7.20260518HHMM/rules_schema.json` 신설: `rule_type` = `{"type": "string", "enum": ["possession", "transformation", "ghost", "projection", "superpower", "body_deformation", "time_period", "costume", "technology", "other"], "description": "<10-token canonical phrase>"}`. `additionalProperties: false` 보존 (existing). |
| VWR producer schema (director_notes description) — **A097** | `prompts/_base/visual_world_rules/6.202605021400/rules_schema.json` | line 20 (`director_notes` description) | same v7 schema 안 small fix: line 20 description 의 `"예: A의 영혼이 B의 몸에 전이된 경우 A는 물리적 존재가 아님"` 시나리오-specific example → generic placeholder 추상화 (예: `"<scenario-specific identity-transfer scenario placeholder>"` 형식). schema struct (type/items) 변경 0. |
| VWR producer system (rule_type list) — **A098** | `prompts/_base/visual_world_rules/6.202605021400/system.md` | line 51 (rule_type 10-token list) + 본문 30-46 (rule_type 별 example) | new `7.20260518HHMM/system.md`: line 51 canonical 10-token list 보존 (정합 가독성 의무) + 본문 30-46 rule_type 별 example wording 의 도메인 specific 잔존 (한국 fantasy 작품명 등) 만 추상화. schema description 과 본문 정합. |
| scene_director consumer (A047 closed-list) — **A047** | `prompts/_base/scene_director/8.202604081200/system.md` | **line 5-10 (4-item exclusion list) + line 23-25 (빙의/원격접속 반복) + line 32-34 (`카메라에 안 보이면 제외 (빙의/원격/V.O. 등)` parenthetical)** | new `9.20260518HHMM/system.md` 신설: 3 site 모두 A047 signature 본체 폐기. principle-only rewrite: "VWR rules[] rule_type 과 director_notes 가 physical presence / visual presence 판단 기준이며, scene_director 는 사례 enumeration 자체 분류 안 하고 VWR SOT 를 따른다". 출력 schema 설명 (analyze_schema.json reference) + primary_location 결정 본문 변경 0 (analyze_schema.json 영향 0). |

**Code (1 site, runtime drift 정정 — Codex iter 3 F-2 흡수)**:

| Site | File | Action |
|---|---|---|
| STEP_MANIFEST schema_version 신설 | `backend/app/core/step_manifest.py` (visual_world_rules entry, line 130-141) | **현재 production manifest 에 `schema_version` field 없음** — W1 = `schema_version` field 신설 (값 = `1` 또는 explicit version). cp invalidation 강제. **closure wording (Codex iter 2 verdict Q4 verbatim)**: "schema_version mismatch blocks cp that carries incompatible stamp; older unstamped/default-stamped cp may need force rerun". |

**Prompt activation (현재 runtime, Codex iter 3 F-2 흡수)**:

- visual_world_rules + scene_director 두 모듈 모두 **현재 production manifest 에 `prompt_version` field 없음** (`step_manifest.py:130-141` VWR / `:417-428` scene_director).
- prompt activation = `prompt_loader.py:130-132` (`load_prompt` file fallback) + `_resolve_stem_in_pack` (`prompt_loader.py:219-225`) lexicographic latest version dir 결정.
- W1 (VWR v7) / W2 (scene_director v9) 신설 시 latest version 으로 자동 활성 — `prompt_version` field 신설은 deferred decision (W0 가 의도적으로 observability metadata 로 추가 시 + 별도 test).

**Helper / app-level validator 신설 0** (Codex iter 2 Q5 verdict — v1 = prompt/schema SOT 충분). 향후 Area #7b cascade 진입 시 helper 필요 여부 재판단.

### 1.3 Out-of-scope (Non-claim, closure 미선언)

| Item | Reason | Carry destination |
|---|---|---|
| 11-site VWR downstream prompt cascade (entity_all / entity_character_list / entity_relation / outlook_extractor phase1+2 / entity_extractor_v2 system+turn0_style / scene_verify / scene_detail / shot_extract) | producer SOT 강제 후 분산 consumer 들이 SOT reference 한 줄로 cascade 정리 필요. Area #7a residue gate 에 11-site coverage 넣지 않음 (Codex iter 2 verdict Q3). | **Area #7b** (Track B Tier 3 #2 후속) |
| t2i_review v6 placeholder example abstraction (`scene_system.md:31/36/39/60-61` + `entity_system.md:33-34`) | Area #6 v6 pack 의 placeholder example carry. 별도 small area v7 bump. | **Area #7c** (Track B Tier 3 #3 후속) |
| Cinematography closed-list SOT dual-site (`variation_recommender/v2/system.md` + `scene_extractor_v2/19.../turn_scene_detail.md:87-91` 카메라 구도/색감 7+7 closed-list) | A095 + 신규 dual-site, cinematography domain 별개 (visual_world_rules SOT 와 다른 축). | **Area #7d** (Track B Tier 3 #4 후속) |
| scene_consistency 7 enumeration broad (character_state / environment_state / persistent_prop type list + generic example, G6 closed-list) | roadmap §5.4 carry "P021" 표현, audit file direct row source 0 hit → **source unresolved**. Area #7a scope blocker 로 쓰지 않음 (Codex iter 2 verdict Q4). | **Carry-P021** (low-priority, source unresolved; promotion 전 audit row source verify 의무) |
| 새 `rule_type` enum 추가 (예: `edit_montage / off_screen_audio / identity_substitution`) | 기존 10-token enum 으로 흡수 가능 + cardinality inflation risk + downstream 11-site cascade 추가 비용. Codex iter 2 verdict Q2 verbatim "새 enum 추가 금지". | 변경 0 (10-enum exactly) |
| code helper SOT 신설 (예: `visual_world_rules_helper.py`) | v1 = prompt/schema SOT 충분 (Codex iter 2 verdict Q5). 지금 만들면 unused abstraction. Area #7b cascade 시점 재판단. | 변경 0 |
| Area #3 visibility/physical presence SOT (commit `97c4471`) closed area | shot_director.py mutation 폐기 + Path 1/2 split 본체 보존. 본 area 는 SOT producer (VWR) 강제만 + scene_director consumer rewrite — Area #3 의 shot_director consumer 와 영향 0 (다른 step). | 변경 0 |
| Area #5 phantom guard SOT (`reference_phrase_kinds` sidecar) | scene_detail v26 producer 보존 + ref_contract_validator step 6 보존. 본 area 와 cross-cut 0. | 변경 0 |
| Hygiene v1 (P-1 ~ P-6 fix) | active prompt hygiene v1 closure 보존. P-1 orphan 분리 + P-2 ~ P-6 fix 잔존 의무. | 변경 0 |
| **VWR system.md director_notes prose examples (A099, line 57-73)** | director_notes 추출 section 의 5-line generic principle examples (회상/F.B / 환각/현시 / CCTV-모니터-창문 / 교차편집-몽타주 / 안개-어둠) + bad-example 4-line. 본질 = LLM-generate natural-language rule 으로 physical-presence routing 위임. **본 area scope 외 — director_notes prose redesign 별도 area** (Codex iter 3 F-1 scope_creep_risk 차단). | **Carry-A099** resolved by W1/W2 + W3 closure-docs (2026-05-19+) — director_notes prose hard-prime examples abstracted (Tier 3 후속 status: closed; W1 `d1ca603` producer + W2 `d1d32dd` integrated test + W2 fix-up 1 `25a0830` narrow + W3 closure-docs wave). decision option `추상화` 채택. |
| **VWR system.md t2i_context demonym (A100, line 98)** | `<region-derived demonym>` wording — t2i_context field (이미지 prompt 시각 스타일). rule_type SOT 와 다른 축 (인물 인종/국적 bias). 본 area = rule_type enum SOT 만, t2i_context 도메인 분리. | **Carry-A100** (Tier 3 후속, region-derived demonym wording redesign 별도 area — 다중 문화 / international story 의 시각 처리 정책) |
| STEP_MANIFEST `prompt_version` field 신설 (visual_world_rules / scene_director) | 현재 production 에 field 없음 + prompt activation 은 prompt_loader latest version file fallback 이 default. 신설 = observability metadata 영역 + 별도 test 필요 — W0 가 의도적으로 결정 시 추가, 본 area v1 closure 의 필수 surface 아님 (Codex iter 3 F-2 흡수). | **deferred decision** (W0 inventory 시 결정) |

## 2. Audit Evidence

### 2.1 Roadmap §5.7 verbatim

```
audit row: A006, A010, A014-A016, A022-A024, A027, A029-A030, A032, A034, A047, A050-A057, A065-A070, A093, A096-A100 (25+ row)
본질: Hygiene v1 (P-2/P-3/P-4/P-5/P-6) 후 잔존 시나리오 leak + 도메인 nomenclature 분산. scene_extractor_v2 turn_scene_detail / shot_director /
     scene_consistency / visual_world_rules / background-floor-plan prompts 전부 cross-cut.
Fix scope: active prompt 전체의 scenario-specific examples / closed noun lists 중립화. 단 코드 SOT 정리와 섞지 말고 prompt-only wave 로 분리.
Cost: large (25+ row, 광범위 prompt 다수)
Dependency: independent. 단 Area #1 / #2 / #3 의 prompt-side counterpart (scene_detail / shot_staging / shot_director) 는 해당 area 안에서 처리 — Area #7 의 scope 와 분리
Closed area boundary: Hygiene v1 (commit 91d1dfd) — P-1 ~ P-6 fix 보존
Risk: 광범위 prompt rewrite — version bump 다수 + DB row override / file fallback 의무 4-point sync (5월 14일 audit `04-` 참조)
Sub-area 후보 (분할 가능):
 (a) entity_extractor / outlook_extractor / scene_director / lvm_prompts 시나리오 leak 만
 (b) visual_world_rules SOT 일원화 (rules_schema.json:9 description 6-token + system.md:51 10-token enum drift, A096-A100)
 (c) shot_extract / shot_validator Korean grammar leak
 (d) t2i_visual_converter / scene_generator 작품 고유명사
```

본 Area #7a = roadmap §5.7 sub-area **(b) visual_world_rules SOT 일원화** + scene_director A047 흡수 (audit `02-` §6 G6 closed-list LLM instruction A047 site).

### 2.2 Audit finding row 본문 (audit output verbatim — Codex iter 3 F-1 흡수, 정확 mapping)

**Source**: `backend/tests/_audit_outputs/semantic_string_debt/full_20260516_0105/active_prompt_findings_with_snippets.md:2017-2092`

| Row | Status | Tier | Site (audit verbatim) | Class | Scope decision |
|---|---|---|---|---|---|
| **A047** | CONFIRMED | P1 | `prompts/_base/scene_director/8.202604081200/system.md:5-10, 23-25, 32-34` (3 site — top 4-item exclusion list + 본문 23-25 repeat + line 32-34 output rule parenthetical) | llm_closed_list_instruction | **In-scope** (Area #7a W2) — 3 site 모두 v9 principle-only rewrite |
| **A096** | CONFIRMED | P2 | `prompts/_base/visual_world_rules/6.202605021400/rules_schema.json:9-9` | schema_or_enum_drift | **In-scope** (Area #7a W1) — `rule_type` field 의 free string + 6-token description + "등" → 10-token canonical enum strict 화 |
| **A097** | CONFIRMED | P2 | `prompts/_base/visual_world_rules/6.202605021400/rules_schema.json:20-20` | scenario_dependent_prompt | **In-scope** (Area #7a W1, small fix) — `director_notes` description 안 시나리오-specific example (`"예: A의 영혼이 B의 몸에 전이된 경우 A는 물리적 존재가 아님"`) → generic placeholder 추상화. schema struct 변경 0. |
| **A098** | CONFIRMED | P1 | `prompts/_base/visual_world_rules/6.202605021400/system.md:51-51` | llm_closed_list_instruction | **In-scope** (Area #7a W1) — 10-token canonical rule_type list. schema description (A096) 와 본문 정합 sync 의무. |
| **A099** | CONFIRMED | P1 | `prompts/_base/visual_world_rules/6.202605021400/system.md:57-73` | semantic_string_judgment | **Out-of-scope (carry-A099)** — director_notes prose section. LLM-generate natural-language rule 본질적 redesign 별도 area. Area #7a 안 변경 0 (Area #3 W2 audit log monitoring SOT 보존). |
| **A100** | CONFIRMED | P2 | `prompts/_base/visual_world_rules/6.202605021400/system.md:98-98` | scenario_dependent_prompt | **Out-of-scope (carry-A100)** — t2i_context field 안 `<region-derived demonym>` wording. rule_type SOT 와 다른 축 (이미지 prompt 시각 스타일 / 인종 bias). Area #7a 안 변경 0. |

**Codex iter 3 F-1 fix wording 적용**: Area #7a closes A047 + A096 + A097 (schema small fix) + A098 만. A099 + A100 = explicitly non-claim carry (scope_creep_risk Moderate 차단). spec §1.3 carry table + §6 본 area carry table 정합.

### 2.3 Q0-light verify trace (controller verify + Codex iter 1+2 흡수)

**Verify state (controller 2026-05-18+)**:

1. **t2i_review v6 placeholder examples** — `prompts/_base/t2i_review/6.202605181200/scene_system.md:31/36/39/60-61` + `entity_system.md:33-34` 잔존 확인. **본 area 외**, Area #7c carry.
2. **scene_consistency P021** — `prompts/_base/scene_consistency/7.202605181210/system.md` 자체 시나리오 leak 없음. `character_state / environment_state / persistent_prop` type list + generic example (line 8-15) = enumeration broad (G6). audit file direct row source **0 hit**, roadmap §5.4 carry 표현으로만 존재. **본 area 외**, Carry-P021 (source unresolved low-priority).
3. **visual_world_rules drift (A096-A100)** — `system.md:30-46` 10-enum vs `rules_schema.json:9` description 6-token + "등" + `type: "string"` (enum 미강제). **본 area in-scope**.
4. **scene_director A047** — `system.md:6-25` 4-item closed list. 원격 매개 = "영상통화 CCTV 방송 화면 홀로그램 VR 원격 조종/빙의". **본 area in-scope** (Sub-A 흡수).
5. **variation_recommender A095 + 신규 dual-site** — `variation_recommender/v2/system.md` angle/color/composition 3-way + `scene_extractor_v2/19.../turn_scene_detail.md:87-91` 카메라 구도/색감 7+7 closed-list. **본 area 외**, Area #7d carry.
6. **scene_extractor_v2 turn_scene_detail** — P-4 Korean/Joseon fix 적용 완료. 카메라 구도/색감 closed-list 잔존 (#5 dual-site).

**Codex iter 1 verdict (Q1-Q5)**: Sub-A = VWR + scene_director A047 흡수, Sub-D 분리 (P021 별도 carry). 우선순위 Sub-A → Sub-B → Sub-C. 첫 area scope = Sub-A only 4-wave (W0/W1/W2/W3). P021 source unresolved. 10-항목 carry lesson priority.

**Codex iter 2 verdict (Q1-Q7)**: APPROVED_WITH_REVISIONS. 새 enum 추가 금지 + helper 신설 비권장 + 11-site cascade 본 scope 제외 + strict residue gate (4 항목) + closure verdict verbatim. Single-round outline review 충분, brainstorming closure 진입.

### 2.4 VWR runtime path (Codex iter 2 + iter 3 F-2 흡수)

```
backend/app/modules/pipeline/visual_world_rules.py:extract_visual_rules()
  → load_schema("visual_world_rules", "rules_schema") = rules_schema.json
  → load_prompt("visual_world_rules", "system") = system.md
  → call_structured(... schema_name="visual_world_rules") = LLM emit structured
```

**Prompt activation runtime (현재 production)**:
- `backend/app/modules/prompt_loader.py:130-132` (`load_prompt` file fallback path).
- `backend/app/modules/prompt_loader.py:219-225` (`_resolve_stem_in_pack` lexicographic latest version dir 결정).
- 결론 = active prompt version 은 **prompt file directory name 의 lexicographic order** 로 자동 결정. 새 `7.20260518HHMM/` (VWR) / `9.20260518HHMM/` (scene_director) dir 신설 시 자동 활성. `STEP_MANIFEST` 의 explicit `prompt_version` field 는 현재 **없음**.

**STEP_MANIFEST current state (Codex iter 3 F-2 evidence)**:
- `backend/app/core/step_manifest.py:130-141` `visual_world_rules` entry = `label / category / order / default_model / provider / depends_on / fan_out / applicability / step_type / lifecycle` 만. `schema_version` / `prompt_version` 필드 **없음**.
- `backend/app/core/step_manifest.py:417-428` `scene_director` entry = 같은 field set + `requires_projection_sync_before_run`. `prompt_version` field **없음**.

**Runtime validation chain**: schema (rules_schema.json) → LLM client local validation (`llm_client.py:524-527 _validate_local_schema` jsonschema.Draft7 use, defined at `llm_client.py:43-77`) → structured output return. 별도 app-level validator 신설 0 (Codex iter 2 verdict Q1).

**Caveat (Codex iter 2 Q4 verbatim)**: `step_runner` save-time default stamp 가 있으므로 closure wording 정확히 — `schema_version` mismatch 는 incompatible stamp cp 만 차단. older unstamped / default-stamped cp 는 force rerun 필요 가능. W1 = `schema_version` field 신설 (current `None` → `1`), 단순 "+1 bump" 아님.

## 3. 4-Layer Architecture

| Layer | Component | Action |
|---|---|---|
| **Producer (schema)** | VWR `rules_schema.json` v7 | `rule_type` field = `{"type": "string", "enum": [10-token], "description": "<canonical 10-token phrase>"}`. `additionalProperties: false` 보존. 다른 field (rules / director_notes / era / region / source_language / t2i_context) 변경 0. |
| **Producer (prompt)** | VWR `system.md` v7 | line 51 canonical 10-token list 보존 (A098). 본문 30-46 rule_type 별 example wording — 작품-specific 잔존만 추상화 (generic phrase 보존). schema description 의 canonical 10-token phrase 와 본문 정합. director_notes prose section (line 57-73) 변경 0 (Carry-A099 보존) + t2i_context section (line 95-100) 변경 0 (Carry-A100 보존). |
| **Consumer (prompt)** | scene_director `system.md` v9 | A047 4-item closed list 본체 폐기. principle-only rewrite: VWR rules[] rule_type + director_notes 가 physical presence 판단 기준이며, scene_director 는 사례 enumeration 자체 분류 안 함. 출력 schema 설명 (analyze_schema.json reference) + primary_location 결정 본문 변경 0. |
| **Code constraint** | `step_manifest.py` | **W1 mandatory**: VWR entry 에 `schema_version` field 신설 (현재 없음, current None → 1, cp invalidation 강제). **W0 deferred decision**: `prompt_version` field 신설 여부 (현재 없음, prompt activation 은 prompt_loader latest version file fallback 이 default). **W0 inventory**: `version_registry.py` / 별도 module 안 prompt_version pin 영향 사이트 식별 후 결정. |

### 3.1 Schema enum strict 화 + director_notes description small fix (Producer schema, A096 + A097)

**Two changes in same v7 schema file**:
1. `rule_type` field (line 9) — A096 enum strict 화 (아래 Before/After 참조).
2. `director_notes` field (line 20) — A097 description 안 시나리오-specific example (`"예: A의 영혼이 B의 몸에 전이된 경우 A는 물리적 존재가 아님"`) → generic placeholder (`"예: <scenario-specific identity-transfer scenario placeholder>"` 형식 또는 example 자체 제거). schema struct (type=array, items.type=string) 변경 0.

**Before** (current `rules_schema.json:9`):
```json
{
  "type": "string",
  "description": "규칙 유형 (possession, transformation, ghost, time_period, costume, technology 등)"
}
```

**After** (Area #7a v1 — `7.20260518HHMM/rules_schema.json`):
```json
{
  "type": "string",
  "enum": [
    "possession",
    "transformation",
    "ghost",
    "projection",
    "superpower",
    "body_deformation",
    "time_period",
    "costume",
    "technology",
    "other"
  ],
  "description": "규칙 유형 (possession, transformation, ghost, projection, superpower, body_deformation, time_period, costume, technology, other)"
}
```

**fail-fast (No Silent Fallback)**:
- LLM emit invalid `rule_type` → call_structured (schema_name="visual_world_rules") 의 LLM client local validation 이 schema enum 위반 reject. typed error 흡수 → caller / runner 가 retry 또는 fail-fast. `extract_visual_rules()` 본체에서 silent fallback 0.
- `"other"` 흡수 X — invalid 값을 `"other"` 로 흡수하면 silent miss (Codex iter 2 verdict Q5 #7). `"other"` 는 LLM 이 명시적으로 선택해야만 emit.

### 3.2 System.md 본문 추상화 (Producer prompt)

**Before** (`system.md:30-46` rule_type 별 example):
```
- **빙의/영혼 전이**: 인물 A의 영혼이 인물 B의 몸에 전이된 경우, 이미지에는 B의 외형을 그려야 함 (A의 얼굴이 아님)
- **변신/변형**: 인물이 다른 형태로 변하는 경우, 변형 전후의 시각적 규칙
- **유령/환영**: 투명하게 그려야 하는지, 실체가 있는 것처럼 그려야 하는지
- **투사/투영**: 홀로그램, 기억 장면 등의 시각적 처리 방법
- **초능력**: 텔레키네시스, 투시 등의 시각적 효과 규칙
- **신체 변형**: 부상, 노화, 변장 등 외형 변화 규칙
```

**After** (Area #7a v1 — generic principle):
- 사례 enumeration **자체 유지** (10-enum 의 도메인 의미 학습 의무) 단, 도메인 specific 사례 (예: 한국 fantasy 작품명 등) 가 잔존하면 추상화.
- Codex iter 2 verdict Q1: schema description 도 canonical 10-token phrase 와 sync — `system.md:30-46` 본문 wording 도 same canonical noun phrase (`possession / transformation / ghost / projection / superpower / body_deformation`) 사용 의무.
- visual_world_rules 가 SOT 본체 — 사례 enumeration 자체는 SOT owner 의 정당한 instruction, **소거 X**. 추상화는 작품-specific 잔존 사례만.

**verbatim 결정 (W1 진입 시 정확 wording 확정)**: scope 가 wording polish 의 영역 — 본 spec 은 결정 boundary 만, 정확 wording 은 W1 본문 패치 시점에 확정.

### 3.3 scene_director consumer principle-only rewrite (Consumer prompt, A047 — 3 site)

**Source** (Codex iter 3 F-3 흡수, scene_director/8.202604081200/system.md):

**Site 1** (line 5-10, top 4-item exclusion list):
```
## 카메라에 보이지 않는 경우 (제외)

1. **편집 기법**: 교차편집/몽타주에서 다른 장소의 인물이 번갈아 보이는 것은 이 씬의 카메라가 아닌 다른 씬의 카메라
2. **원격 접속/매개**: 영상통화, CCTV, 방송 화면, 홀로그램, VR, 원격 조종/빙의 기술 — 실제 몸이 이 장소에 없음
3. **목소리만**: V.O.(보이스오버), 내레이션 — 카메라에 안 보임
4. **정체 대체**: 변장, 쌍둥이 교체, 바디더블 — 보이는 것은 다른 사람의 몸
```

**Site 2** (line 23-25, 인물 판단 본문 repeat):
```
- **인물**: 이 씬의 카메라에 보이는가? 살아있든 죽었든, 의식이 있든 없든 — 카메라에 보이면 포함.
  - 빙의/원격접속 중이면 실제 몸이 안 보이므로 제외.
  - description을 참고하여 씬 텍스트의 표현과 매칭 (이름이 정확히 일치하지 않을 수 있음)
```

**Site 3** (line 32-34, 출력 본문 parenthetical):
```
- `present_entity_ids`: 이 씬의 카메라에 **시각적으로 보이는** 엔티티의 **id** 배열.
  - 엔티티 목록에서 제공된 id를 그대로 사용
  - 카메라에 안 보이면 제외 (빙의/원격/V.O. 등)
```

**After** (Area #7a v1 — `9.20260518HHMM/system.md`, 3 site 모두 처리):
- 3 site A047 signature 본체 모두 폐기.
- principle-only rewrite (정확 wording 은 W2 본문 패치 시점):
  - **Site 1 → principle replacement**: "physical presence / visual presence 판단 기준은 visual_world_rules 의 rules[] (rule_type 으로 SOT 정의) + director_notes 를 따른다. scene_director 는 사례 enumeration 자체 분류 안 하고 VWR SOT 결정 결과를 그대로 적용. VWR rules[] 에 해당 rule_type 이 정의되지 않은 작품 = 일반 인물 처리 (default presence)."
  - **Site 2 → principle replacement**: "인물: 이 씬의 카메라에 보이는가? VWR director_notes / rules[] 가 비물리/매개 상태로 분류한 경우 (예: rule_type=possession 의 visual_guideline 이 명시한 경우) 제외." — 구체 사례 (빙의/원격접속) enumeration 없음.
  - **Site 3 → principle replacement**: 본문 `(빙의/원격/V.O. 등)` parenthetical 폐기. "카메라에 안 보이는 경우 (VWR SOT 결정 따름) 제외." 또는 parenthetical 자체 제거.
- 나머지 section (출력 schema 설명, primary_location 결정, present_entity_ids 결정 body 등) 변경 0.

**Caveat (Codex iter 2 verdict Q2)**: scene_director prompt 에 mapping table (`편집 = projection` 등) 넣지 말 것. mapping 자체가 새 closed-list instruction. principle 만 명시 + LLM 이 VWR director_notes 를 읽고 자체 분류.

### 3.4 STEP_MANIFEST sync (Code constraint, Codex iter 3 F-2 흡수)

**File**: `backend/app/core/step_manifest.py`

**Current state (Codex iter 3 F-2 evidence verify)**:
- `visual_world_rules` entry (line 130-141) = no `schema_version` / no `prompt_version` field.
- `scene_director` entry (line 417-428) = no `prompt_version` field.
- prompt activation = `prompt_loader.py` file fallback + latest version dir 자동 결정 (W1/W2 의 `7.*/` + `9.*/` dir 신설 시 자동 활성).

**W1 action (mandatory)**:
1. `visual_world_rules` entry — **`schema_version` field 신설** (값 `1` 또는 explicit version label). cp invalidation 강제. **field 신설 = 새 dict key 추가, 기존 entry 정합 보존**.

**W1/W2 deferred decision**:
- `prompt_version` field 신설 의무 X (file latest version 자동 활성이 default). 명시적 observability metadata 로 추가 시 같이 sync — W0 inventory 단계에서 결정 + 별도 test 추가 의무.

**Out-of-scope (변경 0)**:
- scene_director `schema_version` 변경 0 (analyze_schema.json 영향 없음, A047 본체는 system.md only).
- version_registry / 별도 module 안 prompt_version pin: W0 grep 결과로 영향 사이트 식별 후 결정 (path-limited git add 보존).

**CP invalidation wording (Codex iter 2 verdict Q4 verbatim)**:
> "schema_version mismatch blocks cp that carries incompatible stamp; older unstamped/default-stamped cp may need force rerun"

## 4. Q1-Q7 Brainstorming Closure (Codex iter 1+2 verdict 정합)

### 4.1 Q1. Schema Shape

**Decision**: rules_schema.json:9 = `{type: string, enum: [10-token canonical], description: <canonical 10-token phrase>}`. `additionalProperties: false` 보존. runtime validation = schema + LLM client local validation + residue/canary. 별도 app-level validator 신설 0.

**Rationale**: Codex iter 2 Q1 verdict (b) + runtime path 확인. 별도 validator 신설 시 unused abstraction (Codex iter 2 Q5).

### 4.2 Q2. scene_director A047 Mapping

**Decision**: 새 enum 추가 금지. 기존 10-enum 흡수. mapping table 도 scene_director prompt 에 넣지 않음 — principle-only rewrite (VWR director_notes/rules[] 참조).

**Rationale**: Codex iter 2 Q2 verdict verbatim "새 enum 추가 금지". cardinality inflation + downstream 11-site cascade 추가 비용. scene_director 가 사례 분류 자체 안 하는 구조 (VWR 가 SOT, scene_director 는 SOT 결과 consume).

### 4.3 Q3. 11-Site Cascade

**Decision**: Area #7b 분리. Area #7a residue gate 에 11-site coverage 넣지 않음.

**Rationale**: Codex iter 1 Q3 + iter 2 Q3 verdict 정합. first slice = "visual_world_rules SOT" 닫기. 11 site = follow-up area.

### 4.4 Q4. Version / CP

**Decision** (Codex iter 3 F-2 + iter 4 F-2 정정 흡수):
- VWR prompt/schema v7 (`7.20260518HHMM/` dir) 신설 — prompt_loader latest version file fallback 으로 자동 활성.
- scene_director v9 (`9.20260518HHMM/` dir) 신설 — 동일 활성 방식.
- **STEP_MANIFEST `visual_world_rules.schema_version` field 신설** (현재 production 에 field 없음, current None → 1) — cp invalidation 강제. "bump" 아닌 **신설**.
- `prompt_version` field 신설 = **deferred decision** (W0 inventory 단계 결정). 현재 production manifest 에 field 없음 (`step_manifest.py:130-141` VWR / `:417-428` scene_director). 신설 시 observability metadata + 별도 test 추가 의무.
- `version_registry.py` / 별도 module 안 prompt_version pin sync 영향 사이트 = W0 grep 결과 확정.
- closure wording = "schema_version mismatch blocks cp that carries incompatible stamp; older unstamped/default-stamped cp may need force rerun".

**Rationale**: Codex iter 2 Q4 verdict. VWR output schema strict 화 = 기존 invalid enum cp downstream 차단 의무.

### 4.5 Q5. Producer / Consumer + Helper

**Decision**: helper 신설 비권장. v1 = prompt/schema SOT 충분. Producer = VWR v7 (system + schema). Consumer = scene_director v9. Code helper = Area #7b 시점 재판단.

**Rationale**: Codex iter 2 Q5 verdict — 지금 만들면 unused abstraction.

### 4.6 Q6. Residue Gate

**Decision**: strict gates 4 항목 (§7 본문 참조). archive dirs excluded. **Do not globally ban projection / CCTV / ghost / camera / color** (legitimate use case 잔존 가능).

**Rationale**: Codex iter 2 Q6 verdict. residue gate 의 false-positive 차단 — in-scope closed-list signature 만 gate.

### 4.7 Q7. Closure Verdict / Carry Table

**Closure verdict draft (verbatim from Codex iter 2 Q7)**:
> "Area #7a closes when visual_world_rules v7 is the structured SOT for physical-presence/visual-world rule_type via 10-value schema enum + synchronized system instruction, scene_director v9 no longer teaches A047 scenario-specific exclusion lists and instead uses VWR rules/director_notes as the upstream principle source, active prompt/schema residue gates pass, canary validates rule_type enum enforcement and scene_director prompt residue, and no VLM validation is used."

**Carry table**: §6 본문 참조.

## 5. Wave Outline

### 5.1 W0 — Inventory + Baseline Measurement

**Goal**: Production path + active prompt + STEP_MANIFEST current metadata + audit output verify + baseline pytest scope 식별 + `prompt_version` field 신설 deferred decision 결정.

**Tasks**:
1. `backend/app/modules/pipeline/visual_world_rules.py` 본체 read (`extract_visual_rules` call_structured 호출 path 확정).
2. `backend/app/core/step_manifest.py` 안 `visual_world_rules` (line 130-141) + `scene_director` (line 417-428) entry full read — **현재 field set verify** (`schema_version` / `prompt_version` 둘 다 없음 expected, Codex iter 3 F-2 evidence).
3. `backend/app/core/steps/` 안 scene_director step file 확정 (file name + `load_prompt("scene_director", "system")` 호출 path).
4. `version_registry.py` + 별도 module 안 `prompt_version` / `schema_version` pin 있는지 grep + 본 area 영향 확정 (`MODULE_VERSIONS` / `_MODULE_INFO` 등).
5. `load_schema("visual_world_rules", "rules_schema")` callsite grep (extract_visual_rules 외 보조 caller 있는지).
6. **Audit output verify**: `backend/tests/_audit_outputs/semantic_string_debt/full_20260516_0105/active_prompt_findings_with_snippets.md:2017-2092` A096-A100 mapping 본문 재확인 (spec §2.2 정합).
7. baseline pytest scope: `tests/integration/test_visual_world_rules.py` + `tests/unit/test_step_manifest_v3.py` + cp save-load flow integration test.
8. archive prompt directory list (rollback path 보존, residue gate excluded): VWR `1.*, 2.*, 3.*, 4.*, 5.*, 6.202605021400/` + scene_director `6.*, 7.*, 8.202604081200/`.
9. **`prompt_version` field 신설 deferred decision** — 필요 시 observability metadata + 별도 test 의무. W1/W2 진입 전 결정.

**Output**: W0 inventory memo (`docs/superpowers/specs/2026-05-18-area-7a-w0-inventory.md`) — 작은 file (Area #4 W0 measurement format 정합, 2-4k bytes 추정).

### 5.2 W1 — VWR Producer Atomic (signature-breaking transition)

**Goal**: VWR v7 producer (schema + system) + STEP_MANIFEST `schema_version` 신설 atomic.

**Tasks (single commit, atomic transition)**:
1. `prompts/_base/visual_world_rules/7.20260518HHMM/rules_schema.json` 신설:
   - `rule_type` field — `{"type": "string", "enum": [10-token canonical], "description": "<canonical 10-token phrase>"}` (A096 fix).
   - `director_notes` field description — 시나리오-specific example (`"예: A의 영혼이 B의 몸에 전이된 경우..."`) → generic placeholder 추상화 (A097 small fix). `type: array, items.type: string` struct 변경 0.
   - 다른 field (rules / era / region / source_language / t2i_context) struct 보존.
2. `prompts/_base/visual_world_rules/7.20260518HHMM/system.md` 신설:
   - line 51 canonical 10-token list 보존 (정합 가독성 의무, A098).
   - 본문 30-46 rule_type 별 example wording 의 작품-specific 잔존 (한국 fantasy 작품명 등) 만 추상화.
   - **director_notes prose section (line 57-73) 변경 0** (Carry-A099 보존).
   - **t2i_context section (line 95-100) 변경 0** (Carry-A100 보존).
3. `backend/app/core/step_manifest.py` `visual_world_rules` entry — **`schema_version` field 신설** (현재 없음 → `1`). 기존 dict key 정합 보존.
4. (deferred decision 결과 신설 결정 시) `prompt_version` field 추가 + version_registry / module pin sync.

**Single atomic commit** (signature-breaking) — schema enum strict 화 = cp invalidation, 단일 commit 으로 묶음. plan literal wording 정합 의무 ([[feedback_codex_mcp_discussion_workflow]] Q5 #6).

**Codex review (per-wave)**: W1 commit 후 Codex external review 의뢰 (spec quality + production fragment).

### 5.3 W2 — scene_director Consumer Rewrite (A047 3 site)

**Goal**: scene_director v9 system.md A047 3 site 본체 폐기 + principle-only rewrite.

**Tasks (single commit)**:
1. `prompts/_base/scene_director/9.20260518HHMM/system.md` 신설:
   - **Site 1 (line 5-10)**: 4-item exclusion list (편집 기법 / 원격 접속/매개 / 목소리만 / 정체 대체) 본체 폐기 → principle-only "VWR SOT 따름" wording.
   - **Site 2 (line 23-25)**: 인물 판단 본문 안 `빙의/원격접속 중이면 실제 몸이 안 보이므로 제외` parenthetical 폐기 → principle replacement.
   - **Site 3 (line 32-34)**: 출력 본문 안 `(빙의/원격/V.O. 등)` parenthetical 폐기 → 또는 parenthetical 자체 제거.
   - 출력 schema 설명 (analyze_schema.json reference) + primary_location 결정 본문 변경 0.
2. (W0 deferred decision 결과 prompt_version 신설 결정 시) `backend/app/core/step_manifest.py` `scene_director` entry — `prompt_version` field 추가.
3. `analyze_schema.json` 변경 0 (scene_director schema field 영향 없음).

**Codex review**: W2 commit 후 Codex external review 의뢰.

### 5.4 W3 — Residue Gate + Canary + Closure

**Goal**: 4 strict residue gate PASS + canary 4-5 PASS + closure memo (spec + roadmap §5.7 update + carry table).

**Tasks**:
1. **Residue gate test 신설** (`backend/tests/integration/test_area_7a_residue_gate.py`):
   - Gate 1: VWR v7 schema rule_type.enum = 10 exactly (length + element set).
   - Gate 2: VWR v7 schema no free-string description drift (description 6-token + "등" pattern 0 hits in 7.* dir, 단 archive 1-6 dir 제외).
   - Gate 3: VWR v7 system 10-token canonical list 본문 1회 + 6-token "등" description residue 0.
   - Gate 4: scene_director v9 system A047 4 signatures = 0 (`교차편집|몽타주` / `영상통화\|CCTV\|방송 화면\|홀로그램\|VR\|원격 조종\|빙의` / `V.O.\|보이스오버\|내레이션` / `변장\|쌍둥이\|바디더블`) in 9.* dir, archive 6-8 dir 제외.
2. **Canary test 신설** (`backend/tests/integration/test_area_7a_no_drift.py`):
   - **C1 (deterministic, no-LLM — Codex iter 3 F-4 흡수)**: `jsonschema.validate()` 직접 호출 (또는 `llm_client._validate_local_schema` patch + synthetic invalid payload) — invalid `rule_type` value (예: `"invalid_value"`) reject verify. **live LLM / router completion call 금지**.
   - C2: VWR system.md (line 51) ↔ rules_schema.json (line 9 enum + description) 10-token 정합 — JSON parse + structural compare (Gate 2/3 와 같은 access path).
   - C3: scene_director v9 prompt principle-only — VWR SOT reference token (`visual_world_rules` 또는 `VWR` 또는 `rule_type`) 1+ 존재 + A047 3 site signatures 0.
   - C4: STEP_MANIFEST `visual_world_rules.schema_version` 신설 (current `None` → `1`) + cp invalidation flow (incompatible stamp cp 차단 verify).
   - C5: scene_director step load_prompt path 정합 (no broken import, 새 `9.*/` dir 가 prompt_loader latest version 으로 자동 활성).
3. **Closure memo**:
   - 본 spec status 갱신 (status: closed).
   - roadmap §5.7 update: Sub-A (visual_world_rules SOT 일원화 + scene_director A047 흡수) closed 표시 + carry table (Area #7b/c/d/P021) 명시.
   - audit `02-` row A047/A096-A100 status update.
4. **Codex iter (range review)**: W0-W3 range review APPROVED_FOR_PUSH 후 push.

**NO VLM** — canary 5 항목 모두 schema/text/manifest verification only.

## 6. Carry Table

| Carry ID | Surface | Source / Reason | Promotion Trigger |
|---|---|---|---|
| **Area #7b** | 11 site VWR downstream prompt cascade (entity_all / entity_character_list / entity_relation / outlook_extractor phase1+2 / entity_extractor_v2 system+turn0_style / scene_verify / scene_detail / shot_extract) | Sub-A scope 분리 (Codex iter 1+2 verdict). producer SOT enforcement 보존 의무. helper 신설 결정 시점 = 본 area 진입 시. | Area #7a closure 후 follow-up Tier 3 area |
| **Area #7c** | t2i_review v6 placeholder example abstraction (`scene_system.md:31/36/39/60-61` + `entity_system.md:33-34`) | Sub-B 별도 small area. Area #6 v6 pack closure carry. | Area #7a closure 후 follow-up |
| **Area #7d** | Cinematography closed-list SOT dual-site (`variation_recommender/v2/system.md` + `scene_extractor_v2/19.../turn_scene_detail.md:87-91` 카메라 구도/색감 7+7 closed-list) | Sub-C. A095 + 신규. cinematography domain 별개 — visual_world_rules SOT 와 다른 축. | Area #7a closure 후 follow-up |
| **Carry-A099 (신규, Codex iter 3 F-1 흡수)** | VWR system.md director_notes prose examples (line 57-73) — 5-line generic principle examples (회상/F.B / 환각/현시 / CCTV-모니터-창문 / 교차편집-몽타주 / 안개-어둠) + bad-example 4-line | LLM-generate natural-language rule 으로 physical-presence routing 위임 — Area #3 W2 audit log monitoring SOT 보존 의무 + director_notes prose 본질적 redesign 별도 area. scope_creep_risk 차단 목적 분리. | director_notes prose redesign decision: **추상화 채택** — Carry-A099 resolved by W1/W2 + W3 closure-docs (2026-05-19+), prose hard-prime examples abstracted (R1-R9 9 strict residue 0 + canonical process wording EN+KR pair) |
| **Carry-A100 (신규, Codex iter 3 F-1 흡수)** | VWR system.md t2i_context demonym (line 98) — `<region-derived demonym>` wording | t2i_context field 도메인 (이미지 prompt 시각 스타일, 인종/국적 bias) — rule_type SOT 와 다른 축. 다중 문화 / international story 시각 처리 정책 결정 의무. | t2i_context demonym redesign decision 후 follow-up area |
| **Carry-P021** | scene_consistency 7 `character_state / environment_state / persistent_prop` type list + generic example (G6 closed-list enumeration broad) | roadmap §5.4 carry 표현. audit file direct row source 0 hit → **source unresolved**. promotion 전 audit row verify 의무. | audit row direct source 확인 + active leak verify 후 (현재 evidence = generic English example only, 시나리오 leak 없음). |

## 7. Residue Gate (strict 4 항목)

**Scope**: production active prompt only — `prompts/_base/visual_world_rules/7.*/` + `prompts/_base/scene_director/9.*/`. **Archive excluded**: `1.*, 2.*, 3.*, 4.*, 5.*, 6.202605021400/` (VWR) + `6.*, 7.*, 8.202604081200/` (scene_director).

**Gate signatures (Codex iter 2 Q6 + Codex iter 3 F-5 흡수 — structural parse 우선, raw regex = advisory only)**:

**Gate 1 (structural, JSON parse)**: VWR v7 `rules_schema.json` parse → access `properties.rules.items.properties.rule_type` → assert:
- `type == "string"`.
- `enum == ["possession", "transformation", "ghost", "projection", "superpower", "body_deformation", "time_period", "costume", "technology", "other"]` (length=10, exact element set).
- `description` substring 안 canonical 10-token enum 정합 (canonical phrase 또는 10-token enumeration parse).

**Gate 2 (structural, JSON parse — Codex iter 3 F-5 흡수)**: 같은 schema parse 결과의 `rule_type.description` 안 6-token + "등" pattern (`possession, transformation, ghost, time_period, costume, technology 등` 또는 4 enum 누락 enumeration) hit 0. **raw JSON text regex 는 advisory residue grep only** (formatting 의 다층 가능성).

**Gate 3 (structural, system.md parse)**: `system.md` 본문 안 10-token canonical list 1+ 위치 (line 51 또는 정합 위치) 존재 + 6-token + "등" pattern hit 0. **markdown 본문이므로 regex 가능 — 단 false-positive 차단** (예: archive dir 안 본문 인용 제외).

**Gate 4 (regex, scene_director v9)**: A047 3 site signatures hit 0:
- `(?:교차편집|몽타주)` 0
- `(?:영상통화|CCTV|방송 화면|홀로그램|VR|원격 조종|빙의)` 0 (단 VWR SOT reference 문구 안 `rule_type ∈ {possession, transformation, ...}` 같은 enum value 자체는 허용)
- `(?:V\.O\.|보이스오버|내레이션)` 0
- `(?:변장|쌍둥이|바디더블)` 0
- **line 32-34 parenthetical signature** `\(빙의/원격/V\.O\. 등\)` 또는 similar `(빙의|원격)` parenthetical 0 (Codex iter 3 F-3 흡수).

**Forbidden global ban (Codex iter 2 Q6 verdict)**: `projection`, `CCTV`, `ghost`, `camera`, `color` 같은 일반 단어 global 0 금지 (legitimate use case 잔존 가능 — VWR rule_type enum 의 `projection` / `ghost` 자체 + scene_director 의 camera 본문 등).

## 8. Closure Verdict (Codex iter 2 Q7 verbatim)

> "Area #7a closes when visual_world_rules v7 is the structured SOT for physical-presence/visual-world rule_type via 10-value schema enum + synchronized system instruction, scene_director v9 no longer teaches A047 scenario-specific exclusion lists and instead uses VWR rules/director_notes as the upstream principle source, active prompt/schema residue gates pass, canary validates rule_type enum enforcement and scene_director prompt residue, and no VLM validation is used."

**Promotion condition (controller verify)**: W0-W3 atomic execution + Codex per-wave APPROVED + range review APPROVED_FOR_PUSH + push 완료 + carry table 명시 + roadmap §5.7 update.

**NO VLM hard constraint** — 모든 canary + residue gate = schema/text/manifest verification only. VLM 의존 0.

## 9. References

- **Roadmap**: `docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md` §5.7 (sub-area b).
- **Audit (02-prompt)**: `docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md` §6 (A047) + §11 (visual_world_rules SOT 일원화 — 본 area = §11 의 producer slice).
- **Active prompt VWR (in-scope source)**: `prompts/_base/visual_world_rules/6.202605021400/{system.md, rules_schema.json}`.
- **Active prompt scene_director (in-scope source)**: `prompts/_base/scene_director/8.202604081200/system.md`.
- **Production VWR step**: `backend/app/modules/pipeline/visual_world_rules.py`.
- **STEP_MANIFEST**: `backend/app/core/step_manifest.py` (visual_world_rules + scene_director entries).
- **Closed areas**: Area #3 (commit `97c4471`) / Area #5 (commit `fe300bf`) / Hygiene v1 (commit `91d1dfd`) — all preserved.

## 10. Codex Iter Trace

- **Codex iter 1** (Q0-light inventory): Sub-scope split 4 후보 (A/B/C/D) → A = VWR + scene_director A047 흡수, D 분리 (P021 별도). 우선순위 Sub-A → Sub-B → Sub-C. 첫 area scope = Sub-A only 4-wave. 10-항목 carry lesson priority. controller cross-analyze 수용.
- **Codex iter 2** (Q1-Q7 outline review): APPROVED_WITH_REVISIONS. 새 enum 추가 금지 (Q2) + helper 신설 비권장 (Q5) + 11-site cascade 본 scope 제외 (Q3) + strict residue gate 4 항목 (Q6) + closure verdict verbatim (Q7). Single-round outline review 충분. controller 100% 수용 + 2 draft 정정 흡수 (enum 신설 / helper 신설 모두 v1 scope 외).
- **Codex iter 3** (spec quality review): NEEDS_REVISION_MINOR. 5 findings (F-1 ~ F-5) 모두 controller 100% 수용 + spec amend:
  - **F-1 (Important §2.2/§3.1/§3.2/§6 audit A096-A100 mapping factual drift)**: audit output `active_prompt_findings_with_snippets.md:2017-2092` 본문 정확 mapping 흡수. A096=rule_type schema desc / A097=director_notes schema desc / A098=system.md rule_type list / A099=system.md director_notes prose / A100=system.md t2i_context demonym. Area #7a closes A047 + A096 + A097 (schema small fix) + A098 만. **A099/A100 = explicit non-claim Carry-A099 / Carry-A100 분리** (scope_creep_risk Moderate 차단).
  - **F-2 (Important §1.2 Code/§3.4 STEP_MANIFEST runtime drift)**: 현재 production manifest 에 `schema_version` / `prompt_version` field 없음 evidence. W1 = `schema_version` field 신설 (not "bump"). prompt activation = `prompt_loader` file fallback latest version. `prompt_version` field 신설 = deferred decision (W0).
  - **F-3 (Important §1.2/§3.3/§7 Gate 4 scene_director A047 line range)**: scene_director/8.../system.md A047 = 3 site (line 5-10 + 23-25 + 32-34). 본 spec §1.2 + §3.3 + §7 Gate 4 모두 3 site 명시. line 34 parenthetical `(빙의/원격/V.O. 등)` 같이 rewrite.
  - **F-4 (Important §5.4 Canary C1 deterministic)**: C1 = `jsonschema.validate()` 직접 호출 또는 `_validate_local_schema` patch (`llm_client.py:43-77`) + synthetic invalid payload. live LLM / router completion call 금지. spec §5.4 C1 wording 정정.
  - **F-5 (Minor §7 Gate 2/3 regex robustness)**: Gate 1/2/3 모두 structural JSON / markdown parse 우선, raw regex = advisory only. spec §7 amend.
  - **scope_creep_risk**: Moderate → A099/A100 explicit carry 분리로 차단.

**다음 step**: spec amend commit + Codex narrow re-review (iter 4) APPROVED_FOR_PLAN 후 plan drafting 진입.

- **Codex iter 4** (narrow re-review): NEEDS_REVISION_MINOR — F-1/F-3/F-4/F-5 resolved, **F-2 partially_resolved** — §3 4-layer table + §4.4 본문 안 stale wording 잔존 (`schema_version bump` / `prompt_version update` / `version_registry sync` / `director_notes 변경 0`). 4 site amend 적용 — §1.1 + §3 4-layer Producer (prompt) row + §3 4-layer Code constraint row + §4.4 Decision body. wording 모두 정정: `schema_version` 신설 (not bump) + `prompt_version` deferred + version_registry W0 grep 결정 + director_notes prose section 변경 0 (Carry-A099 보존) + t2i_context section 변경 0 (Carry-A100 보존).

**다음 step (iter 4 amend 후)**: spec amend commit + Codex iter 5 narrow re-review APPROVED_FOR_PLAN 후 plan drafting 진입.

## 11. Closure (2026-05-18+)

**Status**: closed (Codex iter 5 APPROVED_FOR_PLAN + W0-W3 atomic execution + Codex per-wave APPROVED).

**Wave commits**:
- W1 (`54fe057`): VWR v7 producer atomic (rules_schema.json + system.md + step_manifest.schema_version=1).
- W2 (`b2765a7`): scene_director v9 consumer atomic (A047 3 site principle-only).
- W3a (`e6c0f0f`): residue gate test (4 strict + sanity).
- W3b (`50cb85b`): canary test (5 항목, no live LLM).
- W3c (`0a2e2b4`): closure cleanup (본 section + roadmap §5.7 + audit row mark).

**Closure verdict** (Codex iter 2 Q7 verbatim):

> "Area #7a closes when visual_world_rules v7 is the structured SOT for physical-presence/visual-world rule_type via 10-value schema enum + synchronized system instruction, scene_director v9 no longer teaches A047 scenario-specific exclusion lists and instead uses VWR rules/director_notes as the upstream principle source, active prompt/schema residue gates pass, canary validates rule_type enum enforcement and scene_director prompt residue, and no VLM validation is used."

**In-scope closed**:
- A047 (scene_director A047 3 site).
- A096 (rules_schema rule_type enum + description drift).
- A097 (rules_schema director_notes description small fix).
- A098 (system.md rule_type list).

**Carry (non-claim, follow-up)**:
- Area #7b (11-site VWR downstream prompt cascade).
- Area #7c (t2i_review v6 placeholder abstraction).
- Area #7d (cinematography closed-list SOT dual-site).
- Carry-A099 (VWR system.md director_notes prose redesign).
- Carry-A100 resolved by W1-W4 (2026-05-19+) — V8+ VWR `system.md` t2i_context demonym redesign + `rules_schema.json:40` description abstraction (v9 prompt-pack `9.202605191334`).
- Carry-P021 (scene_consistency enumeration broad, source unresolved).
