一键导入
bug-triage
Validate a filed bug against the source before fixing it — verify every claim, hunt the broader class, find the contract question, and scope the outcome
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate a filed bug against the source before fixing it — verify every claim, hunt the broader class, find the contract question, and scope the outcome
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement a feature or fix based on a Linear issue
Create well-structured Linear issues, projects, project updates, or initiatives
Disciplined per-commit workflow with Greybeard review, build gates, and Critique loops
Engineering philosophy and work culture principles. Load this skill when making architectural decisions or to understand the team's work principles.
General coding conventions for clean, maintainable code. Always load this skill when writing or reviewing code in any language.
Perform a code review or pull request review on a branch
| name | bug-triage |
| argument-hint | <bug report — a Linear/GitHub issue ID or URL, a file path, or pasted text> |
| description | Validate a filed bug against the source before fixing it — verify every claim, hunt the broader class, find the contract question, and scope the outcome |
Use this skill to take a filed bug (or a "repro for X" ticket) and turn it into a trustworthy understanding of the problem, a verified fix direction, and correctly-scoped follow-up work — instead of trusting the report and shipping a one-liner that relocates the failure.
The core stance: the report is a hypothesis, the code is the truth. A bug report is written by someone (or some agent) reconstructing a failure from partial evidence. It is frequently right about the symptom, often wrong about a load-bearing detail, and almost always narrower than the real problem. Treat every claim as unverified until you have read the code that proves or refutes it.
This skill is about validating and scoping a bug. It stops at a defensible
understanding and a correctly-split plan. It does not implement the fix — hand
the resulting correctness fix to the implement skill, and file the broader
work with linear-create.
The bug report arrives as $ARGUMENTS — a Linear or GitHub issue ID/URL, a path
to a file, or pasted text. Get the full report in front of you before Phase 1:
get_issue, plus
list_comments for discussion). Call these from the main conversation, not a
subagent.gh issue view / gh pr view.If the report references a linked or related issue (Phase 1), fetch that too.
Use the full process for a report whose load-bearing claims you cannot confirm cheaply yourself: anything touching a contract or lifecycle question, a proposed fix that changes a wire format or schema, a sweep that returned a suspicious count, or a symptom that smells like one instance of a class.
Scale it down — or skip it — when the bug is small, obvious, and verifiable in
seconds: a typo, an off-by-one with the failing line right in front of you, a
crash with a stack trace pointing at the exact statement. Forcing a verifier
sweep, a thorough class-hunt, and a greybeard review through a one-line typo
burns effort and trust for nothing; "pragmatic over idealistic" (philosophy)
governs here. Collapse the phases to the ones that earn their keep, and reach for
subagents only when the reading genuinely exceeds what you can do inline.
Before triaging anything, load the style and philosophy skills. They are not
background reading — they are the active constraints any fix you propose must
satisfy, and "Constraint Ownership" in philosophy is the lens for the
contract question in Phase 6. If the repository has its own AGENTS.md,
CONTRIBUTING, or CONVENTIONS docs, read those too.
These recur whenever a report is taken at face value:
Phase 1 comes first — it produces the claim checklist everything else verifies
against. Once it exists, the reading in Phases 2, 3, and 6 is independent
legwork that can run in parallel. Reserve your own reasoning for the judgment in
Phases 4 and 8, and for the call in Phase 6 (its evidence-gathering
parallelizes; the verdict is yours). The dispatch skill is a good fit when you
want to fan the legwork out and gate on the results.
Load style, philosophy, and any repo-local convention docs (AGENTS.md,
CONTRIBUTING, CONVENTIONS) before judging anything — the Prerequisites
section above covers this. You cannot tell a real violation from a house-style
choice without them.
Also locate the build and test entrypoints now (how the project builds, how its tests run, where they live). Phase 8 calls for a repro test, and you cannot scope one without knowing how tests are written and run here.
Extract every load-bearing factual claim the report makes, separately from its narrative, and write them down as a checklist:
This checklist is what you will verify. Nothing in the narrative gets to skip it.
Dispatch a skeptical verifier whose job is to confirm or refute each claim
with file:line evidence and quoted snippets — not to agree with the report.
Use a general-purpose subagent: rendering a verdict, and especially judging
reachability, is analysis, not search, so the read-only Explore agent (which
locates code but does not audit it) is the wrong tool for the call. Explore can
still feed this phase raw file:line evidence; the verdict is the verifier's.
Instruct the verifier explicitly:
Output: a per-claim verdict table. Now you know what is real.
In parallel, dispatch an exploration for other instances of the same
underlying disease. A very thorough Explore sweep is the right tool. Frame
it by the disease, not the symptom: not "find other places that insert into
table T" but "find operations assumed to run once that can run again"; not
"other 503s" but "other places a component signals ready before it is usable."
Give the sweep explicit categories to hunt, and ask for file:line, the trigger, and severity per finding — and to name any existing helper or pattern that should be reused, so a fix can be centralized rather than sprinkled.
A sweep produces raw findings, not conclusions. Apply a senior filter yourself:
Resist the count. Report the honest, deduplicated set with severities you can defend.
Sweep findings are hypotheses. Before any of them influences a decision or a comment, run them back through the Phase-2 verifier. This is where plausible-but-wrong findings die — the "silently skips security-critical work" that turns out unreachable because of startup ordering. Only verified siblings survive. Keep the wall up: a sweep gives hypotheses, only verification gives facts.
Step back and ask: what does this bug imply the system is supposed to
guarantee, and does the code actually decide that anywhere? This is the
highest-leverage move in the whole process, and it is "Constraint Ownership"
from philosophy applied to the specific failure. Dispatch a
contract-tracer to gather the evidence — a general-purpose subagent,
since establishing what the code guarantees is analysis rather than search —
but make the call yourself.
instanceId reuse a supported contract?" → trace ID generation, the input
validators, the lifecycle/state machine, the schema's uniqueness/FK design. If
the schema is hostile to the assumed usage, the report's premise is the bug.ready/registered guarantee, and for what consumer?" →
enumerate the readers of the relevant state; if one structure serves two
different readiness needs, the conflation is the defect.The contract answer usually reframes the fix entirely, and it is often a
product/owner decision, not a code choice. Surface it as such rather than
silently deciding it — put the question to the user (use AskUserQuestion when
the answer is an enumerable set of options), rather than burying the decision in
a comment.
Run the filed fix — and any fix you propose — through adversarial review. Use two complementary adversaries, and brief each with the proposal and the evidence behind it (there is no commit to review yet — the fix is still a proposal):
@greybeard tears into the design: does the architecture hold, does it
relocate the failure, does it survive version skew.@critique tears into the claims and assumptions — its stated job is to
test assumptions. Point it at the load-bearing conclusions this triage rests
on: the verifier's verdicts (is that path really unreachable?), the contract
answer from Phase 6, and the assertion that the proposed fix removes rather
than moves the failure. Tell it to argue the opposite and find where the
reasoning breaks.Do not mark your own homework; the review that catches the most is the one aimed at your conclusions, not the report's. Check specifically:
Split the work along its real seams:
When the real problem is bigger than the symptom ticket, lift it into its own
issue that blocks the symptom ticket. The symptom stays as the narrow repro;
the parent carries the actual fix plan as acceptance criteria. Use linear-create
to file the issues with the right blocking relationship. Do the in-scope work
now; don't defer in-scope work to a vague "later" (see "Scope Discipline" in
style).
When you write findings into a ticket or comment:
Reserve expensive reasoning for judgment; delegate legwork. Keep the wall up between hypotheses (sweeps) and facts (verification).
| Role | Job | Stance | Suggested agent |
|---|---|---|---|
| Verifier | Confirm/refute report claims against source | Skeptical; file:line evidence; "exists ≠ reachable" | general-purpose (Explore to gather evidence) |
| Class-hunter | Find sibling instances of the disease | Exhaustive; framed by disease, not symptom | Explore (very thorough) |
| Contract-tracer | Establish what the code actually guarantees | Evidence-backed verdict, even if "undefined" | general-purpose |
| Design adversary | Tear into the proposed fix's architecture | Battle-tested; ranks risk; refuses the unsafe | @greybeard |
| Claims adversary | Attack the verdicts, contract answer, and "removes not relocates" assertion | Argue the opposite; find where the reasoning breaks | @critique |
| Synthesizer (you) | Triage, decide, scope, communicate | Judgment over relay; calibrated confidence | main agent |
Treat the report as a hypothesis. Verify every load-bearing claim against the code with an adversarial reader. Assume the bug is one of a class and hunt the siblings, then verify the interesting ones to the same standard — a sweep produces hypotheses, not facts. Find the contract question the ticket didn't ask and trace it; the answer usually reframes the fix and is often an owner's decision. Stress-test the proposed fix (and your own) for relocation, version skew, and adjacent bugs — don't mark your own homework. Split the result into a tiny correctness fix plus an orthogonal robustness fix, lifting the overarching problem into its own blocking issue. Communicate facts and opinion separately, correct the record, and mark machine-authored content.
After reviewing this skill, state: "I have reviewed the bug-triage skill; the report is a hypothesis, the code is the truth."