$ErrorActionPreference = 'Stop' function Read-Utf8([string]$Path) { [System.IO.File]::ReadAllText((Join-Path (Join-Path $PSScriptRoot '..') $Path), [System.Text.Encoding]::UTF8) } function Assert-Contains([string]$Content,[string]$Expected) { if (-not $Content.Contains($Expected)) { throw "R02 contract missing: $Expected" } } $page = Read-Utf8 'pages/records/r02-person-detail.vue' $profiles = Read-Utf8 'styles/adaptive-frame-profiles.scss' foreach ($expected in @( 'class="person-detail-page"','person-detail-state--','class="person-identity-card"', 'class="person-edit-action"','class="person-save-action"','class="person-cancel-action"', 'shortFields','longFields','person-field__label','person-long-field__label','const enterEdit = () =>','const savePerson = () =>', 'const returnToPeople = () =>','@include adaptive.adaptive-records-person;','@include adaptive.adaptive-records-content;','@include adaptive.adaptive-records-field;', 'ModulePageBackground','PageHeader','AppButton','AppLoading','AppToast' )) { Assert-Contains $page $expected } foreach ($forbidden in @('