agentleFS
SentryKnown publishergetsentry/sentry-ruby/AGENTS.md

sentry-ruby

AGENTS.md989 starsChanged 5 months agoMITView on GitHub

Shared test infrastructure lives in lib/sentry/test/. Root Gemfile.dev defines shared dev dependencies. Root-level bundle exec rake runs the E2E/integration spec suite (not individual gem tests).

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 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.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use bin/test (from the repo root) to run a gem's specs under a single CI test-matrix cell — the local mirror of one CI job.

    line 25
  2. Distinctive:

    Every behavioral change needs a spec.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Agent Instructions

Toolchain (mise)

mise manages Rubies and runs tasks. .mise.toml pins a single default Ruby for local work; .mise.ci.toml (loaded with MISE_ENV=ci) pins the full per-matrix Ruby set that CI, bin/test, and bin/relock resolve against.

mise install              # install the default toolchain (.mise.toml)
mise --env ci install     # install the full CI matrix of Rubies (needed for bin/test)

Monorepo Structure

GemPathDescription
sentry-rubysentry-ruby/Core SDK — all other gems depend on this
sentry-railssentry-rails/Rails integration
sentry-sidekiqsentry-sidekiq/Sidekiq integration
sentry-resquesentry-resque/Resque integration
sentry-delayed_jobsentry-delayed_job/DelayedJob integration
sentry-opentelemetrysentry-opentelemetry/OpenTelemetry integration
sentry-yabedasentry-yabeda/Yabeda integration

Shared test infrastructure lives in lib/sentry/test/. Root Gemfile.dev defines shared dev dependencies.

Testing

Use bin/test (from the repo root) to run a gem's specs under a single CI test-matrix cell — the local mirror of one CI job. The Ruby must already be installed (mise --env ci install). You can also invoke bin/test from any of the gem directories themselves which automatically fills in the --gem part.

TaskCommand
List every cell to choose frombin/test -l
Run a gem (auto-picks newest installed Ruby cell)bin/test --gem sentry-rails
Run a single specbin/test --gem sentry-ruby spec/sentry/client_spec.rb
Run a specific cellbin/test --cell sentry-ruby/gemfiles/ruby-3.3_rack-3_redis-4.gemfile
Forward args to rspecbin/test --cell <cell> -- --tag foo
Run full CI rake taskbin/test --gem <gem> --rake

Root-level bundle exec rake runs the E2E/integration spec suite (not individual gem tests).

Lint

Linting runs through mise tasks from the repo root. Rubocop lives in its own Gemfile.rubocop (not the test matrix), which the tasks select automatically.

TaskCommand
Lint the whole repomise run lint
Lint + autocorrectmise run lint:fix
Lint specific pathsmise run lint path/to/file.rb

Testing Conventions

  • Framework: RSpec
  • Spec files mirror source: lib/sentry/client.rb → spec/sentry/client_spec.rb
  • Isolated specs go in spec/isolated/ (loaded in separate processes)
  • sentry-rails has spec/versioned/ for Ruby-version-specific specs
  • Environment variables control version matrices: RAILS_VERSION, SIDEKIQ_VERSION, RACK_VERSION, REDIS_RB_VERSION
  • Every behavioral change needs a spec. Bug fixes need a regression test.

Commit Attribution

AI commits MUST include:

Co-Authored-By: <agent-name> <noreply@example.com>

Standards Overrides

  • Changelog: DO NOT update CHANGELOG.md as it is automatically generated during the release process
  • Linting: RuboCop with rubocop-rails-omakase base — see .rubocop.yml
  • See CONTRIBUTING.md for release process and contribution workflow

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.