Skip to content

chore: port reviewing-changes skill skeleton to .claude/ - #1311

Draft
addisonbeck wants to merge 1 commit into
mainfrom
claude-code-review-skeleton
Draft

chore: port reviewing-changes skill skeleton to .claude/#1311
addisonbeck wants to merge 1 commit into
mainfrom
claude-code-review-skeleton

Conversation

@addisonbeck

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-37516

📔 Objective

🚨 Breaking Changes

@addisonbeck addisonbeck added the ai-review-vnext Request a Claude code review using the vNext workflow label Jul 30, 2026
Phase A of the SDK code-review system. Ports Android's proven
repo-local .claude/ review skeleton into the SDK and codifies the
top-10 power-user review rules into .claude/CLAUDE.md.

Because the SDK already runs the identical shared _review-code.yml
CI workflow that Android does, this repo-local tree gives the SDK
Android-equivalent, steered code reviews with zero gh-actions or
infra changes: the CI reviewer reads .claude/CLAUDE.md (now
carrying the rules + a pointer to the reviewing-changes skill) and
the skill auto-activates via its description.

The subagent-forwarding instruction added to CLAUDE.md closes the
gap where multi-agent review subagents did not inherit the repo
rules -- findings are only postable under the evaluation-standards
gate if the rule is in a loaded file.

New tree:
- .claude/prompts/review-code.md -- generic stub delegating to skill
- .claude/skills/reviewing-changes/SKILL.md -- skill orchestrator
- .claude/skills/reviewing-changes/checklists/ -- 6 change-type
  checklists (Android-flavored intentionally; Rust-ified in Phase B)
- .claude/skills/reviewing-changes/reference/ -- 7 reference sheets
- .claude/skills/reviewing-changes/examples/review-outputs.md

Checklist/reference content remains Android-flavored: Phase A is
structural porting + rule codification. Phase B Rust-ifies content;
Phase C populates the Deep-Dive Index.
@addisonbeck
addisonbeck force-pushed the claude-code-review-skeleton branch from 761a576 to 6ec3d5a Compare July 30, 2026 21:10
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: REQUEST CHANGES

Phase A port of the Android reviewing-changes review skeleton into .claude/, plus a new .claude/rules/code-review.md rule file and a Code Review section in .claude/CLAUDE.md. No production Rust code, no secrets, no settings or permission changes. Findings focus on the interim state that goes live at merge: the skill auto-activates on every SDK review while its body still directs Android/Kotlin checks, several referenced files and skills do not exist in this repo, and the ported reference sheets disagree with each other on output format.

Code Review Details
  • ⚠️ : Skill body directs Android review while its description auto-activates it for all SDK reviews
    • .claude/skills/reviewing-changes/SKILL.md:6-8
  • ⚠️ : 27 references to a non-existent docs/ directory across the new tree
    • .claude/skills/reviewing-changes/reference/security-patterns.md:3
  • ⚠️ : Rule file path scope excludes Cargo.toml, so the Cargo weak-dependency rule never loads
    • .claude/rules/code-review.md:2-4
  • ♻️ : "Good Practices" guidance and uncollapsed comment format contradict examples/review-outputs.md
    • .claude/skills/reviewing-changes/reference/priority-framework.md:284-302
  • ♻️ : reviewing-incremental-changes skill reference is unavailable in this repo's review setup
    • .claude/skills/reviewing-changes/SKILL.md:63

PR Metadata Assessment

  • QUESTION: The Objective section is empty (template comment left in place); the rationale currently lives only in the commit message. Copying the Phase A/B/C summary from the commit into the PR body would help reviewers.

Comment on lines +6 to +8
# Reviewing Changes - Android Additions

This skill provides Android-specific workflow additions that complement the base `bitwarden-code-reviewer` agent standards.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: Skill body directs Android review, but the description makes it auto-activate on every SDK review the moment this merges.

Details and fix

The frontmatter description advertises "Rust/crate/crypto/FFI/WASM pattern validation" and triggers on any review task, while the body it loads says this is an Android skill and closes with "Android patterns: Validate MVVM, Hilt DI, Compose conventions, Kotlin idioms" (line 81). Step 2 keys change-type detection off *Screen.kt, ViewModel, libs.versions.toml, and build.gradle.kts — none of which exist here.

The commit message explains the Android flavor is intentional for Phase A, but that context is not in any file the reviewer loads, and .claude/CLAUDE.md now points every review task at this skill. Between this merge and Phase B, CI reviews of Rust PRs are steered by Kotlin/Compose guidance.

A cheap interim guard, right under the heading:

> **Phase A note:** the checklists and reference sheets below are ported verbatim from the Android
> repo and are being Rust-ified in Phase B. Treat the Android technology names (Compose, Hilt,
> MVVM, `*Screen.kt`, Gradle) as placeholders — map each to its SDK equivalent (WASM/UniFFI
> bindings, `Client` extension traits, crate layering, `Cargo.toml`) and do not raise findings that
> reference Android/Kotlin APIs.

Alternatively, narrow the description so the skill does not auto-activate until Phase B lands.

@@ -0,0 +1,90 @@
# Security Patterns Quick Reference

Quick reference for Bitwarden Android security patterns during code reviews. For comprehensive details, read `docs/ARCHITECTURE.md#security`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: 27 references to docs/ARCHITECTURE.md / docs/STYLE_AND_BEST_PRACTICES.md across the new tree, but this repo has no docs/ directory.

Details and fix

There is no docs/ directory in sdk-internal, so every one of these pointers is dead. Counts per file:

File Refs
reference/architectural-patterns.md 8
reference/priority-framework.md 3
reference/security-patterns.md 3
reference/testing-patterns.md 3
reference/ui-patterns.md 3
checklists/feature-addition.md 2
examples/review-outputs.md 2
checklists/dependency-update.md, reference/review-psychology.md, reference/style-patterns.md 1 each

Two failure modes: the reviewer burns tool calls on Read misses, and several are inside example finding text (Reference: docs/ARCHITECTURE.md#security) that gets copied into posted comments, pointing SDK authors at a file that does not exist.

SKILL.md already annotates its own dangling pointers with "(SDK /docs deep-dive — populated in Phase C; not yet present)". Applying the same annotation here — or stripping the Reference: lines until Phase C populates the deep-dive index — would keep Phase A self-consistent.

Comment on lines +2 to +4
paths:
- "crates/**/*.rs"
- "bitwarden_license/**/*.rs"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: Path scope excludes Cargo.toml, so rule 10 never loads for the PRs it targets.

Details and fix

The scope is *.rs only, and .claude/CLAUDE.md states rules "load automatically when you touch matching files". Rule 10 ("Use Cargo weak dependencies (?) for optional / licensed crates") is a manifest rule — a dependency or feature-flag PR that touches only Cargo.toml / Cargo.lock will never load this file, which is exactly the case where the OSS/commercial boundary risk shows up.

paths:
  - "crates/**/*.rs"
  - "bitwarden_license/**/*.rs"
  - "**/Cargo.toml"

Also worth noting: .claude/CLAUDE.md describes this file as "cross-cutting power-user rules", which reads broader than the *.rs scope actually delivers.

Comment on lines +284 to +302
## Optional (Acknowledge But Don't Require)

Note good practices to reinforce positive patterns. Keep these **brief** - list only, no elaboration.

### Good Practices

**Format**: Simple bullet list, no explanation

```markdown
## Good Practices
- Proper Hilt DI usage throughout
- Comprehensive unit test coverage
- Clear separation of concerns
- Well-documented public APIs
```

**Don't do this** (too verbose):
```markdown
## Good Practices

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ DEBT: This "Good Practices" guidance contradicts examples/review-outputs.md, which lists positive-feedback sections as an anti-pattern.

Details and fix

Two conflicting instructions ship in the same skill:

  • Here (and reference/review-psychology.md, "Positive Feedback") the reviewer is told to emit a ## Good Practices bullet list.
  • examples/review-outputs.md says "No 'Good Practices' or 'Action Items' sections" and "No positive commentary sections", matching the Bitwarden reviewer standard that forbids praise-only output.

Same conflict on comment shape: the examples in this file and in review-psychology.md use **file:line** - CRITICAL: … with details fully visible, while examples/review-outputs.md requires ❌ **CRITICAL**: … with everything inside <details> and calls the uncollapsed form an anti-pattern. checklists/infrastructure.md's "Example Review" also uses the multi-section summary that review-outputs.md rejects.

Whichever file the reviewer happens to load determines the output format. Suggest dropping the Optional/Good Practices sections and reformatting the inline examples in priority-framework.md, review-psychology.md, and the checklists to the review-outputs.md format, so there is one source of truth.


Load reference files only when needed for specific questions:

- **Re-reviews** → invoke `reviewing-incremental-changes` agent skill; scope to changed lines only, do not flag new issues in unchanged code

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ DEBT: reviewing-incremental-changes is not available in this repo's review setup, so the re-review instruction silently no-ops.

Details and fix

The skills exposed to the SDK reviewer come from bitwarden-code-review, bitwarden-security-engineer, and claude-config-validator, plus repo-local .claude/skills/ — none of them provide reviewing-incremental-changes. Same for bitwarden-code-reviewer (line 8) and the evaluation-standards gate cited in the .claude/CLAUDE.md addition; those names come from the Android setup.

Since the "scope to changed lines only, do not flag new issues in unchanged code" guidance is the valuable part, inlining it here rather than delegating to an unavailable skill would make it actually take effect.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🔍 SDK Breaking Change Detection

SDK Version: claude-code-review-skeleton (6ec3d5a)

⚠️ If breaking changes are detected, a corresponding pull request addressing them must be ready for merge in the affected client repository.

Client Status Details
typescript ✅ No breaking changes detected Compilation passed with new SDK version - View Details
android ✅ No breaking changes detected Compilation passed with new SDK version - View Details

Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm.
Results update as workflows complete.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.86%. Comparing base (15ab4ca) to head (6ec3d5a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1311   +/-   ##
=======================================
  Coverage   85.86%   85.86%           
=======================================
  Files         493      493           
  Lines       70931    70931           
=======================================
  Hits        60906    60906           
  Misses      10025    10025           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant