Skip to content

Commit 8a7d5d4

Browse files
meta: Migrate AI agent rules to AGENTS.md format (#3078)
### Description Migrate AI agent rules from Cursor-specific format to the standardized AGENTS.md format, enabling compatibility with Claude Code, Cursor, and 60+ other AI coding tools. The existing rules were Cursor-only, requiring workarounds for Claude Code. AGENTS.md is an open standard that allows a single set of rules to work everywhere. Directory-scoped files replace glob patterns through proximity matching (nearest AGENTS.md to edited file wins). Considered maintaining separate rule files for each tool but that would require duplicating content and keeping them in sync. The AGENTS.md format is identical to Claude Code's CLAUDE.md format, so a symlink provides native Claude support without duplication. ### Issues N/A Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent 9f34df8 commit 8a7d5d4

File tree

8 files changed

+22
-163
lines changed

8 files changed

+22
-163
lines changed

.cursor/rules/rule-management.mdc

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
---
2-
description: CI/CD workflow patterns and conventions for sentry-cli
3-
globs: .github/workflows/**/*
4-
alwaysApply: false
5-
---
6-
71
# CI/CD Workflow Guidelines
82

93
## Security: Pin Actions by Commit Hash
@@ -13,11 +7,11 @@ alwaysApply: false
137
Example:
148

159
```yaml
16-
# ✅ CORRECT - Pinned by hash with version comment
10+
# Correct - Pinned by hash with version comment
1711
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1812
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
1913

20-
# ❌ INCORRECT - Using version tag
14+
# Incorrect - Using version tag
2115
- uses: actions/checkout@v4
2216
- uses: actions/[email protected]
2317
```
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
description: Core development guidelines and context for sentry-cli
3-
alwaysApply: true
4-
---
5-
61
# Sentry CLI Development Guidelines
72

83
## Project Overview
@@ -65,4 +60,21 @@ Reference: https://develop.sentry.dev/engineering-practices/commit-messages/
6560
- Test fixtures in `tests/integration/_fixtures/`
6661
- Cross-platform testing via CI matrix
6762

63+
## Code Formatting
64+
65+
**ALWAYS** run `cargo fmt` before committing any Rust code changes to ensure consistent formatting across the codebase.
66+
67+
## Updating These Guidelines
68+
69+
Update AGENTS.md files when you encounter **generally applicable** patterns:
70+
- Development patterns and best practices
71+
- Common pitfalls and architecture decisions
72+
- Workflow improvements and tool configurations
73+
74+
**Do NOT capture**: Task-specific fixes, temporary workarounds, personal preferences.
75+
76+
**Keep AGENTS.md files as concise as possible to minimize token usage.**
77+
78+
---
79+
6880
Remember: This is a production tool used by many developers. Changes should be well-tested, backward-compatible, and follow established patterns.

CLAUDE.md

Lines changed: 0 additions & 82 deletions
This file was deleted.

CLAUDE.md

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

apple-catalog-parsing/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../src/AGENTS.md
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
---
2-
description: JavaScript/TypeScript development patterns for sentry-cli npm wrapper
3-
globs: js/**/*,scripts/**/*,package.json,*.js
4-
alwaysApply: false
5-
---
6-
71
# JavaScript Development Guidelines
82

93
## Code Organization

scripts/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../lib/AGENTS.md
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
---
2-
description: Rust development patterns and conventions for sentry-cli
3-
globs: *.rs,Cargo.*,.cargo/**/*,src/**/*,apple-catalog-parsing/**/*
4-
alwaysApply: false
5-
---
6-
71
# Rust Development Guidelines
82

93
## Code Organization

0 commit comments

Comments
 (0)