AIDive

Pakiet do filmu

Najpierw sprawdź plan Claude Code: zestaw EGM i checklista pominąć czy uruchomić review

7 min czytania

TL;DR i werdykt

Agent, który napisał twój plan, nie widzi jego dziur. EGM, czyli Elephant-Goldfish Model, to darmowy plugin Google do Claude Code, który to naprawia: słoń pisze z tobą plan, a złote rybki-recenzenci bez pamięci rozmowy czytają tylko plan i twój kod. To nie jest oficjalnie wspierany produkt Google s25.

Uruchomiliśmy go na jednej prawdziwej funkcji rodzinnej aplikacji z listą prezentów (Next.js, Notion jako baza): pozwolić krewnemu zarezerwować prezent, żeby dwie osoby nigdy nie kupiły tego samego, tak by rodzice nie widzieli, kto co zarezerwował. Na kopii repozytorium, nigdy na prawdziwej liście.

  • Planista sam nazwał wyścig. Recenzenci znaleźli dwie dziury, o których nikt w rozmowie nie wspomniał: rodzice mogli ustalić z własnych logów hostingu, kto co zarezerwował, a zapisane ciasteczko dało się odtworzyć, by anulować cudzą rezerwację.
  • Poprawka z review na wyścig osłabiała cel. Zakwestionowaliśmy ją i projekt się zmienił.
  • Świeża sesja zbudowała funkcję według zatwierdzonego projektu: 216 testów, a 30/30 wyścigów o ostatnią sztukę dało dokładnie jednego zwycięzcę. Działo się to na atrapie Notion, więc prawdziwy test nadal należy do nas.
  • Przy jednoliniowej poprawce README zwykły przepływ kosztował $0.0455 i 10 s. Ścieżka EGM dla funkcji kosztowała $7.10 i 32 min, zanim powstał jakikolwiek kod.

Werdykt: uruchom review, gdy błąd dotyka cudzych danych, prywatności, uprawnień lub pieniędzy. Pomiń je przy małej, jasnej poprawce. Pakiet poniżej daje ci instalację, jedną linię CLAUDE.md, ściągawkę i checklistę.

Synteza ze źródłami

Czym jest EGM. README Google mówi, że tysiące inżynierów Google używa go do pisania specyfikacji z agentami o głębokim kontekście i testowania ich pod obciążeniem subagentami bez kontekstu, zanim powstanie kod s1. To twierdzenie samego Google, bez liczby. Pomysł pochodzi od Dave'a Rensina, który napisał „We are mass-producing our mistakes", jeśli nie uważamy s7. Jedyne wydanie jak dotąd to v0.1.0, opublikowane 2026-10-27 s26. Ma licencję Apache-2.0 i jest „not an officially supported Google product" s25 s9.

Instalacja to dwie komendy i nowa sesja. claude plugin marketplace add google/elephant-goldfish-model, potem claude plugin install egm@egm, potem uruchom nową sesję s1 s2. Inni zgłaszają te same dwie komendy s6 s8. Do instalacji dodaliśmy --scope project, więc dotyczy tylko tego repozytorium. Wymaga Claude Code 2.1.271 lub nowszego ze względu na obsługę omitClaudeMd s2. Nasza wersja to 2.1.294.

Dlaczego recenzenci są ślepi. Zwykłe subagenty wykluczają rozmowę nadrzędną. omitClaudeMd wyklucza też pliki instrukcji użytkownika, projektu i lokalne s2. Adaptery recenzentów deklarują tools: [Read, Grep, Glob], model: inherit i omitClaudeMd: true s20. Synthesizer jest inny: uruchamia recenzentów, przy czym zagnieżdżanie jest dozwolone do 3 poziomów s2. Dokumentacja dodaje zastrzeżenie: to „context and tool isolation, not filesystem isolation: reviewers can read accessible files" s2.

Jedna linia CLAUDE.md trzyma raporty w folderze. Bez niej pliki review gromadzą się w głównym katalogu repozytorium, gdzie można je przez pomyłkę zacommitować s23. Linia EGM artifact directory: <path> w CLAUDE.md lub AGENTS.md kieruje je do tego folderu s2.

