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

@@ -17,7 +17,7 @@ const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const VERIFY_WORK = path.join(__dirname, '..', 'gsd-core', 'workflows', 'verify-work.md');
const VERIFY_WORK = path.join(__dirname, '..', 'msd-core', 'workflows', 'verify-work.md');
describe('verify-work.md — auto-transition after UAT passes with 0 issues', () => {
test('workflow reads transition.md when issues == 0 and security gate cleared', () => {
@@ -97,10 +97,10 @@ describe('verify-work.md — auto-transition after UAT passes with 0 issues', ()
test('human_needed verification is promoted to passed only after successful human UAT', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
const statusIdx = content.indexOf('VERIFICATION_STATUS=$(gsd_run query verification.status "$PHASE_DIR"');
const statusIdx = content.indexOf('VERIFICATION_STATUS=$(msd_run query verification.status "$PHASE_DIR"');
const humanNeededIdx = content.indexOf('if [ "$VERIFICATION_STATUS_VALUE" = "human_needed" ]; then');
const setPassedIdx = content.indexOf('gsd_run query frontmatter.set "$VERIFICATION_FILE" --field status --value passed');
const predicateIdx = content.indexOf('PHASE_COMPLETE=$(gsd_run phase uat-passed "{phase}" --require-verification)');
const setPassedIdx = content.indexOf('msd_run query frontmatter.set "$VERIFICATION_FILE" --field status --value passed');
const predicateIdx = content.indexOf('PHASE_COMPLETE=$(msd_run phase uat-passed "{phase}" --require-verification)');
assert.ok(statusIdx !== -1, 'verify-work.md must inspect canonical verification status');
assert.ok(humanNeededIdx > statusIdx, 'status=passed promotion must be restricted to human_needed');
@@ -111,7 +111,7 @@ describe('verify-work.md — auto-transition after UAT passes with 0 issues', ()
test('stale verification blocks before phase transition', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
const staleIdx = content.indexOf('If `PHASE_VERIFICATION_STATUS` is `stale`');
const predicateIdx = content.indexOf('PHASE_COMPLETE=$(gsd_run phase uat-passed "{phase}" --require-verification)');
const predicateIdx = content.indexOf('PHASE_COMPLETE=$(msd_run phase uat-passed "{phase}" --require-verification)');
const transitionIdx = content.indexOf('transition.md');
assert.ok(staleIdx !== -1, 'verify-work.md must stop on stale verification');
@@ -121,10 +121,10 @@ describe('verify-work.md — auto-transition after UAT passes with 0 issues', ()
test('transition is NOT suggested when security enforcement is enabled and no SECURITY.md exists', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
// The workflow should suggest /gsd-secure-phase when security is enabled but no file exists
// The workflow should suggest /msd-secure-phase when security is enabled but no file exists
assert.ok(
content.includes('gsd-secure-phase') || content.includes('gsd:secure-phase'),
'verify-work.md must suggest /gsd:secure-phase when security gate blocks transition'
content.includes('msd-secure-phase') || content.includes('msd:secure-phase'),
'verify-work.md must suggest /msd:secure-phase when security gate blocks transition'
);
});
});
@@ -140,9 +140,9 @@ describe('verify-work.md — canonicalize flip is gated by the UAT predicate (#4
test('canonicalize flips to passed only when the uat-passed predicate reports passed (#4663)', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
const humanNeededIdx = content.indexOf('if [ "$VERIFICATION_STATUS_VALUE" = "human_needed" ]; then');
const precheckIdx = content.indexOf('UAT_PRECHECK=$(gsd_run phase uat-passed "{phase}" --uat-only 2>/dev/null)');
const precheckIdx = content.indexOf('UAT_PRECHECK=$(msd_run phase uat-passed "{phase}" --uat-only 2>/dev/null)');
const flipGuardIdx = content.indexOf('if [ "$UAT_PRECHECK_PASSED" = "true" ]; then');
const setPassedIdx = content.indexOf('gsd_run query frontmatter.set "$VERIFICATION_FILE" --field status --value passed');
const setPassedIdx = content.indexOf('msd_run query frontmatter.set "$VERIFICATION_FILE" --field status --value passed');
assert.ok(precheckIdx !== -1, 'the canonicalize block must run the uat-passed predicate before flipping');
assert.ok(humanNeededIdx !== -1 && precheckIdx > humanNeededIdx, 'the pre-check must sit inside the human_needed branch');
@@ -153,8 +153,8 @@ describe('verify-work.md — canonicalize flip is gated by the UAT predicate (#4
test('the canonicalize pre-check runs uat-passed without --require-verification (#4663)', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
const precheckIdx = content.indexOf('UAT_PRECHECK=$(gsd_run phase uat-passed "{phase}" --uat-only 2>/dev/null)');
const flaggedIdx = content.indexOf('PHASE_COMPLETE=$(gsd_run phase uat-passed "{phase}" --require-verification)');
const precheckIdx = content.indexOf('UAT_PRECHECK=$(msd_run phase uat-passed "{phase}" --uat-only 2>/dev/null)');
const flaggedIdx = content.indexOf('PHASE_COMPLETE=$(msd_run phase uat-passed "{phase}" --require-verification)');
assert.ok(precheckIdx !== -1, 'the --uat-only pre-check must exist');
assert.ok(
@@ -173,7 +173,7 @@ describe('verify-work.md — canonicalize flip is gated by the UAT predicate (#4
test('an indeterminate pre-check must not flip the report (fail closed) (#4663)', () => {
const content = fs.readFileSync(VERIFY_WORK, 'utf-8');
// jq -r '.passed // false' with an `|| echo "false"` fallback: empty or
// failed gsd_run output must yield no-flip, never a flip.
// failed msd_run output must yield no-flip, never a flip.
assert.ok(
content.includes(`jq -r '.passed // false' 2>/dev/null || echo "false"`),
'the extraction must default to false on empty/failed output'
@@ -200,7 +200,7 @@ const path = require('node:path');
describe('bug #1716: resume_from_file routes to complete_session when no [pending] tests remain', () => {
test('resume_from_file step contains guard clause for zero-pending (all-blocked) case', () => {
const workflow = fs.readFileSync(
path.join(__dirname, '..', 'gsd-core', 'workflows', 'verify-work.md'),
path.join(__dirname, '..', 'msd-core', 'workflows', 'verify-work.md'),
'utf8',
);
@@ -228,14 +228,14 @@ describe('bug #1716: resume_from_file routes to complete_session when no [pendin
});
describe('bug #3381: verify-work forwards workstream context', () => {
test('workflow forwards ${GSD_WS} to workstream-sensitive SDK queries', () => {
test('workflow forwards ${MSD_WS} to workstream-sensitive SDK queries', () => {
// #2994 fragmentization moved the roadmap.get-phase user-story-format-guard
// bash block out of verify-work.md into
// gsd-core/workflows/verify-work/steps/mvp-uat-framing.md behind a section
// msd-core/workflows/verify-work/steps/mvp-uat-framing.md behind a section
// marker (`state:phase-mvp-mode`). Read host + every step file combined so
// this GSD_WS-forwarding guard keeps seeing the moved query.
const VERIFY_WORK_MD = path.join(__dirname, '..', 'gsd-core', 'workflows', 'verify-work.md');
const VERIFY_WORK_STEPS_DIR = path.join(__dirname, '..', 'gsd-core', 'workflows', 'verify-work', 'steps');
// this MSD_WS-forwarding guard keeps seeing the moved query.
const VERIFY_WORK_MD = path.join(__dirname, '..', 'msd-core', 'workflows', 'verify-work.md');
const VERIFY_WORK_STEPS_DIR = path.join(__dirname, '..', 'msd-core', 'workflows', 'verify-work', 'steps');
let workflow = fs.readFileSync(VERIFY_WORK_MD, 'utf8');
if (fs.existsSync(VERIFY_WORK_STEPS_DIR)) {
for (const entry of fs.readdirSync(VERIFY_WORK_STEPS_DIR).sort()) {
@@ -249,10 +249,10 @@ describe('bug #3381: verify-work forwards workstream context', () => {
// `[^[:space:]]+` to `[A-Za-z0-9._-]+` (workstream slugs are
// alphanumeric/dot/underscore/hyphen; the old class captured any
// non-space run, including shell metacharacters). Forwarding itself
// (GSD_WS reaching every workstream-sensitive query below) is
// (MSD_WS reaching every workstream-sensitive query below) is
// unaffected by the narrower class, so only the literal pattern here
// is updated — the asserted forwarding property is unchanged.
assert.match(workflow, /GSD_WS=""/, 'verify-work must initialize GSD_WS');
assert.match(workflow, /MSD_WS=""/, 'verify-work must initialize MSD_WS');
assert.match(
workflow,
/grep -qE -- '--ws\[\[:space:\]\]\+\[A-Za-z0-9\._-\]\+'/,
@@ -268,21 +268,21 @@ describe('bug #3381: verify-work forwards workstream context', () => {
/PHASE_ARG=\$\(echo "\$ARGUMENTS" \| sed -E 's\/--ws\[\[:space:\]\]\+\[A-Za-z0-9\._-\]\+\/\/g' \| xargs\)/,
'verify-work must derive PHASE_ARG after removing --ws',
);
// After #3797 architectural fix, callsites use gsd_run
// After #3797 architectural fix, callsites use msd_run
assert.match(
workflow,
/gsd_run query init\.verify-work "\$\{PHASE_ARG\}" \$\{GSD_WS\}/,
'init.verify-work must receive GSD_WS so phase_dir resolves in workstreams',
/msd_run query init\.verify-work "\$\{PHASE_ARG\}" \$\{MSD_WS\}/,
'init.verify-work must receive MSD_WS so phase_dir resolves in workstreams',
);
assert.match(
workflow,
/gsd_run query phase\.mvp-mode "\$\{phase_number\}" \$\{GSD_WS\} --pick active/,
'phase.mvp-mode must receive GSD_WS so roadmap mode is workstream-scoped',
/msd_run query phase\.mvp-mode "\$\{phase_number\}" \$\{MSD_WS\} --pick active/,
'phase.mvp-mode must receive MSD_WS so roadmap mode is workstream-scoped',
);
assert.match(
workflow,
/gsd_run query roadmap\.get-phase "\$\{phase_number\}" \$\{GSD_WS\} --pick goal/,
'roadmap.get-phase must receive GSD_WS so goals are workstream-scoped',
/msd_run query roadmap\.get-phase "\$\{phase_number\}" \$\{MSD_WS\} --pick goal/,
'roadmap.get-phase must receive MSD_WS so goals are workstream-scoped',
);
});
});
@@ -291,7 +291,7 @@ describe('bug #3381: verify-work forwards workstream context', () => {
// ── #4682 — the stale stop routes to the verifier, not to itself ─────────────
// A stale report means covered source files changed after the verifier ran;
// the only remedy is re-running the verifier. /gsd-verify-work never rewrites
// the only remedy is re-running the verifier. /msd-verify-work never rewrites
// VERIFICATION.md, so advising it from its own stale block is an advice loop.
describe('verify-work.md — stale stop routes to the verifier (#4682)', () => {
test('the stale stop instructs re-running the verifier, not verify-work (#4682)', () => {
@@ -300,10 +300,10 @@ describe('verify-work.md — stale stop routes to the verifier (#4682)', () => {
assert.ok(staleIdx !== -1, 'the stale stop must exist');
const block = content.slice(staleIdx, staleIdx + 1600);
assert.match(block, /gsd-verifier/, 'the stale stop must route to the gsd-verifier agent');
assert.match(block, /msd-verifier/, 'the stale stop must route to the msd-verifier agent');
assert.match(block, /verification\.status/, 'it must re-check verification.status afterwards');
assert.doesNotMatch(
block, /`\/gsd:verify-work \{phase\}` — re-run verification/,
block, /`\/msd:verify-work \{phase\}` — re-run verification/,
'the self-referential re-run advice must be gone'
);
});