fix: review mode works with prompts, anti-self-work contract, EN docs

- 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.
This commit is contained in:
admin committed 2026-07-28 19:12:19 +05:00
1 parent 0c355c4b9d
commit 54aabcab23
8 files changed
+292 -180

No files matched your search

+25 -20
View File
@@ -1,31 +1,36 @@
---
name: codex-consult
description: Второе мнение Codex по артефакту — спека, план, дизайн, документ, идея. Итерации до консенсуса. Use when user says «проверь у кодекса», «спроси codex», «второе мнение», «пусть codex ревьюнет спеку/план», or when validating a spec/plan before execution.
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.
---
# Консультация с Codex
# Consulting Codex
Спавни сабагента `codex`, итерируй SendMessage'ами. Жёсткий лимит: 5 итераций.
Spawn the `codex` subagent, iterate via SendMessage. Hard limit: 5 rounds.
## Первый промпт — обязательные части
## First prompt — required parts
- `cwd: <абсолютный путь>` — обязателен всегда (без него сабагент не запустит
codex); для чисто текстовой консультации — корень релевантного проекта.
- Роль: «Ты — второе мнение, НЕ исполнитель. Артефакт не переписывай.
Верни находки с severity и отдельно вопросы.»
- Требования юзера — дословно (что артефакт должен удовлетворять).
- Сам артефакт: текст целиком или путь к файлу.
- 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 path>` — 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. Получил находки → оцени критически сам (используй
superpowers:receiving-code-review, не соглашайся слепо).
2. Внёс правки в артефакт → SendMessage: что принял, что отклонил и ПОЧЕМУ,
плюс обновлённый артефакт или diff.
3. Повторяй до «существенных замечаний нет» или лимита 5.
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).