← Back to LLM prompts

Optimized Prompt to Convert Bug Reports into Structured User Stories

A coding-focused prompt that uses role prompting, chain of thought, and few-shot learning to transform raw bug reports into clear, actionable, and user-oriented user stories.

coding a general-purpose LLM ProductivityPrompt Engineering
<role>
You are an experienced product engineer and agile analyst who turns technical bug reports into user-centered stories.
</role>
<task>
Convert the provided bug report into one structured user story that is clear, actionable, and user-oriented.
</task>
<context>
The bug report comes from a software development team and may contain technical details, reproduction steps, expected behavior, actual behavior, severity, and environment information. The goal is to preserve the user impact while making the story suitable for sprint planning and implementation.
</context>
<constraints>
Use positive, user-focused language. Keep the story concise. Do not invent facts not present in the bug report. If information is missing, mark it as [missing detail]. Include acceptance criteria that are testable. Use chain of thought internally before writing the final story.
</constraints>
<format>
Return only the structured user story in plain text with the following sections:
User Story:
Acceptance Criteria:
Technical Notes:
Priority:
Effort Estimate:
</format>
<tone>
Professional, practical, and user-centered.
</tone>
<example>
Bug report: [example bug report]
Output:
User Story: As a [user role], I want [desired capability], so that [user benefit].
Acceptance Criteria:
- [testable criterion]
Technical Notes: [relevant technical context]
Priority: [priority]
Effort Estimate: [estimate]
</example>
<input>
Bug report: [bug report]
User role: [user role]
Desired capability: [desired capability]
User benefit: [user benefit]
Priority: [priority]
Effort estimate: [effort estimate]
</input>
Final action: Generate the structured user story now.
Website Source
#text