Commit Graph
32 Commits
Author SHA1 Message Date
ddadminandGitHub 9cff0c7986 Merge pull request #1 from dementev-dev/feature/subagent-orchestration
refactor(skill): extract codex orchestration to Haiku subagent
2026-04-19 19:51:04 +03:00
ddadminandClaude Opus 4.7 ae944cd468 docs(readme): align install + permissions with subagent-orchestration refactor
- Install path: ~/.agents/skills/ → ~/.claude/skills/ (matches
  RUNNER_SPEC_PATH tier-1 lookup). Added migration note.
- Permissions: appended six new entries covering Write/Read directions
  for /tmp/codex-body-* and /tmp/codex-runner-result-*, plus Bash(ls)
  rules for runner-spec discovery (tier 1 + tier 2). Existing entries
  preserved — subagent inherits them.
- "Single file" wording replaced in three locations (intro, Lightweight
  bullet, Inspiration list) to reflect SKILL.md + references/runner.md.

Plan reviewed adversarially through /adversarial-review plan (5 rounds).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 19:48:51 +03:00
ddadminandClaude Opus 4.7 b9264a9001 perf(skill): pass runner spec by path, skip Read in main
Main no longer Reads references/runner.md. The Agent prompt now
passes RUNNER_SPEC_PATH as a short bootstrap instruction; the
subagent Reads the spec itself. Saves ~12K per round from main
context (Read result + inlined-spec duplication in Agent prompt).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:56:17 +03:00
ddadminandClaude Opus 4.7 7f184d0507 docs: document subagent architecture in AGENTS.md and DESIGN.md
AGENTS.md gets a new Architecture section with boundary
invariants. DESIGN.md §12 explains the residue problem, the
Agent-tool split, and why Haiku is sufficient for the runner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:39:00 +03:00
ddadminandClaude Opus 4.7 f363d2673c docs(skill): rewrite Rules section + extend Step 9 cleanup glob
Reflects the new main + runner split. Removes rules that now
live exclusively in references/runner.md (ATTEMPT_ID generation,
two-tier session capture, strict check order). Adds two new
/tmp paths to Step 9 cleanup: codex-body and codex-runner-result.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:35:17 +03:00
ddadminandClaude Opus 4.7 d2a87b1d67 refactor(skill): dispatch resume and fresh-exec via subagent
Step 7 now delegates codex-exec-resume to the runner. Fallback
path (resume failure → fresh exec) also goes through the runner
with OPERATION=fresh-exec. Severity classification and user
interaction stay in main thread.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:31:26 +03:00
ddadminandClaude Opus 4.7 42c7f368b4 fix(skill): add security note against reading skill-invocation header
Round-3 spec review finding — the RUNNER_SPEC_PATH resolver
must explicitly warn against attempting to extract the path
from the "Base directory for this skill:" header, which is
a system injection Claude cannot reliably read.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:21:04 +03:00
ddadminandClaude Opus 4.7 baf426204a refactor(skill): dispatch initial codex launch via Haiku subagent
Replaces inline codex-exec + strict checks + session-id capture
in Step 4 with Agent tool dispatch. Runner spec lives in
references/runner.md. Main thread reads only the final review file
(~5K) instead of stdout/stderr/rollout artifacts (~48M residue).

Also updates Step 5 "VERY NEXT MESSAGE" wording to permit a
preceding one-line user_warning diagnostic message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:18:08 +03:00
ddadminandClaude Opus 4.7 9c8fa972e2 fix(runner): resolve contract inconsistencies flagged in Task 2 review
- R4.3 APPROVED branch now emits full 9-field JSON (was 6-field,
  violating the "9 fields always" rule).
- R4.4 Primary-tier now explicitly writes to RESULT_PATH (was
  ambiguous "return success").
- R5 terminal-result type conditional: second-attempt timeout emits
  "timeout", other failures emit "launch_failure". Reconciles R4.1's
  timeout-on-retry rule with R5's terminal write.
