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:
@@ -24,13 +24,13 @@ const { GENERATOR_SCRIPT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
||||
const GUARD_SCRIPT = path.resolve(__dirname, '..', 'scripts', 'lint-docs-command-form.cjs');
|
||||
|
||||
function createTempRepo() {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-lint-docs-command-form-test-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-lint-docs-command-form-test-'));
|
||||
gitOrThrow(['init', '--initial-branch=main'], { cwd: dir });
|
||||
gitOrThrow(['config', 'user.email', 'test@example.com'], { cwd: dir });
|
||||
gitOrThrow(['config', 'user.name', 'Test'], { cwd: dir });
|
||||
// Roster source: the guard reads commands/gsd/*.md filenames as valid
|
||||
// Roster source: the guard reads commands/msd/*.md filenames as valid
|
||||
// command names, regardless of tracked/staged status.
|
||||
writeFile(dir, 'commands/gsd/plan-phase.md', '# plan-phase\n');
|
||||
writeFile(dir, 'commands/msd/plan-phase.md', '# plan-phase\n');
|
||||
return dir;
|
||||
}
|
||||
|
||||
@@ -60,18 +60,18 @@ function cleanup(dir) {
|
||||
function runGuard(cwd) {
|
||||
const r = runNode([GUARD_SCRIPT], {
|
||||
cwd,
|
||||
env: { ...process.env, GSD_LINT_DOCS_COMMAND_FORM_REPO_ROOT: cwd },
|
||||
env: { ...process.env, MSD_LINT_DOCS_COMMAND_FORM_REPO_ROOT: cwd },
|
||||
timeoutMs: GENERATOR_SCRIPT_TIMEOUT_MS,
|
||||
});
|
||||
return { status: r.exitCode, stdout: r.stdout, stderr: r.stderr };
|
||||
}
|
||||
|
||||
describe('lint-docs-command-form — colon slash form flagged', () => {
|
||||
test('exits non-zero and names the file when docs contain /gsd:<cmd>', () => {
|
||||
test('exits non-zero and names the file when docs contain /msd:<cmd>', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/gsd:plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/msd:plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -84,15 +84,15 @@ describe('lint-docs-command-form — colon slash form flagged', () => {
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — plugin namespace permitted', () => {
|
||||
test('exits 0 when docs contain /gsd-core:<cmd>', () => {
|
||||
test('exits 0 when docs contain /msd-core:<cmd>', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/gsd-core:plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/msd-core:plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
assert.equal(result.status, 0, `expected exit 0 for /gsd-core:, got ${result.status}; stderr: ${result.stderr}`);
|
||||
assert.equal(result.status, 0, `expected exit 0 for /msd-core:, got ${result.status}; stderr: ${result.stderr}`);
|
||||
} finally {
|
||||
cleanup(dir);
|
||||
}
|
||||
@@ -103,8 +103,8 @@ describe('lint-docs-command-form — docs/adr exempt', () => {
|
||||
test('exits 0 for a fixture under docs/adr/', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'docs/adr/999-example.md', 'Historically we typed `/gsd:plan-phase`.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
writeFile(dir, 'docs/adr/999-example.md', 'Historically we typed `/msd:plan-phase`.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'docs/adr/999-example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -116,15 +116,15 @@ describe('lint-docs-command-form — docs/adr exempt', () => {
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — source trees never checked', () => {
|
||||
test('exits 0 for a fixture under gsd-core/workflows/ (colon form is correct there)', () => {
|
||||
test('exits 0 for a fixture under msd-core/workflows/ (colon form is correct there)', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'gsd-core/workflows/example.md', 'Dispatch `/gsd:plan-phase`.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
gitAdd(dir, 'gsd-core/workflows/example.md');
|
||||
writeFile(dir, 'msd-core/workflows/example.md', 'Dispatch `/msd:plan-phase`.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'msd-core/workflows/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
assert.equal(result.status, 0, `expected exit 0 under gsd-core/workflows/, got ${result.status}; stderr: ${result.stderr}`);
|
||||
assert.equal(result.status, 0, `expected exit 0 under msd-core/workflows/, got ${result.status}; stderr: ${result.stderr}`);
|
||||
} finally {
|
||||
cleanup(dir);
|
||||
}
|
||||
@@ -132,11 +132,11 @@ describe('lint-docs-command-form — source trees never checked', () => {
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — bare colon form flagged', () => {
|
||||
test('exits non-zero when docs contain bare gsd:<cmd>', () => {
|
||||
test('exits non-zero when docs contain bare msd:<cmd>', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'docs/how-to/example.md', 'The command is gsd:plan-phase.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'The command is msd:plan-phase.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -149,16 +149,16 @@ describe('lint-docs-command-form — bare colon form flagged', () => {
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — name: frontmatter key citation exempt', () => {
|
||||
test('exits 0 when docs quote `name: gsd:next` as a source frontmatter citation', () => {
|
||||
test('exits 0 when docs quote `name: msd:next` as a source frontmatter citation', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'commands/gsd/next.md', '---\nname: gsd:next\n---\n');
|
||||
writeFile(dir, 'commands/msd/next.md', '---\nname: msd:next\n---\n');
|
||||
writeFile(
|
||||
dir,
|
||||
'docs/how-to/example.md',
|
||||
'Frontmatter:\n- `name: gsd:next` (surfaces as `/gsd-next`)\n',
|
||||
'Frontmatter:\n- `name: msd:next` (surfaces as `/msd-next`)\n',
|
||||
);
|
||||
gitAdd(dir, 'commands/gsd/next.md');
|
||||
gitAdd(dir, 'commands/msd/next.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -175,12 +175,12 @@ describe('lint-docs-command-form — name: frontmatter key citation exempt', ()
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — name: exemption is narrow, not a blanket hole', () => {
|
||||
test('exits non-zero when bare gsd:next appears without a preceding name: key', () => {
|
||||
test('exits non-zero when bare msd:next appears without a preceding name: key', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'commands/gsd/next.md', '---\nname: gsd:next\n---\n');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Just type gsd:next to run it.\n');
|
||||
gitAdd(dir, 'commands/gsd/next.md');
|
||||
writeFile(dir, 'commands/msd/next.md', '---\nname: msd:next\n---\n');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Just type msd:next to run it.\n');
|
||||
gitAdd(dir, 'commands/msd/next.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -193,12 +193,12 @@ describe('lint-docs-command-form — name: exemption is narrow, not a blanket ho
|
||||
});
|
||||
|
||||
describe('lint-docs-command-form — case-insensitive detection', () => {
|
||||
test('exits non-zero when docs contain /GSD:next (mixed case)', () => {
|
||||
test('exits non-zero when docs contain /MSD:next (mixed case)', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'commands/gsd/next.md', '---\nname: gsd:next\n---\n');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/GSD:next` to start.\n');
|
||||
gitAdd(dir, 'commands/gsd/next.md');
|
||||
writeFile(dir, 'commands/msd/next.md', '---\nname: msd:next\n---\n');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/MSD:next` to start.\n');
|
||||
gitAdd(dir, 'commands/msd/next.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
@@ -214,8 +214,8 @@ describe('lint-docs-command-form — clean docs tree', () => {
|
||||
test('exits 0 on a clean fixture repo with no colon-form commands', () => {
|
||||
const dir = createTempRepo();
|
||||
try {
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/gsd-plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/gsd/plan-phase.md');
|
||||
writeFile(dir, 'docs/how-to/example.md', 'Run `/msd-plan-phase` to start.\n');
|
||||
gitAdd(dir, 'commands/msd/plan-phase.md');
|
||||
gitAdd(dir, 'docs/how-to/example.md');
|
||||
|
||||
const result = runGuard(dir);
|
||||
|
||||
Reference in New Issue
Block a user