|
| 1 | +--- |
| 2 | +name: reviewing-changes |
| 3 | +description: SDK-specific code review checklist and Rust/crate/crypto/FFI/WASM pattern validation for the Bitwarden internal SDK — use this for any review task, even if the user doesn't explicitly ask for a "checklist". Detects change type automatically and loads the right review strategy (feature additions, bug fixes, UI refinements, refactoring, dependency updates, infrastructure). Triggered by "review", "code review", "review this code", "review PR", "review changes", "check this code", code review requests on Rust crate/crypto/FFI/UniFFI/WASM files, or any time someone asks to look at a diff, PR, or code changes in bitwarden/sdk-internal. |
| 4 | +--- |
| 5 | + |
| 6 | +# Reviewing Changes - Android Additions |
| 7 | + |
| 8 | +This skill provides Android-specific workflow additions that complement the base `bitwarden-code-reviewer` agent standards. |
| 9 | + |
| 10 | +## Instructions |
| 11 | + |
| 12 | +**IMPORTANT**: Work systematically through each step before providing feedback. Each checklist file includes structured thinking guidance for its review passes. |
| 13 | + |
| 14 | +### Step 1: Retrieve Additional Details |
| 15 | + |
| 16 | +Retrieve any additional information linked to the pull request using available tools (JIRA MCP, GitHub API). |
| 17 | + |
| 18 | +If pull request title and message do not provide enough context, request additional details from the reviewer: |
| 19 | +- Link a JIRA ticket |
| 20 | +- Associate a GitHub issue |
| 21 | +- Link to another pull request |
| 22 | +- Add more detail to the PR title or body |
| 23 | + |
| 24 | +**Android metadata checks** — flag as ❓ if any of these are missing: |
| 25 | +- PR includes `*Screen.kt` or Composable changes but has no screenshots |
| 26 | +- PR adds new `ViewModel` or `Repository` but has no test plan or test file changes |
| 27 | + |
| 28 | +### Step 2: Detect Change Type with Android Refinements |
| 29 | + |
| 30 | +Use the base change type detection from the agent, with Android-specific refinements: |
| 31 | + |
| 32 | +**Android-specific patterns:** |
| 33 | +- **Feature Addition**: New `ViewModel`, new `Repository`, new `@Composable` functions, new `*Screen.kt` files |
| 34 | +- **UI Refinement**: Changes only in `*Screen.kt`, `*Composable.kt`, `ui/` package files |
| 35 | +- **Infrastructure**: Changes to `.github/workflows/`, `gradle/`, `build.gradle.kts`, `libs.versions.toml` |
| 36 | +- **Dependency Update**: Changes only to `libs.versions.toml` or `build.gradle.kts` with version bumps |
| 37 | + |
| 38 | +### Step 3: Load Appropriate Checklist |
| 39 | + |
| 40 | +Based on detected type, read the relevant checklist file: |
| 41 | + |
| 42 | +- **Dependency Update** → `checklists/dependency-update.md` (expedited review) |
| 43 | +- **Bug Fix** → `checklists/bug-fix.md` (focused review) |
| 44 | +- **Feature Addition** → `checklists/feature-addition.md` (comprehensive review) |
| 45 | +- **UI Refinement** → `checklists/ui-refinement.md` (design-focused review) |
| 46 | +- **Refactoring** → `checklists/refactoring.md` (pattern-focused review) |
| 47 | +- **Infrastructure** → `checklists/infrastructure.md` (tooling-focused review) |
| 48 | + |
| 49 | +The checklist provides: |
| 50 | +- Multi-pass review strategy |
| 51 | +- Type-specific focus areas |
| 52 | +- What to check and what to skip |
| 53 | +- Structured thinking guidance |
| 54 | + |
| 55 | +### Step 4: Execute Review Following Checklist |
| 56 | + |
| 57 | +Follow the checklist's multi-pass strategy, thinking through each pass systematically. |
| 58 | + |
| 59 | +### Step 5: Consult Android Reference Materials As Needed |
| 60 | + |
| 61 | +Load reference files only when needed for specific questions: |
| 62 | + |
| 63 | +- **Re-reviews** → invoke `reviewing-incremental-changes` agent skill; scope to changed lines only, do not flag new issues in unchanged code |
| 64 | +- **Issue prioritization** → `reference/priority-framework.md` (Critical vs Suggested vs Optional) |
| 65 | +- **Phrasing feedback** → `reference/review-psychology.md` (questions vs commands, I-statements) |
| 66 | +- **Architecture questions** → `reference/architectural-patterns.md` (MVVM, Hilt DI, module org, error handling) |
| 67 | +- **Security questions (quick reference)** → `reference/security-patterns.md` (common patterns and anti-patterns) |
| 68 | +- **Security questions (comprehensive)** → (SDK `/docs` deep-dive — populated in Phase C; not yet present) |
| 69 | +- **Testing questions** → `reference/testing-patterns.md` (unit tests, mocking, null safety) |
| 70 | +- **UI questions** → `reference/ui-patterns.md` (Compose patterns, theming) |
| 71 | +- **Style questions (project-specific)** → `reference/style-patterns.md` (Kotlin rules enforced in review) |
| 72 | +- **Style questions (general)** → (SDK `/docs` deep-dive — populated in Phase C; not yet present) |
| 73 | + |
| 74 | +## Core Principles |
| 75 | + |
| 76 | +- **Priority order**: Security → Correctness → Breaking Changes → Performance → Maintainability |
| 77 | +- **Appropriate depth**: Match review rigor to change complexity and risk |
| 78 | +- **Specific references**: Always use `file:line_number` format for precise location |
| 79 | +- **Actionable feedback**: Say what to do and why, not just what's wrong |
| 80 | +- **Efficient reviews**: Use multi-pass strategy, skip what's not relevant |
| 81 | +- **Android patterns**: Validate MVVM, Hilt DI, Compose conventions, Kotlin idioms |
0 commit comments