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:
@@ -11,7 +11,7 @@
|
||||
* ZCode's subagent dispatcher treats every `mcp__<server>__*` entry in an agent's
|
||||
* `tools:` frontmatter as a REQUIRED MCP server and throws CONFIGURATION_ERROR on
|
||||
* spawn when it is not connected. Claude Code treats the same grants as an optional
|
||||
* allowlist, which is why the GSD sources carry them. The install must therefore
|
||||
* allowlist, which is why the MSD sources carry them. The install must therefore
|
||||
* filter `mcp__*` entries out of the tools list for ZCode — the same outcome Kimi
|
||||
* already gets via its own conversion path — while leaving Claude Code's verbatim
|
||||
* copy untouched.
|
||||
@@ -37,18 +37,18 @@ const REPO_ROOT = path.join(__dirname, '..');
|
||||
/** The 8 MCP-granted agents named in the issue. Every one hard-fails spawn on
|
||||
* ZCode with zero MCP servers configured, so every one must install clean. */
|
||||
const MCP_GRANTED_AGENTS = [
|
||||
'gsd-phase-researcher',
|
||||
'gsd-project-researcher',
|
||||
'gsd-ui-researcher',
|
||||
'gsd-advisor-researcher',
|
||||
'gsd-domain-researcher',
|
||||
'gsd-ai-researcher',
|
||||
'gsd-planner',
|
||||
'gsd-executor',
|
||||
'msd-phase-researcher',
|
||||
'msd-project-researcher',
|
||||
'msd-ui-researcher',
|
||||
'msd-advisor-researcher',
|
||||
'msd-domain-researcher',
|
||||
'msd-ai-researcher',
|
||||
'msd-planner',
|
||||
'msd-executor',
|
||||
];
|
||||
|
||||
/** Parse the `tools:` grant list out of an agent .md's YAML frontmatter.
|
||||
* Handles both shapes GSD emits: inline comma list (`tools: A, B, C`) and
|
||||
* Handles both shapes MSD emits: inline comma list (`tools: A, B, C`) and
|
||||
* YAML block list (`tools:\n - A\n - B`). Returns [] when the agent
|
||||
* declares no tools. */
|
||||
function parseFrontmatterTools(content) {
|
||||
@@ -87,7 +87,7 @@ function parseFrontmatterTools(content) {
|
||||
* tests/agent-fragments-emission.install.test.cjs. Returns { result, root }
|
||||
* where root is the install root (config dir for global, project cwd for local). */
|
||||
function spawnInstall(runtime, scope, repoRoot = REPO_ROOT) {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), `gsd-3384-${runtime}-${scope}-`));
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), `msd-3384-${runtime}-${scope}-`));
|
||||
const args = ['--preserve-symlinks', '--preserve-symlinks-main', path.join(repoRoot, 'bin', 'install.js'), `--${runtime}`];
|
||||
if (scope === 'global') {
|
||||
args.push('--global', '--config-dir', root);
|
||||
@@ -153,11 +153,11 @@ test('zcode local install: all 8 MCP-granted agents install with zero mcp__* too
|
||||
});
|
||||
|
||||
function zcodeFixture(tools) {
|
||||
return `---\nname: gsd-phase-researcher\ndescription: ZCode quoted-MCP fixture\ntools: ${tools}\n---\n\nfixture body survives\n`;
|
||||
return `---\nname: msd-phase-researcher\ndescription: ZCode quoted-MCP fixture\ntools: ${tools}\n---\n\nfixture body survives\n`;
|
||||
}
|
||||
|
||||
function zcodeBlockFixture(items) {
|
||||
return `---\nname: gsd-phase-researcher\ndescription: ZCode quoted-MCP fixture\ntools:\n${items.map((item) => ` - ${item}`).join('\n')}\n---\n\nfixture body survives\n`;
|
||||
return `---\nname: msd-phase-researcher\ndescription: ZCode quoted-MCP fixture\ntools:\n${items.map((item) => ` - ${item}`).join('\n')}\n---\n\nfixture body survives\n`;
|
||||
}
|
||||
|
||||
test('zcode treats quoted MCP scalars as equivalent to plain scalars (#4189)', (t) => {
|
||||
@@ -177,12 +177,12 @@ test('zcode treats quoted MCP scalars as equivalent to plain scalars (#4189)', (
|
||||
];
|
||||
|
||||
for (const row of cases) {
|
||||
const overlay = buildOverlayRepo({ 'agents/gsd-phase-researcher.md': row.source });
|
||||
const overlay = buildOverlayRepo({ 'agents/msd-phase-researcher.md': row.source });
|
||||
t.after(() => cleanup(overlay));
|
||||
const { result, root } = spawnInstall('zcode', 'global', overlay);
|
||||
t.after(() => cleanup(root));
|
||||
assert.strictEqual(result.exitCode, 0, `${row.name}: zcode install must succeed\n${result.stderr}`);
|
||||
const emitted = fs.readFileSync(path.join(root, 'agents', 'gsd-phase-researcher.md'), 'utf8');
|
||||
const emitted = fs.readFileSync(path.join(root, 'agents', 'msd-phase-researcher.md'), 'utf8');
|
||||
assert.ok(!emitted.includes('mcp__server__'), `${row.name}: all semantic MCP entries must be removed`);
|
||||
assert.ok(!emitted.includes('\\x6dcp__server__'), `${row.name}: YAML-escaped semantic MCP entries must be removed`);
|
||||
assert.ok(emitted.includes('fixture body survives'), `${row.name}: unrelated body bytes must survive`);
|
||||
@@ -198,8 +198,8 @@ test('claude global install still carries mcp__* grants (optional-allowlist sema
|
||||
t.after(() => cleanup(root));
|
||||
assert.strictEqual(result.exitCode, 0,
|
||||
`claude global install must succeed\nstdout: ${result.stdout}\nstderr: ${result.stderr}`);
|
||||
const agentPath = path.join(root, 'agents', 'gsd-phase-researcher.md');
|
||||
assert.ok(fs.existsSync(agentPath), 'claude global install must write agents/gsd-phase-researcher.md');
|
||||
const agentPath = path.join(root, 'agents', 'msd-phase-researcher.md');
|
||||
assert.ok(fs.existsSync(agentPath), 'claude global install must write agents/msd-phase-researcher.md');
|
||||
const tools = parseFrontmatterTools(fs.readFileSync(agentPath, 'utf8'));
|
||||
assert.ok(
|
||||
tools.some((tool) => tool.startsWith('mcp__')),
|
||||
|
||||
Reference in New Issue
Block a user