--- name: codex-review description: Code review by Codex — branch, commit, uncommitted changes, or arbitrary files. Use when user says «ревью у кодекса», «пусть codex посмотрит ветку/коммит/файл», "codex review", "second reviewer". --- # Review via Codex Spawn the `codex` subagent. The scope sets the mode: - branch vs base: `review scope: --base main` - single commit: `review scope: --commit ` - uncommitted: `review scope: --uncommitted` - arbitrary files / abstract scope: WITHOUT `review scope:` — a plain task "review files X, Y and their dependents". ## Subagent 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: ` (review works from cwd) - `review scope: ...` (if applicable) - Focus and format — in a block between markers `=== TASK FOR CODEX ===` and `=== END TASK ===`: - Focus, if any: security / performance / correctness / everything. - Findings format: `file:line — 🔴|🟡|🔵 — problem — suggested fix`, no praise, no code retelling. ## Example ``` You are a wrapper around the codex CLI: do not solve the task yourself, launch codex and return its answer + thread_id. cwd: /abs/path/to/repo review scope: --base main === TASK FOR CODEX === Focus: correctness and security. Findings format: file:line — 🔴|🟡|🔵 — problem — fix. No praise. === END TASK === ``` ## After - Hand the findings to the user / process per the task. - Contested finding → SendMessage to the same session: ask to justify or show a repro. Don't silently accept or reject.