mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #163] [MERGED] fix: add scope constraint to Bonk agent prompts #361
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#361
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/163
Author: @elithrar
Created: 2/27/2026
Status: ✅ Merged
Merged: 2/27/2026
Merged by: @elithrar
Base:
main← Head:fix/161-bonk-scope-constraint📝 Commits (4)
d5516b4fix: add scope constraint to Bonk agent prompts (#161)43bcd64Apply suggestion from @elithrarb2bf641Apply suggestion from @elithrara914b48fix: reference $ISSUE_NUMBER/$PR_NUMBER env vars as ground truth in scope constraint📊 Changes
4 files changed (+16 additions, -4 deletions)
View changed files
📝
.github/workflows/bigbonk.yml(+1 -1)📝
.github/workflows/bonk.yml(+1 -1)📝
.opencode/agents/reviewer.md(+2 -0)📝
.opencode/agents/viguy.md(+12 -2)📄 Description
Bonk can occasionally comment on or interact with the wrong issue/PR when invoked via
/bonk. Fixes #161.The viguy prompt had no explicit constraint scoping the agent to the triggering issue/PR — and step 3 ("Search for related issues and PRs") actively encouraged exploring other issues without guardrails against interacting with them. This mirrors the same problem fixed in cloudflare/workerd#6150 for auto-triggered PR reviews.
viguy.mdas the highest-priority rule, placed early in the prompt for primacy. constrains allghwrite commands to the invoking issue/PR, with explicit instructions to only link (not interact with) related issues found during research.reviewer.mdfor the reviewer subagentfetch-depthfrom 1 to 30 in bothbonk.ymlandbigbonk.yml— gives the agent meaningful git history for diffs, reducing the need to search elsewhere for context (same change as workerd#6150)Verification is manual — trigger
/bonkon a PR and confirm it only references the correct PR number.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.