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

@@ -87,7 +87,7 @@ const PATH_RETURNING_FNS = [
/**
* Windows executable extensions (lowercase canonical). This is the fixed
* candidate-extension set both deleted private resolvers (`fallow-runner`'s
* `['fallow.exe','fallow.cmd','fallow.bat','fallow']` and `gsd-tools`'
* `['fallow.exe','fallow.cmd','fallow.bat','fallow']` and `msd-tools`'
* `'.EXE;.CMD;.BAT;.COM'`) hardcoded; local/no-private-binary-resolution
* flags a re-occurrence of two-or-more of these outside the seam.
*/

View File

@@ -17,9 +17,9 @@ const path = require('path');
*
* A bare `timeout`/`timeoutMs` literal scattered per call site drifts
* silently from its siblings, or worse, collides exactly with one. That is
* not hypothetical: on 2026-09-06, `gsd-core/bin/check-latest-version.cjs`
* not hypothetical: on 2026-09-06, `msd-core/bin/check-latest-version.cjs`
* hardcoded `execNpm(args, { timeout: 15_000 })` and, independently,
* `tests/gsd-check-update-worker-atomic-cache.test.cjs` hardcoded
* `tests/msd-check-update-worker-atomic-cache.test.cjs` hardcoded
* `runHookSeam(WORKER_PATH, [], { timeoutMs: 15000 })` — two unrelated files,
* same guessed number, no shared reference. When the inner one's timeout
* fired, the outer one could SIGKILL the whole process tree at the exact

View File

@@ -9,11 +9,11 @@
* files. Each moved suite is wrapped in a self-contained block:
*
* // ──────────────────────────────────────────────────────────────────────
* // Folded from tests/bug-376-claude-js-hook-gsd-rewriter.test.cjs — …
* // Folded from tests/bug-376-claude-js-hook-msd-rewriter.test.cjs — …
* // ──────────────────────────────────────────────────────────────────────
* {
* const { describe: __foldDescribe } = require('node:test');
* __foldDescribe("folded:bug-376-claude-js-hook-gsd-rewriter (… B1 #1970)", () => {
* __foldDescribe("folded:bug-376-claude-js-hook-msd-rewriter (… B1 #1970)", () => {
* …
* });
* }
@@ -35,8 +35,8 @@
* literal passed to the fold alias — NOT the whole title, and NOT a
* `[a-z0-9-]*` slice of it.
*
* "folded:bug-376-claude-js-hook-gsd-rewriter (consolidation epic #1969 B1 #1970)"
* → marker `bug-376-claude-js-hook-gsd-rewriter`
* "folded:bug-376-claude-js-hook-msd-rewriter (consolidation epic #1969 B1 #1970)"
* → marker `bug-376-claude-js-hook-msd-rewriter`
*
* Both halves of that definition are load-bearing:
*

View File

@@ -3,38 +3,38 @@
/**
* no-external-require-in-bin
*
* Flag any `require(...)` / `import ... from '...'` under `gsd-core/bin/**`
* Flag any `require(...)` / `import ... from '...'` under `msd-core/bin/**`
* whose specifier is neither relative (`./`, `../`) nor a Node builtin
* (including the `node:` prefix form).
*
* ## Why
*
* `gsd-core/bin/**` is copied by the installer into trees that have NO
* `node_modules` (e.g. `~/.claude/gsd-core/`). An external (npm-package)
* `msd-core/bin/**` is copied by the installer into trees that have NO
* `node_modules` (e.g. `~/.claude/msd-core/`). An external (npm-package)
* `require()`/`import` under this tree resolves fine in THIS repo (where
* `node_modules/` exists) but throws `Cannot find module '<pkg>'` for every
* installed user, because the package is never shipped there. #3477
* follow-up: `src/pattern.cts` (compiled to `gsd-core/bin/lib/pattern.cjs`)
* follow-up: `src/pattern.cts` (compiled to `msd-core/bin/lib/pattern.cjs`)
* shipped `import { RE2JS } from 're2js'` and broke `verify` for every
* installed user until the dependency was vendored under
* `gsd-core/bin/lib/vendor/`.
* `msd-core/bin/lib/vendor/`.
*
* The fix for a genuine external-package dependency is never "add it back to
* `dependencies`" — vendor the compiled artifact under
* `gsd-core/bin/lib/vendor/` (a verbatim, third-party copy; see
* `gsd-core/bin/lib/vendor/README.md`) and import it via a relative path
* `msd-core/bin/lib/vendor/` (a verbatim, third-party copy; see
* `msd-core/bin/lib/vendor/README.md`) and import it via a relative path
* instead.
*
* ## Why this is ALSO registered on src/**\/*.cts
*
* Every `src/**\/*.cts` module compiles 1:1 into `gsd-core/bin/lib/*.cjs`
* Every `src/**\/*.cts` module compiles 1:1 into `msd-core/bin/lib/*.cjs`
* (ADR-457; `tsconfig.build.json` `rootDir: "src"`, `outDir:
* "gsd-core/bin/lib"`), and the emitted `.cjs` mirrors are almost entirely
* "msd-core/bin/lib"`), and the emitted `.cjs` mirrors are almost entirely
* `eslint.config.mjs` global-`ignores`d as generated artifacts (lint the
* source, not the tsc output) — so a rule registered ONLY on
* `gsd-core/bin/**\/*.cjs` would never see a bad import re-introduced into an
* `msd-core/bin/**\/*.cjs` would never see a bad import re-introduced into an
* already-migrated module. `src/pattern.cts`'s `import { RE2JS } from
* 're2js'` is exactly this case: the compiled `gsd-core/bin/lib/pattern.cjs`
* 're2js'` is exactly this case: the compiled `msd-core/bin/lib/pattern.cjs`
* is on the ignore list, so only catching it at the `.cts` source closes the
* gap. `TSImportEqualsDeclaration` (the `import x = require('./y.cjs')` form
* used throughout `src/**\/*.cts` for CommonJS interop) is handled alongside
@@ -70,17 +70,17 @@ const rule = {
type: 'problem',
docs: {
description:
'Disallow require()/import of an external (non-relative, non-builtin) module under gsd-core/bin/** (installed trees have no node_modules)',
'Disallow require()/import of an external (non-relative, non-builtin) module under msd-core/bin/** (installed trees have no node_modules)',
category: 'Portability',
},
schema: [],
messages: {
externalRequireInBin:
'External module "{{specifier}}" required/imported under gsd-core/bin/**: installed ' +
'trees have no node_modules (gsd-core/bin/** is copied verbatim into e.g. ' +
'~/.claude/gsd-core/), so this resolves here but throws "Cannot find module' +
'" for every installed user. Vendor the artifact under gsd-core/bin/lib/vendor/ ' +
'(see gsd-core/bin/lib/vendor/README.md) and import it via a relative path instead.',
'External module "{{specifier}}" required/imported under msd-core/bin/**: installed ' +
'trees have no node_modules (msd-core/bin/** is copied verbatim into e.g. ' +
'~/.claude/msd-core/), so this resolves here but throws "Cannot find module' +
'" for every installed user. Vendor the artifact under msd-core/bin/lib/vendor/ ' +
'(see msd-core/bin/lib/vendor/README.md) and import it via a relative path instead.',
},
},
@@ -113,7 +113,7 @@ const rule = {
},
// `import foo = require('...')` — the CommonJS-interop form used
// throughout src/**/*.cts (every src/*.cts compiles 1:1 into
// gsd-core/bin/lib/*.cjs, so it is exactly as much "gsd-core/bin/**"
// msd-core/bin/lib/*.cjs, so it is exactly as much "msd-core/bin/**"
// content as a hand-written .cjs file is).
TSImportEqualsDeclaration(node) {
const ref = node.moduleReference;

View File

@@ -8,7 +8,7 @@ const { PATHEXT_VAR_NAME, countWindowsExecutableExtensions } = require('./lib/po
*
* Epic #3411's actual thesis: four private Windows-binary-resolution
* implementations existed (execNpm's shell:true, execTool's absence of any
* handling, gsd-tools.cjs's private scan, and fallow-runner.cts's own
* handling, msd-tools.cjs's private scan, and fallow-runner.cts's own
* candidate array). All four are gone; this rule stops a fifth from
* accreting by flagging the two unambiguous "I am re-implementing Windows
* binary resolution" shapes outside the platform seam
@@ -37,7 +37,7 @@ const { PATHEXT_VAR_NAME, countWindowsExecutableExtensions } = require('./lib/po
* filename itself, is NOT exempt (case I9 pins this distinction) — a
* substring exemption would be the obvious wrong implementation here.
*
* See .gsd/phase/chore-3619-no-bare-binary-spawn/40-design.md for the full
* See .msd/phase/chore-3619-no-bare-binary-spawn/40-design.md for the full
* behavior table and rejected alternatives.
*/

View File

@@ -81,7 +81,7 @@
* return value happens to embed the argument) is NOT detected by this
* rule — that would require tracing into the callee's body (a different,
* heavier kind of analysis, evaluated and rejected — see
* .gsd/phase/chore-4590-rendered-text-length-assert/40-design.md
* .msd/phase/chore-4590-rendered-text-length-assert/40-design.md
* "Rejected" #2). What IS detected is the same defect class written
* directly in the test file: a template literal that itself interpolates
* a path-returning expression, then has its length/substring probed. A

View File

@@ -27,7 +27,7 @@
* ONE hop back to its `VariableDeclarator` initializer before classification,
* so a path built once and passed by reference is recognized the same as an
* inline path expression; `hooks` is also a recognized source directory
* alongside `bin`/`lib`/`gsd-core`/`src` (#3545 / epic #3464 phase 7).
* alongside `bin`/`lib`/`msd-core`/`src` (#3545 / epic #3464 phase 7).
*/
// How many derivation hops from the original readFileSync() binding to
@@ -353,7 +353,7 @@ const rule = {
// Detect if a node represents a readFileSync call on a source file
// (.cjs/.cts/.js/.mjs/.mts/.ts) that lives in a source directory
// (bin, lib, gsd-core, hooks, src).
// (bin, lib, msd-core, hooks, src).
function isSourceReadFileSync(node) {
if (!node || node.type !== 'CallExpression') return false;
@@ -385,8 +385,8 @@ const rule = {
if (!hasSourceExt) return false;
// Must reference a source directory indicator somewhere in the
// expression (bin, lib, gsd-core, hooks, src).
const hasSourceDir = /['"](?:bin|lib|gsd-core|hooks|src)['"]/i.test(src);
// expression (bin, lib, msd-core, hooks, src).
const hasSourceDir = /['"](?:bin|lib|msd-core|hooks|src)['"]/i.test(src);
return hasSourceDir;
}

View File

@@ -60,9 +60,9 @@ const path = require('path');
* condition, or identity matching.
* (b) it IS a containment decision, but the canonical predicate in
* `src/security.cts` is unreachable from this file. Two real cases:
* `gsd-core/bin/lib/capability-validator.cjs` is a committed `.cjs`
* `msd-core/bin/lib/capability-validator.cjs` is a committed `.cjs`
* that must run before `npm run build:lib`, and
* `gsd-core/bin/lib/security.cjs` (the compiled predicate) is build
* `msd-core/bin/lib/security.cjs` (the compiled predicate) is build
* output that is gitignored and untracked — requiring it would break
* a fresh clone. `scripts/lib/drift-scan.cjs` runs under `lint:ci`
* with the same exposure.
@@ -135,7 +135,7 @@ const path = require('path');
* bindings are deliberately left unresolved: this is targeted alias
* resolution for the one common shape, not general constant folding.
* - Four shipped installer-migration bodies —
* `src/installer-migrations/003-rename-get-shit-done-to-gsd-core.cts`,
* `src/installer-migrations/003-rename-get-shit-done-to-msd-core.cts`,
* `004-prune-stale-pristine-snapshots.cts`,
* `009-pi-retire-reserved-hooks-dir.cts`, and
* `010-antigravity-retire-confighome-artifacts.cts` — are entirely

View File

@@ -43,7 +43,7 @@
*
* Shape (b) — per-expression: quasis[i+1].raw starts with a forward slash
* and contains `.md` or `.json` at the end of a path component. This
* catches `${computePathPrefix(t)}/commands/gsd/x.md` and
* catches `${computePathPrefix(t)}/commands/msd/x.md` and
* `@${getGlobalConfigDir()}/agents/foo.md` without requiring config-dir
* markers in CONTENT_MARKERS.
*
@@ -152,13 +152,13 @@ function isContentPathReturningCall(node) {
// immediately following expression `i` starts with `/...path.md` or
// `/...path.json`, indicating the expression is a path prefix for a
// content file reference. This catches `${computePathPrefix(t)}/commands/
// gsd/x.md` and `@${getGlobalConfigDir('claude')}/commands/gsd/help.md`
// msd/x.md` and `@${getGlobalConfigDir('claude')}/commands/msd/help.md`
// without requiring config-dir markers in CONTENT_MARKERS.
//
// Deliberately excluded from CONTENT_MARKERS (were Tier 2 / Tier 3):
// Config-dir substrings (`/.claude`, `/.cursor`, `/.gemini`, `/.config`,
// etc.) and artifact-path segments (`/commands`, `/agents`, `/skills`,
// `/workflows`, `/rules`, `/gsd`) — these are too broad as standalone
// `/workflows`, `/rules`, `/msd`) — these are too broad as standalone
// markers and generate false positives when interpolated into log/error/
// diagnostic strings that mention config-dir paths. Shape (b) above covers
// the genuine content-emit cases without the FP risk.
@@ -181,7 +181,7 @@ const CONTENT_MARKERS = [
//
// Applied per-expression in TemplateLiteral: quasis[i+1].raw must start with
// a forward slash and contain `.md` or `.json` before the next whitespace or
// end of the quasi string. This matches `/commands/gsd/x.md`,
// end of the quasi string. This matches `/commands/msd/x.md`,
// `/skills/foo/SKILL.md`, `/help.json`, etc. without requiring a config-dir
// marker in CONTENT_MARKERS.
//
@@ -377,8 +377,8 @@ const rule = {
// quasis[i+1].raw starts with a forward slash followed by a path that
// terminates in .md or .json — the expression is a path prefix being
// interpolated directly before a content file reference. This catches
// `${computePathPrefix(t)}/commands/gsd/x.md` and
// `@${getGlobalConfigDir('claude')}/commands/gsd/help.md` without
// `${computePathPrefix(t)}/commands/msd/x.md` and
// `@${getGlobalConfigDir('claude')}/commands/msd/help.md` without
// requiring config-dir markers in CONTENT_MARKERS.
for (let i = 0; i < exprs.length; i++) {
const nextQuasi = quasis[i + 1];

View File

@@ -38,7 +38,7 @@ const path = require('node:path');
* allowlist, widening the rule's trust boundary to a name that can be
* typo'd or copy-pasted into an unrelated module.
*
* 2. gsd-core/bin/gsd-tools.cjs's `ensureRuntimeBuild` bootstrap-failure path
* 2. msd-core/bin/msd-tools.cjs's `ensureRuntimeBuild` bootstrap-failure path
* (see its own inline `// eslint-disable-next-line local/require-registered-exit`
* comment). That call runs BEFORE `./lib/cli-exit.cjs` is even required —
* the registered-exit seam does not exist yet at that point in the