agentleFS
SentryKnown publishergetsentry/sentry-dart/AGENTS.md

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…

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
  1. Very specific:

    Use fvm dart / fvm flutter if available (check with which fvm), else dart / flutter

    line 25
  2. Very specific:

    Check pubspec.yaml environment: section:

    line 29
  3. Very specific:

    Run from within the package directory (e.g., cd packages/dart/):

    line 36
  4. Distinctive:

    Ask clarifying questions and/or propose a plan before implementation

    line 50
  5. Distinctive:

    Write failing tests before implementation.

    line 51
  6. Distinctive:

    NEVER: commit or push code unless explicitly asked

    line 52
  7. Distinctive:

    Use the right AGENTS.md for the area you're working in:

    line 83
  8. Distinctive:

    When you hit a wall that an instruction would have prevented, a documented command/path is wrong, or a convention has changed — propose an …

    line 106
  9. Distinctive:

    Do NOT add task-specific fixes, things discoverable from code, or duplicates of what linters enforce.

    line 116

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Sentry Dart/Flutter SDK

Melos monorepo. Each package lives in packages/<name>/ with its own pubspec.yaml.

Packages

DirectoryDescription
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 | Dart 3.5.0
  • Use fvm dart / fvm flutter if available (check with which fvm), else dart / 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/):

TaskDart-onlyFlutter
Testdart test path/to/test.dartflutter test path/to/test.dart
Analyzedart analyze path/to/file.dartflutter analyze path/to/file.dart
Formatdart format path/to/file.dartdart format path/to/file.dart
Fixdart fix --applydart fix --apply
Web test—flutter test -d chrome path/to/test.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 version can leave the gate red. This has bitten packages/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 — its bin/cache/dart-sdk/bin/dart (reachable via fvm flutter if 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 Entry section to the PR description (not the file); apply the skip-changelog label to exclude. See CONTRIBUTING.md
  • See CONTRIBUTING.md for setup and contribution workflow

Command Execution

  • Verify working directory — use pwd to 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 with cd <path> &&. Change directory once if needed, then verify with pwd
  • Wildcard permissions — many commands are pre-approved with wildcards (e.g., git add:*). Flags like -C change the command prefix (git -C path add ≠ git add), triggering a confirmation prompt. Avoid -C when 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 to node or python for JSON parsing
  • GitHub — prefer gh CLI 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-By footer (e.g., Co-Authored-By: Claude <noreply@anthropic.com>)
  • File renames — always use git mv, never mv + git add
  • Commit types — see .github/release.yml for 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.md includes: 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 Entry section, or apply skip-changelog to 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.