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:
@@ -23,7 +23,7 @@ const { test, describe, beforeEach, afterEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
const { PATHOLOGICAL_INPUT_TEST_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
||||
|
||||
let tmpDir;
|
||||
@@ -33,7 +33,7 @@ function writeProject({ roadmap, convention, status = 'executing', phaseDirs = [
|
||||
const base = ws ? path.join(root, 'workstreams', ws) : root;
|
||||
fs.mkdirSync(base, { recursive: true });
|
||||
fs.writeFileSync(path.join(base, 'ROADMAP.md'), roadmap, 'utf-8');
|
||||
fs.writeFileSync(path.join(base, 'STATE.md'), ['---', 'gsd_state_version: 1.0',
|
||||
fs.writeFileSync(path.join(base, 'STATE.md'), ['---', 'msd_state_version: 1.0',
|
||||
'milestone: v2.0', 'milestone_name: Expansion', `status: ${status}`, '---', '',
|
||||
'# Project State', '', '**Phase:** 05', ''].join('\n'), 'utf-8');
|
||||
fs.writeFileSync(path.join(root, 'config.json'),
|
||||
@@ -44,7 +44,7 @@ function writeProject({ roadmap, convention, status = 'executing', phaseDirs = [
|
||||
}
|
||||
|
||||
const codes = (code, env = {}) => {
|
||||
const r = runGsdTools(['validate', 'health'], tmpDir, env);
|
||||
const r = runMsdTools(['validate', 'health'], tmpDir, env);
|
||||
const out = JSON.parse(r.output);
|
||||
return [...(out.issues || []), ...(out.warnings || [])]
|
||||
.filter(i => i.code === code).map(i => i.message);
|
||||
@@ -53,12 +53,12 @@ const w021 = (env) => codes('W021', env);
|
||||
|
||||
const COHERENT = `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** Build it
|
||||
|
||||
### [GSD.02] 06: Follow-up
|
||||
### [MSD.02] 06: Follow-up
|
||||
**Goal:** Polish it
|
||||
`;
|
||||
|
||||
@@ -74,13 +74,13 @@ describe('#612 PR-2: bracket phases resolve to their dirs, so W026 stays silent'
|
||||
|
||||
test('milestone complete + every bracket dir present => NO W021', () => {
|
||||
writeProject({ roadmap: COHERENT, convention: 'bracket', status: 'milestone complete',
|
||||
phaseDirs: ['GSD.02-05-real-work', 'GSD.02-06-follow-up'] });
|
||||
phaseDirs: ['MSD.02-05-real-work', 'MSD.02-06-follow-up'] });
|
||||
assert.deepEqual(w026(), []);
|
||||
});
|
||||
|
||||
test('a missing dir still fires — the check is not merely disabled', () => {
|
||||
writeProject({ roadmap: COHERENT, convention: 'bracket', status: 'milestone complete',
|
||||
phaseDirs: ['GSD.02-05-real-work'] });
|
||||
phaseDirs: ['MSD.02-05-real-work'] });
|
||||
const m = w026();
|
||||
assert.equal(m.length, 1, JSON.stringify(m));
|
||||
assert.match(m[0], /ROADMAP lists 1 unstarted phase/);
|
||||
@@ -103,14 +103,14 @@ describe('#612 PR-2: bracket phases resolve to their dirs, so W026 stays silent'
|
||||
test('a bracket SENTINEL heading is not an unstarted phase', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [GSD.999] 01: Icebox item
|
||||
### [MSD.999] 01: Icebox item
|
||||
**Goal:** Someday
|
||||
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** Build it
|
||||
`, convention: 'bracket', status: 'milestone complete', phaseDirs: ['GSD.02-05-real-work'] });
|
||||
`, convention: 'bracket', status: 'milestone complete', phaseDirs: ['MSD.02-05-real-work'] });
|
||||
assert.deepEqual(w026(), []);
|
||||
});
|
||||
|
||||
@@ -128,9 +128,9 @@ describe('#612 PR-2: workstream repos resolve one convention, not two', () => {
|
||||
|
||||
test('root config + active workstream: consistency and health agree', () => {
|
||||
writeProject({ roadmap: COHERENT, convention: 'bracket', ws: 'ws1',
|
||||
phaseDirs: ['GSD.02-05-real-work', 'GSD.02-06-follow-up'] });
|
||||
const env = { GSD_WORKSTREAM: 'ws1' };
|
||||
const consistency = JSON.parse(runGsdTools(['validate', 'consistency'], tmpDir, env).output);
|
||||
phaseDirs: ['MSD.02-05-real-work', 'MSD.02-06-follow-up'] });
|
||||
const env = { MSD_WORKSTREAM: 'ws1' };
|
||||
const consistency = JSON.parse(runMsdTools(['validate', 'consistency'], tmpDir, env).output);
|
||||
assert.deepEqual(
|
||||
(consistency.warnings || []).filter(w => /no directory on disk/.test(w)), [],
|
||||
'the ROADMAP read and the directory read must resolve from the same config',
|
||||
@@ -147,9 +147,9 @@ describe('#612 PR-2: bracket-coherence is gated on the active convention', () =>
|
||||
|
||||
const INCOHERENT = `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
### [GSD.03] 05: Wrong milestone
|
||||
### [MSD.03] 05: Wrong milestone
|
||||
**Goal:** Build it
|
||||
`;
|
||||
|
||||
@@ -184,15 +184,15 @@ describe('#612 PR-2: coherence scope rules', () => {
|
||||
// for every phase after it.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [GSD.02] 01: Setup
|
||||
### [MSD.02] 01: Setup
|
||||
**Goal:** a
|
||||
|
||||
### Notes
|
||||
Some prose.
|
||||
|
||||
### [GSD.03] 05: WRONG MILESTONE
|
||||
### [MSD.03] 05: WRONG MILESTONE
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
const m = w021();
|
||||
@@ -205,12 +205,12 @@ Some prose.
|
||||
// to be treated as a section reset and silenced everything after it.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### Phase 2-01: Mnn Legacy
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.03] 05: WRONG MILESTONE
|
||||
### [MSD.03] 05: WRONG MILESTONE
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
const m = w021();
|
||||
@@ -224,9 +224,9 @@ Some prose.
|
||||
// reported against — a section they are not in.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [GSD.02] 05: Real
|
||||
### [MSD.02] 05: Real
|
||||
**Goal:** a
|
||||
|
||||
## v3.0 — Legacy milestone
|
||||
@@ -242,12 +242,12 @@ Some prose.
|
||||
// needing migration.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
#### 2026: Timeline
|
||||
### 3.5: Rollout options
|
||||
|
||||
### [GSD.02] 05: Real
|
||||
### [MSD.02] 05: Real
|
||||
**Goal:** a
|
||||
`, convention: 'bracket' });
|
||||
assert.deepEqual(w021(), []);
|
||||
@@ -256,9 +256,9 @@ Some prose.
|
||||
test('h5 and h6 phase headings are checked, like every other reader counts them', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
##### [GSD.03] 08: Deep mismatch
|
||||
##### [MSD.03] 08: Deep mismatch
|
||||
**Goal:** a
|
||||
`, convention: 'bracket' });
|
||||
const m = w021();
|
||||
@@ -269,12 +269,12 @@ Some prose.
|
||||
test('sentinel sections are exempt', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.999] Backlog
|
||||
## [MSD.999] Backlog
|
||||
|
||||
### Phase 1: Icebox in legacy form
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.02] 07: Wrong milestone in an icebox section
|
||||
### [MSD.02] 07: Wrong milestone in an icebox section
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
assert.deepEqual(w021(), []);
|
||||
@@ -283,14 +283,14 @@ Some prose.
|
||||
test('a fenced code block raises nothing', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
\`\`\`markdown
|
||||
### [GSD.09] 42: An example heading in docs
|
||||
### [MSD.09] 42: An example heading in docs
|
||||
### Phase 7: A legacy example
|
||||
\`\`\`
|
||||
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** a
|
||||
`, convention: 'bracket' });
|
||||
assert.deepEqual(w021(), []);
|
||||
@@ -299,7 +299,7 @@ Some prose.
|
||||
test('BOUNDARY: a flat, section-less bracket roadmap gets no checking', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
### [GSD.03] 05: No enclosing section
|
||||
### [MSD.03] 05: No enclosing section
|
||||
**Goal:** a
|
||||
|
||||
### Phase 6: Also legacy form
|
||||
@@ -309,12 +309,12 @@ Some prose.
|
||||
});
|
||||
|
||||
test('the ADR-canonical name-only milestone heading opens a section', () => {
|
||||
// `## [GSD.02] Foundation` — name, no version — is the form ADR-612 pins.
|
||||
// `## [MSD.02] Foundation` — name, no version — is the form ADR-612 pins.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] Foundation
|
||||
## [MSD.02] Foundation
|
||||
|
||||
### [GSD.03] 05: Wrong milestone
|
||||
### [MSD.03] 05: Wrong milestone
|
||||
**Goal:** a
|
||||
`, convention: 'bracket' });
|
||||
const m = w021();
|
||||
@@ -325,12 +325,12 @@ Some prose.
|
||||
test('a milestone section heading is not mistaken for a phase heading', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [GSD.03] 05: Wrong
|
||||
### [MSD.03] 05: Wrong
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.04] 06: Also wrong
|
||||
### [MSD.04] 06: Also wrong
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
assert.equal(w021().length, 2);
|
||||
@@ -345,7 +345,7 @@ describe('#612 PR-2: the M-NN W021 gate is unmoved by workstream config', () =>
|
||||
|
||||
const MNN_ROADMAP = `# Roadmap
|
||||
|
||||
## [GSD] v2.0
|
||||
## [MSD] v2.0
|
||||
|
||||
### Phase 1-01: Setup
|
||||
**Goal:** a
|
||||
@@ -356,7 +356,7 @@ describe('#612 PR-2: the M-NN W021 gate is unmoved by workstream config', () =>
|
||||
const ws = path.join(root, 'workstreams', 'ws1');
|
||||
fs.mkdirSync(path.join(ws, 'phases'), { recursive: true });
|
||||
fs.writeFileSync(path.join(ws, 'ROADMAP.md'), MNN_ROADMAP, 'utf-8');
|
||||
fs.writeFileSync(path.join(ws, 'STATE.md'), ['---', 'gsd_state_version: 1.0',
|
||||
fs.writeFileSync(path.join(ws, 'STATE.md'), ['---', 'msd_state_version: 1.0',
|
||||
'milestone: v2.0', 'status: executing', '---', '', '# Project State', '',
|
||||
'**Phase:** 1-01', ''].join('\n'), 'utf-8');
|
||||
fs.writeFileSync(path.join(root, 'config.json'), JSON.stringify(rootCfg), 'utf-8');
|
||||
@@ -364,7 +364,7 @@ describe('#612 PR-2: the M-NN W021 gate is unmoved by workstream config', () =>
|
||||
fs.writeFileSync(path.join(ws, 'config.json'), JSON.stringify(wsCfg), 'utf-8');
|
||||
}
|
||||
};
|
||||
const mnnW021 = () => w021({ GSD_WORKSTREAM: 'ws1' })
|
||||
const mnnW021 = () => w021({ MSD_WORKSTREAM: 'ws1' })
|
||||
.filter(m => /integer prefix implies/.test(m));
|
||||
|
||||
test('ADDED-warning direction: a workstream M-NN config must not switch the gate on', () => {
|
||||
@@ -396,16 +396,16 @@ describe('#612 PR-2: unpadded bracket milestones scope nothing', () => {
|
||||
afterEach(() => { cleanup(tmpDir); });
|
||||
|
||||
test('an unpadded phase heading does not re-scope the coherence check', () => {
|
||||
// `### [GSD.3] 05:` was not a phase (id grammar) but WAS a section (section
|
||||
// `### [MSD.3] 05:` was not a phase (id grammar) but WAS a section (section
|
||||
// grammar), so it silently re-scoped every warning after it to milestone 03.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [GSD.3] 05: Unpadded
|
||||
### [MSD.3] 05: Unpadded
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.05] 06: Real mismatch
|
||||
### [MSD.05] 06: Real mismatch
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
const m = w021();
|
||||
@@ -427,17 +427,17 @@ describe('#612 PR-2: B6 keeps its narrow baseline behaviourally', () => {
|
||||
writeProject({
|
||||
roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### [v1.2] Phase 3: Not a phase heading
|
||||
Some prose.
|
||||
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** a
|
||||
`,
|
||||
convention: 'bracket',
|
||||
status: 'milestone complete',
|
||||
phaseDirs: ['GSD.02-05-real-work'],
|
||||
phaseDirs: ['MSD.02-05-real-work'],
|
||||
});
|
||||
assert.deepEqual(w021(), [], 'the phantom must not be counted as unstarted');
|
||||
});
|
||||
@@ -462,19 +462,19 @@ describe('#612 PR-2: malformed bracket tokens neither warn nor re-scope', () =>
|
||||
afterEach(() => { cleanup(tmpDir); });
|
||||
|
||||
const BROKEN_HEADINGS = [
|
||||
['non-numeric milestone', '### [GSD.AB] 05: Broken'],
|
||||
['unclosed bracket', '### [GSD.02 05: Broken'],
|
||||
['nested bracket', '### [GSD.[02]] 05: Broken'],
|
||||
['non-numeric milestone', '### [MSD.AB] 05: Broken'],
|
||||
['unclosed bracket', '### [MSD.02 05: Broken'],
|
||||
['nested bracket', '### [MSD.[02]] 05: Broken'],
|
||||
['empty bracket', '### [] 05: Broken'],
|
||||
['dot, no milestone', '### [GSD.] 05: Broken'],
|
||||
['double dot', '### [GSD..02] 05: Broken'],
|
||||
['dot, no milestone', '### [MSD.] 05: Broken'],
|
||||
['double dot', '### [MSD..02] 05: Broken'],
|
||||
];
|
||||
|
||||
for (const [label, broken] of BROKEN_HEADINGS) {
|
||||
test(`${label}: raises no W021 of its own`, () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
${broken}
|
||||
**Goal:** a
|
||||
@@ -487,12 +487,12 @@ ${broken}
|
||||
// silently moves every later warning onto the wrong milestone.
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
${broken}
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.07] 06: Real mismatch
|
||||
### [MSD.07] 06: Real mismatch
|
||||
**Goal:** b
|
||||
`, convention: 'bracket' });
|
||||
const mismatch = w021().filter(x => /does not match its section milestone/.test(x));
|
||||
@@ -504,13 +504,13 @@ ${broken}
|
||||
test('the whole broken corpus in one ROADMAP leaves validate health clean', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
${BROKEN_HEADINGS.map(([, h]) => `${h}\n**Goal:** x\n`).join('\n')}
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** ok
|
||||
`, convention: 'bracket', phaseDirs: ['GSD.02-05-real-work'] });
|
||||
const r = runGsdTools(['validate', 'health'], tmpDir);
|
||||
`, convention: 'bracket', phaseDirs: ['MSD.02-05-real-work'] });
|
||||
const r = runMsdTools(['validate', 'health'], tmpDir);
|
||||
assert.ok(r.success, `validate health failed on the broken corpus: ${r.error}`);
|
||||
assert.deepEqual(w021(), []);
|
||||
});
|
||||
@@ -530,15 +530,15 @@ ${BROKEN_HEADINGS.map(([, h]) => `${h}\n**Goal:** x\n`).join('\n')}
|
||||
test(`a pathological unclosed bracket (${width} chars) validates correctly`, { timeout: PATHOLOGICAL_INPUT_TEST_TIMEOUT_MS }, () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0 — Expansion
|
||||
## [MSD.02] v2.0 — Expansion
|
||||
|
||||
### [${'A'.repeat(width)} 05: Attack
|
||||
**Goal:** a
|
||||
|
||||
### [GSD.02] 05: Real work
|
||||
### [MSD.02] 05: Real work
|
||||
**Goal:** ok
|
||||
`, convention: 'bracket', phaseDirs: ['GSD.02-05-real-work'] });
|
||||
const r = runGsdTools(['validate', 'health'], tmpDir);
|
||||
`, convention: 'bracket', phaseDirs: ['MSD.02-05-real-work'] });
|
||||
const r = runMsdTools(['validate', 'health'], tmpDir);
|
||||
assert.ok(r.success, `validate health failed: ${r.error}`);
|
||||
assert.deepEqual(w021(), [], 'an unclosed bracket is not a phase heading at any width');
|
||||
});
|
||||
@@ -549,7 +549,7 @@ ${BROKEN_HEADINGS.map(([, h]) => `${h}\n**Goal:** x\n`).join('\n')}
|
||||
// ─── unsupported `--convention` value ───────────────────────────────────────
|
||||
//
|
||||
// `checkBracketCoherence`'s W021 previously attached a `fix` string telling
|
||||
// users to run `gsd-tools roadmap upgrade --convention bracket` — but
|
||||
// users to run `msd-tools roadmap upgrade --convention bracket` — but
|
||||
// `roadmap-command-router.cts` only supports `--convention milestone-prefixed`
|
||||
// (the bracket migrator is #612 PR-3, not yet landed); that command hard-errors
|
||||
// with "Only --convention milestone-prefixed is supported". Nothing in the
|
||||
@@ -564,12 +564,12 @@ describe('#612 PR-2 round-7 Minor 2: bracket W021 fix string names no unsupporte
|
||||
test('the fix string does not tell users to run `--convention bracket` (unsupported, hard-errors)', () => {
|
||||
writeProject({ roadmap: `# Roadmap
|
||||
|
||||
## [GSD.02] v2.0
|
||||
## [MSD.02] v2.0
|
||||
|
||||
### Phase 2-01: Mnn Legacy
|
||||
**Goal:** a
|
||||
`, convention: 'bracket' });
|
||||
const r = runGsdTools(['validate', 'health'], tmpDir);
|
||||
const r = runMsdTools(['validate', 'health'], tmpDir);
|
||||
assert.ok(r.success, `validate health failed: ${r.error}`);
|
||||
const out = JSON.parse(r.output);
|
||||
const issues = [...(out.issues || []), ...(out.warnings || [])].filter((i) => i.code === 'W021');
|
||||
|
||||
Reference in New Issue
Block a user