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

@@ -8,24 +8,24 @@
* epic #4272).
*
* WHAT'S EXECUTABLE VS WHAT ISN'T (see
* `.gsd/phase/chore-4298-tdd-walk-qa-harness/40-design.md`): the two TDD
* `.msd/phase/chore-4298-tdd-walk-qa-harness/40-design.md`): the two TDD
* dispatch backends' `${TDD_APPLICABLE ? "..." : ""}` embed-list markers are
* LLM-orchestrator pseudo-syntax composed by the agent reading the workflow
* markdown at dispatch time — they are NOT real bash and cannot be executed
* by a shell. What IS real, executable bash is the resolution block that
* computes the `TDD_APPLICABLE` variable itself:
* - `gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md`
* - `msd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md`
* ("harness" backend) — one self-contained fenced block: its own
* `gsd_run` shim-discovery preamble, then the `TDD_APPLICABLE_RAW=...` /
* `msd_run` shim-discovery preamble, then the `TDD_APPLICABLE_RAW=...` /
* `TDD_APPLICABLE_RC=$?` / fail-closed check / `TDD_APPLICABLE=` assignment.
* - `gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md`
* ("worktree" backend) — the `gsd_run` shim-discovery preamble lives in
* - `msd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md`
* ("worktree" backend) — the `msd_run` shim-discovery preamble lives in
* the file's FIRST fenced block, which is not just the shim: it is the
* whole ISOLATION resolution (its own independent fail-closed branches),
* ahead of a LATER fenced block that contains the `_TDD_APPLICABLE_RAW=...`
* resolution followed by the `EXECUTOR_PROMPT=` composition this harness
* does not need. A standalone execution must concatenate the first block
* (for its `gsd_run` definition) with just the TDD resolution lines
* (for its `msd_run` definition) with just the TDD resolution lines
* sliced out of the second.
*
* This module extracts each backend's real bash via `indexOf`/`slice` on the
@@ -40,16 +40,16 @@
const fs = require('fs');
const path = require('path');
const { execFileSync } = require('child_process');
const { createTempProject, cleanup, runGsdTools, readFileNormalized, TEST_ENV_BASE } = require('../helpers.cjs');
const { createTempProject, cleanup, runMsdTools, readFileNormalized, TEST_ENV_BASE } = require('../helpers.cjs');
/** Absolute real repo root — NOT the temp fixture's own root. */
const REPO_ROOT = path.join(__dirname, '..', '..');
const RESOLUTION_STEP_PATH = path.join(
REPO_ROOT, 'gsd-core', 'workflows', 'execute-phase', 'steps', 'tdd-applicability-resolution.md',
REPO_ROOT, 'msd-core', 'workflows', 'execute-phase', 'steps', 'tdd-applicability-resolution.md',
);
const DISPATCH_STEP_PATH = path.join(
REPO_ROOT, 'gsd-core', 'workflows', 'execute-phase', 'steps', 'executor-isolation-dispatch.md',
REPO_ROOT, 'msd-core', 'workflows', 'execute-phase', 'steps', 'executor-isolation-dispatch.md',
);
const FENCE_OPEN = '```bash';
@@ -192,8 +192,8 @@ function parseResultSentinel(stdout) {
// Bounds `bash -c` execution (below) of a REAL fenced bash block extracted
// from a workflow markdown file's resolution/dispatch step — a bash-hosted
// script that may itself shell out further (e.g. via a `gsd_run` shim), not
// a bare `gsd-tools.cjs` CLI subcommand invocation. Numerically coincides
// script that may itself shell out further (e.g. via a `msd_run` shim), not
// a bare `msd-tools.cjs` CLI subcommand invocation. Numerically coincides
// with tests/helpers/timeouts.cjs's `BUILD_TIMEOUT_MS` (hooks-bundle build
// via scripts/build-hooks.js, an unrelated operation) and with this batch's
// other file-local `PLAN_PRE_HOOK_CLI_TIMEOUT_MS` (a different file, a
@@ -216,19 +216,19 @@ const TDD_BACKEND_SCRIPT_TIMEOUT_MS = 30000;
*/
function executeBackendScript(script, cwd) {
try {
// #4298 Standards+Spec review: `runGsdTools` (tests/helpers.cjs) scrubs
// #4298 Standards+Spec review: `runMsdTools` (tests/helpers.cjs) scrubs
// SESSION_IDENTITY_ENV_KEYS + config-location env vars before spawning,
// because an ambient developer/CI value (e.g. a real ~/.gsd/config.json
// location override) can silently change what a gsd-tools child resolves
// — documented there as #2665. This harness spawns `gsd_run` the exact
// because an ambient developer/CI value (e.g. a real ~/.msd/config.json
// location override) can silently change what a msd-tools child resolves
// — documented there as #2665. This harness spawns `msd_run` the exact
// same way (indirectly, via the extracted resolution script), so it needs
// the same hermeticity: spread the exported `TEST_ENV_BASE` (every
// scrub-listed key set to '') AFTER `...process.env` but BEFORE the two
// intentional overrides below, so ambient state is blanked and only
// RUNTIME_DIR/GSD_TEST_MODE are deliberately set.
// RUNTIME_DIR/MSD_TEST_MODE are deliberately set.
const stdout = execFileSync('bash', ['-c', script], {
cwd,
env: { ...process.env, ...TEST_ENV_BASE, RUNTIME_DIR: REPO_ROOT, GSD_TEST_MODE: '1' },
env: { ...process.env, ...TEST_ENV_BASE, RUNTIME_DIR: REPO_ROOT, MSD_TEST_MODE: '1' },
encoding: 'utf8',
timeout: TDD_BACKEND_SCRIPT_TIMEOUT_MS,
});
@@ -271,7 +271,7 @@ class TddWalk {
* @returns {TddWalk}
*/
static create(opts = {}) {
const { prefix = 'gsd-tdd-walk-' } = opts;
const { prefix = 'msd-tdd-walk-' } = opts;
const dir = createTempProject(prefix);
return new TddWalk(dir);
}
@@ -288,7 +288,7 @@ class TddWalk {
}
/**
* Resolve TDD-applicability via the real CLI verb (`gsd_run query
* Resolve TDD-applicability via the real CLI verb (`msd_run query
* phase.tdd-applicable`), reusing Phase 1's proven invocation
* (`tests/phase-tdd-applicable.test.cjs`).
*
@@ -300,7 +300,7 @@ class TddWalk {
const { cliFlag = false } = opts;
const argv = ['query', 'phase.tdd-applicable', this.planPath];
if (cliFlag) argv.push('--cli-flag');
const result = runGsdTools(argv, this.dir);
const result = runMsdTools(argv, this.dir);
if (!result.success) {
return { success: false, error: result.error, exitCode: result.exitCode ?? null };
}