From 9cabd72ff2dfce1bbdda5a54aba8ba8bc0a50b68 Mon Sep 17 00:00:00 2001 From: w3lld1 Date: Thu, 9 Jul 2026 19:03:05 +0000 Subject: [PATCH 1/2] fix: use colon syntax for Cursor slash commands --- src/core/command-generation/adapters/cursor.ts | 4 ++-- test/commands/artifact-workflow.test.ts | 2 +- test/core/command-generation/adapters.test.ts | 2 +- test/core/command-generation/generator.test.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/command-generation/adapters/cursor.ts b/src/core/command-generation/adapters/cursor.ts index d540a479b9..f904dca8e4 100644 --- a/src/core/command-generation/adapters/cursor.ts +++ b/src/core/command-generation/adapters/cursor.ts @@ -12,7 +12,7 @@ import { escapeYamlValue } from '../yaml.js'; /** * Cursor adapter for command generation. * File path: .cursor/commands/opsx-.md - * Frontmatter: name (as /opsx-), id, category, description + * Frontmatter: name (as /opsx:), id, category, description */ export const cursorAdapter: ToolCommandAdapter = { toolId: 'cursor', @@ -23,7 +23,7 @@ export const cursorAdapter: ToolCommandAdapter = { formatFile(content: CommandContent): string { return `--- -name: /opsx-${content.id} +name: /opsx:${content.id} id: opsx-${content.id} category: ${escapeYamlValue(content.category)} description: ${escapeYamlValue(content.description)} diff --git a/test/commands/artifact-workflow.test.ts b/test/commands/artifact-workflow.test.ts index a286422a82..86708d33e2 100644 --- a/test/commands/artifact-workflow.test.ts +++ b/test/commands/artifact-workflow.test.ts @@ -761,7 +761,7 @@ artifacts: // Verify commands were created with Cursor format const commandFile = path.join(tempDir, '.cursor', 'commands', 'opsx-explore.md'); const content = await fs.readFile(commandFile, 'utf-8'); - expect(content).toContain('name: /opsx-explore'); + expect(content).toContain('name: /opsx:explore'); }); it('creates skills for Windsurf tool', async () => { diff --git a/test/core/command-generation/adapters.test.ts b/test/core/command-generation/adapters.test.ts index 6255a4fc7b..7fb06122b7 100644 --- a/test/core/command-generation/adapters.test.ts +++ b/test/core/command-generation/adapters.test.ts @@ -92,7 +92,7 @@ describe('command-generation/adapters', () => { const output = cursorAdapter.formatFile(sampleContent); expect(output).toContain('---\n'); - expect(output).toContain('name: /opsx-explore'); + expect(output).toContain('name: /opsx:explore'); expect(output).toContain('id: opsx-explore'); expect(output).toContain('category: Workflow'); expect(output).toContain('description: Enter explore mode for thinking'); diff --git a/test/core/command-generation/generator.test.ts b/test/core/command-generation/generator.test.ts index 903aac3e1d..efd26cf57a 100644 --- a/test/core/command-generation/generator.test.ts +++ b/test/core/command-generation/generator.test.ts @@ -29,7 +29,7 @@ describe('command-generation/generator', () => { expect(result.path).toContain('.cursor'); expect(result.path).toContain('opsx-explore.md'); - expect(result.fileContent).toContain('name: /opsx-explore'); + expect(result.fileContent).toContain('name: /opsx:explore'); expect(result.fileContent).toContain('id: opsx-explore'); expect(result.fileContent).toContain('Command body here.'); }); From b3f5766d8a108379a3d8c9980bf25ae80232ea32 Mon Sep 17 00:00:00 2001 From: w3lld1 Date: Thu, 9 Jul 2026 19:12:27 +0000 Subject: [PATCH 2/2] docs: align Cursor command spec syntax --- openspec/specs/command-generation/spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openspec/specs/command-generation/spec.md b/openspec/specs/command-generation/spec.md index cb0fb2c385..14243855ff 100644 --- a/openspec/specs/command-generation/spec.md +++ b/openspec/specs/command-generation/spec.md @@ -40,7 +40,7 @@ The system SHALL define a `ToolCommandAdapter` interface for per-tool formatting #### Scenario: Cursor adapter formatting - **WHEN** formatting a command for Cursor -- **THEN** the adapter SHALL output YAML frontmatter with `name` as `/opsx-`, `id`, `category`, `description` fields +- **THEN** the adapter SHALL output YAML frontmatter with `name` as `/opsx:`, `id`, `category`, `description` fields - **AND** file path SHALL follow pattern `.cursor/commands/opsx-.md` #### Scenario: Windsurf adapter formatting