You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"I've found this usage method to be genuinely a bit more user-friendly than the standard one. This brilliant idea came from a pro in the comment section
Usage Instructions and Best Practice Recommendations
Introduction
This template library aims to provide a standardized set of multi-scenario, multi-stage collaboration prompts for the BMAD (Breakthrough Method of Agile AI-driven Development) agent system. By using these templates, teams can leverage AI agents more effectively for collaboration across different development stages, ensuring accuracy in information transfer and consistency in workflow.
Core Principles
Clear Roles: Each prompt clearly specifies the AI agent role and its responsibilities for the current stage.
Context Passing: By referencing the output from the previous stage, AI agents can quickly understand the background and context of the current task in a new conversation window.
Independent Launch: Each stage's prompt is designed to be launched independently in a new conversation window, simulating this process by explicitly instructing "Clear and Reset Context".
Clear Objectives: Each prompt includes specific deliverable requirements and format specifications to ensure the AI agent's output meets expectations.
Collaboration Guidance: Prompts include guiding statements for collaboration between roles to promote effective communication and information synchronization among AI agents.
Best Practices
Start New Conversation: Strictly follow the "--- Clear and Reset Context ---" instruction in the templates to start a new conversation window for each new stage. This helps the AI model avoid interference from previous conversations and focus more on the current task.
Provide Complete Input: When launching the prompt for a new stage, be sure to replace the placeholder text (like "[PRD document content]") with the actual output from the previous stage (e.g., the complete content of the PRD document, analysis report). The more complete the context provided, the better the AI agent's performance.
Customization: While the templates provide a standard structure, you can fine-tune the prompts based on specific project needs and the characteristics of the AI agents.
Iterative Feedback: Collaborating with AI agents is an iterative process. If the initial output doesn't fully meet expectations, provide clear feedback and guide them to make corrections.
Document Output: Ensure that the deliverables for each stage are saved and managed in the required format for easy referencing in subsequent stages.
Understand Agent Capabilities: Familiarize yourself with the specific capabilities and configuration files (agent-config.txt) of the BMAD agents you are using (such as Mary, John, Fred, Sarah, Bob, etc.) to guide them more effectively.
Scenario 1: New Feature Development
Stage 1: Requirements Analysis and Initial Definition
Role Combination: Analyst Mary + Product Manager John
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Analyst Mary**, and then as **Product Manager John**, to jointly complete the initial requirements analysis and definition for a new feature.
**Background**:
A user has proposed a new feature requirement.
**Your Tasks**:
**As Analyst Mary**:
1. **Requirement Elicitation**:
* Simulate an in-depth conversation with the user, asking at least 5 key questions to fully understand the user's expectations for the new feature, target users, core value, and main usage scenarios.
* Record the simulated user responses.
2. **Initial Analysis**:
* Based on the conversation above, conduct initial market research and competitor analysis (briefly describe the analysis direction and key findings).
* Identify potential technical risks and dependencies.
3. **Deliverable (Analyst Mary)**:
* A concise **"New Feature Initial Analysis Report"** (Markdown format), including:
* User Requirement Overview (based on simulated Q&A)
* Target User Persona (preliminary)
* Core Value Proposition
* Description of Main Usage Scenarios
* Summary of Initial Market and Competitor Observations
* Identified Potential Risks and Dependencies
---
**(After Mary completes the above tasks, continue)**
---
**As Product Manager John**:
1. **Receive and Deepen**:
* You have received the **"New Feature Initial Analysis Report"** output by **Analyst Mary**.
* Based on this report, and combined with your product understanding, further clarify the core scope and boundaries of the new feature.
2. **Drafting the Initial PRD**:
* Draft an **"New Feature Product Requirements Document (PRD) Draft"** (Markdown format).
* **The PRD draft should include at least the following sections**:
* **1. Introduction**:
* 1.1 Project Background and Goals
* 1.2 Problem Solved
* 1.3 Target Users
* **2. Functional Scope**:
* 2.1 List of Core Functional Points (MVP scope)
* 2.2 Feature Priority (High/Medium/Low)
* 2.3 Explicitly Excluded Features
* **3. User Stories (at least 3)**:
* Format: "As a [user role], I want to [action], so that [goal/value]"
* Each user story must include preliminary acceptance criteria.
* **4. Success Metrics (Preliminary)**:
* List at least 2 key metrics to measure the success of the new feature.
3. **Collaboration Guidance**:
* Clearly indicate in the PRD draft the technical feasibility questions that need to be discussed with **Architect Fred** in the next stage.
4. **Deliverable (Product Manager John)**:
* A **"New Feature Product Requirements Document (PRD) Draft"** (Markdown format).
**Please complete the tasks for Analyst Mary and Product Manager John sequentially.**
Stage 2: Technical Solution Design and Evaluation
Role Combination: Architect Fred (+ potentially Design Architect Jane, if complex UI is involved)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Architect Fred**. If the new feature involves complex user interface or interaction design, please also consider the perspective and input of **Design Architect Jane** (you can simulate Jane's input or point out parts that require her involvement).
**Background**:
You have received the **"New Feature Product Requirements Document (PRD) Draft"** planned by **Product Manager John**.
**Input Materials (Please paste the complete content of the PRD draft here)**:
[Paste the complete content of the New Feature Product Requirements Document (PRD) Draft here]
**Your Tasks (Architect Fred)**:
1. **PRD Interpretation and Technical Inquiry**:
* Carefully read the PRD draft, especially the technical feasibility questions raised by John.
* For each core functional point and user story in the PRD, raise at least 2 key clarifying questions or potential technical challenges from a technical perspective.
2. **Technical Solution Design**:
* Based on the PRD draft, design a preliminary technical implementation solution. The solution should include:
* Recommended technology stack (language, framework, key libraries, etc.) and reasons.
* System architecture diagram (can use text description in Mermaid syntax, such as flowcharts, component diagrams).
* Key module/component division and their main responsibilities.
* Preliminary data model design (attributes and relationships of key entities).
* Preliminary API interface definition (request/response format and purpose of key interfaces).
3. **Technical Evaluation**:
* Evaluate the feasibility, scalability, security, and performance of the selected technical solution.
* Identify potential technical bottlenecks and risks.
* Estimate the approximate development effort (high-level, such as T-shirt sizing S/M/L, or person/day range).
4. **(Optional, if complex UI is involved) Design Architect Jane's Perspective**:
* If the feature involves complex UI/UX, indicate which parts require **Design Architect Jane** to define detailed UI/UX specifications and frontend architecture design. List the key issues or modules that Jane needs to focus on.
5. **Collaboration Guidance**:
* In the technical solution, clearly indicate suggestions for task breakdown and prioritization that need to be discussed with **Product Owner Sarah** in the next stage.
* For parts of the PRD draft that are unclear or technically difficult to implement, provide modification suggestions to **Product Manager John**.
6. **Deliverables**:
* A **"New Feature Technical Solution and Evaluation Report"** (Markdown format), including:
* List of PRD technical inquiry points
* Recommended technology stack and reasons
* System architecture diagram (Mermaid or other text description)
* Key module/component description
* Preliminary data model design
* Preliminary API interface definition
* Technical evaluation (feasibility, risks, effort estimation)
* (Optional) Request for input from Design Architect Jane
* Suggestions for Product Manager John regarding PRD modifications
* Suggestions for Product Owner Sarah regarding task breakdown
**Please begin your work.**
Stage 3: Task Breakdown and Implementation Planning
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Product Owner Sarah**. When breaking down tasks, fully consider testing requirements to ensure each story has good testability.
**Background**:
You have received the **"New Feature Technical Solution and Evaluation Report"** output by **Architect Fred** and the revised **"New Feature Product Requirements Document (PRD)"** from **Product Manager John**.
**Input Materials**:
1. **"New Feature Technical Solution and Evaluation Report" (Please paste the complete content here)**:
```
[Paste the complete content of the New Feature Technical Solution and Evaluation Report here]
```
2. **"New Feature Product Requirements Document (PRD) Revised Version" (Please paste the complete content here)**:
```
[Paste the complete content of the New Feature Product Requirements Document (PRD) Revised Version here]
```
**Your Tasks (Product Owner Sarah)**:
1. **Understand and Align**:
* Carefully read the revised PRD and the technical solution report to ensure a complete understanding of the functional requirements and technical implementation path.
* Pay special attention to Architect Fred's suggestions for task breakdown.
2. **Epic Definition and Breakdown (if not clear in PRD)**:
* If the functional points in the PRD are large, organize them into 1-2 clear Epics.
* Each Epic should have clear goals and scope.
3. **User Story Splitting**:
* Further refine the core functional points and user stories (or Epics) from the PRD into smaller, independently developable and testable User Stories.
* The goal is for each Story to be completable within a short iteration.
* **Ensure each User Story follows the INVEST principles (Independent, Negotiable, Valuable, Estimable, Small, Testable).**
4. **Write Detailed Information for Each User Story**:
* **Story Description**: A clear user story statement.
* **Acceptance Criteria (ACs)**:
* Write at least 3-5 specific, measurable, and testable acceptance criteria for each Story.
* ACs should cover normal flows, boundary conditions, and error handling.
* **From a testing perspective, think about how to verify each AC.**
* **Technical Notes (Optional)**: Reference relevant parts of the technical solution or add technical tips needed for development.
* **Dependencies**: Indicate the dependencies of this Story on other Stories.
* **Preliminary Priority**: Set a preliminary priority for each Story (e.g., High/Medium/Low, or MoSCoW).
5. **Collaboration Guidance**:
* Prepare a clear task list (i.e., User Story list) for **Scrum Master Bob** and **Developer Roles** for the next stage of work.
* Highlight any integration points or complex modules in the Stories that require special attention.
6. **Deliverables**:
* A **"New Feature User Story List and Initial Implementation Plan"** (Markdown format), including:
* (Optional) Epic list and their goals
* Detailed User Story list, with each Story including:
* ID (e.g., US001)
* Story Description
* Acceptance Criteria (ACs)
* Technical Notes (Optional)
* Dependencies
* Preliminary Priority
* Implementation notes and points of attention for the development team.
**Please begin your work.**
Stage 4: Development Implementation and Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Scrum Master Bob**, and then as a **Developer Role** (you can specify a specific technology stack, such as Python Developer, Java Developer, etc., or act as a general developer), to jointly complete the implementation and verification of User Stories.
**Background**:
You have received the **"New Feature User Story List and Initial Implementation Plan"** output by **Product Owner Sarah**. Assume that after the Sprint planning meeting, some high-priority User Stories have been selected for this iteration's development.
**Input Materials (Please paste the complete content of the selected User Story list and their details here)**:
[Paste the complete content of the User Story list selected for this iteration, including ID, Story Description, Acceptance Criteria, Technical Notes, Dependencies, Priority, etc.]
**Your Tasks**:
**As Scrum Master Bob**:
1. **Iteration Preparation and Clarification**:
* Check the selected User Story list to ensure all prerequisites are met.
* For the first 1-2 high-priority Stories in the list, simulate a brief requirement clarification with the development team (i.e., "Developer Role"), identify and record potential questions or obstacles.
2. **Task Assignment and Tracking Simulation**:
* Assign the clarified Stories to the "Developer Role".
* Briefly describe how you will track the development progress of these Stories (e.g., through daily stand-ups, task board updates, etc.).
3. **Collaboration Guidance (to Developer Role)**:
* Remind the developer to strictly adhere to coding standards, perform unit testing during development, and prepare for code review and feature demonstration upon completion.
* Emphasize the importance of maintaining communication with Product Owner Sarah regarding requirement details.
---
**(After Bob completes the above tasks, continue)**
---
**As Developer Role (Please adopt the perspective of a specific developer, e.g., "Python Backend Developer")**:
1. **Story Implementation**:
* Choose the first User Story assigned by **Scrum Master Bob**.
* **Describe your implementation approach in detail**:
* Which files/classes/modules need to be modified or created?
* What is the logic of the key functions/methods?
* How will data persistence be handled (if applicable)?
* How will interaction with external services or APIs be handled (if applicable)?
* **Write pseudocode or key code snippets** to demonstrate the core implementation logic.
* **Describe how you will perform unit testing**, including the main test cases.
2. **Issues and Communication**:
* If you encounter any unclear requirements or technical difficulties during implementation, record them and explain how you will communicate with **Scrum Master Bob** or **Product Owner Sarah**.
3. **Completion and Handover for Testing**:
* Assume you have completed the development and unit testing for this User Story.
* Describe how you will submit the code (e.g., git commit message conventions), initiate a code review request, and notify the testers (or PO Sarah) for functional verification.
4. **Deliverable (Developer Role, for the selected User Story)**:
* A **"User Story [ID] Development Implementation Report"** (Markdown format), including:
* Implementation approach overview
* List of involved files/modules
* Pseudocode or code snippets of core logic
* Unit testing strategy and main test cases
* Issues encountered during development and communication plan (if any)
* Code submission and handover for testing instructions
**Please have Scrum Master Bob complete their tasks first, and then the Developer Role complete their task for one User Story.**
Scenario 2: Existing Feature Modification
Stage 1: Requirements Analysis and Impact Assessment
Role Combination: Analyst Mary + Product Manager John
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Analyst Mary**, and then as **Product Manager John**, to jointly complete the requirements analysis and impact assessment for modifying an existing feature.
**Background**:
A user has requested a modification to an existing feature [Please fill in the specific feature name, e.g., "User Profile Editing Function"]. The core need for the modification is [Please fill in the core need for the modification, e.g., "Add a 'Profession' field for users to fill in, and allow users to select privacy levels"].
**Your Tasks**:
**As Analyst Mary**:
1. **Requirement Clarification and Detail Elicitation**:
* Based on the user's modification request, simulate communication with the user to delve into the specific details of the modification, expected behavior changes, and the motivation and desired value brought by the modification. Ask at least 3 key clarifying questions.
* Record the simulated user responses.
2. **Preliminary Scope of Impact Assessment**:
* Analyze the system modules, user interface, data structure, and upstream/downstream dependent functions that this modification might involve.
* Make a preliminary judgment on the potential impact of the modification on existing user usage habits and system performance.
3. **Deliverable (Analyst Mary)**:
* A concise **"Existing Feature Modification Preliminary Analysis Report"** (Markdown format), including:
* Detailed description of the modification requirement (based on simulated Q&A)
* Motivation and expected value of the modification
* Preliminary assessed scope of impact (modules, UI, data, dependencies, etc.)
* Potential user experience and performance impact points
---
**(After Mary completes the above tasks, continue)**
---
**As Product Manager John**:
1. **Receive Analysis and Clarify Scope**:
* You have received the **"Existing Feature Modification Preliminary Analysis Report"** output by **Analyst Mary**.
* Combine this with existing product documentation (assume it exists) and your product understanding to further clarify the detailed scope and acceptance criteria of the modification.
2. **Update/Create PRD Fragment**:
* Update the relevant PRD document (or create a separate modification requirement document) for this modification.
* **The PRD update/fragment should include at least**:
* **1. Modification Background and Goals**: Briefly describe the reason for the modification and the desired outcome.
* **2. Detailed Modification Scope**:
* Clearly list the specific functional points that need to be modified.
* Describe the behavior comparison before and after the modification.
* **3. Affected User Stories (Updated or New)**:
* Provide at least 1-2 affected or new user stories, clearly stating their acceptance criteria.
* **4. Data Model Changes (if any)**: Describe the changes in data structure due to the modification.
* **5. UI/UX Change Description (if any)**: Briefly describe the addition, deletion, or modification of UI elements.
3. **Collaboration Guidance**:
* In the PRD update/fragment, clearly indicate the key points that need to be evaluated with **Architect Fred** in the next stage regarding technical implementation solutions and potential risks.
4. **Deliverable (Product Manager John)**:
* An updated **"PRD (Feature Modification Section)"** or a separate **"Feature Modification Requirement Document"** (Markdown format).
**Please complete the tasks for Analyst Mary and Product Manager John sequentially.**
Stage 2: Technical Solution Design and Risk Assessment
Role Combination: Architect Fred (+ potentially Design Architect Jane)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Architect Fred**. If the feature modification involves significant user interface or interaction changes, please also consider the perspective and input of **Design Architect Jane**.
**Background**:
You have received the **"PRD (Feature Modification Section)"** or **"Feature Modification Requirement Document"** provided by **Product Manager John**.
**Input Materials (Please paste the complete content of the relevant document here)**:
[Paste the complete content of the PRD (Feature Modification Section) or Feature Modification Requirement Document here]
**Your Tasks (Architect Fred)**:
1. **Requirement Interpretation and Technical Impact Analysis**:
* Carefully read the modification requirement document to understand the business logic and user experience goals of the changes.
* Analyze the specific impact of the modification on the existing system architecture, modules, data tables, and API interfaces.
* Assess the complexity of the modification and potential technical risks (e.g., compatibility issues, data migration risks, performance impact, etc.).
2. **Technical Implementation Solution**:
* Design a specific technical implementation solution for the modification requirement. Including:
* Which existing code modules/files need to be modified?
* Are new modules or services needed?
* How should the data structure be adjusted? Is a data migration script needed?
* Do API interfaces need to be modified or added? Please define the change details.
* How to ensure backward compatibility of the modification (if needed)?
3. **Regression Test Scope Recommendation**:
* Based on the scope of impact of the modification, recommend key functional modules and scenarios that require regression testing.
4. **(Optional, if complex UI changes are involved) Design Architect Jane's Perspective**:
* If the modification involves complex UI/UX changes, indicate which parts require **Design Architect Jane** to provide detailed UI/UX design updates or frontend implementation guidance.
5. **Collaboration Guidance**:
* Provide clear technical implementation steps and key risk points to **Product Owner Sarah** for subsequent task breakdown.
* If the technical solution conflicts with the original PRD or offers a better implementation, provide feedback to **Product Manager John**.
6. **Deliverables**:
* A **"Feature Modification Technical Solution and Risk Assessment Report"** (Markdown format), including:
* Technical impact analysis of the requirement (architecture, modules, data, API, etc.)
* Detailed technical implementation solution
* Potential technical risks and mitigation suggestions
* Regression test scope recommendation
* (Optional) Request for input from Design Architect Jane
* Input for Product Owner Sarah's task breakdown
* Feedback for Product Manager John (if any)
**Please begin your work.**
Stage 3: Task Formulation and Verification Case Design
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Product Owner Sarah**. Please focus on refining the modification tasks and ensuring each sub-task has clear testing verification points.
**Background**:
You have received the **"Feature Modification Technical Solution and Risk Assessment Report"** output by **Architect Fred** and the adjusted **"PRD (Feature Modification Section)"** or **"Feature Modification Requirement Document"** from **Product Manager John**.
**Input Materials**:
1. **"Feature Modification Technical Solution and Risk Assessment Report" (Please paste the complete content here)**:
```
[Paste the complete content of the Feature Modification Technical Solution and Risk Assessment Report here]
```
2. **"PRD (Feature Modification Section)" or "Feature Modification Requirement Document" Adjusted Version (Please paste the complete content here)**:
```
[Paste the complete content of the relevant PRD or requirement document adjusted version here]
```
**Your Tasks (Product Owner Sarah)**:
1. **Task Refinement and Breakdown**:
* Based on the technical solution report and PRD, break down the feature modification task into smaller, manageable development sub-tasks or User Stories.
* Each sub-task/Story should have clear goals and scope.
* Consider different layers of the modification: e.g., backend logic modification, API changes, database structure adjustments, frontend UI adjustments, etc.
2. **Write Detailed Information for Each Sub-task/User Story**:
* **Task/Story Description**: Clearly state the specific work to be completed for this sub-task/Story.
* **Acceptance Criteria (ACs)**:
* Write specific acceptance criteria for each sub-task/Story, ensuring coverage of the modification points.
* **Pay special attention to the behavior comparison before and after the modification, and how to verify the correctness of the modification.**
* Include relevant verification points within the regression test scope recommended by the architect.
* Include at least 3-5 ACs.
* **Key Technical Implementation Points**: Reference relevant implementation details or risk warnings from the technical solution.
* **Dependencies**: Indicate the execution order or dependencies between sub-tasks/Stories.
3. **Test Verification Planning**:
* For the ACs of each sub-task/Story, think about and briefly describe the key test cases or verification methods.
* Clearly state the types of testing that need to be prioritized for this modification (e.g., unit testing, integration testing, UI automation testing, manual regression testing, etc.).
4. **Collaboration Guidance**:
* Prepare a clear, prioritized list of sub-tasks/User Stories for **Scrum Master Bob** and **Developer Roles**.
* Highlight modification points that have a significant impact on the existing system or are high-risk.
5. **Deliverables**:
* A **"Feature Modification Task Breakdown and Test Plan"** (Markdown format), including:
* Detailed list of sub-tasks/User Stories, each including:
* ID
* Description
* Acceptance Criteria (ACs)
* Key Technical Implementation Points
* Dependencies
* Preliminary Priority
* Summary of key test cases/verification methods
* Suggested test types and focus areas
* Execution instructions and risk warnings for the development team.
**Please begin your work.**
Stage 4: Modification Implementation and Regression Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Scrum Master Bob**, and then as a **Developer Role** (you can specify a technology stack), to jointly complete the implementation and verification of the feature modification.
**Background**:
You have received the **"Feature Modification Task Breakdown and Test Plan"** output by **Product Owner Sarah**, which includes the modification sub-tasks/User Stories and detailed test cases.
**Input Materials (Please paste the complete content of the selected sub-task/User Story list and their details here)**:
[Paste the complete content of the sub-task/User Story list selected for this iteration, including ID, Description, Acceptance Criteria, Key Technical Implementation Points, Dependencies, etc.]
**Your Tasks**:
**As Scrum Master Bob**:
1. **Iteration Preparation and Risk Review**:
* Check the selected sub-task/User Story list and confirm that the key risk points from the technical solution have been fully understood.
* For the first high-priority task in the list, quickly review its implementation details and ACs with the "Developer Role".
2. **Change Management and Communication Coordination**:
* Briefly explain how you will coordinate communication among the team during this modification process, especially when unexpected impacts are found or adjustments to the plan are needed.
3. **Collaboration Guidance (to Developer Role)**:
* Remind the developer to be cautious when modifying existing code and fully understand the original logic.
* Emphasize self-testing according to the test points planned by Sarah and covering the regression test scope recommended by the architect.
* Upon completion, rigorous code review is required, and the developer should prepare to demonstrate the modification results to PO Sarah or the testing team for verification.
---
**(After Bob completes the above tasks, continue)**
---
**As Developer Role (Please adopt the perspective of a specific developer, e.g., "Java Backend Developer")**:
1. **Modification Implementation**:
* Based on Architect Fred's technical solution and the User Story/Task description, **describe in detail how you will modify the code or configuration to fix this Bug**.
* Locate the specific code files and line numbers (if possible).
* Show key code snippets before and after the modification (pseudocode or actual code snippets are acceptable).
* Explain the modification logic.
2. **Unit Testing (if applicable)**:
* If the module involved in the fix has unit tests, describe how you will update or add unit test cases to cover the logic of the fix.
3. **Execute Verification Cases (Self-Testing)**:
* **Execute all test cases provided by Product Owner Sarah one by one.**
* For each test case, record:
* **Case ID**
* **Brief description of steps executed**
* **Actual Result**
* **Pass/Fail (Yes/No)**
* If any test case fails, analyze the reason and explain how you will adjust the fix solution.
4. **Fix Summary and Handover for Testing**:
* Assume you have completed the modification and necessary testing for this sub-task/User Story.
* Summarize the key points of this fix and the verification results.
* Describe your process for submitting code (commit message should clearly state the modification content), initiating code review, and notifying relevant personnel for the next step of verification.
5. **Deliverable (Developer Role, for the selected sub-task/User Story)**:
* A **"Feature Modification [ID] Implementation and Self-Testing Verification Report"** (Markdown format), including:
* Detailed description of the modification implementation (code modification points, logic explanation)
* Key code snippets showing before and after modification (can show diff)
* Unit/integration testing strategy and main test cases (especially for modification points and regression points)
* Issues encountered during development and collaboration plan (if any)
* Code submission and handover for testing instructions
**Please have Scrum Master Bob complete their tasks first, and then the Developer Role complete their task for one sub-task/User Story.**
Scenario 3: Bug Fixing and Problem Diagnosis
Stage 1: Problem Reproduction and Initial Diagnosis
Role Combination: Analyst Mary + Product Manager John (or Technical Support Role)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Analyst Mary** (can be understood as the initial analysis perspective of Technical Support or QA), and then as **Product Manager John** (responsible for assessing the Bug's impact and priority).
**Background**:
A user has reported a Bug.
**Bug Report Information**:
* **Bug Description**: [Please paste the user's description of the Bug phenomenon here, e.g., "When a user uploads an avatar exceeding 5MB, the page crashes with an 'Unknown Error' message."]
* **Reproduction Steps (Provided by User)**: [Please paste the reproduction steps provided by the user here, e.g., "1. Go to the profile page; 2. Click the upload avatar button; 3. Select an image file larger than 5MB; 4. Click confirm upload."]
* **Expected Result**: [Please paste the correct result expected by the user here, e.g., "The system should prompt that the image is too large, rather than crashing."]
* **Actual Result**: [Please paste the actual incorrect result that occurred here, e.g., "White page, URL has error=true parameter appended, no obvious error logs in the console."]
* **Environment (if available)**: [e.g., Latest version of Chrome browser, Windows 11 system]
**Your Tasks**:
**As Analyst Mary (or Technical Support/QA)**:
1. **Problem Reproduction and Information Gathering**:
* Strictly follow the steps provided by the user to attempt to reproduce the Bug. **Please record your reproduction process and observed phenomena in detail**, even if slightly different from the user's description.
* If you can reproduce it, collect as much auxiliary diagnostic information as possible, such as:
* Console error logs from browser developer tools (specific error messages).
* Network request status (any failed requests, request parameters, and response content).
* Logs from related backend services (if accessible or can be simulated).
* If you cannot reproduce it, analyze the possible reasons (e.g., inconsistent environment, misunderstanding of steps, etc.) and propose further questions to clarify with the user.
2. **Preliminary Diagnosis and Root Cause Guess**:
* Based on the reproduction results and collected information, make a preliminary guess about the possible root cause of the Bug (e.g., missing frontend validation, backend interface processing large files abnormally, server configuration limits, etc.).
* Analyze the functional scope that this Bug might affect.
3. **Deliverable (Analyst Mary)**:
* A concise **"Bug Preliminary Diagnosis Report"** (Markdown format), including:
* Bug ID (can be self-assigned, e.g., BUG-001)
* Detailed reproduction process and observed phenomena
* Collected auxiliary diagnostic information (log summary, key network request information, etc.)
* (If unable to reproduce) Analysis of inability to reproduce and questions for the user
* Preliminary root cause guess
* Preliminary assessed scope of impact
---
**(After Mary completes the above tasks, continue)**
---
**As Product Manager John**:
1. **Assess Bug Impact and Priority**:
* You have received the **"Bug Preliminary Diagnosis Report"** output by **Analyst Mary**.
* Based on your understanding of the product and user importance, assess the severity of this Bug (e.g., Critical/Major/Minor/Trivial) and the repair priority (e.g., High/Medium/Low). Please explain the reasons for your assessment.
* Consider the Bug's impact on user experience, data accuracy, and system stability.
2. **Requirement Clarification (if behavior change is involved)**:
* If fixing the Bug involves not just restoring the original correct behavior, but also a minor adjustment or optimization of the product behavior (e.g., adding a more user-friendly error message), briefly describe these adjustments.
3. **Collaboration Guidance**:
* Provide clear problem description and priority information to **Architect Fred** for technical solution design in the next stage.
* Indicate whether the architect needs to pay special attention to certain technical details (e.g., best practices for handling large files).
4. **Deliverable (Product Manager John)**:
* A **"Bug Fix Requirement and Priority Assessment"** (Markdown format), including:
* Bug ID (consistent with Mary's report)
* Bug severity assessment and reasons
* Bug fix priority assessment and reasons
* (If applicable) Description of expected product behavior adjustments after fixing
* Guidance for Architect Fred's technical analysis
**Please complete the tasks for Analyst Mary and Product Manager John sequentially.**
Stage 2: Technical Root Cause Analysis and Fix Solution Design
Role Combination: Architect Fred (+ potentially relevant specialized developers)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Architect Fred**. If necessary, you can assume collaboration and discussion with a developer familiar with the relevant module (e.g., "Backend Java Developer" or "Frontend React Developer").
**Background**:
You have received the **"Bug Preliminary Diagnosis Report"** from **Analyst Mary** and the **"Bug Fix Requirement and Priority Assessment"** from **Product Manager John**.
**Input Materials**:
1. **"Bug Preliminary Diagnosis Report" (Please paste the complete content here)**:
```
[Paste the complete content of the Bug Preliminary Diagnosis Report here]
```
2. **"Bug Fix Requirement and Priority Assessment" (Please paste the complete content here)**:
```
[Paste the complete content of the Bug Fix Requirement and Priority Assessment here]
```
**Your Tasks (Architect Fred)**:
1. **In-depth Technical Root Cause Analysis**:
* Based on Mary's preliminary diagnosis and John's assessment, conduct a more in-depth technical analysis to pinpoint the root cause of the Bug.
* Aspects you might need to analyze include:
* Logic of relevant code modules (assume you can review them).
* Database queries or operations.
* API interface implementation.
* Behavior of third-party libraries or services.
* System configuration or environment variables.
* **Please describe your analysis process and reasoning in detail, and finally determine the technical root cause.**
2. **Design Fix Solution**:
* Based on the identified root cause, design a specific code-level or configuration-level fix solution.
* The solution should clarify:
* Which files/modules/configurations need to be modified?
* What are the specific modification contents? (Can use pseudocode or clear text to describe the modification logic).
* How to ensure the fix solution does not introduce new issues (e.g., consider boundary conditions, error handling)?
3. **Evaluate Fix Solution**:
* Evaluate the complexity, risks (e.g., impact on other functionalities), and estimated effort of the fix solution.
* Confirm whether the fix solution aligns with the expected product behavior after fixing as proposed by Product Manager John (if applicable).
4. **Verification Method Suggestions**:
* Propose specific methods and test scenarios for verifying that the Bug has been fixed (in addition to the user's original reproduction steps, consider which other related scenarios also need testing).
5. **Collaboration Guidance**:
* Provide clear fix solution details and verification points to **Product Owner Sarah** for task breakdown and test case design in the next stage.
* If the fix solution is complex or has multiple options, you can list alternative solutions and their pros and cons for Sarah's reference.
6. **Deliverables**:
* A **"Bug Technical Root Cause Analysis and Fix Solution"** (Markdown format), including:
* Bug ID
* Detailed technical root cause analysis process and conclusion
* Specific fix solution (detailed code/configuration modifications)
* Fix solution evaluation (complexity, risks, effort estimation)
* Fix verification methods and suggested test scenarios
* Input for Product Owner Sarah (fix details, verification points)
**Please begin your work.**
Stage 3: Fix Task Formulation and Verification Case Design
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Product Owner Sarah**. Your main task is to transform the Bug fixing work into clear development tasks based on the architect's analysis, and design detailed verification cases.
**Background**:
You have received the **"Bug Technical Root Cause Analysis and Fix Solution"** output by **Architect Fred**.
**Input Materials (Please paste the complete content of the "Bug Technical Root Cause Analysis and Fix Solution" here)**:
[Paste the complete content of the Bug Technical Root Cause Analysis and Fix Solution here]
**Your Tasks (Product Owner Sarah)**:
1. **Understand Fix Solution and Verification Points**:
* Carefully read Architect Fred's report to ensure a complete understanding of the Bug's root cause, fix solution, and suggested verification methods.
2. **Create Bug Fix User Story/Task**:
* Create one or more clear User Stories or technical tasks for this Bug fix.
* **Story/Task Description**: Clearly describe the specific work the developer needs to complete for the fix, referencing key points from the architect's solution.
* **Acceptance Criteria (ACs)**:
* **Core AC**: The Bug phenomenon is no longer reproducible, and the behavior conforms to the expected behavior defined by Product Manager John.
* Based on the architect's fix solution and verification suggestions, write other specific, testable ACs to ensure the fix is thorough and has no side effects. For example: "Uploading an avatar image less than or equal to 5MB is successful", "When uploading an image larger than 5MB, the frontend provides a clear message 'File too large, please upload an image within XMB', and the page does not crash", "Related error logs no longer appear", etc.
* Include at least 3-5 ACs.
3. **Design Detailed Test/Verification Cases**:
* Based on the ACs of the User Story/Task and the architect's verification suggestions, design a set of detailed test cases.
* Each test case should include:
* **Case ID** (e.g., TC-BUG-001-01)
* **Preconditions**
* **Steps to Reproduce** (should cover the original reproduction steps and other relevant scenarios)
* **Expected Result** (corresponding to the ACs)
* **Actual Result** (leave blank to be filled after testing)
* **Pass/Fail** (leave blank to be filled after testing)
* Ensure the test cases cover the fix points, boundary conditions, and potentially affected related functional areas (regression points).
4. **Collaboration Guidance**:
* Provide clear Bug fix User Story/Task to **Scrum Master Bob** and **Developer Roles**, along with detailed test cases.
* Emphasize that after fixing, verification must strictly follow the test cases.
5. **Deliverables**:
* A **"Bug Fix Task and Verification Plan"** (Markdown format), including:
* Detailed information of the Bug fix User Story/Task (ID, Description, ACs)
* Detailed list of test cases (each case including ID, Preconditions, Steps to Reproduce, Expected Result)
* Execution instructions for the development and testing teams.
**Please begin your work.**
Stage 4: Fix Implementation and Verification Execution
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Scrum Master Bob**, and then as a **Developer Role** (you can specify a technology stack), to jointly complete the implementation and verification of the Bug fix.
**Background**:
You have received the **"Bug Fix Task and Verification Plan"** output by **Product Owner Sarah**, which includes the Bug fix User Story/Task and detailed test cases.
**Input Materials (Please paste the complete content of the Bug fix User Story/Task and test cases here)**:
[Paste the complete content of the Bug fix User Story/Task and test cases here]
**Your Tasks**:
**As Scrum Master Bob**:
1. **Task Assignment and Prerequisite Check**:
* Assign the Bug fix User Story/Task to the "Developer Role".
* Quickly review Architect Fred's "Bug Technical Root Cause Analysis and Fix Solution" with the "Developer Role" (assume Bob can access it or the developer has fully understood it) to ensure the fix direction is clear.
2. **Verification Process Emphasis**:
* Emphasize to the "Developer Role" that after the fix is completed, they must strictly follow all test cases provided by Sarah for self-testing verification.
* Explain that after code review (CR) is passed, PO Sarah or a dedicated tester will be arranged for final regression verification.
3. **Collaboration Guidance (to Developer Role)**:
* Remind the developer to pay attention to code quality and comments during the fixing process, and ensure the fix does not introduce new regressions.
* Encourage the developer to communicate promptly if they encounter any questions.
---
**(After Bob completes the above tasks, continue)**
---
**As Developer Role (Please adopt the perspective of a specific developer, e.g., "Frontend JavaScript Developer")**:
1. **Bug Fix Implementation**:
* Based on Architect Fred's fix solution and the User Story/Task description, **describe in detail how you will modify the code or configuration to fix this Bug**.
* Locate the specific code files and line numbers (if possible).
* Show key code snippets before and after the modification (pseudocode or actual code snippets are acceptable).
* Explain the modification logic.
2. **Unit Testing (if applicable)**:
* If the module involved in the fix has unit tests, describe how you will update or add unit test cases to cover the logic of the fix.
3. **Execute Verification Cases (Self-Testing)**:
* **Strictly execute all test cases provided by Product Owner Sarah.**
* For each test case, record:
* **Case ID**
* **Brief description of steps executed**
* **Actual Result**
* **Pass/Fail (Yes/No)**
* If any test case fails, analyze the reason and explain how you will adjust the fix solution.
4. **Fix Summary and Handover for Testing**:
* Assume you have completed the modification and necessary testing for this sub-task/User Story.
* Summarize the key points of this fix and the verification results.
* Describe your process for submitting code (commit message should include Bug ID and fix description), initiating code review, and notifying relevant personnel for the next step of verification.
5. **Deliverable (Developer Role)**:
* A **"Bug [ID] Fix Implementation and Self-Testing Verification Report"** (Markdown format), including:
* Detailed description of the fix solution implementation (code modification points, logic explanation)
* (If applicable) Unit test updates description
* Record of execution results for all test cases (ID, Brief steps executed, Actual Result, Pass/Fail)
* Fix summary and handover for testing instructions
**Please have Scrum Master Bob complete their tasks first, and then the Developer Role complete their task.**
Scenario 4: Performance Optimization
Stage 1: Performance Bottleneck Analysis and Metric Definition
Role Combination: Analyst Mary + Architect Fred
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Analyst Mary** (responsible for data collection and preliminary analysis), and then as **Architect Fred** (responsible for technical diagnosis and metric setting).
**Background**:
The system/feature [Please fill in the specific system or feature name, e.g., "Product Search API" or "Order List Page Loading"] is experiencing performance issues, and users report [Please fill in the specific user feedback, e.g., "Search results are too slow, averaging over 5 seconds" or "Order list scrolling is very laggy"].
**Your Tasks**:
**As Analyst Mary**:
1. **Performance Issue Phenomenon Collection and Quantification**:
* If performance monitoring data is already available (e.g., from APM tools, log analysis), organize key metrics (e.g., average response time, P95 response time, error rate, CPU/memory usage, etc.) to quantify the current performance.
* If direct monitoring data is not available, design a preliminary plan for collecting performance data (e.g., recording loading times using browser developer tools, using stress testing tools for benchmarking, etc.). **Simulate executing this plan and record key data.**
* Communicate with users (or the product manager) to clarify their specific performance expectations or acceptable performance thresholds.
2. **Preliminary Bottleneck Identification**:
* Based on the collected data and user feedback, make preliminary guesses about possible performance bottlenecks (e.g., slow database queries, third-party interface latency, inefficient frontend rendering, insufficient server resources, etc.).
3. **Deliverable (Analyst Mary)**:
* A **"Performance Issue Preliminary Analysis and Data Report"** (Markdown format), including:
* Performance issue description and summary of user feedback
* Key quantitative data on current performance
* (If no monitoring data) Simulated data collection plan and results
* User/Product Manager's performance expectations
* List of preliminary performance bottleneck guesses
---
**(After Mary completes the above tasks, continue)**
---
**As Architect Fred**:
1. **Technical Diagnosis and Bottleneck Confirmation**:
* You have received the **"Performance Issue Preliminary Analysis and Data Report"** output by **Analyst Mary**.
* Combine this with your understanding of the system architecture to conduct an in-depth technical analysis of the bottleneck points raised by Mary.
* Aspects you might need to consider: code logic, algorithm efficiency, database indexing, caching strategies, network IO, concurrent processing, resource configuration, etc.
* **Clearly identify the 1-3 most likely core technical bottlenecks.**
2. **Set Clear Optimization Goals (SMART Principle)**:
* Based on user expectations and current performance data, set specific, measurable, achievable, relevant, and time-bound (SMART) performance metrics for this optimization.
* For example: "Reduce the average response time of the product search API from the current 5.2 seconds to within 1.5 seconds, and the P95 response time to within 3 seconds, to be completed within the next iteration cycle (2 weeks)."
3. **Collaboration Guidance**:
* Provide clear technical bottleneck descriptions and optimization goals to **Product Manager John** or **Product Owner Sarah** for evaluating the business value and return on investment of the optimization plan in the next stage.
* Indicate which specific tools or technologies are needed for more detailed performance profiling.
4. **Deliverables (Architect Fred)**:
* A **"Performance Bottleneck Diagnosis and Optimization Goal Definition"** (Markdown format), including:
* Core technical bottleneck analysis and confirmation (1-3)
* Specific SMART performance optimization goals
* Suggested performance profiling tools or technologies
* Input for Product Manager/Product Owner (bottleneck description, optimization goals, for business value evaluation)
**Please complete the tasks for Analyst Mary and Architect Fred sequentially.**
Stage 2: Optimization Solution Design and Technology Selection
Role Combination: Architect Fred (+ relevant specialized roles, such as DBA, Senior Developer)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Architect Fred**. For specific performance bottlenecks, you may need to consider incorporating expert opinions from specific domains (e.g., simulate DBA input if the bottleneck is in the database; simulate input from a senior algorithm engineer if it's due to complex algorithms).
**Background**:
You have completed the **"Performance Bottleneck Diagnosis and Optimization Goal Definition"**, clarifying the core technical bottlenecks and SMART optimization goals.
**Input Materials (Please paste the complete content of the "Performance Bottleneck Diagnosis and Optimization Goal Definition" here)**:
[Paste the complete content of the Performance Bottleneck Diagnosis and Optimization Goal Definition here]
**Your Tasks (Architect Fred)**:
1. **Design Optimization Solutions for Core Bottlenecks**:
* For each confirmed core technical bottleneck, design 1-2 specific optimization solutions.
* **Solutions should detail**:
* **Bottleneck One ([Bottleneck Name])**:
* **Solution 1.A**: [Describe Solution A, e.g., Optimize SQL queries, add indexes]
* Specific Measures: [List detailed steps or code/configuration modification points]
* Expected Effect: [Quantify, e.g., Expected to reduce query time by X%]
* Potential Risks/Side Effects: [e.g., Increased index maintenance cost]
* **Solution 1.B (if any)**: [Describe Solution B, e.g., Introduce caching mechanism Redis]
* Specific Measures: [Caching strategy, data synchronization method, etc.]
* Expected Effect: [Expected hit rate, response time improvement]
* Potential Risks/Side Effects: [Cache consistency issues, increased complexity]
* **Bottleneck Two ([Bottleneck Name])** (and so on)...
2. **Technology Selection and Evaluation (if solution involves new technologies or tools)**:
* If the optimization solution involves introducing new technologies, libraries, or tools (such as a new caching solution, message queue, more efficient algorithm library, etc.), provide a brief technology selection description and evaluation.
* Compare the pros and cons of different options and provide a recommendation.
3. **Solution Priority and Implementation Suggestions**:
* For the multiple optimization solutions proposed (if a bottleneck has multiple solutions, or there are multiple bottlenecks), provide recommended implementation priorities based on expected effect, implementation difficulty, risks, etc.
* Suggest small-scale experiments or grayscale releases (if applicable).
4. **Collaboration Guidance**:
* Provide clear solution details, priority suggestions, and potential dependencies to **Product Owner Sarah** for breaking down optimization tasks in the next stage.
* If the optimization solution might impact existing business logic or user experience, clearly point it out for Sarah to communicate with Product Manager John.
5. **Deliverables**:
* A **"Performance Optimization Solution Design Report"** (Markdown format), including:
* Detailed optimization solutions for each core bottleneck (including specific measures, expected effects, risks)
* (If applicable) New technology/tool selection and evaluation
* Recommended implementation priority of optimization solutions
* Small-scale experiment or grayscale release suggestions
* Input for Product Owner Sarah (solution details, priority, dependencies)
* Potential business/user experience impact points for Product Manager John to note
**Please begin your work.**
Stage 3: Optimization Task Breakdown and Verification Standard Setting
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Product Owner Sarah**. Your task is to break down the optimization solutions designed by the architect into executable development tasks and set clear performance verification standards for each task.
**Background**:
You have received the **"Performance Optimization Solution Design Report"** output by **Architect Fred**.
**Input Materials (Please paste the complete content of the "Performance Optimization Solution Design Report" here)**:
[Paste the complete content of the Performance Optimization Solution Design Report here]
**Your Tasks (Product Owner Sarah)**:
1. **Understand Optimization Solution and Priority**:
* Carefully read Architect Fred's report, especially the recommended optimization solutions, priorities, and potential risks.
* Simulate communication with Product Manager John to confirm that the potential business impact and user experience changes brought by the optimization solution have been fully understood and accepted.
2. **Create Optimization User Story/Task**:
* Break down the high-priority optimization solutions proposed by Architect Fred into one or more User Stories or technical tasks.
* **Story/Task Description**: Clearly describe the specific work to be completed for this optimization task, referencing key measures from the architect's solution.
* **Acceptance Criteria (ACs)**:
* **Core AC**: Achieve or exceed the SMART performance metrics set by the architect for this bottleneck in the "Performance Bottleneck Diagnosis and Optimization Goal Definition". Please explicitly reference these metrics.
* Other ACs should include: functional correctness is not affected, relevant monitoring is configured or updated, the optimization solution is implemented as designed, etc.
* Include at least 3-5 ACs.
3. **Formulate Detailed Performance Verification Plan**:
* **Verification Environment**: Describe the environment where performance verification will be conducted (e.g., production-like environment, specific performance testing environment).
* **Verification Tools**: List the tools that will be used for performance verification (e.g., JMeter, LoadRunner, APM tools, Browser DevTools, etc.).
* **Verification Scenarios and Steps**:
* Design specific test scenarios to simulate actual user usage or load conditions.
* Describe the operational steps for executing the verification in detail.
* Clearly state the key performance data points that need to be collected.
* **Comparison Baseline**: Explain how the performance data after optimization will be compared with the performance baseline data before optimization (from Analyst Mary's report).
4. **Collaboration Guidance**:
* Provide clear optimization User Story/Task to **Scrum Master Bob** and **Developer Roles**, along with a detailed performance verification plan.
* Emphasize that rigorous performance verification must be passed after optimization, and necessary regression testing should be performed to ensure system stability.
5. **Deliverables**:
* A **"Performance Optimization Task and Verification Plan"** (Markdown format), including:
* Detailed information of the performance optimization User Story/Task (ID, Description, ACs, including SMART performance goals)
* Detailed performance verification plan (environment, tools, scenarios, steps, data points, baseline comparison description)
* Execution instructions and notes for the development and testing teams.
**Please begin your work.**
Stage 4: Optimization Implementation and Effect Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Scrum Master Bob**, and then as a **Developer Role** (you can specify a technology stack, e.g., "Senior Java Performance Tuning Engineer"), to jointly complete the implementation and effect verification of performance optimization.
**Background**:
You have received the **"Performance Optimization Task and Verification Plan"** output by **Product Owner Sarah**, which includes the optimization User Story/Task and detailed performance verification plan.
**Input Materials (Please paste the complete content of the optimization User Story/Task and performance verification plan here)**:
[Paste the complete content of the optimization User Story/Task and performance verification plan here]
**Your Tasks**:
**As Scrum Master Bob**:
1. **Task Assignment and Resource Coordination**:
* Assign the optimization User Story/Task to the "Developer Role".
* Confirm that the "Developer Role" has fully understood Architect Fred's optimization solution and Sarah's verification plan.
* Ensure that the environment and tools required for performance verification are ready.
2. **Risk Monitoring and Progress Tracking**:
* Remind the "Developer Role" to pay attention to the potential risks mentioned in the architect's solution and monitor them closely during implementation.
* Briefly explain how you will track the progress of the optimization task and provide support when encountering obstacles.
3. **Collaboration Guidance (to Developer Role)**:
* Emphasize code quality and maintainability, which should not be sacrificed even when performing performance optimization.
* Require the developer, after optimization, to not only perform performance verification but also related functional regression testing.
---
**(After Bob completes the above tasks, continue)**
---
**As Developer Role (e.g., "Senior Java Performance Tuning Engineer")**:
1. **Performance Optimization Implementation**:
* Based on Architect Fred's optimization solution and the User Story/Task description, **describe in detail how you will modify the code, configuration, or architecture to implement performance optimization**.
* Which specific code files/classes/methods were modified? (Can show optimization before and after comparison of key code snippets).
* Which configuration parameters were adjusted?
* Which caching strategies, indexes, algorithms, etc., were introduced or modified?
2. **Observations and Adjustments During Implementation**:
* During implementation, did you use performance profiling tools to further pinpoint details? Please briefly describe.
* Did you make minor adjustments to the original optimization plan based on actual circumstances? Please explain.
3. **Execute Performance Verification Plan (Self-Testing)**:
* **Strictly follow the performance verification plan formulated by Product Owner Sarah.**
* Record the key performance data collected in each test scenario in detail (e.g., response time, throughput, resource utilization, etc.).
* **Compare and analyze the performance data after optimization with the baseline data before optimization (from Analyst Mary's report) and the SMART performance goals.**
* Determine whether the expected performance optimization goals have been achieved.
4. **Functional Regression Testing**:
* Briefly describe how you will perform regression testing on related functionalities affected by the optimization to ensure their correctness is not broken.
5. **Optimization Summary and Report**:
* Summarize the key measures of this performance optimization, challenges encountered (if any), and the final optimization effect.
* If you find any other related technical debt that can be addressed concurrently during the optimization process, or have suggestions for further optimization, please propose them.
* Describe your process for submitting code (commit message should include optimization description), initiating code review, and preparing to demonstrate the optimization results to the team.
6. **Deliverable (Developer Role)**:
* A **"Performance Optimization [ID] Implementation and Effect Verification Report"** (Markdown format), including:
* Detailed description of optimization measure implementation (code/configuration modification points, logic explanation)
* (If any) Profiling tool usage and findings
* Performance verification data recording and comparison analysis (compared to baseline and goals)
* Conclusion on whether optimization goals were achieved
* Functional regression test summary
* Optimization summary and subsequent suggestions (if any)
**Please have Scrum Master Bob complete their tasks first, and then the Developer Role complete their task.**
Scenario 5: Technical Debt Cleanup
Stage 1: Technical Debt Identification and Assessment
Role Combination: Analyst Mary + Architect Fred
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Analyst Mary** (responsible for information collection and preliminary categorization), and then as **Architect Fred** (responsible for technical assessment and impact analysis).
**Background**:
The team plans to conduct a technical debt cleanup. Possible sources of information include: code review records, developer feedback, static code analysis tool reports, known code smell areas, outdated libraries or frameworks, etc.
**Your Tasks**:
**As Analyst Mary**:
1. **Technical Debt Information Collection and Organization**:
* Assume you have reviewed the following information sources (please simulate the information you extract from them):
* **Code Review Records**: [Simulate a few review comments pointing out code quality issues, e.g., "This module's logic is too complex, difficult to maintain", "Contains a lot of duplicate code"]
* **Developer Pain Point Feedback**: [Simulate a few problems developers encounter in their daily work due to technical debt, e.g., "Build time is too long", "Specific module has frequent Bugs and is difficult to locate"]
* **Static Code Analysis Report Summary**: [Simulate the main types and quantity of issues pointed out by the report, e.g., "Report shows 50 methods with excessive complexity, 20 outdated dependency libraries"]
* **Known Problem Areas**: [List 1-2 module names that the team generally agrees have poor code quality or unreasonable design]
* Perform a preliminary categorization of the collected information (e.g., code quality issues, architectural design flaws, insufficient test coverage, outdated libraries, missing documentation, etc.).
2. **Preliminary Impact Description**:
* For each major technical debt item under each category, briefly describe its potential negative impact on development efficiency, system stability, maintainability, scalability, or team morale.
3. **Deliverable (Analyst Mary)**:
* A **"Technical Debt Preliminary Identification and Categorization Report"** (Markdown format), including:
* Summary of technical debt information sources
* Technical debt category list
* Each major technical debt item and its preliminary described negative impact
---
**(After Mary completes the above tasks, continue)**
---
**As Architect Fred**:
1. **In-depth Technical Debt Item Assessment**:
* You have received the **"Technical Debt Preliminary Identification and Categorization Report"** output by **Analyst Mary**.
* For the major technical debt items listed in the report (especially code quality and architectural design flaws), conduct a more in-depth technical assessment.
* **Assessment content should include**:
* **Technical Complexity**: How difficult is it technically to repay this debt?
* **Risk Assessment**: How large is the risk of introducing new issues during repayment (e.g., breaking existing functionality)?
* **Scope of Impact**: Which modules or functionalities are affected by this debt?
* **Long-term Value**: Estimated long-term benefits for system health, development efficiency, scalability, etc., after repayment.
2. **Prioritization Suggestion**:
* Based on your technical assessment (complexity, risk, impact, value), propose a preliminary repayment priority order for the identified technical debt items (e.g., High/Medium/Low, or suggest a repayment sequence). Please explain the reasons for the prioritization.
3. **Collaboration Guidance**:
* Provide clear technical assessment results and prioritization suggestions to **Product Manager John** or **Product Owner Sarah** for deciding whether to include technical debt in the iteration plan in the next stage.
* Point out which technical debts, if not addressed now, might evolve into more serious problems in the future.
4. **Deliverables (Architect Fred)**:
* A **"Technical Debt Assessment and Repayment Priority Suggestion"** (Markdown format), including:
* Detailed technical assessment of major technical debt items (complexity, risk, impact, value)
* Suggested repayment priority order and reasons
* Warnings about potential future risks (if not addressed)
* Input for Product Manager/Product Owner (assessment results, priority, for decision making)
**Please complete the tasks for Analyst Mary and Architect Fred sequentially.**
Stage 2: Repayment Solution Design and Feasibility Analysis
Role Combination: Architect Fred (+ discussion with senior developer familiar with specific modules)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Architect Fred**. For the selected high-priority technical debt, you need to design specific repayment solutions. You can assume discussion with a senior developer who is very familiar with the relevant code modules to ensure the solutions are practical.
**Background**:
You have completed the **"Technical Debt Assessment and Repayment Priority Suggestion"**. Assume the team has decided to prioritize addressing 1-2 high-priority technical debts identified in the report.
**Input Materials**:
1. **"Technical Debt Assessment and Repayment Priority Suggestion" (Please paste the complete content here, and explicitly indicate the 1-2 high-priority technical debts to be addressed this time)**:
```
[Paste the complete content of the Technical Debt Assessment and Repayment Priority Suggestion here, and explicitly select the debt items]
```
2. **(Optional) Existing code snippets or architecture diagrams of related modules (if easy to provide or describe)**:
```
[If applicable, paste or describe relevant code/architecture information]
```
**Your Tasks (Architect Fred)**:
1. **Design Specific Repayment Solutions for Selected Technical Debt**:
* For each selected high-priority technical debt item, design a detailed repayment solution.
* **The solution should include**:
* **Debt Item [Name/Description]**:
* **Detailed Current Problem**: Reiterate the specific technical manifestation and pain points of this debt.
* **Target State**: Describe the ideal state of the related code/architecture after the debt is repaid.
* **Specific Steps/Refactoring Strategy**:
* List clear, actionable execution steps (e.g., extract duplicate logic to a common utility class, break down large functions into smaller ones, introduce design pattern X to decouple modules Y and Z, upgrade library A to version B and handle compatibility issues, etc.).
* If refactoring is involved, explain the refactoring techniques to be used.
* **Verification Method**: How to verify that the debt has been successfully repaid and no new issues have been introduced? (e.g., unit test coverage, integration test scenarios, improvement in static code analysis metrics, etc.).
* **Estimated Effort**: (e.g., Small/Medium/Large, or approximate person/hours).
* **Potential Risks and Rollback Plan**: Risks that might be encountered during repayment and a brief rollback plan.
2. **Feasibility and Impact Analysis**:
* Evaluate the technical feasibility of each repayment solution and its potential impact on the existing system (positive and negative).
* Consider whether feature development for related modules needs to be frozen, or if it can be done incrementally with small steps.
3. **Collaboration Guidance**:
* Provide clear solution details, steps, risks, and verification methods to **Product Owner Sarah** for incorporating the repayment tasks into the development plan in the next stage.
* If the repayment solution might temporarily affect certain functionalities or require user cooperation for testing, clearly point it out.
4. **Deliverables**:
* A **"Technical Debt Repayment Solution Design Report"** (Markdown format), including for the selected technical debt items:
* Detailed current problem
* Target state description
* Specific repayment steps/refactoring strategy
* Verification method
* Estimated effort
* Potential risks and rollback plan
* Feasibility and system impact analysis
* Input for Product Owner Sarah (solution details, risks, verification methods)
**Please begin your work.**
Stage 3: Inclusion in Iteration Plan and Acceptance Criteria Definition
Role Combination: Product Owner Sarah (+ negotiation with Product Manager John for resources)
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You are now **Product Owner Sarah**. Your task is to convert the technical debt repayment solutions into development tasks that can be included in iterations, and define their acceptance criteria, while also needing to negotiate resource allocation with the product manager (can be simulated).
**Background**:
You have received the **"Technical Debt Repayment Solution Design Report"** output by **Architect Fred**, which includes specific repayment solutions for high-priority technical debt.
**Input Materials (Please paste the complete content of the "Technical Debt Repayment Solution Design Report" here)**:
[Paste the complete content of the Technical Debt Repayment Solution Design Report here]
**Your Tasks (Product Owner Sarah)**:
1. **Understand Repayment Solution and Align with Business Value**:
* Carefully read Architect Fred's report to understand the technical details, risks, and expected benefits of each repayment solution.
* Simulate a discussion with **Product Manager John** about the business value of these technical debt repayment tasks (e.g., improving development efficiency, reducing future Bug rates, enhancing system stability, etc.), and how to allocate resources and schedule them within the current product roadmap. **Please record the key conclusions of the discussion.**
2. **Create Technical Debt Repayment User Story/Task**:
* For each selected repayment solution from Architect Fred's report that has been agreed upon by John (simulated) to be included in the plan, create one or more User Stories or technical tasks.
* **Story/Task Description**: Clearly describe the specific repayment work the developer needs to complete, referencing key steps and the target state from the architect's solution.
* **Acceptance Criteria (ACs)**:
* **Core AC**: The technical debt point has been successfully removed or refactored according to the solution.
* The "Verification Method" defined in the architect's solution should be converted into specific ACs. For example: "Unit test coverage for related modules reaches X%", "Code complexity metric (e.g., cyclomatic complexity) is reduced below Y", "Old dependency library Z has been successfully removed, and system functionality is not affected".
* Existing related functionalities pass regression testing and no new Bugs are introduced.
* Include at least 3-5 ACs.
* **Dependencies (if any)**: Indicate the execution order or dependencies between different technical debt repayment tasks.
* **Priority and Scheduling**: Based on the discussion with John, set priorities for these tasks and suggest which iteration cycle to include them in.
3. **Collaboration Guidance**:
* Provide clear technical debt repayment User Story/Task to **Scrum Master Bob** and **Developer Roles**.
* Emphasize that these tasks, although not directly producing new features, are crucial for the long-term health of the product.
* Remind the development team to pay special attention to the risks and rollback plan mentioned by the architect during implementation.
4. **Deliverables**:
* A **"Technical Debt Repayment Iteration Plan and Task List"** (Markdown format), including:
* Summary of the discussion with Product Manager John regarding resource allocation and scheduling.
* Detailed list of technical debt repayment User Stories/Tasks (each including ID, Description, ACs, Dependencies, Priority, Suggested Schedule).
* Execution instructions and risk warnings for the development team.
**Please begin your work.**
Stage 4: Repayment Implementation and Effect Confirmation
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
--- Clear and Reset Context ---
**Instructions**: You will now play two roles: first as **Scrum Master Bob**, and then as a **Developer Role** (you can specify a technology stack, e.g., "Senior Python Refactoring Engineer"), to jointly complete the implementation and effect confirmation of technical debt repayment.
**Background**:
You have received the **"Technical Debt Repayment Iteration Plan and Task List"** output by **Product Owner Sarah**, which includes the technical debt repayment User Story/Task and acceptance criteria.
**Input Materials (Please paste the complete content of the selected technical debt repayment User Story/Task and its ACs here)**:
[Paste the complete content of the selected technical debt repayment User Story/Task and its ACs here]
**Your Tasks**:
**As Scrum Master Bob**:
1. **Task Assignment and Risk Reiteration**:
* Assign the technical debt repayment User Story/Task to the "Developer Role".
* Review the specific steps and risk warnings from Architect Fred's "Technical Debt Repayment Solution Design Report" together with the "Developer Role".
2. **Progress Assurance and Quality Control**:
* Explain how you will help the "Developer Role" steadily proceed with the technical debt repayment work without affecting normal feature iterations.
* Emphasize the importance of code review for technical debt repayment tasks, ensuring that refactoring/modifications comply with team standards and truly improve code quality.
3. **Collaboration Guidance (to Developer Role)**:
* Remind the developer to strictly follow the architect's solution and the ACs defined by Sarah.
* If, during the repayment process, discrepancies are found between the solution and the actual situation, or unforeseen difficulties arise, they should be raised immediately and discussed with the team.
---
**(After Bob completes the above tasks, continue)**
---
**As Developer Role (e.g., "Senior Python Refactoring Engineer")**:
1. **Technical Debt Repayment Implementation**:
* Based on Architect Fred's repayment solution and the User Story/Task description, **describe in detail how you will modify the code, upgrade libraries, or adjust design patterns, etc., to implement the technical debt repayment**.
* Which specific code files/modules were modified? (Can show before and after comparison of key code snippets).
* How were the refactoring strategies or steps mentioned in the solution applied?
* When upgrading dependency libraries, how were compatibility issues and API changes handled?
2. **Unit Testing and Integration Testing**:
* Describe how you will write or update unit tests to ensure the refactored code logic is correct and maintain or improve test coverage.
* How to perform necessary integration testing to verify that the modifications have not negatively impacted other parts of the system.
3. **Effect Confirmation and AC Verification**:
* **Verify against each acceptance criterion (AC) defined by Product Owner Sarah one by one.**
* For example, if an AC requires code complexity reduction, you can use relevant tools to measure and report the results.
* If an AC requires removal of an old library, you need to confirm it is no longer referenced and system functionality is normal.
* **Record the verification result for each AC (Pass/Fail and reason).**
4. **Summary and Suggestions**:
* Summarize the achievements of this technical debt repayment work, challenges encountered, and lessons learned.
* If you find any other related technical debt that can be addressed concurrently during the repayment process, or have suggestions for further optimization, please propose them.
* Describe your process for submitting code (commit message should clearly state the technical debt content repaid), initiating code review.
5. **Deliverable (Developer Role)**:
* A **"Technical Debt [ID] Repayment Implementation and Effect Confirmation Report"** (Markdown format), including:
* Detailed description of repayment measure implementation (code modification points, refactoring logic explanation)
* Unit testing and integration testing execution status
* Record of verification results for all acceptance criteria (ACs)
* Repayment work summary, lessons learned, and suggestions for further optimization (if any)
* Code submission and CR instructions
**Please have Scrum Master Bob complete their tasks first, and then the Developer Role complete their task.**
下面是中文版本
BMAD多场景协作提示词模板库
使用说明和最佳实践建议
简介
本模板库旨在为BMAD(Breakthrough Method of Agile AI-driven Development)代理系统提供一套标准化的多场景、多阶段协作提示词。通过使用这些模板,团队可以更高效地在不同开发阶段利用AI代理进行协作,确保信息传递的准确性和工作流程的连贯性。
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
"I've found this usage method to be genuinely a bit more user-friendly than the standard one. This brilliant idea came from a pro in the comment section
BMAD Multi-Scenario Collaboration Prompt Template Library
Usage Instructions and Best Practice Recommendations
Introduction
This template library aims to provide a standardized set of multi-scenario, multi-stage collaboration prompts for the BMAD (Breakthrough Method of Agile AI-driven Development) agent system. By using these templates, teams can leverage AI agents more effectively for collaboration across different development stages, ensuring accuracy in information transfer and consistency in workflow.
Core Principles
Best Practices
agent-config.txt) of the BMAD agents you are using (such as Mary, John, Fred, Sarah, Bob, etc.) to guide them more effectively.Scenario 1: New Feature Development
Stage 1: Requirements Analysis and Initial Definition
Role Combination: Analyst Mary + Product Manager John
Prompt Template:
Stage 2: Technical Solution Design and Evaluation
Role Combination: Architect Fred (+ potentially Design Architect Jane, if complex UI is involved)
Prompt Template:
[Paste the complete content of the New Feature Product Requirements Document (PRD) Draft here]
Stage 3: Task Breakdown and Implementation Planning
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
Stage 4: Development Implementation and Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
[Paste the complete content of the User Story list selected for this iteration, including ID, Story Description, Acceptance Criteria, Technical Notes, Dependencies, Priority, etc.]
Scenario 2: Existing Feature Modification
Stage 1: Requirements Analysis and Impact Assessment
Role Combination: Analyst Mary + Product Manager John
Prompt Template:
Stage 2: Technical Solution Design and Risk Assessment
Role Combination: Architect Fred (+ potentially Design Architect Jane)
Prompt Template:
[Paste the complete content of the PRD (Feature Modification Section) or Feature Modification Requirement Document here]
Stage 3: Task Formulation and Verification Case Design
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
Stage 4: Modification Implementation and Regression Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
[Paste the complete content of the sub-task/User Story list selected for this iteration, including ID, Description, Acceptance Criteria, Key Technical Implementation Points, Dependencies, etc.]
Scenario 3: Bug Fixing and Problem Diagnosis
Stage 1: Problem Reproduction and Initial Diagnosis
Role Combination: Analyst Mary + Product Manager John (or Technical Support Role)
Prompt Template:
Stage 2: Technical Root Cause Analysis and Fix Solution Design
Role Combination: Architect Fred (+ potentially relevant specialized developers)
Prompt Template:
Stage 3: Fix Task Formulation and Verification Case Design
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
[Paste the complete content of the Bug Technical Root Cause Analysis and Fix Solution here]
Stage 4: Fix Implementation and Verification Execution
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
[Paste the complete content of the Bug fix User Story/Task and test cases here]
Scenario 4: Performance Optimization
Stage 1: Performance Bottleneck Analysis and Metric Definition
Role Combination: Analyst Mary + Architect Fred
Prompt Template:
Stage 2: Optimization Solution Design and Technology Selection
Role Combination: Architect Fred (+ relevant specialized roles, such as DBA, Senior Developer)
Prompt Template:
[Paste the complete content of the Performance Bottleneck Diagnosis and Optimization Goal Definition here]
Stage 3: Optimization Task Breakdown and Verification Standard Setting
Role Combination: Product Owner Sarah (+ considering input from Test Engineer)
Prompt Template:
[Paste the complete content of the Performance Optimization Solution Design Report here]
Stage 4: Optimization Implementation and Effect Verification
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
[Paste the complete content of the optimization User Story/Task and performance verification plan here]
Scenario 5: Technical Debt Cleanup
Stage 1: Technical Debt Identification and Assessment
Role Combination: Analyst Mary + Architect Fred
Prompt Template:
Stage 2: Repayment Solution Design and Feasibility Analysis
Role Combination: Architect Fred (+ discussion with senior developer familiar with specific modules)
Prompt Template:
Stage 3: Inclusion in Iteration Plan and Acceptance Criteria Definition
Role Combination: Product Owner Sarah (+ negotiation with Product Manager John for resources)
Prompt Template:
[Paste the complete content of the Technical Debt Repayment Solution Design Report here]
Stage 4: Repayment Implementation and Effect Confirmation
Role Combination: Scrum Master Bob + Developer Role
Prompt Template:
[Paste the complete content of the selected technical debt repayment User Story/Task and its ACs here]
下面是中文版本
BMAD多场景协作提示词模板库
使用说明和最佳实践建议
简介
本模板库旨在为BMAD(Breakthrough Method of Agile AI-driven Development)代理系统提供一套标准化的多场景、多阶段协作提示词。通过使用这些模板,团队可以更高效地在不同开发阶段利用AI代理进行协作,确保信息传递的准确性和工作流程的连贯性。
核心原则
最佳实践
agent-config.txt),以便更有效地引导它们。场景一:全新功能开发
阶段1:需求分析与初步定义
角色组合: 分析师Mary + 产品经理John
提示词模板:
阶段2:技术方案设计与评估
角色组合: 架构师Fred (+ 可能的设计架构师Jane,如果涉及复杂UI)
提示词模板:
[在此处粘贴《新功能产品需求文档(PRD)初稿》的完整内容]
阶段3:任务分解与实施规划
角色组合: 产品负责人Sarah (+ 考虑测试工程师的输入)
提示词模板:
阶段4:开发实施与验证
角色组合: Scrum Master Bob + 开发者角色
提示词模板:
[在此处粘贴本轮迭代选定开发的User Story列表,包含ID, Story描述, 验收标准, 技术备注, 依赖关系, 优先级等完整信息]
场景二:现有功能修改
阶段1:需求分析与影响评估
角色组合: 分析师Mary + 产品经理John
提示词模板:
阶段2:技术方案设计与风险评估
角色组合: 架构师Fred (+ 可能的设计架构师Jane)
提示词模板:
[在此处粘贴《PRD(功能修改部分)》或《功能修改需求文档》的完整内容]
阶段3:任务分解与测试规划
角色组合: 产品负责人Sarah (+ 考虑测试工程师的输入)
提示词模板:
阶段4:开发实施与回归验证
角色组合: Scrum Master Bob + 开发者角色
提示词模板:
[在此处粘贴本轮迭代选定的子任务/User Story列表,包含ID, 描述, 验收标准, 技术实现关键点, 依赖关系等完整信息]
场景三:Bug修复和问题诊断
阶段1:问题复现与初步诊断
角色组合: 分析师Mary + 产品经理John (或技术支持角色)
提示词模板:
阶段2:技术根因分析与修复方案设计
角色组合: 架构师Fred (+ 可能的相关专业开发者)
提示词模板:
阶段3:修复任务制定与验证案例设计
角色组合: 产品负责人Sarah (+ 考虑测试工程师的输入)
提示词模板:
[在此处粘贴《Bug技术根因分析与修复方案》的完整内容]
阶段4:修复实施与验证执行
角色组合: Scrum Master Bob + 开发者角色
提示词模板:
[在此处粘贴Bug修复User Story/Task和测试案例的完整内容]
场景四:性能优化
阶段1:性能瓶颈分析与指标定义
角色组合: 分析师Mary + 架构师Fred
提示词模板:
阶段2:优化方案设计与技术选型
角色组合: 架构师Fred (+ 相关专业角色,如DBA、资深开发者)
提示词模板:
[在此处粘贴《性能瓶颈诊断与优化目标定义》的完整内容]
阶段3:优化任务分解与验证标准制定
角色组合: 产品负责人Sarah (+ 考虑测试工程师的输入)
提示词模板:
[在此处粘贴《性能优化方案设计报告》的完整内容]
阶段4:优化实施与效果验证
角色组合: Scrum Master Bob + 开发者角色
提示词模板:
[在此处粘贴优化User Story/Task和性能验证计划的完整内容]
场景五:技术债务清理
阶段1:技术债务识别与评估
角色组合: 分析师Mary + 架构师Fred
提示词模板:
阶段2:偿还方案设计与可行性分析
角色组合: 架构师Fred (+ 与特定模块的资深开发者讨论)
提示词模板:
阶段3:纳入迭代计划与验收标准定义
角色组合: 产品负责人Sarah (+ 与产品经理John协商资源)
提示词模板:
[在此处粘贴《技术债务偿还方案设计报告》的完整内容]
阶段4:偿还实施与效果确认
角色组合: Scrum Master Bob + 开发者角色
提示词模板:
[在此处粘贴选定的技术债偿还User Story/Task及其ACs的完整内容]
Beta Was this translation helpful? Give feedback.
All reactions