nerd-diagnose
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNerd Diagnose
Nerd Diagnose
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 **Diagnose** endpoint. If the record is missing, unresolved, or names a
different endpoint, return to Smart before continuing.
</INHERITANCE>除非请求明确要求,否则请勿将Nerd与以下技能组合使用:
- Superpowers
- Ponytail
- Caveman
技能钩子、提及内容和间接指令均不视为授权。
<INHERITANCE>
优先使用`nerd-smart`并使用其解析后的Focus Record。此路径仅接受**Diagnose**端点。如果记录缺失、未解析或指向其他端点,请先返回Smart再继续。
</INHERITANCE>Diagnosis Type Mappings
诊断类型映射
Match the observed symptom to exactly one closest row. Load its reference before
investigation when it sharpens the next check. Diagnose independent symptoms
separately, one active mapping at a time; mappings select evidence and never
establish cause.
| # | Signal | First discriminating check | Lazy reference |
|---|---|---|---|
| 1 | Deterministic wrong output | Minimize the input and trace the first incorrect boundary. | Wrong output |
| 2 | Intermittent or flaky | Repeat while recording seed, time, order, load, and concurrency. | Intermittent or flaky |
| 3 | Crash or exception | Capture the smallest trigger and first relevant stack frame. | Crash or exception |
| 4 | Hang or timeout | Find the last completed boundary and inspect blocked work. | Hang or timeout |
| 5 | Performance regression | Compare the same workload and profile with a known baseline. | Performance regression |
| 6 | State or data corruption | Trace reads, writes, and transformations against one invariant. | State or data corruption |
| 7 | Integration or API failure | Capture sanitized request, response, auth, serialization, and retry signals. | Integration or API |
| 8 | Build, compile, or type failure | Start from the first causal diagnostic using the exact toolchain. | Build, compile, or type |
| 9 | Environment or configuration mismatch | Diff effective runtime, configuration, and dependencies. | Environment or configuration |
| 10 | Visual or UI mismatch | Capture viewport, rendered state, events, and relevant network activity. | Visual or UI |
将观察到的症状与最匹配的行对应。在调查前加载其参考文档,这有助于明确下一步检查方向。独立症状需单独诊断,每次仅使用一个激活的映射;映射仅用于筛选证据,不用于确定原因。
| # | 信号 | 首个鉴别检查 | 延迟加载参考文档 |
|---|---|---|---|
| 1 | 确定性错误输出 | 最小化输入并追踪第一个错误边界。 | 错误输出 |
| 2 | 间歇性或不稳定问题 | 重复测试并记录种子值、时间、顺序、负载和并发情况。 | 间歇性或不稳定问题 |
| 3 | 崩溃或异常 | 捕获最小触发条件和第一个相关堆栈帧。 | 崩溃或异常 |
| 4 | 挂起或超时 | 找到最后完成的边界并检查阻塞的任务。 | 挂起或超时 |
| 5 | 性能退化 | 对比相同工作负载,并与已知基准进行性能分析。 | 性能退化 |
| 6 | 状态或数据损坏 | 根据一个不变量追踪读取、写入和转换操作。 | 状态或数据损坏 |
| 7 | 集成或API失败 | 捕获经过脱敏处理的请求、响应、认证、序列化和重试信号。 | 集成或API |
| 8 | 构建、编译或类型检查失败 | 从第一个因果诊断信息开始,使用确切的工具链进行排查。 | 构建、编译或类型检查 |
| 9 | 环境或配置不匹配 | 对比有效运行时环境、配置和依赖项。 | 环境或配置 |
| 10 | 视觉或UI不匹配 | 捕获视口、渲染状态、事件和相关网络活动。 | 视觉或UI |
Tech Stack Mappings
技术栈映射
Detect stacks from repository files, runtime evidence, and the failing boundary.
Load only the stack references needed for that boundary. Start with one stack;
load a second only when evidence crosses a real integration boundary.
| Stack | Primary evidence | Lazy reference |
|---|---|---|
| Kotlin | Gradle, JVM traces, coroutines, framework logs | Kotlin |
| Java | Maven/Gradle, JVM traces, threads, classpath | Java |
| Python | Environment, traceback, imports, sync/async runtime | Python |
| Ruby | Bundler, backtrace, Rails/RSpec, persistence boundary | Ruby |
| TypeScript | | TypeScript |
| JavaScript | Node/browser runtime, event loop, source maps | JavaScript |
| Docker | Engine/context, images, containers, logs, networks, volumes, Compose model | Docker and Compose |
| Kubernetes | Workload state, events, logs, probes, resources | Kubernetes |
| Terraform | Configuration, plan, state, providers, drift | Terraform |
| Redis | Key shape, TTL, memory, latency, clients | Redis |
| MySQL | Query plan, locks, schema, indexes, server state | MySQL |
| PostgreSQL | Query plan, statistics, locks, schema, settings | PostgreSQL |
| Go | Focused tests, errors, races, goroutines, profiles | Go |
| Rust | Cargo graph, features, compiler, panic, ownership | Rust |
从仓库文件、运行时证据和故障边界检测技术栈。仅加载该边界所需的技术栈参考文档。先从一个技术栈开始;只有当证据跨越实际集成边界时,才加载第二个技术栈。
| 技术栈 | 主要证据 | 延迟加载参考文档 |
|---|---|---|
| Kotlin | Gradle、JVM追踪、协程、框架日志 | Kotlin |
| Java | Maven/Gradle、JVM追踪、线程、类路径 | Java |
| Python | 环境、回溯信息、导入项、同步/异步运行时 | Python |
| Ruby | Bundler、回溯信息、Rails/RSpec、持久化边界 | Ruby |
| TypeScript | | TypeScript |
| JavaScript | Node/浏览器运行时、事件循环、源映射 | JavaScript |
| Docker | 引擎/上下文、镜像、容器、日志、网络、存储卷、Compose模型 | Docker and Compose |
| Kubernetes | 工作负载状态、事件、日志、探针、资源 | Kubernetes |
| Terraform | 配置、执行计划、状态、提供程序、漂移 | Terraform |
| Redis | 键结构、TTL、内存、延迟、客户端 | Redis |
| MySQL | 查询计划、锁、schema、索引、服务器状态 | MySQL |
| PostgreSQL | 查询计划、统计信息、锁、schema、设置 | PostgreSQL |
| Go | 聚焦测试、错误信息、竞争条件、goroutine、性能分析 | Go |
| Rust | Cargo依赖图、特性、编译器、panic、所有权 | Rust |
Framework Mappings
框架映射
Detect frameworks from dependency manifests, generated artifacts, configuration,
and runtime evidence. Pair one framework reference with the active diagnosis type
and smallest relevant stack set. Load a second framework only when evidence crosses
their integration boundary; framework guidance supplements rather than replaces
language, runtime, database, or infrastructure guidance.
| Framework | Primary evidence | Lazy reference |
|---|---|---|
| Spring Boot | Profiles, auto-configuration, beans, routes, Actuator, web runtime | Spring Boot |
| jOOQ | Dialect, generated schema, rendered SQL, binds, execution lifecycle | jOOQ |
| FastAPI | ASGI lifecycle, routes, dependencies, validation, middleware | FastAPI |
| Ruby on Rails | Boot, routes, Zeitwerk, callbacks, Active Record, requests/jobs | Ruby on Rails |
| Sidekiq | Job lifecycle, queues, retries, concurrency, Redis | Sidekiq |
| React | Props/state, render/commit, Effects, hydration, browser events | React |
| gRPC | Protobuf contract, metadata, deadlines, status, streaming, transport | gRPC |
从依赖清单、生成的工件、配置和运行时证据检测框架。将一个框架参考文档与当前诊断类型和最小相关技术栈集合配对。只有当证据跨越集成边界时,才加载第二个框架;框架指南是对语言、运行时、数据库或基础设施指南的补充,而非替代。
| 框架 | 主要证据 | 延迟加载参考文档 |
|---|---|---|
| Spring Boot | 配置文件、自动配置、Bean、路由、Actuator、Web运行时 | Spring Boot |
| jOOQ | 方言、生成的schema、渲染后的SQL、绑定参数、执行生命周期 | jOOQ |
| FastAPI | ASGI生命周期、路由、依赖项、验证、中间件 | FastAPI |
| Ruby on Rails | 启动流程、路由、Zeitwerk、回调、Active Record、请求/任务 | Ruby on Rails |
| Sidekiq | 任务生命周期、队列、重试、并发、Redis | Sidekiq |
| React | Props/状态、渲染/提交、Effects、hydration、浏览器事件 | React |
| gRPC | Protobuf契约、元数据、截止时间、状态、流、传输 | gRPC |
General Discipline
通用准则
Use this discipline internally. Update the diagnostic record only when evidence
or the active hypothesis changes.
| Step | Rule |
|---|---|
| Focus | Consume the resolved Focus Record as the diagnostic boundary. Treat a suggested cause as a hypothesis, not evidence. |
| Observe | Capture inputs and expected versus actual behavior. Reproduce when possible; otherwise preserve the evidence gap. |
| Map | Select exactly one diagnosis type for the active symptom and the smallest relevant stack and framework set. Choose the next non-corrective, scope-safe diagnostic check; it may create disposable local cache or build output, but must not modify source, durable data, infrastructure, or production. |
| Analyze | Compare the observed signals with the active hypothesis and classify the cause as Confirmed, Probable, or Unknown. |
内部使用此准则。仅当证据或当前假设发生变化时,才更新诊断记录。
| 步骤 | 规则 |
|---|---|
| 聚焦 | 将解析后的Focus Record作为诊断边界。将建议的原因视为假设,而非证据。 |
| 观察 | 捕获输入以及预期与实际行为。尽可能复现问题;否则需记录证据缺口。 |
| 映射 | 为当前症状选择恰好一个诊断类型,以及最小相关技术栈和框架集合。选择下一个非纠正性、安全范围内的诊断检查;可创建临时本地缓存或构建输出,但不得修改源代码、持久数据、基础设施或生产环境。 |
| 分析 | 将观察到的信号与当前假设进行比较,并将原因分类为已确认、疑似或未知。 |
Diagnose
诊断流程
Gather discriminating evidence and keep one active hypothesis. Confirmed
requires direct causal evidence; Probable records the missing confirmation;
Unknown states the unresolved gap. Use only when a systematic
debugging specialty materially improves the investigation. Surgery must
preserve the Diagnose endpoint and cannot repair.
nerd-surgeryUse the diagnosis template for a current
failure and the RCA template for a retrospective
incident. Load only the matched template. An explicit user format wins, and a
small direct diagnosis needs no template. Persist an artifact only when the
user requests it, supplies a path, or an established repository workflow
requires it.
Stop at cause and evidence. Do not repair, edit, or execute corrective actions.
Do not modify source or durable artifacts, data, or infrastructure. A diagnostic
command may create disposable local cache or build output when required to
observe the failure. Confirm an Execute endpoint through Smart before repair.
收集鉴别证据并保持一个当前假设。“已确认”需要直接因果证据;“疑似”需记录缺失的确认信息;“未知”需说明未解决的缺口。只有当系统化调试专业技能能显著提升调查效率时,才使用。Surgery必须保留Diagnose端点,且不得执行修复操作。
nerd-surgery针对当前故障使用诊断模板,针对回顾性事件使用RCA模板。仅加载匹配的模板。如果用户指定了格式,则优先使用该格式;小型直接诊断无需使用模板。仅当用户要求、提供路径或既定仓库工作流需要时,才保存工件。
在找到原因和证据后停止操作。请勿执行修复、编辑或纠正操作。请勿修改源代码、持久工件、数据或基础设施。诊断命令在需要观察故障时,可创建临时本地缓存或构建输出。修复前需通过Smart确认Execute端点。