Skip to content

Port Cursor rules to CLAUDE.md and remove the originals#123

Merged
lawrence-forooghian merged 1 commit intomainfrom
claude-md-from-cursor-rules
Mar 13, 2026
Merged

Port Cursor rules to CLAUDE.md and remove the originals#123
lawrence-forooghian merged 1 commit intomainfrom
claude-md-from-cursor-rules

Conversation

@lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Mar 13, 2026

We're no longer using Cursor, so the Cursor rules can go. They did contain useful project-specific guidance (spec document format, Swift style preferences, testing conventions) that Claude may not have been picking up on, so this ports across the things that Claude judged to be non-obvious — i.e. things it might not intuit from the code alone — into CLAUDE.md files. Testing guidelines go in a separate CLAUDE.md under the test directory so they only load when working with test files.

The Cursor rules hardcoded a path for where to find the specification repo. Instead, the CLAUDE.md just says "ask if you haven't been told where to find it", on the basis that the broader working environment (e.g. ably/sdk-workspace) should provide that context. Let's see if this works in practice.

What to include was based on Claude's own judgement of what it would and wouldn't already know, and I pretty blindly accepted it. This is a first pass; we can continue to iterate on the content.

Summary by CodeRabbit

  • Documentation

    • Reorganized and consolidated development guidelines: added standalone docs for specification, Swift style, and testing; removed obsolete embedded guidance.
  • Chores

    • Adjusted project configuration to exclude the new guidance file from test targets.

Note: These changes are documentation-only and do not affect end-user functionality.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Walkthrough

Deleted three .cursor/rules/* guidance files and added consolidated documentation in CLAUDE.md at the repository root and Tests/AblyLiveObjectsTests/CLAUDE.md; also updated Package.swift to exclude the new test CLAUDE.md from the test target.

Changes

Cohort / File(s) Summary
Removed cursor rules
.cursor/rules/specification.mdc, .cursor/rules/swift.mdc, .cursor/rules/testing.mdc
Deleted embedded specification guidance, Swift style rules, and testing guidelines previously stored under .cursor/rules/.
Root documentation added
CLAUDE.md
Added consolidated "Specification Document" and "Swift style" sections (spec identifiers like OD1/REC2a, SwiftLint/access-control, initializer and literal conventions, import and formatting guidance).
Test documentation added
Tests/AblyLiveObjectsTests/CLAUDE.md
New test-focused CLAUDE.md with Swift Testing recommendations, test labeling and spec attribution guidance (@spec/@specPartial), import/logger/test-data practices.
Package manifest update
Package.swift
Excluded Tests/AblyLiveObjectsTests/CLAUDE.md from the AblyLiveObjectsTests target via exclude entry.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I’m a rabbit with a checklist bright,
Rules hopped from shadows into light,
CLAUDE now holds the Swiftly lore,
Tests and specs live by the door,
Hopping on—organized delight! 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: porting Cursor rules to CLAUDE.md files and removing the original .cursor/rules files. It is concise, specific, and directly reflects the PR's core objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude-md-from-cursor-rules
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lawrence-forooghian lawrence-forooghian changed the title Port Cursor rules to CLAUDE.md and remove the originals Port Cursor rules to CLAUDE.md and remove the originals Mar 13, 2026
@github-actions github-actions bot temporarily deployed to staging/pull/123/AblyLiveObjects March 13, 2026 02:46 Inactive
We're no longer using Cursor, so the Cursor rules can go. They did
contain useful project-specific guidance (spec document format, Swift
style preferences, testing conventions) that Claude may not have been
picking up on, so this ports across the things that Claude judged to
be non-obvious — i.e. things it might not intuit from the code alone
— into CLAUDE.md files. Testing guidelines go in a separate CLAUDE.md
under the test directory so they only load when working with test
files.

The Cursor rules hardcoded a path for where to find the specification
repo. Instead, the CLAUDE.md just says "ask if you haven't been told
where to find it", on the basis that the broader working environment
(e.g. sdk-workspace [1]) should provide that context. Let's see if
this works in practice.

What to include was based on Claude's own judgement of what it would
and wouldn't already know, and I pretty blindly accepted it. This is a
first pass; we can continue to iterate on the content.

[1] https://github.com/ably/sdk-workspace

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
CLAUDE.md (1)

50-59: Consider making the formatting example explicitly complete (or explicitly truncated).

Right now the snippet reads like incomplete code, which makes copy/paste validation harder.

✏️ Suggested documentation tweak
   ```swift
   // Do this:
   objectMessages: [
       InboundObjectMessage(
           id: nil,
+          ...
+      ),
+  ]

   // Not this:
-  objectMessages: [InboundObjectMessage(
-      id: nil,
+  objectMessages: [InboundObjectMessage(
+      id: nil,
+      ...
+  )]
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @CLAUDE.md around lines 50 - 59, Update the Swift formatting example for
clarity by making both variants explicitly complete or explicitly truncated: in
the "Do this" example ensure the InboundObjectMessage entry shows the remaining
fields/truncation and the closing parenthesis and array bracket (reference:
objectMessages and InboundObjectMessage), and in the "Not this" example do the
same so readers can see the intended difference (either show full valid syntax
or include a clear truncation indicator like "..." and proper closing
punctuation) — adjust the snippets so both examples are syntactically clear and
copy/paste friendly.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @CLAUDE.md:

  • Around line 50-59: Update the Swift formatting example for clarity by making
    both variants explicitly complete or explicitly truncated: in the "Do this"
    example ensure the InboundObjectMessage entry shows the remaining
    fields/truncation and the closing parenthesis and array bracket (reference:
    objectMessages and InboundObjectMessage), and in the "Not this" example do the
    same so readers can see the intended difference (either show full valid syntax
    or include a clear truncation indicator like "..." and proper closing
    punctuation) — adjust the snippets so both examples are syntactically clear and
    copy/paste friendly.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Repository UI

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `8fdd4cb1-811d-4650-8747-cf354aeb748f`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between de6b6098a8832bfb938fe575efc403e9b7ceb8cc and 3a348aa41968cc46ab0a3d0e9ec003697f976f05.

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `.cursor/rules/specification.mdc`
* `.cursor/rules/swift.mdc`
* `.cursor/rules/testing.mdc`
* `CLAUDE.md`
* `Package.swift`
* `Tests/AblyLiveObjectsTests/CLAUDE.md`

</details>

<details>
<summary>💤 Files with no reviewable changes (3)</summary>

* .cursor/rules/swift.mdc
* .cursor/rules/specification.mdc
* .cursor/rules/testing.mdc

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@lawrence-forooghian lawrence-forooghian merged commit b72a48a into main Mar 13, 2026
18 checks passed
@lawrence-forooghian lawrence-forooghian deleted the claude-md-from-cursor-rules branch March 13, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants