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

@@ -20,13 +20,13 @@ const { test, describe } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const { collectSection } = require('../gsd-core/bin/lib/markdown-sectionizer.cjs');
const { collectSection } = require('../msd-core/bin/lib/markdown-sectionizer.cjs');
const ROOT = path.join(__dirname, '..');
const AGENTS_DIR = path.join(ROOT, 'agents');
const WORKFLOWS_DIR = path.join(ROOT, 'gsd-core', 'workflows');
const REFERENCES_DIR = path.join(ROOT, 'gsd-core', 'references');
const TEMPLATES_DIR = path.join(ROOT, 'gsd-core', 'templates');
const WORKFLOWS_DIR = path.join(ROOT, 'msd-core', 'workflows');
const REFERENCES_DIR = path.join(ROOT, 'msd-core', 'references');
const TEMPLATES_DIR = path.join(ROOT, 'msd-core', 'templates');
/**
* Collect all .md files from a directory (non-recursive).
@@ -108,13 +108,13 @@ const COMPLEXITY_SCOPE_PATTERNS = [
*/
const ALLOWLIST = {
// Plan-checker scans FOR these patterns — it's a detection list, not usage
'gsd-plan-checker.md': ['complexity_scope', 'time_sizing'],
'msd-plan-checker.md': ['complexity_scope', 'time_sizing'],
// Planner defines the prohibition and the authority limits — uses terms to explain what NOT to do
'gsd-planner.md': ['complexity_scope'],
'msd-planner.md': ['complexity_scope'],
// Debugger uses "30+ minutes" as anti-pattern detection, not task sizing
'gsd-debugger.md': ['time_sizing'],
'msd-debugger.md': ['time_sizing'],
// Doc-writer uses "15 minutes" in API rate limit example, "2 minutes" for doc quality
'gsd-doc-writer.md': ['time_sizing'],
'msd-doc-writer.md': ['time_sizing'],
// Explore uses "~30 seconds" as operational estimate
'explore.md': ['time_sizing'],
// Review uses "up to 5 minutes" for CodeRabbit timeout
@@ -179,19 +179,19 @@ describe('Planner language regression — complexity-as-scope-justification (#20
}
});
describe('gsd-planner.md — required structural sections (#2091, #2092)', () => {
describe('msd-planner.md — required structural sections (#2091, #2092)', () => {
let plannerContent;
test('planner file exists and is readable', () => {
const plannerPath = path.join(AGENTS_DIR, 'gsd-planner.md');
assert.ok(fs.existsSync(plannerPath), 'agents/gsd-planner.md must exist');
const plannerPath = path.join(AGENTS_DIR, 'msd-planner.md');
assert.ok(fs.existsSync(plannerPath), 'agents/msd-planner.md must exist');
plannerContent = fs.readFileSync(plannerPath, 'utf-8');
});
test('contains <planner_authority_limits> section', () => {
assert.ok(
plannerContent.includes('<planner_authority_limits>'),
'gsd-planner.md must contain a <planner_authority_limits> section defining what the planner cannot decide'
'msd-planner.md must contain a <planner_authority_limits> section defining what the planner cannot decide'
);
});
@@ -232,14 +232,14 @@ describe('gsd-planner.md — required structural sections (#2091, #2092)', () =>
assert.ok(
plannerContent.includes('Multi-Source Coverage Audit') ||
plannerContent.includes('multi-source coverage audit'),
'gsd-planner.md must contain a multi-source coverage audit, not just D-XX decision matrix'
'msd-planner.md must contain a multi-source coverage audit, not just D-XX decision matrix'
);
});
test('coverage audit includes all four source types: GOAL, REQ, RESEARCH, CONTEXT', () => {
// The planner file or its referenced planner-source-audit.md must define all four types.
// The inline compact version uses **GOAL**, **REQ**, **RESEARCH**, **CONTEXT**.
const refPath = path.join(ROOT, 'gsd-core', 'references', 'planner-source-audit.md');
const refPath = path.join(ROOT, 'msd-core', 'references', 'planner-source-audit.md');
const combined = plannerContent + (fs.existsSync(refPath) ? fs.readFileSync(refPath, 'utf-8') : '');
const hasGoal = combined.includes('**GOAL**');
@@ -310,12 +310,12 @@ describe('plan-phase.md — source audit orchestration (#2091)', () => {
});
});
describe('gsd-plan-checker.md — scope reduction detection includes time/complexity (#2092)', () => {
describe('msd-plan-checker.md — scope reduction detection includes time/complexity (#2092)', () => {
let checkerContent;
test('plan-checker exists and is readable', () => {
const checkerPath = path.join(AGENTS_DIR, 'gsd-plan-checker.md');
assert.ok(fs.existsSync(checkerPath), 'agents/gsd-plan-checker.md must exist');
const checkerPath = path.join(AGENTS_DIR, 'msd-plan-checker.md');
assert.ok(fs.existsSync(checkerPath), 'agents/msd-plan-checker.md must exist');
checkerContent = fs.readFileSync(checkerPath, 'utf-8');
});
@@ -344,7 +344,7 @@ describe('gsd-plan-checker.md — scope reduction detection includes time/comple
'use strict';
// allow-test-rule: source-text-is-the-product (see #3805)
// Reads gsd-core/workflows/fast.md whose deployed text IS the product —
// Reads msd-core/workflows/fast.md whose deployed text IS the product —
// the workflow markdown is executed verbatim by LLM runtimes.
/**
@@ -377,7 +377,7 @@ const fs = require('node:fs');
const path = require('node:path');
const REPO_ROOT = path.join(__dirname, '..');
const FAST_MD_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'fast.md');
const FAST_MD_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'fast.md');
// The 5-column schema defined in quick.md Step 7 (non-validate mode).
// Column count is 5: # | Description | Date | Commit | Directory
@@ -453,7 +453,7 @@ describe('bug #3805: fast.md log_to_state must be schema-aware', () => {
stepContent.includes('quick-tasks-append'),
[
'fast.md log_to_state step does not invoke the schema-aware quick-tasks-append helper.',
'Schema-awareness now lives in the gsd-tools quick-tasks-append subcommand',
'Schema-awareness now lives in the msd-tools quick-tasks-append subcommand',
`(appendQuickTaskRow, handling both the ${QUICK_MD_STEP7_COL_COUNT}-column quick.md Step 7 schema`,
`${QUICK_MD_STEP7_COLUMNS.join(', ')} and the 6-column with-status variant) —`,
'the step must delegate to it rather than hardcoding column names inline.',
@@ -501,7 +501,7 @@ describe('bug #3805: fast.md log_to_state must be schema-aware', () => {
// Per CONTRIBUTING.md exception matrix.
/**
* Bug #2421: gsd-planner emits grep-count acceptance gates that count comment text
* Bug #2421: msd-planner emits grep-count acceptance gates that count comment text
*
* The planner must instruct agents to use comment-aware grep patterns in
* <automated> verify blocks. Without this, descriptive comments in file
@@ -514,55 +514,55 @@ const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const PLANNER_PATH = path.join(__dirname, '..', 'agents', 'gsd-planner.md');
const PLANNER_PATH = path.join(__dirname, '..', 'agents', 'msd-planner.md');
describe('gsd-planner grep gate hygiene (#2421)', () => {
test('gsd-planner.md exists in agents source dir', () => {
assert.ok(fs.existsSync(PLANNER_PATH), 'agents/gsd-planner.md must exist');
describe('msd-planner grep gate hygiene (#2421)', () => {
test('msd-planner.md exists in agents source dir', () => {
assert.ok(fs.existsSync(PLANNER_PATH), 'agents/msd-planner.md must exist');
});
test('gsd-planner.md contains Grep gate hygiene rule', () => {
test('msd-planner.md contains Grep gate hygiene rule', () => {
const content = fs.readFileSync(PLANNER_PATH, 'utf-8');
assert.ok(
content.includes('Grep gate hygiene') || content.includes('grep gate hygiene'),
'gsd-planner.md must contain a "Grep gate hygiene" rule to prevent self-invalidating grep gates'
'msd-planner.md must contain a "Grep gate hygiene" rule to prevent self-invalidating grep gates'
);
});
test('gsd-planner.md explains self-invalidating grep gate anti-pattern', () => {
test('msd-planner.md explains self-invalidating grep gate anti-pattern', () => {
const content = fs.readFileSync(PLANNER_PATH, 'utf-8');
assert.ok(
content.includes('self-invalidating'),
'gsd-planner.md must describe the "self-invalidating" grep gate anti-pattern'
'msd-planner.md must describe the "self-invalidating" grep gate anti-pattern'
);
});
test('gsd-planner.md provides comment-stripping grep example', () => {
test('msd-planner.md provides comment-stripping grep example', () => {
const content = fs.readFileSync(PLANNER_PATH, 'utf-8');
// Must show a pattern that excludes comment lines (grep -v or grep -vE)
assert.ok(
content.includes('grep -v') || content.includes('grep -vE') || content.includes('-v '),
'gsd-planner.md must provide a comment-stripping grep example (grep -v or grep -vE)'
'msd-planner.md must provide a comment-stripping grep example (grep -v or grep -vE)'
);
});
test('gsd-planner.md warns against bare zero-count grep gates on whole files', () => {
test('msd-planner.md warns against bare zero-count grep gates on whole files', () => {
const content = fs.readFileSync(PLANNER_PATH, 'utf-8');
assert.ok(
content.includes('== 0') || content.includes('zero-count') || content.includes('zero count'),
'gsd-planner.md must warn against bare zero-count grep gates without comment exclusion'
'msd-planner.md must warn against bare zero-count grep gates without comment exclusion'
);
});
test('gsd-planner.md grep gate hygiene rule appears after Nyquist Rule', () => {
test('msd-planner.md grep gate hygiene rule appears after Nyquist Rule', () => {
const content = fs.readFileSync(PLANNER_PATH, 'utf-8');
const nyquistIdx = content.indexOf('Nyquist Rule');
const grepGateIdx = content.indexOf('grep gate hygiene') !== -1
? content.indexOf('grep gate hygiene')
: content.indexOf('Grep gate hygiene');
assert.ok(nyquistIdx !== -1, 'Nyquist Rule must be present in gsd-planner.md');
assert.ok(grepGateIdx !== -1, 'Grep gate hygiene must be present in gsd-planner.md');
assert.ok(nyquistIdx !== -1, 'Nyquist Rule must be present in msd-planner.md');
assert.ok(grepGateIdx !== -1, 'Grep gate hygiene must be present in msd-planner.md');
assert.ok(
grepGateIdx > nyquistIdx,
`Grep gate hygiene rule (at ${grepGateIdx}) must appear after Nyquist Rule (at ${nyquistIdx})`
@@ -583,7 +583,7 @@ describe('gsd-planner grep gate hygiene (#2421)', () => {
// Regression guard for bug #3087.
//
// Between v1.38.3 and v1.38.4, agents/gsd-planner.md had 10 instances of
// Between v1.38.3 and v1.38.4, agents/msd-planner.md had 10 instances of
// CRITICAL/MANDATORY/ALWAYS/MUST directive emphasis systematically removed.
// The change was undocumented and conflicts with the stated intent of PR #2489
// (the sycophancy-hardening pass that shipped in the same release). This test
@@ -597,9 +597,9 @@ const path = require('node:path');
const ROOT = path.join(__dirname, '..');
let src;
try {
src = fs.readFileSync(path.join(ROOT, 'agents', 'gsd-planner.md'), 'utf8');
src = fs.readFileSync(path.join(ROOT, 'agents', 'msd-planner.md'), 'utf8');
} catch (err) {
throw new Error(`agents/gsd-planner.md not found — was the file renamed? (${err.message})`);
throw new Error(`agents/msd-planner.md not found — was the file renamed? (${err.message})`);
}
const directives = [
@@ -616,10 +616,10 @@ const directives = [
];
for (const { desc, pattern } of directives) {
test(`gsd-planner.md: ${desc}`, () => {
test(`msd-planner.md: ${desc}`, () => {
assert.ok(
pattern.test(src),
`Directive enforcement missing from gsd-planner.md: "${desc}" — pattern ${pattern} not found. ` +
`Directive enforcement missing from msd-planner.md: "${desc}" — pattern ${pattern} not found. ` +
`This language was demoted in v1.38.4 (PR #2489) without documentation, conflicting with ` +
`the sycophancy-hardening intent of that release. See bug #3087.`,
);
@@ -646,7 +646,7 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const PLANNER_PATH = path.join(__dirname, '..', 'agents', 'gsd-planner.md');
const PLANNER_PATH = path.join(__dirname, '..', 'agents', 'msd-planner.md');
function readPlanner() {
return fs.readFileSync(PLANNER_PATH, 'utf8');