diff --git a/README.md b/README.md
index 23170a99cd..875dacea4d 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,6 @@ Blocks Engine is a collection of tools for generating, transforming, and materia
- [`php-transformer`](php-transformer/) - PHP primitives for converting HTML, Markdown, and generated website artifacts into WordPress-native block outputs.
- [`figma-transformer`](figma-transformer/) - PHP primitives for converting Figma `.fig` archives and Figma-derived scenegraphs into static HTML website artifacts with parity diagnostics.
-Artifact compilation also emits the self-contained [`wordpress-site-plan/v2`](docs/contracts/wordpress-site-plan-v2.md) block-theme materialization contract.
+Artifact compilation also emits the self-contained [`wordpress-site-plan/v3`](php-transformer/docs/contracts/wordpress-site-plan-v3.md) block-theme materialization contract. See the [contract directory](php-transformer/docs/contracts/) for the current schemas and archived versions.
-The [Figma-to-WordPress acceptance matrix](docs/contracts/figma-wordpress-acceptance-matrix-v2.md) consumes that handoff through generic, configurable materialization providers and attributes parity independently across Figma-to-HTML, HTML-to-WordPress, and end-to-end boundaries.
+The [Figma-to-WordPress acceptance matrix](php-transformer/docs/contracts/figma-wordpress-acceptance-matrix-v2.md) consumes that handoff through generic, configurable materialization providers and attributes parity independently across Figma-to-HTML, HTML-to-WordPress, and end-to-end boundaries.
diff --git a/docs/adr/0005-box-tree-reduction-engine-owned-styles.md b/docs/adr/0005-box-tree-reduction-engine-owned-styles.md
index a785d4de66..a2df0ac829 100644
--- a/docs/adr/0005-box-tree-reduction-engine-owned-styles.md
+++ b/docs/adr/0005-box-tree-reduction-engine-owned-styles.md
@@ -1,6 +1,8 @@
# Reduce source structure from the captured box tree; ship only engine-owned styles
-**Status: Superseded by [#7370](https://github.com/Automattic/blocks-engine/issues/7370).** On eight frozen corpus sites, enabling one box-tree decision family at a time produced no additional passing cells beyond run-to-run noise. With all families enabled, agency, bizcasual, bolt-lumen, replit-zach, sdnunca and base44 fell to zero passing cells (without box trees: 2, 12, 1, 3, 11 and 18–21); dropping author stylesheets alone caused the same collapse. Box-tree consumption is therefore removed entirely; sidecars remain capture-only evidence and capture identity is stripped from output.
+**Status: Superseded by [#7370](https://github.com/Automattic/blocks-engine/issues/7370).** On eight frozen corpus sites, enabling one box-tree decision family at a time produced no additional passing cells beyond run-to-run noise. With all families enabled, agency, bizcasual, bolt-lumen, replit-zach, sdnunca and base44 fell to zero passing cells (without box trees: 2, 12, 1, 3, 11 and 18–21); dropping author stylesheets alone caused the same collapse. The decision below is historical: the broad box-tree reduction and engine-only stylesheet pipeline were removed.
+
+**Current behavior:** The compiler reads optional, source-path- and hash-bound `box-tree/**.json` sidecars (v2 and compact v3) on the default path. [ADR 0006](0006-box-tree-evidence-for-wrapper-folding.md) defines the limited wrapper use: per-viewport border boxes and used styles are evidence for guarded wrapper folds, not instructions to reconstruct layout or replace author stylesheets. Separately, the purchase-affordance scan uses the same reader to ignore elements with `display: none` at every captured viewport. Sidecars and capture node IDs are not emitted as theme assets or block identity.
Captured sites become block trees shaped by what the browser rendered, not by the
source markup's nesting. Every wrapper that renders nothing of its own collapses, and
@@ -98,11 +100,9 @@ the selectors, is the ground truth for what each element contributes.
Slice 3 accepts pixel values at the captured viewports; lifting fluid intent
and interaction selectors follows separately in slice 3b.
-## Status update: intake is opt-in (#7352)
+## Historical status update: intake was opt-in (#7352)
Applied box-tree decisions made every frozen corpus import worse than the
-same capture without box-tree evidence. Intake is therefore withheld unless
-`BLOCKS_ENGINE_BOX_TREE_INTAKE=1`. The default import equals the import
-without sidecars and reports `box_tree_withheld`. Tests that exercise these
-decisions opt in explicitly. Per #7345, each decision returns to the default
-path only when the corpus replay shows it is no worse than authored styling.
+same capture without box-tree evidence. At that point, intake was withheld unless
+`BLOCKS_ENGINE_BOX_TREE_INTAKE=1`; the default import reported `box_tree_withheld`.
+That gate described the old pipeline, not the current evidence reader.
diff --git a/docs/adr/0006-box-tree-evidence-for-wrapper-folding.md b/docs/adr/0006-box-tree-evidence-for-wrapper-folding.md
new file mode 100644
index 0000000000..115fb0e2b4
--- /dev/null
+++ b/docs/adr/0006-box-tree-evidence-for-wrapper-folding.md
@@ -0,0 +1,27 @@
+# Use captured box-tree evidence for wrapper folding; keep author CSS
+
+**Status: Implemented as described below.** Supersedes the reduction and stylesheet strategy in [ADR 0005](0005-box-tree-reduction-engine-owned-styles.md). See [#7454](https://github.com/Automattic/blocks-engine/issues/7454), [#7505](https://github.com/Automattic/blocks-engine/issues/7505), and [#7517](https://github.com/Automattic/blocks-engine/issues/7517) for the design history; this record describes what shipped, not every proposed fold.
+
+## Context
+
+Selector survival alone retains wrappers whose class or ID is consumed even when the wrapper contributes no independent box. Conversely, stripping author CSS and reconstructing the whole site from captured styles regressed visual parity. Use captured geometry to support a specific fold, and prove that the author rules still work after that fold.
+
+## Evidence binding
+
+- `ArtifactCompiler` looks for JSON under a `box-tree/` directory in the artifact. It accepts exactly one supported sidecar matching the document's normalized `source_path` and SHA-256 `source_hash`, subject to the 32 MiB sidecar limit. The digest describes original intake bytes, not HTML reserialized by a normalizer or projector. Missing, stale, ambiguous or unreadable sidecars supply no evidence. No intake flag is required.
+- `Contract\BoxTree::read()` accepts `blocks-engine/box-tree/v2` (inline used styles) and `blocks-engine/box-tree/v3` (style-table indices expanded to the v2 shape). The wrapper proof reads the captured viewport names and the per-node `border_box` and `used_styles` for each viewport. It does not use captured pseudo-element observations or interaction states as proof; selector state and generated boxes are checked from author CSS.
+- `BoxTreeWrapperEvidence` binds observations to DOM elements by unique `data-blocks-engine-node-id` and removes the carrier when binding the document. Missing, invalid, unknown or duplicated IDs, or elements created without a captured ID, cannot prove a fold. Sidecars are not theme assets and capture node IDs are not emitted as block identity.
+
+## Wrapper decision
+
+`WrapperCoalescer` tries the evidence-backed restatement path when the existing coalescing paths have not removed the wrapper and the wrapper passes preflight. `WrapperDecision::restatedWrapperFold()` is limited to eligible single-element-child `div` wrappers without own non-whitespace text; the surviving block may come from deeper in an already-folded sole-child chain. Missing or insufficient evidence preserves the wrapper **on this path**, without changing the eligibility of the existing CSS and layout-geometry proofs.
+
+1. **Prove geometry and paint at every captured viewport.** The wrapper must not be `display: none`, must have positive width, and the fold requires `display: block`. The classifier checks background, borders, shadow, outline, opacity, transforms, filters, masking, clipping and overflow, as well as stacking (`z-index`), animation and positioning. The wrapper must be static or relative with inert offsets (`auto` or zero); an absolute descendant relying on that relative containing block, or one without sufficient position evidence, blocks the neutral case. A float is allowed only if the wrapper fills its parent's content box. The wrapper and child border boxes must agree within 0.5 CSS px on each of x, y, width and height, unless the inset proof below applies.
+2. **Allow only proven transfers.** The inset proof expands the child's border box by the wrapper's padding and checks it against the wrapper box at every viewport. The child must be paint-free, static, non-floating and block-level, with zero margins, padding and borders. Relative positioning can transfer with that same box proof, inert offsets and observed descendant positions. Wrapper opacity can transfer when the child has unit opacity throughout and does not contest the declaration. Width, max-width and margins can be restated only if the declaration proof allows them (including the child's box-sizing or lack of padding and borders for size declarations); width/centering and min-height mismatch labels are diagnostics, not separate licenses to fold unequal boxes.
+3. **Prove identity and the cascade.** Saved boundaries, runtime and motion targets, binding anchors, document-edge IDs and unsupported attributes can all refuse the fold. The child must be able to carry the wrapper's classes and any transferred anchor. An unused ID or inert `data-*` attribute can be dropped; consumed attributes must move safely or be projected to an engine-owned class. `RestatedWrapperFold` checks selector matches and declaration precedence before and after the move, including inherited text, competing child declarations and values that depend on the old containing block. It adds selector arms where needed to keep targeting the surviving elements. Unverifiable selectors, changed matches or unsafe declarations keep the wrapper with a named reason and detail. Author CSS still ships through the existing projection path.
+
+For the guard inventory see [Wrapper decisions](../../php-transformer/docs/wrapper-decisions.md). This is not general box-tree layout synthesis, a replay of captured interaction states, or a guarantee of equivalence outside the observed viewports. Producers may omit sidecars to avoid per-route capture cost, but an import without them cannot take these evidence-backed folds or apply the captured visibility check below.
+
+## Separate use of the same evidence
+
+The compiler also passes the bound sidecar to `CommerceStructureRecognizer` when looking for source purchase affordances. That scan excludes elements (and their subtrees) proven `display: none` at every captured viewport; it does not remove them from the document being compiled. It does not use this evidence to prove a store exists. There is no general-purpose restyle or source-pruning pass driven by box trees.
diff --git a/docs/bedford-visible-text-audit.md b/docs/bedford-visible-text-audit.md
deleted file mode 100644
index ed6b7467ac..0000000000
--- a/docs/bedford-visible-text-audit.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Bedford visible-text audit (#7523)
-
-## Evidence and method
-
-Frozen source: `~/Studio/loop-runs/corpus/squarespace-bedford/capture`.
-Existing imported comparison: `~/Studio/loop-runs/squarespace-bedford-s3-p7-eval/parity-capture/compare/materialization/report.json`.
-Compared each score's source/liberated typography strings and text character counts. Confirmed the otherwise invisible separator differences by inspecting source HTML and browser `innerText` on the frozen website and existing imported site. This is not a fresh import or an acceptance measurement.
-
-The comparison uses the desktop source boundary for both desktop widths; standalone reference JSON at 768 has different responsive counts, so it must not be substituted for the comparison's source evidence.
-
-## Per-route and viewport differences
-
-Deltas below are imported minus source. Each column names an actual comparison cell.
-
-| Route | 390 | 768 | 1440 |
-| --- | ---: | ---: | ---: |
-| `/` | 0 | +2 | +2 |
-| `/contact-bedford/` | 0 | +2 | +2 |
-| `/landing-bedford/` | 0 | +2 | +2 |
-| `/news-bedford/` | 0 | +2 | +2 |
-| `/projects-bedford/` | 0 | +2 | +2 |
-| `/read-me-bedford/` | 0 | +2 | +2 |
-| `/take-action-bedford/` | 0 | +2 | +2 |
-| `/what-we-do-bedford/` | 0 | +2 | +2 |
-| `/news-bedford/2014/1/23/appalachia/` | +7 | +9 | +9 |
-| `/news-bedford/2014/1/23/get-out-there/` | +7 | +9 | +9 |
-| `/news-bedford/2014/1/23/why-deserts-matter-too/` | -15 | -13 | -13 |
-| `/partners-bedford/` | -4 | -2 | -2 |
-| `/home-alt-bedford/` | -2 | 0 | 0 |
-
-### Shared +2: footer, not header or hidden text
-
-No extra words. `#siteInfo` contains adjacent `.site-address`, `.site-phone`, and `.site-email` elements with no intervening source text nodes. The copy inserts normalized paragraph separators after `459 BROADWAY, NEW YORK` and `(212) 555-0123`. At mobile the source already has line boundaries, masking the discrepancy.
-
-Owner: `StructuredInlineItemLowering` turns each phrasing item into a paragraph, even when its display is inline. Inline paragraphs still introduce `innerText` paragraph separators. The fix keeps genuinely inline items together in editable RichText, retaining independent carriers for atomic inline-block items. No site-specific selectors are used.
-
-### Blog posts
-
-All three gain `Submit` from the importer-generated form action for the source `.comment-form`. That source form contains only a textarea; `Preview` and `Comments Restricted` are sibling controls outside it. The new button contributes seven normalized characters including its separator and explains the extra action-row height. This is not date/byline metadata.
-
-The middle post also loses `Newer Post` and `Older Post` (22 characters including separators). Source: `.pagination .newer .prev-label` and `.pagination .older .next-label`, outside the anchors. `NavigationPattern` flattens this landmark to only its link labels. The fix defers directional (`rel=prev/next`) article navigation to ordinary block conversion so the captions survive.
-
-### Partners
-
-Four missing spaces: `First Name (required)`, `Last Name (required)`, `Email Address (required)`, `Organization Name (required)` become `First Name(required)`, etc. Source elements are the form caption/title containers and their `.description.required` spans. Source block layout creates a text boundary; the importer emits label and required marker inline without one. The desktop +2 footer discrepancy offsets two of the four missing spaces. No words are missing.
-
-### Additional cell
-
-Home Alt has a separate slideshow discrepancy: imported typography includes `Slide 1 of 4` instead of the source `A better world`. Equal character counts on desktop do not prove equal visible strings. This candidate does not address that slideshow behavior.
-
-## Scope and checks
-
-Public-interface regression tests added:
-
-- `tests/unit/inline-item-text-boundaries.php`: adjacent inline items, responsive display, independent atomic items.
-- `tests/unit/article-pagination-visible-captions.php`: directional article links retain surrounding captions.
-
-Narrow checks passed: both new tests, `exact-fit-inline-flow.php`, and `form-visible-required-asterisk.php`.
-
-Remaining work: importer form seeding must not invent a submit absent from the source, and required-marker materialization must preserve the source text boundary. Those owning importer changes and their public-interface tests are not included in this checkout. The task is consequently only partially delivered.
-
-## Measurement status
-
-Existing baseline: 0/39 passing; text_content 29, pixel_region:core/group 36, text_position 35, image_geometry 18, page_height 17 (issue baseline). No after counts are claimed: a new corpus import, two-replay Bedford measurement, and eight-site non-regression measurement have not been run. Homeboy owns the declared Composer verification gate.
diff --git a/docs/contracts/php-transformer-visual-parity-fixture.schema.json b/docs/contracts/php-transformer-visual-parity-fixture.schema.json
deleted file mode 100644
index f6199763a7..0000000000
--- a/docs/contracts/php-transformer-visual-parity-fixture.schema.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://github.com/Automattic/blocks-engine/docs/contracts/php-transformer-visual-parity-fixture.schema.json",
- "title": "Blocks Engine PHP Transformer visual parity fixture",
- "type": "object",
- "additionalProperties": false,
- "required": ["schema", "name", "source", "target", "viewports", "thresholds"],
- "properties": {
- "schema": { "const": "blocks-engine/php-transformer/visual-parity-fixture/v1" },
- "name": { "type": "string", "minLength": 1 },
- "description": { "type": "string" },
- "source": { "$ref": "#/$defs/render_input" },
- "target": { "$ref": "#/$defs/render_input" },
- "viewports": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#/$defs/viewport" }
- },
- "capture": {
- "type": "array",
- "items": { "$ref": "#/$defs/capture_rule" }
- },
- "matchers": {
- "type": "array",
- "items": { "$ref": "#/$defs/matcher" }
- },
- "thresholds": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "max_mismatch_percent": { "type": "number", "minimum": 0 },
- "max_style_deltas": { "type": "integer", "minimum": 0 },
- "min_match_confidence": { "type": "number", "minimum": 0, "maximum": 1 },
- "severity_gate": { "type": "string", "enum": ["none", "info", "warning", "error", "critical"] }
- }
- },
- "expectations": {
- "type": "array",
- "items": { "$ref": "#/$defs/expectation" }
- },
- "metadata": {
- "type": "object",
- "additionalProperties": true
- }
- },
- "$defs": {
- "render_input": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "url": { "type": "string" },
- "route": { "type": "string" },
- "html_path": { "type": "string" },
- "artifact_path": { "type": "string" },
- "screenshot_path": { "type": "string" },
- "renderer": { "type": "string" },
- "wait_for_selector": { "type": "string" },
- "environment": { "type": "object", "additionalProperties": true }
- }
- },
- "viewport": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "width", "height"],
- "properties": {
- "id": { "type": "string", "minLength": 1 },
- "label": { "type": "string" },
- "width": { "type": "integer", "minimum": 1 },
- "height": { "type": "integer", "minimum": 1 },
- "device_scale_factor": { "type": "number", "minimum": 0 },
- "media": { "type": "string" }
- }
- },
- "capture_rule": {
- "type": "object",
- "additionalProperties": false,
- "required": ["kind", "selector"],
- "properties": {
- "kind": { "type": "string", "enum": ["generic", "button", "menu", "card", "form"] },
- "selector": { "type": "string", "minLength": 1 },
- "label": { "type": "string" },
- "properties": { "type": "array", "items": { "type": "string" } }
- }
- },
- "matcher": {
- "type": "object",
- "additionalProperties": false,
- "required": ["kind"],
- "properties": {
- "kind": { "type": "string", "enum": ["selector", "text", "role", "accessibility", "bounding_box", "computed_style"] },
- "source_selector": { "type": "string" },
- "target_selector": { "type": "string" },
- "text": { "type": "string" },
- "role": { "type": "string" },
- "min_confidence": { "type": "number", "minimum": 0, "maximum": 1 }
- }
- },
- "expectation": {
- "type": "object",
- "additionalProperties": false,
- "required": ["path", "assert"],
- "properties": {
- "path": { "type": "string", "minLength": 1 },
- "assert": { "type": "string", "enum": ["equals", "less_than_or_equal", "greater_than_or_equal", "contains", "count"] },
- "value": {},
- "count": { "type": "integer", "minimum": 0 }
- }
- }
- }
-}
diff --git a/docs/contracts/php-transformer-visual-parity-report.schema.json b/docs/contracts/php-transformer-visual-parity-report.schema.json
deleted file mode 100644
index 2b2a379bf3..0000000000
--- a/docs/contracts/php-transformer-visual-parity-report.schema.json
+++ /dev/null
@@ -1,285 +0,0 @@
-{
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://github.com/Automattic/blocks-engine/docs/contracts/php-transformer-visual-parity-report.schema.json",
- "title": "Blocks Engine PHP Transformer visual parity report",
- "type": "object",
- "additionalProperties": false,
- "required": ["schema", "status", "severity", "source_render", "target_render", "viewports", "matches", "findings", "recommendations"],
- "properties": {
- "schema": { "const": "blocks-engine/php-transformer/visual-parity-report/v1" },
- "status": { "type": "string", "enum": ["pass", "warning", "fail", "unknown"] },
- "severity": { "$ref": "#/$defs/severity" },
- "source_render": { "$ref": "#/$defs/render" },
- "target_render": { "$ref": "#/$defs/render" },
- "viewports": {
- "type": "array",
- "items": { "$ref": "#/$defs/viewport" }
- },
- "matches": {
- "type": "array",
- "items": { "$ref": "#/$defs/match" }
- },
- "computed_style_deltas": {
- "type": "array",
- "items": { "$ref": "#/$defs/computed_style_delta" }
- },
- "visual_diff": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "available": { "type": "boolean" },
- "mismatch_percent": { "type": "number", "minimum": 0 },
- "mismatch_pixels": { "type": "integer", "minimum": 0 },
- "total_pixels": { "type": "integer", "minimum": 0 },
- "ssim": { "type": "number", "minimum": 0, "maximum": 1 },
- "threshold": { "type": "number", "minimum": 0 },
- "diff_screenshot_path": { "type": "string" },
- "by_viewport": {
- "type": "array",
- "items": { "$ref": "#/$defs/visual_diff_viewport" }
- }
- }
- },
- "capture_diagnostics": { "$ref": "#/$defs/capture_diagnostics" },
- "findings": {
- "type": "array",
- "items": { "$ref": "#/$defs/finding" }
- },
- "recommendations": {
- "type": "array",
- "items": { "$ref": "#/$defs/recommendation" }
- },
- "metadata": {
- "type": "object",
- "additionalProperties": true
- }
- },
- "$defs": {
- "severity": { "type": "string", "enum": ["none", "info", "warning", "error", "critical"] },
- "component_kind": { "type": "string", "enum": ["generic", "button", "menu", "card", "form"] },
- "render": {
- "type": "object",
- "additionalProperties": false,
- "required": ["kind"],
- "properties": {
- "kind": { "type": "string", "enum": ["source", "target"] },
- "url": { "type": "string" },
- "route": { "type": "string" },
- "html_path": { "type": "string" },
- "artifact_path": { "type": "string" },
- "renderer": { "type": "string" },
- "renderer_version": { "type": "string" },
- "commit": { "type": "string" },
- "ref": { "type": "string" },
- "generated_at": { "type": "string" },
- "environment": { "type": "object", "additionalProperties": true },
- "screenshot_path": { "type": "string" }
- }
- },
- "viewport": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "width", "height"],
- "properties": {
- "id": { "type": "string", "minLength": 1 },
- "label": { "type": "string" },
- "width": { "type": "integer", "minimum": 1 },
- "height": { "type": "integer", "minimum": 1 },
- "device_scale_factor": { "type": "number", "minimum": 0 },
- "media": { "type": "string" },
- "source_screenshot_path": { "type": "string" },
- "target_screenshot_path": { "type": "string" },
- "diff_screenshot_path": { "type": "string" }
- }
- },
- "selector_evidence": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "source_selector": { "type": "string" },
- "target_selector": { "type": "string" },
- "source_xpath": { "type": "string" },
- "target_xpath": { "type": "string" },
- "source_text": { "type": "string" },
- "target_text": { "type": "string" },
- "accessible_name": { "type": "string" },
- "role": { "type": "string" },
- "source_attributes": { "type": "object", "additionalProperties": { "type": ["string", "number", "boolean", "null"] } },
- "target_attributes": { "type": "object", "additionalProperties": { "type": ["string", "number", "boolean", "null"] } }
- }
- },
- "match": {
- "type": "object",
- "additionalProperties": false,
- "required": ["kind", "source_selector", "target_selector", "confidence"],
- "properties": {
- "kind": { "$ref": "#/$defs/component_kind" },
- "source_selector": { "type": "string" },
- "target_selector": { "type": "string" },
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
- "viewport_id": { "type": "string" },
- "selector_evidence": { "$ref": "#/$defs/selector_evidence" },
- "dom": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "source_tag": { "type": "string" },
- "target_tag": { "type": "string" },
- "source_classes": { "type": "array", "items": { "type": "string" } },
- "target_classes": { "type": "array", "items": { "type": "string" } },
- "source_child_count": { "type": "integer", "minimum": 0 },
- "target_child_count": { "type": "integer", "minimum": 0 }
- }
- },
- "button": { "$ref": "#/$defs/button_fields" },
- "menu": { "$ref": "#/$defs/menu_fields" },
- "card": { "$ref": "#/$defs/card_fields" },
- "form": { "$ref": "#/$defs/form_fields" }
- }
- },
- "button_fields": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "label": { "type": "string" },
- "href": { "type": "string" },
- "variant": { "type": "string" },
- "icon_position": { "type": "string", "enum": ["none", "before", "after", "only"] }
- }
- },
- "menu_fields": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "orientation": { "type": "string", "enum": ["horizontal", "vertical", "unknown"] },
- "item_count": { "type": "integer", "minimum": 0 },
- "labels": { "type": "array", "items": { "type": "string" } },
- "has_submenus": { "type": "boolean" }
- }
- },
- "card_fields": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "heading": { "type": "string" },
- "media_present": { "type": "boolean" },
- "link_present": { "type": "boolean" },
- "action_count": { "type": "integer", "minimum": 0 }
- }
- },
- "form_fields": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "action": { "type": "string" },
- "method": { "type": "string" },
- "control_count": { "type": "integer", "minimum": 0 },
- "control_types": { "type": "array", "items": { "type": "string" } },
- "required_count": { "type": "integer", "minimum": 0 }
- }
- },
- "computed_style_delta": {
- "type": "object",
- "additionalProperties": false,
- "required": ["property", "severity"],
- "properties": {
- "viewport_id": { "type": "string" },
- "source_selector": { "type": "string" },
- "target_selector": { "type": "string" },
- "property": { "type": "string" },
- "source_value": { "type": ["string", "number", "boolean", "null"] },
- "target_value": { "type": ["string", "number", "boolean", "null"] },
- "delta": { "type": ["string", "number", "boolean", "null"] },
- "severity": { "$ref": "#/$defs/severity" },
- "selector_evidence": { "$ref": "#/$defs/selector_evidence" }
- }
- },
- "property_evidence": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "property": { "type": "string" },
- "source_property": { "type": "string" },
- "target_property": { "type": "string" },
- "source_value": { "type": ["string", "number", "boolean", "null"] },
- "target_value": { "type": ["string", "number", "boolean", "null"] },
- "expected_value": { "type": ["string", "number", "boolean", "null"] },
- "actual_value": { "type": ["string", "number", "boolean", "null"] },
- "delta": { "type": ["string", "number", "boolean", "null"] },
- "unit": { "type": "string" },
- "tolerance": { "type": "number", "minimum": 0 },
- "source_rule": { "type": "string" },
- "target_rule": { "type": "string" }
- }
- },
- "visual_diff_viewport": {
- "type": "object",
- "additionalProperties": false,
- "required": ["viewport_id"],
- "properties": {
- "viewport_id": { "type": "string" },
- "mismatch_percent": { "type": "number", "minimum": 0 },
- "mismatch_pixels": { "type": "integer", "minimum": 0 },
- "ssim": { "type": "number", "minimum": 0, "maximum": 1 },
- "diff_screenshot_path": { "type": "string" }
- }
- },
- "finding": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "severity", "category", "summary"],
- "properties": {
- "id": { "type": "string" },
- "severity": { "$ref": "#/$defs/severity" },
- "category": { "type": "string", "enum": ["dom", "style", "layout", "visual", "interaction", "content", "asset", "accessibility"] },
- "summary": { "type": "string" },
- "reason_code": { "type": "string" },
- "repair_bucket": { "type": "string" },
- "pattern_family": { "type": "string" },
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
- "viewport_id": { "type": "string" },
- "kind": { "$ref": "#/$defs/component_kind" },
- "selector_evidence": { "$ref": "#/$defs/selector_evidence" },
- "property_evidence": { "type": "array", "items": { "$ref": "#/$defs/property_evidence" } },
- "style_deltas": { "type": "array", "items": { "$ref": "#/$defs/computed_style_delta" } },
- "visual_diff": { "$ref": "#/$defs/visual_diff_viewport" },
- "recommendation_ids": { "type": "array", "items": { "type": "string" } }
- }
- },
- "recommendation": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "priority", "summary"],
- "properties": {
- "id": { "type": "string" },
- "priority": { "type": "string", "enum": ["low", "medium", "high", "blocking"] },
- "summary": { "type": "string" },
- "reason_code": { "type": "string" },
- "repair_bucket": { "type": "string" },
- "pattern_family": { "type": "string" },
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
- "rationale": { "type": "string" },
- "selector_evidence": { "$ref": "#/$defs/selector_evidence" },
- "property_evidence": { "type": "array", "items": { "$ref": "#/$defs/property_evidence" } },
- "finding_ids": { "type": "array", "items": { "type": "string" } }
- }
- },
- "capture_diagnostics": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "captured_at": { "type": "string" },
- "runner": { "type": "string" },
- "runner_version": { "type": "string" },
- "browser": { "type": "string" },
- "browser_version": { "type": "string" },
- "device_scale_factor": { "type": "number", "minimum": 0 },
- "timing_ms": { "type": "number", "minimum": 0 },
- "artifact_paths": { "type": "array", "items": { "type": "string" } },
- "warnings": { "type": "array", "items": { "type": "string" } },
- "errors": { "type": "array", "items": { "type": "string" } },
- "metadata": { "type": "object", "additionalProperties": true }
- }
- }
- }
-}
diff --git a/docs/pr-body-draft.md b/docs/pr-body-draft.md
deleted file mode 100644
index d6fd6fde0f..0000000000
--- a/docs/pr-body-draft.md
+++ /dev/null
@@ -1,49 +0,0 @@
-## Summary
-
-This draft introduces `php-transformer` as the origin-clean PHP package for Blocks Engine transformation primitives. The package is `automattic/blocks-engine-php-transformer`, rooted at `php-transformer/`, and exposed through the `Automattic\BlocksEngine\PhpTransformer\` namespace.
-
-The package owns reusable conversion contracts for HTML, declared content formats, and generated website artifacts. It does not own product workflows such as importer screens, uploaded ZIP intake, theme activation, Studio orchestration, WordPress.com deployment behavior, or generation-loop policy.
-
-## Direction
-
-This PR should be reviewed as a standalone package, not as a renamed predecessor repository. Existing consumer code paths are downstream migration evidence.
-
-Implementation should collapse into `php-transformer` where the behavior is a reusable primitive. That does not mean immediate archival of older repositories. They can be archived only when no product or public consumer still needs their package name, functions, hooks, CLI commands, abilities, or other public entrypoints. If those entrypoints remain in use, the old repository should become a thin shim over tagged transformer APIs instead of adding new transformation logic.
-
-## Current Package API
-
-Current public entrypoints are:
-
-- `Contract\TransformerResult` for the serializable result envelope. Use `toArray()` across fixture, HTTP, process, and compatibility boundaries.
-- `HtmlToBlocks\HtmlTransformer` for supported HTML to parsed block arrays and serialized block markup.
-- `FormatBridge\FormatBridge` for declared `html`, `markdown`, and serialized `blocks` normalization and conversion. New consumers should prefer `convertResult()`.
-- `FormatBridge\FormatAdapterInterface` when a consumer needs a package-level format extension point.
-- `ArtifactCompiler\ArtifactCompiler` for generated website artifact bundle normalization into the shared result envelope.
-- `WordPress\Runtime` for WordPress function calls that need to work inside and outside WordPress.
-
-Other bundled classes are implementation details unless the README explicitly marks them public or they are part of an injected adapter contract.
-
-## Verification
-
-Expected local checks for this draft:
-
-- `git diff --check`
-- `cd php-transformer && composer validate`
-- `composer test` from `php-transformer/` when validating behavior, fixtures, and parity harnesses
-
-The parity harness validates current transformer output by default. Optional legacy comparisons are local migration evidence only and do not make old repositories part of the package API.
-
-## Next Steps
-
-- Keep the PR in draft until the package is installable and reviewable as a Composer library.
-- Run the first downstream dry-run against H2BC before widening to other consumers.
-- Replace any draft branch constraints in downstream plans with a tagged package constraint before downstream PRs merge.
-- Use downstream wrapper PRs to preserve old public surfaces while moving implementation to tagged transformer APIs.
-- Keep product plugins outside this package; they should consume transformer APIs through product-owned adapters rather than become part of this package.
-- Track missing primitives upstream in `php-transformer` instead of adding downstream workarounds.
-
-## AI assistance
-
-- **AI assistance:** Yes
-- **Tool(s):** OpenCode (GPT-5.5)
-- **Used for:** Drafting and editing documentation for the PR body structure and package-review framing. Chris remains responsible for review, verification, and final PR text.
diff --git a/php-transformer/README.md b/php-transformer/README.md
index 0d3a345006..ebe2150484 100644
--- a/php-transformer/README.md
+++ b/php-transformer/README.md
@@ -217,7 +217,7 @@ Unsupported or unsafe artifact inputs are reported through diagnostics instead o
## WordPress Site Plans
-`WordPressSitePlan` projects a self-contained `blocks-engine/wordpress-site-plan/v3` materialization contract from a compiler result. Its normalized document metadata and generic reporting summaries let a consumer project reports from a resolved plan plus its own receipt, without reading the compiler envelope or source files. See [WordPress Site Plan v3](docs/wordpress-site-plan.md) for the metadata shape, ordering, supported attributes, and resolver boundary.
+`WordPressSitePlan` projects a self-contained `blocks-engine/wordpress-site-plan/v3` materialization contract from a compiler result. Its normalized document metadata and generic reporting summaries let a consumer project reports from a resolved plan plus its own receipt, without reading the compiler envelope or source files. See [WordPress Site Plan v3](docs/contracts/wordpress-site-plan-v3.md) for the metadata shape, ordering, supported attributes, and resolver boundary.
## Parity Checks
diff --git a/php-transformer/docs/contracts/README.md b/php-transformer/docs/contracts/README.md
new file mode 100644
index 0000000000..ae79d18157
--- /dev/null
+++ b/php-transformer/docs/contracts/README.md
@@ -0,0 +1,8 @@
+# Contracts
+
+Use this directory for the current schema and contract documentation. Superseded specifications in [archive/](archive/) are historical references, not a list of formats the current runtime accepts.
+
+- **Site handoff:** [WordPress Site Plan v3](wordpress-site-plan-v3.md), [transformer result envelope](result-envelope.md), and [omitted-page receipts](omitted-page-receipt.md).
+- **Capture and projection:** [capture evidence](capture-evidence.md), [layout geometry proof](layout-geometry-proof.md), [source and target projection](source-target-projection.md), [products](products.md), [slideshow components](slideshow-components.md), and [external metric sources](external-metric-source-v1.md).
+- **Quality and testing:** [editability policy](editability-policy.md), [throw classification](throw-classification.md), [transformer parity fixtures](php-transformer-parity-fixtures.md), and [visual parity fixtures and reports](visual-parity-report.md).
+- **Figma handoff:** [Figma transformer result](figma-transformer-result.md) and [Figma-to-WordPress acceptance matrix v2](figma-wordpress-acceptance-matrix-v2.md).
diff --git a/docs/contracts/figma-wordpress-acceptance-matrix-v1.md b/php-transformer/docs/contracts/archive/figma-wordpress-acceptance-matrix-v1.md
similarity index 96%
rename from docs/contracts/figma-wordpress-acceptance-matrix-v1.md
rename to php-transformer/docs/contracts/archive/figma-wordpress-acceptance-matrix-v1.md
index 748a7dd533..3852125a9d 100644
--- a/docs/contracts/figma-wordpress-acceptance-matrix-v1.md
+++ b/php-transformer/docs/contracts/archive/figma-wordpress-acceptance-matrix-v1.md
@@ -1,6 +1,6 @@
# Figma WordPress Acceptance Matrix v1
-This contract is superseded by [Figma WordPress Acceptance Matrix v2](figma-wordpress-acceptance-matrix-v2.md), which separates Figma-to-HTML, HTML-to-WordPress, and end-to-end parity and supports arbitrary manifest fixtures.
+This contract is superseded by [Figma WordPress Acceptance Matrix v2](../figma-wordpress-acceptance-matrix-v2.md), which separates Figma-to-HTML, HTML-to-WordPress, and end-to-end parity and supports arbitrary manifest fixtures.
Run the repository-owned acceptance gate from a fresh checkout:
diff --git a/docs/contracts/wordpress-site-plan-v1.md b/php-transformer/docs/contracts/archive/wordpress-site-plan-v1.md
similarity index 78%
rename from docs/contracts/wordpress-site-plan-v1.md
rename to php-transformer/docs/contracts/archive/wordpress-site-plan-v1.md
index 36ad674d55..364cb40344 100644
--- a/docs/contracts/wordpress-site-plan-v1.md
+++ b/php-transformer/docs/contracts/archive/wordpress-site-plan-v1.md
@@ -1,6 +1,6 @@
# WordPress Site Plan v1 (Superseded)
-`blocks-engine/wordpress-site-plan/v1` is the additive, self-contained materialization handoff emitted at `TransformerResult.source_reports.wordpress_site_plan` for artifact compilation.
+`blocks-engine/wordpress-site-plan/v1` is the additive, self-contained materialization handoff formerly emitted at `TransformerResult.source_reports.wordpress_site_plan` for artifact compilation.
This contract was superseded by [WordPress Site Plan v2](wordpress-site-plan-v2.md).
@@ -10,4 +10,4 @@ This contract was superseded by [WordPress Site Plan v2](wordpress-site-plan-v2.
- `source`, `diagnostics`, and `quality` preserve source identity/provenance and compiler outcome metadata.
v1 emitted no block-theme scaffold or templates and left local asset URLs unresolved.
-It is retained here only as migration documentation; new consumers must use v2.
+It is retained here only as migration documentation; use the current [WordPress Site Plan v3](../wordpress-site-plan-v3.md).
diff --git a/docs/contracts/wordpress-site-plan-v2.md b/php-transformer/docs/contracts/archive/wordpress-site-plan-v2.md
similarity index 99%
rename from docs/contracts/wordpress-site-plan-v2.md
rename to php-transformer/docs/contracts/archive/wordpress-site-plan-v2.md
index 5f785f5984..3a5f7c365a 100644
--- a/docs/contracts/wordpress-site-plan-v2.md
+++ b/php-transformer/docs/contracts/archive/wordpress-site-plan-v2.md
@@ -1,4 +1,6 @@
-# WordPress Site Plan v2
+# WordPress Site Plan v2 (Superseded)
+
+This document describes the historical v2 contract. Current consumers use [WordPress Site Plan v3](../wordpress-site-plan-v3.md).
`blocks-engine/wordpress-site-plan/v2` is the complete, destination-independent
block-theme materialization contract emitted at
diff --git a/docs/contracts/external-metric-source-v1.md b/php-transformer/docs/contracts/external-metric-source-v1.md
similarity index 100%
rename from docs/contracts/external-metric-source-v1.md
rename to php-transformer/docs/contracts/external-metric-source-v1.md
diff --git a/docs/contracts/figma-transformer-result.md b/php-transformer/docs/contracts/figma-transformer-result.md
similarity index 100%
rename from docs/contracts/figma-transformer-result.md
rename to php-transformer/docs/contracts/figma-transformer-result.md
diff --git a/docs/contracts/figma-wordpress-acceptance-matrix-v2.md b/php-transformer/docs/contracts/figma-wordpress-acceptance-matrix-v2.md
similarity index 95%
rename from docs/contracts/figma-wordpress-acceptance-matrix-v2.md
rename to php-transformer/docs/contracts/figma-wordpress-acceptance-matrix-v2.md
index 3b54a681b1..52b9958f0b 100644
--- a/docs/contracts/figma-wordpress-acceptance-matrix-v2.md
+++ b/php-transformer/docs/contracts/figma-wordpress-acceptance-matrix-v2.md
@@ -14,7 +14,7 @@ php scripts/production-acceptance-matrix.php --profile=manifest --manifest=path/
The default `production` profile requires `fse-pilot-build-theme`, `twenty-twenty-five-community`, and `fisiostetic`. The `manifest` profile evaluates every supplied fixture in manifest order. Fixture IDs are unique lowercase slugs. Input paths may remain outside the repository; `summary.json` never includes them.
-Each fixture supplies a deployable `blocks-engine/wordpress-site-plan/v2` and evidence for three independently measured conversion boundaries:
+Each fixture supplies a deployable [`blocks-engine/wordpress-site-plan/v3`](wordpress-site-plan-v3.md) and evidence for three independently measured conversion boundaries:
1. **Figma to HTML:** `decode`, `normalize`, `emit`, `figma_html_desktop_parity`, and `figma_html_mobile_parity`.
2. **HTML to WordPress blocks:** `import`, `editor_validity`, `fallback`, `html_wordpress_desktop_parity`, and `html_wordpress_mobile_parity`.
diff --git a/docs/contracts/php-transformer-parity-fixture.schema.json b/php-transformer/docs/contracts/php-transformer-parity-fixture.schema.json
similarity index 94%
rename from docs/contracts/php-transformer-parity-fixture.schema.json
rename to php-transformer/docs/contracts/php-transformer-parity-fixture.schema.json
index 9dcb95ad63..61eb0bc066 100644
--- a/docs/contracts/php-transformer-parity-fixture.schema.json
+++ b/php-transformer/docs/contracts/php-transformer-parity-fixture.schema.json
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://github.com/Automattic/blocks-engine/docs/contracts/php-transformer-parity-fixture.schema.json",
+ "$id": "https://github.com/Automattic/blocks-engine/tree/trunk/php-transformer/docs/contracts/php-transformer-parity-fixture.schema.json",
"title": "Blocks Engine PHP Transformer parity fixture",
"type": "object",
"additionalProperties": false,
diff --git a/docs/contracts/php-transformer-parity-fixtures.md b/php-transformer/docs/contracts/php-transformer-parity-fixtures.md
similarity index 98%
rename from docs/contracts/php-transformer-parity-fixtures.md
rename to php-transformer/docs/contracts/php-transformer-parity-fixtures.md
index 8040b8c420..cc7ee86b90 100644
--- a/docs/contracts/php-transformer-parity-fixtures.md
+++ b/php-transformer/docs/contracts/php-transformer-parity-fixtures.md
@@ -4,7 +4,7 @@ The parity harness uses JSON fixtures to lock the shared contract for PHP transf
php-transformer is a product-level primitive and downstream repositories are consumers. Migration comparison fixtures are downstream evidence; they do not make downstream repositories part of the canonical package identity and they do not require `php-transformer` to carry permanent compatibility code.
-Fixture files live in `php-transformer/tests/fixtures/parity/*.json` and use schema `blocks-engine/php-transformer/parity-fixture/v1`. The JSON Schema is documented in `docs/contracts/php-transformer-parity-fixture.schema.json`.
+Fixture files live in `php-transformer/tests/fixtures/parity/*.json` and use schema `blocks-engine/php-transformer/parity-fixture/v1`. See the [fixture JSON Schema](php-transformer-parity-fixture.schema.json).
Each fixture declares:
diff --git a/php-transformer/docs/contracts/result-envelope.md b/php-transformer/docs/contracts/result-envelope.md
index 4956da27f5..2a9a95632a 100644
--- a/php-transformer/docs/contracts/result-envelope.md
+++ b/php-transformer/docs/contracts/result-envelope.md
@@ -50,7 +50,7 @@ Transformers may expose `source_reports.conversion_report` as a generic `blocks-
This internal property is omitted from the canonical v1 `toArray()` envelope. `source_reports` remains its compatible serialized projection, while `ArtifactCompiler` reads the required data directly. Runtime DOM contracts and other diagnostic-only evidence remain in `source_reports` because they are not artifact compilation inputs. Optional report reduction is a separate follow-up; required compilation and policy data remain available.
-Visual parity runners should exchange `blocks-engine/php-transformer/visual-parity-report/v1` reports and `blocks-engine/php-transformer/visual-parity-fixture/v1` configs. Those contracts live in `docs/contracts/visual-parity-report.md` and describe source/target render metadata, viewports, screenshot paths, DOM matches, computed-style deltas, optional visual diff metrics, findings, selector evidence, and recommendations without baking in downstream product policy.
+Visual parity runners should exchange `blocks-engine/php-transformer/visual-parity-report/v1` reports and `blocks-engine/php-transformer/visual-parity-fixture/v1` configs. Those contracts are documented in [Visual Parity Report Contract](visual-parity-report.md) and describe source/target render metadata, viewports, screenshot paths, DOM matches, computed-style deltas, optional visual diff metrics, findings, selector evidence, and recommendations without baking in downstream product policy.
`components` contains inspectable component candidates discovered before materialization. `block_types` contains generated block type artifacts promoted from `block.json` roots. Canonical result envelopes must not expose `legacy_mapping`; consumer-owned migration mappers should derive compatibility data at their own boundary.
diff --git a/php-transformer/docs/contracts/visual-parity-report.md b/php-transformer/docs/contracts/visual-parity-report.md
index 01f25a4c18..cbba64715e 100644
--- a/php-transformer/docs/contracts/visual-parity-report.md
+++ b/php-transformer/docs/contracts/visual-parity-report.md
@@ -4,8 +4,8 @@ Visual parity tooling should exchange product-neutral reports instead of importe
Schemas live at:
-- `docs/contracts/php-transformer-visual-parity-report.schema.json`
-- `docs/contracts/php-transformer-visual-parity-fixture.schema.json`
+- [Report JSON Schema](php-transformer-visual-parity-report.schema.json)
+- [Fixture JSON Schema](php-transformer-visual-parity-fixture.schema.json)
## Report Shape
diff --git a/php-transformer/docs/wordpress-site-plan.md b/php-transformer/docs/contracts/wordpress-site-plan-v3.md
similarity index 96%
rename from php-transformer/docs/wordpress-site-plan.md
rename to php-transformer/docs/contracts/wordpress-site-plan-v3.md
index 93b80134e8..9b428deab0 100644
--- a/php-transformer/docs/wordpress-site-plan.md
+++ b/php-transformer/docs/contracts/wordpress-site-plan-v3.md
@@ -1,10 +1,18 @@
# WordPress Site Plan v3
-`blocks-engine/wordpress-site-plan/v3` is a destination-independent materialization contract. A consumer resolves it with `WordPressSitePlanResolver` and combines the resolved plan with its own materialization receipt. Destination IDs, paths outside declared writes, and product report formats remain consumer-owned.
+`blocks-engine/wordpress-site-plan/v3` is the destination-independent block-theme materialization contract emitted at `TransformerResult.source_reports.wordpress_site_plan` for artifact compilation. The public API is `WordPressSitePlan::fromResult()`, `WordPressSitePlan::assertValid()`, and `WordPressSitePlanResolver::resolve()`. A consumer combines the resolved plan with its own materialization receipt. Destination IDs, paths outside declared writes, and product report formats remain consumer-owned.
+
+## Canonical plan
+
+- `pages`, `templates`, and `template_parts` carry final `canonical_block_markup`; `routes` and `operations` declare the desired site structure and materialization order.
+- `writes` declares theme files and asset payloads under unique, normalized relative paths. `reference_tokens` binds asset references in canonical markup and stylesheets to declared assets. Resolution uses explicit destinations rather than rediscovering assets in the source.
+- `plan_identity` identifies canonical plan content; per-unit `reconciliation_identity` identifies stable source/target pairs independently of their mutable content. `diagnostics`, `quality`, and `reporting` describe the compiler outcome without dictating consumer policy.
+
+The v3 schema adds asset consumer and destination declarations and attachment resolution (see [Asset consumers and destinations](#asset-consumers-and-destinations)). The current validator requires v3; [v2](archive/wordpress-site-plan-v2.md) and [v1](archive/wordpress-site-plan-v1.md) are historical references, not alternative inputs to the current resolver.
## Omitted Pages
-A non-entrypoint page that cannot be compiled is omitted rather than failing the plan. Each one is a `page_compile_omitted` warning in the plan's `diagnostics` (unit `page`, with `source_path`, `reason_code` and `message`); the page is absent from `pages` and `routes`, and links to it are reported as unresolved navigation links. See [omitted-page-receipt](contracts/omitted-page-receipt.md).
+A non-entrypoint page that cannot be compiled is omitted rather than failing the plan. Each one is a `page_compile_omitted` warning in the plan's `diagnostics` (unit `page`, with `source_path`, `reason_code` and `message`); the page is absent from `pages` and `routes`, and links to it are reported as unresolved navigation links. See [omitted-page-receipt](omitted-page-receipt.md).
## Degraded Units
diff --git a/php-transformer/docs/issue-3279-investigation.md b/php-transformer/docs/issue-3279-investigation.md
deleted file mode 100644
index 89a4d1d86e..0000000000
--- a/php-transformer/docs/issue-3279-investigation.md
+++ /dev/null
@@ -1,153 +0,0 @@
-# #3279: retained control-label state, not per-page translation URLs
-
-This is the investigation/design-stop outcome requested in
-[issue #3279](https://github.com/Automattic/blocks-engine/issues/3279), not a
-shared-header implementation. Do not close the underlying behavior as fixed.
-Findings were posted in [the issue comment](https://github.com/Automattic/blocks-engine/issues/3279#issuecomment-6349556240).
-
-## Evidence and scope
-
-Read-only provider evidence `securetia` (tree SHA-256
-`41023be2353545ce6766c8b0e014c0e55edd59980ea58cc1e976bdf1a044a0ef`)
-contains 50 captured HTML documents, 18 exported post-content files, seven
-post-content-only theme templates, and no parts directory. The manifest declares
-51 desired page/post records, including a synthesized route. The original issue's
-27-page count is not the number of exported page files supplied here.
-
-The original import used php-transformer 0.44.102. A fresh compilation of all
-50 captured documents and their supplied assets in this checkout also produces
-**zero template parts** (51 planned records). No browser or WordPress is needed.
-The final header diagnostic is:
-
-```
-wordpress_site_plan_shell_retained_ambiguous
-provenance.reason = route_template_ambiguous
-message = header shell exclusions cannot be assigned distinct route templates.
-```
-
-This is more specific than simply saying every header has a unique identity.
-
-## Header diff: the URL hypothesis is false
-
-Extract `...` from every capture and compare the ordered
-`href` lists. There is exactly **one href list per language population**:
-11 default-language documents, 19 English documents, 20 Portuguese documents.
-Translation switchers point to language home routes, not each page's translation.
-Logo and CTA targets likewise do not vary within each population.
-
-For example, `index.html` and `nosotros/index.html` both have 29,481-byte
-headers and identical link targets. Their markup differs in the selected menu
-wrapper (`item-content-wrapper--active`) and the anchor's data attribute
-(`navigationblock-page-nosotros` versus `navigationblock-page-active-nosotros`).
-`vulseek/index.html` selects a different wrapper/anchor and also lacks empty
-`style=""` attributes on checkbox inputs. Desktop and mobile duplicate these
-menus, but there is only one header landmark per document; this is not #3267's
-nested-header problem.
-
-Across languages the differences are substantive, not just state: translated
-labels and data attributes, a different Services menu structure, different CTA
-text and targets, and different spacing. For example, default versus English
-Careers changes `--link-spacing` from 44px to 38px, `--element-spacing` from 25px
-to 42px and mobile logo width from 148px to 147px. These cannot become one
-language-independent part by ignoring hrefs.
-
-## Trace through the existing primitives
-
-`ShellExtraction::shellCandidates()` finds the landmark; the supplied imported
-post-content files each produce exactly one non-overlapping nested header
-candidate. Normalizing those 18 supplied files produces 14 identities: the
-largest cluster has four members (Home, thank-you, landing, credential report),
-the English resting cluster has two (English home and blog), and twelve are
-singletons. These are post-import identities, not a reconstruction of the
-original compiler's pre-import route map.
-
-Diffing normalized Home and About candidates pinpoints retained state in both:
-
-- `authored-input.labelMarkup`, containing the active wrapper and data attribute;
-- the corresponding saved `