- codex-run.sh review: CLI forbids scope flags + prompt (stdin '-' counts as [PROMPT]); translate scope into prompt text, native review only when prompt.md is empty. Add --skip-git-repo-check for consistency. - agents/codex.md: marker contract (=== TASK FOR CODEX === / === END TASK ===, legacy RU markers accepted) so wrapper instructions never leak into the codex prompt and the wrapper never mistakes the task for its own job; self-check against doing the task itself; preamble now states codex is a subagent executor and process flows belong to the orchestrator; scope flags as separate args; no nohup; Read before rewriting prompt.md. - skills: wrapper framing line + marker block in prompt templates. - All instructions and README translated to English (RU trigger phrases kept in skill descriptions). - tests: 3 new review-mode cases, ALL PASS. - bump 0.1.2.
46 lines
1.7 KiB
Markdown
46 lines
1.7 KiB
Markdown
---
|
|
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 <sha>`
|
|
- 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: <absolute repo path>` (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.
|