From 0915e0af2db76112980cf77a795a9f18b41abbfd Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Sat, 8 Nov 2025 11:46:46 -0800 Subject: [PATCH 1/4] Tweak review prompts --- .cursor/BUGBOT.md | 24 ++++++++++++++++++++++++ .github/workflows/claude-code-review.yml | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 .cursor/BUGBOT.md diff --git a/.cursor/BUGBOT.md b/.cursor/BUGBOT.md new file mode 100644 index 0000000000..0fb087c653 --- /dev/null +++ b/.cursor/BUGBOT.md @@ -0,0 +1,24 @@ +# BugBot configuration + +This file contains the configuration for the BugBot. + +## PR description + +- Don't list all the changes by files/change types, just very briefly summarize what is the PR trying to accomplish. +- Don't list the changes files/dirs. +- Don't use sections, or lists, ideally just one short paragraph. +- Don't use emojis. + +## PR review + +Please review this pull request and provide feedback on: + +- Potential bugs or issues +- Performance considerations +- Important security concerns + +Be constructive and helpful in your feedback and be **very conscise**. +Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style. +Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues. +Don't output final summaries, or final lists of action items. +Try not to use emojis. diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index b65c6550ae..bd0b942551 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -38,6 +38,8 @@ jobs: Be constructive and helpful in your feedback and be **very conscise**. Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style. Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues. + Don't output final summaries, or final lists of action items. + Try not to use emojis. Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. From 7fc3796e449a40a633256e6f286075b9a5186f62 Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Sat, 8 Nov 2025 15:13:49 -0800 Subject: [PATCH 2/4] Try claude line comments --- .github/workflows/claude-code-review.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index bd0b942551..822741b7f4 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -41,6 +41,23 @@ jobs: Don't output final summaries, or final lists of action items. Try not to use emojis. - Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. - - claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' + When you find a *specific issue* in the code (bug, performance concern, security risk, etc.), + leave an **inline comment** on that exact file and line. + If no issues are found, do not post anything. + + To comment inline, use this format exactly: + + ```bash + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments \ + -f body='${BODY}' \ + -f commit_id="$GITHUB_SHA" \ + -f path='${PATH}' \ + -F line=${LINE} \ + -f side='RIGHT' + ``` + + claude_args: '--allowed-tools "Bash(gh api:*), Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' From c919c3ab0882f85ecd6c086a7129c9e949440080 Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Sun, 9 Nov 2025 11:04:53 -0800 Subject: [PATCH 3/4] Change env var --- .github/workflows/claude-code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 822741b7f4..11170a92a7 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -54,7 +54,7 @@ jobs: -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments \ -f body='${BODY}' \ - -f commit_id="$GITHUB_SHA" \ + -f commit_id="${{ github.event.pull_request.head.sha }}" \ -f path='${PATH}' \ -F line=${LINE} \ -f side='RIGHT' From b49f9a7866a8f99dd1cd0581b2b9b251f62cc10c Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Mon, 10 Nov 2025 10:09:35 -0800 Subject: [PATCH 4/4] Tweak prompts --- .cursor/BUGBOT.md | 1 - .github/workflows/claude-code-review.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.cursor/BUGBOT.md b/.cursor/BUGBOT.md index 0fb087c653..0d065b6ab6 100644 --- a/.cursor/BUGBOT.md +++ b/.cursor/BUGBOT.md @@ -21,4 +21,3 @@ Be constructive and helpful in your feedback and be **very conscise**. Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style. Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues. Don't output final summaries, or final lists of action items. -Try not to use emojis. diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 11170a92a7..fb132a68a2 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -2,7 +2,7 @@ name: Claude Code Review on: pull_request: - types: [opened, synchronize] + types: [opened] jobs: claude-review: @@ -39,7 +39,7 @@ jobs: Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style. Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues. Don't output final summaries, or final lists of action items. - Try not to use emojis. + Reduce false positives—try to validate if the issue is really a valid problem in the changes. When you find a *specific issue* in the code (bug, performance concern, security risk, etc.), leave an **inline comment** on that exact file and line.