Skip to content

[opencode] make bonk fix requests implementation-first#12993

Merged
penalosa merged 3 commits intomainfrom
bonk-implementation-bias
Mar 20, 2026
Merged

[opencode] make bonk fix requests implementation-first#12993
penalosa merged 3 commits intomainfrom
bonk-implementation-bias

Conversation

@elithrar
Copy link
Contributor

@elithrar elithrar commented Mar 20, 2026

This updates the Bonk agent prompt so PR fix requests are treated as implementation work instead of suggestion-only review.

The current prompt gives review behavior more specific guidance than implementation behavior, which makes Bonk drift toward comments like the ones on #12970 instead of directly updating the branch.

  • make implementation mode the default for fix, address, formatting, and cleanup requests
  • add explicit action, PR, and thread-context bias so short review-thread prompts still resolve to direct changes
  • add examples for review-only, implementation-first hybrid, and reproduce-then-fix requests

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: this only updates .opencode/agents/bonk.md
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this only updates an internal agent prompt

cc @penalosa


Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

⚠️ No Changeset found

Latest commit: 37a8924

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@workers-devprod
Copy link
Contributor

workers-devprod commented Mar 20, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 20, 2026

The change is to .opencode/agents/bonk.md only — an internal agent prompt file. This is not a published package, so no changeset is required. The changes restructure the prompt to prioritize implementation mode over review mode when Bonk receives action-oriented requests, which directly addresses the stated problem of Bonk drifting toward suggestion-only comments.

The restructuring is logical:

  • XML tags for clear section boundaries
  • Explicit mode precedence (implementation > review > triage)
  • Concrete trigger examples for each mode
  • Positive and negative examples to anchor behavior
  • Anti-patterns updated to include the bad behavior being fixed

No logic bugs, security issues, backward compatibility concerns, or incorrect API behavior. The file is an internal prompt with no runtime impact on any published package.

LGTM

github run

@elithrar elithrar self-assigned this Mar 20, 2026
Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean restructuring that directly addresses the problem described in #12970. The XML-tagged sections, explicit mode precedence, and positive/negative examples should all help anchor behavior toward implementation when action is requested.

Two minor observations (non-blocking):

  1. The <non_negotiable_rules> section packs a lot of behavioral guidance (action bias, PR bias, thread-context bias) alongside scope constraints. If Bonk still drifts, splitting the biases into their own section could make them harder to skip over during prompt processing — but worth seeing how this version performs first.

  2. The implementation workflow step 4 is doing double duty: on issues it searches for overlaps, on PRs it establishes the current PR as the target. These are quite different actions. If step 4 grows more complex later, splitting it would improve clarity.

Neither of these is worth changing now — the restructure is a clear improvement over the previous version. LGTM.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 20, 2026

Approved PR #12993. The restructuring is solid — the XML-tagged sections, explicit mode precedence (implementation > review > triage), and concrete positive/negative examples should effectively anchor Bonk toward direct implementation when action verbs are used, which addresses the drift toward suggestion-only comments seen in #12970. Left two minor non-blocking observations about potential future refinements.

github run

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 20, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12993

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12993

miniflare

npm i https://pkg.pr.new/miniflare@12993

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12993

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12993

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12993

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12993

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12993

wrangler

npm i https://pkg.pr.new/wrangler@12993

commit: 37a8924

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 20, 2026
@penalosa penalosa merged commit 09b3028 into main Mar 20, 2026
44 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 20, 2026
@penalosa penalosa deleted the bonk-implementation-bias branch March 20, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants