---
title: Carry-P021 Q1-Q7 Outline (scene_consistency v7 prompt hygiene narrow abstraction)
date: 2026-05-19
status: draft
related:
  - docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md (carry rows §13/§14 + summary table line 317 + carry priority line 475)
  - docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/01-code-side-regex-audit.md (#17 P1-6 = Area #4 closed code-side dependency reference only)
  - prompts/_base/scene_consistency/7.202605181210/ (active v7 prompt-pack — abstraction target)
  - backend/app/core/steps/scene_consistency_step.py (Area #4 producer code, SCENE_CONSISTENCY_SCHEMA_VERSION=3, element_scope enum SOT)
  - backend/app/core/version_registry.py (production active version pin)
  - backend/tests/unit/test_scene_consistency_schema_v7.py (v7 schema test, literal historical pin OK)
  - backend/tests/test_prompt_versions.py (v6/v7 active-resolution wording — W1 stale-wording cleanup target)
---

# Carry-P021 Q1-Q7 Outline — scene_consistency v7 → v8 narrow abstraction

## §1 Context + scope

### §1.1 Carry source (W0.2 inventory verified)

- **Source row**: `docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md` 안 carry row wording `scene_consistency 7 enumeration broad (source unresolved)` (summary table line 317 + carry-list bullets line 382/437/475).
- **Source nature**: prompt-side hygiene carry — `prompts/_base/scene_consistency/7.202605181210/system.md` 안 hard-prime English prose examples + demographic default wording + JSON example block.
- **Area #4 boundary**: Area #4 (2026-05-18, `scene_consistency_step.py:36-48` comment anchor — schema_version 2→3 + element_scope enum SOT + v6 code-side close/full regex+keyword+classifier trio 폐기) = audit 01 #17 (P1-6) code-side regex 분류 closure. **Area #4 spec 자체가 P021을 "Area #7 carry / partial-neutral only / closure 선언 X"로 명시 잔존** (Codex β-narrow verdict 안 인용; 본 outline 안 claude 직접 spec 확인 X — Codex 응답 명시 인용).
- **본 Carry-P021 scope**: Area #4 closure 후 잔존 prompt-side hygiene = `system.md` 안 hard-prime example/demographic default 추상화. **Area #4 closure 대상 (code-side regex 분류) ≠ 본 Carry-P021 대상 (prompt-pack hygiene)**.

### §1.2 Codex β-narrow verdict 흡수 (Q0-light + W0.2 cycle 결과)

- **β-narrow PROCEED** (α docs-only stale close REJECT / γ broad close REJECT).
- v8 prompt-pack content abstraction + schema byte-identical + version_registry sync + STEP_MANIFEST schema_version 3 preserve.
- standalone token global ban X (`East Asian`, `인종`, `국적`, `body_pose_canonical`, `character_state` 단독 global ban 금지).
- Future Carry-P021-structured deferred (element_id opaque UUID / element_type enum 확장 등 field-shape migration = v1 scope 외).

## §2 W0.2 inventory 결과 (claude direct read 검증 완료)

### §2.1 Active prompt-pack (`prompts/_base/scene_consistency/7.202605181210/`)

#### §2.1.1 `system.md` (110 line) candidate residue anchors (R1-R6 + JSON sub-anchors)

- **line 11 protective negative wording** (Codex N-1B 흡수, exact wording 정의 = §2.1.1 marker block 안 protective reference; marker block 외부 reference only) = **preserve 권장** (Codex 명시: outline 안 hard-prime 증명 못 하면 R-id 등록 X, standalone token global ban 금지).

**Strict R catalog** (Codex N-5 흡수, marker block 안 exact literals; closed-world test constants reference only; marker block 외부 = R-id reference only):

<!-- HISTORICAL AUDIT TRAIL — BEGIN -->
- **line 11 (non-R protective reference, preserve target)**: `원문이 묘사한 상태만 기록. 장르 편향으로 상처·혈흔을 임의 추가 금지` — protective negative wording, abstraction target X (Codex N-1B 흡수, hard-prime 증명 X 시 preserve).
- **line 13** R1: `예 (rest state): "a young person resting on a sofa, curled on the left side, one arm tucked under the cheek, eyes closed, a light blanket draped over the shoulder"` — hard-prime English prose example, abstraction target.
- **line 14** R2: `예 (specific localized condition described in text): "a figure seated against a wall, head tilted back, eyes closed, a small bandage wrapped around the left wrist" — 원문에 해당 상태가 명시된 경우만` — hard-prime English prose + Korean caveat (exact-match testing 시 whole line membership).
- **line 18** R3: `예: "the left pane of the window is shattered with jagged glass edges remaining in the frame"` — hard-prime English prose, abstraction target.
- **line 22** R4: `예: "a crumpled white bedsheet hanging off the bed edge, touching the floor"` — hard-prime English prose, abstraction target.
- **line 58** R5: `5. **구체적 자세/위치**: "lying down" 같은 모호한 표현 금지 → "lying face-down on the wooden floor, left arm extended forward, right knee slightly bent"` — concrete posture example (W0.2 첫 inventory 누락, Codex correction 흡수).
- **line 61** R6: `8. **인종/국적 명기**: 인물 묘사 시 인종/국적을 반드시 포함` — demographic default instruction (Carry-A100 lineage demonym redesign 정합; "반드시 포함" → "명시된 단서 반영 원칙" abstraction).
- **line 89-110** JSON sub-anchors (minimum 4, optional 2):
  - **JS1**: `description: "an East Asian person lying motionless on the left side, left arm bent near the face, eyes closed"`
  - **JS2a**: `S## action: 'A figure lies motionless on the floor.'` (source_facts split sub-anchor)
  - **JS2b**: `scene heading: NIGHT, small interior room` (source_facts split sub-anchor)
  - **JS3**: `left-side recumbent pose (text only specifies motionless, not orientation)` (visual_inferences sub-anchor)
  - **JS-opt-1**: `body_pose_canonical` (element_id, JSON example 전체 제거 시 optional)
  - **JS-opt-2**: `element_scope='full' to anchor body silhouette across selected shots` (creative_decisions, optional)
<!-- HISTORICAL AUDIT TRAIL — END -->

#### §2.1.2 `schema.json` (76 line) preserve list (description pollution 0 verify)

Preserve (structured SOT, byte-identical 권장):
- `element_type` enum `["character_state", "environment_state", "persistent_prop"]` (line 23)
- `element_scope` enum `["full", "close"]` (line 35)
- `confidence` enum `["high", "medium", "low"]` (line 61)
- `applies_to_shots` minItems 2 (line 41)
- `required` 10 field (line 65-69)
- `additionalProperties false` (line 70)

9 description-only field abstract OK (pollution 0):
- element_id / character_name / description / element_scope / applies_to_shots / source_facts / visual_inferences / creative_decisions / confidence — 모두 closed-world abstract instruction.

### §2.2 Producer code (Area #4 SOT, 변경 0 권장)

- `backend/app/core/steps/scene_consistency_step.py:36-39`: `SCENE_CONSISTENCY_SCHEMA_VERSION = 3` (preserve).
- `:42-48`: Area #4 comment block — element_scope LLM emit SOT, v6 regex+keyword+classifier trio 폐기 anchor (변경 0).
- `:117-128`: enum 직접 read + KeyError = schema violation + AppError fail-fast (Gate 4, 변경 0).

### §2.3 Version registry / step_manifest production wiring

- **W2 안 version_registry.py 3 logical edit split** (Codex N-3 흡수, claude direct read verify 완료):
  - **Site 1** — `backend/app/core/version_registry.py:36` `MODULE_VERSIONS["scene_consistency"]: "2.5.0"` + Area #4 comment: bump `"2.5.0"` → `"2.6.0"` + line 36 comment narrow append (Carry-P021 hard-prime example abstraction).
  - **Site 2** — `version_registry.py:130` `_MODULE_INFO["scene_consistency"]["prompt_dependency"]: "scene_consistency/v7"`: `"scene_consistency/v7"` → `"scene_consistency/v8"`.
  - **Site 3** — `version_registry.py:131` `_MODULE_INFO["scene_consistency"]["updated_at"]: "2026-05-18"`: `"2026-05-18"` → `"2026-05-19"` + optional narrow comment append (Carry-P021 명시).
- `backend/app/core/step_manifest.py:655-661`: scene_consistency entry — **schema_version 3 preserve** (변경 0).

### §2.4 Hardcoded test pin (Carry-A099 lineage 정합 + Codex 정정)

- `backend/tests/unit/test_scene_consistency_schema_v7.py:8-11`: 이미 literal historical pin `7.202605181210` 사용 — **active-to-historical helper 전환 필요 X** (Carry-A099 `_v8_dir()` 변환 패턴과 다름, 이미 historical pin 정합).
- `backend/tests/unit/test_scene_consistency_schema_v6.py`: v6 historical pin 정합 (직접 verify 추가 의무).
- `backend/tests/test_prompt_versions.py`:
  - `:7` `V6_DIR = REPO_ROOT / "prompts" / "_base" / "scene_consistency" / "6.202605031033"` (v6 historical literal pin, 변경 0).
  - `:10` `# Area #4 W1 — scene_consistency v7 (element_scope SOT)` (Area #4 anchor reaffirm).
  - `:11` `SC_BASE = REPO_ROOT / "prompts" / "_base" / "scene_consistency"`.
  - `:14-17` `_scene_consistency_v7_dir()` helper — **active glob resolution, v8 활성화 시 stale wording** (Codex correction).
  - `:34` `test_prompt_v7_active_loader_matches_file` — **W1 rename/reword to historical v7 pack contract** (Codex 권장).
  - `:48, :58` 추가 `_scene_consistency_v7_dir()` 사용 site (W1 영향 mapping).
  - `:67` `test_scene_consistency_v6_system_has_4_fields` (v6 historical, 변경 0).
  - `:72` `test_scene_consistency_v6_system_blocks_legacy_output` (v6 historical, 변경 0).

### §2.5 20+ test files reference scene_consistency (Codex 4 categorize)

Codex 명시 4 category 분류:

1. **Direct prompt/version tests** (W1 영향): `test_prompt_versions.py` (stale `_scene_consistency_v7_dir()` + active v7 test).
2. **Schema historical tests** (변경 0): `tests/unit/test_scene_consistency_schema_v7.py` (literal pin) + `test_scene_consistency_schema_v6.py`.
3. **Manifest/version registry tests** (W2 영향): `tests/test_step_manifest_v3.py` + `test_manifest_fields.py` + `test_step_catalog.py` + `tests/unit/test_g3_2_manifest_dag.py` + `test_sync_v3.py` — version_registry "2.5.0" / "2.6.0" hardcode + schema_version 3 preserve verify.
4. **Unrelated consumers** (변경 0): `tests/unit/test_render_prompt_card.py` / `test_evidence_normalize.py` / `tests/core/test_consumer_verify_completion.py` / `test_scene_detail_analyze_one.py` / `test_scene_analysis_dto.py` / `tests/core/steps/test_scene_consistency_canary_w4.py` / `test_scene_consistency_status.py` / `test_verify_completion.py` / `tests/integration/test_w6_prompt_injection.py` / `test_evidence_consumer_wiring.py` / `tests/services/test_scene_reference_service.py` / `test_area_d_next_shot_dependency_t2i.py`.

각 category 정확 W1-W3 영향 mapping = spec drafting 단계 의무 (본 outline 안 hint only).

**Minimal pytest bundle high-level (Codex N-7 흡수)**:

- **W1 bundle**: `pytest backend/tests/test_prompt_versions.py -v` (primary, helper rename + historical pin) + optional `pytest backend/tests/unit/test_scene_consistency_schema_v7.py -v` if W1 touch indirectly affects (Codex 명시 default = primary only).
- **W2 bundle**: `pytest backend/tests/test_prompt_versions.py backend/tests/test_step_manifest_v3.py backend/tests/test_manifest_fields.py backend/tests/test_step_catalog.py backend/tests/test_sync_v3.py backend/tests/unit/test_g3_2_manifest_dag.py backend/tests/unit/test_scene_consistency_schema_v7.py -v` (prompt/version + manifest/version-registry + v7 schema historical regression).
- **W3 bundle**: 신규 `pytest backend/tests/integration/test_carry_p021_scene_consistency_prompt_abstraction.py -v` (W3 신규 integrated test) + W2 bundle 전체 regression (W3 후 pytest full canary).
- **20+ unrelated consumer (category 4)**: W1-W3 안 enumeration required X (Codex 명시 — 변경 0이라 W1-W3 atomic 안 영향 0 기대). Optional canary = W4 closure 전 `pytest backend/tests -q` (full pass 권장, blocker 발견 시 W4 차단 + 재 amend).

## §3 Q1-Q7 brainstorming questions + tentative answers

### Q1 — Wave plan scope: Option α-lite 4-wave (Codex 권장)

- **Tentative answer**: **Option α-lite 4-wave**.
  - W1 — test-compat / historical wording cleanup only (test_prompt_versions.py `_scene_consistency_v7_dir()` + active v7 test wording rename/reword to historical v7 pack contract; behavioral change 0).
  - W2 — v8 producer prompt-pack + version sync (new `prompts/_base/scene_consistency/8.UTC_TIMESTAMP/` + system.md narrow abstraction + schema.json byte-identical + `version_registry.py` MODULE_VERSIONS bump 2.5.0→2.6.0 + prompt_dependency v7→v8 + updated_at date narrow update + SCHEMA_VERSION 3 preserve + STEP_MANIFEST 3 preserve).
  - W3 — integrated Carry-P021 test (active v8 source-path proof + R-id residue absence + new abstract wording presence + schema sha256 byte-identical + version_registry sync + STEP_MANIFEST preserve + v7 historical canary).
  - W4 — closure docs (spec/plan closure + roadmap/audit/Area #7 references + final pushed range/count external memory only).
- **Rejected**: Option β 3-wave (W1 v8 producer + W2 integrated test + W3 closure docs, W1 안 stale test wording 처리) — Codex 권장 default = α-lite 4-wave, β 3-wave는 outline 안 stale test green-state gap 명시 시만 허용.

### Q2 — Residue catalog R-id exact wording

- **Tentative answer** (Codex N-5 흡수: single marker-wrapped table = §2.1.1, 본 §3 Q2 안 R-id reference only — exact wording marker block 외부 재방출 금지):
  - **R catalog 10 strict R-id + 2 optional** (Codex N-5 정정 흡수): R1 / R2 / R3 / R4 / R5 / R6 / JS1 / JS2a / JS2b / JS3 = 10 strict — exact wording 정의 = §2.1.1 marker block 안 (Strict R catalog HISTORICAL AUDIT TRAIL block).
  - **Optional 2 R-id**: JS-opt-1 / JS-opt-2 — 정의 = §2.1.1 marker block 안 (Option A pin 후 JSON example block 전체 제거 시 optional, abstract schema skeleton 변환 시 X).
  - **R1-R4**: system.md:13/14/18/22 hard-prime English prose example (rest state / localized bandage / shattered-window / bedsheet), W2 abstract principle-only wording substitute target.
  - **R5**: system.md:58 concrete posture example, abstract principle 흡수 wording substitute target.
  - **R6**: system.md:61 demographic default instruction, Carry-A100 lineage demonym redesign 정합 abstraction wording substitute target.
  - **JS1/JS2a/JS2b/JS3**: JSON example block (system.md:89-110) sub-anchors, Option A pin 시 block 전체 제거 + abstract schema skeleton 변환.

- **Preserve (R-id 등록 X)**:
  - line 11 protective negative wording reference (exact wording = §2.1.1 marker block 안 protective reference; outline 안 hard-prime 증명 X, Codex 명시 preserve).
  - 다른 분석 원칙 1-10 안 abstract guidance (예: line 54 "2+ 샷 공통만", line 56 "영어로 작성") — preserve.

### Q3 — v8 prompt-pack dir name + UTC + abstraction wording 원칙

- **Tentative answer**:
  - **Dir**: `prompts/_base/scene_consistency/8.UTC_TIMESTAMP/` (UTC_TIMESTAMP = W2 commit 직전 정확 `YYYYMMDDHHmm` resolved at shell time; spec/plan/test 본문 안 prose-style 표기는 `UTC_TIMESTAMP` placeholder 유지, shell command 안 `${UTC}` 또는 resolved literal 사용). **Placeholder doctrine** (Carry-A100 N-2 + post Carry-D7d-1 흡수): literal angle-bracket placeholder forms (예: angle-bracketed UTC design-time form, angle-bracketed W2 commit hash design-time form) 은 formal `<!-- HISTORICAL AUDIT TRAIL — BEGIN/END -->` marker block 외부 사용 금지. 본 outline 안 prose-style placeholder = `UTC_TIMESTAMP` / `W2_COMMIT` (underscore form) only.
  - **system.md abstraction principle** (Carry-A099/A100 lineage):
    - R1-R5 hard-prime English prose 제거 → abstract principle-only wording (예: "예 (rest state)" 블록 전체 제거 + line 5 (원문 묘사 상태) 안 generic abstract clause로 흡수: "원문에 명시된 inactive/restful pose는 구체 자세/팔다리 위치/시선 상태 그대로 기록").
    - R6 line 61 abstraction (Codex N-9 흡수, exact wording = §2.1.1 marker block 안 정의; marker block 외부 R-id reference only): R6 demographic-default instruction → "**시각적 인구학 단서 반영**" principle-only clause (Carry-A100 lineage demonym redesign 정합 — 시나리오 또는 인물별 outlook/character evidence에 명시된 인구학 단서는 element description에 반영, 명시되지 않은 인물에 default 인구학 표기 강제 X 원칙).
    - JSON example block 처리 = **Option A pin** (Codex N-6 흡수, Carry-A099 director_notes prose redesign 정합 default for spec v1): JSON example 전체 제거 + abstract schema skeleton 변환 (placeholder-free abstract labels, demographic/default posture prose 0). Option B (partial phrase substitution inside JS1 — specific JS1 demographic/posture fragment를 generic placeholder로 교체) = **rejected** (Codex N-9 흡수, exact JS1 fragment = §2.1.1 marker block 안 정의; hard-prime partial 잔존 + JSON example 자체가 hard-prime example이라 partial substitution 안 safe).
  - line 11 (protective negative) preserve, 분석 원칙 1-10 abstract guidance preserve, "고정 요소 유형" 1-3 section preserve.

### Q4 — Schema.json byte-identical preserve

- **Tentative answer**: **byte-identical copy** from v7 (description pollution 0 verify 완료; structured SOT field 변경 0). Codex 명시 정합.
- Schema sha256 byte-identical canary = W3 integrated test 안 verify gate.

### Q5 — STEP_MANIFEST schema_version + version_registry sync

- **Tentative answer**:
  - STEP_MANIFEST schema_version 3 **preserve** (`scene_consistency_step.py:36-39` SCHEMA_VERSION 3 정합, content-only example abstraction = field-shape migration 아님).
  - `version_registry.py:36` Site 1 — MODULE_VERSIONS bump `"2.5.0"` → `"2.6.0"` (narrow semver minor bump, content-only example abstraction = backward-compat) + line 36 comment narrow append (Carry-P021 hard-prime example abstraction 명시).
  - `version_registry.py:130` Site 2 — `_MODULE_INFO["scene_consistency"]["prompt_dependency"]: "scene_consistency/v7"` → `"scene_consistency/v8"` sync.
  - `version_registry.py:131` Site 3 — `_MODULE_INFO["scene_consistency"]["updated_at"]: "2026-05-18"` → `"2026-05-19"` + optional comment narrow append (Carry-P021 명시).

### Q6 — Test compat strategy

- **Tentative answer**:
  - `tests/unit/test_scene_consistency_schema_v7.py`: 이미 literal historical pin (line 10 `"7.202605181210"`), **변경 0** (Carry-A099 `_v8_dir()` 변환 패턴과 다름).
  - `tests/test_prompt_versions.py`:
    - `_scene_consistency_v7_dir()` helper (line 14-17 glob resolution) → **W1 rename → `_scene_consistency_v7_historical_dir()`** + literal pin `REPO_ROOT / "prompts" / "_base" / "scene_consistency" / "7.202605181210"` (Carry-A099 lineage 정합).
    - `test_prompt_v7_active_loader_matches_file` (line 34) → **W1 rename → `test_prompt_v7_historical_loader_anchor`** + body refactor (active loader proof → historical anchor proof).
    - `:48`/`:58` 추가 사용 site → 동일 helper rename 흡수.
  - `tests/unit/test_scene_consistency_schema_v6.py`: 변경 0 (v6 historical pin 정합).
  - W2 안 추가 W2 안 active v8 source-path proof test = W3 integrated test 안 별도 (스택 increment, v7 historical canary 분리).

### Q7 — Integrated test gate set (W3 Carry-P021 integrated test)

- **Tentative answer (7 Gate, Carry-A099/A100 lineage 정합 marker-wrapped)**:
  - **G1**: Active v8 source-path proof (Codex N-2 정정 흡수, Carry-A099/A100 N-3 lesson 정합) — `from app.modules.prompt_loader import get_effective_source` → `get_effective_source("scene_consistency", "system", db=None)` 결과 file candidate 의 version dir name `8.` prefix start + path 안 `/scene_consistency/8.` substring. schema stem-specific 추가 = `v8_dir / "schema.json"` file existence + path 안 `/scene_consistency/8.` substring. `prompt_loader.load_prompt` (prompt text 반환) ≠ source-path proof, `get_active_version` (module-level active-version) ≠ schema stem source-path proof — 본 G1 안 둘 다 사용 금지.
  - **G2**: v8 file count 2 (`system.md` + `schema.json`).
  - **G3**: R-id residue absence — marker-wrapped `STRICT_RESIDUES` catalog (R1-R6 + JS1 + JS2a + JS2b + JS3 = 10 strict ids; Codex N-6 정정 흡수 — `R1_R6_STRICT + JS1_JS3_STRICT` ambiguous naming 제거 + single `STRICT_RESIDUES` constant) substring membership in v8 system.md = 0 hit (closed-world full-phrase membership only, str.__contains__ / rg -F).
  - **G4**: New abstract wording presence — "시각적 인구학 단서 반영" Korean lead clause (R6 abstraction) + "원문에 명시된 inactive/restful pose는 구체 자세" Korean clause (R1-R5 abstraction) 각각 1 hit (full-phrase membership).
  - **G5**: Schema sha256 byte-identical canary — v8 `schema.json` sha256 == v7 `schema.json` sha256 (preserve verify).
  - **G6**: version_registry 3 logical edit sync + STEP_MANIFEST preserve (Codex N-10 흡수 — Site 3 updated_at verify 추가) — `MODULE_VERSIONS["scene_consistency"] == "2.6.0"` (Site 1) + `_MODULE_INFO["scene_consistency"]["prompt_dependency"] == "scene_consistency/v8"` (Site 2) + `_MODULE_INFO["scene_consistency"]["updated_at"] == "2026-05-19"` (Site 3) + `STEP_MANIFEST["scene_consistency"].schema_version == 3` + `SCENE_CONSISTENCY_SCHEMA_VERSION == 3`.
  - **G7**: v7 historical canary — `prompts/_base/scene_consistency/7.202605181210/` 디렉토리 존재 + v7 historical schema.json sha256 = anchor pin (Carry-A099 lineage 정합).
- **Test 안 LLM/VLM 의존 0**: jsonschema validate + str.__contains__ + sha256 + path glob only (Carry-A099/A100 lineage 정합).

## §4 Out-of-scope (v1 boundary 명시)

- **Field-shape migration** (element_id opaque snake_case → opaque UUID, element_type enum 확장, element_scope enum 확장 등) — Future Carry-P021-structured deferred.
- **Producer code 재작성** (`scene_consistency_step.py` 변경) — v1 scope 외 (Codex 명시: hard blocker 시만 별도 의논).
- **20+ test file 대규모 rewrite** — Codex 4 category 안 unrelated consumers (≥12 files) 변경 0.
- **`element_type` enum 3 entry 확장** (예: `lighting_state` 추가) — Future migration.
- **`element_scope` enum 3 entry 확장** (예: `partial` 추가) — Future migration.
- **JSON example 안 entity ID convention 변경** (`C##` → opaque UUID 등) — Future Carry-P021-structured.
- **`applies_to_shots` schema 변경** (minItems:2 변경 등) — preserve.
- **schema description pollution scan 결과 0** (W0.2 verify) → schema 변경 0.
- **Area #4 boundary** (`scene_consistency_step.py:36-48` comment anchor, schema_version 3, element_scope enum SOT) 변경 0.

## §5 Open questions / risks (spec drafting 안 해소 의무)

- **OQ-1 (resolved by Codex N-6 outline review)**: JSON example block 처리 = **Option A pin** (전체 제거 + abstract schema skeleton 변환, placeholder-free abstract labels). Option B rejected (specific phrase abstract substitute = hard-prime partial 잔존 risk). Carry-A099 director_notes prose redesign lineage 정합. spec drafting 시 Option A 만 사용, 추가 검토 X.
- **OQ-2**: R5 anchor 정확 substring boundary — system.md:58 line 전체 (`5. **구체적 자세/위치**: ...`) vs prose-only (`"lying face-down on the wooden floor, left arm extended forward, right knee slightly bent"`). exact-match testing 시 boundary 결정 의무.
- **OQ-3**: R6 line 61 abstraction wording 정확 (Carry-A100 lineage `outlook/character evidence` 정합 정확 substring boundary).
- **OQ-4 (resolved by Codex N-11 amend 2 re-review)**: version_registry MODULE_VERSIONS bump = **`2.6.0` pin default for outline/spec v1** (narrow minor bump, content-only example abstraction = backward-compat). `2.5.1` (patch) = historical rejected alternative (spec drafting 시 repo convention explicit override 발견 시만 재검토, default 아님).
- **OQ-5**: STEP_MANIFEST scene_consistency entry full body (`step_manifest.py:655-661`) 안 추가 sync site (description / display_name / labels 등) verify 의무 = spec drafting 안 의무.
- **OQ-6**: `test_prompt_versions.py:48, :58` 안 `_scene_consistency_v7_dir()` 추가 사용 site 정확 test 이름 + body refactor scope 의무 = spec drafting 안 의무.
- **OQ-7**: Codex β-narrow verdict 안 인용 "Area #4 spec §1.5/§2.3/§3.2/§7.1/§10.2" — Area #4 spec file 정확 경로 (claude direct read X, Codex 응답 인용 only). spec drafting 안 (C) verify 의무 (또는 Codex 의논 시 (B) 인용 명시 의무).
- **Risk R1**: 20+ test impact mapping 안 누락 시 v8 activation 후 silent test failure. mitigation = W3 integrated test 안 + pre-commit pytest full pass canary.
- **Risk R2**: line 11 protective negative wording (exact wording = §2.1.1 marker block 안 non-R protective reference; Codex N-9 흡수 marker 외부 reference only) abstraction 시 protective intent 손실. mitigation = preserve default + outline 안 hard-prime 증명 X 시 R-id 등록 X.
- **Risk R3**: line 61 demographic abstraction 시 producer LLM이 시각적 인구학 단서 emit 누락 → downstream T2I 시각화 품질 손실. mitigation = Carry-A100 lineage abstraction wording (명시된 단서 반영 원칙) 정합.
- **Risk R4**: schema.json description 안 abstract instruction pollution scan 결과 0이지만 v8 활성화 후 silent pollution 발견 시 schema bump 필요 → carrier shape 변경 (Area #4 boundary 위반). mitigation = W3 integrated test 안 schema sha256 byte-identical canary + STEP_MANIFEST schema_version=3 preserve canary.

## §6 Wave plan tentative (Option α-lite 4-wave)

### W1 — test-compat / historical wording cleanup atomic

- **Scope**: `backend/tests/test_prompt_versions.py` 만 (Codex 권장 1 file scope).
- **Modify**:
  - `_scene_consistency_v7_dir()` → `_scene_consistency_v7_historical_dir()` (helper rename, literal pin `REPO_ROOT / "prompts" / "_base" / "scene_consistency" / "7.202605181210"`).
  - `test_prompt_v7_active_loader_matches_file` → `test_prompt_v7_historical_loader_anchor` (test rename + docstring rewording from active to historical v7 pack contract). **Body refactor scope narrowed (Codex N-4 흡수)**: helper rename + literal-pin `7.202605181210` 만 적용, **existing assertions (element_scope presence + 옛 v6 closed-list signature absence) 변경 0**. sha256 byte-identical anchor canary 추가 X (W1 = behavioral change 0, sha256 canary는 W3 G5 안 보존).
  - line 10 comment `# Area #4 W1 — scene_consistency v7 (element_scope SOT)` → preserve (Area #4 anchor reaffirm) or narrow append `# (Carry-P021 W1 historical pin)`.
  - line 48 + 58 `_scene_consistency_v7_dir()` 사용 site → `_scene_consistency_v7_historical_dir()` rename 흡수.
- **Out-of-scope**: v6 historical (line 7 + 67 + 72) 변경 0.
- **Test**: W1 commit 후 `pytest backend/tests/test_prompt_versions.py -v` PASS canary.
- **Gate**: behavioral change 0 (W1 verify scope = helper rename / literal pin substitution / existing assertions (element_scope presence + 옛 v6 closed-list signature absence) preserve only; **sha256 verify X** in W1, sha256 byte-identical canary는 W3 G5 안 보존 (Codex N-4 정정 + N-4 residue 흡수)).

### W2 — v8 producer prompt-pack + version_registry sync atomic

- **Scope**: 2 file new + 1 file modify (Codex N-7 정정 흡수: v8 prompt-pack 안 system.md + schema.json = 2 new; version_registry.py = 1 modify; version_registry 안 3 logical edits = 별도 phrase, file count 아님).
- **New**:
  - `prompts/_base/scene_consistency/8.UTC_TIMESTAMP/system.md` (v7 copy + R1-R6 + JS1/JS2a/JS2b/JS3 narrow abstraction, abstract principle-only wording, line 11 protective preserve, JSON example block 처리 = **Option A pin** (Codex N-6 흡수, OQ-1 default decision) 전체 제거 + abstract schema skeleton 변환).
  - `prompts/_base/scene_consistency/8.UTC_TIMESTAMP/schema.json` (v7 byte-identical copy, sha256 = v7 sha256 anchor; W3 G5 안 verify gate).
- **Modify**:
  - `backend/app/core/version_registry.py:36` Site 1 — MODULE_VERSIONS `"2.5.0"` → `"2.6.0"` + line 36 comment narrow append (Carry-P021 hard-prime example abstraction).
  - `version_registry.py:130` Site 2 — `_MODULE_INFO["scene_consistency"]["prompt_dependency"]: "scene_consistency/v7"` → `"scene_consistency/v8"`.
  - `version_registry.py:131` Site 3 — `_MODULE_INFO["scene_consistency"]["updated_at"]: "2026-05-18"` → `"2026-05-19"` + optional comment narrow append (Carry-P021 명시).
- **Out-of-scope**: `scene_consistency_step.py` 변경 0, `step_manifest.py` 변경 0 (schema_version 3 preserve).
- **Test**: W2 commit 후 `pytest backend/tests/test_prompt_versions.py backend/tests/unit/test_scene_consistency_schema_v7.py -v` PASS canary + `pytest backend/tests/test_step_manifest_v3.py backend/tests/test_manifest_fields.py backend/tests/test_step_catalog.py -v` PASS canary.
- **Gate**: prompt-pack 2 file 신규 + version_registry 3 logical edit (Codex N-3 정정 흡수: Site 1 MODULE_VERSIONS bump + Site 2 prompt_dependency + Site 3 updated_at) + schema.json sha256 byte-identical + STEP_MANIFEST schema_version=3 preserve + Area #4 boundary 변경 0.

### W3 — Carry-P021 integrated test atomic

- **Scope**: 1 file new.
- **New**: `backend/tests/integration/test_carry_p021_scene_consistency_prompt_abstraction.py` — 7 Gate G1-G7 (§3 Q7).
- **Test 안 LLM/VLM 의존 0**: jsonschema + str.__contains__ + sha256 + path glob only.
- **marker-wrapped R-id catalog**: `STRICT_RESIDUES` constant (Codex N-6 정정 흡수, single constant 안 10 strict ids R1-R6 + JS1/JS2a/JS2b/JS3 모두 포함; 옛 ambiguous `R1_R6_STRICT + JS1_JS3_STRICT` 분리 명명 폐기) `<!-- HISTORICAL AUDIT TRAIL — BEGIN/END -->` marker wrap (Carry-A100 N-2 marker-aware doctrine 정합).
- **Out-of-scope**: production code 변경 0.
- **Gate**: pytest 7 Gate PASS + 본 test 외 영향 0 (W2 후 full pytest PASS canary).

### W4 — closure docs atomic

- **Scope**: path-limited 6-7 repo-local docs (Carry-A099/A100 lineage 정합).
- **Modify**:
  - Carry-P021 spec frontmatter status closed + spec §N closure section + plan frontmatter status closed + plan §N closure marker.
  - `docs/visual-reliability-audit/.../02-prompt-side-hygiene-audit.md`:
    - line 317 summary table row Status column 추가 (`Status: closed by Carry-P021 (2026-05-19+)`).
    - line 382/437 Area #7b/#7c closure carry-list bullet narrow update.
    - line 475 carry priority bullet Status 추가.
    - 본 audit 안 신규 §N Carry-P021 Closure section (Carry-A099/A100 lineage 정합).
  - Roadmap §5.7 Sub-area 안 Carry-P021 closure bullet narrow append (most-current carry-follow-up section only, Carry-A099/A100 lineage 정합).
- **Out-of-scope**: 8 direct reader code + producer code + v7/v8 prompt-pack 변경 0.
- **No W4 self-hash literal**: TEMPLATE ONLY doctrine 정합 (Carry-A099/A100 lineage).
- **Final pushed range/count**: external memory only after Codex APPROVED_FOR_PUSH (TEMPLATE ONLY 정합).

## §7 Doctrine check 

- **NO VLM hard constraint** ✓ ([[feedback_no_vlm_dependency]] 정합)
- **No live LLM in tests** ✓ (closed-world residue + jsonschema validate only)
- **Closed-world exact full-phrase membership** ✓ (R1-R6 + JS1/JS2a/JS2b/JS3 exact substring membership, no semantic regex, standalone token global ban X)
- **Standalone token global ban X** ✓ (`East Asian` / `body_pose_canonical` / `character_state` / `인종` / `국적` / `상처` / `혈흔` 단독 global ban 금지)
- **TEMPLATE/HISTORICAL marker doctrine** ✓ (R-id catalog spec/plan/test constants marker block wrap)
- **Field-shape migration deferred** ✓ (Future Carry-P021-structured)
- **4-Gate Boundary Doctrine** ([[feedback_llm_based_judgment]] 정합):
  - Gate 1 Semantic Regex Ban ✓ (W3 test substring membership only)
  - Gate 2 Prompt Closed-List Ban (full-phrase ban only, standalone exempt) ✓
  - Gate 3 Structured SOT Required ✓ (schema preserve, Area #4 element_scope enum SOT 보존)
  - Gate 4 No Silent Fallback ✓ (producer code KeyError + AppError fail-fast 보존)
- **Codex MCP discussion workflow** ✓ ([[feedback_codex_mcp_discussion_workflow]] — Q0-light + W0.2 + outline review + spec/plan/W1-W4 per-wave + range review)
- **4채널 fact source 명시** ✓ ([[feedback_channel_separation_4way]] — 본 outline 안 (C) direct read fact + (B) Codex 응답 인용 명시 구분)

## §8 Session health + next step

- Context use 본 outline amend 1 narrow + amend 2 narrow 후 ~45-50% (Codex N-8 정정 흡수: Q0-light 1 + W0.2 2 + outline draft 3 + amend 1 review 4 + amend 2 re-review 5).
- 50%+ threshold **근접 / 도달 임박** — 본 outline amend 2 narrow 재review APPROVED 시 즉시 session-health 재check 의무 ([[feedback_session_50pct_codex_close_check]] 정합).
- Codex MCP round 5 진행 중 (Q0-light 1 + W0.2 2 + outline review 3 + amend 1 re-review 4 + amend 2 re-review 5).
- **Next step**: amend 2 narrow Codex 재review APPROVED → session-health 재check → 50%+ 도달 시 `CLOSE_HANDOFF_SPEC_FRESH` 권장 (Codex 명시), 미도달 시 본 session 안 spec v1 drafting 진입.
- **본 session 안 진행 vs handoff**: amend 2 narrow APPROVED_FOR_SPEC_V1_DRAFT 후 Codex post-approval session-health 재check 의무 (Codex 명시: "after revised outline approval, Codex should re-check session health before spec drafting").
