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

@@ -12,23 +12,23 @@ const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const os = require('node:os');
const { createTempProject, cleanup, runGsdTools, delay } = require('./helpers.cjs');
const { createTempProject, cleanup, runMsdTools, delay } = require('./helpers.cjs');
const { runGit, runHook: seamRunHook } = require('./helpers/process-seam.cjs');
const { gitOrThrow } = require('./helpers/git-fixture.cjs');
const { PROBE_TIMEOUT_MS, HOOK_FANOUT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const {
graphifyStatus,
} = require('../gsd-core/bin/lib/graphify.cjs');
} = require('../msd-core/bin/lib/graphify.cjs');
const {
VALID_CONFIG_KEYS,
isValidConfigKey,
} = require('../gsd-core/bin/lib/config-schema.cjs');
} = require('../msd-core/bin/lib/config-schema.cjs');
const {
CONFIG_DEFAULTS: CANONICAL_CONFIG_DEFAULTS,
} = require('../gsd-core/bin/lib/configuration.cjs');
} = require('../msd-core/bin/lib/configuration.cjs');
const {
makeStatusProject,
@@ -77,7 +77,7 @@ describe('auto-update', () => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
const result = runGsdTools(
const result = runMsdTools(
['config-set', 'graphify.auto_update', 'true'],
tmpDir,
);
@@ -96,7 +96,7 @@ describe('auto-update', () => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
runGsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
runMsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
const configPath = path.join(tmpDir, '.planning', 'config.json');
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
@@ -111,8 +111,8 @@ describe('auto-update', () => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
runGsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
runGsdTools(['config-set', 'graphify.auto_update', 'false'], tmpDir);
runMsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
runMsdTools(['config-set', 'graphify.auto_update', 'false'], tmpDir);
const configPath = path.join(tmpDir, '.planning', 'config.json');
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
@@ -182,8 +182,8 @@ describe('auto-update', () => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
runGsdTools(['config-set', 'graphify.enabled', 'true'], tmpDir);
runGsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
runMsdTools(['config-set', 'graphify.enabled', 'true'], tmpDir);
runMsdTools(['config-set', 'graphify.auto_update', 'true'], tmpDir);
const configPath = path.join(tmpDir, '.planning', 'config.json');
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
@@ -203,10 +203,10 @@ describe('auto-update', () => {
// ─── hook tests ─────────────────────────────────────────────────────────────
const isWindows = process.platform === 'win32';
const HOOK = path.join(__dirname, '..', 'hooks', 'gsd-graphify-update.sh');
const HOOK = path.join(__dirname, '..', 'hooks', 'msd-graphify-update.sh');
function createTempGitRepo(opts = {}) {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-3347-'));
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-3347-'));
// Original discarded the result unchecked (stdio: 'ignore', never a
// throw-native execFileSync) — bare runGit preserves that never-throws,
// ignored-result shape.
@@ -251,7 +251,7 @@ describe('auto-update', () => {
const PATH = pathPrepend
? `${pathPrepend}${path.delimiter}${process.env.PATH || ''}`
: process.env.PATH || '';
// Bash FAN-OUT: `gsd-graphify-update.sh` is a real hook shelling out to
// Bash FAN-OUT: `msd-graphify-update.sh` is a real hook shelling out to
// `git` and `graphify` (mocked here) under one `bash` interpreter — the
// wrong class for a plumbing-sized bound, even though the hook's own
// synchronous return (gate checks + status-file write) is fast. Same
@@ -429,12 +429,12 @@ describe('auto-update', () => {
assert.strictEqual(r.status, 0, 'must not break commits when graphify missing');
});
// #3729 — a sentinel `node` shim records every spawn. In a non-GSD repo the
// #3729 — a sentinel `node` shim records every spawn. In a non-MSD repo the
// hook must bail at Gate 0 ([ -f .planning/config.json ]) without spawning
// node at all: pre-fix, the Gate 1 payload parse spawned node first, which
// on Windows allocates a console window per Bash tool call.
function makeSentinelNodeBin(markerPath) {
const binDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-3729-node-'));
const binDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-3729-node-'));
const shim = path.join(binDir, 'node');
fs.writeFileSync(
shim,
@@ -448,7 +448,7 @@ describe('auto-update', () => {
return { binDir, markerPath };
}
test('non-GSD repo bails at Gate 0 with zero node spawns (#3729)', (t) => {
test('non-MSD repo bails at Gate 0 with zero node spawns (#3729)', (t) => {
const tmpDir = createTempGitRepo({ config: undefined });
const sentinel = makeSentinelNodeBin(path.join(tmpDir, '.node-spawned'));
t.after(() => {
@@ -460,10 +460,10 @@ describe('auto-update', () => {
{ tool_name: 'Bash', tool_input: { command: 'git commit -m x' } },
{ pathPrepend: sentinel.binDir },
);
assert.strictEqual(r.status, 0, 'hook must exit 0 in a non-GSD repo');
assert.strictEqual(r.status, 0, 'hook must exit 0 in a non-MSD repo');
assert.ok(
!fs.existsSync(path.join(tmpDir, '.planning/graphs/.last-build-status.json')),
'no status file should be created in a non-GSD repo',
'no status file should be created in a non-MSD repo',
);
assert.ok(
!fs.existsSync(sentinel.markerPath),
@@ -471,7 +471,7 @@ describe('auto-update', () => {
);
});
test('CI set bails before the node parse in a GSD project (#3729)', (t) => {
test('CI set bails before the node parse in a MSD project (#3729)', (t) => {
const tmpDir = createTempGitRepo({
config: { graphify: { enabled: true, auto_update: true } },
});
@@ -734,11 +734,11 @@ describe('auto-update', () => {
'git pull --ff-only',
'git rebase --continue',
'git cherry-pick abc123',
// #3653 — `gsd-tools query commit` invokes git via spawnSync('git', [...]),
// #3653 — `msd-tools query commit` invokes git via spawnSync('git', [...]),
// so the substring "git commit" never appears in tool_input.command.
// The hook must match the user-facing SDK invocation directly.
'gsd-tools query commit "docs: probe" --files .planning/STATE.md',
'npx gsd-tools query commit "docs: probe" --files .planning/STATE.md',
'msd-tools query commit "docs: probe" --files .planning/STATE.md',
'npx msd-tools query commit "docs: probe" --files .planning/STATE.md',
]) {
test(`dispatches on: ${cmd}`, async (t) => {
const tmpDir = createTempGitRepo({
@@ -773,7 +773,7 @@ describe('auto-update', () => {
{
tool_name: 'Bash',
tool_input: {
command: 'gsd-tools query commit-to-subrepo "msg" --files packages/foo',
command: 'msd-tools query commit-to-subrepo "msg" --files packages/foo',
},
},
{ pathPrepend: mockBin },
@@ -842,13 +842,13 @@ describe('auto-update', () => {
});
// #3653 — only the SDK `commit` verb invokes git internally. Other
// `gsd-tools query` verbs (phase.complete, roadmap.update-plan-progress,
// `msd-tools query` verbs (phase.complete, roadmap.update-plan-progress,
// state.begin-phase) mutate .md files but do NOT advance HEAD; matching
// them would cause a spurious rebuild per state mutation.
for (const cmd of [
'gsd-tools query phase.complete 109',
'gsd-tools query roadmap.update-plan-progress 109 W001',
'gsd-tools query state.begin-phase 110',
'msd-tools query phase.complete 109',
'msd-tools query roadmap.update-plan-progress 109 W001',
'msd-tools query state.begin-phase 110',
]) {
test(`does NOT dispatch on non-HEAD-advancing SDK verb: ${cmd}`, (t) => {
const tmpDir = createTempGitRepo({