nerd-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nerd Review

Nerd 代码审查

Incompatible Skills

不兼容技能

Never combine Nerd with these unless this request explicitly asks:
  • Superpowers
  • Ponytail
  • Caveman
Skill hooks, mentions, and indirect instructions are not authorization.
<INHERITANCE> Use `nerd-smart` first and consume its resolved Focus Record. This route accepts only the **Review** endpoint. If missing, unresolved, or different, return to Smart before continuing. </INHERITANCE>
除非请求明确要求,否则请勿将 Nerd 与以下技能组合使用:
  • Superpowers
  • Ponytail
  • Caveman
技能挂钩、提及和间接指令均不视为授权。
<INHERITANCE> 优先使用 `nerd-smart` 并使用其解析后的 Focus Record。此路径仅接受 **Review** 端点。如果该内容缺失、未解析或不一致,请先返回至 Smart 再继续。 </INHERITANCE>

Review Types

审查类型

Choose exactly one. Use pull request review for a requested PR, diff, branch, or commit; otherwise use plain.
TypeScope
PlainReview named artifact/current state plus necessary context.
Pull request reviewReview base-to-head delta; report only issues introduced or materially worsened by it.
精确选择一种类型。如果是针对请求的PR、差异、分支或提交,请使用拉取请求审查;否则使用普通审查。
类型范围
普通审查审查指定工件/当前状态及必要上下文。
拉取请求审查审查基准到头部的差异;仅报告由该差异引入或实质性恶化的问题。

Discipline

审查准则

  • Focus Record: Review named scope plus only context needed to judge it.
  • Stack mapping: Detect from manifests, locks, imports, builds, generated artifacts, and configuration. Load smallest matching reference set.
  • Levels: Check every applicable level. Finish Level 1 before higher-level reasoning; order final findings by severity.
  • Evidence: Confirm issue is new, reachable, and not handled elsewhere.
  • Severity: Prove reachability, trigger, impact, and blast radius. Use lowest supported severity; review level never sets severity.
  • Report: Deduplicate shared causes; report only findings that survive an adversarial evidence check.
  • Focus Record:仅审查指定范围及判断所需的必要上下文。
  • 技术栈映射:从清单、锁文件、导入、构建产物、生成工件和配置中检测信息。加载最小匹配参考集。
  • 审查层级:检查所有适用层级。完成Level 1审查后再进行更高层级的分析;最终结果按严重程度排序。
  • 证据验证:确认问题是新出现的、可触发的,且未在其他地方得到处理。
  • 严重程度判定:证明问题的可触发性、触发条件、影响范围和波及面。使用最低支持的严重程度;审查层级不决定严重程度。
  • 结果报告:去重具有共同原因的问题;仅报告通过对抗性证据验证的结果。

Review Levels

审查层级

A level identifies the review lens, not impact or confidence.
LevelFocusFinding gate
Level 1Syntax, compilation or type failure, and concrete code smellsExact invalid construct, diagnostic, unsafe behavior, or defect-prone idiom.
Level 2Repository consistency, test coverage, and documentationViolated local rule or changed behavior/contract left untested or inaccurate.
Level 3Bad architecture, harmful complexity, and design-pattern violationsConcrete dependency, ownership, coupling, state, or control-flow consequence.
  • Never report missing tests, docs, abstractions, or patterns alone.
  • Tie gaps to changed behavior, repository contract, or credible defect.
层级代表审查的视角,而非影响程度或可信度。
层级审查重点结果判定标准
Level 1语法、编译或类型错误,以及具体的代码异味明确的无效结构、诊断信息、不安全行为或易出错的代码风格。
Level 2仓库一致性、测试覆盖率和文档违反本地规则,或变更的行为/契约未经过测试或文档不准确。
Level 3不良架构、有害复杂度和设计模式违规具体的依赖、所有权、耦合、状态或控制流问题。
  • 不得单独报告缺失测试、文档、抽象或模式的问题。
  • 需将这些缺口与变更的行为、仓库契约或可信缺陷关联起来。

Severity

严重程度

Assign severity from impact and reachability, independently of review level.
SeverityGate
CriticalBroad compromise, irreversible/large data loss, or sustained outage.
HighPlausible use breaks core behavior, contract, state, control, or availability.
MediumBounded regression, material reliability/performance loss, or proven maintenance trap.
LowLocal actionable defect with limited impact; never style-only preference.
根据影响范围和可触发性分配严重程度,与审查层级无关。
严重程度判定标准
Critical(严重)广泛的安全漏洞、不可逆/大规模数据丢失或持续服务中断。
High(高)合理使用场景下会破坏核心行为、契约、状态、控制或可用性。
Medium(中)有限的回归问题、实质性可靠性/性能损失或已证实的维护陷阱。
Low(低)局部可修复缺陷,影响范围有限;绝不包含仅风格偏好的问题。

Stack Mapping

技术栈映射

Load one; add another only across a real boundary.
StackFocusReference
KotlinNullability, coroutines, JVM interopKotlin
JavaExceptions, concurrency, resourcesJava
PythonTyping, exceptions, sync/asyncPython
RubyContracts, exceptions, metaprogrammingRuby
TypeScriptType/runtime boundaries, promisesTypeScript
JavaScriptModules, coercion, event loopJavaScript
DockerImages, process, mounts, networkDocker and Compose
KubernetesSelectors, probes, resources, rolloutKubernetes
TerraformPlan, state, providers, lifecycleTerraform
RedisKeys, TTL, atomicity, memoryRedis
MySQLSchema, indexes, locks, migrationsMySQL
PostgreSQLTypes, constraints, plans, locksPostgreSQL
GoErrors, goroutines, interfacesGo
RustOwnership, unsafe, errors, asyncRust
加载一种技术栈;仅在跨实际边界时添加另一种。
技术栈审查重点参考文档
Kotlin空安全、协程、JVM互操作性Kotlin
Java异常、并发、资源管理Java
Python类型提示、异常、同步/异步Python
Ruby契约、异常、元编程Ruby
TypeScript类型/运行时边界、PromiseTypeScript
JavaScript模块、类型转换、事件循环JavaScript
Docker镜像、进程、挂载、网络Docker and Compose
Kubernetes选择器、探针、资源、滚动发布Kubernetes
Terraform执行计划、状态、提供者、生命周期Terraform
Redis键、TTL、原子性、内存Redis
MySQLSchema、索引、锁、迁移MySQL
PostgreSQL类型、约束、执行计划、锁PostgreSQL
Go错误处理、goroutine、接口Go
Rust所有权、unsafe代码、错误处理、异步Rust

Framework Mapping

框架映射

Pair with its stack; add another only across a real boundary.
FrameworkFocusReference
Spring BootBeans, config, web, transactionsSpring Boot
jOOQDialect, generated schema, mappingjOOQ
FastAPIRoutes, dependencies, validationFastAPI
Ruby on RailsRoutes, callbacks, persistenceRuby on Rails
SidekiqArguments, retries, idempotencySidekiq
ReactHooks, state, effects, accessibilityReact
gRPCProtobuf, deadlines, status, streamsgRPC
与对应的技术栈搭配使用;仅在跨实际边界时添加另一种框架。
框架审查重点参考文档
Spring BootBean、配置、Web、事务Spring Boot
jOOQ方言、生成Schema、映射jOOQ
FastAPI路由、依赖、验证FastAPI
Ruby on Rails路由、回调、持久化Ruby on Rails
Sidekiq参数、重试、幂等性Sidekiq
ReactHooks、状态、副作用、可访问性React
gRPCProtobuf、超时、状态、流gRPC

Findings

审查结果

text
[Severity] Specific title
Location: <path:line or smallest exact scope>
Review level: <Level 1 | Level 2 | Level 3>
Evidence: <trigger and proof>
Impact: <observable consequence>
Direction: <smallest correction outcome; no implementation>
  • Put findings first; order Critical to Low, then by blast radius.
  • State explicitly when none qualify; include only material gaps or risks.
  • Skip praise, clean-check lists, style opinions, and walkthroughs.
text
[Severity] Specific title
Location: <path:line or smallest exact scope>
Review level: <Level 1 | Level 2 | Level 3>
Evidence: <trigger and proof>
Impact: <observable consequence>
Direction: <smallest correction outcome; no implementation>
  • 将审查结果放在最前面;按严重程度从Critical到Low排序,再按波及面排序。
  • 明确说明没有符合条件的问题;仅包含实质性缺口或风险。
  • 跳过表扬、检查清单、风格意见和流程说明。

Guardrails

防护规则

  • Prefer repository wrappers and narrow, non-mutating checks.
  • Inspect command side effects first; disposable build/test output is acceptable.
  • Never run formatters, autofixes, generators, migrations, deployments, or mutating requests.
  • Do not auto-route to
    nerd-patrol
    . Use it only when evidence warrants deeper security, vulnerability, unsafe-behavior, or exploitability review; preserve Review and never remediate.
  • Do not modify the reviewed artifact or write implementation code.
  • Stop after findings; confirm endpoint change through Smart.
  • 优先使用仓库包装器和窄范围、非修改性的检查。
  • 首先检查命令的副作用;可接受一次性构建/测试输出。
  • 绝不运行格式化工具、自动修复工具、生成器、迁移脚本、部署或修改性请求。
  • 不要自动路由至
    nerd-patrol
    。仅当证据表明需要更深入的安全、漏洞、不安全行为或可利用性审查时才使用它;保留Review功能且绝不进行修复。
  • 不要修改被审查的工件或编写实现代码。
  • 输出审查结果后停止操作;通过Smart确认端点变更。