AGENT SKILL

bug-fix

Bug fixes. Use when the user asks to fix a bug, such as wrong behavior, a crash, a hang, or a failing test. For a slowdown, use perf-issue.

License 许可
MIT
所属仓库
syanga/astack
最近更新
2026-11-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
bug-fix
description
Bug fixes. Use when the user asks to fix a bug, such as wrong behavior, a crash, a hang, or a failing test. For a slowdown, use perf-issue.

02 资源文件 1

03 SKILL.md 正文

Bug fix

You own this task. Plan, review, verify. Review the findings and diff yourself.

Be scientific. Tie each fix to runtime evidence. When evidence refutes a hypothesis, remove the experimental changes it motivated while preserving unrelated work. Ship the smallest change the evidence justifies.

  1. Read scale the workflow before anything else in this skill.
  2. Reproduce the user's failure yourself through the affected UI, CLI, or API in an authorized environment. Use diagnosing-bugs phases 1 through 4 for the feedback loop, minimization, and cause. This workflow owns implementation and delivery below. Use the available control tools. If access prevents reproduction, state what you tried and the specific missing access or artifact. Continue useful investigation with unverified hypotheses clearly labeled.
  3. Narrow the cause with the diagnosis loop. Use how for the affected subsystem, unless you already hold a traced model of it. For a regression, use why for its history. When how and why both run, run them in parallel. Each experiment should distinguish the remaining hypotheses. Confirm the mechanism with runtime evidence before designing a fix.
  4. Plan the fix. If it crosses a function boundary, read architect first. Before implementation, follow tdd's bug-fix workflow to establish failing-before evidence at a practical test boundary, or explain the alternative check. When you delegate the fix, give the worker the scope, confirmed mechanism, reproduction command, and acceptance criteria. Review the diff.
  5. Verify on the same UI, CLI, or API. Rerun the original reproduction, the regression check, and relevant adjacent checks. "Inconclusive" or a check of a different interface is not a pass. Apply diagnosing-bugs' cleanup and intermittent-failure criteria.
  6. Keep the failing-before and passing-after evidence. Follow sequence-verifiable-units for ordered commits when the work has several units.
  7. End with review-pr in fix-and-review mode against the revision the fix started from. Run it for every fix, however small. Its reviewers are independent of you, so reviewing the diff yourself does not replace it. When the task's delivery scope includes a PR, use open-pr instead, which ends with review-pr. Merging is a separate action.

For a unit in a multi-phase plan, follow the shared execution-state convention. Reuse its store. For a session transfer, read handoff. Include the reproduction command, hypotheses ruled out, current instrumentation, and evidence paths.

Reply: what was broken, root cause, fix, and verification. Include redacted failing-before and passing-after output, or state which evidence is unavailable.

04 同仓库更多 Skills