Skip to content

Add Cursor IDE support (.cursorrules and .cursor/rules/)#3019

Merged
brendancol merged 2 commits into
xarray-contrib:mainfrom
Melissari1997:issue-3014
Jun 8, 2026
Merged

Add Cursor IDE support (.cursorrules and .cursor/rules/)#3019
brendancol merged 2 commits into
xarray-contrib:mainfrom
Melissari1997:issue-3014

Conversation

@Melissari1997
Copy link
Copy Markdown
Collaborator

Closes #3014

Summary

  • Added .cursorrules at the repo root with project-wide context for Cursor's agent system
  • Added .cursor/rules/ directory with 22 .mdc rule files mirroring the existing Claude/Codex/Kilo commands
  • No changes to source code, tests, documentation build, or CI pipelines

Rule coverage

All existing commands from .claude/commands/, .codex/commands/, and .kilo/command/ are mirrored:

Rule Purpose
backend-parity Cross-backend consistency audit
bench ASV benchmark comparison
dask-notebook Dask ETL notebook creation
deep-sweep Multi-sweep dispatch for a single module
efficiency-audit Performance anti-pattern detection
new-issues Feature gap analysis and issue creation
ready-to-merge PR readiness scan
release-major Major release workflow
release-minor Minor release workflow
release-patch Patch release workflow
review-contributor-pr Security prescreen for outside contributor PRs
review-pr Domain-aware PR review
rockout End-to-end issue-to-implementation workflow
sweep-accuracy Numerical accuracy audit
sweep-api-consistency API consistency audit
sweep-metadata Metadata propagation audit
sweep-performance Performance bottleneck audit
sweep-security Security vulnerability audit
sweep-style PEP8 and style audit
sweep-test-coverage Test coverage gap audit
user-guide-notebook User guide notebook creation
validate Numerical accuracy and backend parity check

Test plan

  • No source code changes -- purely additive
  • .cursor/ excluded from distributions (not in MANIFEST.in or pyproject.toml)
  • No CI pipeline changes
  • Rule files have valid YAML frontmatter

@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Jun 7, 2026
Copy link
Copy Markdown
Collaborator Author

@Melissari1997 Melissari1997 left a comment

Choose a reason for hiding this comment

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

PR Review: Add Cursor IDE support (.cursorrules and .cursor/rules/)

Suggestions (should fix, not blocking)

  • .cursorrules:5 references .kilo/worktrees/ paths. This is Kilo-specific internal structure. Cursor agents won't have access to Kilo worktrees. Either remove this reference or generalize it to describe the worktree pattern without naming Kilo's directory structure.
  • rockout.mdc and deep-sweep.mdc reference .kilo/worktrees/ for git worktree isolation. Cursor doesn't use Kilo's worktree convention. The worktree isolation contract should be adapted for Cursor's context (e.g., suggest using git worktree add with a Cursor-appropriate path like .cursor/worktrees/).
  • release-major.mdc, release-minor.mdc, release-patch.mdc are nearly identical (85 lines each, differing only in the version increment step). Consider whether Cursor's rule system supports a shared base rule or parameterized rules. If not, the duplication is acceptable but worth noting for future maintenance.
  • Several sweep rules (sweep-accuracy.mdc, sweep-metadata.mdc, etc.) reference updating state CSV files at .kilo/worktrees/sweep-*-state.csv. This path is Kilo-specific. Either adapt to a Cursor-appropriate path or note that state tracking is tool-specific.
  • The globs field in some rules is set to "*.py" for rules that don't actually operate on Python files (e.g., ready-to-merge.mdc operates on PR metadata, new-issues.mdc operates on README.md and GitHub issues). Consider using more accurate globs or leaving globs empty for non-file-specific rules.

Nits (optional improvements)

  • bench.mdc:1 globs is "*.py" but the rule operates on ASV benchmarks in benchmarks/. Consider globs: "benchmarks/**/*.py".
  • release-major.mdc:1, release-minor.mdc:1, release-patch.mdc:1 all have globs: "" (empty string). Consider omitting the field or using globs: [] if the format supports it.
  • The validate.mdc rule references [TOOL: humanize] which is a Kilo-specific tool reference. Cursor doesn't have this tool. Either remove these references or replace with Cursor-equivalent guidance.

What looks good

  • All 22 commands from .claude/commands/, .codex/commands/, and .kilo/command/ are represented
  • YAML frontmatter is consistent and well-structured across all files
  • The .cursorrules file provides good project-wide context (architecture, conventions, backend dispatch pattern)
  • Purely additive change -- no existing files modified
  • Rule content is concise and actionable, adapted well from the longer source commands

Checklist

  • All source commands have corresponding Cursor rules
  • YAML frontmatter present on all .mdc files
  • No source code changes
  • No CI pipeline changes
  • Kilo-specific paths generalized for Cursor
  • Tool-specific references (humanize, worktrees) adapted

Copy link
Copy Markdown
Collaborator Author

@Melissari1997 Melissari1997 left a comment

Choose a reason for hiding this comment

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

Follow-up Review: Address review feedback (#3014)

Applied the following fixes from the initial review:

  • rockout.mdc: Changed .kilo/worktrees/ to .worktrees/ for tool-agnostic worktree paths
  • ready-to-merge.mdc: Changed globs: "*.py" to alwaysApply: true (operates on PR metadata, not Python files)
  • new-issues.mdc: Changed globs: "README.md" to alwaysApply: true (operates on feature matrix and GitHub issues)
  • bench.mdc: Changed globs: "*.py" to globs: "benchmarks/**/*.py" (targets benchmark files specifically)
  • release-major.mdc, release-minor.mdc, release-patch.mdc: Changed globs: "" to alwaysApply: true (release workflows are not file-scoped)

Dismissed findings:

  • Release rule duplication (major/minor/patch): Cursor does not support shared base rules or parameterized rules, so the duplication is necessary and acceptable

@brendancol
Copy link
Copy Markdown
Contributor

@Melissari1997 are you personally a cursor user or is this more for general ecosystem support?

@Melissari1997
Copy link
Copy Markdown
Collaborator Author

I use cursor every day at work, but for personal project like this I use kilo code
I thought it would be helpful to support a widely used tool such as a cursor

Copy link
Copy Markdown
Contributor

@brendancol brendancol left a comment

Choose a reason for hiding this comment

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

@Melissari1997 It could be a slippery slope moving forward as folks use different tools, but Cursor certainly is a big one and the important thing to me now is facilitating multiple perspectives to find stability issues.

@brendancol brendancol merged commit 023b742 into xarray-contrib:main Jun 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Cursor

2 participants