From 73af4fa81558a1e5fc096a84d1090251b2654bf3 Mon Sep 17 00:00:00 2001 From: ngothanhluan Date: Thu, 2 Apr 2026 06:30:01 +0700 Subject: [PATCH 1/3] feat: add OpenCode as a peer reviewer in /gsd:review Adds OpenCode CLI as a 5th reviewer option, enabling teams with GitHub Copilot subscriptions to leverage Copilot-routed models (e.g. gpt-5.3-codex) for cross-AI plan reviews. Closes #1520 Co-Authored-By: Claude Opus 4.6 (1M context) --- commands/gsd/review.md | 5 +++-- get-shit-done/workflows/review.md | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/commands/gsd/review.md b/commands/gsd/review.md index 84d8171f6..b298dc61e 100644 --- a/commands/gsd/review.md +++ b/commands/gsd/review.md @@ -1,7 +1,7 @@ --- name: gsd:review description: Request cross-AI peer review of phase plans from external AI CLIs -argument-hint: "--phase N [--gemini] [--claude] [--codex] [--all]" +argument-hint: "--phase N [--gemini] [--claude] [--codex] [--opencode] [--all]" allowed-tools: - Read - Write @@ -11,7 +11,7 @@ allowed-tools: --- -Invoke external AI CLIs (Gemini, Claude, Codex) to independently review phase plans. +Invoke external AI CLIs (Gemini, Claude, Codex, OpenCode) to independently review phase plans. Produces a structured REVIEWS.md with per-reviewer feedback that can be fed back into planning via /gsd:plan-phase --reviews. @@ -29,6 +29,7 @@ Phase number: extracted from $ARGUMENTS (required) - `--gemini` — Include Gemini CLI review - `--claude` — Include Claude CLI review (uses separate session) - `--codex` — Include Codex CLI review +- `--opencode` or `--copilot` — Include OpenCode review (routes through GitHub Copilot models) - `--all` — Include all available CLIs diff --git a/get-shit-done/workflows/review.md b/get-shit-done/workflows/review.md index 8b8a85be3..5a71b2f27 100644 --- a/get-shit-done/workflows/review.md +++ b/get-shit-done/workflows/review.md @@ -19,6 +19,7 @@ command -v gemini >/dev/null 2>&1 && echo "gemini:available" || echo "gemini:mis command -v claude >/dev/null 2>&1 && echo "claude:available" || echo "claude:missing" command -v codex >/dev/null 2>&1 && echo "codex:available" || echo "codex:missing" command -v coderabbit >/dev/null 2>&1 && echo "coderabbit:available" || echo "coderabbit:missing" +command -v opencode >/dev/null 2>&1 && echo "opencode:available" || echo "opencode:missing" ``` Parse flags from `$ARGUMENTS`: @@ -26,6 +27,7 @@ Parse flags from `$ARGUMENTS`: - `--claude` → include Claude - `--codex` → include Codex - `--coderabbit` → include CodeRabbit +- `--opencode` or `--copilot` → include OpenCode (routes through GitHub Copilot models) - `--all` → include all available - No flags → include all available @@ -35,6 +37,7 @@ No external AI CLIs found. Install at least one: - gemini: https://github.com/google-gemini/gemini-cli - codex: https://github.com/openai/codex - claude: https://github.com/anthropics/claude-code +- opencode: https://opencode.ai (leverages GitHub Copilot subscription models) Then run /gsd:review again. ``` @@ -141,6 +144,11 @@ Note: CodeRabbit reviews the current git diff/working tree — it does not accep coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase}.md ``` +**OpenCode (via GitHub Copilot):** +```bash +cat /tmp/gsd-review-prompt-{phase}.md | opencode run - -m "github-copilot/gpt-5.3-codex" --variant high 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md +``` + If a CLI fails, log the error and continue with remaining CLIs. Display progress: @@ -160,7 +168,7 @@ Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`: ```markdown --- phase: {N} -reviewers: [gemini, claude, codex, coderabbit] +reviewers: [gemini, claude, codex, coderabbit, opencode] reviewed_at: {ISO timestamp} plans_reviewed: [{list of PLAN.md files}] --- @@ -191,6 +199,12 @@ plans_reviewed: [{list of PLAN.md files}] --- +## OpenCode Review (GitHub Copilot / GPT-5.3-Codex) + +{opencode review content} + +--- + ## Consensus Summary {synthesize common concerns across all reviewers} From 2ff3853eabe325e0884352355154ca29d59b4598 Mon Sep 17 00:00:00 2001 From: ngothanhluan Date: Fri, 3 Apr 2026 06:36:16 +0700 Subject: [PATCH 2/3] fix: address review feedback for OpenCode reviewer integration - Remove --copilot alias to avoid collision with existing Copilot concept - Remove hardcoded model (-m) and variant flags; let user's OpenCode config determine the model, consistent with other reviewer CLIs - Use generic "OpenCode Review" section header since model varies by config Co-Authored-By: Claude Opus 4.6 (1M context) --- commands/gsd/review.md | 2 +- get-shit-done/workflows/review.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/gsd/review.md b/commands/gsd/review.md index b298dc61e..eaad1ac36 100644 --- a/commands/gsd/review.md +++ b/commands/gsd/review.md @@ -29,7 +29,7 @@ Phase number: extracted from $ARGUMENTS (required) - `--gemini` — Include Gemini CLI review - `--claude` — Include Claude CLI review (uses separate session) - `--codex` — Include Codex CLI review -- `--opencode` or `--copilot` — Include OpenCode review (routes through GitHub Copilot models) +- `--opencode` — Include OpenCode review (uses model from user's OpenCode config) - `--all` — Include all available CLIs diff --git a/get-shit-done/workflows/review.md b/get-shit-done/workflows/review.md index 5a71b2f27..23f25ff36 100644 --- a/get-shit-done/workflows/review.md +++ b/get-shit-done/workflows/review.md @@ -27,7 +27,7 @@ Parse flags from `$ARGUMENTS`: - `--claude` → include Claude - `--codex` → include Codex - `--coderabbit` → include CodeRabbit -- `--opencode` or `--copilot` → include OpenCode (routes through GitHub Copilot models) +- `--opencode` → include OpenCode - `--all` → include all available - No flags → include all available @@ -146,7 +146,7 @@ coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase} **OpenCode (via GitHub Copilot):** ```bash -cat /tmp/gsd-review-prompt-{phase}.md | opencode run - -m "github-copilot/gpt-5.3-codex" --variant high 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md +cat /tmp/gsd-review-prompt-{phase}.md | opencode run - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md ``` If a CLI fails, log the error and continue with remaining CLIs. @@ -199,7 +199,7 @@ plans_reviewed: [{list of PLAN.md files}] --- -## OpenCode Review (GitHub Copilot / GPT-5.3-Codex) +## OpenCode Review {opencode review content} From 372c0356e580d5a38fb592c6264a9d7371cf5e0d Mon Sep 17 00:00:00 2001 From: ngothanhluan Date: Fri, 3 Apr 2026 06:56:50 +0700 Subject: [PATCH 3/3] fix: add empty output guard for OpenCode reviewer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses review feedback — checks if opencode output file is non-empty after invocation, writes a failure message if empty to prevent blank sections in REVIEWS.md. Co-Authored-By: Claude Opus 4.6 (1M context) --- get-shit-done/workflows/review.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/get-shit-done/workflows/review.md b/get-shit-done/workflows/review.md index 23f25ff36..598ea6091 100644 --- a/get-shit-done/workflows/review.md +++ b/get-shit-done/workflows/review.md @@ -147,6 +147,9 @@ coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase} **OpenCode (via GitHub Copilot):** ```bash cat /tmp/gsd-review-prompt-{phase}.md | opencode run - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md +if [ ! -s /tmp/gsd-review-opencode-{phase}.md ]; then + echo "OpenCode review failed or returned empty output." > /tmp/gsd-review-opencode-{phase}.md +fi ``` If a CLI fails, log the error and continue with remaining CLIs.