Skip to content

[PM-37613] Add DIRT team CLAUDE.md files (server)#7975

Open
AlexRubik wants to merge 4 commits into
mainfrom
dirt/pm-37613/add-claude-mds
Open

[PM-37613] Add DIRT team CLAUDE.md files (server)#7975
AlexRubik wants to merge 4 commits into
mainfrom
dirt/pm-37613/add-claude-mds

Conversation

@AlexRubik

@AlexRubik AlexRubik commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

PM-37613 (parent: PM-34594)

📔 Objective

Adds three scoped CLAUDE.md files so Claude Code loads accurate DIRT-team context when working in DIRT-owned server subtrees, following the org Documentation Patterns conventions and this repo's .claude/CONTRIBUTING.md. This is the server counterpart to the clients work in bitwarden/clients#20959 (PM-37611).

  • src/Core/Dirt/CLAUDE.md: team-level context anchor for the DIRT server domain (Access Intelligence / Reports, Event Integrations, the Events audit pipeline, Phishing Detection). Covers the SQL/Dapper/EF triple-write pattern, the report command/query handlers, where feature flags live, and the zero-knowledge server boundary.
  • src/Core/Dirt/EventIntegrations/CLAUDE.md: a thin navigation hub pointing at the existing subsystem README.md, surfacing the rules that are easiest to miss (tag-based cache invalidation, Azure Service Bus subscriptions must exist before deploy, retries live in the listener).
  • src/Events/CLAUDE.md: orientation for the Events collector and its EventsProcessor sibling, including the cloud vs self-hosted write paths (AzureQueueHostedService vs RepositoryEventWriteService) and the hot-path / zero-knowledge constraints.

The files are lean and reference-based (bare repo-relative paths, no @-imports) and point at existing docs rather than duplicating them. CODEOWNERS already covers these directories (@bitwarden/team-data-insights-and-reporting-dev via **/Dirt and src/Events), so no CODEOWNERS change is needed.

📸 Screenshots

Not applicable, docs only.

Adds src/Core/Dirt/CLAUDE.md as the DIRT context anchor for the server.
Lean and reference-based: teaches the SQL/Dapper/EF triple-write pattern,
report command/query handlers, feature-flag location, and the
zero-knowledge server boundary, and maps where each DIRT feature area
lives. Points at the existing EventIntegrations README and the repo-wide
.claude config instead of duplicating them.

[PM-37613]
Adds src/Core/Dirt/EventIntegrations/CLAUDE.md as a thin nav hub pointing
at the existing README, surfacing the easily-missed rules: tag-based cache
invalidation, ASB-subscriptions-must-pre-exist, listener-owns-retries, and
platform-agnostic handlers.

[PM-37613]
Adds src/Events/CLAUDE.md orienting the Events collector and its
EventsProcessor sibling: the ingestion/write path, the hot-path and
zero-knowledge constraints, membership auth on /collect, and links back
to the DIRT team context and the event-integration pipeline.

[PM-37613]
- Fix self-hosted event-write path in src/Events/CLAUDE.md: self-host
  writes directly to the DB via RepositoryEventWriteService; the Azure
  queue + EventsProcessor are the cloud-only path (EventsProcessor has no
  SelfHosted appsettings). Previously implied the processor persisted
  self-hosted events too.
- Reframe src/Core/Dirt/CLAUDE.md away from team-persona framing per
  .claude/CONTRIBUTING.md: domain-first title and overview, with the
  owning team kept as a CODEOWNERS note.
- Use bare repo-relative reference paths (drop leading slash) to match the
  util/Seeder/CLAUDE.md precedent.
- Clarify that ReportingServiceCollectionExtensions predates TryAdd and
  uses AddScoped; new registrations should prefer TryAdd (ADR 0026).

[PM-37613]
@AlexRubik AlexRubik added the ai-review Request a Claude code review label Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed three new scoped CLAUDE.md files for DIRT-owned server subtrees (src/Core/Dirt/, src/Core/Dirt/EventIntegrations/, src/Events/). This is a docs-only change with no code impact. I verified the load-bearing factual claims against the codebase — directory layout, controller/service class names, the four FeatureFlagKeys constants, the AddEventWriteServices cloud-vs-self-hosted write-path selection, the AddScoped note on ReportingServiceCollectionExtensions, cache-tag/retry/listener details, and every referenced file path all check out.

Code Review Details

No findings. The documentation is accurate, follows .claude/CONTRIBUTING.md conventions (deep/scoped placement, reference-based rather than duplicative, zero-knowledge invariant restated inline), and correctly notes that src/EventsProcessor/ has no appsettings.SelfHosted.json. No committed settings.local.json, secrets, or broken file references.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.03%. Comparing base (14fee75) to head (11e86e1).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7975      +/-   ##
==========================================
- Coverage   66.13%   62.03%   -4.11%     
==========================================
  Files        2256     2276      +20     
  Lines       99392    99393       +1     
  Branches     8983     8979       -4     
==========================================
- Hits        65732    61657    -4075     
- Misses      31409    35564    +4155     
+ Partials     2251     2172      -79     

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

@AlexRubik AlexRubik added the t:llm Change Type - LLM related change (e.g. CLAUDE.md files) label Jul 14, 2026
@AlexRubik AlexRubik marked this pull request as ready for review July 14, 2026 16:48
@AlexRubik AlexRubik requested a review from a team as a code owner July 14, 2026 16:48
@AlexRubik AlexRubik requested a review from Banrion July 14, 2026 16:48
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 t:llm Change Type - LLM related change (e.g. CLAUDE.md files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant