From a610db2ec6ca83eb45925b5fd5e97d649768f71a Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 8 Jun 2026 16:41:24 +0200 Subject: [PATCH 1/3] docs(ai): Refresh AGENTS.md module list and fix coding.mdc command The Module Architecture section omitted several product areas that now exist as modules and already have dedicated .cursor/rules: Session Replay, Feature Flags, Queues (Kafka), and JVM continuous profiling. Add them alongside the other previously-unlisted modules, and add a pointer to the repository's task-specific skills. Also fix a typo in coding.mdc where the per-file test command used ./gradle instead of ./gradlew. Co-Authored-By: Claude Opus 4.8 (1M context) --- .cursor/rules/coding.mdc | 4 ++-- AGENTS.md | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.cursor/rules/coding.mdc b/.cursor/rules/coding.mdc index e7af7273f15..4e6fd2538a3 100644 --- a/.cursor/rules/coding.mdc +++ b/.cursor/rules/coding.mdc @@ -24,13 +24,13 @@ sentry-java is the Java and Android SDK for Sentry. This repository contains the ./gradlew check # Run unit tests for a specific file -./gradle '::testDebugUnitTest' --tests="**" --info +./gradlew '::testDebugUnitTest' --tests="**" --info ``` ## Contributing Guidelines 1. Follow existing code style and language -2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them +2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them 3. Write comprehensive tests 4. New features should always be opt-in by default, extend `SentryOptions` or similar Option classes with getters and setters to enable/disable a new feature 5. Consider backwards compatibility diff --git a/AGENTS.md b/AGENTS.md index ff50727c662..9929ce73c54 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -92,6 +92,14 @@ make systemTest 6. **Format and regenerate**: Once done, format code and regenerate .api files: `./gradlew spotlessApply apiDump` 7. **Propose commit**: As final step, git stage relevant files and propose (but not execute) a single git commit command +## Repository Skills + +This repo ships task-specific skills (declared in `agents.toml`, sources under `.agents/skills`). Prefer them over performing the steps manually: +- **`create-java-pr`**: Branch, format, `apiDump`, commit, push, open PR, and add the changelog entry (automates the PR workflow above) +- **`test`**: Run unit or system tests for a module or a specific class +- **`check-code-attribution`**: Verify third-party code attribution on the current branch (see Third-Party Code Attribution below) +- **`btrace-perfetto`**: Capture and compare Perfetto traces for Android performance work + ## Module Architecture The repository is organized into multiple modules: @@ -100,15 +108,22 @@ The repository is organized into multiple modules: - **`sentry`** - Core Java SDK implementation - **`sentry-android-core`** - Core Android SDK implementation - **`sentry-android`** - High-level Android SDK +- **`sentry-android-ndk`** - Native (NDK) crash handling ### Integration Modules - **Spring Framework**: `sentry-spring*`, `sentry-spring-boot*` -- **Logging**: `sentry-logback`, `sentry-log4j2`, `sentry-jul` -- **Web**: `sentry-servlet*`, `sentry-okhttp`, `sentry-apache-http-client-5` +- **Logging**: `sentry-logback`, `sentry-log4j2`, `sentry-jul`, `sentry-android-timber` +- **Web**: `sentry-servlet*`, `sentry-okhttp`, `sentry-openfeign`, `sentry-apache-http-client-5` - **GraphQL**: `sentry-graphql*`, `sentry-apollo*` - **Android UI**: `sentry-android-fragment`, `sentry-android-navigation`, `sentry-compose` +- **Session Replay**: `sentry-android-replay` +- **Database**: `sentry-jdbc`, `sentry-android-sqlite`, `sentry-jcache` - **Reactive**: `sentry-reactor`, `sentry-ktor-client` +- **Feature Flags**: `sentry-launchdarkly-android`, `sentry-launchdarkly-server`, `sentry-openfeature` +- **Queues**: `sentry-kafka` +- **Profiling**: `sentry-async-profiler` (JVM continuous profiling) - **Monitoring**: `sentry-opentelemetry*`, `sentry-quartz` +- **Other**: `sentry-spotlight`, `sentry-kotlin-extensions`, `sentry-android-distribution` ### Utility Modules - **`sentry-test-support`** - Shared test utilities From ba2fdaf276d4e9963970ce2284e7292671aca50b Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 8 Jun 2026 17:43:00 +0200 Subject: [PATCH 2/3] docs(ai): Note moving changelog entries to Unreleased on rebase A rebase onto main can land a branch after a release was cut, leaving a new changelog entry under an already-released version heading. Document that the entry should be moved back into an Unreleased section at the top of CHANGELOG.md. Co-Authored-By: Claude Opus 4.8 (1M context) --- .cursor/rules/pr.mdc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cursor/rules/pr.mdc b/.cursor/rules/pr.mdc index e15c0a0a563..3a37ecc15f8 100644 --- a/.cursor/rules/pr.mdc +++ b/.cursor/rules/pr.mdc @@ -93,6 +93,8 @@ Entry format: - ([#](https://github.com/getsentry/sentry-java/pull/)) ``` +**When rebasing:** A rebase onto `main` can land your branch after a release was cut, where the `## Unreleased` heading your entry lived under has since been renamed to that version number. If that happens, move your new entry into an `## Unreleased` section at the top of `CHANGELOG.md` (create the section if it no longer exists) so it is not left under an already-released version. + Commit changelog separately: ```bash From b7094eeee64c664f4dfb14a5a6f6d784f4629128 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 8 Jun 2026 17:48:18 +0200 Subject: [PATCH 3/3] docs(ai): Add changelog rebase note to AGENTS.md AGENTS.md is the always-loaded entrypoint, so the rebase reminder reaches agents more reliably here than in an on-demand .cursor rule. Keep the detailed workflow in pr.mdc and point to it from here. Co-Authored-By: Claude Opus 4.8 (1M context) --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9929ce73c54..8d0cccabbc7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -186,6 +186,10 @@ gh pr view --json number -q '.number' gh pr view --json url -q '.url' ``` +### Changelog + +User-facing changes get an entry under the `## Unreleased` section of `CHANGELOG.md`. When rebasing onto `main`, a release may have renamed the `## Unreleased` heading your entry was under to a version number — if so, move your entry back into an `## Unreleased` section at the top of the file (create it if it no longer exists). See `.cursor/rules/pr.mdc` for the full changelog and PR workflow. + ## Useful Resources - Main SDK documentation: https://develop.sentry.dev/sdk/overview/