feat(MSDK-3095): Added cursor AI rules#187
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Review Summary by QodoAdd Cursor AI rules and configuration for project guidance
WalkthroughsDescription• Added comprehensive Cursor AI rules for project guidance • Created platform-specific rules for Android, iOS, and React Native • Established CI/CD, testing, and security best practices documentation • Added Cursor ignore configuration files for optimal indexing Diagramflowchart LR
A["Cursor Rules"] --> B["Project Overview"]
A --> C["Platform Rules"]
C --> D["Android Native"]
C --> E["iOS Native"]
C --> F["React Native"]
A --> G["Development Guides"]
G --> H["TypeScript Conventions"]
G --> I["Testing"]
G --> J["CI/CD & Security"]
A --> K["Cursor Config"]
K --> L[".cursorignore"]
K --> M[".cursorindexingignore"]
File Changes1. .cursor/rules/project-overview.mdc
|
Code Review by Qodo
1.
|
📝 WalkthroughWalkthroughAdds a set of new Cursor rule and repo configuration files documenting native (Android/iOS), React Native, TypeScript, testing, CI, and security conventions, plus ignore/indexing patterns and a Ruby version pin for the sample app. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
PR Summary: Adds sample/.ruby-version specifying Ruby 3.2.0; no cursor AI rules or other code changes included.
|
|
Reviewed up to commit:01567a06cef9181c86bc191a938b7190794992f7 Additional SuggestionOthers- Confirm this Ruby version is compatible with the sample project's native tooling (CocoaPods, fastlane, bundler) and with CI images. If you rely on a Gemfile/Gemfile.lock, ensure the Ruby version here matches any Ruby version specified there or document how contributors should select the Ruby version (rbenv/chruby/asdf). Consider adding the same .ruby-version at the repository root if CI and other parts of the repo need the same Ruby runtime. |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
.cursorindexingignore (1)
35-37: Narrow indexing exclusions for core build/tooling files.
scripts/and Android Gradle config files are core project inputs, not generated artifacts. Ignoring them can reduce rule quality and produce weaker AI suggestions around build/test workflows.Suggested diff
# === Script files (utility, not core logic) === -scripts/ -sample/scripts/ +# Keep scripts indexable (used by CI/conventions) +# scripts/ +# sample/scripts/ # === Android generated === -android/build.gradle.kts -android/settings.gradle.kts -android/gradle.properties +# Keep root Android Gradle config indexable +# android/build.gradle.kts +# android/settings.gradle.kts +# android/gradle.propertiesAlso applies to: 46-48
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.cursorindexingignore around lines 35 - 37, The .cursorindexingignore currently excludes broad directories "scripts/" and "sample/scripts/" which hides core build/tooling files; update the ignore rules to narrow the scope (for example replace "scripts/" and "sample/scripts/" with more specific generated-artifact patterns such as "scripts/generated/" or "sample/scripts/generated/" or explicit filenames that are truly generated) or remove those lines entirely so Android Gradle config and other build scripts remain indexed; search for the exact strings "scripts/" and "sample/scripts/" in the .cursorindexingignore and apply the narrower patterns or deletion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.cursor/rules/ci-github-actions.mdc:
- Line 31: The guidance text currently conflates major-version tags with
immutable pins; update the wording around the `@v1`, `@v2`, `@v4` examples to
state that these are mutable tags (they can be moved by maintainers) and
therefore are not equivalent to commit SHA pins, and explicitly recommend using
full commit SHAs for security-critical actions while noting that major-version
tags are acceptable for convenience/non-critical uses; reference the
`@v1/@v2/@v4` tokens and recommend “use full commit SHA (immutable) for
security-sensitive actions” as the replacement phrasing.
In @.cursor/rules/security-snyk.mdc:
- Line 13: Update the guidance text that currently states "Prefer `^` ranges in
`package.json` to allow patch updates" to correctly describe semver: explain
that `^` allows minor and patch updates within the same major version (e.g.,
`^1.2.3` => >=1.2.3 <2.0.0) and that `~` allows patch-only updates within the
same minor version (e.g., `~1.2.3` => >=1.2.3 <1.3.0`), replacing the incorrect
sentence referencing the `^` operator; ensure the revised line mentions both `^`
and `~` operators and their respective update scopes.
In @.cursor/rules/testing.mdc:
- Around line 24-27: The documentation lists unit and instrumented tests but
only provides the unit test command; add an explicit instrumented-test command
for clarity by appending the connected Android instrumentation command (e.g.,
./gradlew :react-native-usercentrics:connectedAndroidTest) alongside the
existing unit test command (./gradlew :react-native-usercentrics:test), and
optionally mention assembleAndroidTest or installDebug and connectedAndroidTest
for CI/use cases so readers can run instrumented tests reliably.
In @.cursor/rules/typescript-conventions.mdc:
- Around line 28-30: The documentation incorrectly states that the TurboModule
spec uses codegenNativeComponent; update the sentence that currently lists both
TurboModuleRegistry and codegenNativeComponent to remove codegenNativeComponent
so it only references TurboModuleRegistry (keep reference to the TurboModule
spec file NativeUsercentricsModule.ts for context).
---
Nitpick comments:
In @.cursorindexingignore:
- Around line 35-37: The .cursorindexingignore currently excludes broad
directories "scripts/" and "sample/scripts/" which hides core build/tooling
files; update the ignore rules to narrow the scope (for example replace
"scripts/" and "sample/scripts/" with more specific generated-artifact patterns
such as "scripts/generated/" or "sample/scripts/generated/" or explicit
filenames that are truly generated) or remove those lines entirely so Android
Gradle config and other build scripts remain indexed; search for the exact
strings "scripts/" and "sample/scripts/" in the .cursorindexingignore and apply
the narrower patterns or deletion.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
sample/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (11)
.cursor/rules/android-native.mdc.cursor/rules/ci-github-actions.mdc.cursor/rules/ios-native.mdc.cursor/rules/project-overview.mdc.cursor/rules/react-native.mdc.cursor/rules/security-snyk.mdc.cursor/rules/testing.mdc.cursor/rules/typescript-conventions.mdc.cursorignore.cursorindexingignoresample/.ruby-version
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR introduces repository level Cursor rule files and indexing ignore lists so contributor assistance follows project conventions while avoiding noisy or sensitive files. It also pins the sample Ruby version to keep CocoaPods setup consistent across local development and CI. sequenceDiagram
participant Contributor
participant CursorIDE
participant RuleFiles
participant Indexer
participant CI
Contributor->>CursorIDE: Open repository
CursorIDE->>RuleFiles: Load project and platform conventions
RuleFiles-->>CursorIDE: Return coding guidance
CursorIDE->>Indexer: Apply indexing ignore configuration
Indexer-->>CursorIDE: Exclude generated and sensitive files
Contributor->>CI: Create pull request
CI->>CI: Use pinned Ruby version for iOS setup
Generated by CodeAnt AI |
|
CodeAnt AI Incremental review completed. |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI Incremental review completed. |
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
Created multiple cursor rules for them to be used as a first basis
Summary by CodeRabbit
CodeAnt-AI Description
Add contributor rules and repository ignore/indexing files to standardize native, TypeScript, testing, and CI practices
What Changed
Impact
✅ Clearer native and TypeScript contribution guidelines✅ Fewer accidental commits of build artifacts and secrets✅ Fewer CI failures from mismatched local setups💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.