Add agentic workflow issue-triage-agent - #38
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Pull request overview
Adds a gh-aw/Copilot-based “Issue Triage Agent” workflow to automatically label (and comment on) unlabeled issues, along with shared prompt/reporting guidance for consistent output formatting.
Changes:
- Introduces
issue-triage-agentworkflow manifest and its compiled.lock.ymlworkflow. - Adds shared reporting guidelines used by the agent prompt.
- Adds a shared “mood” import file for prompt composition.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/shared/reporting.md | Adds markdown/report structure guidance intended to be runtime-imported into agent prompts. |
| .github/workflows/shared/mood.md | Adds a shared prompt import file (currently a placeholder). |
| .github/workflows/issue-triage-agent.md | Defines the agentic triage workflow prompt/manifest, tools, and safe-output allowlists. |
| .github/workflows/issue-triage-agent.lock.yml | Auto-generated compiled workflow implementing the manifest with pinned actions, safe-outputs config, and runtime-import wiring. |
| toolsets: [issues, labels] | ||
| safe-outputs: | ||
| add-labels: | ||
| allowed: [bug, feature, enhancement, documentation, question, help-wanted, good-first-issue] |
There was a problem hiding this comment.
The workflow instructions and label list include community, but safe-outputs.add-labels.allowed does not. If the agent selects community, the safe-outputs validation will reject it and the triage action will fail. Either add community to the allowed list (and ensure the repo label exists) or remove community from the instructions/label definitions for consistency.
| allowed: [bug, feature, enhancement, documentation, question, help-wanted, good-first-issue] | |
| allowed: [bug, feature, enhancement, documentation, question, help-wanted, good-first-issue, community] |
|
|
||
| </details> | ||
|
|
||
| **References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id}) |
There was a problem hiding this comment.
The comment template hardcodes the workflow run link to https://github.com/github/gh-aw/..., which will point to the wrong repository when this runs elsewhere. It also doesn't match the shared/reporting.md guidance for formatting run references. Use the current repo/run placeholders (e.g., repository + run_id from context) so links resolve correctly.
| **References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id}) | |
| **References**: [Triage run §{run_id}](https://github.com/{repository}/actions/runs/{run_id}) |
| @@ -0,0 +1 @@ | |||
| . No newline at end of file | |||
There was a problem hiding this comment.
This file is imported into the agent prompt, but it currently contains only a single .. That adds noise to the prompt without conveying guidance, and may confuse prompt reviewers about its purpose. Either replace it with actual "mood"/tone guidance, or remove the import and delete this file.
| . | |
| # Assistant mood and tone for `howtfdoi` | |
| - Be concise, direct, and highly practical. Prioritize immediately usable CLI commands and short explanations. | |
| - Assume the user is comfortable with terminals, Go, and Unix-like environments; avoid over-explaining basics. | |
| - Prefer one or a few concrete command examples over long conceptual discussions. | |
| - When suggesting commands: | |
| - Use safe defaults. | |
| - Call out destructive or risky operations explicitly and suggest safer alternatives when possible. | |
| - Use plain text or markdown formatting appropriate for terminals (code blocks, lists). Do not use emojis. | |
| - Match the project style: clear, minimal, and focused on helping users solve their problem quickly. | |
| - If there is uncertainty, state it briefly and suggest how the user can verify the behavior (e.g., `--dry-run`, test files). |
| ## Report Structure Guidelines | ||
|
|
||
| ### 1. Header Levels | ||
| **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.** | ||
|
|
||
| When creating GitHub issues or discussions: | ||
| - Use `###` (h3) for main sections (e.g., "### Test Summary") | ||
| - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results") | ||
| - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles |
There was a problem hiding this comment.
This guidance doc is runtime-imported into the agent prompt, but it uses ## headings while also instructing the agent to never use ##/# in reports. Keeping this doc's own headings at ###/lower, or explicitly scoping the rule to "generated reports/comments only", would reduce contradictory signals in the prompt.
| {"add_comment":{"max":1},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue"],"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} | ||
| GH_AW_SAFE_OUTPUTS_CONFIG_EOF | ||
| cat > /opt/gh-aw/safeoutputs/tools.json << 'GH_AW_SAFE_OUTPUTS_TOOLS_EOF' | ||
| [ | ||
| { | ||
| "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters for the complete comment (including footer which is added automatically), 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. NOTE: By default, this tool requires discussions:write permission. If your GitHub App lacks Discussions permission, set 'discussions: false' in the workflow's safe-outputs.add-comment configuration to exclude this permission. CONSTRAINTS: Maximum 1 comment(s) can be added.", |
There was a problem hiding this comment.
The compiled workflow enforces very low Safe Outputs limits (add_comment.max: 1 and add_labels.max: 3). That conflicts with the manifest goal of triaging (label + comment) each unlabeled issue, and will cap the run to at most a few actions or cause failures. Increase these limits (or change the workflow to intentionally handle only N issues per run) and re-run gh aw compile so the lock file matches.
| {"add_comment":{"max":1},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue"],"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} | |
| GH_AW_SAFE_OUTPUTS_CONFIG_EOF | |
| cat > /opt/gh-aw/safeoutputs/tools.json << 'GH_AW_SAFE_OUTPUTS_TOOLS_EOF' | |
| [ | |
| { | |
| "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters for the complete comment (including footer which is added automatically), 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. NOTE: By default, this tool requires discussions:write permission. If your GitHub App lacks Discussions permission, set 'discussions: false' in the workflow's safe-outputs.add-comment configuration to exclude this permission. CONSTRAINTS: Maximum 1 comment(s) can be added.", | |
| {"add_comment":{"max":50},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue"],"max":50},"missing_data":{},"missing_tool":{},"noop":{"max":1}} | |
| GH_AW_SAFE_OUTPUTS_CONFIG_EOF | |
| cat > /opt/gh-aw/safeoutputs/tools.json << 'GH_AW_SAFE_OUTPUTS_TOOLS_EOF' | |
| [ | |
| { | |
| "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters for the complete comment (including footer which is added automatically), 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. NOTE: By default, this tool requires discussions:write permission. If your GitHub App lacks Discussions permission, set 'discussions: false' in the workflow's safe-outputs.add-comment configuration to exclude this permission. CONSTRAINTS: Maximum 50 comment(s) can be added.", |
| mkdir -p /tmp/gh-aw/safeoutputs | ||
| mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs | ||
| cat > /opt/gh-aw/safeoutputs/config.json << 'GH_AW_SAFE_OUTPUTS_CONFIG_EOF' | ||
| {"add_comment":{"max":1},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue"],"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} |
There was a problem hiding this comment.
community is described as a possible label in the manifest, but the compiled Safe Outputs allowlist here omits it. If community is intended, it needs to be added to the safe-outputs allowlist (and then recompiled) so the label action isn't rejected at runtime.
| {"add_comment":{"max":1},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue"],"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} | |
| {"add_comment":{"max":1},"add_labels":{"allowed":["bug","feature","enhancement","documentation","question","help-wanted","good-first-issue","community"],"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} |
Add agentic workflow issue-triage-agent