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

@@ -5,11 +5,11 @@
/**
* Docs hook-table parity — docs-hooks-table-parity.test.cjs
*
* #3839: the shipped hook tables documented `gsd-validate-commit.sh` as
* #3839: the shipped hook tables documented `msd-validate-commit.sh` as
* PostToolUse when it is registered PreToolUse (a PreToolUse hook BLOCKS a
* commit via exit 2; a PostToolUse hook cannot — the documented event
* misdescribes the hook's entire contract). The same scan found
* `gsd-session-state.sh` documented PostToolUse while registered
* `msd-session-state.sh` documented PostToolUse while registered
* SessionStart. Nine files carried the wrong rows (ARCHITECTURE.md +
* INVENTORY.md × en, ja-JP, zh-CN, ko-KR, pt-BR).
*
@@ -17,7 +17,7 @@
* (src/runtime-hooks-surface.cts) — its own comment pins the invariant
* "mirrors applySettingsJsonHooks' settings.json wiring 1:1" — unioned with
* literal-event probe lines (`settings.hooks.<Event>.some(…
* referencesHook(…, 'gsd-…'))`). Registrations written through the
* referencesHook(…, 'msd-…'))`). Registrations written through the
* runtime-resolved variables (`preToolEvent`/`postToolEvent`) are NOT
* statically parseable and are covered only via the mirror invariant; hooks
* registered on other surfaces (statusline, plugin-surface) are out of
@@ -53,28 +53,28 @@ const DOC_TABLES = [
// disappears or the parser drifts, this pin fails instead of the parity
// checks silently narrowing to a subset.
const EXPECTED_SURFACE_HOOKS = [
'gsd-agent-isolation-guard.js',
'gsd-check-update.js',
'gsd-config-reload.js',
'gsd-context-monitor.js',
'gsd-graphify-update.sh',
'gsd-phase-boundary.sh',
'gsd-prompt-guard.js',
'gsd-read-guard.js',
'gsd-read-injection-scanner.js',
'gsd-secret-read-guard.js',
'gsd-session-state.sh',
'gsd-validate-commit.sh',
'gsd-workflow-guard.js',
'gsd-worktree-path-guard.js',
'gsd-write-guard.js',
'msd-agent-isolation-guard.js',
'msd-check-update.js',
'msd-config-reload.js',
'msd-context-monitor.js',
'msd-graphify-update.sh',
'msd-phase-boundary.sh',
'msd-prompt-guard.js',
'msd-read-guard.js',
'msd-read-injection-scanner.js',
'msd-secret-read-guard.js',
'msd-session-state.sh',
'msd-validate-commit.sh',
'msd-workflow-guard.js',
'msd-worktree-path-guard.js',
'msd-write-guard.js',
];
/** hook basename → Set of events it is registered under on this surface. */
function registeredHookEvents() {
const src = fs.readFileSync(SURFACE_PATH, 'utf8');
const map = new Map();
// Probe lines name hooks WITHOUT file extensions (`'gsd-session-state'`).
// Probe lines name hooks WITHOUT file extensions (`'msd-session-state'`).
// Resolve a bare name against the actual hooks/ directory (the file's
// extension is ground truth) so both spellings resolve to one entry.
const resolveBase = (name) => {
@@ -109,12 +109,12 @@ function registeredHookEvents() {
return map;
}
/** Hook-table rows: [basename, eventCell] for `gsd-*` hooks. */
/** Hook-table rows: [basename, eventCell] for `msd-*` hooks. */
function docHookRows(docPath) {
const lines = fs.readFileSync(path.join(ROOT, docPath), 'utf8').split(/\r?\n/);
const rows = [];
for (const line of lines) {
const m = line.match(/^\|\s*`?(gsd-[a-z0-9-]+\.(?:sh|js|cmd))`?\s*\|\s*`([^`]+)`\s*\|/);
const m = line.match(/^\|\s*`?(msd-[a-z0-9-]+\.(?:sh|js|cmd))`?\s*\|\s*`([^`]+)`\s*\|/);
if (m) rows.push([m[1], m[2]]);
}
return rows;
@@ -154,19 +154,19 @@ describe('docs hook tables match runtime-hooks-surface registrations', () => {
}
test('#3839 regression pin: the two misdocumented hooks are asserted directly', () => {
assert.ok(surface.get('gsd-validate-commit.sh').has('PreToolUse'),
'gsd-validate-commit.sh blocks commits — must stay PreToolUse on the surface');
assert.ok(surface.get('gsd-session-state.sh').has('SessionStart'),
'gsd-session-state.sh orients the session — must stay SessionStart on the surface');
assert.ok(surface.get('msd-validate-commit.sh').has('PreToolUse'),
'msd-validate-commit.sh blocks commits — must stay PreToolUse on the surface');
assert.ok(surface.get('msd-session-state.sh').has('SessionStart'),
'msd-session-state.sh orients the session — must stay SessionStart on the surface');
// ja-JP/ARCHITECTURE.md's hook table is a shorter translation that never
// listed these two hooks — it stays in the parity loop above but not here.
const PINNED = DOC_TABLES.filter((d) => d !== 'docs/ja-JP/ARCHITECTURE.md');
for (const doc of PINNED) {
const rows = docHookRows(doc);
const vc = rows.find(([b]) => b === 'gsd-validate-commit.sh');
const vc = rows.find(([b]) => b === 'msd-validate-commit.sh');
assert.ok(vc, `${doc}: validate-commit row present`);
assert.equal(vc[1], 'PreToolUse', `${doc}: validate-commit documented as PreToolUse`);
const ss = rows.find(([b]) => b === 'gsd-session-state.sh');
const ss = rows.find(([b]) => b === 'msd-session-state.sh');
assert.ok(ss, `${doc}: session-state row present`);
assert.equal(ss[1], 'SessionStart', `${doc}: session-state documented as SessionStart`);
}