Auto-Triage Bugs via Linear
Devin auto-investigates bugs the moment a label is applied in Linear.Write a triage playbook
The automation needs a playbook that tells Devin how your team triages bugs — not just “fix the bug,” but the specific steps an engineer would follow.Start by duplicating the
!triage template playbook and customizing it for your stack. Or go to Settings > Playbooks and create a new playbook with the macro !triage-bug. Here’s an example:The more specific your playbook, the better Devin’s triage. Reference your team’s actual patterns — error logging conventions, test frameworks, branch naming rules. See the playbook docs for more on writing effective playbooks, or use Advanced Devin to generate a playbook for you.Wire up the automation trigger
Now connect the playbook to Linear so it fires automatically when a bug is labeled.
- Go to Settings > Integrations > Linear (connect the integration first if you haven’t — setup guide)
- Under Synced playbook labels, click Add playbook and select
!triage-bug— this creates a matching label in Linear’s “Devin Playbooks” label group - Scroll to Automation triggers and click Add trigger:
- Teams: Select the team where bugs are filed (e.g., “Engineering”)
- Labels: Select
Bug(or whichever label your team uses for bug reports) - Playbook: Select
!triage-bug
- Save the trigger
Bug label), not for tickets that already have it. This means you won’t accidentally trigger Devin on your entire existing backlog.For playbook labels to sync to Linear automatically, your Linear workspace must have Manage workspace labels set to All members (found under Linear’s Settings > Security). If that’s not enabled, you’ll need to create the labels manually in Linear.
Label a bug and watch Devin investigate
When an engineer adds the
Bug label to a Linear ticket like this:ENG-487: Users see a 500 error when submitting the contact form on /contact. Started after last Friday’s deploy. Stack trace points toDevin automatically starts a session and follows your triage playbook:validateEmail()insrc/lib/forms.ts.
- Reads the ticket — pulls the title, description, and any comments from Linear
- Searches the codebase — finds
src/lib/forms.ts, the route handler atsrc/routes/contact.ts, and the form validation tests - Checks recent changes — runs
git log --since="last Friday" -- src/lib/forms.tsand spots a commit that refactored the email regex
Sharpen the loop
After a few triages, refine the system based on what Devin gets right and where it needs more guidance.Improve the playbook based on real sessions. If Devin consistently misses something (e.g., not checking logs or missing a related service), add that step to your
!triage-bug playbook. You can use Advanced Devin to analyze past sessions and automatically improve your playbook or create Knowledge entries for patterns Devin should follow across all sessions — like “always check the error tracking dashboard first” or “our auth service logs are in CloudWatch, not Datadog.”Add a fix playbook for when you’re ready. Once you trust Devin’s triage, create a second playbook like !fix-bug that goes further — writing a fix, adding a regression test, and opening a PR. Map it to a separate label so your team can choose between “just tell me what’s wrong” and “fix it for me”: