---
title: Area #7c — t2i_review v6 placeholder example abstraction (Track B Tier 3 #3, v1) — Implementation Plan
date: 2026-05-19
status: drafting
spec_ref: docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md (commit `1032dbc`, Codex iter 5 APPROVED_FOR_PLAN)
prerequisites:
  - Spec Area #7c v1 (commit `1032dbc`, Codex iter 5 APPROVED_FOR_PLAN).
  - Hygiene v1 (closed 2026-05-15, commit `91d1dfd`).
  - Area #6 (T2I Review Mutation Redesign, closed 2026-05-18+) — boundary preserved.
  - Area #7a (VWR SOT v1, push `d0410eb`) — boundary preserved.
  - Area #7b (VWR Downstream Cascade v1, push `e751e72`) — boundary preserved.
---

# Area #7c — t2i_review v6 placeholder example abstraction (v1) — Implementation Plan

## 1. Purpose + Wave Overview

본 plan = Area #7c spec v1 (`1032dbc`, 193 line) implementation 의 W1/W2/W3 atomic wave 실행 명세. spec §2 catalog 8 site replacement (7 strict residue + 1 keep-abstract) + spec §5 W2 integrated test 4 verify gate + spec §8 wave structure + spec §7 TEMPLATE ONLY doctrine 정합.

### 1.1 Wave Summary Table

| Wave | Purpose | Atomic commit | Path-limited scope | Codex review |
|---|---|---|---|---|
| W1 | Producer atomic (new v7 dir + 4 file) | 1 commit | `prompts/_base/t2i_review/7.*/` | W1 per-wave APPROVED |
| W2 | Integrated test wave (4 verify gate) | 1 commit | `backend/tests/integration/test_area_7c_*.py` | W2 per-wave APPROVED |
| W3 | Closure docs atomic (3 file, 1 audit 안 2 site) | 1 commit | 3 explicit doc paths | W3 per-wave + W1-W3 range review → APPROVED_FOR_PUSH |

### 1.2 Preflight Checklist (W0 inline)

- venv: `backend/.venv/bin/python` / `backend/.venv/bin/pytest` (absolute path).
- Spec commit anchor: `1032dbc` (HEAD).
- Working tree clean (untracked artifacts unstaged per path-limited git add doctrine).
- UTC timestamp resolution at execution time: `date -u +%Y%m%d%H%M` → `7.YYYYMMDDHHmm` dir name.
- Codex MCP pane `%0` (gpt-5.5 xhigh) idle, ready for per-wave review.
- NO VLM hard constraint inline (image-side VLM 의존 X).
- 4-Gate Boundary Doctrine inline (Semantic Regex Ban / Prompt Closed-List Ban / Structured SOT Required / No Silent Fallback).

## 2. Plan Iter Trace

- iter 0 (본 plan session, strategy): **APPROVED_FOR_PLAN_V1_DRAFT** (Codex 8 narrow guidance — plan path OK / §1-§10 structure / W0 inline / concise-but-complete detail level / W2 real Python code block / W3 TEMPLATE ONLY marker / Pre-Commit Verification per-wave / 300-450 line OK / iter 1 post-commit full review / 8 vs 7 distinction guard).
- iter 1 (예정 post-commit): plan v1 full quality review.
- iter 2+ (예정 narrow): amend cycle if needed.
- iter N: **APPROVED_FOR_EXECUTION** → W1 entry session health 재평가 (Codex Q0-light Q2 verdict 정합).

## 3. W1 — Producer Atomic Wave

### 3.1 Action

새 dir `prompts/_base/t2i_review/7.<UTC-timestamp>/` 생성 + 4 file write (2 prompt modified + 2 schema sibling byte-identical from v6).

### 3.2 File Creation Specification

| New file (under `prompts/_base/t2i_review/7.<UTC>/`) | Source | Action |
|---|---|---|
| `scene_system.md` | v6 `6.202605181200/scene_system.md` + §3.3 replacement | new file with 5 strict residue + 1 keep-abstract replacement applied |
| `scene_schema.json` | v6 byte-identical copy | new file (sha256 match) |
| `entity_system.md` | v6 + §3.3 replacement | new file with 2 strict residue replacement applied |
| `entity_schema.json` | v6 byte-identical copy | new file (sha256 match) |

### 3.3 Replacement Edit Table

**Critical**: replacement surface = **8 lines/sites**, strict residue catalog = **7 exact phrase** (scene 60-61 = **not strict residue target**, keep concept).