- R5 Step 4 makes retry loop-bound explicit — retry iteration does
  NOT re-enter R5, regardless of failure type.
- R3 resume template uses double-quoted "${REPO_ROOT}" for uniform
  quoting rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:10:05 +03:00
ddadminandClaude Opus 4.7 1281097d98 feat(skill): add runner subagent contract
Defines input/output JSON contract, step-by-step mechanics, and
cleanup ownership for the thin Haiku runner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:04:12 +03:00
ddadminandClaude Opus 4.7 101043761b feat(skill): scaffold references/ for runner subagent
Empty placeholder for subagent orchestration refactor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 17:58:05 +03:00
ddadminandClaude Opus 4.7 08e1c2cda6 docs(plan): implementation plan for subagent-orchestration refactor
Three-round adversarial review incorporated. Covers:
- Architecture: main orchestrator + thin Haiku runner subagent
- File structure: SKILL.md + new references/runner.md
- Retry invariant: 2 codex invocations per round max; runner owns
  full retry budget across all failure types; main treats every
  failure as terminal for the current round
- Session-id lifecycle with two-tier positive content-bind
- Two-channel result protocol (JSON file + RUNNER_RESULT_AT line)
- user_warning channel for §2.4.4 no-op refresh diagnostic
- SKILL_DIR 3-tier resolution (user-scoped / plugin-marketplace / dev)
- Placeholder-substitution contract before prompt-body write
- Step 5 "VERY NEXT MESSAGE" wording reconciled with user_warning
- Task 7 E2E verification with skill-install, plan-mode test, and
  residue-tax measurement

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 17:53:48 +03:00
ddadmin f41a6cbe87 docs: добавлен AGENTS.md для orientation AI-агентов
- Зачем:
  - конвенция AGENTS.md (codex, aider и др. агенты её автодетектят) даёт свежему агенту быструю навигацию по репо без прочтения всех 50 KB DESIGN.md перед началом работы.
- Что:
  - Короткий (~25 строк) pointer-файл: one-paragraph what-is-this, три main-docs с one-line описанием, три "don't"-правила про cross-refs / session marker / silent-recovery, верификация через §7 smoke-test + dogfood.
  - Всё содержательное остаётся в DESIGN.md; AGENTS.md только ориентирует.
- Проверка:
  - Файл существует, читаем, ссылается на реальные §-номера в DESIGN.md (§4.1b, §6.7, §6.8, §7, §9.6, §10).
2026-04-17 18:44:04 +03:00
ddadmin 2f3993be12 fix(skill): attempt-scoped marker для secondary session-id (round-7 finding)
- Зачем:
  - live e2e round 2 нашёл HIGH: review-stable marker `${REVIEW_ID}` позволяет skill'овой ретрай-логике создать несколько rollout'ов с одинаковым marker'ом (первая попытка фэйлит sanity, оставляет rollout; ретрай успешен, оба попадают в grep). "Pick any" → silent intra-review drift на stale session.
- Что:
  - Новый placeholder `${ATTEMPT_ID}` — 6-значный random, генерируется заново на каждый launch (initial/retry/resume/fresh-exec).
  - Marker перешёл на `${REVIEW_ID}-${ATTEMPT_ID}`. Stale retry rollout содержит ОЛД attempt-id → невидим для grep'a новой попытки.
  - Multi-match policy: "pick any" → **fail closed** с диагностикой. Под корректной attempt-scoping multi-match структурно невозможен; если произошло — silent picking только скрывал бы баг.
  - SKILL.md: Step 2 preamble (placeholders + per-launch ATTEMPT_ID generation), Step 4 prompts (marker), Step 4 check 4 (grep by attempt-id + fail-closed multi-match), Step 7 resume prompt (fresh ATTEMPT_ID), Step 7 check 4, Step 7 fresh-exec fallback, Rules section.
  - docs/DESIGN.md §4.1: decision + alternatives переписаны — добавлен round-7 rejection "review-stable marker alone".
  - docs/DESIGN.md §6.8: новый round-7 lesson (scope of identifier must match rollout granularity).
  - docs/DESIGN.md §7.1/§7.2 smoke tests: добавлен ATTEMPT_ID generation, grep паттерн обновлён.
  - docs/DESIGN.md §8: строка с round-7 переходом.
  - README.md troubleshooting обновлён под attempt-scoping.
