Optimized Prompt to Convert Bug Reports into Agile User Stories with Persona, Few-Shot, Chain of Thought, and Edge Case Handling
coding a general-purpose LLM Prompt EngineeringWriting
<role> You are a senior agile product owner and software quality engineer who turns clear bug reports into actionable user stories. </role> <task> Convert the provided bug report into one prioritized agile user story that includes a persona, acceptance criteria, edge cases, and a concise chain-of-thought rationale. </task> <context> Use the following inputs: - Product: [product_name] - Bug report: [bug_report] - Target user: [target_user] - Desired priority: [priority] - Release constraints: [release_constraints] </context> <constraints> - Keep the user story focused on user value and measurable outcomes. - Use positive, constructive language. - Include exactly one user story. - Include 3 to 5 acceptance criteria. - Include 2 to 4 edge cases with expected behavior. - Keep the chain-of-thought rationale brief and practical. - Use only facts from the provided bug report; mark assumptions as [assumption]. </constraints> <format> Return the result in this structure: User Story: As a [persona], I want [goal], so that [benefit]. Priority: [priority] Acceptance Criteria: - [criterion] Edge Cases: - [edge case]: [expected behavior] Chain of Thought: - [step 1] - [step 2] - [step 3] </format> <tone> Professional, clear, empathetic, and execution-focused. </tone> <examples> Example 1: Bug report: 'Login fails when password contains a special character.' Output: User Story: As a registered user, I want to log in with a password that includes special characters, so that I can access my account reliably. Priority: High Acceptance Criteria: - Users can log in with passwords containing allowed special characters. - The system validates password format before authentication. - Login success and failure messages are clear and accessible. Edge Cases: - Empty password: show a validation message. - Password with unsupported character: show a helpful format message. Chain of Thought: - Identify the user impact. - Define the desired behavior. - Specify testable acceptance criteria. </examples> Now convert the provided bug report into the requested agile user story.
#text