SOP-020: Bugbot Setup
Document Control
- Version: 1.0
- Last Updated: 2024
- Category: Advanced
Purpose
Configure Bugbot to automatically review pull requests and identify bugs, security issues, and code quality problems.
Scope
This SOP covers:
- Setting up Bugbot for GitHub/GitLab
- Configuring review rules
- Managing team settings
- Understanding pricing tiers
Prerequisites
- Cursor Team or Individual subscription
- GitHub/GitLab repository access
- Admin access for team setup
Procedure
Step 1: Install Bugbot
For GitHub.com:
- Go to Cursor Dashboard
- Navigate to Integrations tab
- Click Connect GitHub (or Manage Connections)
- Follow GitHub installation flow
- Return to dashboard to enable Bugbot on repositories
For GitLab or GitHub Enterprise:
Contact hi@cursor.com for setup instructions.
Step 2: Enable for Repositories
- Go to Cursor Dashboard
- Select repositories to enable
- Configure settings per repository
Step 3: Configure Review Settings
Team Admin Settings:
| Setting | Description |
|---|---|
| Run only once | Skip subsequent commits |
| Disable inline reviews | No code line comments |
| Allow/deny reviewers | Control who gets reviews |
Personal Settings:
| Setting | Description |
|---|---|
| Run when mentioned | Only on cursor review |
| Run only once | Skip follow-up commits |
| Review draft PRs | Include drafts |
Step 4: Create Bugbot Rules
Create .cursor/BUGBOT.md in your repository:
markdown
# Bugbot Review Rules
## Security
- Flag any hardcoded API keys or secrets
- Check for SQL injection vulnerabilities
- Verify input validation on endpoints
## Code Quality
- No TODO comments without linked issues
- Console.log not in production code
- All async functions need error handling
## Testing
- New features require unit tests
- Bug fixes require regression testsDirectory Structure:
project/
.cursor/BUGBOT.md # Always included
backend/
.cursor/BUGBOT.md # Included for backend files
frontend/
.cursor/BUGBOT.md # Included for frontend filesStep 5: Add Team Rules (Optional)
Team admins can create organization-wide rules:
- Go to Bugbot Dashboard
- Add rules that apply to all repos
- Choose enforcement level
Rule Priority: Team Rules → Project BUGBOT.md → User Rules
How Bugbot Works
- Automatic reviews on every PR update
- Manual trigger with
cursor revieworbugbot run - Uses PR comments for context
- Fix in Cursor links for quick fixes
- Fix in Web links for cloud fixes
Pricing
Free Tier
- Limited PR reviews per month per user
- Pauses when limit reached
- Resets each billing cycle
Pro Tier
Individuals: $20/month for unlimited reviews
Teams: $40/user/month
- Per-user billing (users who author reviewed PRs)
- Seats relinquish at billing cycle start
- Admin-controlled seat limits
- 200 PR/month cap per license
Admin API
Enable/disable repos programmatically:
bash
curl -X POST https://api.cursor.com/bugbot/repo/update \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"repoUrl": "https://github.com/your-org/your-repo",
"enabled": true
}'Create API key at Dashboard Settings.
Verification Checklist
- [ ] GitHub/GitLab connected
- [ ] Repositories enabled in dashboard
- [ ]
.cursor/BUGBOT.mdcreated with rules - [ ] Test PR receives Bugbot review
- [ ] Team rules configured (if team)
Troubleshooting
| Issue | Solution |
|---|---|
| No review appearing | Run cursor review verbose=true for logs |
| Wrong suggestions | Update BUGBOT.md rules |
| Permission errors | Check GitHub app installation |
| Free tier exhausted | Upgrade to Pro or wait for next cycle |