Skip to main content

debug-a-bug

Reproduce a software defect, isolate its smallest proven cause, implement a narrow fix, and verify both the failure and surrounding behavior. Use when someone says "fix this bug," reports a regression, or has an error that needs diagnosis and repair.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
3
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
debug-a-bug
category
code
description
Reproduce a software defect, isolate its smallest proven cause, implement a narrow fix, and verify both the failure and surrounding behavior. Use when someone says "fix this bug," reports a regression, or has an error that needs diagnosis and repair.
# debug-a-bug Turn a report into a repeatable failing case, then make the smallest change that explains why the failure disappears. Preserve the evidence that separates a verified fix from a plausible guess. ## When to use Use this for incorrect behavior in an existing codebase when implementation is in scope. If the request is diagnosis only, stop after the causal explanation and evidence. For a live outage, contain user impact with debug-a-production-incident before editing code. ## Inputs - Read the repository instructions, current worktree state, relevant code, and existing tests. - Capture the observed result, expected result, environment, inputs, and last known working state. - Separate facts from reporter assumptions. Preserve unrelated local changes. ## Procedure 1. Reproduce the symptom with the smallest command, request, fixture, or interaction that still fails. Record exact output and environment details. If it cannot be reproduced, gather more evidence rather than changing code speculatively. 2. Reduce the search area using the execution path, logs, recent changes, and controlled comparisons. Change one variable at a time. 3. Write or identify a regression check that fails for the reported reason. Avoid a test that merely restates the current implementation. 4. Trace the failing value or state backward to the first point where it becomes wrong. Name the invariant violated there and the evidence supporting that conclusion. 5. Consider at least one competing explanation. Use a targeted observation or experiment to reject it. 6. Implement the smallest fix at the broken boundary. Do not mix refactoring, formatting, dependency upgrades, or unrelated cleanup into the repair. 7. Run the regression check and the narrow surrounding test set. Then run the repository's required broader checks in proportion to the change's risk. 8. Test nearby boundaries such as empty input, repeated execution, error paths, and the last known working case. Confirm the fix does not only handle the reporter's exact example. 9. Review the diff for accidental changes, debug output, weakened assertions, exposed data, and environment-specific assumptions. 10. Write a short repair record: symptom, root cause, fix, tests run, and any residual risk or follow-up. ## Boundaries Do not claim a root cause unless the evidence connects it to the symptom. Do not delete user data, reset a worktree, weaken security checks, or expose private production records to make reproduction easier. Ask before changing public behavior beyond the reported defect. ## Done - A saved regression check fails before the fix and passes after it for the expected reason - The repair record identifies the broken invariant and links it to observed evidence - Targeted and required broader tests pass, with commands and results recorded - The final diff contains only the fix, its proof, and explicitly approved supporting changes Then use review-a-pull-request for an independent change review.
GitHub에서 보기