- Проверка:
  - Retry edge case закрыт по построению: ATTEMPT_ID свежий на каждом launch → stale rollout невидим.
  - Multi-match визибильный (fail-closed) вместо silent (pick-any).
2026-04-17 18:37:26 +03:00
ddadmin 442f2e78c7 fix(skill): positive content-bind для secondary session-id (round-6 finding)
- Зачем:
  - live e2e dogfood через codex нашёл HIGH: timestamp-only secondary (newest rollout с mtime > CODEX_SESSIONS_BEFORE) силой позволяет параллельному codex-инвокейшну подменить нашу session — resume на чужой thread проходит все sanity-проверки, skill применяет "fixes" по ревью чужого артефакта. Самые узкие временные окна эту проблему не закрывают.
- Что:
  - SKILL.md: каждый prompt (initial/resume/fresh-exec) первой строкой содержит `<!-- ADVERSARIAL-REVIEW-SESSION: ${REVIEW_ID} -->`. Secondary path переключён на `find -newer <prompt-file> -exec grep -l "${REVIEW_ID}" {} +` — positive content-match. Zero match → fail closed.
  - SKILL.md: placeholder `${CODEX_SESSIONS_BEFORE}` удалён (больше не нужен — timestamp anchor заменён на prompt-file anchor).
  - SKILL.md Rules: обновлены session-id и marker правила.
  - README.md: упрощён macOS-note (всё теперь POSIX: `-newer FILE`, `-exec CMD {} +`, `grep -l`), troubleshooting обновлён под positive-binding.
  - DESIGN.md §4.1: переписан decision — positive content-bind как chosen approach, rejected alternatives расширены (marker-file, XML-marker-vs-comment, newest-by-mtime explicitly rejected in round 6).
  - DESIGN.md §2.3: verify-snippet переписан на новую форму.
  - DESIGN.md §6.7: новая подсекция — round-6 lesson про silent wrong-session corruption.
  - DESIGN.md §7.1/§7.2 smoke tests переведены на positive-bind (заодно ушёл `-1` timestamp race).
  - DESIGN.md §8: новая строка в version log про round-6 переход.
  - DESIGN.md §9.5: GNU find limitation снята — всё POSIX.
- Проверка:
  - Empirically validated: rollout JSONL содержит prompt text (3 matches для unique phrase в тесте 2026-04-17).
  - Smoke tests §7.1/§7.2 проходят на POSIX командах.
  - Parallel-codex hazard структурно закрыт: чужой rollout не содержит нашего ${REVIEW_ID}, grep его отфильтрует.
2026-04-17 18:26:48 +03:00
ddadmin b4a91879e6 fix(skill): findings from round-5 team review
- Зачем:
  - round-5 adversarial review (claude-team-review) нашёл 2 HIGH и 3 MEDIUM, которых не увидел round-4 self-review. Основное — регрессия в b213678, где при рефакторе primary-path silently дропнуло malformed-JSON-first-line handling, и противоречие в Step 7 step 4 между «same approach as Step 4 check 4» и «keep previous id».
