diff --git a/openspec/specs/command-generation/spec.md b/openspec/specs/command-generation/spec.md index cb0fb2c38..14243855f 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 diff --git a/src/core/command-generation/adapters/cursor.ts b/src/core/command-generation/adapters/cursor.ts index d540a479b..f904dca8e 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 a286422a8..86708d33e 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 6255a4fc7..7fb06122b 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 903aac3e1..efd26cf57 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.'); });