ワンクリックで
triage
// Set up an isolated worktree and triage a GitHub issue into a durable on-branch record. Use when the user says "triage issue
// Set up an isolated worktree and triage a GitHub issue into a durable on-branch record. Use when the user says "triage issue
Investigate a beads issue in the current checkout, gather context from its dependency graph, and produce a plan-skeleton + triage verdict (ready / needs-info / blocked). Use when the user says "investigate bd-XXXX", "let's look at bd-XXXX", or pastes a beads issue ID and asks what's needed to work on it.
Improve prose clarity using the reader-expectations methodology of Gopen & Swan ("The Science of Scientific Writing", American Scientist, Nov-Dec 1990). Use when the user asks for writing improvement, prose review, revision suggestions, help making writing clearer or more readable, feedback on a draft, or mentions clarity, flow, emphasis, sentence structure, or "why this passage is hard to read". Works on any expository prose (papers, reports, memos, docs, essays), not only scientific writing.
Diagnose and fix DOM / style differences between `q2 preview` and `q2 render` so the two pipelines produce visually-equivalent output. Use when the user reports that the preview's appearance, spacing, classes, or DOM structure doesn't match the rendered site — phrases like "preview vs render differs", "preview shows X differently", "spacing/margin/padding off", "DOM doesn't match", "missing class in preview", or shows a specific computed-style mismatch (e.g. "17px in preview, 34px in render"). Also invoked explicitly via `/preview-parity`.
| name | triage |
| description | Set up an isolated worktree and triage a GitHub issue into a durable on-branch record. Use when the user says "triage issue |
Takes a GitHub issue from "user pasted a link" to "isolated worktree on its own branch, with a triage record committed to it." Does not diagnose the bug or design the fix — that comes after, in whatever workflow the triage outcome calls for (bug fix, doc update, "wai" answer, duplicate close, etc.).
User says any of:
github.com/quarto-dev/q2/issues/N URL and asks you to investigateDo not use for:
main or an existing branch)issue-<N> at .worktrees/issue-<N>/, with one commit containing the triage record (and any investigative fixtures).claude-notes/issue-reports/<N>/triage.md on that branch.Investigative artifacts (minimal repros, side-by-side fixtures, comparison outputs) live alongside the triage doc under claude-notes/issue-reports/<N>/ and are committed with it. They are part of the record, not throwaways.
cargo xtask verify --skip-hub-build
Catches "the bug is already there at HEAD" vs. "you introduced it" confusion later, and surfaces environment problems before the user is invested. If verify fails for a non-bootstrap reason, stop and tell the user. Do not start the triage on a broken HEAD. For fresh-clone bootstrap, see .claude/rules/worktrees.md § Fresh worktree bootstrap.
gh issue view <N> --repo quarto-dev/q2 --json title,body,author,createdAt,labels,comments
Read the body and every comment. If the issue contains multiple distinct reports (a list of unrelated bugs in one issue is common), confirm with the user which one(s) you're triaging. Capture that scope decision in the triage doc.
First, check if you're already in the right worktree. A CLAUDE.local.md whose **GitHub issue:** line matches #<N> means the worktree exists and you're in it — skip to step 4. Re-running cargo xtask create-worktree --issue <N> from there would fail (git worktree add errors on existing directories).
If you're in the main checkout or a different worktree, create it now:
cargo xtask create-worktree --issue <N>
# Creates the worktree, .beads/redirect, and CLAUDE.local.md context stub.
# This step runs BEFORE the beads issue is created (step 6). The `--issue`
# template's `**Beads:**` line is a self-documenting placeholder pointing
# at `br search <N>` / `br create`. After step 6 creates the bd-XXXX,
# edit that line in CLAUDE.local.md manually to point at the new ID.
# Do NOT re-run the xtask with `<bd-id>` to "refresh" — that creates a
# separate beads worktree at `.worktrees/<bd-id>-<slug>` rather than
# updating this one.
# Fallback for fresh clones where the xtask is not yet built:
# see .claude/rules/worktrees.md § Manual bootstrap.
Branch + directory naming follows .claude/rules/worktrees.md § Branch naming (issue-<N> for triage). Beads redirect setup follows § Beads Redirect.
Verify with br where from inside the worktree.
See .claude/rules/worktrees.md § Fresh worktree bootstrap. Then re-run cargo xtask verify --skip-hub-build from inside the worktree to confirm green at branch HEAD.
Create claude-notes/issue-reports/<N>/ and put inside it:
repro.<ext> — the smallest input that triggers whatever the issue describes (a .qmd, a config snippet, a shell script, etc.).exp-prefix.qmd, exp-suffix.qmd, etc.).triage.md — see references/triage-doc-template.md for the template.For diagnosing the actual bug (root cause, code locations, fix scope), this skill defers to the per-crate CLAUDE.md files (e.g. crates/pampa/CLAUDE.md for the TDD round-trip workflow). Do whatever investigation the issue calls for and capture the conclusions in the triage doc — but the skill itself is silent on how to diagnose.
A beads issue is only created when the triage concludes there is concrete work to do in this repo. Skip the beads issue when:
When you do file a beads issue:
br create "<headline> (issue #<N>)" -t bug|task|feature -p <0-4> -d "<description>" --json
The description should reference the triage doc path and the worktree branch. If you discovered any incidental work during triage, file each as its own issue and link with --deps related:<main-bd-id>.
cd .worktrees/issue-<N>
git add -A
git commit -m "Triage issue #<N>: <one-line summary> (bd-XXXX)"
Captures the triage doc plus all investigative artifacts. Do not leave investigative files uncommitted — they are part of the record. If a fix follows in the same session, that fix is a separate commit on the same branch.
mainSee .claude/rules/worktrees.md § Committing beads changes.
See .claude/rules/worktrees.md § Pushing for PR. Local branch stays bare (issue-<N>); remote uses a prefix reflecting the work type.
/tmp or untracked paths. They are part of the durable record..beads/issues.jsonl from a worktree branch. It belongs on main.