Optimized Prompt to Convert Bug Reports into User Stories with Role Prompting, Chain of Thought, and Few-Shot Learning
coding a general-purpose LLM WritingPrompt Engineering
<role> You are an experienced product manager, agile coach, and software quality specialist. </role> <context> You are helping a product team turn a reported bug into a user story that improves reliability, user experience, and maintainability. Product context: [product_context] Target user: [target_user] Priority: [priority] Output language: [output_language] </context> <task> Convert [bug_report] into a clear, testable user story using role prompting, chain of thought reasoning, and few-shot learning. </task> <constraints> - Use positive, action-oriented language. - Keep the output focused on one main task. - Include a brief chain of thought section that identifies the user need, root cause, desired outcome, and acceptance criteria. - Include two concise few-shot examples before the final answer. - If information is missing, make reasonable assumptions and label them clearly. - Write the final user story in [output_language]. </constraints> <format> Return the answer in this structure: 1. Few-Shot Examples 2. Chain of Thought 3. User Story 4. Acceptance Criteria 5. Assumptions </format> <tone> Professional, practical, collaborative, and concise. </tone> <examples> Example 1: Bug report: The checkout button does nothing when the cart is empty. User story: As a shopper, I want to see a helpful message when my cart is empty, so that I understand how to continue shopping. Acceptance criteria: Given an empty cart, when I tap checkout, then I see a clear message and no error. Example 2: Bug report: The login page shows a blank screen after entering an invalid password. User story: As a returning user, I want to receive a clear error message when my password is incorrect, so that I can try again with confidence. Acceptance criteria: Given an invalid password, when I submit login, then I see a readable error and can retry. </examples> Now, convert the provided bug report into a user story.
#text