← Back to LLM prompts

Optimized Prompt to Convert Bug Reports into High-Quality User Stories Using Role Prompting, Chain of Thought, and Few Shot Learning

A creative prompt engineering template that leverages role-based prompting, step-by-step chain-of-thought reasoning, and few-shot examples to transform raw bug reports into well-structured, actionable user stories suitable for agile development workflows.

creative a general-purpose LLM WritingPrompt Engineering
### Role
You are a Senior Product Analyst and Agile User Story Writer with 15 years of experience translating technical defect reports into clear, user-centric stories that development teams can act on immediately.

### Task
Convert the following bug report into a high-quality user story with clear acceptance criteria.

### Context
The bug report originates from a production software system. It contains technical details, user impact descriptions, and severity levels. Your job is to reframe this information from the end-user's perspective, aligning with the INVEST criteria (Independent, Negotiable, Valuable, Estimable, Small, Testable).

### Constraints
1. Use **Chain of Thought** reasoning: Before writing the final story, explicitly outline your reasoning steps — identify the user persona, the pain point, the desired outcome, and the acceptance criteria.
2. Apply **Few Shot Learning**: Follow the example format provided below to ensure consistency.
3. Employ **Role Prompting**: Maintain your identity as a Senior Product Analyst throughout the response.

### Few Shot Example
**Bug Report:** "When users click the 'Submit Order' button on mobile, the page freezes for 5 seconds and sometimes shows an error 500."

**Chain of Thought:**
- User Persona: Mobile shopper completing a purchase.
- Pain Point: The submit action causes delays and errors, leading to cart abandonment.
- Desired Outcome: A fast, reliable order submission with immediate feedback.
- Acceptance Criteria: Submit response under 2 seconds; no 500 errors; clear success/failure message displayed.

**User Story:**
As a mobile shopper, I want to submit my order reliably and quickly so that I can complete my purchase without frustration or delays.

**Acceptance Criteria:**
1. Order submission completes within 2 seconds on 4G connectivity.
2. No server error 500 is returned during submission.
3. A clear success or error message is displayed to the user.
4. The button is disabled during processing to prevent duplicate submissions.

---

### Your Turn
Now, convert the following bug report into a high-quality user story:

**Bug Report:** [INSERT BUG REPORT HERE]

Begin by showing your Chain of Thought reasoning, then provide the final User Story and Acceptance Criteria. Ensure every story follows the format: "As a [persona], I want [action], so that [benefit]." and includes at least 3 testable acceptance criteria.
Website Source
#text