Skip to content

feat: add Gemini CLI as second opinion backend for /codex#560

Open
agi-bootstrap wants to merge 1 commit intogarrytan:mainfrom
agi-bootstrap:feat/gemini-second-opinion
Open

feat: add Gemini CLI as second opinion backend for /codex#560
agi-bootstrap wants to merge 1 commit intogarrytan:mainfrom
agi-bootstrap:feat/gemini-second-opinion

Conversation

@agi-bootstrap
Copy link
Copy Markdown

Summary

  • Adds Google Gemini CLI as an alternative backend for the /codex second opinion skill
  • New bin/gstack-second-opinion dispatcher script auto-detects which CLI is installed (codex or gemini) and routes commands through the right one
  • Configurable via gstack-config set second_opinion_backend gemini|codex|auto
  • All resolvers (review.ts, design.ts, constants.ts) and the /codex skill template updated to use the dispatcher instead of hardcoded codex commands
  • Backwards compatible: existing Codex users see no change. Gemini users (free, no subscription needed) can now use /codex review, /codex challenge, and /codex consult

Motivation

Codex CLI requires an OpenAI subscription. Gemini CLI is free with a Google account. Many gstack users can't use the second opinion feature today. This PR makes it work for everyone.

What changed

File Change
bin/gstack-second-opinion New dispatcher: detect, name, exec, review, resume subcommands
scripts/resolvers/constants.ts Added secondOpinionErrorHandling(), secondOpinionDetection()
scripts/resolvers/review.ts 3 functions updated to use dispatcher
scripts/resolvers/design.ts 3 locations updated to use dispatcher
codex/SKILL.md.tmpl Rewritten for backend-agnostic second opinion
9 generated SKILL.md files Regenerated via bun run gen:skill-docs

Known limitations

  • autoplan/SKILL.md.tmpl still has inline codex exec calls for dual-voice sections (follow-up PR)
  • Codex JSONL reasoning traces ([codex thinking]) are simplified to plain text output for both backends
  • Gemini has no equivalent for model_reasoning_effort or --enable web_search_cached (silently ignored)

Test plan

  • gstack-config set second_opinion_backend gemini then /codex review uses Gemini
  • gstack-config set second_opinion_backend codex then /codex review uses Codex
  • gstack-config set second_opinion_backend auto uses whichever is installed
  • Neither installed: clear error with install instructions for both
  • bun run gen:skill-docs succeeds

🤖 Generated with Claude Code

The /codex skill now supports both OpenAI Codex CLI and Google Gemini CLI
as the second opinion provider. Backend is auto-detected at runtime (codex
first, then gemini) or explicitly configured via:

  gstack-config set second_opinion_backend gemini|codex|auto

New bin/gstack-second-opinion dispatcher centralizes all CLI-specific logic
so resolvers and templates stay backend-agnostic. Supports exec, review,
resume, detect, and name subcommands.

All resolvers (review.ts, design.ts, constants.ts) and the codex/SKILL.md.tmpl
updated to use the dispatcher. Generated SKILL.md files regenerated.

Follow-up: autoplan/SKILL.md.tmpl still has inline codex exec calls for
dual-voice sections that need separate migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant