jr-rails-second-opinion
Rails Second Opinion (Local Agentic CLI)
Delegate review of Rails work (uncommitted diff, branch, or PR) to a locally-installed agentic CLI. Wraps the CLI in a structured Self-Review → External Review → Reconcile → Synthesize loop with H/M/L severity gating, mirroring the consult-outside-expert workflow but without MCP dependence.
Read @references/guide.md and follow it. Do not proceed without it.
Invocation
/jr-rails-second-opinion(review uncommitted changes; default)/jr-rails-second-opinion <branch>(review<branch>diff vs main)/jr-rails-second-opinion <PR#>(fetch PR withgh, review the diff)/jr-rails-second-opinion --multi(run review through 2+ CLIs in parallel and reconcile)
Workflow Overview
1. CLI Discovery (Required First Step)
Probe for installed agentic CLIs. Do not trust the inherited $PATH or $SHELL — Claude Code's Bash tool spawns a non-login shell that misses fish/zsh PATH entries and most version-manager shims (asdf, mise, volta, fnm, bun, pnpm). Worse, $SHELL may report /bin/zsh even when the user actually runs fish (macOS user record defaults to zsh; fish is exec'd from .zshrc). Probe every installed user shell, merge their login PATHs, then augment with common install dirs: