Problem
Artifact compilation removes the entry page header/footer before WordPressSitePlan decides whether those shell candidates are canonical shared template parts. When shared-shell extraction is rejected as ambiguous, no template part is emitted and the entry page has already lost its shell. Fixture 37-art-gallery-exhibition reproduces this with wordpress_site_plan_shell_retained_ambiguous: compiled index.html has an empty .site-header and no source footer.
The relevant ordering is in php-transformer/src/ArtifactCompiler/ArtifactCompiler.php: entry conversion enables shell extraction, then compiledSiteReport() removes extracted entry shell markup before the site-plan result is known. Existing shared-shell tests cover ambiguous retention in page content but not this entry-removal sequence.
Work
- Decide canonical shared parts before removing entry shell markup, or restore original entry shell whenever extraction is declined.
- Preserve exactly one header/footer per route whether the shell becomes template parts or remains page content.
- Keep runtime-bound or otherwise non-extractable shell content intact.
- Emit explicit provenance for accepted versus rejected shell extraction.
Acceptance
- A multipage ambiguous-shell fixture retains exactly one header/footer on every route and emits no template part.
- A canonical shared-shell fixture still emits template parts without duplicate page shells.
- Fixture 37 no longer loses the entry shell for this reason.
- PHP transformer contract and parity suites pass.
Discovered through parallel GPT-5.6 Sol analysis in OpenCode; Chris owns the issue and acceptance criteria.
Problem
Artifact compilation removes the entry page header/footer before WordPressSitePlan decides whether those shell candidates are canonical shared template parts. When shared-shell extraction is rejected as ambiguous, no template part is emitted and the entry page has already lost its shell. Fixture
37-art-gallery-exhibitionreproduces this withwordpress_site_plan_shell_retained_ambiguous: compiledindex.htmlhas an empty.site-headerand no source footer.The relevant ordering is in
php-transformer/src/ArtifactCompiler/ArtifactCompiler.php: entry conversion enables shell extraction, thencompiledSiteReport()removes extracted entry shell markup before the site-plan result is known. Existing shared-shell tests cover ambiguous retention in page content but not this entry-removal sequence.Work
Acceptance
Discovered through parallel GPT-5.6 Sol analysis in OpenCode; Chris owns the issue and acceptance criteria.