Skip to content

Normalize issue-triage-agent comment formatting#11872

Merged
pelikhan merged 3 commits intomainfrom
copilot/normalize-report-formatting-again
Jan 26, 2026
Merged

Normalize issue-triage-agent comment formatting#11872
pelikhan merged 3 commits intomainfrom
copilot/normalize-report-formatting-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

The issue-triage-agent workflow adds comments to issues but lacked formatting guidelines, resulting in inconsistent output compared to other triage workflows like pr-triage-agent.

Changes

  • Import shared reporting guidelines: Added shared/reporting.md to imports for consistent formatting across workflows
  • Structured comment template: Replaced plain instruction with template using h3 headers, visible reasoning, and progressive disclosure via <details> tags
  • Batch optimization guidance: Added instructions for handling multiple issues efficiently with per-issue comments and optional summary discussion

Template Format

### 🏷️ Issue Triaged

Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis:

**Reasoning**: {brief_explanation}

<details>
<summary><b>View Triage Details</b></summary>

#### Analysis
- **Keywords detected**: {keywords}
- **Issue type indicators**: {indicators}
- **Confidence**: {High/Medium/Low}

#### Recommended Next Steps
- {suggestion_1}
- {suggestion_2}

</details>

**References**: [Triage run §{run_id}](...)

Comments now follow the same progressive disclosure pattern as other triage workflows: reasoning visible by default, detailed analysis collapsed to reduce noise.

Original prompt

This section details on the original issue you should resolve

<issue_title>[workflow-style] Normalize report formatting for issue-triage-agent</issue_title>
<issue_description>### Workflow to Update

Workflow File: .github/workflows/issue-triage-agent.md

Issues Found:

  • Comments added to issues don't follow formatting guidelines
  • Doesn't import shared/reporting.md guidelines
  • No progressive disclosure instructions

Current Behavior

The workflow adds comments explaining label additions (line 26) but doesn't specify formatting guidelines for comment structure.

Required Changes

1. Import Shared Reporting Guidelines

Add to the imports section at the top of the file:

imports:
  - shared/reporting.md

2. Update Comment Instructions

Current (line 26):

After adding the label to an issue, mention the issue author in a comment explaining why the label was added.

Updated with structured format:

After adding the label to an issue, mention the issue author in a comment using this format (follow shared/reporting.md guidelines):

**Comment Template**:
\`\`\`markdown
### 🏷️ Issue Triaged

Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis:

**Reasoning**: {brief_explanation_of_why_this_label}

<details>
<summary><b>View Triage Details</b></summary>

#### Analysis
- **Keywords detected**: {list_of_keywords_that_matched}
- **Issue type indicators**: {what_made_this_fit_the_category}
- **Confidence**: {High/Medium/Low}

#### Recommended Next Steps
- {context_specific_suggestion_1}
- {context_specific_suggestion_2}

</details>

**References**: [Triage run §{run_id}](https://github.com/githubnext/gh-aw/actions/runs/{run_id})
\`\`\`

**Key formatting requirements**:
- Use h3 (###) for the main heading
- Keep reasoning visible for quick understanding
- Wrap detailed analysis in `<details>` tags
- Include workflow run reference
- Keep total comment concise (collapsed details prevent noise)

3. Add Batch Comment Optimization

If triaging multiple issues in one run, consider a summary comment pattern:

For efficiency, if multiple issues are triaged in a single run:
1. Add individual labels to each issue
2. Add a brief comment to each issue (using the template above)
3. Optionally: Create a discussion summarizing all triage actions for that run

This provides both per-issue context and batch visibility.

Design Principles

The updated comments should:

  1. Build trust through clarity: Clear reasoning immediately visible
  2. Respectful to maintainers: Concise by default, details available on demand
  3. Actionable: Include next steps relevant to the label
  4. Consistent formatting: Matches patterns from other triage workflows

Reference Examples

Good examples of triage comment formatting:

  • pr-triage-agent.md - Structured triage comments with reasoning
  • shared/reporting.md - Progressive disclosure guidelines

Testing

After making changes:

  1. Trigger the workflow with workflow_dispatch
  2. Find an unlabeled issue for the workflow to triage
  3. Verify the added comment uses h3 headers
  4. Verify detailed analysis is in <details> tags
  5. Verify reasoning is immediately visible without expanding

AI generated by Workflow Normalizer

  • expires on Feb 2, 2026, 12:26 PM UTC

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 26, 2026 13:18
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review January 26, 2026 13:28
Copilot AI changed the title [WIP] Normalize report formatting for issue-triage-agent Normalize issue-triage-agent comment formatting Jan 26, 2026
Copilot AI requested a review from pelikhan January 26, 2026 13:30
@pelikhan pelikhan merged commit 7393bb9 into main Jan 26, 2026
84 checks passed
@pelikhan pelikhan deleted the copilot/normalize-report-formatting-again branch January 26, 2026 13:34
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.

[workflow-style] Normalize report formatting for issue-triage-agent

2 participants