()
| 302 | lines.push(`- Status: ${proof.status}`); |
| 303 | lines.push(`- Setup: ${proof.summary.setup}`); |
| 304 | lines.push(`- Route: ${proof.summary.route}`); |
| 305 | lines.push(`- Verify: ${proof.summary.verify}`); |
| 306 | lines.push('---'); |
| 307 | return `${lines.join('\n')}\n`; |
| 308 | } |
| 309 | |
| 310 | function writeProof(projectRoot, proof) { |
| 311 | const outDir = path.join(projectRoot, '.planning', 'operating-proof'); |
| 312 | fs.mkdirSync(outDir, { recursive: true }); |
| 313 | const outPath = path.join(outDir, 'latest.md'); |
| 314 | fs.writeFileSync(outPath, renderProof(proof), 'utf8'); |
| 315 | proof.reportPath = normalizePath(path.relative(projectRoot, outPath)); |
| 316 | return proof.reportPath; |
| 317 | } |
| 318 | |
| 319 | function main() { |
| 320 | const args = parseArgs(process.argv.slice(2)); |
| 321 | if (args.help) { |
| 322 | process.stdout.write(`${usage()}\n`); |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | const proof = buildProof(args.projectRoot, { |
| 327 | runVerification: args.runVerification, |
no test coverage detected