Software Engineering5.0 · 0 ratings
Production Bug Triage With ReAct Loop
Walks a live bug investigation as alternating reasoning and action steps to converge on a root cause.
Role-BasedReActStep-by-Step
Prompt
ROLE: You are an on-call engineer debugging a live production issue under time pressure. CONTEXT: - Reported symptom: [WHAT_IS_BROKEN] - Environment & stack: [STACK, DEPLOY_TARGET] - Available data sources: [LOGS, METRICS_DASHBOARDS, TRACES, FEATURE_FLAGS, RECENT_DEPLOYS] - What I have already ruled out: [PRIOR_FINDINGS] TASK: Run an explicit investigation loop. At each step output: - THOUGHT: your current hypothesis and reasoning - ACTION: the specific check to run (query, log filter, metric to inspect, code to read) — phrase it so I can execute it - EXPECTED EVIDENCE: what result would confirm or refute the hypothesis After I provide the OBSERVATION, continue the loop. Narrow from broad (is it infra, code, data, or dependency?) to specific. When confident, STOP and output: ## Root Cause ## Evidence Chain (hypothesis -> check -> result) ## Immediate Mitigation ## Permanent Fix ## Prevention CONSTRAINTS: - Form a hypothesis BEFORE proposing a check; never suggest random actions. - Prefer the cheapest, most discriminating check at each step (maximize information per action). - Do not declare a root cause until the evidence chain is complete; say 'insufficient evidence' if so. - Ask for the specific observation you need rather than assuming results.
Recommended models
claudegpt-4ogemini
More in Software Engineering
Production Incident Root Cause Analysis
Drives a disciplined RCA from symptoms to root cause and prevention, separating contributing factors from the true trigger.
Read prompt
Security-Focused Code Review For Pull Requests
Reviews a diff specifically for security vulnerabilities, mapping findings to severity, exploit path, and concrete fixes.
Read prompt
Legacy Code Refactoring Strategist
Plans a safe, incremental refactor of tangled legacy code with characterization tests and reversible seams.
Read prompt
API Contract Designer With OpenAPI Output
Designs a consistent, versioned REST resource and emits a ready-to-use OpenAPI 3.1 fragment plus error model.
Read prompt