Skip to content

Commit 661059b

Browse files
yangjuncodeTabishB
andauthored
Update Windsurf file path from commands to workflows (Fission-AI#610)
* fix windsurf workrules * fix a missing update --------- Co-authored-by: Tabish Bidiwale <tabishbidiwale@gmail.com>
1 parent ddbfa52 commit 661059b

6 files changed

Lines changed: 10 additions & 11 deletions

File tree

docs/supported-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For each tool you select, OpenSpec installs:
3434
| Qwen Code | `.qwen/skills/` | `.qwen/commands/` |
3535
| RooCode | `.roo/skills/` | `.roo/commands/` |
3636
| Trae | `.trae/skills/` | `.trae/skills/` (via `/openspec-*`) |
37-
| Windsurf | `.windsurf/skills/` | `.windsurf/commands/opsx/` |
37+
| Windsurf | `.windsurf/skills/` | `.windsurf/workflows/` |
3838

3939
## Non-Interactive Setup
4040

openspec/changes/multi-provider-skill-generation/specs/command-generation/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The system SHALL define a `ToolCommandAdapter` interface for per-tool formatting
4949

5050
- **WHEN** formatting a command for Windsurf
5151
- **THEN** the adapter SHALL output YAML frontmatter with `name`, `description`, `category`, `tags` fields
52-
- **AND** file path SHALL follow pattern `.windsurf/commands/opsx/<id>.md`
52+
- **AND** file path SHALL follow pattern `.windsurf/workflows/opsx-<id>.md`
5353

5454
### Requirement: Command generator function
5555

src/core/command-generation/adapters/windsurf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ function formatTagsArray(tags: string[]): string {
3333

3434
/**
3535
* Windsurf adapter for command generation.
36-
* File path: .windsurf/commands/opsx/<id>.md
36+
* File path: .windsurf/workflows/opsx-<id>.md
3737
* Frontmatter: name, description, category, tags
3838
*/
3939
export const windsurfAdapter: ToolCommandAdapter = {
4040
toolId: 'windsurf',
4141

4242
getFilePath(commandId: string): string {
43-
return path.join('.windsurf', 'commands', 'opsx', `${commandId}.md`);
43+
return path.join('.windsurf', 'workflows', `opsx-${commandId}.md`);
4444
},
4545

4646
formatFile(content: CommandContent): string {

test/core/command-generation/adapters.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('command-generation/adapters', () => {
107107

108108
it('should generate correct file path', () => {
109109
const filePath = windsurfAdapter.getFilePath('explore');
110-
expect(filePath).toBe(path.join('.windsurf', 'commands', 'opsx', 'explore.md'));
110+
expect(filePath).toBe(path.join('.windsurf', 'workflows', 'opsx-explore.md'));
111111
});
112112

113113
it('should format file similar to Claude format', () => {
@@ -495,7 +495,7 @@ describe('command-generation/adapters', () => {
495495

496496
it('Windsurf adapter uses path.join for paths', () => {
497497
const filePath = windsurfAdapter.getFilePath('test');
498-
expect(filePath.split(path.sep)).toEqual(['.windsurf', 'commands', 'opsx', 'test.md']);
498+
expect(filePath.split(path.sep)).toEqual(['.windsurf', 'workflows', 'opsx-test.md']);
499499
});
500500

501501
it('All adapters use path.join for paths', () => {

test/core/init.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('InitCommand', () => {
1212
await fs.mkdir(testDir, { recursive: true });
1313

1414
// Mock console.log to suppress output during tests
15-
vi.spyOn(console, 'log').mockImplementation(() => {});
15+
vi.spyOn(console, 'log').mockImplementation(() => { });
1616
});
1717

1818
afterEach(async () => {
@@ -375,7 +375,7 @@ describe('InitCommand', () => {
375375
const initCommand = new InitCommand({ tools: 'windsurf', force: true });
376376
await initCommand.execute(testDir);
377377

378-
const cmdFile = path.join(testDir, '.windsurf', 'commands', 'opsx', 'explore.md');
378+
const cmdFile = path.join(testDir, '.windsurf', 'workflows', 'opsx-explore.md');
379379
expect(await fileExists(cmdFile)).toBe(true);
380380
});
381381

test/core/update.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ Old instructions content
301301
const windsurfCmd = path.join(
302302
testDir,
303303
'.windsurf',
304-
'commands',
305-
'opsx',
306-
'explore.md'
304+
'workflows',
305+
'opsx-explore.md'
307306
);
308307
const exists = await FileSystemUtils.fileExists(windsurfCmd);
309308
expect(exists).toBe(true);

0 commit comments

Comments
 (0)