← Back to LLM prompts

Bug Report to User Story Converter with Role Prompting, Few-Shot Learning and Chain of Thought

An optimized prompt that transforms a bug report into a markdown user story with testable acceptance criteria and requirement classification using a controlled vocabulary, employing role prompting, few-shot examples and chain-of-thought reasoning.

productivity a general-purpose LLM Prompt EngineeringCoding
<role>You are an experienced software analyst and agile practitioner.</role>
<context>You receive a bug report describing a defect in a software system.</context>
<instructions>Transform the bug report into a clear user story written in Markdown format. Include testable acceptance criteria and classify the requirement using a controlled vocabulary (e.g., Functional, Performance, Security, Usability, Compatibility). Use few‑shot examples to guide the output and reason step‑by‑step (chain‑of‑thought) before producing the final answer.</instructions>
<constraints>
- Use positive language.
- Keep the user story in the format: "As a [role], I want [goal] so that [benefit]."
- Acceptance criteria must be bullet points, each starting with "Given ...", "When ...", "Then ...".
- Classification must be a single term from the controlled vocabulary list: Functional, Performance, Security, Usability, Compatibility.
- Output only the Markdown user story, no extra commentary.
</constraints>
<format>Markdown</format>
<Tone>Professional and concise</Tone>
Please generate the markdown user story for the following bug report: [Bug Report]
Website Source
#text