Skip to content

[AI-212] docs: Add CLAUDE.md and Claude CODEOWNERS entries - #881

Draft
fedemkr wants to merge 1 commit into
mainfrom
ai/AI-212-claude-init
Draft

fedemkr wants to merge 1 commit into
mainfrom
ai/AI-212-claude-init

Conversation

@fedemkr

@fedemkr fedemkr commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Ticket

Description

Adds Claude Code project guidance for this repo and assigns owners for Claude related files. Docs and ownership only; no code, build or workflow changes.

  • .claude/CLAUDE.md: based on README.md, CONTRIBUTING.md, the app and self-host readmes, global.json, Directory.Build.props and the workflows. It points to those docs instead of copying them and covers commands, rules that are easy to break (dotnet format CI gate, migrations for both SQLite and MSSQL, the hand-edit ban on <Version>), where the security-sensitive code lives (FIDO2, API keys, tokens, tenant isolation), and when an agent should stop and ask.
  • .github/CODEOWNERS: adds a # Claude related files group. .claude/ goes to @bitwarden/team-ai-sme and @bitwarden/tech-leads; respond.yml and review-code.yml go to @bitwarden/team-ai-sme. Because the last matching rule wins, those two workflow files are no longer covered by the existing .github/workflows/** rule (@bitwarden/team-passwordless-dev and @bitwarden/dept-bre). Existing entries are unchanged.

Open questions for team-passwordless-dev

  1. The README, CONTRIBUTING.md and both app readmes say .NET 7, but global.json pins SDK 9.0.101 and the projects target net9.0. CLAUDE.md tells agents to trust the build files. Should the docs be updated?
  2. For API migrations, CONTRIBUTING.md runs dotnet ef from src/Api with --project ../Service, while migrations.yml uses --project src/Api. Which is canonical?
  3. Are there security rules agents should follow that the repo doesn't write down (logging of keys or tokens, constant-time comparison, key type and scope for new endpoints, tenant filters for new entities)? CLAUDE.md lists where these mechanisms live and makes changes to them a stop-and-ask, but states no rules the repo doesn't.
  4. Is there a recommended subset of tests to run locally without Docker and Chrome?
  5. Recent commits use [JIRA-KEY] Summary, but the PR template asks for PAS-XXX | short description. Which should agents follow?
  6. What is src/Api/mds.jwt, how is it refreshed, and should agents never touch it?
  7. Are there self-hosting compatibility rules (for example the SelfHosted config paths) that changes must keep working?

Checklist

I did the following to ensure that my changes were tested thoroughly:

  • Checked every command in CLAUDE.md against _test.yml, CONTRIBUTING.md, src/AdminConsole/package.json and self-host/README.md, and every referenced path against the repo.

I did the following to ensure that my changes do not introduce security vulnerabilities:

  • Scanned CLAUDE.md for credentials and harness-loosening directives (none). Config keys are named with no values, and the sample dev keys from the readmes were left out.

🤖 AI-assisted review

Standard path (code-review-local) on the branch diff against origin/main: approved, 0 findings, none deferred.

@fedemkr fedemkr added the ai-review Request a Claude code review label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude Code validation

Result: Pass

Reviewed the one changed Claude material file, .claude/CLAUDE.md (new, 89 lines), read from the .claude-pr/ snapshot so the lines quoted are the pull request's rather than the base branch's. The security scan found no credentials, no exposed secret values, and no directive that loosens the harness; structure, directive clarity, and length are all sound, and every one of the ~40 repository paths the file references resolves on disk. Spot-checked the substantive claims against the code and they hold — the dotnet format CI gate in .github/workflows/_test.yml, the PBKDF2-HMACSHA512 hashing in ApiKeyUtils.cs, FixedTimeEquals in src/Api/Authorization, the SALT_TOKEN throw in TokenService.cs, the dual SQLite/MSSQL migration folders, the npm scripts, and the .NET 7 docs vs net9.0 build files correction.

The pull request also touches .github/CODEOWNERS, which is not Claude material under the scope patterns and so was not reviewed here.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the new .claude/CLAUDE.md project guidance and the added # Claude related files group in .github/CODEOWNERS. The guidance's referenced paths, commands, ports, DbContext names, and security-mechanism descriptions (FixedTimeEquals management-key check, PBKDF2-HMACSHA512 API-key hashing, SALT_TOKEN requirement in TokenService, per-tenant query filters in DbTenantContext) were checked against the repository and match. The file contains no credentials or harness-loosening directives. The CODEOWNERS change intentionally moves respond.yml and review-code.yml out of the .github/workflows/** rule's ownership, as the description states.

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.19%. Comparing base (78b4092) to head (d5c8974).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #881   +/-   ##
=======================================
  Coverage   37.19%   37.19%           
=======================================
  Files         587      587           
  Lines       31492    31492           
  Branches      904      904           
=======================================
  Hits        11715    11715           
  Misses      19625    19625           
  Partials      152      152           

☔ 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.

This branch has not been deployed

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

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant