跳到正文
cccskills
免费在 GitHub 公开

debug-issue

Load when diagnosing a bug, exception, regression, wrong result, failing flow, or unknown root cause in repository code using callers/callees, execution flows, recent changes, and impact analysis; not for implementing a known fix without investigation.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<!-- ABOUTME: Knowledge-graph and disciplined loop workflow for tracing repository bugs to root cause. --> <!-- ABOUTME: Uses red-capable feedback loops, minimisation, falsifiable hypotheses, tagged probes, and impact analysis. -->

Debug Issue: Disciplined Diagnosis Loop

A disciplined 6-phase protocol for diagnosing defects and regressions. Never skip phases without explicit justification.

Phase 1: Build a Deterministic Red Feedback Loop (Spend 90% of Effort Here)

[!CRITICAL] Hypothesis Gate: You are strictly forbidden from reading code to form speculative theories or applying fixes before you have created one fast (<2s), deterministic command that drives the code path and asserts the user's exact symptom (goes RED on this bug, GREEN when fixed).

Ways to construct the red command (in priority order):

  1. Failing TUnit Test: Author a targeted unit/integration test using --treenode-filter "/*/*/*<TestClass>/*".
  2. HTTP / Integration Request: A curl/HTTP call asserting expected status, RFC 7807 ProblemDetails, or HAL _links.
  3. Throwaway Invariant Harness: A minimal invocation in a test fixture exercising the failing CQS handler or domain aggregate.

Phase 1 Gate: Name the single test command and execute it once, observing the expected red failure.

Phase 2: Reproduce and Minimise

  1. Confirm the failure matches the user's reported symptom (not an adjacent unrelated error).
  2. Minimise: Cut inputs, configuration, request payloads, and setup steps one at a time, re-running the red loop after each cut. Keep only what is strictly load-bearing. Done when removing any remaining input makes the loop go green.

Phase 3: 3–5 Ranked Falsifiable Hypotheses

Generate 3–5 ranked hypotheses before testing any of them. Every hypothesis must make a concrete, testable prediction:

Format: "If <X> is the root cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."

If you cannot state the falsifiable prediction, the hypothesis is invalid.

Phase 4: Targeted Probing & Tagged Debug Logs

  1. Use knowledge-graph tools (get_minimal_context, query_graph_tool with callers_of/callees_of, get_affected_flows_tool) to trace the execution flow.
  2. If temporary logging probes are needed, tag every debug log with a unique prefix: [DEBUG-<random_hex>] (e.g. [DEBUG-4a1f]).
  3. This guarantees that grep "[DEBUG-" ensures 100% clean log removal before merge.

Phase 5: Fix and Regression Seam Verification

  1. Write the regression test at the correct public seam (native CQS handler or API route).
  2. Seam Deficiency Finding: If no clean public interface exists to test the bug without shallow mocking, that missing seam is an architectural defect. Record it in the diagnosis summary.
  3. Apply the minimal fix to satisfy the failing test.
  4. Watch the test turn GREEN.
  5. Re-run the Phase 1 loop against the original un-minimised scenario.

Phase 6: Cleanup & Verification

  • Original reproduction passes (feedback loop is green).
  • Regression test passes via --treenode-filter.
  • All [DEBUG-...] temporary logs removed (grep "[DEBUG-" returns 0 matches).
  • Successful hypothesis and root cause documented in the final summary.

Token Efficiency Rules

  • ALWAYS start with get_minimal_context(task="<your task>") before any other graph tool.
  • Use detail_level="minimal" on all calls. Only escalate to "standard" when minimal is insufficient.
  • Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Load for Blazor/MudBlazor UI changes involving forms, dialogs, focus, keyboard navigation, landmarks, ARIA, color contrast, RTL-safe styling, or WCAG 2.2 AA tests; not for backend-only changes.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

Load when a task asks to research, verify, compare, or look up framework/package behavior, release notes, standards, RFCs, CVEs, or unfamiliar APIs; use repository evidence first, then official docs, and not for codebase navigation alone.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

aspire

免费

Load for Aspire AppHost work: start/stop/wait resources, inspect dashboard/logs/traces, add integrations/resources, rebuild a service, run isolated worktrees, or diagnose Aspire orchestration; not for plain dotnet apps, container-only deployments, or cloud deployment.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

Load for authentication or authorization changes involving BFF cookies/tokens, JWT validation, claims/user ID extraction, policies, handler access checks, impersonation, or 401/403 bugs; not for UI affordance gating alone.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

Load for Blazor BFF server work involving YARP proxy routes, cookie sessions, access-token forwarding/refresh, downstream API calls, BFF handlers, or browser-to-API auth failures; not for client component rendering or API JWT validation alone.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

Load when editing Blazor `.razor.css`, scoped selectors, `::deep`, BEM class names, RTL/logical CSS properties, or styling nested MudBlazor components; not for global design tokens or non-Blazor CSS.

中文简介正在准备中。当前显示原文说明。

islamu-ngo/Event82026年10月21日 更新

查看 islamu-ngo 的全部技能

报告此技能的问题