$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g12-generation-poems.vue') -Raw -Encoding UTF8 foreach ($token in @('startGeneration', 'currentGeneration', 'characters.map(', 'maxlength="50"', 'stopMissingOldGeneration.value')) { if (-not $page.Contains($token)) { throw "G12 capacity contract missing: $token" } } if ($page -match '\.slice\(0,\s*4\)') { throw 'G12 must not truncate poem data to four generations' } Write-Output 'G12-GENERATION-POEM-CAPACITY-CONTRACT PASS'