Claude-code-minoan codex-cto
Inverted orchestration—Codex CLI acts as CTO (planning and reviewing), Claude Code executes with native tools. Use when a task benefits from external architectural oversight before and after implementation.
git clone https://github.com/tdimino/claude-code-minoan
T=$(mktemp -d) && git clone --depth=1 https://github.com/tdimino/claude-code-minoan "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/integration-automation/codex-cto" ~/.claude/skills/tdimino-claude-code-minoan-codex-cto && rm -rf "$T"
skills/integration-automation/codex-cto/SKILL.mdCodex CTO — Inverted Orchestration
Codex plans and reviews. Claude Code executes. This inverts the
codex-orchestrator pattern: instead of Claude Code delegating to Codex subagents, Codex directs Claude Code as the engineering team.
Protocol
1. CTO plans → cto-invoke.sh plan "<objective>" 2. You execute → native tools (Read, Edit, Write, Bash, Glob, Grep) 3. CTO reviews → cto-invoke.sh review "<objective + results>" 4. Loop → if "revise", fix and re-submit for review (max 5 iterations)
Step 1: Get the Plan
Run the plan phase with the user's objective:
~/.claude/skills/codex-cto/scripts/cto-invoke.sh plan "<OBJECTIVE>" [--model MODEL]
Parse the returned JSON. It contains:
— what to accomplishobjective
— CTO's assessment of the codebaseanalysis
— high-level approachstrategy
— ordered task list with IDs, actions, targets, descriptions, acceptance criteria, and dependenciestasks[]
— commands to run after all tasks completeverification
Step 2: Execute Tasks
Work through each task in dependency order using native tools. For each task:
- Read the
anddescriptionacceptance_criteria - Execute the action (
,create_file
,modify_file
,delete_file
,run_command
)verify - Verify each acceptance criterion before moving to the next task
- Track what was done and what the outcome was
Do not deviate from the plan without reason. If a task is blocked or the plan has an error, note it and continue with unblocked tasks. Report blockers in the review submission.
Step 3: Submit for Review
After executing all tasks, run the review phase. Include the original objective and a summary of what was done:
~/.claude/skills/codex-cto/scripts/cto-invoke.sh review "<OBJECTIVE>. Results: <summary of what was done, any issues encountered>"
Parse the returned JSON:
— done. Report success to the user.verdict: "approve"
— checkverdict: "revise"
for feedback andtask_reviews
for new/updated tasks. Fix issues and re-submit.revised_tasks
— fundamental problem. Report the CTO'sverdict: "abort"
to the user and stop.reason
Step 4: Iterate (if revise)
On a "revise" verdict:
- Read each
entry with statustask_reviews
orfailpartial - Execute the fixes described in
and anyfeedbackrevised_tasks - Re-submit for review (step 3)
- Maximum 5 review iterations. If the CTO issues 3 consecutive "revise" verdicts, escalate to the user.
Model Selection
The
--model flag passes through to codex exec. Available models:
| Model | ID | Notes |
|---|---|---|
| GPT-5.4 Pro | | Default for plan phase. Deepest reasoning for architectural decomposition. |
| GPT-5.4 | | Default for review phase. Unified coding + reasoning flagship. |
| GPT-5 Mini | | Cost-optimized, fast iteration. |
| GPT-5.3-Codex | | Previous generation. Still functional. |
Omit
--model to use the default from ~/.codex/config.toml.
Options
| Option | Description |
|---|---|
| Override model (default: config default) |
| Print command without executing |
Artifacts
Plan and review JSON files are saved to
.codex-cto/<PID>/ in the working directory. Each invocation creates sequentially numbered files (plan-001.json, review-001.json, etc.). PID namespacing prevents conflicts between concurrent sessions.
Diagnostics
Reuse codex-orchestrator's status script for CLI diagnostics:
~/.claude/skills/codex-orchestrator/scripts/codex-status.sh
Examples
# Simple feature /codex-cto Add a health check endpoint at /health returning {status: "ok"} # With model override /codex-cto Refactor the auth module to use JWT --model gpt-5-mini # Dry run to inspect the command ~/.claude/skills/codex-cto/scripts/cto-invoke.sh plan "Add rate limiting" --dry-run
Sister Skill
This skill is the inverse of
codex-orchestrator. Use codex-orchestrator when Claude Code should delegate one-shot specialist tasks to Codex. Use codex-cto when Codex should direct Claude Code through a plan-execute-review loop.