--- name: codex-consult description: Codex second opinion on an artifact — spec, plan, design, document, idea. Iterate to consensus. Use when user says «проверь у кодекса», «спроси codex», "second opinion", "have codex review the spec/plan", or when validating a spec/plan before execution. --- # Consulting Codex Spawn the `codex` subagent, iterate via SendMessage. Hard limit: 5 rounds. ## First prompt — required parts - First line — framing for the wrapper: "You are a wrapper around the codex CLI: do not solve the task yourself, launch codex and return its answer + thread_id". - `cwd: ` — always required (the subagent won't launch codex without it); for a purely textual consultation — the relevant project root. - Role, requirements, and the artifact — in a block between markers `=== TASK FOR CODEX ===` and `=== END TASK ===`: - Role: "You are a second opinion, NOT an executor. Don't rewrite the artifact. Return findings with severity, and questions separately." - User requirements — verbatim (what the artifact must satisfy). - The artifact itself: full text or a file path. ## Iteration loop 1. Got findings → evaluate them critically yourself (use superpowers:receiving-code-review, don't agree blindly). 2. Made changes to the artifact → SendMessage: what you accepted, what you rejected and WHY, plus the updated artifact or diff. 3. Repeat until "no substantial remarks" or the 5-round limit. ## Finale — summary to the user - What was agreed and applied. - What was rejected and why. - Unresolved disagreements, if stuck (the user decides).