feat: add plan2code-bot with --resume capability and state cleanup

Add the autonomous workflow test runner (plan2code-bot) that uses the
Claude Agent SDK to run plan2code end-to-end. Includes --resume flag
to continue incomplete runs from saved state, and automatic state file
cleanup on successful completion.
This commit is contained in:
jparkerweb committed 2026-03-01 21:30:45 -08:00
1 parent 63656d339d
commit c92865c395
22 files changed
+2267 -3

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { runCLI } from '../cli.js';
function parseArgs(): { idea?: string; resume?: boolean } {
const args = process.argv.slice(2);
const ideaIdx = args.indexOf('--idea');
const idea = ideaIdx !== -1 && ideaIdx + 1 < args.length ? args[ideaIdx + 1] : undefined;
const resume = args.includes('--resume');
return { idea, resume: resume || undefined };
}
async function main() {
try {
const { idea, resume } = parseArgs();
await runCLI({ idea, resume });
process.exit(0);
} catch (err) {
if (err instanceof Error && err.message.includes('User force closed')) {
process.exit(0);
}
console.error(err instanceof Error ? err.message : String(err));
process.exit(1);
}
}
main();