- Что:
  - SKILL.md Step 4 check 4: primary-path с явными ветками — valid UUID → save; любой другой случай (empty / malformed / missing thread_id / partial output) → fallthrough на secondary. Secondary описан как двухпричинный (sandbox suppression + format drift), не только «0 bytes».
  - SKILL.md Step 7 step 4: явно разведено с Step 4 check 4 — zero-find в resume НЕ абортит round, а keep previous CODEX_SESSION_ID (§2.4.4 гарантирует что thread id не ротируется). Добавлен warning-сообщение.
  - SKILL.md Step 2/4/7/Rules: убран `echo $(($(date +%s) - 1))` Bash-вызов, timestamp считается Opus'ом в reasoning и подставляется литералом. Убирает compound-command permission-матч проблему (`$()` + `- 1` арифметика) и один Bash-круг на раунд.
  - SKILL.md Step 7 fresh-exec fallback: архивирует failed-resume артефакты через `mv` в `*-failed-resume.{jsonl,txt}` ПЕРЕД fresh exec. Step 9 cleanup glob расширен.
  - DESIGN.md §9.5: cross-ref «Step 4 check 3» → «Step 4 check 4».
  - DESIGN.md §4.1 trade-offs: описание CODEX_SESSIONS_BEFORE переписано под in-reasoning capture.
  - README.md: убрана `Bash(date +%s)` permission, добавлены `Bash(mv ...)` для архивации.
- Проверка:
  - Повторно прогнать self-review с фокусом на: (а) понятен ли novice reader malformed-case fallthrough, (б) не противоречит ли Step 7 step 4 Step 4 check 4 после правки.
2026-04-17 17:49:07 +03:00
ddadmin bbf4499b71 fix(skill): findings from round-4 adversarial review
- Зачем:
  - round-4 self-review на ветке нашёл HIGH-bug (пропущен плейсхолдер в Step 2, буквальный Opus мог не подставить литерал) и три MEDIUM (лишний abort на APPROVED при пустом `~/.codex/sessions/`, ложное обещание детекции wrong-session, same-epoch race при быстром codex). Исправляю до PR, чтобы не оставлять известных дефектов.
- Что:
  - SKILL.md Step 2: `${CODEX_SESSIONS_BEFORE}` добавлен в список placeholders с явным пояснением роли.
  - SKILL.md Step 4/7 + Rules: timestamp capture через `$(($(date +%s) - 1))` — сдвиг на секунду защищает от same-epoch race против `-newermt` strict-greater.
  - SKILL.md Step 4: перестановка проверок — review-sanity (check 3) раньше session-id capture (check 4); на APPROVED session-id не нужен → skip entirely. Убирает лишний abort валидной APPROVED round.
  - SKILL.md Step 4 check 4: parallel-codex caveat переписан честно — wrong-session resume НЕ детектируется автоматически, риск silent corruption зафиксирован.
  - SKILL.md Step 4 check 4: при zero-lines перед abort выводятся диагностические артефакты (jsonl, stderr, 3 недавних rollout).
  - DESIGN.md §4.8: обновлён с 4-check порядком и объяснением почему review раньше session-id.
  - DESIGN.md §4.1: alternative-considered про filesystem-only-primary переписан — убрано ложное обещание §4.8-детекции; trade-offs расширены `-1` shift и skip-on-APPROVED.
  - README.md: добавлены permissions `Bash(ls -t ~/.codex/sessions*)` для диагностики.
- Проверка:
  - Заново прогнать §7.1 smoke-test: EXIT=0, rollout-UUID извлекается даже при пустом JSONL.
  - Edge case: codex exec с cached response <1s + `CODEX_SESSIONS_BEFORE=T` → `find -newermt "@$((T-1))"` всё равно находит rollout.
2026-04-17 17:31:24 +03:00
ddadmin af0ad8ab11 docs: macOS/BSD find — template+понимание вместо ветвления
- Зачем:
  - `-newermt "@<epoch>"` и `-printf` в secondary session-id capture — GNU-специфичные; на macOS BSD find они не работают, а тестировать на маке негде.
- Что:
  - SKILL.md: добавлена one-paragraph platform note рядом с `find` — формулирует цель шага ("найти свежие rollout-файлы, выбрать последний, извлечь UUID") и приглашает Opus/пользователя подставить BSD-эквивалент.
  - docs/DESIGN.md §9.5: новое known-limitation с обоснованием template+understanding подхода вместо platform-detection.
  - README.md Known limitations: user-facing note, что end-to-end на macOS не тестировался.
