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

@@ -26,10 +26,10 @@ const {
buildSourceReviewPrompt,
SOURCE_REVIEW_PROHIBITIONS,
DISPATCH_REASON,
} = require('../gsd-core/bin/lib/reviewer-step-dispatch.cjs');
} = require('../msd-core/bin/lib/reviewer-step-dispatch.cjs');
const ROOT = path.resolve(__dirname, '..');
const REVIEWER_PATH = path.join(ROOT, 'agents', 'gsd-code-reviewer.md');
const REVIEWER_PATH = path.join(ROOT, 'agents', 'msd-code-reviewer.md');
const REPO_ROOT = '/repo';
const RUN_DIR = '/run';
@@ -67,11 +67,11 @@ function okPlan(slug) {
argv: [],
model: null,
effort: null,
stdin: `${RUN_DIR}/gsd-review-prompt.md`,
promptPath: `${RUN_DIR}/gsd-review-prompt.md`,
stdin: `${RUN_DIR}/msd-review-prompt.md`,
promptPath: `${RUN_DIR}/msd-review-prompt.md`,
outputTarget: { kind: 'stdout' },
reviewPath: `${RUN_DIR}/gsd-review-${slug}.md`,
errPath: `${RUN_DIR}/gsd-review-${slug}.err`,
reviewPath: `${RUN_DIR}/msd-review-${slug}.md`,
errPath: `${RUN_DIR}/msd-review-${slug}.err`,
timeoutMs: FIXTURE_PLAN_TIMEOUT_MS,
emptyOutput: 'stub',
evidenceClass: 'source-grounded',
@@ -151,7 +151,7 @@ describe('dispatchReviewerLanes — selected lanes are planned and invoked exact
['codex', fakeLane('codex')],
]);
const plan = spy((lane) => okPlan(lane.slug));
const invoke = spy((lane) => ({ ok: true, reviewPath: `${RUN_DIR}/gsd-review-${lane.slug}.md`, errPath: `${RUN_DIR}/gsd-review-${lane.slug}.err` }));
const invoke = spy((lane) => ({ ok: true, reviewPath: `${RUN_DIR}/msd-review-${lane.slug}.md`, errPath: `${RUN_DIR}/msd-review-${lane.slug}.err` }));
const result = await dispatchReviewerLanes(
baseInput({ selection: { explicitFlags: ['claude', 'codex'], detected: ['claude', 'codex'] } }),
@@ -213,11 +213,11 @@ describe('dispatchReviewerLanes — bounded source-review prompt', () => {
assert.equal(SOURCE_REVIEW_PROHIBITIONS.length, 4);
});
// #4209 CR-02/CR-03: depthMeaning() is condensed from agents/gsd-code-reviewer.md's
// #4209 CR-02/CR-03: depthMeaning() is condensed from agents/msd-code-reviewer.md's
// <depth_levels> block. These tests read the REAL agent file, not just this function, so the
// two cannot silently drift the way `depthMeaning('quick')` drifted (dropped two categories)
// the first time this was written.
describe('buildSourceReviewPrompt depth definitions track <depth_levels> in agents/gsd-code-reviewer.md', () => {
describe('buildSourceReviewPrompt depth definitions track <depth_levels> in agents/msd-code-reviewer.md', () => {
const reviewerSrc = fs.readFileSync(REVIEWER_PATH, 'utf8');
// eslint-disable-next-line local/no-unbounded-quantifier -- parses this repo's own maintainer-authored agent markdown, bounded prose, not adversarial input
const depthLevelsMatch = reviewerSrc.match(/<depth_levels>([\s\S]*?)<\/depth_levels>/);
@@ -249,7 +249,7 @@ describe('dispatchReviewerLanes — bounded source-review prompt', () => {
}
});
test('an unrecognised depth normalizes to the standard definition, matching agents/gsd-code-reviewer.md\'s own normalization rule', () => {
test('an unrecognised depth normalizes to the standard definition, matching agents/msd-code-reviewer.md\'s own normalization rule', () => {
assert.ok(/default to `?standard`?/i.test(reviewerSrc), 'test fixture drifted: reviewer agent no longer documents defaulting unknown depth to standard');
const promptStandard = buildSourceReviewPrompt({ repoRoot: REPO_ROOT, paths: ['a.ts'], depth: 'standard', baseSha: 'deadbeef' });
const promptBogus = buildSourceReviewPrompt({ repoRoot: REPO_ROOT, paths: ['a.ts'], depth: 'audit', baseSha: 'deadbeef' });
@@ -278,7 +278,7 @@ describe('dispatchReviewerLanes — bounded source-review prompt', () => {
assert.equal(writePromptFile.calls.length, 1, 'expected exactly one write for the whole dispatch');
const [writtenPath, writtenContent] = writePromptFile.calls[0];
assert.equal(writtenPath, `${RUN_DIR}/gsd-review-prompt.md`);
assert.equal(writtenPath, `${RUN_DIR}/msd-review-prompt.md`);
assert.match(writtenContent, /Repository root: \/repo/);
});
@@ -420,7 +420,7 @@ describe('dispatchReviewerLanes — fail-closed: per-lane plan/invoke failure',
const invoke = spy((lane) => (
lane.slug === 'codex'
? { ok: false, reason: 'probe_failed', detail: 'codex exited 1' }
: { ok: true, reviewPath: `${RUN_DIR}/gsd-review-claude.md` }
: { ok: true, reviewPath: `${RUN_DIR}/msd-review-claude.md` }
));
const result = await dispatchReviewerLanes(
@@ -433,7 +433,7 @@ describe('dispatchReviewerLanes — fail-closed: per-lane plan/invoke failure',
assert.equal(result.ok, false);
const bySlug = Object.fromEntries(result.results.map((r) => [r.slug, r]));
assert.equal(bySlug.claude.ok, true);
assert.equal(bySlug.claude.reviewPath, `${RUN_DIR}/gsd-review-claude.md`);
assert.equal(bySlug.claude.reviewPath, `${RUN_DIR}/msd-review-claude.md`);
assert.equal(bySlug.codex.ok, false);
assert.equal(bySlug.codex.reason, 'probe_failed');
});
@@ -534,7 +534,7 @@ describe('dispatchReviewerLanes — fail-closed: unsafe/incomplete request halts
// `/repo` cases above, which never reach fs.realpathSync's ENOENT-tolerant fallback for real).
describe('dispatchReviewerLanes — fail-closed: symlink escaping repoRoot (WR-05)', () => {
test('a path inside repoRoot that symlinks outside it halts the whole dispatch', async () => {
const tmpRoot = fs.mkdtempSync(path.join(require('node:os').tmpdir(), 'gsd-wr05-'));
const tmpRoot = fs.mkdtempSync(path.join(require('node:os').tmpdir(), 'msd-wr05-'));
const repoRoot = path.join(tmpRoot, 'repo');
const outside = path.join(tmpRoot, 'outside');
fs.mkdirSync(repoRoot);
@@ -564,7 +564,7 @@ describe('dispatchReviewerLanes — fail-closed: symlink escaping repoRoot (WR-0
});
test('a real, non-symlinked path inside repoRoot is unaffected by realpath resolution', async () => {
const tmpRoot = fs.mkdtempSync(path.join(require('node:os').tmpdir(), 'gsd-wr05-'));
const tmpRoot = fs.mkdtempSync(path.join(require('node:os').tmpdir(), 'msd-wr05-'));
const repoRoot = path.join(tmpRoot, 'repo');
fs.mkdirSync(repoRoot);
fs.writeFileSync(path.join(repoRoot, 'foo.ts'), 'export {};');
@@ -716,7 +716,7 @@ describe('dispatchReviewerLanes — fail-closed: budget overflow', () => {
// filesystem — `fs.realpathSync`'s ENOENT catch treats a non-existent lexical path as non-escaping.
const fcCore = require('./helpers/fast-check-setup.cjs');
const { estimateTokens } = require('../gsd-core/bin/lib/prompt-budget.cjs');
const { estimateTokens } = require('../msd-core/bin/lib/prompt-budget.cjs');
const PATH_SAFE_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.'.split('');
const safeSegment = fcCore
@@ -774,7 +774,7 @@ describe('dispatchReviewerLanes — validatePaths property: boundary-containment
//
// Existing budget-overflow tests (above) only exercised a budget far below the estimate and
// `budget: 0` (unbounded) — never the exact threshold crossing where an off-by-one would hide.
// `estimateTokens` is deterministic (`Math.ceil(text.length / 4)`, gsd-core/bin/lib/prompt-budget
// `estimateTokens` is deterministic (`Math.ceil(text.length / 4)`, msd-core/bin/lib/prompt-budget
// .cjs) and `buildSourceReviewPrompt`/`estimateTokens` are the SAME functions the module under
// test calls internally, so the resolved token count here is exact, not approximated.