-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(triage-issue): Improve triage prompt for accuracy #19454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
73a6431
9bfe82c
ef99e42
440109d
e308633
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ def _format_single_issue(data: dict) -> None: | |
| num = data.get("number") | ||
| title = _sanitize_title(data.get("title", "")) | ||
| state = data.get("state", "") | ||
| print(f"#{num} {state} {title}") | ||
| print(f"#{num} {title} {state}") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just to match the print output of the other function. |
||
| labels = data.get("labels", []) | ||
| if labels: | ||
| names = [l.get("name", "") for l in labels if isinstance(l, dict)] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,5 +66,9 @@ jobs: | |
| prompt: | | ||
| /triage-issue ${{ steps.parse-issue.outputs.issue_number }} --ci | ||
| IMPORTANT: Do NOT wait for approval. | ||
| Do NOT write to `/tmp/` or any other directory. Only write files (e.g. triage_report.md) inside the workspace (repo root). | ||
| Do NOT use Bash redirection (> file)—it is blocked. | ||
| Do NOT use `python3 -c` or other inline Python in Bash, only the provided scripts are allowed. | ||
| Do NOT attempt to delete (`rm`) temporary files you create. | ||
|
Comment on lines
+69
to
+72
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this in the action? This should be specified in the skill already no?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put it here because it's specific to the CI run. Locally, the agent can at least try to do this stuff (as someone can still approve it). But some of it is also mentioned in the skill as well. |
||
| claude_args: | | ||
| --max-turns 20 --allowedTools "Write,Bash(gh api *),Bash(gh pr list *),Bash(python3 .claude/skills/triage-issue/scripts/post_linear_comment.py *),Bash(python3 .claude/skills/triage-issue/scripts/parse_gh_issues.py *),Bash(python3 .claude/skills/triage-issue/scripts/detect_prompt_injection.py *)" | ||
| --max-turns 20 --allowedTools "Write,Bash(gh api *),Bash(gh pr list *),Bash(npm info *),Bash(npm ls *),Bash(python3 .claude/skills/triage-issue/scripts/post_linear_comment.py *),Bash(python3 .claude/skills/triage-issue/scripts/parse_gh_issues.py *),Bash(python3 .claude/skills/triage-issue/scripts/detect_prompt_injection.py *)" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fallback to Job Summary is unreachable
Low Severity
The Step 8 fallback was changed from "printing to terminal" to "adding a GitHub Action Job Summary." However, the new CI constraints in
triage-issue.ymlblock both writing outside the workspace ($GITHUB_STEP_SUMMARYlives in a runner temp directory) and bash redirection (>> $GITHUB_STEP_SUMMARY). This makes the Job Summary fallback unreachable in CI, potentially wasting agent turns against the--max-turns 20limit. The previous fallback of "printing to terminal" always worked.Additional Locations (1)
.github/workflows/triage-issue.yml#L68-L70There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action has the permission to do that and it was already posting a Job Summary