feat: add Gemini CLI as cross-model second-opinion provider#562
Open
fubla wants to merge 1 commit intogarrytan:mainfrom
Open
feat: add Gemini CLI as cross-model second-opinion provider#562fubla wants to merge 1 commit intogarrytan:mainfrom
fubla wants to merge 1 commit intogarrytan:mainfrom
Conversation
Add Google Gemini CLI as a fallback cross-model second-opinion provider in all skills that currently use Codex. The detection pattern checks for Codex first, then Gemini, then falls back to Claude subagent. Affected resolvers: - review.ts: generateCodexSecondOpinion, generateAdversarialStep, generateCodexPlanReview - design.ts: generateDesignReviewLite, generateDesignSketch, generateDesignOutsideVoices Gemini CLI command mapping: - codex exec "..." -s read-only → gemini --prompt "..." - codex review --base <base> → gemini --prompt with diff piped in All provider errors remain non-blocking with Claude subagent fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Google Gemini CLI (
npm install -g @google/gemini-cli) as a fallback cross-model second-opinion provider in all skills that currently use Codex. When Codex is not installed but Gemini CLI is available, skills now use Gemini instead of skipping the cross-model review entirely or falling back to a same-model Claude subagent.Detection pattern (replaces
which codex):Command mapping:
codex exec "prompt" -s read-onlygemini --prompt "prompt"codex review --base maingemini --promptwith diff contentAffected skills (10 total):
/office-hours— Phase 3.5 second opinion/ship— adversarial review (medium + large tier), design review lite/review— adversarial review, design review lite/plan-ceo-review— outside voice/plan-eng-review— outside voice/plan-design-review— design outside voices/design-review— design outside voices/design-consultation— design sketch outside voicesSource changes (2 files):
scripts/resolvers/review.ts—generateCodexSecondOpinion,generateAdversarialStep,generateCodexPlanReviewscripts/resolvers/design.ts—generateDesignReviewLite,generateDesignSketch,generateDesignOutsideVoicesAll generated SKILL.md files regenerated for both Claude and Codex hosts via
bun run gen:skill-docs.Design decisions
gstack-configchanges needed. Detection is purely binary-based (which gemini).--promptflag: Gemini CLI uses--promptfor non-interactive single-shot mode (vs Codex'sexecsubcommand). Forcodex review(structured diff review with no Gemini equivalent), the diff is piped into the prompt with review instructions.Why this matters
Gemini CLI is free (1,000 requests/day with a personal Google account, Gemini 2.5 Pro with 1M context). Many gstack users may not have Codex but do have Google accounts. This change means cross-model second opinions — which catch real blind spots that same-model reviews miss — are accessible to a much larger user base.
Test plan
bun run gen:skill-docssucceeds for Claude hostbun run gen:skill-docs --host codexsucceeds for Codex host/office-hourswith Gemini installed, Codex not installed → Gemini used for Phase 3.5/shipwith Gemini installed → adversarial review uses Gemini🤖 Generated with Claude Code