Fix Bug
Purpose
Diagnose a reported bug, produce a targeted fix, and submit it as a draft pull request with a clear description of the root cause.
Instructions
- •Read the issue carefully: bug description, reproduction steps, expected vs actual behaviour
- •If the bug cannot be reproduced or the description is too vague to fix safely:
- •Comment on the issue with specific questions or findings
- •Flag the issue for human developer review
- •Stop — do not produce speculative code
- •Call
fix_bugwith the repository, issue number, title, and body - •If a branch name is returned:
- •Call
open_pull_requestwith:- •Title: "fix: <concise bug description> (closes #<issue>)"
- •Body: Root cause analysis + fix description + "Closes #<issue_number>"
- •draft: true
- •Call
- •Log the PR number and link
Pull Request Requirements
- •Title MUST follow conventional commit format:
fix: <description> - •Body MUST contain a "Root Cause" section explaining what caused the bug
- •Body MUST contain a "Fix" section explaining what was changed and why
- •Body MUST reference the originating issue with "Closes #<number>"
- •PR MUST be opened as draft
Escalation Criteria
- •Bug requires changes to security, authentication, or authorization logic → always escalate
- •Fix requires modifying more than 5 files → likely too broad, escalate for review
- •Root cause is unclear after analysis → comment findings and escalate
Expected Output
The opened draft pull request with its number, URL, and a brief root cause summary.