fix(skill): self-review — operator detection и continuation framing
- Зачем:
- Round 1 adversarial self-review нашёл 6 находок (3 high, 3 medium).
Артефакт первой итерации содержал противоречия между SKILL и README,
неточности про upstream-механики (Codex continuation, Agent Teams
gating SendMessage), и оставлял undefined load-bearing branch
"Operator available?". Без фиксов скилл вводил пользователей без
Agent Teams в ступор при Round 2.
- Что:
- SKILL Step 2: уточнено, что SendMessage gated на Agent Teams; Task
spawn без Agent Teams one-shot; Codex поддерживает intra-session
continuation.
- SKILL Step 4: "REQUIRED SUB-SKILL ... if available" заменено на
"Use ... when available" с явным fallback на inlined принципы.
- SKILL Step 6: добавлена continuation-support table по хостам,
восстановлена секция "Detecting an operator" с heuristic
(interactive если direct human message + user-facing channel).
- README: переписан Agent Teams блок под operator-gated модель; Codex
section — корректное описание intra-session continuation через /agent.
- EXPERIMENT.md: добавлен banner о предшествии редизайну и устаревших
ссылках на adversarial-reviewer.md.
- Проверка:
- Прогнать /claude-team-review в новой сессии с Agent Teams enabled
(env var добавлен в ~/.claude/settings.json) — Round 2 для проверки
continuation через SendMessage и operator-gating паттерна.
This commit is contained in:
@@ -63,11 +63,18 @@ message "Plan mode is active" → mode = `plan`, skip git.
|
||||
pass it the briefing assembled from `reviewer-prompt.md`.
|
||||
|
||||
- **Claude Code:** Task tool with `general-purpose` type, OR — if Agent
|
||||
Teams is enabled — spawn a teammate. Teammates support continuation
|
||||
between rounds, which makes re-review cheaper. Both work; pick what's
|
||||
available.
|
||||
Teams is enabled — spawn a teammate. Note: **only Agent Teams supports
|
||||
continuation between rounds** (via `SendMessage`, which is gated on
|
||||
`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`). Without Agent Teams, the
|
||||
Task tool spawn is one-shot — Round 2+ has to go through the operator-
|
||||
gated fresh-spawn path in Step 6.
|
||||
- **Codex:** native subagent spawn (host orchestrates spawn/wait/consolidate).
|
||||
- **Other hosts:** equivalent subagent mechanism.
|
||||
Codex supports intra-session continuation — the lead can send follow-up
|
||||
instructions to a running subagent thread, and `/agent` switches between
|
||||
active threads.
|
||||
- **Other hosts:** equivalent subagent mechanism. The skill works as long
|
||||
as the host can spawn a subagent and (optionally) route follow-up
|
||||
messages to it.
|
||||
|
||||
The reviewer is a full agent session — it explores the repo, runs git
|
||||
commands, and reads files on its own. **Do not pre-collect diffs or file
|
||||
@@ -120,9 +127,10 @@ This step exists because the reviewer may be technically wrong — and
|
||||
applying its findings blindly causes real damage (large structural edits
|
||||
based on cited issues that turn out to be feature requests, not bugs).
|
||||
|
||||
**REQUIRED SUB-SKILL:** Use `superpowers:receiving-code-review` if it's
|
||||
available on the host. The key principles are inlined below for portability;
|
||||
the full skill has more depth.
|
||||
**Use `superpowers:receiving-code-review` when available** — it has the
|
||||
full discipline for this step. The key principles are inlined below as
|
||||
the always-available fallback (so the matrix step works on any host,
|
||||
even where Superpowers is not installed).
|
||||
|
||||
### Build the evaluation matrix
|
||||
|
||||
@@ -269,11 +277,20 @@ digraph re_review {
|
||||
}
|
||||
```
|
||||
|
||||
**Continuation support, by host (verify against current docs before
|
||||
relying on this):**
|
||||
|
||||
| Host | Continuation | Mechanism |
|
||||
|---|---|---|
|
||||
| Claude Code + Agent Teams (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`) | yes | `SendMessage` to the teammate inbox |
|
||||
| Claude Code without Agent Teams | **no** — Task spawn is one-shot | — |
|
||||
| Codex | yes — intra-session | follow-up message to a running thread; `/agent` to switch |
|
||||
|
||||
Two routes lead to the "ask operator" step:
|
||||
- The host has no continuation mechanism (e.g. Codex) — every round
|
||||
after Round 1 lands here
|
||||
- The host has no continuation mechanism for our use case (Claude Code
|
||||
without Agent Teams) — every round after Round 1 lands here
|
||||
- The host has continuation but the previous reviewer is no longer
|
||||
reachable (process ended, inbox dead)
|
||||
reachable (process ended, thread closed, inbox dead)
|
||||
|
||||
**Detecting a dead reviewer (continuation-supporting hosts).** When the
|
||||
send call returns only a routing acknowledgment (e.g. `{"success": true,
|
||||
@@ -282,6 +299,16 @@ the reviewer process has ended; the message went to a dead inbox. Do not
|
||||
wait. Treat the reviewer as unreachable, fall through to the operator
|
||||
question.
|
||||
|
||||
**Detecting an operator.** Treat the run as **interactive** (operator
|
||||
available) only if both conditions hold:
|
||||
|
||||
1. The current conversation has a direct human message — not just an
|
||||
automated trigger, hook, scheduled run, or CI invocation
|
||||
2. The host exposes a user-facing channel to surface the question
|
||||
|
||||
When in doubt, default to **presenting the choice** — pausing once is
|
||||
cheaper than concluding unverified by mistake.
|
||||
|
||||
**Asking the operator.** Present the choice plainly:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user