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

@@ -1,32 +1,32 @@
'use strict';
/**
* Integration tests for `gsd_run query context-predicates` — the selector
* Integration tests for `msd_run query context-predicates` — the selector
* surface for the CONTEXT.md predicate fact-store (ADR-1671 S9, #2928 Phase
* 1, rows G1-G17).
*
* NET-NEW COMMAND, EXPECTED RED: `context-predicates` is not yet registered
* in gsd-core/bin/gsd-tools.cjs's HOST_COMMAND_ROUTERS / TOP_LEVEL_USAGE /
* in msd-core/bin/msd-tools.cjs's HOST_COMMAND_ROUTERS / TOP_LEVEL_USAGE /
* SKIP_ROOT_RESOLUTION (S9's three hand-maintained sites). Every test in this
* file targets the REQUIRED behavior from 40-design.md rows 38-43 and
* currently fails because the command does not exist — that is expected and
* correct for this commit (a failing-first regression matrix), not a
* defect in the test.
*
* Invocation shape: `gsd_run query <command> [args]` maps to
* `node gsd-tools.cjs query <command> [args]` — `query` is a meta-prefix the
* dispatcher strips (gsd-core/bin/gsd-tools.cjs, "Accept `query` as a
* Invocation shape: `msd_run query <command> [args]` maps to
* `node msd-tools.cjs query <command> [args]` — `query` is a meta-prefix the
* dispatcher strips (msd-core/bin/msd-tools.cjs, "Accept `query` as a
* meta-prefix"). This is the same shape every existing query consumer in
* gsd-core/workflows/*.md uses (e.g. `gsd_run query stats.json`,
* `gsd_run query prompt-budget ...`) — mirrored here since no real caller of
* msd-core/workflows/*.md uses (e.g. `msd_run query stats.json`,
* `msd_run query prompt-budget ...`) — mirrored here since no real caller of
* `context-predicates` is wired yet (net-new capability).
*
* Structured assertions: success/failure is asserted via exit code, and via
* `--json-errors` (a real, already-shipped global gsd-tools flag) parsed as
* `--json-errors` (a real, already-shipped global msd-tools flag) parsed as
* `{ok, reason, message}` — `reason` is compared against the frozen
* ERROR_REASON enum (gsd-core/bin/lib/io.cjs), never a substring match on
* ERROR_REASON enum (msd-core/bin/lib/io.cjs), never a substring match on
* `message` prose. On success, output is asserted via JSON.parse of stdout
* (gsd-tools' shared `output()` helper always serializes JSON to stdout
* (msd-tools' shared `output()` helper always serializes JSON to stdout
* unless --raw is passed) — never a stdout regex.
*/
@@ -35,15 +35,15 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { runGsdTools, createTempDir, cleanup } = require('./helpers.cjs');
const { ERROR_REASON } = require('../gsd-core/bin/lib/io.cjs');
const { parsePredicates, selectPredicates } = require('../gsd-core/bin/lib/context-predicates.cjs');
const { runMsdTools, createTempDir, cleanup } = require('./helpers.cjs');
const { ERROR_REASON } = require('../msd-core/bin/lib/io.cjs');
const { parsePredicates, selectPredicates } = require('../msd-core/bin/lib/context-predicates.cjs');
const ROOT = path.resolve(__dirname, '..');
const STACK_FRAME_RE = /\n\s+at\s+\S+\s+\(.*:\d+:\d+\)/;
function queryContextPredicates(args, cwd = ROOT, env = {}) {
return runGsdTools(['query', 'context-predicates', ...args], cwd, env);
return runMsdTools(['query', 'context-predicates', ...args], cwd, env);
}
function queryContextPredicatesJsonErrors(args, cwd = ROOT) {
@@ -61,7 +61,7 @@ function queryContextPredicatesJsonErrors(args, cwd = ROOT) {
// exported pure parser/selector — NOT by parsing the CLI's own rendered text.
const REAL_PREDICATES = parsePredicates(fs.readFileSync(path.join(ROOT, 'CONTEXT.md'), 'utf8')).predicates;
describe('gsd_run query context-predicates (G)', () => {
describe('msd_run query context-predicates (G)', () => {
test('queryReturnsPredicatesForClass', () => {
const expected = selectPredicates(REAL_PREDICATES, { klass: 'META' });
assert.ok(expected.length > 0, 'fixture sanity: META class must exist in the real CONTEXT.md');
@@ -208,7 +208,7 @@ describe('gsd_run query context-predicates (G)', () => {
});
test('queryDoesNotInterpolateShellMetacharacters', () => {
const markerPath = path.join(ROOT, '.gsd-test-shell-injection-marker-2928');
const markerPath = path.join(ROOT, '.msd-test-shell-injection-marker-2928');
assert.equal(fs.existsSync(markerPath), false, 'fixture sanity: marker must not pre-exist');
const hostileValue = `; touch ${markerPath} #`;
const r = queryContextPredicates(['--contains', hostileValue]);
@@ -246,7 +246,7 @@ describe('gsd_run query context-predicates (G)', () => {
// allow-test-rule: source-text-is-the-product #2928
// Wiring check for #2928's acceptance criterion — "an agent/orchestrator can invoke the
// selector through a wired `gsd_run query` surface to assemble a brief". Before this, nothing
// selector through a wired `msd_run query` surface to assemble a brief". Before this, nothing
// in the repo called `context-predicates`; it was a stranded CLI. docs/contributor-standards.md
// §"Pre-work requirements" is the real, tested brief-assembly site governing how an AI-agent
// prompt must cite CONTEXT.md's META.RULE predicates — this asserts it routes through the
@@ -258,7 +258,7 @@ describe('context-predicates wired into a real brief-assembly site (#2928)', ()
test('contributorStandardsRoutesPredicateCitationThroughTheQuerySelector', () => {
assert.ok(
standardsText.includes('node gsd-tools.cjs query context-predicates --class'),
standardsText.includes('node msd-tools.cjs query context-predicates --class'),
'docs/contributor-standards.md must invoke the context-predicates selector rather than instructing a grep-by-eye read'
);
assert.ok(