feat(cli): add architect commands (discuss, breakdown)
Add CLI commands for architect workflow: - cw architect discuss <initiativeId> - start discuss mode - cw architect breakdown <initiativeId> - start breakdown mode Both require --name for agent name, with optional context flags.
This commit is contained in:
@@ -723,6 +723,59 @@ export function createCli(serverHandler?: (port?: number) => Promise<void>): Com
|
||||
}
|
||||
});
|
||||
|
||||
// Architect command group
|
||||
const architectCommand = program
|
||||
.command('architect')
|
||||
.description('Architect agent workflow');
|
||||
|
||||
// cw architect discuss <initiative-id>
|
||||
architectCommand
|
||||
.command('discuss <initiativeId>')
|
||||
.description('Start discussion phase for an initiative')
|
||||
.requiredOption('--name <name>', 'Agent name')
|
||||
.option('-c, --context <context>', 'Initial context')
|
||||
.action(async (initiativeId: string, options: { name: string; context?: string }) => {
|
||||
try {
|
||||
const client = createDefaultTrpcClient();
|
||||
const agent = await client.spawnArchitectDiscuss.mutate({
|
||||
name: options.name,
|
||||
initiativeId,
|
||||
context: options.context,
|
||||
});
|
||||
console.log(`Started architect agent in discuss mode`);
|
||||
console.log(` Agent: ${agent.name} (${agent.id})`);
|
||||
console.log(` Mode: ${agent.mode}`);
|
||||
console.log(` Initiative: ${initiativeId}`);
|
||||
} catch (error) {
|
||||
console.error('Failed to start discuss:', (error as Error).message);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
// cw architect breakdown <initiative-id>
|
||||
architectCommand
|
||||
.command('breakdown <initiativeId>')
|
||||
.description('Start breakdown phase for an initiative')
|
||||
.requiredOption('--name <name>', 'Agent name')
|
||||
.option('-s, --summary <summary>', 'Context summary from discuss phase')
|
||||
.action(async (initiativeId: string, options: { name: string; summary?: string }) => {
|
||||
try {
|
||||
const client = createDefaultTrpcClient();
|
||||
const agent = await client.spawnArchitectBreakdown.mutate({
|
||||
name: options.name,
|
||||
initiativeId,
|
||||
contextSummary: options.summary,
|
||||
});
|
||||
console.log(`Started architect agent in breakdown mode`);
|
||||
console.log(` Agent: ${agent.name} (${agent.id})`);
|
||||
console.log(` Mode: ${agent.mode}`);
|
||||
console.log(` Initiative: ${initiativeId}`);
|
||||
} catch (error) {
|
||||
console.error('Failed to start breakdown:', (error as Error).message);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user