Skip to content

Improve issue triage template with structured triage flow#332

Merged
dsyme merged 8 commits into
githubnext:mainfrom
labudis:labudis/improve-issue-triage-template
May 12, 2026
Merged

Improve issue triage template with structured triage flow#332
dsyme merged 8 commits into
githubnext:mainfrom
labudis:labudis/improve-issue-triage-template

Conversation

@labudis
Copy link
Copy Markdown
Contributor

@labudis labudis commented May 12, 2026

Summary

Improves the issue triage workflow template by incorporating patterns from the GitHub Issues triage agent and iterating based on live testing.

Changes

New safe outputs:

  • set-issue-type for issue type assignment
  • close-issue with state-reason: "not_planned" to auto-close spam
  • labels toolset for richer label metadata (replaces gh label list bash)

Restructured flow (was 8 overlapping steps, now 4 clear phases):

  1. Gather context
  2. Spam and quality check
  3. Triage (type, labels, duplicates, coding agent suitability)
  4. Apply results

New capabilities:

  • Auto-close spam issues as "not planned" with invalid/spam label
  • Quality gate for incomplete issues (asks author for specifics, applies needs-info label)
  • Issue type assignment (respects existing values)
  • Duplicate detection with confidence levels (duplicate vs related, up to 3 each)
  • Coding agent suitability assessment (Suitable / Needs more info / Not suitable)
  • Structured triage report with assessment table

Guardrails:

  • Do not overwrite existing issue type
  • Do not invent missing context or make assumptions
  • Label safety warning (labels can trigger automation)
  • Under-label rather than speculatively add labels
  • Comments addressed to maintainers, not issue authors

Preserved from original:

  • Web search for docs, error messages, known solutions
  • Debugging strategies and reproduction steps
  • Sub-task breakdown with checklists
  • Collapsed sections for tidy comments

Testing

Tested with 13 issues across 3 rounds in a private test repository. All runs completed successfully.

Round 1

Test case Result
Feature request (Slack notifications) ✅ Type: Feature, found 2 related issues, implementation checklist
Near-duplicate of existing issue (scroll position) ✅ Flagged original as duplicate, found related issue, recommended closing

Round 2

Test case Result
Spam (bitcoin scam) ✅ One-sentence callout, no metadata applied, exited early
Vague/incomplete (no details) ✅ Asked author for specifics, refused to triage
Epic (multi-repo dashboard) ✅ Type: Feature, correct labels, found 3 related issues, phased sub-tasks
Bug (duplicate weekly status issues) ✅ Type: Bug, correct labels, root cause hypothesis, 3 fix approaches
Feature request (file path labeling) ✅ Type: Feature, correct label, implementation approach, subtask checklist

Improvements made from testing

  • Round 1: Agent detected duplicate but did not apply duplicate label; added explicit instruction
  • Round 1: Removed set-issue-field (compiler does not support it yet)
  • Round 2: Spam issue left open; added close-issue safe output
  • Round 2: Added invalid/spam label for spam, needs-info label for incomplete issues
  • Round 2: Added coding agent suitability assessment
  • Round 2: Replaced gh label list bash with labels toolset

Round 3

Tested in github/triage-agent (different repo with richer label set).

Test case Result
Spam (V-Bucks scam) ✅ Closed as not planned, invalid label applied
Vague bug ("doesn't work") question label, asked for specifics, refused to triage
Well-written bug (label mismatch from code blocks) ✅ Type: Bug, labels: bug + accuracy + triage agent, coding agent: Suitable, found related issue
Feature request (custom triage rules) ✅ Type: Feature, no labels (correct; none fit), found 2 related issues
Accuracy bug (non-English issues) ✅ Type: Bug, labels: accuracy + triage agent, coding agent: Needs more info

Issue found and fixed:

  • Spam issues got two comments (triage report + "Closing as spam"); fixed to post a single close comment with no assessment table

labudis and others added 4 commits May 12, 2026 08:01
- Add set-issue-type and set-issue-field safe outputs
- Restructure flow: gather context, quality check, triage, apply
- Add quality gate for incomplete issues (ask for missing info)
- Add issue type assignment (skip if already set)
- Add issue field assignment (skip if already set)
- Add duplicate detection with confidence levels (duplicate vs related)
- Add structured triage report format with assessment table
- Add label safety warning (labels can trigger automation)
- Add explicit guardrails: don't invent context, don't overwrite metadata
- Clarify comment audience is maintainers, not issue authors
- Keep web search, debugging strategies, sub-task breakdown
- Update docs to reflect new capabilities

Inspired by patterns from the GitHub Issues triage agent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep field-related instructions in the prompt body so the agent
can still recommend field values in the triage report.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Instruct agent to apply duplicate label when high-confidence
  duplicate is detected and the label exists in the repo
- Remove set_issue_field from Step 4 (compiler does not support it yet)
- Keep field guidance in Step 3c for comment-only recommendations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add close-issue safe output to auto-close spam as not_planned
- Apply invalid/spam label to spam issues
- Apply needs-info/question label to incomplete issues
- Add coding agent suitability assessment (Suitable/Needs more info/Not suitable)
- Replace gh label list bash with labels toolset for richer metadata
- Update Step 4 with close_issue action

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@labudis
Copy link
Copy Markdown
Contributor Author

labudis commented May 12, 2026

Gap: set-issue-field safe output not working

The safe outputs reference documents set-issue-field with full configuration options (max, target, allowed-fields, target-repo, etc.), but the compiler (v0.72.1) rejects it:

Error: Invalid safe output: set-issue-field

This means the triage workflow cannot set issue fields like Priority, Iteration, or custom fields today. This is a significant gap for triage use cases, since field assignment is one of the most common triage actions.

Once this lands in the compiler, this template should add:

safe-outputs:
  set-issue-field:
    target: "triggering"
    allowed-fields: [Priority, Iteration]

And Step 3 should be updated to instruct the agent to set priority and other fields.

cc @pelikhan

labudis and others added 3 commits May 12, 2026 08:40
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread workflows/issue-triage.md Outdated
Co-authored-by: Renee Xu <reneexeener@github.com>
@dsyme dsyme merged commit e59994b into githubnext:main May 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants