Skip to content

Commit 51dfec5

Browse files
solnicCopilot
andauthored
docs: add AGENTS.md and CLAUDE.md symlink (#2900)
Add agent-facing documentation covering monorepo structure, file-scoped build/test/lint commands, testing conventions, and commit attribution as required by the repository-docs standard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ebb05d6 commit 51dfec5

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Agent Instructions
2+
3+
## Package Manager
4+
Use **Bundler**. Each gem has its own `Gemfile`; run commands from within the gem subdirectory.
5+
```bash
6+
cd sentry-ruby && bundle install
7+
```
8+
9+
## Monorepo Structure
10+
| Gem | Path | Description |
11+
|-----|------|-------------|
12+
| `sentry-ruby` | `sentry-ruby/` | Core SDK — all other gems depend on this |
13+
| `sentry-rails` | `sentry-rails/` | Rails integration |
14+
| `sentry-sidekiq` | `sentry-sidekiq/` | Sidekiq integration |
15+
| `sentry-resque` | `sentry-resque/` | Resque integration |
16+
| `sentry-delayed_job` | `sentry-delayed_job/` | DelayedJob integration |
17+
| `sentry-opentelemetry` | `sentry-opentelemetry/` | OpenTelemetry integration |
18+
19+
Shared test infrastructure lives in `lib/sentry/test/`. Root `Gemfile.dev` defines shared dev dependencies.
20+
21+
## File-Scoped Commands
22+
Run from within the target gem directory (e.g. `cd sentry-ruby`):
23+
24+
| Task | Command |
25+
|------|---------|
26+
| Install deps | `bundle install` |
27+
| Run all tests | `bundle exec rake` |
28+
| Run single spec | `bundle exec rspec spec/sentry/client_spec.rb` |
29+
| Lint | `bundle exec rubocop path/to/file.rb` |
30+
| Lint (autofix) | `bundle exec rubocop -a path/to/file.rb` |
31+
32+
Root-level `bundle exec rubocop` lints the entire repo. Root-level `bundle exec rake` runs the E2E/integration spec suite (not individual gem tests).
33+
34+
## Testing Conventions
35+
- Framework: **RSpec**
36+
- Spec files mirror source: `lib/sentry/client.rb``spec/sentry/client_spec.rb`
37+
- Isolated specs go in `spec/isolated/` (loaded in separate processes)
38+
- `sentry-rails` has `spec/versioned/` for Ruby-version-specific specs
39+
- Environment variables control version matrices: `RAILS_VERSION`, `SIDEKIQ_VERSION`, `RACK_VERSION`, `REDIS_RB_VERSION`
40+
- Every behavioral change needs a spec. Bug fixes need a regression test.
41+
42+
## Commit Attribution
43+
AI commits MUST include:
44+
```
45+
Co-Authored-By: <agent-name> <noreply@example.com>
46+
```
47+
48+
## Standards Overrides
49+
- Changelog: DO NOT update `CHANGELOG.md` as it is automatically generated during the release process
50+
- Linting: RuboCop with `rubocop-rails-omakase` base — see `.rubocop.yml`
51+
- See `CONTRIBUTING.md` for release process and contribution workflow

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

0 commit comments

Comments
 (0)