Skip to content

feat: add optional Codex CLI co-reviewer for Phase 4#8

Merged
josix merged 2 commits into
mainfrom
wilson/codex-integration
May 18, 2026
Merged

feat: add optional Codex CLI co-reviewer for Phase 4#8
josix merged 2 commits into
mainfrom
wilson/codex-integration

Conversation

@josix
Copy link
Copy Markdown
Owner

@josix josix commented May 18, 2026

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.

josix and others added 2 commits May 18, 2026 19:51
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>
@josix josix merged commit e6f3901 into main May 18, 2026
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