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

@@ -10,24 +10,24 @@
* can point at it: Stryker's command runner treats one `node --test <file>`
* invocation as a single test costing whatever its slowest case costs, and
* re-runs that whole invocation once per mutant. A suite that spawns a real
* `gsd-tools` child process per case (as the integration band in the sibling
* `.test.cjs` file does via `runGsdTools`) cannot finish inside the 15-minute
* `msd-tools` child process per case (as the integration band in the sibling
* `.test.cjs` file does via `runMsdTools`) cannot finish inside the 15-minute
* shard cap once multiplied across hundreds of mutants — the same failure
* mode already fixed for `planning-inspect` and `model-catalog` (#2790).
* Every case here calls `buildStateContract` / `publishStateContract`
* in-process and never shells out.
*
* Design: .gsd/phase/feat-3227-state-contract/40-design.md
* Test matrix: .gsd/phase/feat-3227-state-contract/50-test-matrix.md
* Design: .msd/phase/feat-3227-state-contract/40-design.md
* Test matrix: .msd/phase/feat-3227-state-contract/50-test-matrix.md
*
* Fixture provenance (CONTRIBUTING.md "Fixture provenance (#2371)"): every
* `.planning/` document shape written by this file's fixture builders is
* derived from the SHIPPED templates the product author wrote —
* `gsd-core/templates/roadmap.md` (`## Phases` checkbox bullets,
* `msd-core/templates/roadmap.md` (`## Phases` checkbox bullets,
* `### Phase N: Name` details with `Plans:` lists, the 4-column and
* milestone-grouped 5-column `## Progress` tables, and the
* `Not started | In progress | Complete | Deferred` status vocabulary) and
* `gsd-core/templates/state.md` (`## Current Position`, `Phase: X of Y
* `msd-core/templates/state.md` (`## Current Position`, `Phase: X of Y
* (Name)`) — never from `state-contract.cts`'s own parsing model. The
* `fast-check` generators (rows 85-86 of the original suite) are
* document-shaped — arbitrary column order, injected columns, arbitrary
@@ -44,7 +44,7 @@
* These same fixture helpers are also byte-duplicated (not shared) from the
* `.test.cjs` integration sibling, deliberately: this file is the Stryker
* mutation shard target and must stay spawn-free and self-contained, so a
* shared `require` of the integration file would drag `runGsdTools` and its
* shared `require` of the integration file would drag `runMsdTools` and its
* subprocess seam into the shard. The duplication is isolation, not drift.
*/
@@ -65,10 +65,10 @@ const {
PHASE_KEY_ORDER,
PHASE_STATUS,
PUBLISH_REASON,
} = require('../gsd-core/bin/lib/state-contract.cjs');
} = require('../msd-core/bin/lib/state-contract.cjs');
const { deriveProgressFromRoadmap, locateProgressTable } = require('../gsd-core/bin/lib/phase-lifecycle.cjs');
const { classifyProject } = require('../gsd-core/bin/lib/smart-entry.cjs');
const { deriveProgressFromRoadmap, locateProgressTable } = require('../msd-core/bin/lib/phase-lifecycle.cjs');
const { classifyProject } = require('../msd-core/bin/lib/smart-entry.cjs');
// ─── Fixture helpers ──────────────────────────────────────────────────────────
@@ -144,7 +144,7 @@ function fixedDeps(overrides = {}) {
/** A healthy two-phase project: phase 1 complete, phase 2 in progress. */
function buildFullFixture(cwd, eol = '\n') {
writeState(cwd, ["gsd_state_version: '1.0'", 'status: executing', 'milestone: v1.0', 'current_phase: 2'], [], eol);
writeState(cwd, ["msd_state_version: '1.0'", 'status: executing', 'milestone: v1.0', 'current_phase: 2'], [], eol);
writeProgressRoadmap(cwd, [
{ Phase: '1. Foundation', 'Plans Complete': '3/3', Status: 'Complete', Completed: '2025-01-01' },
{ Phase: '2. Hardening', 'Plans Complete': '1/2', Status: 'In progress', Completed: '-' },
@@ -572,7 +572,7 @@ describe('state contract — checkbox fallback', () => {
test('fallbackMarksCurrentPhaseInProgress', (t) => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
writeState(tmpDir, ["gsd_state_version: '1.0'", 'status: executing', 'current_phase: 2']);
writeState(tmpDir, ["msd_state_version: '1.0'", 'status: executing', 'current_phase: 2']);
writeCheckboxRoadmap(tmpDir, ['- [ ] **Phase 2: Bar** - active']);
const snapshot = buildStateContract(tmpDir, fixedDeps());
assert.strictEqual(snapshot.phases[0].status, PHASE_STATUS.IN_PROGRESS);
@@ -581,7 +581,7 @@ describe('state contract — checkbox fallback', () => {
test('fallbackMarksOtherUncheckedPhasesPending', (t) => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
writeState(tmpDir, ["gsd_state_version: '1.0'", 'status: executing', 'current_phase: 2']);
writeState(tmpDir, ["msd_state_version: '1.0'", 'status: executing', 'current_phase: 2']);
writeCheckboxRoadmap(tmpDir, ['- [ ] **Phase 3: Baz** - later']);
const snapshot = buildStateContract(tmpDir, fixedDeps());
assert.strictEqual(snapshot.phases[0].status, PHASE_STATUS.PENDING);
@@ -664,7 +664,7 @@ describe('state contract — milestone', () => {
test('composesMilestoneVersionAndName', (t) => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
writeState(tmpDir, ["gsd_state_version: '1.0'", 'status: executing', 'milestone: v1.1']);
writeState(tmpDir, ["msd_state_version: '1.0'", 'status: executing', 'milestone: v1.1']);
writeRoadmap(tmpDir, [
'# Roadmap: Test', '',
'## Milestones', '',
@@ -678,7 +678,7 @@ describe('state contract — milestone', () => {
test('emitsBareVersionWhenNameUnavailable', (t) => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
writeState(tmpDir, ["gsd_state_version: '1.0'", 'status: executing', 'milestone: v1.1']);
writeState(tmpDir, ["msd_state_version: '1.0'", 'status: executing', 'milestone: v1.1']);
writeRoadmap(tmpDir, [
'# Roadmap: Test', '',
'No milestone-name-bearing evidence anywhere in this document.', '',
@@ -690,7 +690,7 @@ describe('state contract — milestone', () => {
test('emitsNullMilestoneWhenUnknown', (t) => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
writeState(tmpDir, ["gsd_state_version: '1.0'", 'status: planning']);
writeState(tmpDir, ["msd_state_version: '1.0'", 'status: planning']);
writeRoadmap(tmpDir, ['# Roadmap: Test', '']);
const snapshot = buildStateContract(tmpDir, fixedDeps());
assert.strictEqual(snapshot.milestone, null);
@@ -746,13 +746,13 @@ describe('state contract — next (AC-2)', () => {
const planning = createTempProject();
t.after(() => cleanup(planning));
writeState(planning, ["gsd_state_version: '1.0'", 'status: planning', 'current_phase: 1']);
writeState(planning, ["msd_state_version: '1.0'", 'status: planning', 'current_phase: 1']);
writeCheckboxRoadmap(planning, ['- [ ] **Phase 1: Foo** - tbd']);
assertNextMatchesClassify(planning);
const complete = createTempProject();
t.after(() => cleanup(complete));
writeState(complete, ["gsd_state_version: '1.0'", 'status: completed', 'current_phase: 1']);
writeState(complete, ["msd_state_version: '1.0'", 'status: completed', 'current_phase: 1']);
writeProgressRoadmap(complete, [
{ Phase: '1. Foo', 'Plans Complete': '1/1', Status: 'Complete', Completed: '2025-01-01' },
]);
@@ -763,7 +763,7 @@ describe('state contract — next (AC-2)', () => {
// ─── 9. Degradation / never-fail (AC-3) ────────────────────────────────────────
describe('state contract — degradation / never-fail (AC-3)', () => {
test('doesNotCreatePlanningDirInANonGsdTree', (t) => {
test('doesNotCreatePlanningDirInANonMsdTree', (t) => {
const tmpDir = createTempDir();
t.after(() => cleanup(tmpDir));
const result = publishStateContract(tmpDir, fixedDeps());
@@ -1169,11 +1169,11 @@ describe('state contract — write mechanics', () => {
{ Phase: '1. Workstream Only', 'Plans Complete': '0/1', Status: 'Not started', Completed: '-' },
]),
].join('\n'));
const savedWs = process.env.GSD_WORKSTREAM;
process.env.GSD_WORKSTREAM = 'ws1';
const savedWs = process.env.MSD_WORKSTREAM;
process.env.MSD_WORKSTREAM = 'ws1';
t.after(() => {
if (savedWs === undefined) delete process.env.GSD_WORKSTREAM;
else process.env.GSD_WORKSTREAM = savedWs;
if (savedWs === undefined) delete process.env.MSD_WORKSTREAM;
else process.env.MSD_WORKSTREAM = savedWs;
});
const result = publishStateContract(tmpDir, fixedDeps());
assert.deepStrictEqual(result, { published: true, reason: PUBLISH_REASON.PUBLISHED });