$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $g01 = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g01-my-genealogies.vue') -Raw -Encoding utf8 $appLoading = Get-Content -LiteralPath (Join-Path $root 'components/AppLoading.vue') -Raw -Encoding utf8 function Assert-Match { param([string]$Content, [string]$Pattern, [string]$Message) if ($Content -notmatch $Pattern) { throw $Message } } Assert-Match -Content $g01 -Pattern 'import AppLoading from "@/components/AppLoading\.vue";' -Message 'G01 loading state must import the global AppLoading component' Assert-Match -Content $g01 -Pattern '(?s)\s*\s*' -Message 'G01 loading state must pass its approved title and supporting copy directly to AppLoading' Assert-Match -Content $appLoading -Pattern 'class="app-loading__seal"\s+src="/static/assets/foundation/transparent/brand-seal\.png"' -Message 'Global AppLoading must retain its approved red-gold seal asset' Assert-Match -Content $appLoading -Pattern 'app-loading-seal-breathe' -Message 'Global AppLoading must retain its restrained seal breathing motion' if ($g01 -match 'loading-seal') { throw 'G01 loading state must not retain the legacy hollow loading seal' } if ($g01 -match 'state-copy--loading') { throw 'G01 loading state must not duplicate AppLoading description layout' } Write-Output 'G01-LOADING-STATE-CONTRACT PASS'