Skip to content

feat: Add AGENTS.md#4974

Open
jamescrosswell wants to merge 3 commits intomainfrom
agents-md
Open

feat: Add AGENTS.md#4974
jamescrosswell wants to merge 3 commits intomainfrom
agents-md

Conversation

@jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Mar 3, 2026

Closes #4971

Summary

Adds AGENTS.md at the repo root (with a CLAUDE.md symlink) per the repository-docs standard and the agents-md skill. Also added a symlink for copilot as that's what I'm using mostly in Rider.

Testing

Tested by asking (in copilot in my case, but using the Claude Sonnet 4.6 model): Implement https://github.com/getsentry/sentry-dotnet/issues/4105 and create a pull request for this. Claude implemented this in:

#skip-changelog

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against bc742fc

@jamescrosswell jamescrosswell mentioned this pull request Mar 3, 2026
@jamescrosswell
Copy link
Collaborator Author

@Flash0ver I think this is probably a good starting point. We can always tweak it later after we've used it a bit if we find there are things it's consistently doing or not doing properly.

## Key Conventions

- New features must be **opt-in** — extend `SentryOptions` or relevant options class with getters/setters
- Maintain **backwards compatibility** — avoid breaking public API without strong justification
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: kinds of breaking changes

Binary incompatible / Source incompatible / Behavioral change

Shall we clarify that we are generally fine with Binary Breaking Changes in minor versions,
but not with Source Breaking changes ... and that we consider Behavioral Breaking changes only in rare exceptions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future consideration ... could also be in CONTRIBUTING.md
we also do evaluate on a case-by-case basis

Uses the .NET SDK (`dotnet` CLI). Key files:
- `Sentry.slnx` — full solution (all platforms/samples)... rarely used directly
- `global.json` — pins .NET SDK and Workload versions
- `Directory.Build.props` / `Directory.Build.targets` — shared MSBuild properties across all projects
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Directory.Build.props and Directory.Build.targets in sub-directories?

I noticed quite often that AI coding tools don't get MSBuild's hierarchical structure correctly:

  1. first Directory.Build.props/.targets found upwards from the project's location
  2. more parent Directory.Build.props/.targets files only if imported explicitly

So I'm wondering, if we should mention the other files, too ... something like:

- `samples/Directory.Build.props` / `samples/Directory.Build.targets` - shared MSBuild properties across all projects in the `samples` directory
- `src/Directory.Build.props` / `src/Directory.Build.targets` - shared MSBuild properties across all projects in the `src` directory
- `test/Directory.Build.props` / `test/Directory.Build.targets` - shared MSBuild properties across all projects in the `test` directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future consideration

pwsh scripts/device-test.ps1 ios

# Format code
dotnet format Sentry.slnx --no-restore --exclude ./modules --exclude ./**/*OptionsSetup.cs --exclude ./test/Sentry.Tests/AttributeReaderTests.cs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: .editorconfig

I wonder if it's worth pointing out to our .editorconfig for our C# code conventions.
Maybe in a separate section ## C# 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future consideration: run dotnet format ... before every commit (considering the .editorconfig)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AGENTS.md

2 participants