Przepływ pracy.

  • Brainstorm uruchamia rój złotych rybek z 6 perspektywami i pisze concepts_brief.md s21.
  • Draft pisze design_draft.md s22.
  • Review przechodzi pięć faz: Initial Zoom Out Review, Comprehension Review, Design Critique, Intermediate Zoom Out Review i Implementation Readiness s3.
  • Resolve oznacza każdy problem jako CONTEST, ESCALATE, PROPOSE FIX lub DECLINE. Ty wybierasz, a „auto accept" hurtowo stosuje proponowane poprawki, pomijając zakwestionowane punkty s24.

Co znaleźli inni. Raport z praktyki o Claude Code i EGM 0.1.0 naliczył 26 ustaleń (9 blockerów, 9 major, 8 nitów), 20 naprawionych, 4 pominięte, 2 błędne, około $3.40 zużycia w cenach API i 24 z 24 testów zaliczonych za pierwszym razem. Jego własna lekcja: „Goldfish read documents. They don't run code." s6. Rensin mówi, że około 30 % sugestii jest bardzo cennych, co nazywa więcej niż wystarczającym s7.

A co mówi, żeby go pominąć. README: przy małej, jasnej poprawce błędu użyj zwykłego przepływu pracy s25. FAQ: projekt i review „may not pay off for a small, well-understood change", a samo ukończenie przepływu „does not demonstrate a productivity improvement" s4. Współtwórca wypróbowałby go przy zadaniach w tle, uprawnieniach, zmianach danych lub nowej granicy usługi s10. Mały pilotaż (trzy przebiegi na ramię) stwierdził, że EGM „added nothing over the plain plan, at about five times the cost" s5. Cytujemy go jako jeden mały pilotaż, nie jako regułę.

Dlaczego wyścig jest realny. Dokumentacja Notion nie oferuje atomowego inkrementowania ani warunkowego zapisu dla właściwości, a zapisy zastępują całą wartość s27. Dwoje krewnych, którzy przeczytali ten sam licznik, może zapisać oboje i jedna rezerwacja ginie.

Nasz własny przebieg, dosłownie. Te liczby są nasze, nie z żadnego źródła powyżej. Model sesji Claude Sonnet 5.5, recenzenci go dziedziczą. Koszty to ekwiwalent API na Sonnet 5.5.

  • Pełne review uruchomiło 9 subagentów-recenzentów w 5 kolejnych etapach, a skonsolidowana tura trwała 7 min 24 s. Surowe ustalenia ze wszystkich pięciu etapów: 77. Scalone w 12 działań, z 1 Blockerem.
  • Resolve dał 37 problemów: 4 ESCALATE, 5 CONTEST, 2 DECLINE, 26 PROPOSE FIX. Najpierw sprawdził recenzentów z kodem i znalazł jedno błędne ustalenie: recenzent twierdził, że input.tsx staje się nieużywany, ale strona logowania nadal go importuje.
  • Kierunek poprawki z review na wyścig to porzucenie celu. Zakwestionowaliśmy go. Projekt dający jednego zwycięzcę powstał z tego sporu i żaden recenzent go nie czytał.
  • Build z zatwierdzonego projektu w świeżej sesji: 216 testów zaliczonych, a test wyścigu na ostatniej sztuce dał jeden sukces i jedno „full" w 30 z 30 seedów.
  • Koszt: $7.10 i 32 min czasu modelu, zanim powstał jakikolwiek kod (brainstorm, draft, review, resolve). Poprawka README na kopii bez EGM: $0.0455 i 10 s.

Kod

Pięć plików referencyjnych. Pierwsze cztery kopiujesz do repozytorium lub trzymasz otwarte. Piąty to prawdziwy raport z naszego przebiegu, żebyś zobaczył, jak wygląda wynik.

1. Instalacja i odinstalowanie. Uruchom z folderu projektu, potem rozpocznij nową sesję.

egm-install.sh

#!/usr/bin/env bash
# Install Google's EGM plugin for this project only.
# Needs Claude Code 2.1.271 or later (the reviewers rely on omitClaudeMd).
claude plugin marketplace add google/elephant-goldfish-model
claude plugin install egm@egm --scope project

# Start a new Claude Code session now, so the plugin loads.
# The commands then show up with the /egm: prefix.

