Review Mode
After you write code, before you say "done", switch hats. You were the author; now you are the
reviewer. The reviewer has one job: find the things the author didn't.
This Skill is the cheapest insurance you can buy against the most common agent failure mode —
declaring a task done when it is not.
When to use
Activate when any of these is true:
- A non-trivial sub-task has just finished (a function, a file, a config, a migration, a test
suite, a doc section).
- The user said "review this", "double-check", "is this right", "spot the bug", or "any issues
with this?".
- You are about to mark a
todowrite step [x] as done and that step touches anything the
user will rely on.
- The work crossed a trust boundary (production, public API, schema, persisted data, a contract
someone else will code against).
When NOT to use
- A trivial one-line edit. The marginal value of review is too low to pay the token cost.
- The user explicitly said "ship it" / "no review" / "just commit" in this turn.
- You are mid-stream on a single step and the next step will surface errors anyway (e.g.
running the test suite next).
- The work is exploratory (a sketch, a draft, "show me what you mean"). Review it later, when
the draft becomes a proposal.
Process
State the review scope in one sentence before you read anything: "Reviewing the auth
refactor: 4 files changed, new OidcProvider trait, SAML tests must still pass." Future you
needs the boundary.
Re-read your own output from a critic's position. Open the file(s) you changed. Do not
re-read the diff; read the result. Look for:
- Off-by-one, wrong-sign, null/None mishandling, empty-collection edge cases.
- Naming that lies (function called
validate that does not validate).
- Log/error paths that swallow useful information.
- Tests that pass for the wrong reason (e.g. asserting
== on a value the function never
returns).
- Public API surface that locks in a bad design (a struct that is too wide to evolve, a
flag that should be an enum).
- Comments that contradict the code.
Run the verifier if there is one. Tests, linter, type-check, schema diff, manual smoke.
If the verifier says green, you have evidence; if it is silent, you have hope. Do not
ship hope.
Produce a verdict in this exact shape:
## Review — <scope>
**Verdict**: PASS / PASS with caveats / FIX required / REDO
**What I checked** (bullet list of specific things):
- <...>
**What I found** (concrete defects, not vibes):
- <file:line — defect — fix>
- (or "none")
**What I am unsure about** (so the user can decide):
- <...>
- (or "nothing — the verifier ran and the design matches the spec")
Apply fixes if the verdict is FIX / REDO and the fix is small. Do not fix large things
in review mode; surface them and start a new plan-stream-emit cycle.
If PASS, continue to the next step. The review record is part of the audit trail —
keep it short but specific.
Output contract
The user sees, in this order:
- One-line scope statement.
- The Review block above.
- (If fix) the one-line summary of what you fixed.
- (If PASS) the next concrete step.
Example
Reviewing the auth refactor: 4 files changed, new `OidcProvider` trait, SAML tests must still pass.
## Review — auth refactor (OIDC adapter v1)
**Verdict**: PASS with caveats
**What I checked**:
- `cargo check` on the workspace
- `cargo test auth::` (all 14 tests pass, including the 12 unchanged SAML ones)
- the new `OidcProvider` trait signature for type-correctness
- the `auth.oidc_enabled = false` default path against the existing SAML flow
**What I found**:
- `src/auth/oidc/mod.rs:42` — `expires_at` is `i64` not `u64`; future-dated tokens underflow.
Fix applied (cast + `saturating_sub`).
- `src/auth/callback.rs:91` — error path on token exchange returns the raw HTTP body, leaks
the client_secret on 4xx. Fix applied (redact before returning).
- nothing else
**What I am unsure about**:
- whether the OIDC `nonce` claim should be persisted in the session store; the Okta
spec says yes, Auth0 says optional. Pick before merging.
Common pitfalls
- Do not review your own diff — review the result. A diff makes you forgive yourself
(you remember why each line is there). The file on disk has no such forgiveness.
- Do not write "looks good" as a verdict. "Looks good" is a vibe, not a finding. Name the
specific things you checked, even if they are negative ("verified X, Y, Z are absent").
- Do not skip the verifier step. If there is no test, run the build. If there is no build,
read the file with a critical eye.
- Do not fix in review mode beyond trivial. Anything that takes more than 2-3 minutes to
fix is a new sub-task, not a review item. Surface it.
- Do not produce a 50-line review report for a 5-line change. Match the report size to
the change size.
- Do not review work you did not just do. If the user asks you to review code from last
week, this Skill's "just finished" assumption does not hold — re-anchor by stating scope.
Verification checklist
1---2name: review-mode3description: Switch to critic mode after finishing a chunk, produce PASS / FIX / REDO verdict. USE WHEN: sub-task boundary reached, user said "review" / "double-check" / "is this right" / "spot the bug" / "看一下" / "review 一下", before reporting "done" on anything user will rely on, after writing code / config / doc, after sub-agent returns. TRIGGER PHRASES: "review", "double-check", "看一下", "review 一下", "查一下", "检查", "找 bug", "is this right", "spot the bug", "verifier", "自己 review 一下". SKIP WHEN: one-line edit, user explicitly said "ship it" / "no more review" / "不用 review" in this turn, user can see result in chat immediately.4license: Apache-2.05---67# Review Mode89After you write code, before you say "done", switch hats. You were the author; now you are the10reviewer. The reviewer has one job: find the things the author didn't.1112This Skill is the cheapest insurance you can buy against the most common agent failure mode —13declaring a task done when it is not.1415## When to use1617Activate when **any** of these is true:1819- A non-trivial sub-task has just finished (a function, a file, a config, a migration, a test20 suite, a doc section).21- The user said "review this", "double-check", "is this right", "spot the bug", or "any issues22 with this?".23- You are about to mark a `todowrite` step `[x]` as done and that step touches anything the24 user will rely on.25- The work crossed a trust boundary (production, public API, schema, persisted data, a contract26 someone else will code against).2728## When NOT to use2930- A trivial one-line edit. The marginal value of review is too low to pay the token cost.31- The user explicitly said "ship it" / "no review" / "just commit" in this turn.32- You are mid-stream on a single step and the next step will surface errors anyway (e.g.33 running the test suite next).34- The work is exploratory (a sketch, a draft, "show me what you mean"). Review it later, when35 the draft becomes a proposal.3637## Process38391. **State the review scope** in one sentence before you read anything: "Reviewing the auth40 refactor: 4 files changed, new `OidcProvider` trait, SAML tests must still pass." Future you41 needs the boundary.422. **Re-read your own output from a critic's position.** Open the file(s) you changed. Do not43 re-read the diff; read the **result**. Look for:44 - Off-by-one, wrong-sign, null/None mishandling, empty-collection edge cases.45 - Naming that lies (function called `validate` that does not validate).46 - Log/error paths that swallow useful information.47 - Tests that pass for the wrong reason (e.g. asserting `==` on a value the function never48 returns).49 - Public API surface that locks in a bad design (a struct that is too wide to evolve, a50 flag that should be an enum).51 - Comments that contradict the code.523. **Run the verifier if there is one.** Tests, linter, type-check, schema diff, manual smoke.53 If the verifier says green, you have *evidence*; if it is silent, you have *hope*. Do not54 ship hope.554. **Produce a verdict** in this exact shape:5657 ```markdown58 ## Review — <scope>5960 **Verdict**: PASS / PASS with caveats / FIX required / REDO6162 **What I checked** (bullet list of specific things):63 - <...>6465 **What I found** (concrete defects, not vibes):66 - <file:line — defect — fix>67 - (or "none")6869 **What I am unsure about** (so the user can decide):70 - <...>71 - (or "nothing — the verifier ran and the design matches the spec")72 ```73745. **Apply fixes if the verdict is FIX / REDO and the fix is small.** Do not fix large things75 in review mode; surface them and start a new `plan-stream-emit` cycle.766. **If PASS**, continue to the next step. The review record is part of the audit trail —77 keep it short but specific.7879## Output contract8081The user sees, in this order:8283- One-line scope statement.84- The Review block above.85- (If fix) the one-line summary of what you fixed.86- (If PASS) the next concrete step.8788## Example8990```markdown91Reviewing the auth refactor: 4 files changed, new `OidcProvider` trait, SAML tests must still pass.9293## Review — auth refactor (OIDC adapter v1)9495**Verdict**: PASS with caveats9697**What I checked**:98- `cargo check` on the workspace99- `cargo test auth::` (all 14 tests pass, including the 12 unchanged SAML ones)100- the new `OidcProvider` trait signature for type-correctness101- the `auth.oidc_enabled = false` default path against the existing SAML flow102103**What I found**:104- `src/auth/oidc/mod.rs:42` — `expires_at` is `i64` not `u64`; future-dated tokens underflow.105 Fix applied (cast + `saturating_sub`).106- `src/auth/callback.rs:91` — error path on token exchange returns the raw HTTP body, leaks107 the client_secret on 4xx. Fix applied (redact before returning).108- nothing else109110**What I am unsure about**:111- whether the OIDC `nonce` claim should be persisted in the session store; the Okta112 spec says yes, Auth0 says optional. Pick before merging.113```114115## Common pitfalls116117- **Do not review your own diff — review the result.** A diff makes you forgive yourself118 (you remember why each line is there). The file on disk has no such forgiveness.119- **Do not write "looks good" as a verdict.** "Looks good" is a vibe, not a finding. Name the120 specific things you checked, even if they are negative ("verified X, Y, Z are absent").121- **Do not skip the verifier step.** If there is no test, run the build. If there is no build,122 read the file with a critical eye.123- **Do not fix in review mode beyond trivial.** Anything that takes more than 2-3 minutes to124 fix is a new sub-task, not a review item. Surface it.125- **Do not produce a 50-line review report for a 5-line change.** Match the report size to126 the change size.127- **Do not review work you did not just do.** If the user asks you to review code from last128 week, this Skill's "just finished" assumption does not hold — re-anchor by stating scope.129130## Verification checklist131132- [ ] Did you state the review scope in one sentence?133- [ ] Did you re-read the file(s) from a critic's position, not the diff?134- [ ] Did you run the verifier (tests / lint / type-check / smoke) and cite its result?135- [ ] Is the verdict one of {PASS, PASS with caveats, FIX required, REDO}?136- [ ] Is "What I found" specific (file:line — defect — fix), not vague?137- [ ] If you applied a fix, was it trivial (< 2-3 minutes)?138- [ ] Did the user see the review record before you moved on?