Auto-Triage Bugs via Linear
Opulent auto-investigates bugs the moment a label is applied in Linear.
Write the triage playbook
Connect Linear, GitHub, and Sentry. The triage logic lives in a playbook, a reusable, named set of steps Opulent follows every time a bug is labeled. It defines how your team investigates, not just 'fix the bug.'
The playbook should match your actual stack: where to search for code, which git log window to check, how to read logs, and what a good triage comment looks like.
Playbook: !triage-bug When a Linear ticket is labeled Bug: 1. Read the title, description, and comments on the ticket. 2. Search the codebase for files mentioned in the report. 3. Check git log for recent changes to those files. 4. If Sentry is connected, search for related errors in the same window. 5. Identify the root cause in one sentence. 6. Post a comment on the ticket with: - Root cause - Affected files - Recent changes that may have caused it - Suggested fix approach - Confidence label: Clear Fix / Needs Review / Lacking Context
Give Opulent read-only access to Sentry and your production logs so it can verify the bug against real signals instead of relying only on the ticket text.
Wire the automation trigger
In Linear, create an automation that adds the `Bug` label or a synced `!triage-bug` label to new bug tickets. Opulent listens for the label and starts the triage run.
The trigger uses edge detection, it fires only when a ticket transitions to having the label, not on the entire existing backlog. This prevents Opulent from triaging every old ticket at once.
Linear automation: Trigger: when a ticket is labeled "Bug" in the Engineering team Action: start an Opulent run with the !triage-bug playbook Required Linear setting: - Manage workspace labels: All members (so synced labels appear).
Label a bug and watch it investigate
An engineer adds the Bug label to a ticket: 'Users see a 500 error when submitting the contact form on /contact. Started after last Friday's deploy. Stack trace points to validateEmail() in src/lib/forms.ts.'
Opulent reads the ticket, searches the codebase, checks git log since last Friday, and finds a commit that refactored the email regex. It posts a comment with the root cause and the suggested fix.
Ticket: ENG-487, 500 error on /contact form Run actions: - Read ticket: 500 error, stack trace points to validateEmail(). - Searched codebase: src/lib/forms.ts, src/routes/contact.ts. - Checked git log --since="last Friday" -- src/lib/forms.ts: commit a1b2c3d refactored email regex. - Sentry: 12 related errors starting at 14:32 UTC. Comment posted: - Root cause: email regex in validateEmail() rejects valid TLDs. - Affected files: src/lib/forms.ts. - Suspect commit: a1b2c3d (Friday). - Suggested fix: revert to prior regex or add the missing TLD. - Label: Clear Fix.
Chain the next step
The triage comment can update labels. A 'Clear Fix' label can trigger a second run that writes the fix and opens a PR. A 'Needs Review' label routes the ticket to a senior engineer. A 'Lacking Context' label pings the reporter for more detail.
Labels become the routing layer: each label starts the right next run, so the workflow stays automated from bug report to fix.
Sharpen the triage loop
When Opulent consistently misses something (not checking logs, missing a related service) add that step to the playbook. When it misidentifies a cause, write the correction into memory (the notes a run recalls next time).
After a few runs, the playbook becomes a codified version of your team's triage process. The natural chain: a 'Clear Fix' ticket can hand off to Debug a Bug Report End-to-End or Auto-Fix Failing CI Builds; a 'Lacking Context' ticket can route to Autonomous Triage for Knowledge Work Queues.