# E2E11 육안 피드백 6건 수정 Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans. Steps use checkbox 문법.

**Goal:** E2E11 육안 피드백 6건(①건축 규모 ②콘티 소품 방향 ③GPT 구도 판정 합류 ④그려진 표식 형상 ⑤차렷/정면응시 자제 ⑥장소 상주 동물)+갤러리 씨드 섹션을 flag/신팩 게이트로 구현하고 E2E12 fresh 로 검증.

**Architecture:** 전부 기존 구조 확장 — 신규 프롬프트 팩 4개(structure_seed v5 / background_prompt v15 / shot_conti_light v4 / still_recipe v10)+multiroll GPT 구도 critique 어댑터 1개. 하드코딩·시나리오 특정 0.

## 실측 근거 (E2E11 705ead84…)

- ①: `scale_clause`(STRUCTURE SCALE SPEC) 실재하나 **interior_note 결손 시 절 통째 생략** → E2E11 10/10 그룹 전부 SCALE 절 미적용 실측(옥탑 과대의 직접 원인). 범용 휴먼 스케일 앵커(사람 크기 요소=문≈2m·창·난간·층고로 치수 도출) 절이 어디에도 없음.
- ②: `prop_orientation` 스템이 스틸 팩(v1)엔 있으나 **콘티 팩(v3 스템 목록)에 부재** — S21sh3 콘티가 폰/사진 뒷면 응시로 저작. critique 실측 "콘티 화살표는 아래(사진)인데 정면 응시" — 콘티 저작 결함이 최종까지 전파.
- ③: 현행 fix-rejudge=[원본 vs 수정본] 2후보(Gemini 단독). 사용자 확정: GPT 추가=**구도 전담 판정**, Gemini critique+GPT 구도 수정 **합산 수정 프롬프트**로 i2i.
- ④: 원문 "붓으로 벽에 원을 그리는 것처럼"/"손목의 작은 원(표식)"=윤곽선 스트로크 — 저작 체인이 "circular tattoo/mark"로 단순화, T2I가 채운 원반으로 렌더(S12sh11). 범용 계약: 그려진 표식=스트로크(윤곽), 텍스트가 채움을 명시할 때만 채움.
- ⑤: S15sh1(그룹 배경+무콘티 승·"벤치에 앉아"인데 차렷 직립)·S15sh3(prev)·유사 다수 — 자세 지휘 부재 시 T2I 기본값=차렷. 자연 연기 계약 부재.
- ⑥: groupbg/재투영 "empty background" 계약이 **장소 상주 동물까지 비움** — 보호소 개우리가 전부 빈 채(S7sh2). "no people ≠ 장소를 정의하는 상주 생물·물품 제거" 계약 필요.
- Q1: 씨드 10그룹 생성 정상 — 갤러리 빌더 섹션 누락(스크래치, 커밋 금지).

## Global Constraints

- 프롬프트 덮어쓰기 금지 — 신규 버전 디렉토리(`N.YYYYMMDDHHmm`). 기존 팩 무변경.
- 신규 flag default OFF=byte-identical. 시나리오 의존·substring 의미 판단·코드 드로잉 금지.
- 개발 사이클: 구현→Codex 리뷰→유닛→E2E12 fresh→acceptance→갤러리 LAN→육안.
- 커밋 말미 Co-Authored-By: Claude Fable 5.

---

### Task 1 (fix①): 휴먼 스케일 앵커 — seed/배경/groupbg 전 배경 저작

**Files:**
- Create: `prompts/_base/structure_seed/5.202607221100/` (v4 사본 + `human_scale_clause.md`)
- Create: `prompts/_base/background_prompt/15.202607221105/human_scale_rule.md` (단일 스템 — Codex BLOCKING-1 재설계: 선택형 팩 아님, 활성 selector 무관 system 부착)
- Modify: `backend/app/modules/pipeline/outdoor_structure_seed.py` (팩맵 v5, build_structure_seed_prompt 에 무조건 human_scale 절)
- Modify: `run_background_prompt(scale_anchor=)`+flag `background_scale_anchor_enabled`(Literal/overlay/preflight 무변경)+BackgroundPromptStep hash
- Modify: `backend/app/modules/pipeline/still_recipe.py` groupbg_head 는 Task 4 팩 v10 에 병합
- Test: 기존 seed/bg 테스트 파일들

**계약 문안(범용)**: "HUMAN-SCALE CALIBRATION: derive every structure's true size from human-scale elements visible on it — a door ≈ 2m, a window ≈ 1–1.5m wide, one storey ≈ 2.5–3m, a railing ≈ 1.1m. A hut with a single window is barely one small room; never inflate a small structure into a building (or shrink the reverse). All parts of the structure and its surroundings must agree with these anchors." — seed=항상 주입(interior_note 는 기존 SCALE SPEC 로 추가 증거), bg=활성 system 부착 스템(재설계).

- [ ] v5/v15 팩 생성(사본+신설), selector 승격은 env opt-in(seed 팩은 상수 SEED_PACK_VERSION 승격 — E2E12 자동)
- [ ] build_structure_seed_prompt: v5 이상이면 human_scale_clause 무조건 append(테스트: v4=불변, v5=절 실재)
- [ ] interior_note 10/10 결손 원인 진단 로그 남기기(별건 — 코드 수정은 결손 시에도 human_scale 로 커버)
- [ ] Commit

