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

@@ -2,22 +2,22 @@
'use strict';
/**
* gen-section-manifest.cjs — generates gsd-core/workflows/section-manifest.json
* from the `<!-- gsd:section -->` markers in gsd-core/workflows/*.md (ADR-1671
* gen-section-manifest.cjs — generates msd-core/workflows/section-manifest.json
* from the `<!-- msd:section -->` markers in msd-core/workflows/*.md (ADR-1671
* epic #1671; Phase 5 / issue #2932 introduced the artifact,
* `.gsd/phase/chore-2932-init-section-manifest/40-design.md`; Phase 6.1 /
* `.msd/phase/chore-2932-init-section-manifest/40-design.md`; Phase 6.1 /
* issue #2992 generalized it from single-workflow to PER-WORKFLOW,
* `.gsd/phase/chore-2992-widen-when-vocabulary/40-design.md`).
* `.msd/phase/chore-2992-widen-when-vocabulary/40-design.md`).
*
* Reuses `parseWorkflowSections` from the compiled `workflow-fragments.cjs`
* (src/workflow-fragments.cts, Phase 3 / #2930) UNCHANGED — this module never
* re-implements marker parsing (design "Rejected #6"; a second parser is the
* `DEFECT.GENERATIVE-FIX` divergence class).
*
* The committed artifact is placed INSIDE the `gsd-core/` tree (not `docs/`,
* The committed artifact is placed INSIDE the `msd-core/` tree (not `docs/`,
* unlike `docs/CONTEXT-INDEX.json`/`docs/INVENTORY-MANIFEST.json`) because it
* must SHIP: `bin/install.js`'s `copyWithPathReplacement` only copies
* `gsd-core/`, and the init CLI's run-time selection reads this artifact
* `msd-core/`, and the init CLI's run-time selection reads this artifact
* from the INSTALLED tree, not the dev repo. `copyWithPathReplacement`
* only runs `composeWorkflow`/converters on `*.md` — a `.json` leaf falls
* through to a plain `fs.copyFileSync`, so the artifact ships byte-identical.
@@ -58,7 +58,7 @@
* (most workflows today) contributes no key to `workflows` and is never
* orphan-checked — orphan-checking is scoped only to a workflow's OWN
* `steps/` directory, and only for workflows that declare at least one
* `gsd:section` marker.
* `msd:section` marker.
*
* `--check` fails closed (exit 1, never a stack trace) on:
* - the compiled `workflow-fragments.cjs` dependency being unbuilt/unloadable
@@ -100,7 +100,7 @@ const path = require('node:path');
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
const ROOT = path.resolve(__dirname, '..');
const WORKFLOWS_DIR = path.join(ROOT, 'gsd-core', 'workflows');
const WORKFLOWS_DIR = path.join(ROOT, 'msd-core', 'workflows');
const MANIFEST_PATH = path.join(WORKFLOWS_DIR, 'section-manifest.json');
// ─── Typed reason enum (CONTRIBUTING.md "Prohibited: Raw Text Matching") ───────
@@ -129,7 +129,7 @@ const REASON = Object.freeze({
// ─── Loaders ──────────────────────────────────────────────────────────────────
const WORKFLOW_FRAGMENTS_LIB_PATH = path.join(ROOT, 'gsd-core', 'bin', 'lib', 'workflow-fragments.cjs');
const WORKFLOW_FRAGMENTS_LIB_PATH = path.join(ROOT, 'msd-core', 'bin', 'lib', 'workflow-fragments.cjs');
/**
* Load the compiled workflow-fragments library. The artifact is a gitignored
@@ -239,7 +239,7 @@ class ManifestBuildError extends ExitError {
}
/**
* Scan `workflowsDir` for `.md` files carrying `gsd:section` markers and
* Scan `workflowsDir` for `.md` files carrying `msd:section` markers and
* build the live (freshly-derived) manifest: `{ workflows: { <name>:
* [{id, when, read}], ... } }` (#2992 Phase 6.1). Workflow keys are
* serialized in sorted (filename) order; a workflow's own sections stay in
@@ -249,7 +249,7 @@ class ManifestBuildError extends ExitError {
* Throws `ManifestBuildError` on any fail-closed condition (missing step
* file, orphan step file, unparseable source).
*
* @param {string} workflowsDir - defaults to the real repo-root gsd-core/workflows/
* @param {string} workflowsDir - defaults to the real repo-root msd-core/workflows/
* @param {string} repoRoot - root `read` paths are computed relative to
* @returns {{ workflows: Record<string, Array<{id: string, when: string, read: string}>> }}
*/
@@ -311,7 +311,7 @@ function buildFreshManifest(workflowsDir = WORKFLOWS_DIR, repoRoot = ROOT) {
throw new ManifestBuildError(
REASON.FAIL_ORPHAN_STEP_FILE,
relOrphanPath,
`${relOrphanPath} is not referenced by any gsd:section marker or reachable "steps/" reference in ${relSourcePath}`,
`${relOrphanPath} is not referenced by any msd:section marker or reachable "steps/" reference in ${relSourcePath}`,
);
}