feat: add optional Codex CLI co-reviewer for Phase 4#8
Merged
Conversation
Adds OpenAI's Codex CLI as a cross-vendor second reviewer alongside Lawliet in /orchestrate Phase 4, breaking the Sonnet-only monoculture on the review gate without touching Alphonse's authoritative test gate. The integration is availability-gated and safe-by-default: - scripts/detect-codex-context.sh detects codex binary + auth artifact (honors $CODEX_HOME, falls back to ~/.codex). Emits codex:available YAML consumed by init-orchestration.sh. - When unavailable, Phase 4 behavior is identical to today (Lawliet-only). - When available, codex runs via `codex exec -s read-only --ignore-user-config -c model_reasoning_effort="high"` with full context: task description, Lawliet's verdict+findings, git diff HEAD. - AGENTS.md at the repo root carries the review rubric (codex auto-loads it on every invocation). - Disagreement truth table codifies Lawliet-wins on linter-grounded findings; codex findings without a file:line citation are advisory only and cannot trigger NEEDS_CHANGES. During dogfood, codex found two real bugs Lawliet missed (CODEX_HOME not respected by detector; diagnostic message hardcoded path) — validating the cross-vendor orthogonal-signal hypothesis. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Extract Codex dispatch into scripts/dispatch-codex-review.sh, shared by /orchestrate and /team-orchestrate so verdict-merge stays in lockstep. - Add Step 7.5 Codex co-review to commands/team-orchestrate.md and wire detect-codex-context.sh into scripts/init-team-orchestration.sh so codex.available is baked into team-orchestration.local.md. - Honor AGENT_FLOW_NO_CODEX=1 per-run opt-out in detect-codex-context.sh (env var must be set at Claude Code startup). - Document team-mode parity and the data-boundary in docs/guides/using-codex-review.md; collapse the truth table in skills/verification-gates to a pointer to commands/orchestrate.md (canonical). - Clarify Lawliet's edge-case scope (agents/Lawliet.md) and narrow the shell-safety rubric scope (AGENTS.md) so embedded Bash in commands/*.md isn't falsely flagged. - Gitignore .claude/codex/ (dispatcher tmp dir) and *.bak / .mcp.json.bak. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Adds OpenAI's Codex CLI as a cross-vendor second reviewer alongside Lawliet in /orchestrate Phase 4, breaking the Sonnet-only monoculture on the review gate without touching Alphonse's authoritative test gate.
The integration is availability-gated and safe-by-default:
codex exec -s read-only --ignore-user-config -c model_reasoning_effort="high"with full context: task description, Lawliet's verdict+findings, git diff HEAD.During dogfood, codex found two real bugs Lawliet missed (CODEX_HOME not respected by detector; diagnostic message hardcoded path) — validating the cross-vendor orthogonal-signal hypothesis.