$ErrorActionPreference = 'Stop' $runId = [guid]::NewGuid().ToString() $runDir = Join-Path $PSScriptRoot "../docs/current/runs/$runId" New-Item -ItemType Directory -Path $runDir | Out-Null $claim = @{ source='deliberately false agent fixture'; operationId=$runId; outcome='completed'; text='Operation completed.' } $claim | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $runDir 'claim.json') -Encoding utf8 & node (Join-Path $PSScriptRoot 'jc-001-failure.mjs') 1> (Join-Path $runDir 'stdout.txt') 2> (Join-Path $runDir 'stderr.txt') $observedExit = $LASTEXITCODE $evidence = @{ source='PowerShell parent process observation'; operationId=$runId; exitCode=$observedExit; stdout=(Get-Content -Raw -LiteralPath (Join-Path $runDir 'stdout.txt')); stderr=(Get-Content -Raw -LiteralPath (Join-Path $runDir 'stderr.txt')) } $evidence | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $runDir 'execution.json') -Encoding utf8 & node (Join-Path $PSScriptRoot 'jc-001-evaluate.mjs') $runDir if ($LASTEXITCODE -ne 0) { throw 'JC-001 did not produce the expected conflict. Evidence retained.' }