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,5 +1,5 @@
'use strict';
process.env.GSD_TEST_MODE = '1';
process.env.MSD_TEST_MODE = '1';
/**
* Anti-divergence guard for the phase-identifier parsing seam
@@ -27,14 +27,14 @@ const ROOT = path.join(__dirname, '..');
const { findPhaseIdRegexDrift, findBracketGrammarDrift, scanRepo, scanMarkdownShellArith } = require(
path.join(ROOT, 'scripts', 'lint-phase-id-drift.cjs'),
);
const phaseId = require(path.join(ROOT, 'gsd-core', 'bin', 'lib', 'phase-id.cjs'));
const phaseId = require(path.join(ROOT, 'msd-core', 'bin', 'lib', 'phase-id.cjs'));
// The locked canonical surface (ADR-2121 Decision 1/2; PHASE_NUMBER_TOKEN_SOURCE
// added in Phase 4). Every name is exported by phase-id.cjs; the identity guard
// forbids any other module from re-exporting a divergent copy of one.
// #3212 Phase 1: `escapeRegex` moved off this locked surface entirely — it is
// no longer owned (or re-exported) by phase-id.cjs, it is owned by the
// pattern-construction seam (src/pattern.cts / gsd-core/bin/lib/pattern.cjs).
// pattern-construction seam (src/pattern.cts / msd-core/bin/lib/pattern.cjs).
// Dropped from CANONICAL rather than kept: phase-id.cjs no longer exports the
// name at all, so `name in phaseId` below would fail if it stayed listed, and
// the identity-guard test's job (no consumer re-exports a DIVERGENT copy) is
@@ -246,20 +246,20 @@ describe('#2761 M3 bracket grammar: one owner, byte-identical to the sites it re
test('the pinned builder owns the pad2 rule, not just the grammar', () => {
// "Canonical spelling only, not `0*N`" was restated beside each re-typed
// regex. An unpadded `[GSD.2]` scopes a milestone no phase heading resolves
// regex. An unpadded `[MSD.2]` scopes a milestone no phase heading resolves
// into, which is how total_phases fell back to the on-disk count.
const re = new RegExp(`^${phaseId.bracketMilestoneIntroSrcFor(2)}`, 'i');
assert.ok(re.test('[GSD.02] Foundation'), 'canonical pad2 spelling matches');
assert.ok(!re.test('[GSD.2] Foundation'), 'unpadded is malformed');
assert.ok(!re.test('[GSD.002] Foundation'), 'over-padded is malformed');
assert.ok(re.test('[gsd.02] Foundation'), 'recognition is case-insensitive at the reader');
assert.ok(re.test('[MSD.02] Foundation'), 'canonical pad2 spelling matches');
assert.ok(!re.test('[MSD.2] Foundation'), 'unpadded is malformed');
assert.ok(!re.test('[MSD.002] Foundation'), 'over-padded is malformed');
assert.ok(re.test('[msd.02] Foundation'), 'recognition is case-insensitive at the reader');
});
test('the capturing shape puts the milestone digits in group 1', () => {
const re = new RegExp(`^${phaseId.BRACKET_MILESTONE_INTRO_CAPTURING_SRC}`, 'i');
assert.equal('[GSD.02] Foundation'.match(re)[1], '02');
assert.equal('[MSD.02] Foundation'.match(re)[1], '02');
assert.equal('[A_B9.100] Later'.match(re)[1], '100');
assert.equal('[GSD.2] Foundation'.match(re), null, 'unpadded is not a milestone intro');
assert.equal('[MSD.2] Foundation'.match(re), null, 'unpadded is not a milestone intro');
});
});
@@ -345,13 +345,13 @@ describe('#2128 phase-id drift scanner: the live repo is clean', () => {
test('scanMarkdownShellArith actually runs the shell-arith rule (coverage, not just a clean result)', () => {
// Same proof shape again, for #4634's markdown shell-arithmetic detector:
// plant a `$((10#$VAR))` site under the real scan roots
// (gsd-core/workflows/**/*.md) and require scanMarkdownShellArith() to
// (msd-core/workflows/**/*.md) and require scanMarkdownShellArith() to
// catch it end-to-end, over the real MD_SCAN_DIRS walk.
const os = require('node:os');
const { cleanup } = require('./helpers.cjs');
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'phase-id-drift-'));
try {
const workflowsDir = path.join(tmp, 'gsd-core', 'workflows');
const workflowsDir = path.join(tmp, 'msd-core', 'workflows');
fs.mkdirSync(workflowsDir, { recursive: true });
fs.writeFileSync(
path.join(workflowsDir, 'planted.md'),
@@ -360,7 +360,7 @@ describe('#2128 phase-id drift scanner: the live repo is clean', () => {
const found = scanMarkdownShellArith(tmp);
assert.equal(found.length, 1, 'scanMarkdownShellArith must report the planted shell-arith literal');
assert.equal(found[0].kind, 'shell-arith');
assert.equal(found[0].file, path.join('gsd-core', 'workflows', 'planted.md'));
assert.equal(found[0].file, path.join('msd-core', 'workflows', 'planted.md'));
} finally {
cleanup(tmp);
}
@@ -392,7 +392,7 @@ describe('#2128 phase-id single-owner identity guard', () => {
// owns, it MUST be the identical reference — a re-export, never a local
// re-implementation. All consumers pass today (none re-export); the guard
// fails the moment a divergent copy ships.
const libDir = path.join(ROOT, 'gsd-core', 'bin', 'lib');
const libDir = path.join(ROOT, 'msd-core', 'bin', 'lib');
const consumers = fs.readdirSync(libDir).filter((f) => f.endsWith('.cjs') && f !== 'phase-id.cjs');
let checked = 0;
const requireFailures = [];