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

@@ -4,34 +4,34 @@
/**
* Drift-guard lint for the Package Identity seam (issue #498).
*
* The seam (`get-shit-done/bin/lib/package-identity.cjs`, derived from // gsd-allow-legacy-name
* package.json) is the single source of GSD's published coordinates. Many
* The seam (`get-shit-done/bin/lib/package-identity.cjs`, derived from // msd-allow-legacy-name
* package.json) is the single source of MSD's published coordinates. Many
* runtime surfaces still carry a literal copy of those coordinates because
* they cannot `require()` the seam at runtime: the bash launcher snippet (and
* its byte-equal copies across ~85 workflows, kept in lockstep by the
* runtime-launcher parity test) and the installer's user-facing install/help
* strings.
*
* This lint makes those literals *value-checked*: every GSD package/repo
* This lint makes those literals *value-checked*: every MSD package/repo
* coordinate that appears as a literal must equal the seam's current value.
* It passes today (the literals are correct) and FAILS the moment a repoint is
* not propagated — rename package.json, regenerate the seam, and every stale
* literal is reported until updated. That is what turns a repoint into a
* one-line change with mechanical enforcement.
*
* Scope: the runtime/code surface (bin/, hooks/, scripts/, get-shit-done/). // gsd-allow-legacy-name
* Scope: the runtime/code surface (bin/, hooks/, scripts/, get-shit-done/). // msd-allow-legacy-name
* Pure-prose docs and localized READMEs are intentionally out of scope.
*/
const fs = require('node:fs');
const path = require('node:path');
// A GSD package coordinate: a scoped npm name whose package part contains
// "get-shit-done" (so @opengsd/gsd-sdk and unrelated scopes never match). // gsd-allow-legacy-name
const PACKAGE_RE = /@[A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*/g; // gsd-allow-legacy-name
// A GSD repo slug, only inside a GitHub URL context so it never overlaps the
// A MSD package coordinate: a scoped npm name whose package part contains
// "get-shit-done" (so @opengsd/gsd-sdk and unrelated scopes never match). // msd-allow-legacy-name
const PACKAGE_RE = /@[A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*/g; // msd-allow-legacy-name
// A MSD repo slug, only inside a GitHub URL context so it never overlaps the
// scoped package literal above. The `.git` suffix is trimmed before compare.
const SLUG_RE = /(?:github\.com[/:]|raw\.githubusercontent\.com\/)([A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*)/g; // gsd-allow-legacy-name
const SLUG_RE = /(?:github\.com[/:]|raw\.githubusercontent\.com\/)([A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*)/g; // msd-allow-legacy-name
function lineOf(text, index) {
let line = 1;
@@ -42,7 +42,7 @@ function lineOf(text, index) {
}
/**
* Pure: find every GSD coordinate literal in `text` that does not match the
* Pure: find every MSD coordinate literal in `text` that does not match the
* expected seam values. Returns [{ kind, found, expected, line }].
*/
function findCoordinateDrift(text, { packageName, repoSlug }) {
@@ -62,14 +62,14 @@ function findCoordinateDrift(text, { packageName, repoSlug }) {
}
// Directories scanned, relative to repo root.
const SCAN_DIRS = ['bin', 'hooks', 'scripts', 'gsd-core'];
const SCAN_DIRS = ['bin', 'hooks', 'scripts', 'msd-core'];
const SCAN_EXT = new Set(['.js', '.cjs', '.sh', '.md']);
// Files exempt because they ARE the source of truth / the tooling that defines
// the coordinate patterns. The generated seam holds the correct value by
// construction; the generator and this lint carry regex/templates, not stray
// literals.
const EXEMPT = new Set([
path.join('gsd-core', 'bin', 'lib', 'package-identity.cjs'),
path.join('msd-core', 'bin', 'lib', 'package-identity.cjs'),
path.join('scripts', 'generate-package-identity.cjs'),
path.join('scripts', 'lint-package-identity-drift.cjs'),
]);
@@ -98,7 +98,7 @@ function walk(dir, acc) {
* annotated with the repo-relative file path.
*/
function scanRepo(root) {
const seam = require(path.join(root, 'gsd-core', 'bin', 'lib', 'package-identity.cjs'));
const seam = require(path.join(root, 'msd-core', 'bin', 'lib', 'package-identity.cjs'));
const expected = { packageName: seam.packageName, repoSlug: seam.repoSlug };
const violations = [];
for (const dir of SCAN_DIRS) {
@@ -124,10 +124,10 @@ function main() {
const root = path.join(__dirname, '..');
const violations = scanRepo(root);
if (violations.length === 0) {
process.stdout.write('ok identity-drift: all GSD coordinate literals match the seam\n');
process.stdout.write('ok identity-drift: all MSD coordinate literals match the seam\n');
return;
}
process.stderr.write('identity-drift: stale GSD coordinate literal(s) found.\n');
process.stderr.write('identity-drift: stale MSD coordinate literal(s) found.\n');
process.stderr.write('Repoint by editing package.json, then `node scripts/generate-package-identity.cjs`,\n');
process.stderr.write('and update the value-checked materialization sites below:\n');
for (const d of violations) {