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

@@ -1,8 +1,8 @@
/**
* Regression tests for bugs #2045 and #2046
*
* #2046 (macOS/Linux): The three .sh hooks (gsd-validate-commit.sh,
* gsd-session-state.sh, gsd-phase-boundary.sh) were registered in
* #2046 (macOS/Linux): The three .sh hooks (msd-validate-commit.sh,
* msd-session-state.sh, msd-phase-boundary.sh) were registered in
* settings.json with RELATIVE paths (bash .claude/hooks/...) for local
* installs, causing "No such file or directory" when Claude Code's cwd
* is not the project root.
@@ -26,16 +26,16 @@ const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const path = require('path');
// buildHookCommand was extracted to gsd-core/bin/lib/runtime-hooks-surface.cjs
// buildHookCommand was extracted to msd-core/bin/lib/runtime-hooks-surface.cjs
// (ADR-857 phase 5f-1). #2876 (epic #2866 Phase 7) retired install.js's
// pass-through re-export (zero production consumers) — import the module
// directly.
const { buildHookCommand } = require(path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'runtime-hooks-surface.cjs'));
const { buildHookCommand } = require(path.join(__dirname, '..', 'msd-core', 'bin', 'lib', 'runtime-hooks-surface.cjs'));
const SH_HOOKS = [
{ name: 'gsd-validate-commit.sh' },
{ name: 'gsd-session-state.sh' },
{ name: 'gsd-phase-boundary.sh' },
{ name: 'msd-validate-commit.sh' },
{ name: 'msd-session-state.sh' },
{ name: 'msd-phase-boundary.sh' },
];
// Use a fixed configDir that is unambiguously absolute so the assertions below
@@ -55,7 +55,7 @@ describe('bugs #2045 #2046: .sh hook paths must be absolute and quoted', () => {
assert.equal(typeof buildHookCommand, 'function',
'buildHookCommand must be exported from install.js');
const cmd = buildHookCommand(TEST_CONFIG_DIR, 'gsd-validate-commit.sh', HOOK_OPTS);
const cmd = buildHookCommand(TEST_CONFIG_DIR, 'msd-validate-commit.sh', HOOK_OPTS);
assert.ok(typeof cmd === 'string' && cmd.length > 0,
'buildHookCommand must return a non-empty string for .sh hooks');
@@ -71,7 +71,7 @@ describe('bugs #2045 #2046: .sh hook paths must be absolute and quoted', () => {
'buildHookCommand must be exported from install.js');
// .sh hook must contain "bash"
const shCmd = buildHookCommand(TEST_CONFIG_DIR, 'gsd-validate-commit.sh', HOOK_OPTS);
const shCmd = buildHookCommand(TEST_CONFIG_DIR, 'msd-validate-commit.sh', HOOK_OPTS);
assert.ok(
typeof shCmd === 'string' && shCmd.includes('bash'),
'buildHookCommand must produce a "bash" command for .sh hooks. ' +
@@ -79,7 +79,7 @@ describe('bugs #2045 #2046: .sh hook paths must be absolute and quoted', () => {
);
// .js hook must contain "node" (absolute path will include the word "node")
const jsCmd = buildHookCommand(TEST_CONFIG_DIR, 'gsd-something.js', HOOK_OPTS);
const jsCmd = buildHookCommand(TEST_CONFIG_DIR, 'msd-something.js', HOOK_OPTS);
assert.ok(
typeof jsCmd === 'string' && jsCmd.includes('node'),
'buildHookCommand must produce a "node" command for .js hooks. ' +
@@ -135,8 +135,8 @@ describe('bugs #2045 #2046: .sh hook paths must be absolute and quoted', () => {
test(`${platform}: configDir is absolute and double-quoted (fixes #2045 spaces)`, () => {
const cmd = buildHookCommand(SPACED_CONFIG_DIR, name, { platform, runtime: 'claude' });
// The configDir must appear verbatim inside double quotes in the command.
// e.g. bash "/home/first last/.claude/hooks/gsd-validate-commit.sh"
// or "/home/first last/.claude/hooks/gsd-validate-commit.sh"
// e.g. bash "/home/first last/.claude/hooks/msd-validate-commit.sh"
// or "/home/first last/.claude/hooks/msd-validate-commit.sh"
assert.ok(
cmd.includes(`"${SPACED_CONFIG_DIR}`),
`buildHookCommand must embed configDir inside double quotes for ${name} on ${platform}. ` +