To improve the prompt for instructing an agent to review code, you can make it more structured, clear, and detailed. Here’s an enhanced version:
**Task:** Review the code changes in the `./pwa` folder and the `@changes.diff` file as part of a new Pull Request (PR).
**Instructions:**
1. **Analyze Changes:**
- Carefully review the code modifications in the `./pwa` folder and the `@changes.diff` file.
- Focus on understanding the intent, correctness, and potential impact of the changes.
2. **Provide Feedback:**
- Add inline comments on the code where improvements, clarifications, or fixes are needed.
- Highlight best practices, potential bugs, performance issues, or security concerns.
- Suggest alternative solutions or improvements where applicable.
3. **Reference Additional Context:**
- Refer to the `@/tidy-first` guidelines for coding standards, style, and best practices.
- Ensure the changes align with these references.
4. **Ask Questions:**
- If any part of the code is unclear or requires further explanation, ask questions to gain better understanding.
5. **Summarize Findings:**
- Provide a brief summary of your review, including key observations, concerns, and overall approval status (e.g., "Looks good with minor suggestions" or "Needs significant revisions").
**Goal:** Ensure the code changes are high-quality, maintainable, and aligned with project standards before merging the PR.
Key Improvements:
- Structured Format: Breaks the task into clear steps for better readability and execution.
- Specific Goals: Clearly defines what the agent should focus on (e.g., correctness, best practices, alignment with references).
- Actionable Output: Requests inline comments, suggestions, and a summary for a comprehensive review.
- Clarity: Removes ambiguity by explicitly stating the purpose and expectations.
- Encourages Interaction: Prompts the agent to ask questions if needed, ensuring thorough understanding.
This version ensures the agent has a clear understanding of the task and delivers a detailed, actionable review.