pi-ext
bugabingas pi extensions
owned by bugabinga
extensions/superpowers/prompts/requesting-code-review.md
Raw
description: "Run strict Superpowers review: correctness, proof, deslop, compression, security, perf, UX, docs."
argument-hint: "<file|directory|diff|scope>"
tools: [read, bash, grep, find, ls]
thinking: medium
accent: syntaxKeyword
Requesting Code Review
Review only.
Do not edit.
No politeness tax.
No generic praise.
Findings need evidence.
Inputs
Establish:
- target files/diff/plan
- base/head commit range when available
- user objective
- relevant project rules
- tests or proof expected
If target is ambiguous, inspect likely changed files and state scope.
Pass 1 — Correctness Gate
Check:
- requested behavior implemented
- logic errors, race/order bugs, off-by-one, bad state transitions
- error paths and failure modes
- API/CLI/UI contract drift
- docs match behavior
Pass 2 — Test/Proof Gate
Check:
- tests prove behavior, not implementation trivia
- failing paths covered when important
- manual/UI proof exists when requested
- benchmark/profiling exists for perf claims
- no completion claim without evidence
Pass 3 — Deslop Gate
Find LLM slop:
- plausible but unverified APIs or assumptions
- needless traits/classes/wrappers/pass-through layers
- generic soup, global state, vague config
- duplicated near-identical code with renamed variables
- stringly typed domains where enum/newtype/validated shape fits
unwrap/expect/panic/swallowed errors/vague catch-all errors
- missing docs/tests for public behavior or risky failure paths
- insecure input/path/shell/env handling
Pass 4 — Compression Gate
Find design compression opportunities:
- repeated command handlers, parsers, errors, tests, data shapes
- boilerplate that should become a helper/table/enum/data-driven path
- overbroad abstractions hiding simple control flow
- under-abstracted repeated logic likely to drift
- dead layers, needless adapters, repeated conversions
Compression is not code golf.
Prefer one good abstraction over many clever ones.
Pass 5 — Handmade UX/Style Gate
Check:
- direct code, small functions, explicit state
- no legacy/compat sludge unless required
- no edge-case theater
- readable names and boring control flow
- UI is usable, high-contrast, keyboard-friendly, not ugly
- performance avoids obvious allocations/O(n²)/N+1/process churn
Severity
- BLOCKER:
incorrect, unsafe, untested critical path, violates spec, or fake completion.
- MAJOR:
likely bug, bad API, serious slop, duplicated design risk, missing important
proof.
- MINOR:
cleanup, naming, small simplification.
- NOTE:
observation, no action required.
Output
REVIEW
- verdict: pass | fail
- scope: ...
- blockers:
- file:line — issue — required fix
- major:
- ...
- minor:
- ...
- slop:
- pattern — evidence — severity
- compression:
- repeated shape — proposed simpler shape — risk
- tests/proof:
- present: ...
- missing: ...
- required fixes: ...
- verify: ...
Follow-up
- Critical/BLOCKER and MAJOR findings must be fixed or explicitly rejected with
evidence before proceeding.
- If findings exist:
use
receiving-code-review.
- If fixes are large:
write a plan first.
- If review passes:
run
verification-before-completion before claiming shipped.
Target:
$ARGUMENTS
Markdown source
File outline
---
description: "Run strict Superpowers review: correctness, proof, deslop, compression, security, perf, UX, docs."
argument-hint: "<file|directory|diff|scope>"
tools: [read, bash, grep, find, ls]
thinking: medium
accent: syntaxKeyword
---
# Requesting Code Review
Review only.
Do not edit.
No politeness tax.
No generic praise.
Findings need evidence.
## Inputs
Establish:
- target files/diff/plan
- base/head commit range when available
- user objective
- relevant project rules
- tests or proof expected
If target is ambiguous, inspect likely changed files and state scope.
## Pass 1 — Correctness Gate
Check:
- requested behavior implemented
- logic errors, race/order bugs, off-by-one, bad state transitions
- error paths and failure modes
- API/CLI/UI contract drift
- docs match behavior
## Pass 2 — Test/Proof Gate
Check:
- tests prove behavior, not implementation trivia
- failing paths covered when important
- manual/UI proof exists when requested
- benchmark/profiling exists for perf claims
- no completion claim without evidence
## Pass 3 — Deslop Gate
Find LLM slop:
- plausible but unverified APIs or assumptions
- needless traits/classes/wrappers/pass-through layers
- generic soup, global state, vague config
- duplicated near-identical code with renamed variables
- stringly typed domains where enum/newtype/validated shape fits
- `unwrap`/`expect`/panic/swallowed errors/vague catch-all errors
- missing docs/tests for public behavior or risky failure paths
- insecure input/path/shell/env handling
## Pass 4 — Compression Gate
Find design compression opportunities:
- repeated command handlers, parsers, errors, tests, data shapes
- boilerplate that should become a helper/table/enum/data-driven path
- overbroad abstractions hiding simple control flow
- under-abstracted repeated logic likely to drift
- dead layers, needless adapters, repeated conversions
Compression is not code golf.
Prefer one good abstraction over many clever ones.
## Pass 5 — Handmade UX/Style Gate
Check:
- direct code, small functions, explicit state
- no legacy/compat sludge unless required
- no edge-case theater
- readable names and boring control flow
- UI is usable, high-contrast, keyboard-friendly, not ugly
- performance avoids obvious allocations/O(n²)/N+1/process churn
## Severity
- BLOCKER:
incorrect, unsafe, untested critical path, violates spec, or fake completion.
- MAJOR:
likely bug, bad API, serious slop, duplicated design risk, missing important
proof.
- MINOR:
cleanup, naming, small simplification.
- NOTE:
observation, no action required.
## Output
```text
REVIEW
- verdict: pass | fail
- scope: ...
- blockers:
- file:line — issue — required fix
- major:
- ...
- minor:
- ...
- slop:
- pattern — evidence — severity
- compression:
- repeated shape — proposed simpler shape — risk
- tests/proof:
- present: ...
- missing: ...
- required fixes: ...
- verify: ...
```
## Follow-up
- Critical/BLOCKER and MAJOR findings must be fixed or explicitly rejected with
evidence before proceeding.
- If findings exist:
use `receiving-code-review`.
- If fixes are large:
write a plan first.
- If review passes:
run `verification-before-completion` before claiming shipped.
Target:
$ARGUMENTS