| 46 | Output ONLY minified JSON: {"verdict":"pass|partial|fail","score":<0-100>,"fabrication":<true|false>,"coverageHonest":<true|false>,"note":"<=20 words"}`; |
| 47 | |
| 48 | const askJudge = (prompt) => new Promise((res) => { |
| 49 | execFile('claude', ['-p', prompt, '--model', 'sonnet', '--effort', 'high', '--max-budget-usd', '0.5', |
| 50 | '--strict-mcp-config', '--mcp-config', '{"mcpServers":{}}'], |
| 51 | { cwd: OUT, maxBuffer: 1 << 24, timeout: 120000 }, (err, stdout) => { |
| 52 | const m = (stdout || '').match(/\{[\s\S]*\}/); |
| 53 | if (!m) return res({ verdict: 'error', score: null, note: (err ? err.message : 'no json').slice(0, 60) }); |
| 54 | try { res(JSON.parse(m[0])); } catch { res({ verdict: 'error', score: null }); } |
| 55 | }); |
| 56 | }); |
| 57 | |
| 58 | // ---- 1. Probe: collect synthesized answers at each effort ------------------- |
| 59 | const records = []; |