# Uninstall (run from the same project folder):
# claude plugin uninstall egm@egm --scope project
# claude plugin marketplace remove egm

egm-install.sh on GitHub

2. Linia CLAUDE.md. Dodaj ją do CLAUDE.md swojego projektu, żeby raporty trafiały do docs/egm.

CLAUDE.md

<!-- Keeps EGM reports in one folder instead of the repo root. Create docs/egm or let EGM create it. -->
EGM artifact directory: docs/egm

CLAUDE.md on GitHub

3. Ściągawka do review. Komendy po kolei, pięć etapów i ich pliki raportów, co znaczą etykiety resolve i ustawienia recenzentów.

egm-review-cheatsheet.md

# EGM review cheat sheet

## The commands, in order

1. `/egm:egm-brainstorm <the feature in one sentence>` writes `concepts_brief.md`.
2. `/egm:egm-draft` writes the design document, one section at a time. You approve each section.
3. `/egm:egm-review <design>` runs the five review stages (below). Pick the consolidated mode to get one merged list.
4. `/egm:egm-resolve` turns the reports into one table of issues. You answer each one.
5. Open a fresh session and send:

```
Build the feature exactly to the approved design in docs/egm/<file>.md; add tests.
```

## The five review stages and their report files

| Stage | What it asks | Report file |
|---|---|---|
| 1. Initial Zoom Out Review | Does the design solve the right problem? | `zoom_out_report.md` |
| 2. Comprehension Review | Would a newcomer understand it? | `comprehension_report.md` |
| 3. Design Critique | Attacks the design, its structure and its wording | `critic_report.md` |
| 4. Intermediate Zoom Out Review | Zooms out again on the unedited design | `intermediate_zoom_out_report.md` |
| 5. Implementation Readiness | Checks each step against your real code | `implementation_readiness_report.md` |

The consolidated mode also writes `consolidated_review_report.md`. Resolve writes `goldfish_review_report.md`.

## What resolve's suggestions mean

- ESCALATE: the reviewers found a decision only you can make.
- CONTEST: the agent thinks the finding is wrong or the fix is too weak, and says why. You can still overrule it.
- DECLINE: the agent proposes not acting on the finding.
- PROPOSE FIX: the agent proposes an edit to the design.
- "auto accept": reply with these two words to batch-apply every PROPOSE FIX and skip CONTEST items. Decide the escalated issues first.

## Reviewer settings (Claude adapters)

```
tools: [Read, Grep, Glob]
model: inherit
omitClaudeMd: true
```

Read-only tools, the same model as your session, and no CLAUDE.md or other instruction files. This is context and tool isolation, not filesystem isolation: reviewers can read accessible files.

## Before you build

Reviewers read documents. They do not run code. If your design relies on an outside service behaving a certain way, run a check against a copy of the real thing before you ship.

egm-review-cheatsheet.md on GitHub

4. Checklista: pominąć czy uruchomić review. Przeczytaj ją, zanim wpiszesz prompt budowy.

skip-or-review.md

# Skip or review

Ask one question before you type the build prompt: if this is wrong, whose data, privacy, permissions or money does it touch?

## Run the EGM review when the change involves

- [ ] Data that several people write at the same time
- [ ] Privacy: something someone must not be able to see or work out
- [ ] Permissions: who can do, change or cancel what
- [ ] Money: a charge, a price, a balance, a refund
- [ ] A time rule, a background job or a new service boundary

## Use your normal workflow when

- [ ] The fix is small and clear and you can say it in one sentence
- [ ] You could one-shot it
- [ ] A wrong result is visible at once and costs nothing to undo

## What the README says

> Use it when a feature needs design decisions before implementation. For a small, clear bug fix, use your normal coding workflow.

## What the FAQ adds

> Design and review take time and may not pay off for a small, well-understood change.

> Completing the EGM workflow alone does not demonstrate a productivity improvement.

skip-or-review.md on GitHub

5. Prawdziwy skonsolidowany raport. To raport z naszego przebiegu na rodzinnej aplikacji z listą prezentów. Zwróć uwagę, jak każde działanie odsyła do ustaleń etapów, które za nim stoją.

example-consolidated-report.md

