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 @@
/**
* Workflow size budget (measured in BYTES — see #717).
*
* Workflow definitions in `gsd-core/workflows/*.md` are loaded verbatim
* into the agent's context every time the corresponding `/gsd:*` command is
* Workflow definitions in `msd-core/workflows/*.md` are loaded verbatim
* into the agent's context every time the corresponding `/msd:*` command is
* invoked. Unbounded growth is paid on every invocation across every session.
*
* ## Why bytes, not lines (#717)
@@ -32,7 +32,7 @@
* ## The goal this metric is a proxy for (read before gaming it — #717)
*
* The real target is bounded *loaded* context. This test measures one file's
* bytes, but `@~/.claude/gsd-core/references/...` imports are loaded EAGERLY
* bytes, but `@~/.claude/msd-core/references/...` imports are loaded EAGERLY
* into context. Moving prose into an eagerly @-imported reference shrinks the
* measured file while leaving (or growing) total loaded context — that is
* gaming the proxy, not improving the goal. Legitimate extraction is LAZY:
@@ -92,7 +92,7 @@ const {
} = require('../scripts/workflow-size.cjs');
const { cleanup } = require('./helpers.cjs');
const WORKFLOWS_DIR = path.join(__dirname, '..', 'gsd-core', 'workflows');
const WORKFLOWS_DIR = path.join(__dirname, '..', 'msd-core', 'workflows');
// Tier HARD CAPS (#1074) — absolute red lines, not high-water-hugging ceilings.
// Day-to-day creep is caught per-file by the baseline guard below; these exist
@@ -114,7 +114,7 @@ const WORKFLOWS_DIR = path.join(__dirname, '..', 'gsd-core', 'workflows');
// 40 KiB is the strongest extraction signal of the three. The previous DEFAULT
// high-water, verify-phase.md at 40,931 (29 bytes of headroom), was deleted as
// an orphan in #1892 — 0 loaders, with its still-live gates migrated to
// gsd-core/references/verifier-phase-gates.md behind the gsd-verifier agent.
// msd-core/references/verifier-phase-gates.md behind the msd-verifier agent.
// Measured 2026-08-13 via measureWorkflows() after that deletion; the note
// before that named settings-advanced.md at 39,160, stale on both counts.)
const XL_CAP = 98304; // 96 KiB
@@ -198,7 +198,7 @@ describe('SIZE: workflow headroom census (issue #4261)', () => {
`RESERVED MARGIN: ${r.name}.md is ${r.bytes} bytes — ${r.headroom} under the ${r.tier} cap ` +
`(${r.usedPct.toFixed(1)}%), past the ${r.margin}-byte margin. The cap is not moving: ` +
`extract per-mode bodies to workflows/${r.name}/modes/, templates to ` +
`workflows/${r.name}/templates/, or shared references to gsd-core/references/ — lazily.`,
`workflows/${r.name}/templates/, or shared references to msd-core/references/ — lazily.`,
);
}
// No assertion on the count, deliberately: pinning it would recreate the
@@ -264,7 +264,7 @@ describe('SIZE: workflow tier hard caps (issue #1074)', () => {
`${workflow}.md is ${bytes} bytes — exceeds the ${tier} hard cap of ${cap}. ` +
`This cap is a red line, NOT a budget to raise: extract per-mode bodies to a ` +
`workflows/${workflow}/modes/ subdirectory, templates to ` +
`workflows/${workflow}/templates/, or shared references to gsd-core/references/ — ` +
`workflows/${workflow}/templates/, or shared references to msd-core/references/ — ` +
`and load them LAZILY (not via @-required_reading, which would shrink this ` +
`file's bytes without shrinking loaded context). See workflows/discuss-phase/.`
);
@@ -302,7 +302,7 @@ describe('SIZE: detail/ subtree is excluded from tier classification (#4403, ADR
// rather than true-by-omission, and lock it as a regression guard: a future switch
// to a recursive scan must not start tier-classifying detail files.
test('measureWorkflows()/listWorkflowStems() do not recurse into any <workflow>/detail/ subdirectory', () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-size-detail-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-size-detail-'));
try {
fs.writeFileSync(path.join(dir, 'sample.md'), 'top-level spine\n');
const detailDir = path.join(dir, 'sample', 'detail');
@@ -326,7 +326,7 @@ describe('SIZE: detail/ subtree is excluded from tier classification (#4403, ADR
});
test('a near-NEW_FILE_CAP-sized detail/ file is excluded from SIZES and never tier-classified', () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-size-detail-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-size-detail-'));
try {
fs.writeFileSync(path.join(dir, 'sample.md'), 'top-level spine\n');
const detailDir = path.join(dir, 'sample', 'detail');
@@ -394,7 +394,7 @@ describe('SIZE: discuss-phase progressive disclosure (#717 byte budget)', () =>
assert.ok(
fs.existsSync(p),
`Expected mode file ${path.relative(WORKFLOWS_DIR, p)} — missing. ` +
`Each --flag in commands/gsd/discuss-phase.md must have a matching mode file.`
`Each --flag in commands/msd/discuss-phase.md must have a matching mode file.`
);
}
});
@@ -673,70 +673,70 @@ describe('workflow progressive disclosure — MVP bodies lazy-loaded (#720)', ()
);
});
test('gsd-planner.md does not eagerly @-import planner-mvp-mode.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-planner.md'), 'utf-8');
test('msd-planner.md does not eagerly @-import planner-mvp-mode.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-planner.md'), 'utf-8');
assert.ok(
!/@[~./\w-]*planner-mvp-mode\.md/.test(content),
'gsd-planner.md contains an eager @-import of planner-mvp-mode.md — ' +
'msd-planner.md contains an eager @-import of planner-mvp-mode.md — ' +
'this loads the MVP body into context for every session, even when MVP_MODE is false. ' +
'Replace with a conditional Read instruction or a plain backtick path. See #720.'
);
});
test('gsd-planner.md does not eagerly @-import skeleton-template.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-planner.md'), 'utf-8');
test('msd-planner.md does not eagerly @-import skeleton-template.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-planner.md'), 'utf-8');
assert.ok(
!/@[~./\w-]*skeleton-template\.md/.test(content),
'gsd-planner.md contains an eager @-import of skeleton-template.md — ' +
'msd-planner.md contains an eager @-import of skeleton-template.md — ' +
'this loads the template into context on every planner invocation. ' +
'Replace with a conditional Read instruction or a plain backtick path. See #720.'
);
});
test('gsd-planner.md does not eagerly @-import user-story-template.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-planner.md'), 'utf-8');
test('msd-planner.md does not eagerly @-import user-story-template.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-planner.md'), 'utf-8');
assert.ok(
!/@[~./\w-]*user-story-template\.md/.test(content),
'gsd-planner.md contains an eager @-import of user-story-template.md — ' +
'msd-planner.md contains an eager @-import of user-story-template.md — ' +
'this loads the template into context on every planner invocation. ' +
'Replace with a conditional Read instruction or a plain backtick path. See #720.'
);
});
test('gsd-planner.md still references the three MVP bodies', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-planner.md'), 'utf-8');
test('msd-planner.md still references the three MVP bodies', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-planner.md'), 'utf-8');
assert.ok(
/planner-mvp-mode\.md/.test(content),
'gsd-planner.md must still reference planner-mvp-mode.md (as a lazy path or Read instruction). ' +
'msd-planner.md must still reference planner-mvp-mode.md (as a lazy path or Read instruction). ' +
'Do not delete the reference — only remove the leading @ sigil. See #720.'
);
assert.ok(
/skeleton-template\.md/.test(content),
'gsd-planner.md must still reference skeleton-template.md (as a lazy path or Read instruction). ' +
'msd-planner.md must still reference skeleton-template.md (as a lazy path or Read instruction). ' +
'Do not delete the reference — only remove the leading @ sigil. See #720.'
);
assert.ok(
/user-story-template\.md/.test(content),
'gsd-planner.md must still reference user-story-template.md (as a lazy path or Read instruction). ' +
'msd-planner.md must still reference user-story-template.md (as a lazy path or Read instruction). ' +
'Do not delete the reference — only remove the leading @ sigil. See #720.'
);
});
test('gsd-executor.md does not eagerly @-import execute-mvp-tdd.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-executor.md'), 'utf-8');
test('msd-executor.md does not eagerly @-import execute-mvp-tdd.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-executor.md'), 'utf-8');
assert.ok(
!/@[~./\w-]*execute-mvp-tdd\.md/.test(content),
'gsd-executor.md contains an eager @-import of execute-mvp-tdd.md — ' +
'msd-executor.md contains an eager @-import of execute-mvp-tdd.md — ' +
'this loads the MVP TDD body into context for every session. ' +
'Replace with a conditional Read instruction or a plain backtick path. See #720.'
);
});
test('gsd-executor.md still references execute-mvp-tdd.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gsd-executor.md'), 'utf-8');
test('msd-executor.md still references execute-mvp-tdd.md', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'msd-executor.md'), 'utf-8');
assert.ok(
/execute-mvp-tdd\.md/.test(content),
'gsd-executor.md must still reference execute-mvp-tdd.md (as a lazy path or Read instruction). ' +
'msd-executor.md must still reference execute-mvp-tdd.md (as a lazy path or Read instruction). ' +
'Do not delete the reference — only remove the leading @ sigil. See #720.'
);
});
@@ -747,7 +747,7 @@ describe('SIZE: byteCount is line-ending independent (#683 regression)', () => {
// checks these .md files out as CRLF, which previously inflated the count by
// one byte per line and failed CI only on Windows for the high-water file.
test('CRLF and LF content of the same logical file count identically', () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-size-eol-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-size-eol-'));
try {
const body = 'line one\nline two\nthree — with a multibyte dash\n';
const lfPath = path.join(dir, 'lf.md');
@@ -833,7 +833,7 @@ describe('#3324: no @-include lines inside Agent() prompt strings', () => {
'<execution_context> must carry the ORCHESTRATOR build-time embed instruction (#3324)'
);
assert.ok(
/`~\/\.claude\/gsd-core\/workflows\/execute-plan\.md`/.test(block[1]),
/`~\/\.claude\/msd-core\/workflows\/execute-plan\.md`/.test(block[1]),
'<execution_context> must list execute-plan.md (backticked, no @ sigil) for build-time embed (#3324)'
);
});