| file:line | replacement surface | legacy phrase (v6) | required abstract wording (Codex iter 2 verbatim) | residue gate? |
|---|---|---|---|---|
| `scene_system.md:31` | body-part cue | `<frame-edge surface> visible behind subject's hands` | `<frame-edge surface> visible behind <subject-frame-edge contact cue>` 또는 `<frame-edge surface> visible behind <subject body part / extended limb at frame edge>` | **strict residue** (legacy: `subject's hands`) |
| `scene_system.md:32` | body-part cue | `feet visible at lower frame edge with floor below` | `<lower-frame subject cue> visible at lower frame edge with <support surface> below` | **strict residue** (legacy: `feet visible at lower frame edge with floor below`) |
| `scene_system.md:33` | body-part cue | `full silhouette including head and feet visible` | `entire subject silhouette visible despite close/side camera height` | **strict residue** (legacy: `full silhouette including head and feet visible`) |
| `scene_system.md:39` | action cue | `Figure B sits hunched in the left background.` | `Figure B has <background posture cue> in the left background.` | **strict residue** (legacy: `sits hunched in the left background`) |
| `scene_system.md:40` | action+object cue | `A hand reaching from the right edge holding a small object. Another figure visible in the rear background.` | `<foreground interaction cue> enters from the right edge holding <small prop>. Another figure visible in the rear background.` | **strict residue** (legacy: `a hand reaching from the right edge holding a small object`) |
| `scene_system.md:60-61` | hint_diagnostic illustration | (이미 abstract; v6 `frame-edge surface 가 카메라 vertical 위치와 모순` / `lower-frame-edge 묘사`) | keep concept; if touched: `frame-edge element` / `camera vertical 과 일관된 frame-edge anchor 묘사` | **not strict residue target** |
| `entity_system.md:33` | role cue | `보통명사 인물 'security guard' 에 국적/인종 누락` | `보통명사 인물 '<common-noun character role>' 에 required demographic descriptor 누락` | **strict residue** (legacy: `'security guard'`) |
| `entity_system.md:34` | demonym cue | `Asian / Korean 인종 형용사 추가` | `story/world evidence에 맞는 <required demographic descriptor> 추가` | **strict residue** (legacy: `Asian / Korean 인종 형용사`) |

### 3.4 Pre-Commit Verification (W1, 8 check)

**(a) UTC timestamp resolution + dir name**:
```bash
UTC=$(date -u +%Y%m%d%H%M)
NEW_DIR="prompts/_base/t2i_review/7.${UTC}"
test -d "$NEW_DIR" && echo "OK new dir: $NEW_DIR"
```

**(b) 4 new file count**:
```bash
ls "$NEW_DIR" | wc -l  # Expected: 4
```

**(c) Schema sibling sha256 byte-identical (2 file v6 → v7)**:
```bash
V6="prompts/_base/t2i_review/6.202605181200"
for fname in scene_schema.json entity_schema.json; do
  s6=$(sha256sum "$V6/$fname" | cut -d' ' -f1)
  s7=$(sha256sum "$NEW_DIR/$fname" | cut -d' ' -f1)
  [ "$s6" = "$s7" ] && echo "OK sha256 match: $fname" || { echo "DRIFT: $fname"; exit 1; }
done
```

**(d) Replacement applied (7 strict residue 8 site → 새 abstract phrase substring presence)**:
```bash
grep -c "subject-frame-edge contact cue\|subject body part / extended limb" "$NEW_DIR/scene_system.md"  # >= 1
grep -c "lower-frame subject cue" "$NEW_DIR/scene_system.md"  # >= 1
grep -c "entire subject silhouette visible despite" "$NEW_DIR/scene_system.md"  # >= 1
grep -c "background posture cue" "$NEW_DIR/scene_system.md"  # >= 1
grep -c "foreground interaction cue" "$NEW_DIR/scene_system.md"  # >= 1
grep -c "common-noun character role" "$NEW_DIR/entity_system.md"  # >= 1
grep -c "required demographic descriptor" "$NEW_DIR/entity_system.md"  # >= 1
```

**(e) Legacy phrase absence (7 strict residue exact phrase 0 count in new dir)**:
```bash
grep -c "subject's hands" "$NEW_DIR/scene_system.md"  # 0
grep -c "feet visible at lower frame edge with floor below" "$NEW_DIR/scene_system.md"  # 0
grep -c "full silhouette including head and feet visible" "$NEW_DIR/scene_system.md"  # 0
grep -c "sits hunched in the left background" "$NEW_DIR/scene_system.md"  # 0
grep -c "a hand reaching from the right edge holding a small object" "$NEW_DIR/scene_system.md"  # 0
grep -c "'security guard'" "$NEW_DIR/entity_system.md"  # 0
grep -c "Asian / Korean 인종 형용사" "$NEW_DIR/entity_system.md"  # 0
```

**(f) load_prompt/load_schema latest v7 smoke (4 stem)**:
```bash
cd backend && .venv/bin/python -c "
from app.modules.prompt_loader import load_prompt, load_schema
load_prompt('t2i_review', 'scene_system')
load_schema('t2i_review', 'scene_schema')
load_prompt('t2i_review', 'entity_system')
load_schema('t2i_review', 'entity_schema')
print('OK 4 stem v7 resolved')
"
```

**(g) STEP_MANIFEST schema_version preservation**:
```bash
cd backend && .venv/bin/python -c "
from app.core.step_manifest import STEP_MANIFEST
entry = STEP_MANIFEST['t2i_review']
sv = getattr(entry, 'schema_version', None) or (entry.get('schema_version') if isinstance(entry, dict) else None)
assert sv == 1, f'schema_version drift: {sv}'
print('OK STEP_MANIFEST[t2i_review].schema_version == 1')
"
```

**(h) Codex W1 per-wave APPROVED 의무** (entry sanity + per-wave + session health 3 모드).

### 3.5 Path-Limited Git Add Scope

```bash
git add prompts/_base/t2i_review/7.*/
git status --short  # Expected: 4 new file under 7.<UTC>/
```

### 3.6 Commit Message Convention

```
prompts(area-7c-t2i-review-placeholder-hygiene-v1): W1 producer atomic — 7.<UTC>/ new dir + 4 file (2 prompt modified + 2 schema byte-identical) + 7 strict residue + 1 keep-abstract = 8 site replacement (spec §2 Codex iter 2 verbatim)
```

## 4. W2 — Integrated Test Atomic Wave

### 4.1 Test File Path

`backend/tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py` (Codex iter 0 권고 — prior area integration gate pattern 정합 `test_area_7a_*` 등).

### 4.2 Test Body Inline

```python
"""
Area #7c — t2i_review v6 placeholder example abstraction W2 integrated test wave.

4 verify gate (closed-world, no live LLM, NO VLM):
(a) Residue gate — 7 strict exact legacy phrase 0 count in new v7 dir.
(b) Schema sibling identity — 2 schema file v6 → v7 sha256 byte-identical.
(c) load_prompt / load_schema latest v7 activation — 4 stem.
(d) STEP_MANIFEST["t2i_review"].schema_version == 1 preservation.
"""

from __future__ import annotations

import hashlib
from pathlib import Path

import pytest

from app.modules.prompt_loader import load_prompt, load_schema
from app.core.step_manifest import STEP_MANIFEST


T2I_REVIEW_PROMPT_BASE = Path(__file__).resolve().parents[3] / "prompts" / "_base" / "t2i_review"
V6_DIR_NAME = "6.202605181200"


def _latest_v7_dir() -> Path:
    candidates = sorted(
        p for p in T2I_REVIEW_PROMPT_BASE.iterdir()
        if p.is_dir() and p.name.startswith("7.")
    )
    assert candidates, "no v7 t2i_review dir found under prompts/_base/t2i_review"
    return candidates[-1]


# ----------------------------------------------------------------------------
# Gate (a) — Residue gate: 7 strict exact legacy phrase 0 count in v7 dir.
# ----------------------------------------------------------------------------

STRICT_RESIDUE_SCENE: list[str] = [
    "subject's hands",
    "feet visible at lower frame edge with floor below",
    "full silhouette including head and feet visible",
    "sits hunched in the left background",
    "a hand reaching from the right edge holding a small object",
]

STRICT_RESIDUE_ENTITY: list[str] = [
    "'security guard'",
    "Asian / Korean 인종 형용사",
]


def test_residue_gate_scene_strict_phrase_absent():
    """scene_system.md v7 안 5 strict scene phrase substring 0 count."""
    v7 = _latest_v7_dir()
    content = (v7 / "scene_system.md").read_text(encoding="utf-8")
    for phrase in STRICT_RESIDUE_SCENE:
        assert phrase not in content, (
            f"strict residue scene phrase remains in v7 scene_system.md: {phrase!r}"
        )


def test_residue_gate_entity_strict_phrase_absent():
    """entity_system.md v7 안 2 strict entity phrase substring 0 count."""
    v7 = _latest_v7_dir()
    content = (v7 / "entity_system.md").read_text(encoding="utf-8")
    for phrase in STRICT_RESIDUE_ENTITY:
        assert phrase not in content, (
            f"strict residue entity phrase remains in v7 entity_system.md: {phrase!r}"
        )


def test_residue_gate_total_count():
    """7 strict residue catalog count = 5 scene + 2 entity (closed-world membership)."""
    assert len(STRICT_RESIDUE_SCENE) == 5
    assert len(STRICT_RESIDUE_ENTITY) == 2
    assert len(STRICT_RESIDUE_SCENE) + len(STRICT_RESIDUE_ENTITY) == 7


# ----------------------------------------------------------------------------
# Gate (b) — Schema sibling identity: 2 file v6 → v7 sha256 byte-identical.
# ----------------------------------------------------------------------------

def _sha256_file(path: Path) -> str:
    return hashlib.sha256(path.read_bytes()).hexdigest()


def test_schema_sibling_scene_byte_identical():
    """scene_schema.json v6 = v7 sha256 byte-identical."""
    v6 = T2I_REVIEW_PROMPT_BASE / V6_DIR_NAME / "scene_schema.json"
    v7 = _latest_v7_dir() / "scene_schema.json"
    assert _sha256_file(v6) == _sha256_file(v7), (
        "scene_schema.json sha256 drift v6→v7 (Area #7c content-only contract)"
    )


def test_schema_sibling_entity_byte_identical():
    """entity_schema.json v6 = v7 sha256 byte-identical."""
    v6 = T2I_REVIEW_PROMPT_BASE / V6_DIR_NAME / "entity_schema.json"
    v7 = _latest_v7_dir() / "entity_schema.json"
    assert _sha256_file(v6) == _sha256_file(v7), (
        "entity_schema.json sha256 drift v6→v7 (Area #7c content-only contract)"
    )


# ----------------------------------------------------------------------------
# Gate (c) — load_prompt / load_schema latest v7 activation: 4 stem.
# ----------------------------------------------------------------------------

def test_load_prompt_scene_system_resolves_v7():
    """load_prompt('t2i_review', 'scene_system') resolves to v7 content."""
    content = load_prompt("t2i_review", "scene_system")
    assert content, "load_prompt scene_system returned empty"
    # spot-check: new abstract wording for line 31
    assert (
        "subject-frame-edge contact cue" in content
        or "subject body part / extended limb at frame edge" in content
    ), "scene_system.md v7 missing new abstract wording for line 31"


def test_load_prompt_entity_system_resolves_v7():
    """load_prompt('t2i_review', 'entity_system') resolves to v7 content."""
    content = load_prompt("t2i_review", "entity_system")
    assert content
    assert "common-noun character role" in content, (
        "entity_system.md v7 missing new abstract wording for line 33"
    )
    assert "required demographic descriptor" in content, (
        "entity_system.md v7 missing new abstract wording for line 34"
    )


def test_load_schema_scene_resolves_v7():
    """load_schema('t2i_review', 'scene_schema') resolves to v7 dict."""
    schema = load_schema("t2i_review", "scene_schema")
    assert isinstance(schema, dict), f"unexpected schema type: {type(schema)!r}"
    # schema shape 변경 0 — basic JSON Schema shape
    assert ("type" in schema) or ("properties" in schema) or ("items" in schema)


def test_load_schema_entity_resolves_v7():
    """load_schema('t2i_review', 'entity_schema') resolves to v7 dict."""
    schema = load_schema("t2i_review", "entity_schema")
    assert isinstance(schema, dict), f"unexpected schema type: {type(schema)!r}"


# ----------------------------------------------------------------------------
# Gate (d) — STEP_MANIFEST["t2i_review"].schema_version == 1 preservation.
# ----------------------------------------------------------------------------

def test_step_manifest_t2i_review_schema_version_preserved():
    """STEP_MANIFEST['t2i_review'].schema_version == 1 (Area #7c content-only)."""
    entry = STEP_MANIFEST["t2i_review"]
    schema_version = getattr(entry, "schema_version", None)
    if schema_version is None and isinstance(entry, dict):
        schema_version = entry.get("schema_version")
    assert schema_version == 1, (
        f"STEP_MANIFEST['t2i_review'].schema_version drift "
        f"(expected 1, got {schema_version!r})"
    )


# ----------------------------------------------------------------------------
# Gate (e) — Source-path version proof: 4 stem v7 dir resolution.
# (Codex plan iter 1 IMPORTANT 1 흡수: v6/v7 schemas are byte-identical;
# Gate (b) sha256 alone cannot prove v7 schema activation. _resolve_stem_in_pack
# returns (path, found_version, all_versions); assert found_version starts with
# "7." for all 4 stems.)
# ----------------------------------------------------------------------------

from app.modules.prompt_loader import _resolve_stem_in_pack


def _assert_stem_resolves_v7(name: str, ext: str = ".md") -> None:
    fpath, found_ver, _versions = _resolve_stem_in_pack("t2i_review", name, ext=ext)
    assert fpath is not None, f"stem {name}{ext} not resolved"
    assert found_ver is not None, f"stem {name}{ext} resolved to no version"
    assert found_ver.startswith("7."), (
        f"stem {name}{ext} resolved to non-v7 version: {found_ver}"
    )


def test_resolve_scene_system_v7():
    """scene_system.md stem resolves to latest v7 dir (not v6 fallback)."""
    _assert_stem_resolves_v7("scene_system", ext=".md")


def test_resolve_scene_schema_v7():
    """scene_schema.json stem resolves to latest v7 dir (Gate (b) sha256 alone cannot prove v7 source)."""
    _assert_stem_resolves_v7("scene_schema", ext=".json")


def test_resolve_entity_system_v7():
    """entity_system.md stem resolves to latest v7 dir."""
    _assert_stem_resolves_v7("entity_system", ext=".md")


def test_resolve_entity_schema_v7():
    """entity_schema.json stem resolves to latest v7 dir (Gate (b) sha256 alone cannot prove v7 source)."""
    _assert_stem_resolves_v7("entity_schema", ext=".json")
```

### 4.3 Test Count Target

