# THIS YOU V2.0.4 — Production Factory Input Contract Alignment

This patch aligns the PHP/CMS boundary with the autonomous Production Factory.

## Canonical style mode

Machine values are now:

```text
stay_close
elevate
surprise
```

Legacy stored values are accepted by code and Migration 10 converts:

```text
familiar -> stay_close
elevated -> elevate
```

The UI labels remain human-friendly.

## Production Factory input

`this_you.chapter_production_input.v1` now includes a deterministic top-level `reader_references` manifest. Roles are:

```text
face_primary
body_primary
identity_secondary
identity_context
```

The ZIP builder and JSON manifest use the same helper, so every declared file is an actual bundled file and roles are never inferred from filenames by the Factory.

The normal Factory-facing product input sends reader/profile facts, Scene DNA and deterministic constraints only. It no longer exports PHP-generated `editorial_push`, `brand_policy`, page-style matrices or other styling interpretation as Factory authority.

## Product result contract

Expected product rows now include:

```text
slot_name
category
brand
product_name
color_name
price
price_basis
currency
product_url
official_image_url (`string | null`)
match_level
verification_note
budget_fit
budget_exception_note
selected_size
size_availability
size_verification_note
generation_hard_lock
```

`price_basis` remains `regular_base_non_discounted`; `match_level` remains `exact` for the canonical Factory path.

## HERO filename

Canonical output is now:

```text
final_hero.jpg
```

Teleport still accepts legacy `final_hero.png` packages for backward compatibility.

## Teleport

API product evidence may now be read from either:

- `source_evidence.json` (preferred when present), or
- the canonical fields in `01_product_selection_result.json`.

Additional Factory fields such as selected size and official image URL are preserved inside verification metadata. Remote image URLs are not treated as proof that the image pixels were locally loaded.

## Migration

Run `/admin/migrate.php` once after installing this patch. Migration 10 changes the stored style mode enum and converts existing reader profiles.

## Responsibility boundary

CMS/DEV owns transport, storage, deterministic packaging and import.

Production Factory owns styling interpretation, product coherence, Visual Lock intelligence, image generation, body/identity policy, QA and correction routing.


## V2.0.5 clarification — nullable official image URL

`official_image_url` is nullable in the Factory result contract:

```text
string | null
```

`null` is valid when the Factory has verified the product but cannot safely return a stable official image URL at the product-selection stage. The Factory may continue its own bounded product-visual acquisition flow (for example its browser worker). CMS/DEV must not reject the product solely because this field is null.

## V2.0.5 clarification — review vs activation

```text
human_review_required = false
```

means only that the Production Factory does not require a mandatory intermediate/manual QA gate before completing the chapter package.

It does **not** authorize publishing or print activation.

CMS remains authoritative for the magazine-level gate:

```text
Factory complete
→ Teleport/import
→ operator review
→ ACTIVATE MAGAZINE
→ PDF / PRINT
```

The Factory-facing output contract therefore also declares:

```text
operator_activation_required = true
```

Teleport never auto-activates a MagazineInstance based on Factory review flags.
