EN 中文

# Code Review — Structured Diff Review

# Code Review — 结构化代码审查

Review working-tree or branch diffs with 4 effort levels: quick, medium, high, max.

对工作区变更或分支差异进行结构化审查，四档检查深度。

## Quick Start

## 快速开始

    $ /code-review            # Review current changes (medium)
    $ /review                 # Alias for /code-review
    $ /code-review thorough   # High depth
    $ /code-review high main  # Review diff against main branch
    $ /code-review max --fix   # Exhaustive + auto-fix

## Effort Levels

## 审查深度

Level | 级别 | Command | 命令 | Scope | 范围
--- | --- | --- | --- | --- | ---
quick | `/code-review quick` | High-confidence blocking bugs only | 只报高置信度阻塞 bug
medium | `/code-review` (default) | Blockers + obvious code smells | 阻塞 + 明显代码异味
high | `/code-review high` | Cross-file data flow, concurrency, error handling | 跨文件数据流、并发、错误处理
max | `/code-review max` | Exhaustive — long-tail design, perf, test coverage | 穷举——长尾设计、性能、测试覆盖

## Work Modes

## 工作模式

### Review + Output (`--comment`)

### 审查 + 输出

Results printed as structured PR-style file-by-file comments in-conversation.

审查结果以 PR 风格逐文件输出到对话中。

### Review + Auto-Fix (`--fix`)

### 审查 + 自动修复

After reviewing, applies the suggested fixes to the working tree. Each fix is a separate edit so you can undo selectively with `/undo`.

审查后自动将建议修复应用到工作区。每项修复是独立的 edit，可通过 /undo 选择性撤销。

### Branch Diff Review

### 分支差异审查

    $ /code-review high main   # Review changes since main
    $ /code-review max feature-branch

## See Also

## 相关文档

- Checkpoint — undo/redo reviewed changes
- Checkpoint——用 undo/redo 回滚审查后的变更
- References — semantic symbol references with LSP
- References——用 LSP 做语义符号引用查找