| | @@ -1,5 +1,5 @@ |
| 1 | 1 | --- |
| 2 | | -allowed-tools: Bash(gh label list:*),Bash(gh issue view:*),Bash(./scripts/edit-issue-labels.sh:*),Bash(gh search issues:*) |
| 2 | +allowed-tools: Bash(./scripts/gh.sh:*),Bash(./scripts/edit-issue-labels.sh:*) |
| 3 | 3 | description: Triage GitHub issues by analyzing and applying labels |
| 4 | 4 | --- |
| 5 | 5 | |
| | @@ -12,17 +12,21 @@ |
| 12 | 12 | $ARGUMENTS |
| 13 | 13 | |
| 14 | 14 | TOOLS: |
| 15 | | -- `gh label list`: Fetch all available labels in this repo |
| 16 | | -- `gh issue view NUMBER`: Read the issue title, body, and labels |
| 17 | | -- `gh issue view NUMBER --comments`: Read the conversation |
| 18 | | -- `gh search issues QUERY`: Find similar or duplicate issues |
| 19 | | -- `./scripts/edit-issue-labels.sh --issue NUMBER --add-label LABEL --remove-label LABEL`: Add or remove labels |
| 15 | +- `./scripts/gh.sh` — wrapper for `gh` CLI. Only supports these subcommands and flags: |
| 16 | + - `./scripts/gh.sh label list` — fetch all available labels |
| 17 | + - `./scripts/gh.sh label list --limit 100` — fetch with limit |
| 18 | + - `./scripts/gh.sh issue view 123` — read issue title, body, and labels |
| 19 | + - `./scripts/gh.sh issue view 123 --comments` — read the conversation |
| 20 | + - `./scripts/gh.sh issue list --state open --limit 20` — list issues |
| 21 | + - `./scripts/gh.sh search issues "query"` — find similar or duplicate issues |
| 22 | + - `./scripts/gh.sh search issues "query" --limit 10` — search with limit |
| 23 | +- `./scripts/edit-issue-labels.sh --issue NUMBER --add-label LABEL --remove-label LABEL` — add or remove labels |
| 20 | 24 | |
| 21 | 25 | TASK: |
| 22 | 26 | |
| 23 | | -1. Run `gh label list` to fetch the available labels. You may ONLY use labels from this list. Never invent new labels. |
| 24 | | -2. Run `gh issue view ISSUE_NUMBER` to read the issue details. |
| 25 | | -3. Run `gh issue view ISSUE_NUMBER --comments` to read the conversation. |
| 27 | +1. Run `./scripts/gh.sh label list` to fetch the available labels. You may ONLY use labels from this list. Never invent new labels. |
| 28 | +2. Run `./scripts/gh.sh issue view ISSUE_NUMBER` to read the issue details. |
| 29 | +3. Run `./scripts/gh.sh issue view ISSUE_NUMBER --comments` to read the conversation. |
| 26 | 30 | |
| 27 | 31 | **If EVENT is "issues" (new issue):** |
| 28 | 32 | |
| | @@ -31,7 +35,7 @@ |
| 31 | 35 | 5. Analyze and apply category labels: |
| 32 | 36 | - Type (bug, enhancement, question, etc.) |
| 33 | 37 | - Technical areas and platform |
| 34 | | - - Check for duplicates with `gh search issues`. Only mark as duplicate of OPEN issues. |
| 38 | + - Check for duplicates with `./scripts/gh.sh search issues`. Only mark as duplicate of OPEN issues. |
| 35 | 39 | |
| 36 | 40 | 6. Evaluate lifecycle labels: |
| 37 | 41 | - `needs-repro` (bugs only, 7 days): Bug reports without clear steps to reproduce. A good repro has specific, followable steps that someone else could use to see the same issue. |
| | @@ -58,7 +62,7 @@ |
| 58 | 62 | - Do NOT add or remove category labels (bug, enhancement, etc.) on comment events. |
| 59 | 63 | |
| 60 | 64 | GUIDELINES: |
| 61 | | -- ONLY use labels from `gh label list` — never create or guess label names |
| 65 | +- ONLY use labels from `./scripts/gh.sh label list` — never create or guess label names |
| 62 | 66 | - DO NOT post any comments to the issue |
| 63 | 67 | - Be conservative with lifecycle labels — only apply when clearly warranted |
| 64 | 68 | - Only apply lifecycle labels (`needs-repro`, `needs-info`) to bugs — never to questions or enhancements |