Skip to content

fix: use colon syntax for Cursor slash commands#1335

Open
w3lld1 wants to merge 2 commits into
Fission-AI:mainfrom
w3lld1:fix/cursor-colon-slash-command
Open

fix: use colon syntax for Cursor slash commands#1335
w3lld1 wants to merge 2 commits into
Fission-AI:mainfrom
w3lld1:fix/cursor-colon-slash-command

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • change Cursor command frontmatter to register /opsx:<command> names instead of /opsx-<command>
  • keep the existing .cursor/commands/opsx-<command>.md filenames and ids unchanged
  • update command-generation and CLI workflow tests for the Cursor format

Fixes #1307.

Validation

  • pnpm exec vitest run test/core/command-generation/adapters.test.ts test/core/command-generation/generator.test.ts test/commands/artifact-workflow.test.ts (179 passed)
  • pnpm run build
  • pnpm run lint (passes with one pre-existing warning in src/core/references.ts about an unused eslint-disable directive)

I could not verify Cursor's UI command palette locally from this CLI environment, so the local validation covers generated file content and build/lint checks.

Summary by CodeRabbit

  • Bug Fixes
    • Updated generated Cursor command frontmatter formatting so the command name now uses the : syntax (e.g., /opsx:<id>).
    • Updated related tests to match the new Cursor command naming format.
    • Refreshed the Cursor adapter documentation/spec to reflect the updated name pattern.

@w3lld1 w3lld1 requested a review from TabishB as a code owner July 9, 2026 19:03
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3c740c09-1ed7-4766-bb39-d7350c1e3d61

📥 Commits

Reviewing files that changed from the base of the PR and between 9cabd72 and b3f5766.

📒 Files selected for processing (1)
  • openspec/specs/command-generation/spec.md
✅ Files skipped from review due to trivial changes (1)
  • openspec/specs/command-generation/spec.md

📝 Walkthrough

Walkthrough

The Cursor command adapter now generates the command name field with colon syntax (/opsx:<id>) instead of hyphen syntax (/opsx-<id>). The Cursor command-generation spec and related tests were updated to match.

Changes

Cursor Command Name Colon Syntax

Layer / File(s) Summary
Cursor adapter frontmatter and spec update
openspec/specs/command-generation/spec.md, src/core/command-generation/adapters/cursor.ts
The Cursor adapter specification, header comment, and formatFile() output now use name: /opsx:${content.id} instead of the hyphenated form.
Test assertions updated for colon syntax
test/commands/artifact-workflow.test.ts, test/core/command-generation/adapters.test.ts, test/core/command-generation/generator.test.ts
Cursor-related test expectations now assert name: /opsx:explore and matching colon-form frontmatter output.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#556: Introduces the Cursor command adapter/frontmatter formatting that this change updates to the colon form.

Suggested reviewers: TabishB

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly states the main change: switching Cursor slash commands to colon syntax.
Linked Issues check ✅ Passed The change addresses #1307 by making Cursor frontmatter register /opsx:<id> commands and updating tests/spec to match.
Out of Scope Changes check ✅ Passed The diff stays focused on Cursor command syntax, related tests, and specification updates with no unrelated features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/core/command-generation/adapters/cursor.ts (1)

15-26: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Align the Cursor command spec with the new name syntax. openspec/specs/command-generation/spec.md still requires name to be /opsx-<id>, while src/core/command-generation/adapters/cursor.ts now emits /opsx:<id>. Update the spec or revert the adapter so the contract stays consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/command-generation/adapters/cursor.ts` around lines 15 - 26, The
Cursor command naming contract is inconsistent between cursorAdapter and the
command-generation spec. Update either the spec in command-generation/spec.md or
the cursorAdapter.formatFile output so both use the same name syntax, and keep
getFilePath aligned with that chosen convention by referencing the cursorAdapter
and its /opsx naming format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/core/command-generation/adapters/cursor.ts`:
- Around line 15-26: The Cursor command naming contract is inconsistent between
cursorAdapter and the command-generation spec. Update either the spec in
command-generation/spec.md or the cursorAdapter.formatFile output so both use
the same name syntax, and keep getFilePath aligned with that chosen convention
by referencing the cursorAdapter and its /opsx naming format.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ca943590-e4e9-4fe3-bc67-02a5df0c132f

📥 Commits

Reviewing files that changed from the base of the PR and between 93e27a7 and 9cabd72.

📒 Files selected for processing (4)
  • src/core/command-generation/adapters/cursor.ts
  • test/commands/artifact-workflow.test.ts
  • test/core/command-generation/adapters.test.ts
  • test/core/command-generation/generator.test.ts

@w3lld1

w3lld1 commented Jul 9, 2026

Copy link
Copy Markdown
Author

Thanks for the review. I pushed a follow-up commit that aligns the command-generation spec with the new Cursor frontmatter name syntax (/opsx:<id>) while keeping the existing .cursor/commands/opsx-<id>.md file path convention.

Validation re-run:

  • pnpm exec vitest run test/core/command-generation/adapters.test.ts test/core/command-generation/generator.test.ts test/commands/artifact-workflow.test.ts — 179 passed
  • pnpm run build
  • pnpm run lint — passes with the same pre-existing warning in src/core/references.ts
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor slash commands: colon vs hyphen mismatch in docs and generated content

1 participant