Write a Detailed Bug Report with AI
Takes a free-form issue description (Slack message, email, support ticket) and returns a structured bug report following the AQAPro Bug Report Template: clear `[Component] Verb-noun` title, environment, separate severity and priority, numbered atomic repro steps, expected vs actual, and suggested investigation areas.
When to use it
- A customer or teammate reports an issue in conversational language and you need a triage-ready ticket.
- You're standardizing bug reports across a team where quality varies.
- You want to teach junior testers what a good bug report looks like.
- You're filing your own discovery from exploratory testing and want structure imposed on the dump.
The prompt
<role>You are a QA engineer who has filed 10,000+ bug reports. You know the title is 80% of the value: bad title means a wasted ticket. You separate severity (impact on the system) from priority (urgency to fix) because they are not the same thing.</role> <context>Reports go into Linear (or JIRA, or GitHub Issues). The triage process expects: a one-line title in `[Component] Verb-noun` format, environment block (browser/OS/build/account), severity and priority as separate fields, numbered atomic repro steps, expected vs actual, attachments placeholders for screenshots/HAR/console, and a "Suggested investigation" section that points the assignee at likely root causes.</context> <task>From the issue description below, produce a bug report with:1. Title: `[Component] Verb-noun pattern`, < 80 characters2. Environment block (use placeholders if missing: e.g., `Browser: [TODO]`)3. Severity (Critical / Major / Minor / Trivial, with one-line rationale)4. Priority (P1-P4, with one-line rationale)5. Repro steps: numbered, atomic, one action per step6. Expected result7. Actual result8. Attachments placeholder block9. Suggested investigation: 2-4 bullets pointing at likely areas</task> <input>Issue description: {description}Environment hints (if any): {env}Reporter context (customer, internal, automation alert): {reporter}</input> <constraints>- Title uses `[Component] Verb-noun` format and stays under 80 characters (count them). Bad: "Bug in checkout". Good: "[Checkout] Discount code rejected on totals over $1000".- Severity is impact-on-system (Critical/Major/Minor/Trivial). Priority is urgency-to-fix (P1/P2/P3/P4). They are SEPARATE.- Repro steps: each step is ONE atomic action ("Click X", "Enter Y", not "Click X then enter Y").- Don't invent details not in the description; mark as `[TODO: confirm]` instead.- "Suggested investigation" must reference likely TECHNICAL areas (event handler, validation, race condition, etc.), not generic ("look at the code").</constraints> <output_format>The full bug report as a Markdown document with the 9 sections above. Followed by 1-2 sentences naming the single most important piece of missing information that would speed up triage if available.</output_format> <approach>Before writing, identify what's verifiable in the description vs what's inferred: be honest about gaps.</approach>## RoleQA engineer, 10000+ bug reports filed. Title is 80% of the value. Severity ≠ priority. ## ContextLinear / JIRA / GitHub Issues. Triage expects: `[Component] Verb-noun` title, env block, separate severity AND priority, numbered atomic steps, expected/actual, attachment placeholders, Suggested investigation pointing to technical areas. ## TaskProduce a bug report with 9 sections:1. Title (`[Component] Verb-noun`, < 80 chars)2. Environment block (TODO placeholders if missing)3. Severity (Critical / Major / Minor / Trivial) + rationale4. Priority (P1-P4) + rationale5. Repro steps (numbered, atomic, one action each)6. Expected7. Actual8. Attachments placeholder9. Suggested investigation (2-4 bullets, technical areas) ## Input- Description: {description}- Environment hints: {env}- Reporter: {reporter} ## Constraints- Title: `[Component] Verb-noun` format.- Severity (Critical/Major/Minor/Trivial) ≠ Priority (P1/P2/P3/P4): keep separate.- Atomic repro steps.- Don't invent: use `[TODO: confirm]`.- Suggested investigation = technical areas, not "look at the code". ## Output formatMarkdown bug report + 1-2 sentences naming the most important missing info. ## ApproachBe honest about what's verified vs inferred.Example
Input
Issue description: "hey - just spent 20 min trying to apply discount code SAVE20 on a cart with 3 items totalling like $1200. it says applied but the subtotal doesnt change. tried refreshing, same thing. works fine on smaller carts. using chrome on my mac" Environment hints: User is on Chrome / macOS. Total cart amount $1200+ matters. Reporter context: Internal user (engineer testing in staging).
Output
# [Checkout] SAVE20 shows as applied but subtotal stays unchanged on ~$1200 cart ## Environment - Browser: Chrome (version: [TODO: confirm]) - OS: macOS (version: [TODO: confirm]) - Build: [TODO: confirm, likely staging current build] - Account: Internal engineer account - Cart state: 3 items, total ~$1200 (smaller carts work; exact threshold [TODO: confirm]) ## Severity **Major**: The UI confirms a discount the customer is not getting, so real customers would pay full price after being told the code applied: overcharging, refund requests and lost trust in promo campaigns. Only reproduced on a ~$1200 cart so far, which narrows immediate impact, but pricing integrity is at stake. ## Priority **P1**: Fix before next release. Discount-code reliability is high-stakes for trust in promo campaigns; the integrity issue cannot ship to production. ## Steps to reproduce 1. Sign in to the staging environment 2. Add 3 items to the cart totalling ~$1200 (e.g., three items at $400 each) 3. Navigate to the cart page 4. Click "Apply discount code" 5. Enter the discount code: `SAVE20` 6. Click Apply 7. Observe the subtotal field ## Expected result The subtotal decreases by the SAVE20 discount ([TODO: confirm whether SAVE20 is 20% or $20 off]). The cart shows a "Discount: -$X" line, and the new total reflects the discounted price. ## Actual result The UI shows "Discount code applied" confirmation, but the subtotal field remains unchanged at the pre-discount value. No discount line is visible in the totals breakdown. Refreshing the page does not resolve the discrepancy. Behavior is consistent across attempts. ## Attachments - Screenshot of cart before applying code: [attach] - Screenshot of cart after applying code: [attach] - Network HAR file capturing the apply-discount request and response: [attach] - Browser console output (any client errors during the apply): [attach] ## Suggested investigation - Find the cart value where the bug starts (binary-search between a working small cart and $1200) and check if the discount calculation has a maximum cart value limit (configured server-side) that silently caps or rejects the discount instead of erroring - Inspect the response payload from `POST /api/cart/discount`: does the server return success but with the discount amount as $0 or null? - Review the client-side reducer that updates the subtotal: does it handle a successful response with zero discount amount, or does it skip the totals update? - Verify whether this regression aligns with a recent change to the discount-eligibility logic (Linear: search "discount" in last 14 days of merged PRs) --- **Single most important missing info:** A network HAR file capturing the `POST /api/cart/discount` request and response would resolve whether this is a server-side calculation issue or a client-side rendering bug: the difference dictates which team owns the fix.
Common pitfalls
- Title comes out as 'Bug: cart issue': vague. Force the `[Component] Verb-noun` format in constraints.
- Severity and priority collapsed into one (Severity-Priority: High). Separate them or the triage loses meaning.
- Repro steps glob multiple actions per line. Force atomic, one-action-per-line.
- 'Suggested investigation' suggests generic things like 'check the code'. Re-prompt for technical specifics.
Tips
- Feed the AI any HAR snippet or console error you have: it sharpens 'Suggested investigation' significantly.
- Use this prompt's output as a TEMPLATE; let the human fill missing details after. AI fills the structure, human fills the truth.
- Pair with `bug-severity-priority` for borderline cases where severity/priority choices are non-obvious.
- Pair with `bug-repro-from-logs` when you have logs but no easy repro from the reporter.
FAQ
What's the difference between severity and priority?
Severity is impact on the SYSTEM if the bug occurs (Critical = production down, Trivial = cosmetic typo). Priority is urgency to FIX (P1 = next release, P4 = whenever). A critical-severity bug in a feature nobody uses can be P3. A minor-severity bug on the homepage can be P1.
What makes a great bug title?
It tells a triager whether to assign immediately AND helps deduplication. `[Component] Verb-noun` enforces both: the component routes the bug, the verb-noun says what's broken. Vague titles ('Bug in checkout') waste hours over a year.
Should I attach HAR or screenshots?
Both, ideally. Screenshots show what the user saw. HAR shows what the system did. Either alone leaves a gap.
What about console logs?
Always attach when you have them: they often pinpoint the line of failure even when the visible behavior is ambiguous. Make sure no secrets leak in console (tokens, PII).