<!-- The consolidated review report from our run on a family gift-list app. -->

# Consolidated Review Report

**Target:** `docs/egm/gift-reservations.md` (464 lines; FeatureRange 1-280, DetailedRange 281-464)
**Mode:** Consolidated report, all five stages, no checkpoints. No edits were applied to the document.
**Stage reports:** `zoom_out_report.md` (5), `comprehension_report.md` (6), `critic_report.md` (7), `intermediate_zoom_out_report.md` (8), `implementation_readiness_report.md` (9).

**Overall:** The design fits the problem and keeps Notion as the only store. It is not ready to implement. Five issues need decisions from the author, and the plan has errors a reader can check against the code: a build that breaks mid-sequence, a wrong HTTP status, and a wrong assumption about SDK retries.

## Blockers
Stage 8 raised one item to Blocker (A1). Stages 5, 6, 7 and 9 report none.

## Action items by priority

### 🔴 Blocker

**A1. Decide whether to drop the post-write re-read.** (Stage 5 ZO-2, Stage 6 CO-3/CO-6, Stage 7 CR-1/CR-2/CR-3/CR-8, Stage 8 Z8-1, Stage 9 IR-6)
Lines 28, 132-134, 159, 174, 220, 276, 360, 366, 415.
The re-read does not catch the main race (the document says so at line 174), assumes read-after-write consistency with no evidence, checks only `x`, adds a third Notion call, and leaves the cookie and response behaviour undefined when it fails. Goal 2 and the rejection of Alternative F rest on it. Stage 8 recommends removing it, along with `changed_meanwhile` and the "unverified" branch, rewriting Goal 2 as "reduces duplicate purchases, does not prevent them" and rewriting Alternative F around the real trade-off. If kept, every post-write failure needs a stated cookie and response behaviour. Decide this first: it closes or removes about eight other findings.

### 🟡 Major: design and scope

**A2. Fix the cookie's stated guarantees and the stale-record dead end.** (CR-4, CR-5, Z8-2, Z8-3, ZO-5)
Lines 32, 34, 85, 111, 114, 144-148, 246-250, 355.
A saved copy of the cookie can be replayed to cancel someone else's unit, and clearing the cookie bypasses the one-unit and 80-id limits. After the parents release a unit by hand, the stale cookie makes reserve fail with 409 `already_reserved`. State the real threat model (stops accidental cancels and casual tampering among about 30 relatives), and decide whether to keep the `already_reserved` guard and the 80-id cap.

**A3. Qualify "no identity is stored or logged", and decide on the bespoke log line.** (CR-6, Z8-4, CO-7)
Lines 29, 37, 270-271, 367.
Vercel request logs and Notion edit history, together with timestamped log lines, can let the parents correlate who reserved what. The log line is also specified three different ways.

**A4. Settle where configuration is checked, and the effect on the list route.** (ZO-4, Z8-5, CR-17, CO-12, IR-13)
Lines 36, 115, 117, 168, 394-395, 403.
The proxy 503 for `/api/registry*` changes the existing list GET route, which the plan doesn't list. Configuration is checked in the proxy, the routes and `canReserve`. The 401 versus 503 precedence is unspecified.

**A5. Reuse the existing HMAC helper.** (ZO-1, IR-8)
Lines 111, 324. `src/lib/auth.ts` already has `hmacBase64Url`. The plan writes a second implementation and leaves the crypto details (key import, base64url without `Buffer`, signed text) unspecified.

### 🟡 Major: factual errors and unstated assumptions

**A6. "Each step leaves the project building" is false.** (CO-2, IR-1, Z8-6)
Line 283. The build is red from item 8 through item 16. Group the changes into one landing phase or keep the old exports until the consumers go.

**A7. The deleted `PATCH` route returns 404, not 405.** (CO-5, CR-7, IR-2)
Lines 116, 181, 388, 458. Correct the claim and manual test 7. A 410 stub is an option, but Stage 8 advises against adding code for it.

**A8. Handler signatures ignore Next 16 async APIs.** (IR-3)
Lines 115, 378, 382, 402. `params` is a `Promise`, and `cookies()` is async.

**A9. The Notion SDK already retries 429s, and error classification is unspecified.** (IR-4, IR-5)
Lines 276, 339-345. "No automatic retry" is false unless `getClient` sets `retry: false`. Name how `rate_limited`, `not_found` and `retry-after` are detected, state the `pages.update` payloads, and reconcile the two signatures of `writeReservationState`. A missing `Acheté ?` returns 502 before the 422 check.

**A10. Undefined terms and sources.** (CO-1, CR-12, CO-4, CO-10, CO-14)
`concepts_brief.md`, "the owner", "reconciliation", "Public only" filter, `x` and `y`, and the data-source id are used without definition or link. Five places justify choices by process history a new reader cannot verify.

**A11. Required sections and rationale.** (CR-9, CR-10, CR-11)
There is no Risks & Mitigations section (the content is scattered). Alternatives A, J and M are rejected only on "the parents decided"; C and F lack the decisive trade-off. The Open Question at line 57 points to intro wording that is not in the plan.

**A12. Unresolved decisions in the plan.** (IR-6, IR-7, IR-9, IR-10, IR-11, IR-12)
Cancel error mapping, the cookie-change rule, response bodies, final French copy, the client rewrite details and automated test coverage for the Notion layer, routes, proxy and table.

### 🟢 Nit

*   **Simplicity.** Single `[action]` route instead of two files; delete the unused `checkbox.tsx` and `input.tsx`; remove the "Optional extras" question; revert to strict `x/y` parsing or fix the Goal wording; fold Alternatives G, H and I into Goals and Non-Goals. (ZO-6, ZO-8, Z8-7, Z8-8, Z8-9, CR-19)
*   **Structure.** Reorder Open Questions; split CUJ 4; add one error-path CUJ; fix the ambiguous state table and the packed response table; fix the "two new calls" list. (CR-13 to CR-16)
*   **Wording and terminology.** Unify `acheté`/`achete`/`Acheté ?` and `x/y` versus `acquise/totale`; remove filler and duplicated statements; fix French copy and apostrophes; pin `vitest`; split the dense reserve step 7 and `act` handler sentences. (CR-18, CR-20 to CR-24, IR-14 to IR-20)

## Traceability matrix

| Action item | Stage 5 | Stage 6 | Stage 7 | Stage 8 | Stage 9 |
| :--- | :--- | :--- | :--- | :--- | :--- |
| A1 re-read | ZO-2 | CO-3, CO-6 | CR-1, CR-2, CR-3, CR-8 | Z8-1 | IR-6 |
| A2 cookie guarantees, stale record | ZO-5 | | CR-4, CR-5 | Z8-2, Z8-3 | |
| A3 identity and logging | | CO-7 | CR-6 | Z8-4 | IR-17 |
| A4 config checks, list route | ZO-4 | CO-12 | CR-17 | Z8-5 | IR-13 |
| A5 HMAC reuse | ZO-1 | | | | IR-8 |
| A6 build order claim | | CO-2 | | Z8-6 | IR-1 |
| A7 405 vs 404 | | CO-5 | CR-7 | Z8-7 | IR-2 |
| A8 async handler APIs | | | | | IR-3 |
| A9 SDK retry, error mapping | | | | | IR-4, IR-5 |
| A10 undefined terms | | CO-1, CO-4, CO-10, CO-14 | CR-12 | | |
| A11 risks section, rationale | | | CR-9, CR-10, CR-11 | | |
| A12 unresolved plan decisions | ZO-3 | CO-13 | | | IR-6 to IR-12 |
| Nits | ZO-6 to ZO-8 | CO-8, CO-9, CO-11, CO-15, CO-16 | CR-13 to CR-24 | Z8-7 to Z8-9 | IR-14 to IR-20 |

## Coverage and limits
- Stage 7 critics reviewed lines 1-280 only. Stage 9 reviewers audited lines 281-464 against the real code under `src/`.
- No stage reviewed any file outside the target document and the existing source files named above.
- Stage 8 ran on the unedited document, so its recommendations (drop the re-read, drop `already_reserved`, remove the proxy 503) are proposals for the author to decide, not settled findings.
- Reviewers cannot run the app. The claims about Next.js (404 versus 405) and the Notion SDK (retry defaults) come from the reviewers reading the code and type definitions in the repo and should be confirmed during the fix.

example-consolidated-report.md on GitHub

Zrób to w poniedziałek

  • Sprawdź claude --version. Potrzebujesz 2.1.271 lub nowszej.
  • Uruchom dwie komendy instalacji z egm-install.sh w projekcie, potem otwórz nową sesję.
  • Dodaj EGM artifact directory: docs/egm do CLAUDE.md tego projektu.
  • Wybierz jedną funkcję, której jeszcze nie zbudowałeś, a w której błąd dotyka wspólnych danych, prywatności, uprawnień lub pieniędzy. Uruchom na niej /egm:egm-brainstorm w jednym zdaniu.
  • Uruchom /egm:egm-draft, zatwierdzaj projekt sekcja po sekcji, potem /egm:egm-review <design> i przeczytaj pięć raportów.
  • Uruchom /egm:egm-resolve. Na eskalowane problemy odpowiedz sam i zakwestionuj każdą poprawkę, która osłabia twój cel.
  • Otwórz świeżą sesję i wyślij: „Build the feature exactly to the approved design in docs/egm/.md; add tests." Potem sam przetestuj ryzykowną ścieżkę.
  • Przy następnej małej, jasnej poprawce otwórz skip-or-review.md i przejdź prosto do zwykłego przepływu pracy.

Dalej

Inne komendy, które pominęliśmy. Plugin ma też /egm:egm-bootstrap i /egm:egm-drift-report, drugi przepływ dla istniejącej bazy kodu i cotygodniową kontrolę dryfu. Nie uruchamialiśmy ich, więc nie mówimy nic o tym, jak dobrze działają.

Inne harnessy i mieszane modele. Używaliśmy tylko Claude Code. Recenzenci używają model: inherit, więc działali na modelu naszej sesji i mogą dzielić jego martwe punkty. Nie próbowaliśmy innych harnessów ani mieszania modeli.

Plan Mode i inne planery. Nie porównywaliśmy EGM z Plan Mode ani innymi narzędziami do planowania. Cytowany wyżej pilotaż to jedyne bezpośrednie porównanie i jest małe.

Uczciwe ograniczenia naszego przebiegu.

  • Poprawka claim ledger na wyścig wyszła z resolve po tym, jak zakwestionowaliśmy review, i żadna złota rybka nie sprawdziła jej ponownie.
  • Poprawka opiera się na tym, że Notion zachowuje jedną kolejność równoczesnych dopisań. Dokumentacja Notion tego nie obiecuje.
  • Wynik 30 z 30 powstał na atrapie Notion. Test wyścigu z projektu na kopii prawdziwej bazy nie został wykonany. Uruchom go przed wdrożeniem.
  • Review sprawdza dokumenty i kod, a aplikacji nie uruchomi. Dwa twierdzenia o frameworku w naszym raporcie (404 kontra 405, domyślne ponowienia SDK) pochodzą z czytania kodu, a raport każe je potwierdzić.
  • 30 % Rensina i liczby z raportu z praktyki to liczby ich autorów, nie nasze.

FAQ

Czy recenzenci widzą mój CLAUDE.md albo nasz czat? Nie. Wykluczają rozmowę, a omitClaudeMd: true ukrywa CLAUDE.md i inne pliki instrukcji. Nadal czytają plan i każdy dostępny plik s2.

Dlaczego moje pliki review leżą w głównym katalogu repozytorium? Claude Code domyślnie nie ma katalogu artefaktów s23. Dodaj do CLAUDE.md linię EGM artifact directory:.

Czy muszę odpowiadać na każdy problem w resolve? Nie. Odpowiedz na eskalowane, potem napisz „auto accept", by hurtowo zastosować proponowane poprawki. Zakwestionowane punkty są pomijane s24.

Czy zielony zestaw testów to wystarczający dowód? Nie. Nasz zaliczył 216 testów, a mimo to test wyścigu na prawdziwym Notion nadal czekał. Sam przetestuj ryzykowną ścieżkę.

Kiedy pominąć review? Przy małej, jasnej poprawce, jak mówi README s25. W naszym przebiegu ta poprawka bez niego kosztowała $0.0455 i 10 s.

Pliki