- Проверка:
  - Ничего не ломается на Linux (команды без изменений).
  - На macOS оператор читает note и адаптирует.
2026-04-17 17:21:27 +03:00
ddadmin b213678ff0 refactor(skill): template+understanding вместо шелл-пайплайна в secondary session-id
- Зачем:
  - Opus последней версии выполняет инструкции буквально; длинный пайплайн `find | sort | tail -1 | xargs basename | grep -oE UUID` создаёт permission-матчинг проблему (Claude Code матчит всю команду с пайпами) и не оставляет модели свободы адаптироваться к среде.
- Что:
  - SKILL.md Step 4 check 3 secondary: один `find -printf '%T@ %f\n'`, парсинг отдан ведущему (Claude выбирает max-mtime и извлекает UUID из filename).
  - SKILL.md Step 7 check 4: компактная ссылка на ту же логику Step 4, без дублирования пайплайна.
  - README.md permission упрощён до `Bash(find ~/.codex/sessions*)` — матчит любой find в правильном поддереве.
- Проверка:
  - `find ~/.codex/sessions -name 'rollout-*.jsonl' -newermt "@$(date -d '-1 minute' +%s)" -printf '%T@ %f\n'` на живой среде возвращает 0+ строк, парсятся корректно.
2026-04-17 17:18:31 +03:00
ddadmin 390d912739 docs(design): подтянуть §3.2, §7.2, §7.3, §2.5 под новую pipe-форму
- Зачем:
  - остатки документации ссылались на `- < file` и старый одноуровневый session-id, расходились с SKILL.md после основной правки.
- Что:
  - §3.2 теперь рекомендует `cat file | cmd -` со ссылкой на §4.13.
  - §7.2 smoke-test resume переведён на pipe-форму и включает secondary filesystem session-id capture.
  - §7.3 (bad-UUID) тоже на pipe-форме для изоляции от §6.6.
  - §2.5 разделяет success-row на reference и affected окружения, добавлен row для `- < file` exit-1-empty-stderr.
- Проверка:
  - `grep -n '\- < ' docs/DESIGN.md` остаются только контекстные упоминания (§2.1 описание обеих форм, §4.13 decision, §6.6 lesson, §8 log).
2026-04-17 17:11:32 +03:00
ddadmin fa61ae03ac fix(skill): pipe-форма и rollout-UUID fallback для переносимости
- Зачем:
  - форма `codex exec ... - < file` exit=1 с пустым stderr, а `--json` stdout оказывается пустым в части Claude Code песочниц; без обхода скилл не может захватить session ID и теряет resume на раундах 2-5.
- Что:
  - SKILL.md Step 4/7 переведены на `cat file | codex exec ... -` как canonical; добавлен two-tier захват session ID (primary = first JSONL line, secondary = UUID из имени `~/.codex/sessions/**/rollout-*.jsonl` с mtime > CODEX_SESSIONS_BEFORE).
  - README.md обновлены permissions (pipe-форма, `find rollout-*`, `date +%s`) и добавлен troubleshooting про env-specific пустой JSONL.
  - docs/DESIGN.md: §2.1 описывает обе формы, §2.2 фиксирует env-specific suppression, §2.3 добавляет filesystem-recovery путь, §4.1 переделан на two-tier decision, добавлены §4.13 (canonical pipe) и §6.6 (lesson от 2026-04-17), в §8 новая строка с окружением yantar-k8s.
- Проверка:
  - DESIGN.md §7.1 smoke test (обновлён на pipe-форму + проверка filesystem secondary path).
  - Оба окружения (reference WSL2 + containerized sandbox) должны давать валидный session ID и успешный resume.
