Codex Plan Critique
Invoke Codex CLI to peer-review plans before presenting to user. Codex runs in the project directory with visibility to all files.
Workflow
- •Write plan to a temp file (e.g.,
/tmp/plan-critique.md) - •Run critique script with project dir and user prompt
- •Display critique to user
- •Incorporate valid concerns into final plan
Running the Critique
bash
scripts/codex-critique.sh <plan-file> <project-dir> "<user-prompt>"
Arguments:
- •
plan-file- Path to plan file - •
project-dir- Project root (Codex runs here for file access) - •
user-prompt- Original user request for context
Example:
bash
scripts/codex-critique.sh /tmp/plan.md /Users/ad/myproject "Add user authentication"
Output format:
- •Verdict: APPROVE or CONCERNS
- •Strengths: What's good
- •Concerns: Issues with suggestions
Display Format
Present critique to user:
code
★ Codex Peer Review ───────────────────────── [Critique output here] ──────────────────────────────────────────────
Error Handling
If Codex unavailable:
- •Log warning
- •Continue without blocking
- •Note: "Peer review skipped - Codex unavailable"
Requirements
- •
codexCLI installed and authenticated - •OPENAI_API_KEY or
codex login