一键导入
review-pr
Use when reviewing a pull request, checking a diff, or doing code review in the SMG repository — enforces systematic subsystem-aware review
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when reviewing a pull request, checking a diff, or doing code review in the SMG repository — enforces systematic subsystem-aware review
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when preparing to commit, open a PR, or check quality gates in the SMG repository — enforces verification before shipping
Use when implementing a feature, adding functionality, fixing a bug, or modifying behavior in the SMG repository — routes to subsystem-specific recipes and enforces step-by-step execution
Use when you need to understand the SMG codebase structure, find which crate owns a subsystem, or understand how crates depend on each other before making changes
| name | review-pr |
| description | Use when reviewing a pull request, checking a diff, or doing code review in the SMG repository — enforces systematic subsystem-aware review |
NO REVIEW APPROVAL WITHOUT CHECKING ALL TOUCHED SUBSYSTEMS
If you haven't mapped the changed files to checklist sections, you cannot start reviewing.
1. FETCH: Get the PR diff (gh pr diff <number>)
2. MAP: List changed files → match to sections using the file-to-section table
3. TASK: Create one review task per matched section
4. CHECK: Work through each task, flag issues as blocker/suggestion/nit
5. ANTI-PATTERNS: Read @anti-patterns.md for the touched subsystems
6. SUMMARIZE: List all findings with severity and file:line citations
| Files Changed | Review Sections |
|---|---|
crates/protocols/src/ | 1 (Layering), 3 (Worker Lifecycle) |
model_gateway/src/config/ | 2 (Config Plumbing) |
model_gateway/src/main.rs | 2 (Config Plumbing) |
model_gateway/src/service_discovery.rs | 3 (Worker Lifecycle) |
model_gateway/src/worker/, model_gateway/src/workflow/steps/local/ | 3 (Worker Lifecycle) |
model_gateway/src/policies/ | 4 (Routing Policy) |
model_gateway/src/routers/ (incl. anthropic/, gemini/, responses/, conversations/, grpc/) | 1 (Layering), 4 (Routing Policy) |
model_gateway/src/middleware/ (scheduler, tenant_resolution, rate limit) | 1 (Layering), 10 (Architecture) — no dedicated section yet |
crates/tool_parser/src/ | 5 (Parser Changes) |
crates/reasoning_parser/src/ | 5 (Parser Changes) |
crates/data_connector/src/ | 6 (Storage) |
bindings/ | 2 (Config Plumbing) |
| Any file | 7 (Error Handling), 8 (Testing), 9 (Code Quality) |
Sections 7, 8, 9 always apply. Section 10 applies to PRs touching 3+ files or adding new types.
crates/protocols/ types that only one crate setsconfig/types.rs, runtime → module-specificto_router_config() AND to_server_config() in main.rs updatedvalue_parser validationDefault impl includes new fields#[serde(default, skip_serializing_if)] for backward compat_override fields)build_model_cardSelectWorkerInfo)Send + Sync (DashMap, Arc — no bare Mutex on hot paths).unwrap() on worker slices — handle empty listw.is_healthy() && w.circuit_breaker_can_execute()LoadBalancingPolicy and is registered in policies/factory.rs with a PolicyConfig enum variantreset)ParserFactory with model pattern mappingunwrap() in production codeanyhow::Contextthiserror for domain errors, anyhow for wrappinge2e_test/ — tests run sequentially with class-scoped backends)@pytest.mark.engine(...), @pytest.mark.gpu(count), @pytest.mark.model(...) as neededcargo +nightly fmt --all cleancargo clippy --all-targets --all-features -- -D warnings clean#[expect] with reason, not #[allow]tracing for logging, not println!crates/protocols/See @anti-patterns.md for subsystem-specific anti-patterns.
| Excuse | Reality |
|---|---|
| "This change is small, I can eyeball it" | Small changes cause the biggest bugs — the two-path config rule is a one-line omission. |
| "I know this code well" | Familiarity breeds blindness. Use the checklist. |
| "It's just a config change" | Config changes touch the most layers (CLI → types → main.rs → bindings). Check section 2. |
| "Tests pass so it's fine" | Tests don't catch layering violations, missing bindings, or one-path config bugs. |