| 31 | } |
| 32 | |
| 33 | function render(plan) { |
| 34 | const lines = [ |
| 35 | 'Citadel Verification Plan', |
| 36 | '='.repeat(40), |
| 37 | `Profile: ${plan.id}`, |
| 38 | `Label: ${plan.label}`, |
| 39 | `Reason: ${plan.reason}`, |
| 40 | `Primary: ${plan.primaryCommand}`, |
| 41 | '', |
| 42 | 'Commands', |
| 43 | ]; |
| 44 | |
| 45 | for (const command of plan.commands) lines.push(` - ${command}`); |
| 46 | |
| 47 | lines.push(''); |
| 48 | lines.push('Changed Files'); |
| 49 | if (plan.changedFiles.length === 0) lines.push(' (none detected)'); |
| 50 | else for (const file of plan.changedFiles.slice(0, 20)) lines.push(` - ${file}`); |
| 51 | |
| 52 | if (plan.notes.length > 0) { |
| 53 | lines.push(''); |
| 54 | lines.push('Notes'); |
| 55 | for (const note of plan.notes) lines.push(` - ${note}`); |
| 56 | } |
| 57 | |
| 58 | lines.push(''); |
| 59 | lines.push('---HANDOFF---'); |
| 60 | lines.push(`- Verification profile: ${plan.id}`); |
| 61 | lines.push(`- Primary command: ${plan.primaryCommand}`); |
| 62 | lines.push(`- Recommended commands: ${plan.commands.length}`); |
| 63 | lines.push('---'); |
| 64 | return `${lines.join('\n')}\n`; |
| 65 | } |
| 66 | |
| 67 | function main() { |
| 68 | const args = parseArgs(process.argv.slice(2)); |