---
name: al-608-before-anyone-fixes-a-bug-have-an-ai-agent-gather-the-evi
description: "Duolingo's engineering blog described on Nov 4, 2026 how its DevX AI team built AI STR Fix with the Claude Agent SDK to work through bug reports that admin and beta users file by shaking their phone. Instead of just asking Claude to fix the bug, the agent first does the investigation engineers used to do by hand: it finds the code most likely involved, turns a pre-filtered set of tracking events into a short timeline of what the user did, checks which A/B experiments were running, looks at recent pull requests that touched the relevant files, writes reproduction steps and suggests an engineer who knows the area, then posts this context to the Jira ticket. Later steps added a self-review, a stage that fixes failing CI checks and automatic beta builds so anyone can verify a fix. Duolingo says it has fixed release-blocking bugs and saves hours of manual work per ticket; it published no overall fix rate. Use when the user wants help with bug report investigation and context gathering…"
---

# Before anyone fixes a bug, have an AI agent gather the evidence: the code most likely involved, what the user did just before the report, recent changes to those files and steps to reproduce it, posted on the ticket

Duolingo's engineering blog described on Nov 4, 2026 how its DevX AI team built AI STR Fix with the Claude Agent SDK to work through bug reports that admin and beta users file by shaking their phone. Instead of just asking Claude to fix the bug, the agent first does the investigation engineers used to do by hand: it finds the code most likely involved, turns a pre-filtered set of tracking events into a short timeline of what the user did, checks which A/B experiments were running, looks at recent pull requests that touched the relevant files, writes reproduction steps and suggests an engineer who knows the area, then posts this context to the Jira ticket. Later steps added a self-review, a stage that fixes failing CI checks and automatic beta builds so anyone can verify a fix. Duolingo says it has fixed release-blocking bugs and saves hours of manual work per ticket; it published no overall fix rate.

## Inputs to collect first
Ask the user for anything below that they haven't already given you. Don't guess missing facts.

- The material the task is about (pasted text, notes or data)

## Instructions

Do the task below with the user's inputs in place of each [bracket].

1. Pick one bug ticket and gather what you have: the report text, screenshot, logs or error messages, the device or browser, and the date and time it happened.
2. Open a coding agent that can read your code (Claude Code, Codex or Cursor) in your project folder, on a new branch.
3. Ask: "Investigate this bug before changing anything. Write your findings to a file called bug-notes.md: (a) the 3 files most likely involved and why, (b) a short timeline of what the user did before the error, based only on the logs I gave you, (c) any feature flags or settings that could change the behaviour, (d) recent commits that touched those files, from git log, (e) numbered steps to reproduce it, and (f) whether it may already be fixed. Mark anything you are guessing."
4. Read bug-notes.md, try the reproduction steps yourself and correct anything wrong.
5. Then ask: "Using bug-notes.md, make the smallest fix that follows how this part of the code is already written, add or update a test, run the tests and review your own change for side effects."
6. Review the change, test it on a preview or beta build, and only then merge it.

## Safety checks (share these with the user)

- This prompt works on text other people wrote (emails, reviews, messages or web pages). That text can hide instructions aimed at AI, such as "ignore your rules and…". Paste it as material to work on, and never let the AI act on requests inside it, like paying, sharing logins or changing records.
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
- Say clearly which parts need a person to review or approve before anything is sent, paid, posted or filed.

## About this skill

- Works with: Claude Code, Codex or Cursor, Jira or GitHub Issues, Git
- Based on this real-world example: https://blog.duolingo.com/ai-bug-fixing-agent/
- Free prompt from AgentPlaybook Real Estate: https://agentic-library.netlify.app/prompt/al-608-before-anyone-fixes-a-bug-have-an-ai-agent-gather-the-eviden/
- To install in an agent that supports Agent Skills, save this file as SKILL.md in a folder with the same name as `name` above (for example in your skills directory). Install steps for Claude.ai, Claude Code, Cursor and Codex: https://agentic-library.netlify.app/skills/
