From 69bb7e6ed8e6e15446f47d36bc317c9a4cbc0b1e Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Thu, 4 Dec 2025 16:31:39 +0000 Subject: [PATCH 1/3] Add AGENTS.md and CLAUDE.md --- AGENTS.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 58 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..5d7a3527fb --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,57 @@ +# AGENTS.md + +Datadog SDK for Android - Kotlin/Java observability (Logs, Traces, RUM, Session Replay, NDK, WebView, Flags). + +- Philosophy: [ZEN.md](ZEN.md) +- Setup, code style, testing conventions, CI commands: [CONTRIBUTING.md](CONTRIBUTING.md) + +## File Header + +All `.kt` and `.kts` files must start with: + +```kotlin +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ +``` + +## Commit & PR Conventions + +- Branch: `//` (internal) or `/` (external) +- Commit: `: ` (internal) or `` (external) +- PR title: same as commit format +- PR body: What, Motivation, Additional Notes (see `.github/PULL_REQUEST_TEMPLATE.md`) + +## Commands + +```bash +# Test single module +./gradlew :dd-sdk-android-core:testDebugUnitTest +./gradlew :features:dd-sdk-android-rum:testDebugUnitTest +./gradlew :integrations:dd-sdk-android-okhttp:testDebugUnitTest +./gradlew :module:testDebugUnitTest --tests "*.SomeTest" # single test +``` + +## Structure + +``` +dd-sdk-android-core/ # core: init, storage, upload +dd-sdk-android-internal/ # shared internal APIs +features/ # logs, rum, trace, ndk, session-replay, webview, flags +integrations/ # okhttp, timber, coil, glide, compose, rx, etc. +reliability/ # integration tests +tools/ # detekt, lint, unit utils +``` + +## Architecture + +- `DatadogCore` → `CoreFeature` → features +- Init: `Datadog.initialize()` then `Logs.enable()`, `Rum.enable()`, etc. +- Patterns: Registry, Provider (`TimeProvider`), Scope (RUM), DataWriter/Reader +- Forgeries: `{module}/src/test/.../forge/FooForgeryFactory` + +## Constraints + +- Min SDK 21, Java-compatible APIs, zero crashes, signed commits diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..eef4bd20cf --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md \ No newline at end of file From 7187288e9794cb35790e4ca8ab2a99b667f99f57 Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Thu, 4 Dec 2025 16:38:36 +0000 Subject: [PATCH 2/3] Fix path --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 5d7a3527fb..44f8017813 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ All `.kt` and `.kts` files must start with: - Branch: `//` (internal) or `/` (external) - Commit: `: ` (internal) or `` (external) - PR title: same as commit format -- PR body: What, Motivation, Additional Notes (see `.github/PULL_REQUEST_TEMPLATE.md`) +- PR body: What, Motivation, Additional Notes (see [PULL_REQUEST_TEMPLATE.md](.github/PULL_REQUEST_TEMPLATE.md)) ## Commands From d8b6e8c2cfec73960d366556bb228d75b22df119 Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Thu, 4 Dec 2025 16:53:34 +0000 Subject: [PATCH 3/3] Add local ci commands --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 44f8017813..12bf744c87 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,7 @@ All `.kt` and `.kts` files must start with: - Commit: `: ` (internal) or `` (external) - PR title: same as commit format - PR body: What, Motivation, Additional Notes (see [PULL_REQUEST_TEMPLATE.md](.github/PULL_REQUEST_TEMPLATE.md)) +- Before PR: run `./local_ci.sh -c -n -a` (compile, clean, analysis), then `./local_ci.sh -t` (tests) ## Commands