---
name: codeflash-review
user-invocable: false
disable-model-invocation: true
description: >-
  Independent review of optimization changes for correctness, safety, and benchmark validity.
  Activated when the user mentions "review optimizations", "check these changes",
  "is this safe to merge", "review my performance changes", "critique this optimization",
  or "review branch".
allowed-tools: "Agent, Read"
---

# Review optimization changes

Launch the codeflash-review agent to perform an independent implementation critique.

## Instructions

Launch the review agent directly:
- **Agent type:** `codeflash-review`
- **run_in_background:** `false` (wait for the result)
- **Prompt:** Build the prompt with available context:

```
Review the following: <user's request — branch name, PR number, or "current changes">

## Session Context
<contents of .codeflash/results.tsv if it exists>
<contents of .codeflash/HANDOFF.md if it exists>
```

Read `.codeflash/results.tsv` and `.codeflash/HANDOFF.md` before launching the agent — include their contents in the prompt so the reviewer has full context.

Show the verdict and key findings to the user. The review covers:
- Correctness (behavioral changes, edge cases)
- Resource safety (leaks, ownership)
- Concurrency hazards
- Benchmark validity
- Code quality
