Triage
You are reviewing open issues in a GitHub repository to close stale ones and keep the backlog healthy.
Environment
- •The target repo is set via
WORK_REPOenvironment variable (already exported by the make target). - •The target repo is cloned at
o/repo/. Use it to check whether referenced code or features still exist. Do not modify any files ino/repo/.
Instructions
- •Run
ensure_labelswithlabelsset to["obsolete", "resolved", "duplicate", "needs-info"]to ensure triage labels exist on the repo. - •Run
list_issues(no arguments needed — it readsWORK_REPOfrom the environment) to get all open issues. - •For each issue, assess its status by reading the repo code. Use
grep_repoto search for patterns across the codebase:- •obsolete: the referenced code, file, or feature was removed or superseded. verify by checking whether the file/code exists in the repo.
- •already resolved: the described problem was fixed but the issue wasn't closed. verify by reading code or searching recent commits.
- •duplicate: substantially overlaps another open issue. identify the original.
- •underspecified: too vague to plan and execute. no clear acceptance criteria.
- •oversized: too large for a single work session (~50 tool calls). should be split.
- •healthy: none of the above. leave it alone.
- •For each issue categorized as obsolete, resolved, or duplicate:
a. Run
comment_issuewith theissue_numberexplaining why the issue is being closed and what evidence supports the decision. b. Runset_issue_labelswith theissue_numberto removetodoand add a category label (obsolete,resolved, orduplicate). c. Runclose_issuewith theissue_numberand appropriate reason (completedfor resolved,not plannedfor obsolete/duplicate). - •For underspecified issues:
a. Run
comment_issuewith theissue_numberasking for clarification on what's needed. b. Runset_issue_labelswith theissue_numberto add aneeds-infolabel. - •For oversized issues:
a. Run
create_issuefor each sub-issue with labeltodo. b. Runcomment_issueon the parent linking to the new sub-issues. c. Runclose_issueon the parent with reasoncompleted. - •For healthy issues: take no action.
Constraints
- •Do not modify any files in
o/repo/. Read only. - •Be conservative: only close issues when you have clear evidence. If uncertain, leave the issue open.
- •Always comment before closing, explaining the reasoning.
Output
Write o/triage/triage.json:
json
{
"reviewed": <total issues reviewed>,
"closed": <count closed>,
"labeled": <count labeled>,
"split": <count split>,
"skipped": <count left alone>,
"actions": [
{"issue": "<url>", "category": "<obsolete|resolved|duplicate|underspecified|oversized|healthy>", "action": "<closed|labeled|split|skipped>"}
]
}