$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $pages = @{ T03 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t03-member-profile.vue') -Raw -Encoding UTF8 T04 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t04-add-relative.vue') -Raw -Encoding UTF8 T05 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t05-edit-member.vue') -Raw -Encoding UTF8 T06 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t06-edit-relationship.vue') -Raw -Encoding UTF8 } foreach ($entry in $pages.GetEnumerator()) { if ($entry.Value -match ')|import\s+TreeMemberForm') { throw "$($entry.Key) must own its workflow" } foreach ($nativeUi in @('uni.showToast', 'uni.showModal', 'uni.showLoading', 'uni.showActionSheet')) { if ($entry.Value.Contains($nativeUi)) { throw "$($entry.Key) must not use $nativeUi" } } } foreach ($key in @('T04', 'T05', 'T06')) { $content = $pages[$key] foreach ($required in @('appApi.getPerson(', 'createRequestController', 'isRequestCancelled')) { if (-not $content.Contains($required)) { throw "$key missing remote read owner: $required" } } foreach ($forbidden in @('@/data/mock.js', 'setTimeout(', 'preview')) { if ($content.Contains($forbidden)) { throw "$key retains forbidden local preview token: $forbidden" } } } if (-not $pages.T06.Contains('"unavailable"')) { throw 'T06 must expose a closed service state' } foreach ($required in @('appApi.getPerson(', 'memberContextDescription', 'openPage("T08"')) { if (-not $pages.T03.Contains($required)) { throw "T03 missing member detail contract: $required" } } Write-Output 'T03-T08-BUSINESS-SPECIALIZATION-CONTRACT PASS REMOTE-CLOSED'