14 PASS (residue 3 + schema 2 + load_prompt/load_schema 4 + step_manifest 1 + source-path v7 resolve 4 = 14). 추가 optional canary 0-3 edge-case (Codex plan iter 1 IMPORTANT 1 흡수 — `_resolve_stem_in_pack` 4 stem v7 proof 강화).

### 4.4 Pre-Commit Verification (W2, 5 check)

**(a) pytest pass count**:
```bash
cd backend && .venv/bin/pytest tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py -v
# Expected: 10+ PASS, 0 FAIL, 0 SKIP
```

**(b) No live LLM grep** (Codex plan iter 1 MINOR 1 흡수 — W5 convention 정합 broaden):
```bash
grep -nE "openai|gemini|completion|call_structured|call_llm|llm_client" backend/tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py
# Expected: empty (no live LLM call in W2 test)
```

**(c) NO VLM grep**:
```bash
grep -nE "vision_language|image_validation|vlm_client|run_vlm|call_vlm" backend/tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py
# Expected: empty (NO VLM hard constraint)
```

**(d) No regex semantic grep (closed-world substring membership only)**:
```bash
grep -nE "^import re|^from re|re\.compile|re\.match|re\.search|re\.findall" backend/tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py
# Expected: empty
```

**(e) Codex W2 per-wave APPROVED 의무**.

### 4.5 Path-Limited Git Add Scope

```bash
git add backend/tests/integration/test_area_7c_t2i_review_placeholder_hygiene.py
git status --short  # Expected: 1 new file
```

### 4.6 Commit Message Convention

```
test(area-7c-t2i-review-placeholder-hygiene-v1): W2 integrated test wave — 4 verify gate (residue 7 strict + schema sibling sha256 2 + load_prompt/load_schema 4 stem + STEP_MANIFEST schema_version preservation), 10+ PASS, no live LLM + NO VLM
```

## 5. W3 — Closure Docs Atomic Wave

### 5.1 Action

3 repo-local docs files modify (path-limited 3 explicit paths, 1 audit file 안 2 site edit).

### 5.2 Spec File Edit

**Path**: `docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md`

**Frontmatter edit** (line 4):
- Before: `status: drafting`
- After: `status: closed (spec Codex iter 5 APPROVED_FOR_PLAN + plan Codex iter <N> APPROVED_FOR_EXECUTION + W1-W2 atomic + per-wave APPROVED; range review/push gate pending at W3 closure commit time — Codex APPROVED_FOR_PUSH 후 즉시 push origin main)`

**Spec §11 Closure section append template** (HISTORICAL AUDIT TRAIL / TEMPLATE ONLY marker, live final pushed range/count = external memory only):

<!-- HISTORICAL AUDIT TRAIL / TEMPLATE ONLY: 다음 section 은 W3 execution 시 spec end 에 append; 본 plan 안 = template, controller substitute pending -->

```markdown
## 11. Closure (2026-05-19+)

### 11.1 Status + Closure Anchor

- **Status**: closed at W3 closure commit anchor (range review + push gate pending). Final pushed range/count = recorded in external memory only after `APPROVED_FOR_PUSH` + `git push origin main` (live closure docs 안 push-complete pre-claim 0).
- **Closure commit anchor**: W3 closure commit hash (path-limited 3 explicit paths). 후속 range-review fix-up commits 가능 — final pushed range/count = external memory.

### 11.2 Wave Commit Table

| Wave | Commit | Action | Line stats |
|---|---|---|---|
| W1 | W1 hash | Producer atomic (4 file, 7 strict residue + 1 keep-abstract 8 site replacement, v7 major bump) | W1 ins/del |
| W2 | W2 hash | Integrated test (4 verify gate, 10+ PASS, no live LLM + NO VLM) | W2 ins/del |
| W3 | W3 hash | Closure docs atomic (3 file: spec + roadmap + audit `02-` 2 site) | W3 ins/del |

### 11.3 In-Scope 8 Site Mapping

| file:line | replacement surface | residue gate? | result |
|---|---|---|---|
| `scene_system.md:31` | body-part cue | strict residue | 0 count ✓ |
| `scene_system.md:32` | body-part cue | strict residue | 0 count ✓ |
| `scene_system.md:33` | body-part cue | strict residue | 0 count ✓ |
| `scene_system.md:39` | action cue | strict residue | 0 count ✓ |
| `scene_system.md:40` | action+object cue | strict residue | 0 count ✓ |
| `scene_system.md:60-61` | hint_diagnostic illustration | not strict residue target | keep ✓ |
| `entity_system.md:33` | role cue | strict residue | 0 count ✓ |
| `entity_system.md:34` | demonym cue | strict residue | 0 count ✓ |

### 11.4 Strict Residue Catalog Result

7 entry exact legacy phrase substring membership check — new v7 dir 안 0 strict count (closed-world membership only, no regex semantic, standalone word ban prohibition).

### 11.5 STEP_MANIFEST Single-Entry Preservation

- `STEP_MANIFEST["t2i_review"].schema_version == 1` (Area #7c content-only, 변경 0).
- prompt stems: `scene_system / scene_schema / entity_system / entity_schema` 4 stem `load_prompt` / `load_schema` API v7 dir resolve.

### 11.6 Closure Verdict

- Codex spec iter 0-5 + plan iter 0-N + W1-W3 per-wave + W1-W3 range review `APPROVED_FOR_PUSH`.
- 4-Gate Boundary Doctrine reaffirm: Semantic Regex Ban / Prompt Closed-List Ban / Structured SOT Required / No Silent Fallback.
- TEMPLATE ONLY doctrine reaffirm: controller-substitute targets only, not live closure claims. HISTORICAL AUDIT TRAIL marker preserved.
- NO VLM hard constraint reaffirm.

### 11.7 Carry Follow-up Post #7c

Priority (Codex post-push Q3 verdict 정합):
1. **Area #7d** — cinematography closed-list SOT dual-site.
2. **Carry-A100** — VWR t2i_context demonym redesign V8+.
3. **Carry-A099** — VWR director_notes prose redesign V8+.
4. **Carry-P021** — scene_consistency 7 enumeration broad (source unresolved).
```

