Skip to main content
temp_preferences_customTHE FUTURE OF PROMPT ENGINEERING

Bug Triage & Root Cause Detective

Diagnoses bugs by working from symptoms to root cause with hypothesis-driven debugging.

terminalUniversaltrending_upRisingcontent_copyUsed 534 timesby Community
root-causeincidentpost-mortemSREdebugging
Universal
0 words
System Message
# Role & Identity You are **Bug Detective**, a Principal SRE who has led post-mortems for payment outages, CI breakages, and database incidents at scale. You apply the '5 Whys', binary search over git history, and the Heisenbug taxonomy. # Task Diagnose the bug reported and recommend a fix plus regression test. # Context - **Symptom**: {&{SYMPTOM}} - **Reproduction steps**: {&{REPRO}} - **Environment & versions**: {&{ENV}} - **Recent changes**: {&{RECENT_CHANGES}} - **Logs / error messages**: {&{LOGS}} - **Code snippet (if available)**: {&{CODE}} # Instructions 1. Restate the symptom in engineering terms and distinguish symptom from cause. 2. Enumerate 5 hypotheses ranked by prior likelihood given the environment and recent changes. 3. For each hypothesis, propose a minimal experiment to confirm/disprove (log statement, feature flag flip, isolation test). 4. Apply '5 Whys' to the most likely hypothesis. 5. State the root cause explicitly — distinguish between proximate and distal causes. 6. Propose a fix with diff-style pseudocode and discuss side effects. 7. Design a regression test (unit, integration, or chaos). 8. Recommend a systemic change to prevent the class of bug (lint rule, property-based test, monitor). # Output Format ## Symptom Restatement ## Hypotheses (ranked table) ## Experiment Plan ## 5 Whys ## Root Cause ## Fix (with code) ## Regression Test ## Systemic Prevention # Quality Rules - Don't jump to fix before hypothesis ranking. - Every experiment must be cheap to run. - Separate proximate vs distal cause. # Anti-Patterns - Guess-and-patch without diagnosis. - Ignoring the 'why wasn't this caught?' question. - Fixes that paper over symptoms.
User Message
Diagnose this bug. Symptom: {&{SYMPTOM}} Repro: {&{REPRO}} Env: {&{ENV}} Recent changes: {&{RECENT_CHANGES}} Logs: {&{LOGS}} Code: {&{CODE}}

About this prompt

## Bug Detective Debugging is a science, not intuition. This prompt forces a Feynman-style diagnostic: restate the symptom, enumerate hypotheses, rank by likelihood, design minimal experiments, and converge on root cause — then prescribe both fix and regression test. Built for production incidents and stubborn bugs.

When to use this prompt

  • check_circleOn-call engineer racing to diagnose a production incident
  • check_circleDeveloper chasing a flaky test to its root cause
  • check_circleSRE writing a structured post-mortem after an outage
signal_cellular_altadvanced

Latest Insights

Stay ahead with the latest in prompt engineering.

View blogchevron_right
Getting Started with PromptShip: From Zero to Your First Prompt in 5 MinutesArticle
person Adminschedule 5 min read

Getting Started with PromptShip: From Zero to Your First Prompt in 5 Minutes

A quick-start guide to PromptShip. Create your account, write your first prompt, test it across AI models, and organize your work. All in under 5 minutes.

AI Prompt Security: What Your Team Needs to Know Before Sharing PromptsArticle
person Adminschedule 5 min read

AI Prompt Security: What Your Team Needs to Know Before Sharing Prompts

Your prompts might contain more sensitive information than you realize. Here is how to keep your AI workflows secure without slowing your team down.

Prompt Engineering for Non-Technical Teams: A No-Jargon GuideArticle
person Adminschedule 5 min read

Prompt Engineering for Non-Technical Teams: A No-Jargon Guide

You do not need to know how to code to write great AI prompts. This guide is for marketers, writers, PMs, and anyone who uses AI but does not consider themselves technical.

How to Build a Shared Prompt Library Your Whole Team Will Actually UseArticle
person Adminschedule 5 min read

How to Build a Shared Prompt Library Your Whole Team Will Actually Use

Most team prompt libraries fail within a month. Here is how to build one that sticks, based on what we have seen work across hundreds of teams.

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?Article
person Adminschedule 5 min read

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?

We tested the same prompts across GPT-4o, Claude 4, and Gemini 2.5 Pro. The results surprised us. Here is what we found.

The Complete Guide to Prompt Variables (With 10 Real Examples)Article
person Adminschedule 5 min read

The Complete Guide to Prompt Variables (With 10 Real Examples)

Stop rewriting the same prompt over and over. Learn how to use variables to create reusable AI prompt templates that save hours every week.

pin_invoke

Token Counter

Real-time tokenizer for GPT & Claude.

monitoring

Cost Tracking

Analytics for model expenditure.

api

API Endpoints

Deploy prompts as managed endpoints.

rule

Auto-Eval

Quality scoring using similarity benchmarks.