### Task 2 (fix②⑤ 콘티): 콘티 팩 v4 — PROP_ORIENTATION+자연 연기

**Files:**
- Create: `prompts/_base/shot_conti_light/4.202607221110/` (v3 전체 사본 + `prop_orientation.md`(스틸 v1 문안 이식) + `naturalism_clause.md`)
- Modify: `backend/app/modules/pipeline/shot_conti_light.py` (PROMPT_VERSION_MAP v4, _PERSP_PACKS/_NO_PLATE_PACKS+v4, build_conti_prompt 에 두 절 append — v4 전용)
- Modify: step `_prompt_selector` full→"4"
- Test: test_shot_conti_light_persp.py

**naturalism 문안(범용, 예외=LLM 계약 예시)**: "NATURAL PERFORMANCE: every figure is mid-action with believable weight shift and a gaze target from the SHOT TEXT — never a stiff attention stance (feet together, arms straight down) and never a blank stare into the lens, UNLESS the shot text itself stages it (military/ceremonial drill, exercise, medical exam, an explicit direct-to-camera look)."

- [ ] 실패 테스트(v4=두 절 실재·순서, v3=byte-identical) → 구현 → PASS → Commit

### Task 3 (fix⑤ 스틸+fix④): still_recipe 팩 v10 — naturalism+drawn-mark+groupbg 상주 요소

**Files:**
- Create: `prompts/_base/still_recipe/10.202607221120/`: `naturalism_clause.md`(Task2 동일 문안)+`drawn_mark_clause.md`+`groupbg_head.md`(v9 개정 — 상주 요소 유지)+`bg_reproject_head.md`(v7 개정 — 동일)
- Modify: `backend/app/modules/pipeline/still_recipe.py`: PROMPT_VERSION_MAP v10, 상수 `STILL_NATURALISM_PROMPT_VERSION="10"`+`build_still_prompt` 정적 절 2개(naturalism·drawn_mark — flag `still_recipe_naturalism_enabled` 게이트, 비면 byte-identical), groupbg/재투영은 `BGFIRST_FULL_PROMPT_VERSION`→"10" 승격+`BGFIRST_PROMPT_VERSION` 유지하되 head 로드를 full 팩에서(체인 contract bump `bgfirst_full_v2`)
- Modify: 서비스 배선+지문·config_hash 스탬프(관례 동일)
- Test: test_still_recipe.py

**drawn_mark 문안(범용)**: "DRAWN MARKS: any mark the text describes as drawn, painted or traced (a circle, line, symbol) is a STROKE on the surface — an outline whose interior shows the underlying surface; render its stated shape faithfully (a ring stays a ring) and never fill it into a solid shape unless the text says filled."
**groupbg/재투영 무인 정련**: "NO PEOPLE" 유지 + "but keep the location's inherent occupants and stock that define the place — animals in an animal shelter or farm, goods in a market, boats in a harbour — unless the text removes them."

- [ ] 실패 테스트 → 구현 → PASS → Commit

### Task 4 (fix③): GPT 구도 판정 합류 — 합산 수정 프롬프트

**Files:**
- Create: `prompts/_base/multiroll_judge/4.202607221130/` (`gpt_composition_sys.md`+`gpt_composition_header.md` 단일 목적 팩)
- Modify: `backend/app/modules/pipeline/multiroll_gemini.py`: `make_gpt_composition_critique_fn`(GPT LVM `call_structured` — openai 라우트, 입력=선정본+계약 프롬프트(콘티/CAMERA·FRAME 절 포함 전문), 출력 스키마=`{issues:[{issue_ko,fix_en}]}` **구도·배치·스케일·시선축만** — 정체성/재질/조명 지적 금지 계약)
- Modify: `backend/app/modules/pipeline/multiroll_select.py`: `_critique_and_fix(composition_critique_fn=None)` — Gemini critique 후 GPT 구도 critique 호출, `build_fix_prompt(issues_gemini+issues_gpt)` 합산(중복 label 무관 — 항목 나열), 이후 기존 2후보 재판정 유지. 기여 시 지문 extra `{"gpt_composition": pack}`.
- Modify: 서비스·plate 배선(flag `multiroll_gpt_composition_enabled` default OFF)+config_hash
- Test: test_multiroll_select.py(합산 프롬프트·OFF 불변·재판정 연계), 배선 테스트

- [ ] 실패 테스트 → 구현 → PASS → Commit

### Task 5 (Q1): 갤러리 씨드 섹션 (스크래치, 커밋 금지)

- [ ] build_e2e12_gallery.py(차기 빌더)에 씨드 10그룹 전수 섹션(3롤→선정→수정 계보) 추가 — E2E12 갤러리부터 노출. E2E11 갤러리도 재빌드해 즉시 확인 가능하게.

### Task 6: Codex 리뷰 → 반영 → 유닛 full

### Task 7: E2E12 fresh — run_e2e_round11.py 사본+env(신규 flag 2종: STILL_RECIPE_NATURALISM, MULTIROLL_GPT_COMPOSITION — bg 앵커는 BACKGROUND_PROMPT_VERSION=14 유지+BACKGROUND_SCALE_ANCHOR_ENABLED=true, seed v5 는 상수 자동) → acceptance(E2E11 항목+6건: SCALE 절 실적용 10/10·콘티 prop 절·GPT 구도 record·drawn-mark 절·naturalism 절·보호소 배경 육안) → 갤러리 LAN → 육안
