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

@@ -5,7 +5,7 @@
// runtime loads — testing text content tests the deployed contract.
/**
* #2529 — /gsd-settings-integrations: configure third-party search and review integrations.
* #2529 — /msd-settings-integrations: configure third-party search and review integrations.
*
* Covers:
* - Artifacts exist (command, workflow, skill stub) with correct frontmatter
@@ -21,7 +21,7 @@
* - config-set round-trips all integration keys through VALID_CONFIG_KEYS,
* dynamic patterns, and the federated capability registry
* - Config merge preserves unrelated keys
* - /gsd:settings confirmation output mentions /gsd:settings-integrations
* - /msd:settings confirmation output mentions /msd:settings-integrations
* - Negative: invalid agent-type name (path traversal / special char) is rejected
* - Negative: malformed review.models key is rejected
* - Logging: plaintext API keys do not appear in any file written under .planning/
@@ -33,18 +33,18 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { createTempProject, cleanup, runGsdTools } = require('./helpers.cjs');
const { createTempProject, cleanup, runMsdTools } = require('./helpers.cjs');
const {
VALID_CONFIG_KEYS,
isValidConfigKey,
} = require('../gsd-core/bin/lib/config-schema.cjs');
} = require('../msd-core/bin/lib/config-schema.cjs');
const REPO_ROOT = path.join(__dirname, '..');
// #2790: settings-integrations.md was consolidated into config.md as the --integrations flag.
const COMMAND_PATH = path.join(REPO_ROOT, 'commands', 'gsd', 'config.md');
const WORKFLOW_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'settings-integrations.md');
const SKILL_PATH = path.join(REPO_ROOT, '.claude', 'skills', 'gsd-settings-integrations.md');
const SETTINGS_WORKFLOW_PATH = path.join(REPO_ROOT, 'gsd-core', 'workflows', 'settings.md');
const COMMAND_PATH = path.join(REPO_ROOT, 'commands', 'msd', 'config.md');
const WORKFLOW_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'settings-integrations.md');
const SKILL_PATH = path.join(REPO_ROOT, '.claude', 'skills', 'msd-settings-integrations.md');
const SETTINGS_WORKFLOW_PATH = path.join(REPO_ROOT, 'msd-core', 'workflows', 'settings.md');
// ─── Artifacts ───────────────────────────────────────────────────────────────
@@ -54,16 +54,16 @@ describe('#2529 artifacts', () => {
assert.ok(fs.existsSync(COMMAND_PATH), `missing ${COMMAND_PATH}`);
});
test('config.md frontmatter declares name gsd:config and routes to --integrations', () => {
test('config.md frontmatter declares name msd:config and routes to --integrations', () => {
const src = fs.readFileSync(COMMAND_PATH, 'utf-8');
// #2790: consolidated command uses gsd:config name
assert.match(src, /name:\s*gsd:config/);
// #2790: consolidated command uses msd:config name
assert.match(src, /name:\s*msd:config/);
assert.match(src, /description:\s*.+/);
assert.match(src, /allowed-tools:/);
assert.match(src, /AskUserQuestion/);
});
test('workflow exists at gsd-core/workflows/settings-integrations.md', () => {
test('workflow exists at msd-core/workflows/settings-integrations.md', () => {
assert.ok(fs.existsSync(WORKFLOW_PATH), `missing ${WORKFLOW_PATH}`);
});
@@ -144,8 +144,8 @@ describe('#2529 workflow — agent_skills injection', () => {
});
test('agent_skills.<valid-slug> passes validator', () => {
assert.ok(isValidConfigKey('agent_skills.gsd-executor'));
assert.ok(isValidConfigKey('agent_skills.gsd-planner'));
assert.ok(isValidConfigKey('agent_skills.msd-executor'));
assert.ok(isValidConfigKey('agent_skills.msd-planner'));
assert.ok(isValidConfigKey('agent_skills.my_custom_agent'));
});
});
@@ -156,7 +156,7 @@ describe('#2529 workflow — agent_skills injection', () => {
// first-party registry's configSchema — the exact map isCapabilityConfigKey
// consults (hasOwnProperty), so this helper cannot drift from the validator.
function collectReviewerModelConfigKeys() {
const registry = require('../gsd-core/bin/lib/capability-registry.cjs');
const registry = require('../msd-core/bin/lib/capability-registry.cjs');
const schema = registry.configSchema || {};
return new Set(
Object.keys(schema)
@@ -168,7 +168,7 @@ function collectReviewerModelConfigKeys() {
// Shared shape for the #3651 behavioral rows: write agent_skills for a slug,
// then read back the resolver's structured diagnostic.
function resolveSkillsCount(tmp, slug) {
const diag = runGsdTools(['agent-skills', slug, '--json'], tmp);
const diag = runMsdTools(['agent-skills', slug, '--json'], tmp);
assert.ok(diag.success, `agent-skills failed: ${diag.error}`);
return JSON.parse(diag.output);
}
@@ -233,8 +233,8 @@ describe('#3651 workflow — review.models settable-set rule', () => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(['config-set', 'review.models.qwen', 'qwen-model'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runMsdTools(['config-set', 'review.models.qwen', 'qwen-model'], tmp);
assert.ok(
!r.success,
'config-set must reject a keyless lane — the exact error the old workflow steered users into'
@@ -262,22 +262,22 @@ describe('#3651 workflow — agent_skills array-form write', () => {
test('JSON array agent_skills write round-trips and resolves per-element (#3651)', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
['config-set', 'agent_skills.gsd-planner', '["skills/alpha","skills/beta"]'],
const r = runMsdTools(
['config-set', 'agent_skills.msd-planner', '["skills/alpha","skills/beta"]'],
tmp
);
assert.ok(r.success, `array-form set failed: ${r.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
assert.deepStrictEqual(
cfg.agent_skills?.['gsd-planner'],
cfg.agent_skills?.['msd-planner'],
['skills/alpha', 'skills/beta'],
'stored value must be the JSON array, element per skill'
);
const parsed = resolveSkillsCount(tmp, 'gsd-planner');
const parsed = resolveSkillsCount(tmp, 'msd-planner');
assert.strictEqual(
parsed.skills_count,
2,
@@ -288,15 +288,15 @@ describe('#3651 workflow — agent_skills array-form write', () => {
test('comma-joined agent_skills value resolves as ONE path — the hazard the array form avoids (#3651)', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
['config-set', 'agent_skills.gsd-planner', 'skills/alpha,skills/beta'],
const r = runMsdTools(
['config-set', 'agent_skills.msd-planner', 'skills/alpha,skills/beta'],
tmp
);
assert.ok(r.success, `comma-string set is accepted by config-set (shape is legal): ${r.error}`);
const parsed = resolveSkillsCount(tmp, 'gsd-planner');
const parsed = resolveSkillsCount(tmp, 'msd-planner');
assert.strictEqual(
parsed.skills_count,
1,
@@ -307,15 +307,15 @@ describe('#3651 workflow — agent_skills array-form write', () => {
test('single bare-string agent_skills path keeps working (#3651)', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
['config-set', 'agent_skills.gsd-planner', 'skills/solo'],
const r = runMsdTools(
['config-set', 'agent_skills.msd-planner', 'skills/solo'],
tmp
);
assert.ok(r.success, `single-string set failed: ${r.error}`);
const parsed = resolveSkillsCount(tmp, 'gsd-planner');
const parsed = resolveSkillsCount(tmp, 'msd-planner');
assert.strictEqual(parsed.configured, true, 'a single string path is a configured entry');
assert.strictEqual(parsed.skills_count, 1, 'one string = one skill path');
});
@@ -323,22 +323,22 @@ describe('#3651 workflow — agent_skills array-form write', () => {
test('one-element array agent_skills write resolves identically to the bare string (#3651)', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
['config-set', 'agent_skills.gsd-planner', '["skills/solo"]'],
const r = runMsdTools(
['config-set', 'agent_skills.msd-planner', '["skills/solo"]'],
tmp
);
assert.ok(r.success, `one-element-array set failed: ${r.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
assert.deepStrictEqual(
cfg.agent_skills?.['gsd-planner'],
cfg.agent_skills?.['msd-planner'],
['skills/solo'],
'one-element array must persist verbatim'
);
const parsed = resolveSkillsCount(tmp, 'gsd-planner');
const parsed = resolveSkillsCount(tmp, 'msd-planner');
assert.strictEqual(parsed.configured, true);
assert.strictEqual(parsed.skills_count, 1, 'one-element array = one skill path, same as the bare string');
});
@@ -387,15 +387,15 @@ describe('#2529 config-set round-trip', () => {
test('config-set writes brave_search, firecrawl, exa_search values to config.json', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r1 = runGsdTools(['config-set', 'brave_search', 'BSKY-111111112222'], tmp);
const r1 = runMsdTools(['config-set', 'brave_search', 'BSKY-111111112222'], tmp);
assert.ok(r1.success, `brave_search set failed: ${r1.error}`);
const r2 = runGsdTools(['config-set', 'firecrawl', 'fc-aaaaaaaabbbbcccc'], tmp);
const r2 = runMsdTools(['config-set', 'firecrawl', 'fc-aaaaaaaabbbbcccc'], tmp);
assert.ok(r2.success, `firecrawl set failed: ${r2.error}`);
const r3 = runGsdTools(['config-set', 'exa_search', 'ex-000011112222dddd'], tmp);
const r3 = runMsdTools(['config-set', 'exa_search', 'ex-000011112222dddd'], tmp);
assert.ok(r3.success, `exa_search set failed: ${r3.error}`);
const r4 = runGsdTools(['config-set', 'search_gitignored', 'true'], tmp);
const r4 = runMsdTools(['config-set', 'search_gitignored', 'true'], tmp);
assert.ok(r4.success, `search_gitignored set failed: ${r4.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
@@ -411,9 +411,9 @@ describe('#2529 config-set round-trip', () => {
test('config-set round-trips review.models.<cli>', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
const r = runMsdTools(
['config-set', 'review.models.codex', 'codex exec --model gpt-5'],
tmp
);
@@ -425,20 +425,20 @@ describe('#2529 config-set round-trip', () => {
test('config-set round-trips agent_skills.<agent-type> (array form — the shape the workflow prescribes, #3651)', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(
['config-set', 'agent_skills.gsd-executor', '["skill-a","skill-b"]'],
const r = runMsdTools(
['config-set', 'agent_skills.msd-executor', '["skill-a","skill-b"]'],
tmp
);
assert.ok(r.success, `agent_skills.gsd-executor set failed: ${r.error}`);
assert.ok(r.success, `agent_skills.msd-executor set failed: ${r.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
// #3651: the prescribed write form must persist as a real JSON array — the
// either-shape acceptance this row used to allow hid the comma-string hazard.
assert.deepStrictEqual(
cfg.agent_skills?.['gsd-executor'],
cfg.agent_skills?.['msd-executor'],
['skill-a', 'skill-b'],
`expected the array form to persist verbatim, got ${JSON.stringify(cfg.agent_skills?.['gsd-executor'])}`
`expected the array form to persist verbatim, got ${JSON.stringify(cfg.agent_skills?.['msd-executor'])}`
);
});
});
@@ -449,10 +449,10 @@ describe('#2529 config merge safety', () => {
test('setting brave_search preserves unrelated workflow.research key', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runGsdTools(['config-set', 'workflow.research', 'false'], tmp);
runMsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-set', 'workflow.research', 'false'], tmp);
const r = runGsdTools(['config-set', 'brave_search', 'BSKY-preserve-me-9999'], tmp);
const r = runMsdTools(['config-set', 'brave_search', 'BSKY-preserve-me-9999'], tmp);
assert.ok(r.success, `set failed: ${r.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
@@ -460,33 +460,33 @@ describe('#2529 config merge safety', () => {
assert.strictEqual(cfg.brave_search, 'BSKY-preserve-me-9999');
});
test('setting agent_skills.gsd-executor preserves unrelated review.models.codex', (t) => {
test('setting agent_skills.msd-executor preserves unrelated review.models.codex', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runGsdTools(['config-set', 'review.models.codex', 'codex exec'], tmp);
runMsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-set', 'review.models.codex', 'codex exec'], tmp);
const r = runGsdTools(['config-set', 'agent_skills.gsd-planner', 'a,b'], tmp);
const r = runMsdTools(['config-set', 'agent_skills.msd-planner', 'a,b'], tmp);
assert.ok(r.success, `set failed: ${r.error}`);
const cfg = JSON.parse(fs.readFileSync(path.join(tmp, '.planning', 'config.json'), 'utf-8'));
assert.strictEqual(cfg.review?.models?.codex, 'codex exec', 'unrelated review.models.codex must be preserved');
assert.ok(cfg.agent_skills?.['gsd-planner'], 'agent_skills.gsd-planner must be set');
assert.ok(cfg.agent_skills?.['msd-planner'], 'agent_skills.msd-planner must be set');
});
});
// ─── /gsd-settings mentions /gsd-settings-integrations ──────────────────────
// ─── /msd-settings mentions /msd-settings-integrations ──────────────────────
describe('#2529 /gsd-settings mentions new command', () => {
test('settings workflow mentions canonical /gsd-config --integrations', () => {
describe('#2529 /msd-settings mentions new command', () => {
test('settings workflow mentions canonical /msd-config --integrations', () => {
const src = fs.readFileSync(SETTINGS_WORKFLOW_PATH, 'utf-8');
assert.ok(
src.includes('/gsd:config --integrations'),
'settings.md must mention /gsd:config --integrations'
src.includes('/msd:config --integrations'),
'settings.md must mention /msd:config --integrations'
);
assert.ok(
!src.includes('/gsd-settings-integrations'),
'settings.md must not mention the legacy /gsd-settings-integrations variant'
!src.includes('/msd-settings-integrations'),
'settings.md must not mention the legacy /msd-settings-integrations variant'
);
});
});
@@ -508,9 +508,9 @@ describe('#2529 negative — invalid inputs rejected', () => {
test('config-set rejects agent_skills with path traversal', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const r = runGsdTools(['config-set', 'agent_skills.../etc/passwd', 'x'], tmp);
const r = runMsdTools(['config-set', 'agent_skills.../etc/passwd', 'x'], tmp);
assert.ok(!r.success, 'config-set must reject path-traversal agent-type slug');
});
@@ -530,11 +530,11 @@ describe('#2529 security — plaintext containment', () => {
test('after setting brave_search, plaintext appears only in config.json', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
// Build sentinel via concat so secret-scanners do not flag the literal.
const marker = ['MASKCHECK', '9f3a7b2c'].join('-');
const r = runGsdTools(['config-set', 'brave_search', marker], tmp);
const r = runMsdTools(['config-set', 'brave_search', marker], tmp);
assert.ok(r.success, `set failed: ${r.error}`);
const planning = path.join(tmp, '.planning');
@@ -561,10 +561,10 @@ describe('#2529 security — plaintext containment', () => {
test('config-set does not echo plaintext secret on stdout/stderr', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const marker = ['ECHOCHECK', '77aa33bb'].join('-');
const r = runGsdTools(['config-set', 'brave_search', marker], tmp);
const r = runMsdTools(['config-set', 'brave_search', marker], tmp);
assert.ok(r.success, `set failed: ${r.error}`);
const combined = `${r.output || ''}\n${r.error || ''}`;
assert.ok(
@@ -576,7 +576,7 @@ describe('#2529 security — plaintext containment', () => {
test('config-get masks secrets and never echoes plaintext for brave_search/firecrawl/exa_search', (t) => {
const tmp = createTempProject();
t.after(() => cleanup(tmp));
runGsdTools(['config-ensure-section'], tmp);
runMsdTools(['config-ensure-section'], tmp);
const cases = [
{ key: 'brave_search', marker: ['GETMASK', 'brave', 'aaaa1111'].join('-') },
@@ -585,10 +585,10 @@ describe('#2529 security — plaintext containment', () => {
];
for (const { key, marker } of cases) {
const set = runGsdTools(['config-set', key, marker], tmp);
const set = runMsdTools(['config-set', key, marker], tmp);
assert.ok(set.success, `${key} set failed: ${set.error}`);
const get = runGsdTools(['config-get', key], tmp);
const get = runMsdTools(['config-get', key], tmp);
assert.ok(get.success, `${key} get failed: ${get.error}`);
const combined = `${get.output || ''}\n${get.error || ''}`;
assert.ok(