ci: improve AI issue triager routing and prompts#252
Open
ayeshurun wants to merge 1 commit into
Open
Conversation
Fix several gaps in the AI issue triage workflow and prompts: - Add a documentation-triage prompt and map the 'documentation' label to it. Documentation issues previously had no prompt, so they kept 'needs triage' forever with no AI comment. - Repair the author-feedback loop: 'Needs Author Feedback' / 'Requires Additional Details' now applies the 'needs author feedback' label, mirroring '/needinfo' so the policy automation re-triages when the author replies. - Substitute the real author handle: the resolve step prepends 'Issue author: @handle' to the AI input and prompts replace {issue_author} with it, so comments no longer emit a literal placeholder. Re-triage detection switched from 'starts with' to 'contains' accordingly. - Remove literal backticks around Next Steps and footer lines in all prompts so they render as markdown instead of inline code. - Close post-processing gaps: 'Valuable Enhancement' surfaces via 'ai:needs team attention' (no @mention), 'Out of Scope' auto-closes as not_planned, and the dead 'needs maintainer input' keyword is removed. Summary table updated to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the GitHub-side AI issue triage infrastructure by fixing prompt routing gaps, strengthening post-processing actions (labels/closing), and making prompts reliably address the issue author. All changes are scoped to .github/ (workflow + prompt YAMLs).
Changes:
- Added a documentation triage prompt and mapped the
documentationlabel to it, preventing documentation issues from getting stuck inneeds triage. - Fixed the “author feedback” loop by having AI triage apply the
needs author feedbacklabel so policy automation can re-triage on author replies. - Updated prompts and workflow input shaping to reliably provide/substitute the issue author handle and improved markdown rendering by removing inline-code formatting around key footer/Next Steps lines.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ai-issue-triage.yml | Prepends Issue author: @… to AI input, adds documentation prompt routing, and improves post-processing (needs-author-feedback labeling, valuable-enhancement surfacing, out-of-scope close reason). |
| .github/prompts/bug-triage.prompt.yml | Updates re-triage detection to “contains” and adjusts Next Steps/footer formatting + author handle substitution guidance. |
| .github/prompts/feature-triage.prompt.yml | Updates re-triage detection to “contains” and adjusts Next Steps/footer formatting + author handle substitution guidance. |
| .github/prompts/question-triage.prompt.yml | Updates re-triage detection to “contains” and adjusts Next Steps/footer formatting + author handle substitution guidance. |
| .github/prompts/documentation-triage.prompt.yml | Introduces a dedicated documentation triage prompt with aligned categories/Next Steps/footer and author handle substitution guidance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes several gaps found while reviewing recent triaged issues, triager runs, and prompt outputs. All changes are scoped to
.github/triage infra (workflow + prompt YAMLs); no CLI source or tests are touched.Changes
1. Fixed the "documentation" black hole
.github/prompts/documentation-triage.prompt.ymland adocumentationentry in the workflow'slabels_to_prompts_mapping. Documentation issues previously had no prompt mapping, so they keptneeds triageforever with no AI comment. Its categories (Answered, Help Wanted, Needs Author Feedback, Needs Team Review) route through the existing post-processing keywords/labels — no new labels required.2. Repaired the broken author-feedback loop
Needs Author Feedback/Requires Additional Detailsnow applies theneeds author feedbacklabel (mirroring the/needinfocommand), soresourceManagement.ymlautomatically re-triages when the author replies. Previously the loop never fired because the AI path never added that label.3. Fixed
@{issue_author}never being substitutedIssue author: @handleto the AI input, and all prompts now substitute that handle for{issue_author}instead of emitting the literal placeholder. Because the handle is prepended ahead of any[RE-TRIAGE]marker, re-triage detection changed from "starts with" to "contains".4. Removed literal backticks around the Next Steps and footer lines in all prompts, so they render as markdown bold/blockquote rather than inline code.
5. Closed post-processing gaps
Valuable Enhancement→ addsai:needs team attentionfor backlog filtering (no@mentionspam).Out of Scope→ auto-closes asnot_planned(via a newcloseReason).needs maintainer inputkeyword and updated the triage summary table to match.Verification
yaml.safe_load).Note
The branch name is
ayeshurun/dev-alonyeshurun-improve-ai-triagerrather than the requesteddev/alonyeshurun/improve-ai-triager— the rename tooling slugifies slashes and namespaces under the handle. Happy to recreate the branch if the exact format is required.