From 1165697e910ca27df215c31fbfe01b5bc7a1c956 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Sat, 31 Jan 2026 19:20:16 +0100 Subject: [PATCH] feat(cli): add architect commands (discuss, breakdown) Add CLI commands for architect workflow: - cw architect discuss - start discuss mode - cw architect breakdown - start breakdown mode Both require --name for agent name, with optional context flags. --- src/cli/index.ts | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/cli/index.ts b/src/cli/index.ts index 55295e8..a3840aa 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -723,6 +723,59 @@ export function createCli(serverHandler?: (port?: number) => Promise): Com } }); + // Architect command group + const architectCommand = program + .command('architect') + .description('Architect agent workflow'); + + // cw architect discuss + architectCommand + .command('discuss ') + .description('Start discussion phase for an initiative') + .requiredOption('--name ', 'Agent name') + .option('-c, --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 + architectCommand + .command('breakdown ') + .description('Start breakdown phase for an initiative') + .requiredOption('--name ', 'Agent name') + .option('-s, --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; }