PGHQ

second-opinion - Adversarial plan review for AI coding agents

by
Adversarial second-opinion reviews for AI coding agents. Auto-gates risky plans before ExitPlanMode and routes them through Codex/Gemini/Opencode for a fresh-lineage critique — with a self-review fallback. Ships as a Claude Code plugin and a portable skill. - pghqdev/second-opinion

Add a comment

Replies

Best
PGHQ
Maker
📌
I kept noticing that my AI coding agent was a confident collaborator to a fault. It wrote migrations that almost worked, approved architectures from its own training distribution, and validated its own plans without pushing back. Asking the same model for a second opinion just got me a different roll of the same die. second-opinion is a small skill and hook that fixes this. When you exit plan mode on something risky — migrations, auth, billing, infra, destructive ops, >3 files touched — it auto-intercepts and routes the plan through a different AI CLI (Codex, Gemini, or Opencode) for an adversarial review. If no external reviewer is installed, it falls back to a fresh-context self-review with an adversarial prompt. Either way you get a compact verdict: SHIP, REVISE, or RECONSIDER — with specific concerns and a simpler alternative if one exists. Two design choices I care about: 1. It runs in a subagent so the reviewer's 5–20k reasoning tokens never pollute your main context. 2. The prompt and JSON schema force the reviewer to commit to agreement AND disagreement separately, so genuine concurrence is a real signal instead of reflex praise. Install is one line: curl -fsSL https://raw.githubusercontent.co... | bash Also ships as a Claude Code plugin. MIT-licensed. Would love feedback — especially on the trigger heuristics and which other CLIs you'd want the dispatcher to try.