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:
Jakub Zych
2026-10-06 01:47:40 +02:00
parent fe069b2a56
commit a9a7a328e6
2763 changed files with 78465 additions and 78434 deletions

View File

@@ -20,7 +20,7 @@
* tests/declarative-reference-windsurf.test.cjs: it (1) classifies ZCode's
* profile via profileOf, (2) confirms the public declarative adapter
* classifies it as declarative, (3) round-trips a real install proving a
* gsd surface is emitted, (4) proves negotiation fails CLOSED on a corrupted
* msd surface is emitted, (4) proves negotiation fails CLOSED on a corrupted
* descriptor, (5) proves the validator accepts the descriptor, and (6)
* source-greps the folded modules for the retired `isZcode` branch (AC2).
*
@@ -44,9 +44,9 @@ const {
negotiateHostCapabilities,
PROFILE_BASELINES,
UNDOCUMENTED,
} = require('../gsd-core/bin/lib/host-integration.cjs');
const { validateCapability } = require('../gsd-core/bin/lib/capability-validator.cjs');
const { createDeclarativeAdapter } = require('../gsd-core/bin/lib/adapter-declarative.cjs');
} = require('../msd-core/bin/lib/host-integration.cjs');
const { validateCapability } = require('../msd-core/bin/lib/capability-validator.cjs');
const { createDeclarativeAdapter } = require('../msd-core/bin/lib/adapter-declarative.cjs');
const { cleanup } = require('./helpers.cjs');
const { walk, runMinimalInstall, BUILD_SCRIPT } = require('./helpers/install-shared.cjs');
@@ -81,33 +81,33 @@ test('the public declarative adapter classifies ZCode as a declarative host', ()
assert.equal(typeof adapter.uninstall, 'function');
});
test('a real ZCode install emits an invocable gsd skill/command/agent surface', () => {
test('a real ZCode install emits an invocable msd skill/command/agent surface', () => {
const { configDir, root } = runMinimalInstall({ runtime: 'zcode', scope: 'global' });
try {
const files = walk(configDir);
assert.ok(files.length > 0, 'install must emit artifacts');
const gsdSurface = files.filter((f) => /gsd/i.test(path.relative(configDir, f)));
assert.ok(gsdSurface.length > 0, 'install must emit a gsd surface (declarative reference)');
const msdSurface = files.filter((f) => /msd/i.test(path.relative(configDir, f)));
assert.ok(msdSurface.length > 0, 'install must emit a msd surface (declarative reference)');
// ZCode's artifactLayout (capabilities/zcode/capability.json) declares
// nested skills/, flat commands/, and flat agents/ — verify all three.
const skillsDir = path.join(configDir, 'skills');
assert.ok(fs.existsSync(skillsDir), 'skills/ directory must exist');
const skillDirs = fs.readdirSync(skillsDir, { withFileTypes: true })
.filter((e) => e.isDirectory() && e.name.startsWith('gsd-'));
assert.ok(skillDirs.length > 0, 'skills/ must contain nested gsd-* skill directories');
.filter((e) => e.isDirectory() && e.name.startsWith('msd-'));
assert.ok(skillDirs.length > 0, 'skills/ must contain nested msd-* skill directories');
const firstSkillFiles = fs.readdirSync(path.join(skillsDir, skillDirs[0].name));
assert.ok(firstSkillFiles.includes('SKILL.md'), 'each nested skill dir must contain SKILL.md');
const commandsDir = path.join(configDir, 'commands');
assert.ok(fs.existsSync(commandsDir), 'commands/ directory must exist');
const cmdFiles = fs.readdirSync(commandsDir).filter((f) => f.startsWith('gsd-') && f.endsWith('.md'));
assert.ok(cmdFiles.length > 0, 'commands/ must contain flat gsd-*.md slash commands');
const cmdFiles = fs.readdirSync(commandsDir).filter((f) => f.startsWith('msd-') && f.endsWith('.md'));
assert.ok(cmdFiles.length > 0, 'commands/ must contain flat msd-*.md slash commands');
const agentsDir = path.join(configDir, 'agents');
assert.ok(fs.existsSync(agentsDir), 'agents/ directory must exist');
const agentFiles = fs.readdirSync(agentsDir).filter((f) => f.startsWith('gsd-') && f.endsWith('.md'));
assert.ok(agentFiles.length > 0, 'agents/ must contain flat gsd-*.md agent files');
const agentFiles = fs.readdirSync(agentsDir).filter((f) => f.startsWith('msd-') && f.endsWith('.md'));
assert.ok(agentFiles.length > 0, 'agents/ must contain flat msd-*.md agent files');
// #2101: zcode's shared-hooks exclusion is now descriptor-driven
// (hostBehaviors.skipSharedHooksInstall:true) — golden has zero hook
@@ -143,21 +143,21 @@ test('#4002: zcode command bodies rewrite <execution_context> @-refs to the zcod
const { configDir, root } = runMinimalInstall({ runtime: 'zcode', scope: 'global' });
try {
const commandsDir = path.join(configDir, 'commands');
const files = fs.readdirSync(commandsDir).filter((f) => f.startsWith('gsd-') && f.endsWith('.md'));
const files = fs.readdirSync(commandsDir).filter((f) => f.startsWith('msd-') && f.endsWith('.md'));
assert.ok(files.length > 0, 'zcode install must emit command files');
// The reporter's evidence: 59 of 71 emitted command files still carried the
// Claude home literal, so every lazy load resolved inside ~/.claude/gsd-core
// Claude home literal, so every lazy load resolved inside ~/.claude/msd-core
// and the ZCode-adapted copy was never read. None may remain.
const offenders = files.filter((f) =>
fs.readFileSync(path.join(commandsDir, f), 'utf8').includes('~/.claude/gsd-core'));
fs.readFileSync(path.join(commandsDir, f), 'utf8').includes('~/.claude/msd-core'));
assert.deepEqual(offenders, [],
`command files still carrying the Claude home literal: ${offenders.join(', ')}`);
// The @-ref must land on the zcode home, in the tilde form ZCode documents
// (docs/reference/host-integration-capability-matrix.md: `~/.zcode/...`).
const planPhase = fs.readFileSync(path.join(commandsDir, 'gsd-plan-phase.md'), 'utf8');
assert.match(planPhase, /@~\/\.zcode\/gsd-core\/workflows\/plan-phase\.md/,
const planPhase = fs.readFileSync(path.join(commandsDir, 'msd-plan-phase.md'), 'utf8');
assert.match(planPhase, /@~\/\.zcode\/msd-core\/workflows\/plan-phase\.md/,
'execution_context must reference the zcode runtime home');
assert.doesNotMatch(planPhase, /@~\/\.claude\//, 'no @-ref may stay on the Claude home');
@@ -172,7 +172,7 @@ test('#4002: zcode command bodies rewrite <execution_context> @-refs to the zcod
const p = path.join(cur, ent.name);
if (ent.isDirectory()) stack.push(p);
else if (ent.name === 'SKILL.md') {
assert.ok(!fs.readFileSync(p, 'utf8').includes('~/.claude/gsd-core'),
assert.ok(!fs.readFileSync(p, 'utf8').includes('~/.claude/msd-core'),
`skill body still carrying the Claude home literal: ${path.relative(configDir, p)}`);
}
}
@@ -186,16 +186,16 @@ test('#4002: zcode command bodies rewrite <execution_context> @-refs to the zcod
test('#4002 negative space: the project-local shim fallback survives the zcode rewrite', () => {
const { configDir, root } = runMinimalInstall({ runtime: 'zcode', scope: 'global' });
try {
// `${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/` is the legitimate
// `${_MSD_RUNTIME_ROOT}/.claude/msd-core/bin/` is the legitimate
// project-local fallback (the reporter's OpenCode control keeps exactly
// this literal) — the rewrite must not touch it. Only 3 source commands
// carry the full shim chain; discuss-phase is one.
const discuss = fs.readFileSync(path.join(configDir, 'commands', 'gsd-discuss-phase.md'), 'utf8');
assert.match(discuss, /\$\{_GSD_RUNTIME_ROOT\}\/\.claude\/gsd-core\/bin\//,
const discuss = fs.readFileSync(path.join(configDir, 'commands', 'msd-discuss-phase.md'), 'utf8');
assert.match(discuss, /\$\{_MSD_RUNTIME_ROOT\}\/\.claude\/msd-core\/bin\//,
'the project-local shim fallback literal must survive');
// ... while the bare $HOME/.claude fallback slot in the same chain is
// rewritten to the runtime home, exactly as every sibling runtime does.
assert.doesNotMatch(discuss, /\$HOME\/\.claude\/gsd-core\/bin\//,
assert.doesNotMatch(discuss, /\$HOME\/\.claude\/msd-core\/bin\//,
'the $HOME fallback slot must resolve to the zcode home like every sibling runtime');
} finally {
cleanup(root);
@@ -208,7 +208,7 @@ test('#4002 negative space: the project-local shim fallback survives the zcode r
// (4), zcode documents namedDispatch/background/subagentToolkit/
// backgroundDispatch, leaving only nested + maxDepth undocumented. Real
// values confirmed via:
// node -e "const {negotiateHostCapabilities}=require('./gsd-core/bin/lib/host-integration.cjs');
// node -e "const {negotiateHostCapabilities}=require('./msd-core/bin/lib/host-integration.cjs');
// const cap=require('./capabilities/zcode/capability.json');
// console.log(negotiateHostCapabilities(cap.runtime.hostIntegration).effective.dispatch)"
// -> { namedDispatch:true, nested:false, maxDepth:0, background:false, subagentToolkit:'full', backgroundDispatch:false }