| name | codex-plan-critique |
| description | Invoke Codex CLI as peer reviewer during planning phases. Use when "planning an implementation", "designing a solution", "in plan mode", "architecting a feature", or about to "propose a plan" to get critique before presenting to user. |
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
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:
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:
★ Codex Peer Review ─────────────────────────
[Critique output here]
──────────────────────────────────────────────
Error Handling
If Codex unavailable:
- Log warning
- Continue without blocking
- Note: "Peer review skipped - Codex unavailable"
Requirements
codex CLI installed and authenticated
- OPENAI_API_KEY or
codex login