fix(cursor): preserve slash-prefixed gsd commands in converted markdown
Keep `/gsd-*` command examples slash-prefixed during Cursor conversion while still normalizing legacy `gsd:` syntax, and add regression coverage for Next Up markdown output. Made-with: Cursor
This commit is contained in:
committed by
adam.mitchell
parent
7172d16447
commit
69cfae2011
@@ -35,6 +35,26 @@ Test body
|
||||
assert.equal(nameMatch[1], 'gsd-quick', 'skill name is plain scalar');
|
||||
assert.ok(!result.includes('name: "gsd-quick"'), 'quoted skill name is not emitted');
|
||||
});
|
||||
|
||||
test('preserves slash for slash commands in markdown body', () => {
|
||||
const input = `---
|
||||
name: gsd:plan-phase
|
||||
description: Plan a phase
|
||||
---
|
||||
|
||||
Next:
|
||||
/gsd:execute-phase 17
|
||||
/gsd-help
|
||||
gsd:progress
|
||||
`;
|
||||
|
||||
const result = convertClaudeCommandToCursorSkill(input, 'gsd-plan-phase');
|
||||
|
||||
assert.ok(result.includes('/gsd-execute-phase 17'), 'slash command remains slash-prefixed');
|
||||
assert.ok(result.includes('/gsd-help'), 'existing slash command is preserved');
|
||||
assert.ok(result.includes('gsd-progress'), 'non-slash gsd: references still normalize');
|
||||
assert.ok(!result.includes('/gsd:execute-phase'), 'legacy colon command form is removed');
|
||||
});
|
||||
});
|
||||
|
||||
describe('convertClaudeAgentToCursorAgent', () => {
|
||||
|
||||
Reference in New Issue
Block a user