#!/usr/bin/env node // lib/verification/criteria-runner.mjs // Runs the falsifiable checks a pipeline artifact DECLARES, and reports a // verdict built from exit codes rather than from a reader's impression. // // Two artifacts declare such checks: // plan `## Verification` — `- [ ] `cmd` -> expected: ...` (V1..Vn) // brief `## Success Criteria` — `- text: `cmd` ...` (SC1..SCn) // // Why this is code and not prose: `/trekexecute` must be able to FELL a // single-session run on a criterion that does not hold, and `/trekreview` must // hand `brief-conformance-reviewer` a real result instead of asking a // Read/Glob/Grep agent to judge whether a command "passes". Neither is // checkable while it lives only as an instruction. // // Fail-closed everywhere: a criterion that cannot run — placeholder text, no // command, a screen that is unavailable — is NEVER reported as passed. // // Screening, two layers: every command is first screened against this file's // own ALLOWLIST of test runners (npm test, node --test, pytest, `bash // tests/