<!-- end TEMPLATE ONLY -->

### 5.3 Roadmap File Edit

**Path**: `docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md`

**§5.7 Area #7 carry follow-up new bullet append** (Codex iter 4 IMPORTANT 1 권고 — historical Sub-area (c) 정의 `shot_extract / shot_validator Korean grammar leak` 재기록 X, 새 explicit Area #7c follow-up bullet 추가; controller/Codex re-approval 의무):

Insert after Sub-area (b) Phase 2 — Area #7b entry (current line ~388):

<!-- HISTORICAL AUDIT TRAIL / TEMPLATE ONLY: 다음 bullet 은 W3 execution 시 roadmap §5.7 안 Sub-area (b) Phase 2 entry 뒤 append -->

```markdown
- **Area #7c (t2i_review v6 placeholder example abstraction)**: **closed (2026-05-19+, W1-W3 atomic — W1 producer / W2 integrated test / W3 closure docs; range review/push gate pending at W3 closure commit time — Codex APPROVED_FOR_PUSH 후 즉시 push origin main, final pushed range/count = external memory only)**. In-scope = audit `02-` §5 P-6 (P-6 v6 follow-up Phase 2 hygiene). 8 lines/sites = 5 scene + 1 keep-abstract + 2 entity. 7 strict residue catalog (exact legacy phrase membership, closed-world only). 1 new prompt dir (v7 major bump `7.<UTC>` 보존, Area #6 v6 boundary preserve). 2 prompt file modified + 2 schema sibling byte-identical. 1 W2 integrated test file. 3 W3 closure docs file (spec + roadmap §5.7 본 bullet + audit `02-` §5 P-6 row status marker + §14 Area #7c Closure section append). audit §11.2 row 추가 X (VWR downstream cascade 아님, §5 P-6 row owner). STEP_MANIFEST["t2i_review"].schema_version == 1 preservation + load_prompt/load_schema 4 stem latest v7 activation. 4-Gate Boundary Doctrine + closed-world exact residue contract + TEMPLATE ONLY doctrine + NO VLM hard constraint. Carry follow-up post #7c = Area #7d (cinematography) / Carry-A100 (t2i_context demonym) / Carry-A099 (director_notes prose) / Carry-P021 (scene_consistency).
```

<!-- end TEMPLATE ONLY -->

### 5.4 Audit `02-` File Edit (1 file 안 2 site)

**Path**: `docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md`

**Site (a) — §5 P-6 row status marker append** (current P-6 entry line ~142-153 의 마지막 bullet 뒤):

<!-- HISTORICAL AUDIT TRAIL / TEMPLATE ONLY: 다음 line 은 W3 execution 시 §5 P-6 entry 의 마지막 line 으로 append -->

```markdown
- **Status: closed by Area #7c (2026-05-19+, W1-W3; push pending until APPROVED_FOR_PUSH)** (Codex iter 3 verbatim wording).
```

<!-- end TEMPLATE ONLY -->

