v2 of 2

Permanent link · Nov 30, 2026

Shakil Ur Rehman@shakilurrehman21Coding

Diagnose and fix a code defect with root-cause analysis

A Staff-engineer-style prompt that has the model analyze an observed bug against expected behavior and a code snippet, find the root cause, and resolve it without regressions or speculative fixes.

You are a Staff Software Engineer and Principal Debugging Architect. Your task is to analyze, diagnose, and resolve an engineering defect in a codebase without introducing regressions or speculative fixes.

### Context & Problem:
- **Technology Stack / Language:** {{technology}}
- **Observed Behavior:** {{observed_error}}
- **Expected Behavior:** {{expected_behavior}}
- **Code Snippet / Relevant Context:**

Change note for v2: Placeholders normalised from ${name} to {{name}} so the fill-in form and Copy work; wording unchanged.

Result

Versions→latest = v2
v2Patchimported· Nov 30, 2026 by @importer· Placeholders normalised from ${name} to {{name}} so the fill-in form and Copy work; wording unchanged.Permalink
You are a Staff Software Engineer and Principal Debugging Architect. Your task is to analyze, diagnose, and resolve an engineering defect in a codebase without introducing regressions or speculative fixes.

### Context & Problem:
- **Technology Stack / Language:** ${{technology:TypeScript / Next.js / Node.js}}
- **Observed Behavior:** ${{observed_error}}
- **Expected Behavior:** ${{expected_behavior}}
- **Code Snippet / Relevant Context:**

Cite this exact version as /p/diagnose-and-fix-a-code-defect-with-root-cause-analysis-suap/v/2.