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

@@ -6,8 +6,8 @@
*
* path.join(process.cwd(), '.planning', 'STATE.md')
*
* so the lookup always missed: gsd-cursor-session-start.js could only ever emit
* the "no .planning/ workflow found" nudge, and gsd-cursor-stop.js's verify-work
* so the lookup always missed: msd-cursor-session-start.js could only ever emit
* the "no .planning/ workflow found" nudge, and msd-cursor-stop.js's verify-work
* reminder could never fire — even with .planning/STATE.md right there in the
* workspace. Both hooks already buffered stdin into `raw` but never parsed it;
* the payload's `workspace_roots` carries the real path.
@@ -23,7 +23,7 @@
'use strict';
process.env.GSD_TEST_MODE = '1';
process.env.MSD_TEST_MODE = '1';
const { test, describe } = require('node:test');
const assert = require('node:assert/strict');
@@ -32,16 +32,16 @@ const path = require('node:path');
const { execFileSync } = require('node:child_process');
const { createTempDir, cleanup } = require('./helpers.cjs');
const { runHook: runHookSeam } = require('./helpers/process-seam.cjs');
const { escapeRegex } = require('../gsd-core/bin/lib/pattern.cjs');
const { escapeRegex } = require('../msd-core/bin/lib/pattern.cjs');
const { STAGED_HOOK_SCRIPT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const HOOKS = path.join(__dirname, '..', 'hooks');
const SESSION_START = path.join(HOOKS, 'gsd-cursor-session-start.js');
const STOP = path.join(HOOKS, 'gsd-cursor-stop.js');
const SESSION_START = path.join(HOOKS, 'msd-cursor-session-start.js');
const STOP = path.join(HOOKS, 'msd-cursor-stop.js');
// subagentStart carried the identical defect — it was not named in the report
// but its cwd lookup meant every Cursor subagent (planner, executor, verifier)
// started without phase context under the CLI.
const SUBAGENT_START = path.join(HOOKS, 'gsd-cursor-subagent-start.js');
const SUBAGENT_START = path.join(HOOKS, 'msd-cursor-subagent-start.js');
// Every cursor hook that resolves .planning/ from the payload. Kept as one list
// so a future hook added to this family is not silently left on the old path.
const RESOLVING_HOOKS = [SESSION_START, STOP, SUBAGENT_START];
@@ -62,7 +62,7 @@ function runHook(script, { cwd, payload }) {
/** A directory containing .planning/STATE.md. */
function makeWorkspace(withPlanning) {
const dir = createTempDir('gsd-2587-');
const dir = createTempDir('msd-2587-');
if (withPlanning) {
fs.mkdirSync(path.join(dir, '.planning'), { recursive: true });
fs.writeFileSync(path.join(dir, '.planning', 'STATE.md'), '# Project State\n');
@@ -157,7 +157,7 @@ describe('#2587: cursor hooks resolve the workspace from workspace_roots, not cw
try {
const out = runHook(SESSION_START, {
cwd: cursorConfigDir,
// GSD project is NOT the first root — first-root-only would miss it.
// MSD project is NOT the first root — first-root-only would miss it.
payload: { hook_event_name: 'sessionStart', workspace_roots: [plain, withPlanning] },
});
assert.ok(
@@ -235,7 +235,7 @@ describe('#2587: cursor hooks resolve the workspace from workspace_roots, not cw
assert.deepEqual(
out,
{},
'stop must stay silent when there is genuinely no GSD project',
'stop must stay silent when there is genuinely no MSD project',
);
} finally {
cleanup(workspace);
@@ -292,9 +292,9 @@ describe('#2587: cursor hooks resolve the workspace from workspace_roots, not cw
// ships hooks whose top-level require() throws MODULE_NOT_FOUND at load —
// before their own try/catch — wedging every session, with nothing to
// indicate why. Packaging bugs must surface at install, not at the user.
const hooksSurface = require('../gsd-core/bin/lib/runtime-hooks-surface.cjs');
const fakeSrc = createTempDir('gsd-2587-src-');
const target = createTempDir('gsd-2587-tgt-');
const hooksSurface = require('../msd-core/bin/lib/runtime-hooks-surface.cjs');
const fakeSrc = createTempDir('msd-2587-src-');
const target = createTempDir('msd-2587-tgt-');
try {
// A source tree with the hook scripts but NO hooks/lib/ backing them.
const srcHooks = path.join(fakeSrc, 'hooks');
@@ -336,7 +336,7 @@ describe('#2587: cursor hooks resolve the workspace from workspace_roots, not cw
'cursor install must stage hooks/lib/cursor-workspace.js next to the hook scripts',
);
// And the staged hook must actually load against it.
const hook = path.join(configDir, 'hooks', 'gsd-cursor-session-start.js');
const hook = path.join(configDir, 'hooks', 'msd-cursor-session-start.js');
assert.ok(fs.existsSync(hook), 'cursor install must stage the sessionStart hook');
const ws = makeWorkspace(true);
try {