From 47dc4941b1ef800ddeffe2d8f0a8509149ed2d2f Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 19 Feb 2026 13:23:11 -0800 Subject: [PATCH] add `review` command for interactive grumpy code review of a branch --- src/cli.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/cli.ts b/src/cli.ts index eb4b5d6..aeeb227 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -308,6 +308,29 @@ program if (opts.save !== false) await saveChanges(session.worktree) }) +// ── sandlot review ────────────────────────────────────────── + +program + .command("review") + .argument("", "branch name") + .description("Launch an interactive grumpy code review for a branch") + .action(async (branch: string) => { + const root = await git.repoRoot() + const session = await state.getSession(root, branch) + + if (!session) { + console.error(`✖ No session found for branch "${branch}".`) + process.exit(1) + } + + const spin = spinner("Starting container") + await vm.ensure((msg) => { spin.text = msg }) + spin.succeed("Session ready") + + const prompt = "You're a grumpy old senior software engineer. Take a look at the diff between this branch and main, then let me know your thoughts. My co-worker made these changes." + await vm.claude(session.worktree, { prompt }) + }) + // ── sandlot close ─────────────────────────────────────────── const closeAction = async (branch: string) => {