Skip to content

Add support for Cursor #3014

@Melissari1997

Description

@Melissari1997

Reason or Problem

The xarray-spatial project currently maintains command definitions for Claude Code (.claude/commands/), Codex (.codex/commands/), and Kilo (.kilo/command/) to support AI-assisted development workflows. However, there is no equivalent support for Cursor, a popular AI-powered IDE.

Contributors who use Cursor cannot leverage the project's established automated workflows (sweeps, releases, PR reviews, validations, etc.) because Cursor looks for rules/commands in a .cursor/ directory, which does not exist.

Proposal

Add a .cursor/ directory containing Cursor-compatible command/rule definitions. These mirror the existing Claude/Codex/Kilo commands but are formatted for Cursor's agent system, enabling Cursor users to run the same automated workflows.

Design:

Cursor loads custom instructions and rules from .cursor/rules/ (.mdc files) and agent instructions from .cursorrules at the repository root. The implementation would add:

  1. A .cursorrules file at the repo root with project-wide context (architecture, conventions, AI policy)
  2. A .cursor/rules/ directory with .mdc rule files corresponding to existing commands:
Rule Purpose
backend-parity.mdc Check backend implementation parity
bench.mdc Run and analyze benchmarks
deep-sweep.mdc Comprehensive code sweep
new-issues.mdc Process and triage new GitHub issues
ready-to-merge.mdc Validate PR readiness for merge
release-major.mdc Execute major release workflow
release-minor.mdc Execute minor release workflow
release-patch.mdc Execute patch release workflow
review-contributor-pr.mdc Review external contributor PRs
review-pr.mdc General PR review
sweep-accuracy.mdc Sweep for numerical accuracy issues
sweep-api-consistency.mdc Sweep for API consistency
sweep-metadata.mdc Sweep for metadata correctness
sweep-performance.mdc Sweep for performance bottlenecks
sweep-security.mdc Sweep for security vulnerabilities
sweep-style.mdc Sweep for code style issues
sweep-test-coverage.mdc Sweep for test coverage gaps
validate.mdc Validate code and documentation

No changes are made to existing .claude/, .codex/, .kilo/, or any source code. This is purely additive.

Usage:

  1. Open the xarray-spatial repository in Cursor
  2. Cursor automatically picks up .cursorrules for project context
  3. Rules in .cursor/rules/ are available via Cursor's rule system (triggered by file context or manual invocation)
  4. Contributors can use Cursor's Agent mode to run workflows like /sweep-security, /review-pr, etc.

Value:

  • Broader tool support: Cursor is one of the most widely adopted AI IDEs; contributors using it gain access to the same automated workflows
  • Consistency: All four AI tools (Claude, Codex, Kilo, Cursor) share equivalent command coverage
  • Zero risk: Purely additive change; no existing tooling or code is modified
  • Contributor experience: Lowers barrier for Cursor users to contribute effectively

Stakeholders and Impacts

Stakeholders:

  • Core maintainers who use Cursor for day-to-day development
  • External contributors who prefer Cursor over other AI coding tools
  • CI/CD pipeline (no impact; rules are developer-side only)

Impact:

  • Minimal: adds one directory (.cursor/) with rule files and a .cursorrules file
  • No impact on source code, tests, documentation build, or CI pipelines
  • No runtime or packaging impact (.cursor/ is excluded from distributions)

Drawbacks

  • Maintenance overhead: When commands are updated in .claude/commands/, the corresponding Cursor rules should also be updated to stay in sync
  • Directory proliferation: The repository will contain four parallel command directories, which may feel redundant

Alternatives

  1. Do nothing: Cursor users would not have access to automated workflows and would need to manually follow procedures or switch tools
  2. Shared command format: Investigate whether all four tools can share a single definition format (ideal but requires upstream changes)
  3. Generate from single source: Build a script to generate Cursor rules from the Claude command definitions (adds complexity)

Unresolved Questions

  • Should a CI check be added to verify that .cursor/rules/ stays in sync with .claude/commands/?
  • What is the optimal Cursor rule format (.mdc vs plain .md) for this project's workflows?
  • Should .cursorrules include the full AI policy reference or just a pointer to AI_POLICY.md?

Additional Notes or Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions