import { readFileSync } from "node:fs"; import { join } from "node:path"; import { jsonFile } from "../lib/forward.ts"; import { forwardAcceptance, type StudySummary, } from "../lib/forward-evidence.ts"; // 显式总体程序验收:先对三份研究运行 stats,再用该统计目录检查任务书16的完整批次。 // node eval/forward/acceptance.ts <统计输出目录> const [statsDir, ...extra] = process.argv.slice(2); if (!statsDir || extra.length) throw new Error("用法:node eval/forward/acceptance.ts <统计输出目录>"); const summaries = JSON.parse( readFileSync(join(statsDir, "stats.json"), "utf8"), ) as StudySummary[]; const result = forwardAcceptance(summaries); jsonFile(join(statsDir, "acceptance.json"), result); console.log( `任务书16总体程序验收${result.pass ? "通过" : "未通过"};详见 ${join(statsDir, "acceptance.json")};质量判断仍待独立阅读。`, ); if (!result.pass) process.exitCode = 1;