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,10 +23,10 @@ const path = require('path');
|
||||
const os = require('os');
|
||||
const { spawnSync } = require('child_process');
|
||||
|
||||
const { runGsdTools, createTempProject, cleanup, installSpawnEnv, withAmbientCapabilityHome } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, cleanup, installSpawnEnv, withAmbientCapabilityHome } = require('./helpers.cjs');
|
||||
const { LOOP_HOOK_POINT_CLI_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
||||
|
||||
const GSD_TOOLS = path.join(__dirname, '..', 'gsd-core', 'bin', 'gsd-tools.cjs');
|
||||
const MSD_TOOLS = path.join(__dirname, '..', 'msd-core', 'bin', 'msd-tools.cjs');
|
||||
|
||||
// ─── Shared helpers ───────────────────────────────────────────────────────────
|
||||
|
||||
@@ -73,11 +73,11 @@ function writePlan(phaseDir, name, body) {
|
||||
* @returns {{ status: number, stdout: string, stderr: string }}
|
||||
*/
|
||||
function spawnRenderHooks(point, cwd) {
|
||||
const result = spawnSync(process.execPath, [GSD_TOOLS, 'loop', 'render-hooks', point, '--raw'], {
|
||||
const result = spawnSync(process.execPath, [MSD_TOOLS, 'loop', 'render-hooks', point, '--raw'], {
|
||||
cwd,
|
||||
encoding: 'utf8',
|
||||
timeout: LOOP_HOOK_POINT_CLI_TIMEOUT_MS,
|
||||
env: installSpawnEnv({ GSD_SESSION_KEY: '', CODEX_THREAD_ID: '', CLAUDE_SESSION_ID: '' }),
|
||||
env: installSpawnEnv({ MSD_SESSION_KEY: '', CODEX_THREAD_ID: '', CLAUDE_SESSION_ID: '' }),
|
||||
});
|
||||
return {
|
||||
status: result.status,
|
||||
@@ -93,7 +93,7 @@ function spawnRenderHooks(point, cwd) {
|
||||
* @returns {{ success: boolean, output: string, error: string, exitCode: number }}
|
||||
*/
|
||||
function runGapCheck(extraArgs, cwd) {
|
||||
return runGsdTools(['check', 'gap-analysis.plan-post', ...extraArgs, '--raw'], cwd);
|
||||
return runMsdTools(['check', 'gap-analysis.plan-post', ...extraArgs, '--raw'], cwd);
|
||||
}
|
||||
|
||||
// ─── Section 1: render-hooks plan:post ───────────────────────────────────────
|
||||
@@ -107,7 +107,7 @@ describe('render-hooks plan:post — gate discovery', () => {
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
// Initialize a valid config so schema defaults apply
|
||||
const init = runGsdTools('config-ensure-section', tmpDir);
|
||||
const init = runMsdTools('config-ensure-section', tmpDir);
|
||||
assert.ok(init.success, `config-ensure-section failed: ${init.error}`);
|
||||
});
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('render-hooks plan:post — gate discovery', () => {
|
||||
});
|
||||
|
||||
test('#4485: render-hooks ignores capabilities installed in ambient user locations', (t) => {
|
||||
withAmbientCapabilityHome(t, 'gsd-ambient-plan-post-', 'ambient-plan-post', 'plan:post');
|
||||
withAmbientCapabilityHome(t, 'msd-ambient-plan-post-', 'ambient-plan-post', 'plan:post');
|
||||
|
||||
const result = spawnRenderHooks('plan:post', tmpDir);
|
||||
assert.strictEqual(result.status, 0, `exit non-zero: ${result.stderr}`);
|
||||
@@ -199,7 +199,7 @@ describe('check gap-analysis.plan-post — gate content E2E', () => {
|
||||
tmpDir = createTempProject();
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
const init = runGsdTools('config-ensure-section', tmpDir);
|
||||
const init = runMsdTools('config-ensure-section', tmpDir);
|
||||
assert.ok(init.success, `config-ensure-section failed: ${init.error}`);
|
||||
});
|
||||
|
||||
@@ -292,7 +292,7 @@ describe('check gap-analysis.plan-post — gate content E2E', () => {
|
||||
|
||||
test('[negative] check gap-analysis.plan-post exits non-zero with error string when phaseDir argument is omitted', () => {
|
||||
// Pass only --raw, no phaseDir
|
||||
const r = runGsdTools(['check', 'gap-analysis.plan-post', '--raw'], tmpDir);
|
||||
const r = runMsdTools(['check', 'gap-analysis.plan-post', '--raw'], tmpDir);
|
||||
// GENUINE: must fail, not succeed
|
||||
assert.strictEqual(r.success, false, 'must fail when phaseDir omitted');
|
||||
assert.strictEqual(r.exitCode, 1, 'exit code must be 1');
|
||||
@@ -463,7 +463,7 @@ describe('Full pipeline: render-hooks plan:post discovers gate, then check dispa
|
||||
tmpDir = createTempProject();
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
const init = runGsdTools('config-ensure-section', tmpDir);
|
||||
const init = runMsdTools('config-ensure-section', tmpDir);
|
||||
assert.ok(init.success, `config-ensure-section failed: ${init.error}`);
|
||||
});
|
||||
|
||||
@@ -568,7 +568,7 @@ describe('issue #2316 (Secondary B): all-unregistered phaseReqIds must still emi
|
||||
tmpDir = createTempProject();
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
const init = runGsdTools('config-ensure-section', tmpDir);
|
||||
const init = runMsdTools('config-ensure-section', tmpDir);
|
||||
assert.ok(init.success, `config-ensure-section failed: ${init.error}`);
|
||||
writeRequirements(path.join(tmpDir, '.planning'), ['KNOWN-01']);
|
||||
writePlan(phaseDir, '01', '# Plan\n\nImplements KNOWN-01.\n');
|
||||
@@ -653,8 +653,8 @@ describe('issue #2316 (Secondary B): all-unregistered phaseReqIds must still emi
|
||||
// ─── Section 4: Pure resolver tests against real registry ────────────────────
|
||||
|
||||
describe('resolveLoopHooks plan:post — pure function against real registry', () => {
|
||||
const { resolveLoopHooks, renderLoopHooks } = require('../gsd-core/bin/lib/loop-resolver.cjs');
|
||||
const realRegistry = require('../gsd-core/bin/lib/capability-registry.cjs');
|
||||
const { resolveLoopHooks, renderLoopHooks } = require('../msd-core/bin/lib/loop-resolver.cjs');
|
||||
const realRegistry = require('../msd-core/bin/lib/capability-registry.cjs');
|
||||
|
||||
test('[happy] resolveLoopHooks plan:post with post_planning_gaps=true returns one gap-analysis gate', () => {
|
||||
const result = resolveLoopHooks({
|
||||
@@ -738,7 +738,7 @@ describe('resolveLoopHooks plan:post — pure function against real registry', (
|
||||
// unconfined and joins it directly in `runGapAnalysis` (gap-checker.cts).
|
||||
|
||||
function runDecisionCoveragePlan(extraFlags, phaseDir, contextPath, cwd) {
|
||||
return runGsdTools(['query', 'check.decision-coverage-plan', ...extraFlags, phaseDir, contextPath], cwd);
|
||||
return runMsdTools(['query', 'check.decision-coverage-plan', ...extraFlags, phaseDir, contextPath], cwd);
|
||||
}
|
||||
|
||||
describe('resolvePath / check decision-coverage-plan — containment boundary (#4652)', () => {
|
||||
@@ -750,7 +750,7 @@ describe('resolvePath / check decision-coverage-plan — containment boundary (#
|
||||
tmpDir = createTempProject();
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-decision-outside-'));
|
||||
outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-decision-outside-'));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -767,7 +767,7 @@ describe('resolvePath / check decision-coverage-plan — containment boundary (#
|
||||
fs.writeFileSync(path.join(outsideDir, '01-PLAN.md'), '# Plan\n\nImplements D-01.\n');
|
||||
const relOutside = path.relative(tmpDir, outsideDir);
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['--json-errors', 'query', 'check.decision-coverage-plan', relOutside, contextPath],
|
||||
tmpDir,
|
||||
);
|
||||
@@ -819,9 +819,9 @@ describe('check gap-analysis.plan-post — containment boundary (#4652)', () =>
|
||||
tmpDir = createTempProject();
|
||||
phaseDir = path.join(tmpDir, '.planning', 'phases', '01-test');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
const init = runGsdTools('config-ensure-section', tmpDir);
|
||||
const init = runMsdTools('config-ensure-section', tmpDir);
|
||||
assert.ok(init.success, `config-ensure-section failed: ${init.error}`);
|
||||
outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-gap-outside-'));
|
||||
outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-gap-outside-'));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -833,7 +833,7 @@ describe('check gap-analysis.plan-post — containment boundary (#4652)', () =>
|
||||
fs.writeFileSync(path.join(outsideDir, '01-PLAN.md'), '# Plan\n\nSome content.\n');
|
||||
const relOutside = path.relative(tmpDir, outsideDir);
|
||||
|
||||
const result = runGsdTools(['--json-errors', 'check', 'gap-analysis.plan-post', relOutside, '--raw'], tmpDir);
|
||||
const result = runMsdTools(['--json-errors', 'check', 'gap-analysis.plan-post', relOutside, '--raw'], tmpDir);
|
||||
|
||||
assert.strictEqual(
|
||||
result.success,
|
||||
@@ -854,7 +854,7 @@ describe('check gap-analysis.plan-post — containment boundary (#4652)', () =>
|
||||
});
|
||||
|
||||
test('[regression] a missing phase-dir argument still gives the existing SDK_MISSING_ARG error', () => {
|
||||
const result = runGsdTools(['--json-errors', 'check', 'gap-analysis.plan-post', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['--json-errors', 'check', 'gap-analysis.plan-post', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, false, 'must fail when phaseDir omitted');
|
||||
const parsed = JSON.parse(result.error);
|
||||
assert.strictEqual(parsed.reason, 'sdk_missing_arg', 'must keep the existing SDK_MISSING_ARG reason');
|
||||
|
||||
Reference in New Issue
Block a user