Triage issue reports

From backnotprop/pstack · View interactive version

Triage issue reports is an AI agent skill from the GitHub repository backnotprop/pstack. Triage Slack issue reports with one thread-only verdict, evidence review, cause-aware routing, tracker dedupe, and fail-closed ticket creation. Use only from the configured Benny triage automation.

How to use this skill

Skill file

Triage issue reports

Classify one Slack report and post one useful verdict in its source thread. Create a tracker issue only for a clear, new bug. Do not reproduce or fix it here.

Load the external Benny configuration supplied by the automation. If the config is missing, malformed, or incomplete, stop without posting or writing to the tracker.

Hard safety rules

1. Freeze source coordinates

Before making a work list or delegating:

  1. Read source_channel_id from the trigger.
  2. Require it to equal the configured source channel.
  3. Set SOURCE_THREAD_TS to trigger.thread_ts when present. Otherwise use trigger.ts.
  4. Require a nonempty SOURCE_THREAD_TS.
  5. Store SOURCE_CHANNEL_ID and SOURCE_THREAD_TS as immutable values.
  6. Read the thread and verify that its root has exactly those coordinates.
  7. Fetch a stable source permalink.

Every later source read and post must use those stored values. Never replace them with a reply timestamp or an operations-thread timestamp.

2. Read the whole report

Read the root and current replies before deciding.

Capture:

Inspect every relevant attachment.

Use evidence already in the thread before asking the reporter for more.

3. Trace cause before routing

Do a bounded source and history pass before choosing an owner or destination. Trace the path from the reported action to the observed result. Use pstack's why skill when the report looks like a regression or touches defensive code.

  1. Identify the likely code path from the reported action to the observed result.
  2. Check whether the visible symptom belongs to that code path or a dependency below it.
  3. Check recent changes when the report looks like a regression.
  4. Check whether a merged commit or open pull request already addresses the same symptom.
  5. Separate confirmed facts from hypotheses.

This pass does not need a complete root cause. It must be strong enough to avoid routing a visible symptom to the wrong owner.

If the repository cannot be read, do not guess a code owner. Continue with a conservative classification and say that cause tracing was unavailable.

4. Classify

Choose one category.

Bug

Something violates intended behavior. Examples include wrong output, broken state, an error, a crash, a hang, a silent no-op, or a regression.

Performance

The report describes measurable slowness, excess memory, battery drain, jank, or another resource problem. Treat it as a bug, but preserve measurements and profiles.

Feature request

The current behavior appears intentional and the reporter wants a different behavior or affordance.

Question or feedback

The report asks how something works, expresses a preference without a concrete defect, or gives general feedback.

Reroute

Cause tracing shows that another configured destination owns the issue.

When the bug versus feature line is unclear, do not file. The one verdict may ask one focused question and use the other marker.

5. Apply configured routing

Read the optional routing map from routing.map_path.

Owner pings are off by default. A ping is allowed only when all of these hold:

  1. The routing map explicitly names the owner.
  2. The config allows that ping type.
  3. The item is a feature request that needs owner input, or recent history identifies a likely regression author with strong evidence.
  4. The owner is not a broad on-call group.

No other case gets a ping.

6. Use the issue-tracker adapter

The tracker is an adapter, not a required vendor. A Linear adapter is one valid example. A GitHub Issues adapter or another tracker may implement the same contract.

The configured adapter must provide:

If a required operation is unavailable, fail closed for that write.

Resolve configured team, project, status, and labels at runtime. Do not invent IDs, create labels, assign owners, or set priority unless the config explicitly requires it.

7. Dedupe

Always check whether this source permalink is already linked to a tracker issue or a prior triage reply. If so, do not post or create a duplicate.

For bugs and performance reports, search the tracker using:

Choose one outcome:

For a confident duplicate, update the existing issue with the source permalink and one short recurrence note. Do not reopen, relabel, or reassign it unless the config says to.

For a possible match, link it in the verdict as uncertain and create nothing.

A long-closed issue is a regression lead, not automatically a live duplicate.

8. Decide whether to create

Create only when all of these are true:

  1. The classification is bug or performance.
  2. The behavior is clearly broken.
  3. The issue is still live or not known to be fixed.
  4. Dedupe found no confident or plausible live match.
  5. The source parent and permalink passed preflight.
  6. The tracker target fields resolved.
  7. The adapter can compensate if the verdict post fails.

Never create for a feature request, question, feedback item, reroute, possible duplicate, confident duplicate, or already-fixed issue.

The new issue must be self-contained:

Do not put a guessed root cause in the title.

9. Post one verdict

Run a fresh source-parent preflight. Then post exactly one reply with channel=SOURCE_CHANNEL_ID and thread_ts=SOURCE_THREAD_TS.

Never call a source-channel posting action without a nonempty thread_ts.

Keep the reply short:

Marker contract:

[benny:bug]
[benny:bug] tracker=https://tracker.example/issue/123
[benny:performance]
[benny:performance] tracker=https://tracker.example/issue/123
[benny:other]

Use only the configured marker strings. The repro automation trusts the marker only when it comes from the configured triage identity in this source thread.

After posting, read the same source thread and verify the verdict appears under SOURCE_THREAD_TS. If it does not, never retry at the root.

If this run created a tracker issue and the verdict did not land, use the adapter's compensation action. Verify that the issue is canceled, closed, or deleted. If compensation cannot be verified, report the failure only in the automation run output.

10. Watch one follow-up window

Watch the source thread for the configured follow-up window, then stop.

Do not extend the window more than once. A new report should start a new run.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.