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

@@ -6,8 +6,8 @@
/**
* Worktree Lifecycle Module — branch-check and workspace-safety tests
*
* Seam: gsd-core/workflows/{execute-phase,execute-plan,quick}.md,
* agents/gsd-executor.md
* Seam: msd-core/workflows/{execute-phase,execute-plan,quick}.md,
* agents/msd-executor.md
*
* Split from the consolidated 13→2 worktree cluster (≤800 LOC/file):
* - tests/bug-2015-worktree-base-branch.test.cjs (#2015: reset --hard)
@@ -39,13 +39,13 @@ const { HOOK_FANOUT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const WORKTREE_TIMEOUT_MS = 30000;
const REPO_ROOT = path.join(__dirname, '..');
const EXECUTE_PHASE_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'execute-phase.md');
const EXECUTE_PLAN_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'execute-plan.md');
const QUICK_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'quick.md');
const EXECUTOR_AGENT_PATH = path.join(REPO_ROOT, 'agents', 'gsd-executor.md');
const DIAGNOSE_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'diagnose-issues.md');
const _GIT_INTEGRATION_PATH = path.join(REPO_ROOT, 'gsd-core', 'references', 'git-integration.md');
const WORKTREE_BRANCH_CHECK_FRAGMENT = path.join(REPO_ROOT, 'gsd-core', 'references', 'worktree-branch-check.md');
const EXECUTE_PHASE_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'execute-phase.md');
const EXECUTE_PLAN_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'execute-plan.md');
const QUICK_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'quick.md');
const EXECUTOR_AGENT_PATH = path.join(REPO_ROOT, 'agents', 'msd-executor.md');
const DIAGNOSE_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'diagnose-issues.md');
const _GIT_INTEGRATION_PATH = path.join(REPO_ROOT, 'msd-core', 'references', 'git-integration.md');
const WORKTREE_BRANCH_CHECK_FRAGMENT = path.join(REPO_ROOT, 'msd-core', 'references', 'worktree-branch-check.md');
const isWindows = process.platform === 'win32';
@@ -327,7 +327,7 @@ describe('verify-only: worktree_branch_check must NOT run git reset (#48, supers
describe('bug-2075: worktree deletion safeguards', () => {
describe('Failure Mode B: git clean prohibition in executor agent', () => {
test('gsd-executor.md explicitly prohibits git clean in worktree context', () => {
test('msd-executor.md explicitly prohibits git clean in worktree context', () => {
const content = fs.readFileSync(EXECUTOR_AGENT_PATH, 'utf-8');
// Must have an explicit prohibition section mentioning git clean
@@ -348,17 +348,17 @@ describe('bug-2075: worktree deletion safeguards', () => {
assert.ok(
prohibitsGitClean,
'gsd-executor.md must explicitly prohibit git clean — running it inside a worktree deletes files committed on the feature branch (#2075 Failure Mode B)'
'msd-executor.md must explicitly prohibit git clean — running it inside a worktree deletes files committed on the feature branch (#2075 Failure Mode B)'
);
});
test('gsd-executor.md git clean prohibition explains the worktree data-loss risk', () => {
test('msd-executor.md git clean prohibition explains the worktree data-loss risk', () => {
const content = fs.readFileSync(EXECUTOR_AGENT_PATH, 'utf-8');
// The prohibition must be accompanied by a reason — not just a bare rule
// Look for the word "worktree" near the git clean prohibition
const gitCleanIdx = content.indexOf('git clean');
assert.ok(gitCleanIdx > -1, 'gsd-executor.md must mention git clean (to prohibit it)');
assert.ok(gitCleanIdx > -1, 'msd-executor.md must mention git clean (to prohibit it)');
// Extract context around the git clean mention (500 chars either side)
const contextStart = Math.max(0, gitCleanIdx - 500);
@@ -373,7 +373,7 @@ describe('bug-2075: worktree deletion safeguards', () => {
assert.ok(
hasWorktreeRationale,
'The git clean prohibition in gsd-executor.md must explain why: git clean in a worktree deletes files that appear untracked but are committed on the feature branch'
'The git clean prohibition in msd-executor.md must explain why: git clean in a worktree deletes files that appear untracked but are committed on the feature branch'
);
});
});
@@ -451,18 +451,18 @@ describe('bug-2075: worktree deletion safeguards', () => {
});
describe('Defense-in-depth: post-commit deletion check (from #1977)', () => {
test('gsd-executor.md task_commit_protocol has post-commit deletion verification', () => {
test('msd-executor.md task_commit_protocol has post-commit deletion verification', () => {
const content = fs.readFileSync(EXECUTOR_AGENT_PATH, 'utf-8');
assert.ok(
content.includes('--diff-filter=D'),
'gsd-executor.md must include --diff-filter=D to detect accidental file deletions after each commit'
'msd-executor.md must include --diff-filter=D to detect accidental file deletions after each commit'
);
// Must have a warning about unexpected deletions
assert.ok(
content.includes('DELETIONS') || content.includes('WARNING'),
'gsd-executor.md must emit a warning when a commit includes unexpected file deletions'
'msd-executor.md must emit a warning when a commit includes unexpected file deletions'
);
});
});
@@ -614,7 +614,7 @@ describe('bug #2774 — worktree cleanup pipeline must not target the parent wor
// workspace worktree + agent worktree under workspace's
// `.claude/worktrees/agent-` namespace.
const porcelain = [
'worktree /Users/dev/upstream/gsd-core',
'worktree /Users/dev/upstream/msd-core',
'HEAD abc123',
'branch refs/heads/main',
'',
@@ -640,7 +640,7 @@ describe('bug #2774 — worktree cleanup pipeline must not target the parent wor
test('selects nothing when no agent worktrees exist', () => {
const porcelain = [
'worktree /Users/dev/upstream/gsd-core',
'worktree /Users/dev/upstream/msd-core',
'HEAD abc123',
'branch refs/heads/main',
'',
@@ -775,10 +775,10 @@ done < <(${DISCOVERY_PIPELINE})
// upstream/ <- main repo
// workspace/ <- worktree of upstream (the "workspace")
// workspace/.claude/worktrees/agent-XXXX/ <- agent worktree
upstream = makeTempUpstreamRepo('gsd-2774-upstream-');
upstream = makeTempUpstreamRepo('msd-2774-upstream-');
workspacesParent = fs.mkdtempSync(
path.join(os.tmpdir(), 'gsd-2774-workspaces-')
path.join(os.tmpdir(), 'msd-2774-workspaces-')
);
workspace = path.join(workspacesParent, 'feature-x');
gitOrThrow(['worktree', 'add', '-b', 'workspace/feature-x', workspace], {