docs(claude-playbook): перенесены находки зеркального codex-плейбука

- Зачем:
  - зеркальный codex-subagent-playbook ушёл вперёд по договорам ревью и
    экономии контекста координатора; согласованный с пользователем список
    находок перенесён в этот скилл.
- Что:
  - SKILL.md: установка «оптика, не конвейер», гейт и ручки эскалации для
    субагентов, саморевью исполнителя, шкала риска ревью с линзами
    TASK/CODE, статусы триажа с предохранителем кругов, постепенная
    приёмка с саморефлексией, раздел «Сбои координации».
  - prompts/: устойчивые ID находок, четыре статуса триажа, резолюции — в
    файл отчёта вместо тикета (лечит эхо файла задачи); новые
    result-contract.md и runtime-language.md.
  - prompt-templates.md: файлы линий ревью, сборка промптов с хвостом
    языка, вердикт перепроверки из task-notification; lessons.md — гейт
    на дистилляцию и датированная отмена урока про доводы в файле задачи.
- Проверка:
  - проверка относительных ссылок и git diff --check — чисто.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ddadminandClaude Fable 5 committed 2026-07-19 19:37:32 +03:00
1 parent 5b2db5bd7f
commit fdf744e578
8 files changed
+235 -62

No files matched your search

@@ -5,6 +5,8 @@
скилл существует. Журнал накопительный, поэтому дистиллируй: когда урок
поглощён SKILL.md или references, сжимай его запись здесь до строки-факта
(дата, что случилось, куда поглощено) — иначе файл растёт бесконечно.
Новые факты прогона дописывай свободно; дистилляцию и правку старых
записей согласуй с пользователем — это долговечная эмпирика.
## 2026-07-06 — t2-ml-forecast, задача 05 (первый прогон; дистиллировано 2026-07-12)
@@ -27,7 +29,9 @@
(«Пользователь в петле»), codex-exec (фоновый запуск, раннер).
- Безадресный resume подхватывает чужой тред. Поглощено: codex-exec.
- Доводы отклонений — в файл задачи (свежий тред продолжает без контекста
предшественника). Поглощено: prompts/triage-header.md.
предшественника). Отменено 2026-07-19: доводы — в файл отчёта триажа,
свежий тред получает его путём; тикет в триаже не правится (эхо файла
задачи, прогон 13). Поглощено: prompts/triage-header.md, SKILL.md 5–6.
- Не поглощено (держать в уме при постановке): правила задачи ранжировать
явно («правило A главнее буквы E») — внутренние противоречия всплывают
после починки.
@@ -11,6 +11,12 @@
- [prompts/recheck-header.md](prompts/recheck-header.md) — узкая
перепроверка (этап 5); может принести новую находку — это не нарушение
узости, отправь её исполнителю тем же порядком.
- [prompts/result-contract.md](prompts/result-contract.md) — формат
результата вспомогательных агентов (исследователь, fast-worker, раннер);
исполнителю формат задаёт сам шаблон задачи.
- [prompts/runtime-language.md](prompts/runtime-language.md) — язык
обмена (английский); подшивается в конец каждого собранного промпта,
чтобы правило доехало до самих агентов.
Правила:
@@ -30,16 +36,23 @@
вызова скилла):
```bash
cat "$D/review-params.md" "$P/review-boilerplate.md" > "$D/review-prompt.md"
cat "$D/task-body.md" "$P/runtime-language.md" > "$D/task-prompt.md"
cat "$D/review-params.md" "$D/line-task.md" "$P/review-boilerplate.md" \
"$P/runtime-language.md" > "$D/review-prompt-task.md"
# вторая линия: line-code.md -> review-prompt-code.md;
# одиночный ревьюер: line-rev.md -> review-prompt.md
cat "$P/triage-header.md" "$D/review-codex.md" "$D/review-claude.md" \
"$D/notes.md" > "$D/fix-prompt.md" # notes.md опционален — нет, так не включай
cat "$P/recheck-header.md" "$D/recheck-params.md" > "$D/recheck-prompt.md"
"$D/notes.md" "$P/runtime-language.md" > "$D/fix-prompt.md"
# notes.md опционален — нет, так не включай
cat "$P/recheck-header.md" "$D/recheck-params.md" \
"$P/runtime-language.md" > "$D/recheck-prompt.md"
```
## 1. Задача исполнителю (`codex exec`, workspace-write)
Сохрани как `$D/task-prompt.md` — под этим именем его ждут примеры
codex-exec.md.
Напиши параметрический текст в `$D/task-body.md`; финальный
`$D/task-prompt.md` собирается `cat`'ом с хвостом языка (сборка выше) —
под этим именем его ждут примеры codex-exec.md.
```markdown
# Task: {{ticket/goal in one line}}
@@ -74,15 +87,30 @@ will run it before the reviews start.
4. Doubts, if any.
```
## 2. Ревью: параметрический блок (один на ОБОИХ ревьюеров)
## 1а. Саморевью исполнителя (resume тем же тредом, effort medium)
Блок не знает, кто его читает; куда класть вердикт, задаёт обёртка вызова,
и пути у ревьюеров разные (иначе коллизия). Codex получает собранный файл
через stdin (вердикт = его `-o`-отчёт); Клод-субагенту в prompt — короткая
английская обёртка:
Отдельным ходом после отчёта о реализации, до внешних ревью — смена рамки
«автор → критик» отдельным ходом ловит больше, чем финальный пункт
чек-листа в промпте задачи:
```text
Read {{path to review-prompt.md}} and execute it. Working directory:
Now switch roles: you are a reviewer of your own diff. Walk it against the
task's acceptance criteria and boundaries. Fix what you find, stay inside
the task scope. Return one line: SELF-REVIEW: found N, fixed N — plus one
phrase per unfixed item, if any.
```
## 2. Ревью: общий блок + файл линии
Общий параметрический блок (`review-params.md`) один на обе линии и не
знает, кто его читает; линзу и префикс ID задаёт файл линии, поэтому
собранных промптов — по одному на линию, с разными путями. Куда класть
вердикт, задаёт обёртка вызова, и пути вердиктов у ревьюеров тоже разные
(иначе коллизия). Codex получает свой собранный файл через stdin (вердикт
= его `-o`-отчёт); Клод-субагенту в prompt — короткая английская обёртка:
```text
Read {{path to this line's review prompt}} and execute it. Working directory:
{{repo root}}. Write the full findings index to
{{$D/review-claude.md}} — it is outside the repo, so the mandate allows
it (via Write or a Bash heredoc, whichever you have). Keep the index
@@ -103,14 +131,35 @@ You are an independent adversarial reviewer. Working directory: repo root
## What you review
{{task file + spec; what is already committed and NOT under review}}
Changes (uncommitted, see the working tree): {{file list}}
Changes under review: {{exact paths, prepared diff path, or diff command —
must let the reviewer tell reviewed work from unrelated tree noise}}
Test command (expect {{N}} passed): {{command}}
## Focus
{{adapt: 3–4 points — math/edge cases, criteria compliance, test honesty,
shared code/regressions, artifacts}}
{{adapt: 2–3 extra points for this task — math/edge cases, artifacts,
shared code}}
```
Файлы линий (`line-task.md` / `line-code.md`), по одному на слепую линию:
```markdown
## Your line
FINDING PREFIX: TASK
Lens: compliance with the statement, acceptance criteria, boundaries,
intended observable result.
```
```markdown
## Your line
FINDING PREFIX: CODE
Lens: correctness, invariants, regressions, security, test honesty.
```
Одиночному ревьюеру (простая ступень шкалы этапа 4) — один `line-rev.md`
с обеими линзами и префиксом `REV`. По эмпирике прогонов естественное
распределение: Codex — CODE (дефекты нового кода), Клод — TASK (уровень
задачи и архитектуры).
Вариант для **этапа 2** (ревью постановки, кода изменений ещё нет) — тот же
boilerplate, другой параметрический блок:
@@ -132,6 +181,9 @@ Code to check the statement's facts against: {{file list with why}}
criteria checkable and gameable?, observability}}
```
Файл линии — тем же механизмом: только префикс (`SPEC-A` / `SPEC-B`,
одиночному обзору — `SPEC`); линза уже задана рамкой блока.
## 3. Параметрические хвосты триажа и перепроверки
`notes.md` (опционально, коротко, по-английски): фактура, которой нет у
@@ -144,6 +196,11 @@ Implementer's report with resolutions: read {{$D/fix-result.md}}.
Test command (expect {{N}} passed): {{command}}
```
Вердикт узкой перепроверки Клода бери прямо из строки task-notification —
обёртка требует финальным актом только VERDICT-строку; файл перепроверки
читай лишь при `ISSUES_REMAIN` или споре (эмпирика 2026-07-13: экономит
чтение без потерь).
Кавеат: проверь, что Codex-ревьюер может читать `$SCRATCH` из песочницы
(temp-каталоги обычно читаемы в workspace-write). Если нет — резолюции по
его находкам передай текстом (только его находки, не весь отчёт).
@@ -1,13 +1,17 @@
# Narrow re-check: do the fixes close your findings?
The implementer has processed the findings of your review. Check ONLY your
own findings — no full second pass. Mandate unchanged: modify nothing;
reading and running tests are allowed.
The implementer has processed the findings of your review; the path to
their resolutions report is appended below. Check ONLY your own findings —
no full second pass. Mandate unchanged: modify nothing; reading and
running tests are allowed.
Answer one line per your finding: CLOSED / NOT_CLOSED (why) /
REJECTION_VALID / REJECTION_INVALID (why). If you spot a NEW defect while
re-checking, report it in the same index format — narrowness limits scope,
not honesty. Final line: RECHECK: ALL_CLOSED | ISSUES_REMAIN
One line per your original ID: `ID | CLOSED | NOT_CLOSED (why) |
REJECTION_VALID | REJECTION_INVALID (why)`. Judge a rejection by its
argument in the resolutions report — contract and test, not taste. If you
spot a NEW defect while re-checking, report it with a new ID in the same
index format — narrowness limits scope, not honesty.
The implementer's report path, test command and expected counters are
appended below.
Final line: RECHECK: ALL_CLOSED | ISSUES_REMAIN
The implementer's resolutions report path, test command and expected
counters are appended below.
@@ -0,0 +1,14 @@
## Result contract
Report through the channel your call wrapper assigns:
- STATUS: complete | questions | blocked
- EVIDENCE: changed files, executed commands, final counters
- DECISIONS: only questions the coordinator must answer
- FINDINGS: severity, location, essence, how to verify
- NEXT: one concrete action or "none"
Omit empty sections. No raw output, no reasoning narrative. If a report
file is assigned, put the full result there and return only STATUS,
counters and `REPORT: <absolute path>`; otherwise return one concise
message.
@@ -11,7 +11,24 @@
## Findings file format — index only
SEVERITY(BLOCKER|MAJOR|MINOR|NIT) | file:line (or spec/task-file section) | one-phrase essence | how to verify/reproduce
One line per finding, with a stable ID (FINDING PREFIX comes from your
parameter block):
PREFIX-N | BLOCKER|MAJOR|MINOR|NIT | file:line (or spec/task-file section) | one-phrase essence | how to verify/reproduce
- IDs are permanent: triage and re-checks refer to findings by ID only.
- Confirmations of correctness — one line per item, no elaboration.
- A NON-GATING CONSIDERATION is a material risk of a decision safely
deferred to a later owner: one line, no ID, no severity, not counted,
does not change the verdict. Do not prescribe the downstream
implementation.
- ZERO findings: the report must list the reviewed scope and every check
or hypothesis you actually ran, with outcomes. A bare approval line is
invalid and will be discarded.
Confirmations of correctness — one line per item, no elaboration.
Final line: VERDICT: APPROVED | APPROVED_WITH_MINORS | CHANGES_REQUIRED
For a statement/plan review: judge the document at its own level.
Open implementation details do not make it incomplete — APPROVED means no
defect the document itself must fix; record deferred-decision risks as
non-gating considerations.
@@ -0,0 +1,7 @@
## Runtime language
Write every exchange file — reports, findings indexes, resolutions,
prompts — in English. Do not infer the output language from the repository
or the conversation. Content that ships into the repository (code
comments, docs, commits, task files) follows the repository's own
conventions instead.
@@ -1,17 +1,28 @@
# Triage of findings from independent blind reviews of your implementation
Below are the findings of the blind reviews, **verbatim**. Close what is
listed, change nothing else. For each finding, either:
Below are the findings of the blind reviews, **verbatim**. Process every
finding ID; change nothing outside their scope. Assign each ID exactly one
disposition:
- a TDD fix — first a test reproducing the finding, then the fix; or
- a reasoned rejection via contract/spec and test — a bare "not important"
is not accepted.
- FIXED — a TDD fix: first a test reproducing the finding, then the fix;
name the check that proves closure;
- REJECTED — a reasoned rejection via contract/spec and test; a bare
"not important" is not accepted;
- OUT_OF_SCOPE — needs a boundary decision; state which one;
- NEEDS_DECISION — a product, architecture, or risk choice a technical
argument cannot settle; state the open question.
No commits. Record rejection arguments in the task file so a fresh thread
can continue without this thread's context.
OUT_OF_SCOPE and NEEDS_DECISION belong to the coordinator — do not
silently decide them yourself.
Final report: one line per finding — fixed (how) / rejected (argument +
where recorded); test command, run counters, list of changed files.
No commits. Do NOT edit the task file: write detailed resolutions and
rejection arguments to your assigned report file — re-checks and fresh
threads will read that file by path; the task file is updated separately
at the end of the run.
Final report: one line per ID — `ID | disposition | one-phrase essence`;
then disposition counters, test command with counters, list of changed
files, and open questions for the coordinator, if any.
Orchestrator notes, if present below, carry task-level decisions (out of
scope / risk accepted) and verified facts you don't have — they are not