Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/command-generation/adapters/cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { escapeYamlValue } from '../yaml.js';
/**
* Cursor adapter for command generation.
* File path: .cursor/commands/opsx-<id>.md
* Frontmatter: name (as /opsx-<id>), id, category, description
* Frontmatter: name (as /opsx:<id>), id, category, description
*/
export const cursorAdapter: ToolCommandAdapter = {
toolId: 'cursor',
Expand All @@ -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)}
Expand Down
2 changes: 1 addition & 1 deletion test/commands/artifact-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion test/core/command-generation/adapters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion test/core/command-generation/generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
});
Expand Down