2026-04-17 17:09:29 +03:00
ddadminandClaude Opus 4.7 3f0d1321ff docs: add DESIGN.md explaining why the skill is built this way
1082-line design note covering:
- Empirical facts about Codex CLI 0.121.0 (invocation, streams,
  resume semantics, known failure modes) with copy-pasteable
  verification commands.
- Claude Code harness facts (Bash truncation, cwd drift, Opus
  literal-interpretation tendencies).
- 12 design decisions in a uniform format: what, where in SKILL.md,
  alternatives considered, why chosen, trade-offs accepted.
- Rejected ideas (marker files, per-round naming, $(pwd), etc.) with
  reasons, so future contributors don't re-propose them.
- Prior diagnostic errors from a previous agent-auditor's dump that
  turned out to be wrong when verified, kept as a methodological
  lesson.
- Smoke-test protocol (§7) with concrete commands and expected
  outputs so any maintainer can verify the Codex contract still holds
  in minutes.
- Update protocol: when and how to revise this file, with a pointer
  that future Opus generations interpret instructions more literally
  and SKILL.md hardening must track that.
- Mermaid flow diagram of the round-trip.

Intended audiences: future Claude sessions resuming work on the skill,
human developers, and new contributors. The file is self-contained —
does not rely on conversation history that produced the current design.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 14:29:16 +03:00
ddadminandClaude Opus 4.7 6cf42ad130 refactor: switch to --json for session capture, harden fallbacks
Address 10+ findings from two rounds of adversarial review of the
previous Step 4/5/7 design. Major changes:

- Use `codex exec --json` so `thread_id` can be parsed deterministically
  from the first JSONL line on stdout (bypasses the ~30KB Bash-tool
  truncation that could drop stderr metadata in the old flow).
- Capture REPO_ROOT via `git rev-parse --show-toplevel` at Step 2 and
  substitute the absolute path literally. Pin the initial exec with
  `-C "${REPO_ROOT}"` and prefix every resume with `cd '${REPO_ROOT}' &&`
  because `codex exec resume` has no `-C` flag and inherits cwd from
  the invoking shell.
- Drop `resume --last` from the fallback chain (cwd filtering is not
  enough to distinguish our session from unrelated parallel codex runs).
- Update CODEX_SESSION_ID only on full success (exit 0, no stderr error
  line, review file contains VERDICT and findings on REVISE); rotate
  to the resumed session's new thread_id each round.
- Harden the "show review" gate (Step 5 "YOUR NEXT MESSAGE" instruction
  and Step 6 precondition check) now that --json stdout no longer leaks
  review text into the Bash tool result.
- Add strict check order for launch and resume (exit → stderr → review
  file) so we never commit a broken session-id on a half-failed run.
- Replace silent fresh-exec fallback with interactive ask / headless
  severity-based decision. Fresh-exec prompt rebuilds prior rounds from
  conversation history.
- Bare repo / submodule / shell-hostile paths abort at Step 2 with a
  clear message rather than failing silently later.
- Conditional cleanup: keep temp files on abort paths for diagnostics.
- Expand REVIEW_ID random to 8 digits.

README: update permissions (add stdout JSONL read, resume-prompt write,
narrower `cd * && ... codex exec resume *` pattern) and troubleshooting
(NOT VERIFIED outcome, bare repo, submodule).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 14:07:42 +03:00
ddadminandClaude Opus 4.6 5966e2a388 docs: rewrite README for agent-friendly setup, expand permissions
- Restructure installation as step-by-step Quick Start with verification commands
- Expand permissions list: add Read(/tmp/codex-review-*), Read(/tmp/codex-stderr-*),
  Bash(rm -f /tmp/codex-*), Bash(tee *)
