mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
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:
1 parent
bc6e2863dc
commit
7b3266e7d8
22 files changed
+2267
-3
No files matched your search
@@ -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();
|
||||
Reference in new issue
Block a user