Melos monorepo. Each package lives in packages/<name>/ with its own pubspec.yaml.
| Directory | Description |
|---|---|
packages/dart/ |
Core Sentry Dart SDK |
packages/flutter/ |
Sentry Flutter SDK (includes native integrations) |
packages/dio/ |
Dio HTTP client integration |
packages/drift/ |
Drift database integration |
packages/file/ |
File I/O integration |
packages/hive/ |
Hive database integration |
packages/isar/ |
Isar database integration |
packages/sqflite/ |
SQLite integration |
packages/logging/ |
Dart logging integration |
packages/supabase/ |
Supabase integration |
packages/firebase_remote_config/ |
Firebase Remote Config integration |
packages/link/ |
GraphQL integration |
- Flutter
3.24.0| Dart3.5.0 - Use
fvm dart/fvm flutterif available (check withwhich fvm), elsedart/flutter
Check pubspec.yaml environment: section:
- Dart-only (no
flutter:key):sentry,sentry_dio,sentry_file,sentry_logging - Flutter (has
flutter:key):sentry_flutter,sentry_sqflite,sentry_drift, etc.
Run from within the package directory (e.g., cd packages/dart/):
| Task | Dart-only | Flutter |
|---|---|---|
| Test | dart test path/to/test.dart |
flutter test path/to/test.dart |
| Analyze | dart analyze path/to/file.dart |
flutter analyze path/to/file.dart |
| Format | dart format path/to/file.dart |
dart format path/to/file.dart |
| Fix | dart fix --apply |
dart fix --apply |
| Web test | — | flutter test -d chrome path/to/test.dart |
- Ask clarifying questions and/or propose a plan before implementation
- Write failing tests before implementation; fix regressions with a reproducing test first
- NEVER commit or push code unless explicitly asked
- See
CONTRIBUTING.mdfor setup and contribution workflow
- Verify working directory — use
pwdto confirm you're in the correct path before running commands. The shell persists working directory across tool calls - Avoid redundant
cd— do not prefix every command withcd <path> &&. Change directory once if needed, then verify withpwd - Wildcard permissions — many commands are pre-approved with wildcards (e.g.,
git add:*). Flags like-Cchange the command prefix (git -C path add≠git add), triggering a confirmation prompt. Avoid-Cwhen you can change directory instead - Prefer small, focused commands over one massive pipeline. Break complex operations into multiple steps
- JSON processing — always use
jq; do not shell out tonodeorpythonfor JSON parsing - GitHub — prefer
ghCLI over web scraping when interacting with GitHub.com
- Conventional Commits 1.0.0 — subject max 50 chars, body max 72 chars/line
- AI attribution — AI-generated commits must include a
Co-Authored-Byfooter (e.g.,Co-Authored-By: Claude <noreply@anthropic.com>) - File renames — always use
git mv, nevermv+git add - Commit types — see
.github/release.ymlfor the list of types and how they map to changelog categories
- Title — same format as commit subject where the beginning of subject must be capitalized for human-authored PRs (Conventional Commits):
type(scope): Capitalized description(automated bot PRs may start lowercase) - Branch naming —
<type>/<short-description>(e.g.,feat/session-replay-privacy,fix/memory-leak-scope) - PR template —
.github/pull_request_template.mdincludes: description, motivation, how tested, checklist - Reviewers — assigned via
CODEOWNERS(.github/CODEOWNERS); one maintainer approval is sufficient - Changelog — auto-generated from PR titles; see CONTRIBUTING.md for policy and custom entries
- Draft PRs — use for work-in-progress; convert to ready when seeking review
Use the right AGENTS.md for the area you're working in:
- Core SDK (
packages/dart/) →packages/dart/AGENTS.md - Flutter SDK (
packages/flutter/) →packages/flutter/AGENTS.md - General → This file for monorepo-wide commands and conventions
- test-guidelines — Writing or modifying tests
- code-guidelines — Implementing features, refactoring, or reviewing code
When you hit a wall that an instruction would have prevented, a documented command/path is wrong, or a convention has changed — propose an update to the relevant file:
AGENTS.md— commands, environment, package structure, conventions.agents/skills/test-guidelines/SKILL.md— Writing or modifying tests.agents/skills/code-guidelines/SKILL.md— Implementing features, refactoring, or reviewing code
Do NOT add task-specific fixes, things discoverable from code, or duplicates of what linters enforce. Always propose changes — do not silently edit these files.