- Add guidance on global vs project config for permissions
- Add Troubleshooting section (model errors, timeouts, resume, Plan Mode)
- Add authentication docs (ChatGPT login vs CODEX_API_KEY)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 17:56:28 +03:00
ddadminandClaude Opus 4.6 899591ebf0 docs: add platform note to prevent recursive Codex invocation
When the skill is available in shared ~/.agents/skills/, Codex CLI
picks it up and tries to follow its instructions — launching itself
recursively. The blockquote explains the architectural constraint
and tells Codex to review directly instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:53:31 +03:00
ddadminandClaude Opus 4.6 05fe11a4df fix: permissions, temp file prefix, session ID extraction
- Fix recommended permissions: add missing Write(/tmp/codex-prompt-*),
  remove overbroad rm rule (cleanup is best-effort)
- Rename claude-plan-* → codex-plan-* so all temp files share codex-* prefix
- Extract session ID via Read tool instead of grep (no extra permission needed)
- Add UUID format spec for session ID validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:23:07 +03:00
ddadminandClaude Opus 4.6 834a74c798 docs: document Plan Mode and resume sandbox limitations
- Add Plan Mode /tmp write limitation to SKILL.md (Step 4) and README
- Document that `codex exec resume` inherits sandbox from original session
- Remove none/low reasoning effort options (minimum is now medium)
- Add .claude to .gitignore (plan files from testing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:50:26 +03:00
ddadminandClaude Opus 4.6 0b8891e19e fix: prompt delivery через stdin и захват session ID
- Зачем:
  - длинные XML-промпты (60+ строк) ломали shell quoting при inline-передаче в codex exec.
  - session ID терялся из-за 2>/dev/null на stderr, делая resume невозможным.
- Что:
  - промпт записывается в temp-файл, передаётся через stdin: `codex exec ... - < file`.
  - stderr перенаправлен в temp-файл, session ID извлекается через grep.
  - resume унифицирован: тот же stdin-механизм вместо inline-аргумента.
  - fallback fresh exec явно обновляет CODEX_SESSION_ID.
  - cleanup дополнен новыми temp-файлами (prompt, stderr).
- Проверка:
  - smoke test: plan review → 2 раунда с resume через session ID — OK.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:16:06 +03:00
ddadminandClaude Opus 4.6 649256517e feat: translate SKILL.md to English, add permissions guide
- Why:
  - English makes the skill accessible to a wider audience
  - Permission prompts on every git/codex call hurt UX
- What:
  - Translated all SKILL.md instructions and rules to English
  - Added recommended permissions section to README
  - Removed literal ## from output_format to avoid Claude Code
    security warning about # in quoted arguments
  - Removed overly broad Bash(codex *) permission rule
  - Added explicit note about codex exec scope limitations
- Verify:
  - /adversarial-review produces structured output with markdown headers
  - No "Newline followed by #" security warning on codex exec

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:06:22 +03:00
ddadminandClaude Opus 4.6 515820abed fix: verdict parsing, README claims, example consistency
Fixes from adversarial code-vs-plan review (3 rounds):
- Verdict format in prompts now matches parser (bare tokens)
- Missing verdict treated as parse failure, not approval
- README: softened backend swappability to "designed for extensibility"
- Example: replaced incorrect FK scenario with valid transaction bug
- Example: aligned fixes and round-2 summary with round-1 finding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 19:24:56 +03:00
ddadminandClaude Opus 4.6 b86a1778e6 feat: adversarial prompt rewrite + README + example
- Rewrite all review prompts with XML-structured adversarial stance
  (role, operating_stance, attack_surface, finding_bar, calibration)
- Rename skill from codex-review to adversarial-review
- Add verbatim output rule for reviewer findings
- Improve resume prompt with adversarial re-review focus
- Add README with installation, usage, architecture, roadmap
- Add synthetic example of review output
- Inspired by openai/codex-plugin-cc (Apache-2.0) prompt structure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:29:15 +03:00
ddadminandClaude Opus 4.6 7c130253b1 chore: initial import of codex-review skill
Baseline copy of the working codex-review SKILL.md from dotfiles
before adversarial prompt rewrite and rebranding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:25:46 +03:00