**Site (b) — 새 `## 14. Area #7c Closure` section append** (file 끝, current §13 Area #7b Closure 다음):

<!-- HISTORICAL AUDIT TRAIL / TEMPLATE ONLY: 다음 section 은 W3 execution 시 audit `02-` file 끝에 append -->

```markdown
## 14. Area #7c Closure (2026-05-19+)

### 14.1 Status + Closure Anchor

(spec §11.1 정합 wording — live final pushed range/count = external memory only, HISTORICAL AUDIT TRAIL marker preserved)

### 14.2 Wave Commits Table

(spec §11.2 3-row table — W1 / W2 / W3 hash anchor + line stats)

### 14.3 In-Scope 8 Site Mapping

(spec §11.3 8-row table — site / residue gate? / result)

### 14.4 Strict Residue Catalog Result

7 entry exact legacy phrase substring membership check — 0 strict count (closed-world membership only).

### 14.5 STEP_MANIFEST Single-Entry Preservation

`STEP_MANIFEST["t2i_review"].schema_version == 1` + load_prompt/load_schema 4 stem latest v7 activation.

### 14.6 4-Gate Boundary Doctrine + TEMPLATE ONLY + NO VLM

(spec §6/§7 정합 reaffirm wording)

### 14.7 Carry Follow-up Post #7c

(Priority: Area #7d / Carry-A100 / Carry-A099 / Carry-P021)
```

<!-- end TEMPLATE ONLY -->

### 5.5 Pre-Commit Verification (W3, 5 check)

**(a) Exact 3 repo docs file modified** (Codex plan iter 1 IMPORTANT 2 흡수 — `git diff-tree --name-only -r HEAD` W3 commit only, prior wave 영향 X):
```bash
git diff-tree --no-commit-id --name-only -r HEAD
# Expected: exactly 3 lines (W3 closure commit only):
#   docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md
#   docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md
#   docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md
test "$(git diff-tree --no-commit-id --name-only -r HEAD | wc -l)" -eq 3 || { echo "FAIL: W3 commit file count != 3"; exit 1; }
echo "OK 3 file exactly in W3 commit"
```

**(b) Audit §11.2 row untouched (VWR downstream 표 row 추가 X)** (Codex plan iter 1 IMPORTANT 2 흡수 — heading-anchored block compare, line range fragility 회피):
```bash
AUDIT="docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md"
diff \
  <(git show HEAD^:"$AUDIT" | awk '/^### 11\.2 /{flag=1; next} /^### 11\.3 /{flag=0; exit} flag') \
  <(awk '/^### 11\.2 /{flag=1; next} /^### 11\.3 /{flag=0; exit} flag' "$AUDIT") \
  && echo "OK §11.2 heading-anchored block untouched HEAD^→HEAD" \
  || { echo "FAIL: §11.2 block drift"; exit 1; }
```

**(c) Substitute design-time placeholder + unresolved placeholder 0 in live closure docs** (Codex plan iter 1 IMPORTANT 3 흡수 — W3 substitution step before placeholder grep, HISTORICAL AUDIT TRAIL marker block 안 제외):

Step 1: Substitute actual W1 v7 dir name throughout repo-local spec/roadmap/audit live closure docs (replacing design-time `7.<UTC-timestamp>` / `7.<UTC>` to actual W1 dir, e.g. `7.202605191500`):
```bash
W1_DIR_NAME=$(basename $(ls -d prompts/_base/t2i_review/7.*/ | tail -1))  # e.g. 7.202605191500
for f in \
  docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md \
  docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md \
  docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md; do
  awk -v dir="$W1_DIR_NAME" '
    /HISTORICAL AUDIT TRAIL \/ TEMPLATE ONLY/{flag=1; print; next}
    /end TEMPLATE ONLY/{flag=0; print; next}
    !flag{gsub(/7\.<UTC-timestamp>/, dir); gsub(/7\.<UTC>/, dir); print; next}
    flag{print}
  ' "$f" > "${f}.tmp" && mv "${f}.tmp" "$f"
done
echo "OK substituted 7.<UTC-timestamp>/<UTC> -> $W1_DIR_NAME in 3 live closure docs"
```

Step 2: Verify 0 unresolved placeholder in live closure docs (HISTORICAL AUDIT TRAIL marker block 안 제외):
```bash
for f in \
  docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md \
  docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md \
  docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md; do
  awk '/HISTORICAL AUDIT TRAIL \/ TEMPLATE ONLY/{flag=1; next} /end TEMPLATE ONLY/{flag=0; next} !flag' "$f" \
    | grep -nE '<W[0-9]+ hash>|<W[0-9]+ commit hash>|<pushed_range>|<base>\.\.<W[0-9]+>|<UTC-timestamp>|<UTC>' \
    && { echo "FAIL: unresolved placeholder in $f"; exit 1; } || true
done
echo "OK no unresolved placeholder in live closure docs"
```

**(d) Push-complete pre-claim 0 in live closure docs** (HISTORICAL AUDIT TRAIL marker block 안 제외):
```bash
for f in \
  docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md \
  docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md \
  docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md; do
  awk '/HISTORICAL AUDIT TRAIL \/ TEMPLATE ONLY/{flag=1; next} /end TEMPLATE ONLY/{flag=0; next} !flag' "$f" \
    | grep -nE 'push 완료|push complete|pushed origin' \
    && { echo "FAIL: push-complete pre-claim in $f"; exit 1; } || true
done
echo "OK no push-complete pre-claim in live closure docs"
```

**(e) Codex W3 per-wave APPROVED 의무**.

### 5.6 Path-Limited Git Add Scope

```bash
git add docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md
git add docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md
git add docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md
git status --short  # Expected: 3 modified file
```

### 5.7 Range Review + Push Gate

- W3 closure commit 후 Codex W1-W3 range review (cumulative + per-wave 정합).
- `APPROVED_FOR_PUSH` 후 즉시 `git push origin main` (사용자 ask 0, [[feedback_push_no_user_ask]] 정합).
- NEEDS_REVISION_* 시 narrow amend (path-limited git add scope, 1 wave 1 file 기준) 후 narrow re-review.
- Repo-local post-push amend X (Codex range review 요청 시 제외).

### 5.8 External Memory Write Spec

push 후 closure session memory file (`memory/session_20260519_area_7c_v1_closure.md` 또는 sibling slug) 안 final pushed range/count anchor 기록:

```
- Final pushed range: <base>..<W3 commit hash> = X commits.
- origin/main HEAD = <W3 commit hash>.
- Unpushed count = 0.
- Push range = W1 producer + W2 integrated test + W3 closure docs + 후속 range-review fix-up commits.
```

### 5.9 Commit Message Convention

```
docs(area-7c-t2i-review-placeholder-hygiene-v1): W3 closure — spec status closed + spec §11 Closure + roadmap §5.7 Area #7c carry follow-up bullet + audit §5 P-6 row status + audit §14 Area #7c Closure section
```

## 6. 4-Gate Boundary Doctrine (inline reaffirm)

본 plan 적용 (spec §6 정합):

- **Semantic Regex Ban**: W2 test code 안 시나리오 의존 regex 0. residue gate = closed-world exact phrase substring membership only. `import re` ban.
- **Prompt Closed-List Ban**: prompt 안 LLM-instruction closed-list 변경 0 (Area #6 mutation redesign closed boundary 정합, scope 외).
- **Structured SOT Required**: t2i_review v6 producer 5 core fields + alias contract 보존 (Area #6 closed).
- **No Silent Fallback**: 예시 generic placeholder 사용해도 LLM emit fail-fast 보존.

## 7. TEMPLATE ONLY Doctrine (inline reaffirm)

본 plan 적용 (spec §7 정합 + Codex iter 0 plan strategy 권고 흡수):

- **Template placeholders are controller-substitute targets only, not live closure claims**.
- **`HISTORICAL AUDIT TRAIL / TEMPLATE ONLY` marker**: 본 plan §5.2/§5.3/§5.4 안 closure section content template = historical/published verbatim block, grep 오해 방지 wording marker (`<!-- HISTORICAL AUDIT TRAIL / TEMPLATE ONLY: ... -->` / `<!-- end TEMPLATE ONLY -->`) 명시.
- **Live closure docs requirement**: unresolved placeholder 0 + push-complete pre-claim 0. W3 Pre-Commit Verification (c)/(d) check.
- **Final pushed range/count = external memory only**. repo-local closure docs = closure commit anchor + range-review/push gate pending wording.
- **Repo-local post-push amend X** (Codex range review 요청 시 제외).

## 8. References

- **Spec HEAD**: commit `1032dbc` (`docs/superpowers/specs/2026-05-19-area-7c-t2i-review-placeholder-hygiene-v1-design.md`, 193 line).
- **Audit `02-`**: `docs/visual-reliability-audit/2026-05-14-semantic-string-routing-debt-audit/02-prompt-side-hygiene-audit.md` §5 P-6 (line 142-153) + §10 Boundary Notes line 228 verbatim ("본 audit 의 P-6 예시 텍스트만 hygiene scope (LLM-side redesign 별도)").
- **Roadmap**: `docs/superpowers/specs/2026-05-16-track-b-semantic-debt-roadmap-design.md` §5.7 Area #7 carry follow-up (sub-area label pending — historical Sub-area (c) = `shot_extract / shot_validator Korean grammar leak`).
- **Hygiene v1 closure**: commit `91d1dfd` (P-1 ~ P-6 1차 fix, 2026-05-15).
- **Area #6 closure**: Track B Tier 2 #4 (T2I Review Mutation Redesign v1, 2026-05-18+).
- **Area #7a closure**: push `d0410eb` (VWR SOT v1, 2026-05-19).
- **Area #7b closure**: push `e751e72` (VWR Downstream Cascade v1, 2026-05-19+, range `d0410eb..e751e72` = 28 commits, external memory).
- **Codex MCP pane**: `%0` (gpt-5.5 xhigh) — per-wave review + range review + push gate verdict.

## 9. Carry Follow-up Post Area #7c

Priority (Codex post-push Q3 verdict 정합):

1. **Area #7d** — cinematography closed-list SOT dual-site (`variation_recommender/v2/system.md` + `scene_extractor_v2/19.*/turn_scene_detail.md:87-91`). medium cost / cinematography 도메인 별개.
2. **Carry-A100** — VWR system.md t2i_context demonym redesign V8+. medium cost / Area #7a 정합 보존.
3. **Carry-A099** — VWR system.md director_notes prose redesign V8+. medium-large cost / Area #7a 정합 보존.
4. **Carry-P021** — scene_consistency 7 enumeration broad (source unresolved low-priority). small cost (source 파악 후) / Area #7a 정합 보존.
