From 77635b84525690d6f26d6b6355b53c62cf7dbf87 Mon Sep 17 00:00:00 2001 From: Copilot Date: Mon, 30 Mar 2026 17:46:12 +0300 Subject: [PATCH 01/15] feat(cli): upgrade squad watch to full work monitor with --execute mode (#708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add execute mode to the watch/triage loop so Ralph can autonomously spawn Copilot sessions to work on eligible issues. New CLI flags: --execute enable work-execution mode (default: triage only) --copilot-flags extra flags forwarded to copilot CLI --agent-cmd hidden override for the full agent command --max-concurrent parallel issue limit per round (default: 1) --timeout max minutes per issue execution (default: 30) New functions in watch.ts: buildAgentCommand — construct cmd+args for the agent subprocess executeIssue — claim issue, comment, spawn agent with timeout findExecutableIssues — filter board for ready-to-work issues selfPull — best-effort git fetch+pull between rounds Updated BoardState and reportBoard to include executed count. When --execute is NOT passed, behaviour is 100% identical to before. Part of #708 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/squad-cli/src/cli-entry.ts | 39 +++- packages/squad-cli/src/cli/commands/watch.ts | 227 ++++++++++++++++++- 2 files changed, 256 insertions(+), 10 deletions(-) diff --git a/packages/squad-cli/src/cli-entry.ts b/packages/squad-cli/src/cli-entry.ts index ba8f1f228..8b6b7eb22 100644 --- a/packages/squad-cli/src/cli-entry.ts +++ b/packages/squad-cli/src/cli-entry.ts @@ -159,8 +159,12 @@ async function main(): Promise { console.log(` ${BOLD}cost${RESET} Report token usage from orchestration logs`); console.log(` Flags: --all, --agent `); console.log(` ${BOLD}triage${RESET} Scan for work and categorize issues`); - console.log(` Usage: triage [--interval ]`); + console.log(` Usage: triage [--interval ] [--execute]`); console.log(` Default: checks every 10 minutes (Ctrl+C to stop)`); + console.log(` Flags: --execute (spawn agents to work on issues)`); + console.log(` --copilot-flags "..." (extra copilot CLI flags)`); + console.log(` --max-concurrent N (parallel issue limit, default 1)`); + console.log(` --timeout N (max minutes per issue, default 30)`); console.log(` ${BOLD}loop${RESET} Continuous work loop (Ralph mode)`); console.log(` Usage: loop [--filter