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:
@@ -15,8 +15,8 @@ const { createTempProject, createTempGitProject, cleanup } = require('./helpers.
|
||||
|
||||
const {
|
||||
graphifyStatus,
|
||||
} = require('../gsd-core/bin/lib/graphify.cjs');
|
||||
const { scanFencedBlocks } = require('../gsd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
} = require('../msd-core/bin/lib/graphify.cjs');
|
||||
const { scanFencedBlocks } = require('../msd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
|
||||
const {
|
||||
enableGraphify,
|
||||
@@ -77,7 +77,7 @@ describe('staleness', () => {
|
||||
});
|
||||
|
||||
test('built_at_commit absent (pre-v0.7 graph): all four new fields null', () => {
|
||||
// No built_at_commit on the graph -- GSD must not fabricate one.
|
||||
// No built_at_commit on the graph -- MSD must not fabricate one.
|
||||
writeGraphJson(planningDir, { nodes: SAMPLE_NODES_MINIMAL, edges: [] });
|
||||
|
||||
const result = graphifyStatus(tmpDir);
|
||||
@@ -200,12 +200,12 @@ describe('staleness', () => {
|
||||
// ─── mvp-viz describe ─────────────────────────────────────────────────────────
|
||||
|
||||
describe('mvp-viz', () => {
|
||||
// Contract: commands/gsd/graphify.md documents MVP visual differentiation.
|
||||
// Contract: commands/msd/graphify.md documents MVP visual differentiation.
|
||||
// Per PRD Q5: distinct node color + 'MVP' label suffix.
|
||||
// Tests parse the markdown skill into structured IR (YAML frontmatter +
|
||||
// fenced code blocks) and assert on the parsed structures, not raw text.
|
||||
|
||||
const CMD = path.join(__dirname, '..', 'commands', 'gsd', 'graphify.md');
|
||||
const CMD = path.join(__dirname, '..', 'commands', 'msd', 'graphify.md');
|
||||
|
||||
/**
|
||||
* Parse the narrow YAML subset used in this skill's frontmatter:
|
||||
@@ -354,7 +354,7 @@ describe('mvp-viz', () => {
|
||||
|
||||
describe('regressions', () => {
|
||||
// ── Regression for #3166 ────────────────────────────────────────────────────
|
||||
// /gsd-graphify build lost artifacts because the skill spawned a Task
|
||||
// /msd-graphify build lost artifacts because the skill spawned a Task
|
||||
// sub-agent that backgrounded `graphify update .`. Sub-agent isolation
|
||||
// SIGTERM'd the post-extraction phase before graph.json / graph.html /
|
||||
// GRAPH_REPORT.md were written.
|
||||
@@ -363,7 +363,7 @@ describe('regressions', () => {
|
||||
// (b) a list of fenced code blocks. Assertions run against parsed structures,
|
||||
// never against raw markdown text.
|
||||
|
||||
const SKILL_PATH = path.join(__dirname, '..', 'commands', 'gsd', 'graphify.md');
|
||||
const SKILL_PATH = path.join(__dirname, '..', 'commands', 'msd', 'graphify.md');
|
||||
|
||||
function parseBug3166SkillFrontmatter(text) {
|
||||
const lines = text.split(/\r?\n/);
|
||||
@@ -472,16 +472,16 @@ describe('regressions', () => {
|
||||
'a bash code block must invoke `graphify update .`'
|
||||
);
|
||||
assert.ok(
|
||||
bashBlocks.some(b => /gsd_run\s+graphify build snapshot/.test(b.content)),
|
||||
'a bash code block must invoke `gsd_run graphify build snapshot`'
|
||||
bashBlocks.some(b => /msd_run\s+graphify build snapshot/.test(b.content)),
|
||||
'a bash code block must invoke `msd_run graphify build snapshot`'
|
||||
);
|
||||
});
|
||||
|
||||
// ── Regression for #3579 ────────────────────────────────────────────────────
|
||||
// graphify auto-update hook was dead-on-arrival in 1.50.0-canary.x because:
|
||||
// Gap 1: scripts/build-hooks.js HOOKS_TO_COPY did not include
|
||||
// gsd-graphify-update.sh
|
||||
// Gap 2: hooks/lib/gsd-graphify-rebuild.sh not copied by installer
|
||||
// msd-graphify-update.sh
|
||||
// Gap 2: hooks/lib/msd-graphify-rebuild.sh not copied by installer
|
||||
// Test strategy: run the actual build and assert filesystem outcomes.
|
||||
|
||||
const REPO_ROOT_3579 = path.resolve(__dirname, '..');
|
||||
@@ -515,17 +515,17 @@ describe('regressions', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('hooks/dist/gsd-graphify-update.sh exists after build', () => {
|
||||
test('hooks/dist/msd-graphify-update.sh exists after build', () => {
|
||||
assert.ok(
|
||||
fs.existsSync(path.join(DIST_DIR_3579, 'gsd-graphify-update.sh')),
|
||||
'expected hooks/dist/gsd-graphify-update.sh to exist after build (Gap 1)'
|
||||
fs.existsSync(path.join(DIST_DIR_3579, 'msd-graphify-update.sh')),
|
||||
'expected hooks/dist/msd-graphify-update.sh to exist after build (Gap 1)'
|
||||
);
|
||||
});
|
||||
|
||||
test('hooks/dist/lib/gsd-graphify-rebuild.sh exists after build', () => {
|
||||
test('hooks/dist/lib/msd-graphify-rebuild.sh exists after build', () => {
|
||||
assert.ok(
|
||||
fs.existsSync(path.join(DIST_DIR_3579, 'lib', 'gsd-graphify-rebuild.sh')),
|
||||
'expected hooks/dist/lib/gsd-graphify-rebuild.sh to exist after build (Gap 2)'
|
||||
fs.existsSync(path.join(DIST_DIR_3579, 'lib', 'msd-graphify-rebuild.sh')),
|
||||
'expected hooks/dist/lib/msd-graphify-rebuild.sh to exist after build (Gap 2)'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -538,7 +538,7 @@ describe('regressions', () => {
|
||||
before(() => {
|
||||
const r1 = runNode([BUILD_SCRIPT_3579], { timeoutMs: BUILD_TIMEOUT_MS });
|
||||
throwIfFailed(r1, `node ${BUILD_SCRIPT_3579}`);
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-3579-install-'));
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-3579-install-'));
|
||||
const r2 = runNode(
|
||||
[INSTALL_SCRIPT_3579, '--claude', '--global', '--yes', '--no-sdk'],
|
||||
{
|
||||
@@ -554,24 +554,24 @@ describe('regressions', () => {
|
||||
cleanup(tmpDir);
|
||||
});
|
||||
|
||||
test('hooks/gsd-graphify-update.sh present at install target', () => {
|
||||
const dest = path.join(tmpDir, 'hooks', 'gsd-graphify-update.sh');
|
||||
test('hooks/msd-graphify-update.sh present at install target', () => {
|
||||
const dest = path.join(tmpDir, 'hooks', 'msd-graphify-update.sh');
|
||||
assert.ok(fs.existsSync(dest), `expected ${dest} to exist after install`);
|
||||
});
|
||||
|
||||
test('hooks/lib/gsd-graphify-rebuild.sh present at install target', () => {
|
||||
const dest = path.join(tmpDir, 'hooks', 'lib', 'gsd-graphify-rebuild.sh');
|
||||
test('hooks/lib/msd-graphify-rebuild.sh present at install target', () => {
|
||||
const dest = path.join(tmpDir, 'hooks', 'lib', 'msd-graphify-rebuild.sh');
|
||||
assert.ok(fs.existsSync(dest), `expected ${dest} to exist after install`);
|
||||
});
|
||||
|
||||
test('installer does not warn about missing gsd-graphify-update.sh', () => {
|
||||
test('installer does not warn about missing msd-graphify-update.sh', () => {
|
||||
assert.ok(
|
||||
!installStdout.includes('Missing expected hook: gsd-graphify-update.sh'),
|
||||
!installStdout.includes('Missing expected hook: msd-graphify-update.sh'),
|
||||
`installer output must not warn about missing graphify hook; got:\n${installStdout}`
|
||||
);
|
||||
assert.ok(
|
||||
!installStdout.includes(
|
||||
'Skipped graphify auto-update hook — gsd-graphify-update.sh not found'
|
||||
'Skipped graphify auto-update hook — msd-graphify-update.sh not found'
|
||||
),
|
||||
`installer must not skip graphify hook configuration; got:\n${installStdout}`
|
||||
);
|
||||
@@ -587,7 +587,7 @@ describe('regressions', () => {
|
||||
const { describe: __foldDescribe } = require('node:test');
|
||||
__foldDescribe("folded:bug-622-graphify-optional-graph-html (consolidation epic #1969 B6 #1975)", () => {
|
||||
// allow-test-rule: source-text-is-the-product (see #622)
|
||||
// This test extracts the deployed Step 3 shell block from commands/gsd/graphify.md
|
||||
// This test extracts the deployed Step 3 shell block from commands/msd/graphify.md
|
||||
// and executes it to prove that a skipped graph.html (due to the graphify HTML viz
|
||||
// node limit) does not abort the chain (#622). The deployed markdown text IS the
|
||||
// product surface — the block the runtime executes — so asserting on its execution
|
||||
@@ -598,7 +598,7 @@ describe('regressions', () => {
|
||||
/**
|
||||
* Regression test for bug #622.
|
||||
*
|
||||
* The `/gsd-graphify build` Step 3 shell chain in commands/gsd/graphify.md
|
||||
* The `/msd-graphify build` Step 3 shell chain in commands/msd/graphify.md
|
||||
* aborted when `graph.html` was intentionally skipped (graph exceeds the HTML
|
||||
* viz node limit, default 5000). The unconditional `cp graphify-out/graph.html`
|
||||
* failed with "cannot stat", and the `&&` chain aborted before the
|
||||
@@ -620,7 +620,7 @@ const { HOOK_FANOUT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
||||
const { createTempDir, cleanup, readFileNormalized } = require('./helpers.cjs');
|
||||
|
||||
// Path to the command doc (relative to repo root)
|
||||
const GRAPHIFY_MD = path.join(__dirname, '..', 'commands', 'gsd', 'graphify.md');
|
||||
const GRAPHIFY_MD = path.join(__dirname, '..', 'commands', 'msd', 'graphify.md');
|
||||
|
||||
/**
|
||||
* Extract the Step 3 fenced bash block from graphify.md.
|
||||
@@ -656,9 +656,9 @@ let fakeBin;
|
||||
let fakeHome;
|
||||
|
||||
before(() => {
|
||||
sandbox = createTempDir('gsd-622-sandbox-');
|
||||
fakeBin = createTempDir('gsd-622-fakebin-');
|
||||
fakeHome = createTempDir('gsd-622-fakehome-');
|
||||
sandbox = createTempDir('msd-622-sandbox-');
|
||||
fakeBin = createTempDir('msd-622-fakebin-');
|
||||
fakeHome = createTempDir('msd-622-fakehome-');
|
||||
});
|
||||
|
||||
after(() => {
|
||||
@@ -679,14 +679,14 @@ function writeFakeGraphify() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a minimal gsd-tools.cjs stub into fakeHome that exits 0 for any
|
||||
* Write a minimal msd-tools.cjs stub into fakeHome that exits 0 for any
|
||||
* invocation (covers the `graphify build snapshot` and `graphify status` steps).
|
||||
*/
|
||||
function writeFakeGsdTools() {
|
||||
const binDir = path.join(fakeHome, '.claude', 'gsd-core', 'bin');
|
||||
function writeFakeMsdTools() {
|
||||
const binDir = path.join(fakeHome, '.claude', 'msd-core', 'bin');
|
||||
fs.mkdirSync(binDir, { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(binDir, 'gsd-tools.cjs'),
|
||||
path.join(binDir, 'msd-tools.cjs'),
|
||||
['#!/usr/bin/env node', 'process.exit(0);'].join('\n'),
|
||||
{ mode: 0o755 },
|
||||
);
|
||||
@@ -749,7 +749,7 @@ describe('bug #622: graph.html absence must not abort the Step 3 shell chain', (
|
||||
});
|
||||
|
||||
test('Step 3 bash block is present in graphify.md (sanity gate)', () => {
|
||||
assert.ok(block !== null, 'Step 3 bash block starting with "graphify update ." was not found in commands/gsd/graphify.md');
|
||||
assert.ok(block !== null, 'Step 3 bash block starting with "graphify update ." was not found in commands/msd/graphify.md');
|
||||
assert.ok(block.length > 0, 'Extracted bash block must not be empty');
|
||||
});
|
||||
|
||||
@@ -762,7 +762,7 @@ describe('bug #622: graph.html absence must not abort the Step 3 shell chain', (
|
||||
});
|
||||
|
||||
writeFakeGraphify();
|
||||
writeFakeGsdTools();
|
||||
writeFakeMsdTools();
|
||||
populateSandbox(false); // no graph.html — simulates node-limit skip
|
||||
|
||||
const result = runBlock(block);
|
||||
@@ -800,7 +800,7 @@ describe('bug #622: graph.html absence must not abort the Step 3 shell chain', (
|
||||
});
|
||||
|
||||
writeFakeGraphify();
|
||||
writeFakeGsdTools();
|
||||
writeFakeMsdTools();
|
||||
populateSandbox(true); // include graph.html
|
||||
|
||||
const result = runBlock(block);
|
||||
|
||||
Reference in New Issue
Block a user