MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / askJudge

Function askJudge

scripts/agent-eval/offload-eval-effort.mjs:48–56  ·  view source on GitHub ↗
(prompt)

Source from the content-addressed store, hash-verified

46Output ONLY minified JSON: {"verdict":"pass|partial|fail","score":<0-100>,"fabrication":<true|false>,"coverageHonest":<true|false>,"note":"<=20 words"}`;
47
48const 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 -------------------
59const records = [];

Callers 1

workerFunction · 0.70

Calls 1

resFunction · 0.85

Tested by

no test coverage detected