|
|
|
|
@ -1,69 +0,0 @@
@@ -1,69 +0,0 @@
|
|
|
|
|
# Bitwarden Code Review Prompt |
|
|
|
|
|
|
|
|
|
## Before You Review |
|
|
|
|
|
|
|
|
|
1. **ALWAYS** evaluate PR title and description quality. If deficient, create a finding (💭) suggesting improvements: |
|
|
|
|
- **Title**: Must be clear, specific, and describe the change (not vague like "fixed bug 1234" or "update models to be better") |
|
|
|
|
- **Objective**: Must explain what changed and why it changed |
|
|
|
|
- **Screenshots or Screen Recordings**: Expected for UI changes, helpful for behavior changes |
|
|
|
|
- **Jira Reference**: Expected in the `## 🎟️ Tracking` section |
|
|
|
|
- **Test Plan**: Expected to describe how changes were verified, or reference test plan in linked Jira task |
|
|
|
|
|
|
|
|
|
Provide rewrite suggestions in a collapsible `<details>` section. |
|
|
|
|
|
|
|
|
|
2. **ALWAYS** read all existing PR comments before reviewing. Create exactly ONE summary comment only if none exists. |
|
|
|
|
|
|
|
|
|
3. **ALWAYS** check for existing comment threads before posting. Never create duplicate comments on the same finding. |
|
|
|
|
|
|
|
|
|
4. **ALWAYS** read resolved threads and human responses before reopening or responding. Respect human decisions: do not reopen threads for improvements (🎨) or inquiries (💭). Consider human explanations before taking further action. |
|
|
|
|
|
|
|
|
|
## Finding Requirements |
|
|
|
|
|
|
|
|
|
1. **ALWAYS** focus on actionable findings requiring developer attention or response. |
|
|
|
|
|
|
|
|
|
2. **CRITICAL: Never use # followed by numbers** - GitHub will autolink it to unrelated issues/PRs. |
|
|
|
|
|
|
|
|
|
**WHY THIS MATTERS:** |
|
|
|
|
- Writing "#1" creates a clickable link to issue/PR #1 (not your finding) |
|
|
|
|
- "Issue" is also wrong terminology (use "Finding") |
|
|
|
|
|
|
|
|
|
**CORRECT FORMAT:** |
|
|
|
|
- Finding 1: Memory leak detected |
|
|
|
|
- Finding 2: Missing error handling |
|
|
|
|
|
|
|
|
|
**WRONG (DO NOT USE):** |
|
|
|
|
- ❌ Issue #1 (wrong term + autolink) |
|
|
|
|
- ❌ #1 (autolink only) |
|
|
|
|
- ❌ Issue 1 (wrong term only) |
|
|
|
|
|
|
|
|
|
**REQUIREMENTS:** |
|
|
|
|
- Use "Finding" + space + number (no # symbol) |
|
|
|
|
- Present as numbered list |
|
|
|
|
- Each finding summary: one sentence, under 30 words |
|
|
|
|
|
|
|
|
|
3. **ALWAYS** classify each finding with one emoji (if multiple apply, use the most severe: ❌ > ⚠️ > ♻️ > 🎨 > 💭) |
|
|
|
|
- ❌ (`:x:`) Major finding requiring changes |
|
|
|
|
- ⚠️ (`:warning:`) Minor finding requiring human attention |
|
|
|
|
- ♻️ (`:recycle:`) Code introduces technical debt |
|
|
|
|
- 🎨 (`:art:`) Improves maintainability, reduces complexity, or enhances security (not style nitpicks) |
|
|
|
|
- 💭 (`:thought_balloon:`) Open inquiry or question |
|
|
|
|
|
|
|
|
|
## Comment Guidelines |
|
|
|
|
|
|
|
|
|
1. **ALWAYS** maintain brevity in all PR comments: |
|
|
|
|
- Summary comments must NOT include detailed change requests - keep them high-level |
|
|
|
|
- All specific code changes MUST be inline comments on the precise line requiring action |
|
|
|
|
- Never write multiple long paragraphs - use single sentences when possible |
|
|
|
|
- For required context: use fenced code blocks |
|
|
|
|
- For lengthy explanations: use collapsible `<details>` sections |
|
|
|
|
|
|
|
|
|
2. **NEVER** include these in summary comments: |
|
|
|
|
- List of files changed |
|
|
|
|
- Summary of recent changes or changes since last review |
|
|
|
|
- Lists of good practices observed, previous review items, or arbitrary ideas outside findings |
|
|
|
|
|
|
|
|
|
3. **FOR CLEAN PRs** (zero major/minor findings, zero refactoring requests, zero significant improvements): |
|
|
|
|
- Limit praise to ONE sentence (≤25 words) |
|
|
|
|
- Never create sections, checklists, detailed analysis, or positive-only inline comments |
|
|
|
|
|
|
|
|
|
4. **MAINTAIN** professional tone. Review code, not developers. Frame findings as improvement opportunities. |