diff --git a/.cursor/rules/rule-management.mdc b/.cursor/rules/rule-management.mdc deleted file mode 100644 index 13343019b0..0000000000 --- a/.cursor/rules/rule-management.mdc +++ /dev/null @@ -1,56 +0,0 @@ ---- -description: Instructions for maintaining and updating Cursor rules for sentry-cli -alwaysApply: true ---- - -# Rule Management Guidelines - -## Proactive Rule Updates - -When conversations include new context that could be **generally applicable** to sentry-cli development, you should update the relevant rule files in `.cursor/rules/`. - -### What to Capture - -- **Development patterns** that emerge during problem-solving -- **Best practices** discovered or discussed -- **Common pitfalls** and how to avoid them -- **Workflow improvements** that benefit the team -- **Architecture decisions** that affect future development -- **Tool configurations** or setup requirements -- **Testing strategies** and patterns - -### What NOT to Capture - -- **Task-specific information** (one-time fixes, specific bug solutions) -- **Temporary workarounds** or experimental approaches -- **Personal preferences** that don't reflect team standards -- **Implementation details** for specific features - -## Update Strategy - -1. **Identify the appropriate rule file**: - - - `sentry-cli-project.mdc` - General project context - - `rust-development.mdc` - Rust-specific patterns - - `javascript-development.mdc` - JS/TS patterns - - `cicd-patterns.mdc` - CI/CD workflows - -2. **Update incrementally**: Add new insights to existing sections or create new sections as needed - -3. **Maintain clarity**: Keep rules focused, actionable, and well-organized - -4. **Preserve existing context**: Don't remove valuable information unless it's outdated - -5. **Don't repeat yourself**: Do not add redundant information to a rule. - -## When to Update Rules - -Update rules when you encounter: - -- New patterns that developers should follow consistently -- Solutions to common problems that could help future development -- Clarifications about existing practices -- Tool usage patterns that improve workflow -- Architecture insights that affect code organization - -Remember: Rules should capture knowledge that helps maintain consistency and quality across the sentry-cli codebase. diff --git a/.cursor/rules/cicd-patterns.mdc b/.github/workflows/AGENTS.md similarity index 91% rename from .cursor/rules/cicd-patterns.mdc rename to .github/workflows/AGENTS.md index 0ecfa13835..f4cc38a747 100644 --- a/.cursor/rules/cicd-patterns.mdc +++ b/.github/workflows/AGENTS.md @@ -1,9 +1,3 @@ ---- -description: CI/CD workflow patterns and conventions for sentry-cli -globs: .github/workflows/**/* -alwaysApply: false ---- - # CI/CD Workflow Guidelines ## Security: Pin Actions by Commit Hash @@ -13,11 +7,11 @@ alwaysApply: false Example: ```yaml -# ✅ CORRECT - Pinned by hash with version comment +# Correct - Pinned by hash with version comment - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 -# ❌ INCORRECT - Using version tag +# Incorrect - Using version tag - uses: actions/checkout@v4 - uses: actions/upload-artifact@v4.6.2 ``` diff --git a/.cursor/rules/sentry-cli-project.mdc b/AGENTS.md similarity index 81% rename from .cursor/rules/sentry-cli-project.mdc rename to AGENTS.md index 2a80dfaa30..86a9a090dd 100644 --- a/.cursor/rules/sentry-cli-project.mdc +++ b/AGENTS.md @@ -1,8 +1,3 @@ ---- -description: Core development guidelines and context for sentry-cli -alwaysApply: true ---- - # Sentry CLI Development Guidelines ## Project Overview @@ -65,4 +60,21 @@ Reference: https://develop.sentry.dev/engineering-practices/commit-messages/ - Test fixtures in `tests/integration/_fixtures/` - Cross-platform testing via CI matrix +## Code Formatting + +**ALWAYS** run `cargo fmt` before committing any Rust code changes to ensure consistent formatting across the codebase. + +## Updating These Guidelines + +Update AGENTS.md files when you encounter **generally applicable** patterns: +- Development patterns and best practices +- Common pitfalls and architecture decisions +- Workflow improvements and tool configurations + +**Do NOT capture**: Task-specific fixes, temporary workarounds, personal preferences. + +**Keep AGENTS.md files as concise as possible to minimize token usage.** + +--- + Remember: This is a production tool used by many developers. Changes should be well-tested, backward-compatible, and follow established patterns. diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 0f043c768c..0000000000 --- a/CLAUDE.md +++ /dev/null @@ -1,82 +0,0 @@ -# Claude Code Agent Guidelines - -This document provides guidance for you as the Claude Code agent on how to work with this project's context rules system. - -## Rule Location and Structure - -This project uses **Cursor's Context Rules** system located in `.cursor/rules/`. **ALWAYS** read and load the content of relevant rules from this directory into context when working on the codebase. - -### Discovering Available Rules - -Read all files in the `.cursor/rules/` directory to discover what rules are available. Each rule file uses the `.mdc` extension (Markdown with frontmatter). - -## Rule File Format - -Each rule file uses **Markdown with YAML frontmatter**: - -```markdown ---- -description: Brief description of what this rule covers -globs: file,patterns,**/*,that,trigger,this,rule -alwaysApply: false ---- - -# Rule Title - -Content of the rule in Markdown format... -``` - -### Frontmatter Properties - -- **`description`**: A concise explanation of what the rule covers -- **`globs`**: Comma-separated file patterns that trigger this rule (uses glob syntax) -- **`alwaysApply`**: Boolean indicating if you should always apply this rule regardless of file context - -## Using Rules as Claude Code - -### Mandatory Rule Loading - -You **MUST**: - -1. Read all rule files in `.cursor/rules/` to understand available rules -2. Load and follow the patterns and conventions defined in applicable rules -3. Apply all rules that have `alwaysApply: true` to every operation -4. Load context-specific rules based on the files you're modifying (matching globs) - -### When to Load Rules - -Load rules in these scenarios: - -- **File modifications**: Check globs in rule frontmatter to determine which rules apply to the files being changed -- **New feature development**: Load relevant domain-specific rules based on file patterns and descriptions -- **Code reviews**: Apply project standards and patterns from applicable rules -- **Planning tasks**: Consult rules for architectural guidance and best practices - -### Rule Selection Strategy - -1. **Always apply** rules with `alwaysApply: true` -2. **Match file patterns** - load rules whose globs match the files you're working with -3. **Domain context** - load language/technology-specific rules based on descriptions and file patterns -4. **Multiple rules** - load and apply multiple rules simultaneously when they apply to your current task - -### Reading Rules Into Context - -Access the `.cursor/rules/` directory and read rule file contents. Parse the frontmatter to determine: - -- Whether the rule applies to your current task (`alwaysApply` or matching `globs`) -- What the rule covers based on the `description` -- Which files trigger the rule based on `globs` patterns - -## Important Notes - -- **Do NOT duplicate rule content** in your responses - reference and follow the rules instead -- **Always check all rules** - examine the directory contents to ensure you don't miss any rules -- **Follow rule hierarchies** - general project rules combined with specific technology rules -- **Use rules for consistency** - ensure all code changes align with established patterns -- **Parse frontmatter carefully** - use the metadata to determine rule applicability - -Treat these rules as **mandatory guidance** that you must follow for all code changes and development activities within this project. - -# Code Formatting - -**ALWAYS** run `cargo fmt` before committing any Rust code changes to ensure consistent formatting across the codebase. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000000..47dc3e3d86 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/apple-catalog-parsing/AGENTS.md b/apple-catalog-parsing/AGENTS.md new file mode 120000 index 0000000000..5aab044e28 --- /dev/null +++ b/apple-catalog-parsing/AGENTS.md @@ -0,0 +1 @@ +../src/AGENTS.md \ No newline at end of file diff --git a/.cursor/rules/javascript-development.mdc b/lib/AGENTS.md similarity index 83% rename from .cursor/rules/javascript-development.mdc rename to lib/AGENTS.md index c87041a36b..82e8da60f7 100644 --- a/.cursor/rules/javascript-development.mdc +++ b/lib/AGENTS.md @@ -1,9 +1,3 @@ ---- -description: JavaScript/TypeScript development patterns for sentry-cli npm wrapper -globs: js/**/*,scripts/**/*,package.json,*.js -alwaysApply: false ---- - # JavaScript Development Guidelines ## Code Organization diff --git a/scripts/AGENTS.md b/scripts/AGENTS.md new file mode 120000 index 0000000000..a94bf8b70a --- /dev/null +++ b/scripts/AGENTS.md @@ -0,0 +1 @@ +../lib/AGENTS.md \ No newline at end of file diff --git a/.cursor/rules/rust-development.mdc b/src/AGENTS.md similarity index 95% rename from .cursor/rules/rust-development.mdc rename to src/AGENTS.md index a25740e32f..4562b7d5b1 100644 --- a/.cursor/rules/rust-development.mdc +++ b/src/AGENTS.md @@ -1,9 +1,3 @@ ---- -description: Rust development patterns and conventions for sentry-cli -globs: *.rs,Cargo.*,.cargo/**/*,src/**/*,apple-catalog-parsing/**/* -alwaysApply: false ---- - # Rust Development Guidelines ## Code Organization