refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Kimi CLI skill converter tests.
|
||||
*
|
||||
* Kimi Agent Skills use gsd-<command>/SKILL.md directories with lowercase
|
||||
* Kimi Agent Skills use msd-<command>/SKILL.md directories with lowercase
|
||||
* hyphenated frontmatter names and /skill:<name> invocation syntax.
|
||||
*/
|
||||
|
||||
process.env.GSD_TEST_MODE = '1';
|
||||
process.env.MSD_TEST_MODE = '1';
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
@@ -17,39 +17,39 @@ const {
|
||||
function sampleCommand() {
|
||||
return [
|
||||
'---',
|
||||
'name: gsd:new-project',
|
||||
'description: Create a new GSD project',
|
||||
'name: msd:new-project',
|
||||
'description: Create a new MSD project',
|
||||
'allowed-tools:',
|
||||
' - Read',
|
||||
' - Bash',
|
||||
'agent: gsd-planner',
|
||||
'agent: msd-planner',
|
||||
'tools: Read, Bash',
|
||||
'model: opus',
|
||||
'color: blue',
|
||||
'skills:',
|
||||
' - gsd-planner-workflow',
|
||||
' - msd-planner-workflow',
|
||||
'hooks:',
|
||||
' PostToolUse:',
|
||||
' - matcher: "Write|Edit"',
|
||||
'---',
|
||||
'',
|
||||
'Invoke /gsd:new-project from slash form.',
|
||||
'Invoke gsd:new-project from bare colon form.',
|
||||
'Invoke /gsd-new-project from hyphen slash form.',
|
||||
'Invoke $gsd-new-project from shell-style form.',
|
||||
'Do not rewrite /gsd-tools, gsd-new-projector, or $gsd-planets.',
|
||||
'Invoke /msd:new-project from slash form.',
|
||||
'Invoke msd:new-project from bare colon form.',
|
||||
'Invoke /msd-new-project from hyphen slash form.',
|
||||
'Invoke $msd-new-project from shell-style form.',
|
||||
'Do not rewrite /msd-tools, msd-new-projector, or $msd-planets.',
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
describe('convertClaudeCommandToKimiSkill', () => {
|
||||
test('emits Kimi SKILL.md frontmatter with name and description only', () => {
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'gsd-new-project');
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'msd-new-project');
|
||||
|
||||
assert.ok(result.startsWith('---\n'), 'frontmatter starts with ---');
|
||||
assert.ok(result.includes('\n---\n'), 'frontmatter closes with ---');
|
||||
assert.ok(result.includes('name: gsd-new-project'), 'frontmatter name uses Kimi-safe hyphen form');
|
||||
assert.ok(result.includes('name: msd-new-project'), 'frontmatter name uses Kimi-safe hyphen form');
|
||||
assert.ok(
|
||||
result.includes('description: "Create a new GSD project"'),
|
||||
result.includes('description: "Create a new MSD project"'),
|
||||
'description is preserved from source frontmatter'
|
||||
);
|
||||
|
||||
@@ -66,26 +66,26 @@ describe('convertClaudeCommandToKimiSkill', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('rewrites GSD command references to Kimi skill invocation syntax', () => {
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'gsd-new-project');
|
||||
test('rewrites MSD command references to Kimi skill invocation syntax', () => {
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'msd-new-project');
|
||||
|
||||
assert.equal(
|
||||
(result.match(/\/skill:gsd-new-project/g) || []).length,
|
||||
(result.match(/\/skill:msd-new-project/g) || []).length,
|
||||
5,
|
||||
'self invocation hint and all supported source invocation forms are emitted'
|
||||
);
|
||||
assert.ok(!result.includes('/gsd:new-project'), 'slash colon form is removed');
|
||||
assert.ok(!result.includes('gsd:new-project'), 'bare colon form is removed');
|
||||
assert.ok(!result.includes('/gsd-new-project'), 'slash hyphen form is removed');
|
||||
assert.ok(!result.includes('$gsd-new-project'), 'shell-style form is removed');
|
||||
assert.ok(!result.includes('/msd:new-project'), 'slash colon form is removed');
|
||||
assert.ok(!result.includes('msd:new-project'), 'bare colon form is removed');
|
||||
assert.ok(!result.includes('/msd-new-project'), 'slash hyphen form is removed');
|
||||
assert.ok(!result.includes('$msd-new-project'), 'shell-style form is removed');
|
||||
});
|
||||
|
||||
test('does not rewrite unrelated words or introduce Phase 3 artifacts', () => {
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'gsd-new-project');
|
||||
const result = convertClaudeCommandToKimiSkill(sampleCommand(), 'msd-new-project');
|
||||
|
||||
assert.ok(result.includes('/gsd-tools'), 'non-command slash token is preserved');
|
||||
assert.ok(result.includes('gsd-new-projector'), 'longer hyphenated word is preserved');
|
||||
assert.ok(result.includes('$gsd-planets'), 'unrelated shell-style token is preserved');
|
||||
assert.ok(result.includes('/msd-tools'), 'non-command slash token is preserved');
|
||||
assert.ok(result.includes('msd-new-projector'), 'longer hyphenated word is preserved');
|
||||
assert.ok(result.includes('$msd-planets'), 'unrelated shell-style token is preserved');
|
||||
assert.ok(!result.includes('type: flow'), 'Phase 2 does not create Kimi flow skills');
|
||||
assert.ok(!result.includes('kimi_cli.tools'), 'Phase 2 does not emit Kimi tool module paths');
|
||||
assert.ok(!result.includes('system_prompt_path'), 'Phase 2 does not emit custom agent YAML');
|
||||
|
||||
Reference in New Issue
Block a user