[PM-37613] Add DIRT team CLAUDE.md files (server)#7975
Conversation
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]
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed three new scoped Code Review DetailsNo findings. The documentation is accurate, follows |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
🎟️ Tracking
PM-37613 (parent: PM-34594)
📔 Objective
Adds three scoped
CLAUDE.mdfiles 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 subsystemREADME.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 itsEventsProcessorsibling, including the cloud vs self-hosted write paths (AzureQueueHostedServicevsRepositoryEventWriteService) 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-devvia**/Dirtandsrc/Events), so no CODEOWNERS change is needed.📸 Screenshots
Not applicable, docs only.