sentry-dart
AGENTS.md873 starsChanged 5 months agoMITView on GitHub
Melos monorepo. Each package lives in packages/<name>/ with its own pubspec.yaml. Check pubspec.yaml environment: section: Run from within the package directory (e.g., cd packages/dart/): Format version footgun: CI's analyze gate (.github/workflows/analyze.yml) runs dart format --set-exit-if-changed ./ using the dart set up for that job's sdk input — setup-dart for dart packages, flutter-action's Flutter-bundled dart (stable channel) for flutter packages — not the package's environment: constraint. dart_style differs between Dart minor versions, so formatting with a local dart of a different…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- packages/dart/AGENTS.mdAGENTS.md
- packages/flutter/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- packages/dart/CLAUDE.mdCLAUDE.md
- packages/flutter/CLAUDE.mdCLAUDE.md
- code-guidelinesSkill
- design-firstSkill
- diagnosing-bugsSkill
- reviewSkill
- specSkill
- test-guidelinesSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Use fvm dart / fvm flutter if available (check with which fvm), else dart / flutter
- Very specific: line 29
Check pubspec.yaml environment: section:
- Very specific: line 36
Run from within the package directory (e.g., cd packages/dart/):
- Distinctive: line 50
Ask clarifying questions and/or propose a plan before implementation
- Distinctive: line 51
Write failing tests before implementation.
- Distinctive: line 52
NEVER: commit or push code unless explicitly asked
- Distinctive: line 83
Use the right AGENTS.md for the area you're working in:
- Distinctive: line 106
When you hit a wall that an instruction would have prevented, a documented command/path is wrong, or a convention has changed — propose an …
- Distinctive: line 116
Do NOT add task-specific fixes, things discoverable from code, or duplicates of what linters enforce.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sentry Dart/Flutter SDK
Melos monorepo. Each package lives in packages/<name>/ with its own pubspec.yaml.
Packages
| 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 |
Environment
- Flutter
3.24.0| Dart3.5.0 - Use
fvm dart/fvm flutterif available (check withwhich fvm), elsedart/flutter
Package Types
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.
File-Scoped Commands
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 |
Format version footgun: CI's
analyzegate (.github/workflows/analyze.yml) runsdart format --set-exit-if-changed ./using the dart set up for that job'ssdkinput —setup-dartfor dart packages,flutter-action's Flutter-bundled dart (stable channel) for flutter packages — not the package'senvironment:constraint.dart_stylediffers between Dart minor versions, so formatting with a local dart of a different version can leave the gate red. This has bittenpackages/flutter(Flutter-bundled Dart 3.12 joined a line that system Dart 3.10 didn't). Before pushing format changes to a flutter package, format with the Flutter SDK's bundled dart — itsbin/cache/dart-sdk/bin/dart(reachable viafvm flutterif you use fvm) — and verify with--output=none --set-exit-if-changed.
Conventions
- 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
- NEVER edit
CHANGELOG.md— entries are auto-generated by craft from the PR title. For a custom entry, add a## Changelog Entrysection to the PR description (not the file); apply theskip-changeloglabel to exclude. See CONTRIBUTING.md - See
CONTRIBUTING.mdfor setup and contribution workflow
Command Execution
- 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
Commits
- 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
Pull Requests
- 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 — never edit
CHANGELOG.md; entries are auto-generated by craft from the PR title. Put a custom entry in the PR description's## Changelog Entrysection, or applyskip-changelogto exclude. See CONTRIBUTING.md - Draft PRs — use for work-in-progress; convert to ready when seeking review
Context-Aware Loading
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
Skills
These form a workflow pipeline — each is model-invoked (the agent reaches for it on its triggers) and hands off to the next:
spec → design-first → code-guidelines + test-guidelines → diagnosing-bugs → review
- spec — Turn an issue link or a fuzzy ask into a verified spec (acceptance criteria) before design — the what
- design-first — Shape non-trivial work before writing it: modules, seams, public API surface — the how
- code-guidelines — Implement / refactor / review against the SDK's rules and constraints
- test-guidelines — Write or modify tests
- diagnosing-bugs — Hard bugs, flaky tests, CI hangs, performance regressions
- review — Three-axis branch review: Standards (our docs + public API surface), Spec (vs the spec above), Correctness (runtime bugs + SDK threat model)
With plan mode: plan mode enforces read-only + the approval gate; these skills supply the content. Plan with spec (the what) and design-first (the how) — their acceptance criteria + design sketch are the plan, and ExitPlanMode is the single sign-off (don't run a separate approval). code-guidelines is the constraint set the design must satisfy, not the driver. After approval, implement under code-guidelines / test-guidelines.
Maintaining Agent Docs
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/spec/SKILL.md— Turning an issue link or a fuzzy ask into a verified spec before design.agents/skills/design-first/SKILL.md— Shaping non-trivial work before writing it.agents/skills/code-guidelines/SKILL.md— Implementing features, refactoring, or reviewing code.agents/skills/test-guidelines/SKILL.md— Writing or modifying tests.agents/skills/diagnosing-bugs/SKILL.md— Hard bugs, flaky tests, CI hangs, performance regressions.agents/skills/review/SKILL.md— Three-axis branch review (Standards + Spec + Correctness)
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

