diff --git a/dev/code-review/SKILL.md b/dev/code-review/SKILL.md index 901547e..3714679 100644 --- a/dev/code-review/SKILL.md +++ b/dev/code-review/SKILL.md @@ -19,7 +19,9 @@ thorough, never pad with style opinions. This skill is designed to run with **fresh context** (e.g. in a subagent). If the current session authored the changes it is about to review, say so and recommend a fresh-context review instead: the assumptions made while writing code carry -over into its review. +over into its review. The same applies to the review brief itself: an issue or +prompt highlights what the author considered risky — deliberately review what it +does *not* mention (fakes, declared verification gaps, transport plumbing). ## Workflow @@ -33,6 +35,11 @@ over into its review. 3. If the diff is large (roughly >600 changed lines): review in passes, one group of related files at a time, prioritizing source code over tests, docs, and generated files. State explicitly which files you did not fully review. +4. **Declared verification gaps are review scope.** An MR that says "X is not + covered by automation — manual smoke before merge" has marked a surface as + untested. Either run that smoke yourself or review the surface by other + means (trace the real contract, exercise it in a safe environment). + Accepting the declaration as handled is how honest MRs ship broken features. ### Phase 2 — Context (the diff alone lies) @@ -44,6 +51,12 @@ over into its review. 3. Trace the change into the codebase: open the full files around the hunks, grep callers of changed functions, follow the data flow end to end. Do not judge code you have not seen in context. +4. **Inventory the fakes**: find the test doubles the diff introduces or relies + on for external systems (docker, HTTP clients, DBs, queues, SDKs). Each fake + encodes the author's assumption about that system's contract — verify every + assumption against the real library (docs, source, or the repo's own proven + call site). A green suite against an optimistic fake proves the code matches + the assumption, not the system. ### Phase 3 — Review passes @@ -54,6 +67,12 @@ Run the passes in this order; spend effort where the real defects live: conditions, wrong state transitions. 2. **Contract breaks** — changed signatures or behavior vs. callers; API, DB, or schema mismatches; serialization changes. +2b. **External call sites vs. proven patterns** — for every call the diff adds + into an external SDK, driver, or daemon API, find the repo's existing proven + call site for the same operation and diff the two call shapes (options, + flags, stream modes, attach/hijack variants). Subtle contract differences + (a missing `hijack: true` on a docker attach, a dropped TLS option) never + show up in unit tests with fakes — they only show in production. 3. **Security at trust boundaries** — user input, files, network, env vars, secrets in logs or history, auth checks, injection, unsafe deserialization. 4. **Tests** — which changed behavior has no test? Do new tests assert