Feature Request
Background
Currently gh pr merge is blocked by guardrails and merges must be done manually via GitHub UI. The current guardrail merge gate checks for a single code-reviewer agent pass (review_state === "done").
Proposal
Require LGTM from two independent AI pipelines before a PR can be merged — analogous to requiring two human approvals, but using models with different training and architectures to eliminate shared blind spots.
Suggested reviewers:
codex — OpenAI Codex CLI (/codex review skill)
glm-5.1 via zai-coding-plan provider — GLM 5.1 as the second opinion
Both must return LGTM before gh pr merge is unblocked.
Motivation
This mirrors the pattern already used in Claude Code (dual AI review loop). The rationale:
- Model-specific blind spots — Codex and GLM 5.1 have different training data and architectures; each catches issues the other may miss.
- No self-review bias — A single model reviewing its own output has confirmation bias.
- Consistent with existing design — The guardrail already enforces
denyFree, denyPreview, and CI gates as layered quality gates. Dual-review extends this principle.
- Asymmetric failure mode — A false LGTM from one model is much less likely to be replicated by a structurally different model.
Implementation Sketch
In guardrail.ts, extend the merge gate state tracking:
// New state fields
review_codex_state: "done" | ""
review_glm_state: "done" | ""
In tool.execute.before bash check for gh pr merge:
if (str(data.review_codex_state) !== "done" || str(data.review_glm_state) !== "done") {
throw new Error(text("merge blocked: dual review required — run /codex review AND glm-5.1 code-reviewer before merging"))
}
In tool.execute.after for task completions, detect which agent/model completed:
if (agent === "codex" || cmd.includes("codex review")) mark({ review_codex_state: "done" })
if (model.includes("glm-5.1")) mark({ review_glm_state: "done" })
Acceptance Criteria
gh pr merge is blocked until both review_codex_state and review_glm_state are "done"
- Either review becoming stale (new push after review) resets the corresponding state
- The block message clearly names which review(s) are still pending
Related
- Current single-reviewer gate:
guardrail.ts L672–683
- Codex review skill:
/Users/teradakousuke/.claude/skills/codex/SKILL.md
- Review loop skill:
/Users/teradakousuke/.claude/skills/review-loop/SKILL.md
Feature Request
Background
Currently
gh pr mergeis blocked by guardrails and merges must be done manually via GitHub UI. The current guardrail merge gate checks for a singlecode-revieweragent pass (review_state === "done").Proposal
Require LGTM from two independent AI pipelines before a PR can be merged — analogous to requiring two human approvals, but using models with different training and architectures to eliminate shared blind spots.
Suggested reviewers:
codex— OpenAI Codex CLI (/codex reviewskill)glm-5.1viazai-coding-planprovider — GLM 5.1 as the second opinionBoth must return LGTM before
gh pr mergeis unblocked.Motivation
This mirrors the pattern already used in Claude Code (dual AI review loop). The rationale:
denyFree,denyPreview, and CI gates as layered quality gates. Dual-review extends this principle.Implementation Sketch
In
guardrail.ts, extend the merge gate state tracking:In
tool.execute.beforebash check forgh pr merge:In
tool.execute.afterfor task completions, detect which agent/model completed:Acceptance Criteria
gh pr mergeis blocked until bothreview_codex_stateandreview_glm_stateare"done"Related
guardrail.tsL672–683/Users/teradakousuke/.claude/skills/codex/SKILL.md/Users/teradakousuke/.claude/skills/review-loop/SKILL.md