From 524bd9a484642ce76e4f0df9780b48cc5f90ce80 Mon Sep 17 00:00:00 2001 From: Mick Letofsky Date: Thu, 18 Dec 2025 19:19:09 +0100 Subject: [PATCH] Remove review-prompt and migrate the only unique BW instruction to the CLAUDE.md (#18049) --- .claude/CLAUDE.md | 3 ++ .claude/prompts/review-code.md | 57 ---------------------------------- 2 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 .claude/prompts/review-code.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index dd3b6445edd..fadaabf57bb 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -18,6 +18,9 @@ - **NEVER** commit secrets, credentials, or sensitive information. +- **CRITICAL**: Tailwind CSS classes MUST use the `tw-` prefix (e.g., `tw-flex`, `tw-p-4`). + - Missing prefix breaks styling completely. + - **NEVER** log decrypted data, encryption keys, or PII - No vault data in error messages or console logs diff --git a/.claude/prompts/review-code.md b/.claude/prompts/review-code.md deleted file mode 100644 index 1888b7cd503..00000000000 --- a/.claude/prompts/review-code.md +++ /dev/null @@ -1,57 +0,0 @@ -# Bitwarden Clients Repo Code Review - Careful Consideration Required - -## Think Twice Before Recommending - -Angular has multiple valid patterns. Before suggesting changes: - -- **Consider the context** - Is this code part of an active modernization effort? -- **Check for established patterns** - Look for similar implementations in the codebase -- **Avoid premature optimization** - Don't suggest refactoring stable, working code without clear benefit -- **Respect incremental progress** - Teams may be modernizing gradually with feature flags - -## Angular Modernization - Handle with Care - -**Control Flow Syntax (@if, @for, @switch):** - -- When you see legacy structural directives (*ngIf, *ngFor), consider whether modernization is in scope -- Do not mandate changes to stable code unless part of the PR's objective -- If suggesting modernization, acknowledge it's optional unless required by PR goals - -**Standalone Components:** - -- New components should be standalone whenever feasible, but do not flag existing NgModule components as issues -- Legacy patterns exist for valid reasons - consider modernization effort vs benefit - -**Typed Forms:** - -- Recommend typed forms for NEW form code -- Don't suggest rewriting working untyped forms unless they're being modified - -## Tailwind CSS - Critical Pattern - -**tw- prefix is mandatory** - This is non-negotiable and should be flagged as ❌ major finding: - -- Missing tw- prefix breaks styling completely -- Check ALL Tailwind classes in modified files - -## Rust SDK Adoption - Tread Carefully - -When reviewing cipher operations: - -- Look for breaking changes in the TypeScript → Rust boundary -- Verify error handling matches established patterns -- Don't suggest alternative SDK patterns without strong justification - -## Component Library First - -Before suggesting custom implementations: - -- Check if Bitwarden's component library already provides the functionality -- Prefer existing components over custom Tailwind styling -- Don't add UI complexity that the component library already solves - -## When in Doubt - -- **Ask questions** (💭) rather than making definitive recommendations -- **Flag for human review** (⚠️) if you're uncertain -- **Acknowledge alternatives** exist when suggesting improvements