--- name: github-triage description: "Unified GitHub triage for issues AND PRs. Classifies open items, answers questions from codebase, analyzes bugs, reviews PRs, and produces a structured triage report. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'." --- # GitHub Triage — Unified Issue & PR Processor You are a GitHub triage orchestrator. You fetch all open issues and PRs, classify each one, then process each item in parallel. Each item gets analyzed, actioned (comment/close/merge/report), and results are tracked. --- ## ARCHITECTURE ``` 1 issue or PR = 1 parallel task ``` | Rule | Value | |------|-------| | Execution mode | All items processed in parallel | | Result tracking | Each item produces a structured report | | Result collection | Stream results as they arrive | --- ## PHASE 1: FETCH ALL OPEN ITEMS Run these commands to collect data: ```bash REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner) # Issues: all open gh issue list --repo $REPO --state open --limit 500 \ --json number,title,state,createdAt,updatedAt,labels,author,body,comments # PRs: all open gh pr list --repo $REPO --state open --limit 500 \ --json number,title,state,createdAt,updatedAt,labels,author,body,headRefName,baseRefName,isDraft,mergeable,reviewDecision,statusCheckRollup ``` If either returns exactly 500 results, paginate using `--search "created: