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

@@ -3,7 +3,7 @@
/**
* Property-based tests for config-schema.cjs
*
* Module: gsd-core/bin/lib/config-schema.cjs
* Module: msd-core/bin/lib/config-schema.cjs
* Exported: isValidConfigKey(keyPath) -> boolean
* VALID_CONFIG_KEYS: Set<string>
* RUNTIME_STATE_KEYS: Set<string>
@@ -31,8 +31,8 @@ const {
isCapabilityConfigKey,
VALID_CONFIG_KEYS,
RUNTIME_STATE_KEYS,
} = require('../gsd-core/bin/lib/config-schema.cjs');
const { escapeRegex } = require('../gsd-core/bin/lib/pattern.cjs');
} = require('../msd-core/bin/lib/config-schema.cjs');
const { escapeRegex } = require('../msd-core/bin/lib/pattern.cjs');
describe('config-schema: isValidConfigKey properties', () => {
// (a) Never throws on any input
@@ -163,7 +163,7 @@ describe('config-schema: isValidConfigKey properties', () => {
assert.equal(
isValidConfigKey('hooks.community'),
true,
'hooks.community is the gsd-validate-commit.sh opt-in gate and must be settable via config-set'
'hooks.community is the msd-validate-commit.sh opt-in gate and must be settable via config-set'
);
});
@@ -191,7 +191,7 @@ describe('config-schema: cwd-aware overlay federation (ADR-1244 D2)', () => {
const FIRST_PARTY_KEY = 'workflow.ui_phase';
const overlayCap = {
id: 'cfgschema-overlay', role: 'feature', version: '1.0.0', title: 'cfg overlay', description: 'x',
tier: 'standard', requires: [], engines: { gsd: '>=1.0.0' },
tier: 'standard', requires: [], engines: { msd: '>=1.0.0' },
runtimeCompat: { supported: ['*'], unsupported: [] },
skills: ['cfgschema-overlay-skill'], agents: [], hooks: [],
config: { [OVERLAY_KEY]: { type: 'boolean', default: true, description: 'overlay-owned key' } },
@@ -200,29 +200,29 @@ describe('config-schema: cwd-aware overlay federation (ADR-1244 D2)', () => {
let withOverlay, withoutOverlay, sandboxHome, savedHome;
before(() => {
savedHome = process.env.GSD_HOME;
savedHome = process.env.MSD_HOME;
sandboxHome = fs.mkdtempSync(path.join(os.tmpdir(), 'cfgschema-home-'));
process.env.GSD_HOME = sandboxHome; // empty global overlay root + user-owned consent store
process.env.MSD_HOME = sandboxHome; // empty global overlay root + user-owned consent store
// realpath so the consent record's realpath(projectRoot) matches the loader's lookup.
withOverlay = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'cfgschema-proj-')));
fs.mkdirSync(path.join(withOverlay, '.planning'), { recursive: true }); // project-root marker
const capDir = path.join(withOverlay, '.gsd', 'capabilities', 'cfgschema-overlay');
const capDir = path.join(withOverlay, '.msd', 'capabilities', 'cfgschema-overlay');
fs.mkdirSync(capDir, { recursive: true });
fs.writeFileSync(path.join(capDir, 'capability.json'), JSON.stringify(overlayCap), 'utf8');
// #1459: a PROJECT-scope overlay activates only with a committed ledger AND a user consent record
// on this machine. Write both so the cwd-aware federation behavior under test is exercised for a
// genuinely-installed+consented overlay (a forged in-repo ledger alone no longer activates it).
fs.writeFileSync(
path.join(withOverlay, '.gsd-capabilities.json'),
path.join(withOverlay, '.msd-capabilities.json'),
JSON.stringify({ version: '1', updatedAt: '2026-01-01T00:00:00Z', entries: {
'cfgschema-overlay': { id: 'cfgschema-overlay', version: '1.0.0', source: 's', integrity: 'sha512-cfg', files: [], sharedEdits: [] },
} }),
'utf8',
);
const trust = require('../gsd-core/bin/lib/capability-trust.cjs');
const consent = require('../gsd-core/bin/lib/capability-consent.cjs');
const trust = require('../msd-core/bin/lib/capability-trust.cjs');
const consent = require('../msd-core/bin/lib/capability-consent.cjs');
consent.recordProjectConsent({
gsdHome: sandboxHome, projectRoot: withOverlay, id: 'cfgschema-overlay',
msdHome: sandboxHome, projectRoot: withOverlay, id: 'cfgschema-overlay',
integrity: 'sha512-cfg', disclosureSignature: trust.signatureForManifest(overlayCap, capDir),
contentHash: consent.bundleContentHash(capDir),
});
@@ -230,7 +230,7 @@ describe('config-schema: cwd-aware overlay federation (ADR-1244 D2)', () => {
fs.mkdirSync(path.join(withoutOverlay, '.planning'), { recursive: true });
});
after(() => {
if (savedHome === undefined) delete process.env.GSD_HOME; else process.env.GSD_HOME = savedHome;
if (savedHome === undefined) delete process.env.MSD_HOME; else process.env.MSD_HOME = savedHome;
cleanup(sandboxHome); cleanup(withOverlay); cleanup(withoutOverlay);
});
@@ -268,7 +268,7 @@ describe('config-schema: cwd-aware overlay federation (ADR-1244 D2)', () => {
// ---------------------------------------------------------------------------
describe('capability trust config keys (ADR-1244 Phase 4)', () => {
const { CONFIG_DEFAULTS } = require('../gsd-core/bin/lib/configuration.cjs');
const { CONFIG_DEFAULTS } = require('../msd-core/bin/lib/configuration.cjs');
test('capabilities.strict_known_registries and capabilities.auto_update are valid central keys', () => {
assert.equal(isValidConfigKey('capabilities.strict_known_registries'), true);
@@ -294,11 +294,11 @@ describe('capability trust config keys (ADR-1244 Phase 4)', () => {
__foldDescribe("folded:bug-2986-config-schema-mutation-killers (consolidation epic #1969 B3 #1972)", () => {
'use strict';
process.env.GSD_TEST_MODE = '1';
process.env.MSD_TEST_MODE = '1';
/**
* Bug #2986: Layer-3 fault-detection audit found 4.62% Stryker mutation
* score on gsd-core/bin/lib/config-schema.cjs (6 killed, 124 survived).
* score on msd-core/bin/lib/config-schema.cjs (6 killed, 124 survived).
* Surviving mutants document tests that "exercise paths" but don't
* "verify outputs" -- a polarity flip or predicate swap inside the lib
* passed every existing test.
@@ -342,7 +342,7 @@ const {
VALID_CONFIG_KEYS,
DYNAMIC_KEY_PATTERNS,
isValidConfigKey,
} = require('../gsd-core/bin/lib/config-schema.cjs');
} = require('../msd-core/bin/lib/config-schema.cjs');
describe('Bug #2986: M1/M4 -- isValidConfigKey returns true for EVERY static key in VALID_CONFIG_KEYS', () => {
// Stryker mutants like `if (false) return true;` would silently flip
@@ -367,7 +367,7 @@ describe('Bug #2986: M2 -- DYNAMIC_KEY_PATTERNS.some semantic, not .every', () =
// A reserved-prefix-style placeholder name is used for `features` so the
// dynamic path is the only way to reach `true`.
const patternRepresentatives = [
{ key: 'agent_skills.gsd-planner', topLevel: 'agent_skills' },
{ key: 'agent_skills.msd-planner', topLevel: 'agent_skills' },
// #2797: `review.models.<slug>` was the `review` representative until that
// pattern was federated to the lane capabilities and removed from the central
// schema. `reviewer_instances` is the surviving `review` dynamic pattern —
@@ -426,7 +426,7 @@ describe('Bug #2986: anchor-tightening (catches mutants that loosen ^ or $ in re
// accept too much. These keys differ from a valid one by ONE character
// beyond the documented shape; they must be rejected.
const overshoot = [
{ key: 'agent_skills.gsd-planner.extra', reason: 'agent_skills regex must not allow trailing dot-segment' },
{ key: 'agent_skills.msd-planner.extra', reason: 'agent_skills regex must not allow trailing dot-segment' },
{ key: 'agent_skills.', reason: 'agent_skills regex requires non-empty agent name' },
{ key: 'review.models.', reason: 'review.models regex requires non-empty cli name' },
{ key: 'features.bad name with spaces', reason: 'features regex disallows spaces' },
@@ -454,11 +454,11 @@ describe('Bug #2986: anchor-tightening (catches mutants that loosen ^ or $ in re
'use strict';
/**
* Feature test for #2527 — /gsd-settings expands to 22 settings grouped into
* Feature test for #2527 — /msd-settings expands to 22 settings grouped into
* six visual sections. Adds 8 new fields (pattern_mapper, tdd_mode, code_review,
* code_review_depth, ui_review, commit_docs, intel.enabled, graphify.enabled)
* and verifies each is present in the AskUserQuestion block, the update_config
* step, the confirmation table, the ~/.gsd/defaults.json save step, and the
* step, the confirmation table, the ~/.msd/defaults.json save step, and the
* effective config-key validator.
*
* Closes: #2527
@@ -468,14 +468,14 @@ const { describe, test, before } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
const { runMsdTools, createTempProject, cleanup } = require('./helpers.cjs');
const SETTINGS_PATH = path.join(__dirname, '..', 'gsd-core', 'workflows', 'settings.md');
const SETTINGS_PATH = path.join(__dirname, '..', 'msd-core', 'workflows', 'settings.md');
const {
VALID_CONFIG_KEYS,
isCentralConfigKey,
isValidConfigKey,
} = require('../gsd-core/bin/lib/config-schema.cjs');
} = require('../msd-core/bin/lib/config-schema.cjs');
const NEW_FIELDS = [
'workflow.pattern_mapper',
@@ -567,7 +567,7 @@ describe('#2527: settings.md adds grouped settings layers', () => {
for (const field of NEW_FIELDS) {
assert.ok(
hasPathLike(block, field),
`save_as_defaults step must persist "${field}" into ~/.gsd/defaults.json`
`save_as_defaults step must persist "${field}" into ~/.msd/defaults.json`
);
}
});
@@ -668,7 +668,7 @@ describe('#2527: settings.md adds grouped settings layers', () => {
const tmpDir = createTempProject();
t.after(() => cleanup(tmpDir));
const bad = runGsdTools(['config-set', 'workflow.code_review_bogus_key', 'x'], tmpDir);
const bad = runMsdTools(['config-set', 'workflow.code_review_bogus_key', 'x'], tmpDir);
assert.ok(!bad.success, 'config-set on an unknown key must fail');
});
});
@@ -715,7 +715,7 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const os = require('node:os');
const { createTempProject, cleanup, runGsdTools } = require('./helpers.cjs');
const { createTempProject, cleanup, runMsdTools } = require('./helpers.cjs');
const ROOT = path.resolve(__dirname, '..');
@@ -735,7 +735,7 @@ function getWritableTmp() {
describe('feat-3210: fallow integration module', () => {
test('normalizes structural findings from a fallow report', () => {
const { normalizeFallowReport } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { normalizeFallowReport } = require('../msd-core/bin/lib/fallow-runner.cjs');
const fixture = JSON.parse(
fs.readFileSync(path.join(ROOT, 'tests', 'fixtures', 'fallow', 'sample-findings.json'), 'utf8'),
);
@@ -757,7 +757,7 @@ describe('feat-3210: fallow integration module', () => {
});
test('falls back to node_modules/.bin/fallow when PATH does not contain fallow', () => {
const { resolveFallowBinary } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { resolveFallowBinary } = require('../msd-core/bin/lib/fallow-runner.cjs');
// N2: use shared helper
const baseTmp = getWritableTmp();
@@ -768,7 +768,7 @@ describe('feat-3210: fallow integration module', () => {
// deliberately never tries a bare name on win32). Assert BOTH contracts:
// the .cmd resolves, and the bare shim ALONE (no .cmd sibling) resolves
// to null, so the deliberate win32 carve-out stays pinned.
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-bin-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-bin-'));
try {
const binDir = path.join(tmp, 'node_modules', '.bin');
fs.mkdirSync(binDir, { recursive: true });
@@ -785,7 +785,7 @@ describe('feat-3210: fallow integration module', () => {
cleanup(tmp);
}
const tmpBare = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-bin-bare-'));
const tmpBare = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-bin-bare-'));
try {
const binDir = path.join(tmpBare, 'node_modules', '.bin');
fs.mkdirSync(binDir, { recursive: true });
@@ -798,7 +798,7 @@ describe('feat-3210: fallow integration module', () => {
cleanup(tmpBare);
}
} else {
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-bin-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-bin-'));
const binDir = path.join(tmp, 'node_modules', '.bin');
fs.mkdirSync(binDir, { recursive: true });
const fallowPath = path.join(binDir, 'fallow');
@@ -814,13 +814,13 @@ describe('feat-3210: fallow integration module', () => {
// H6: replaced wholesale win32 skip with platform-adapted assertion
test('ignores non-executable PATH candidate on non-Windows; prefers .cmd over bare extensionless on Windows', () => {
const { resolveFallowBinary } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { resolveFallowBinary } = require('../msd-core/bin/lib/fallow-runner.cjs');
// N2: use shared helper
const baseTmp = getWritableTmp();
if (process.platform === 'win32') {
// H6: Windows — .cmd extension candidate must be preferred over bare extensionless file
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-win-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-win-'));
try {
const pathDir = path.join(tmp, 'bin');
fs.mkdirSync(pathDir, { recursive: true });
@@ -844,7 +844,7 @@ describe('feat-3210: fallow integration module', () => {
}
} else {
// H6: non-Windows — non-executable file in PATH must be ignored
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-nonexec-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-nonexec-'));
try {
const pathDir = path.join(tmp, 'bin');
fs.mkdirSync(pathDir, { recursive: true });
@@ -860,7 +860,7 @@ describe('feat-3210: fallow integration module', () => {
});
test('normalizes empty fallow report to zero findings', () => {
const { normalizeFallowReport } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { normalizeFallowReport } = require('../msd-core/bin/lib/fallow-runner.cjs');
const fixture = JSON.parse(
fs.readFileSync(path.join(ROOT, 'tests', 'fixtures', 'fallow', 'sample-empty.json'), 'utf8'),
);
@@ -876,10 +876,10 @@ describe('feat-3210: fallow integration module', () => {
});
test('throws actionable error when fallow is enabled but binary is unavailable', () => {
const { requireFallowBinary } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { requireFallowBinary } = require('../msd-core/bin/lib/fallow-runner.cjs');
// N2: use shared helper
const baseTmp = getWritableTmp();
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-missing-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-missing-'));
assert.throws(
() => requireFallowBinary({ cwd: tmp, envPath: '' }),
/install fallow via `npm install -D fallow` or `cargo install fallow`/,
@@ -889,7 +889,7 @@ describe('feat-3210: fallow integration module', () => {
// M5: edge-case fixture — line:0 preservation, unicode path, single-instance clone_group, 3-file cycle
test('normalizes edge-case fixture: line:0 preservation, unicode path, single-instance clone_group, 3-file cycle', () => {
const { normalizeFallowReport } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { normalizeFallowReport } = require('../msd-core/bin/lib/fallow-runner.cjs');
const fixture = JSON.parse(
fs.readFileSync(
path.join(ROOT, 'tests', 'fixtures', 'fallow', 'sample-edge-cases.json'),
@@ -945,7 +945,7 @@ describe('feat-3210: fallow integration module', () => {
describe('feat-3210: H1 - line:0 preservation', () => {
test('normalizeFallowReport preserves line:0 for unused_export (not coerced to null)', () => {
const { normalizeFallowReport } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { normalizeFallowReport } = require('../msd-core/bin/lib/fallow-runner.cjs');
const report = {
dead_code: {
unused_exports: [{ path: 'src/a.ts', export_name: 'foo', line: 0 }],
@@ -956,7 +956,7 @@ describe('feat-3210: H1 - line:0 preservation', () => {
});
test('normalizeFallowReport preserves line:0 for duplicate_block instances[0].start_line (not coerced to null)', () => {
const { normalizeFallowReport } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { normalizeFallowReport } = require('../msd-core/bin/lib/fallow-runner.cjs');
const report = {
duplication: {
clone_groups: [
@@ -971,10 +971,10 @@ describe('feat-3210: H1 - line:0 preservation', () => {
describe('feat-3210: M2 - node_modules/.bin resolution order', () => {
test('resolveFallowBinary prefers node_modules/.bin over PATH when both exist', () => {
const { resolveFallowBinary } = require('../gsd-core/bin/lib/fallow-runner.cjs');
const { resolveFallowBinary } = require('../msd-core/bin/lib/fallow-runner.cjs');
// N2: use shared helper
const baseTmp = getWritableTmp();
const tmp = fs.mkdtempSync(path.join(baseTmp, 'gsd-fallow-order-'));
const tmp = fs.mkdtempSync(path.join(baseTmp, 'msd-fallow-order-'));
try {
const binDir = path.join(tmp, 'node_modules', '.bin');
fs.mkdirSync(binDir, { recursive: true });
@@ -1022,16 +1022,16 @@ describe('feat-3210 / #1012: code-review workflow invokes fallow with the real C
// allow-test-rule: source-text-is-the-product — code-review.md IS the workflow the orchestrator (see #3210)
// executes; its fallow invocation is the product surface.
const workflowSrc = fs.readFileSync(
path.join(ROOT, 'gsd-core', 'workflows', 'code-review.md'),
path.join(ROOT, 'msd-core', 'workflows', 'code-review.md'),
'utf8',
);
// #2994: the actual fallow invocation (audit --format json, --changed-since,
// --max-crap, verdict-based exit handling) moved to a marker-gated step file
// (gsd-core/workflows/code-review/steps/structural-pre-pass.md, when=
// (msd-core/workflows/code-review/steps/structural-pre-pass.md, when=
// "state:fallow-enabled") — read it for the invocation-specific assertions
// below; the negative "removed flags" assertion checks BOTH files.
const fallowStepSrc = fs.readFileSync(
path.join(ROOT, 'gsd-core', 'workflows', 'code-review', 'steps', 'structural-pre-pass.md'),
path.join(ROOT, 'msd-core', 'workflows', 'code-review', 'steps', 'structural-pre-pass.md'),
'utf8',
);
const combinedSrc = workflowSrc + '\n' + fallowStepSrc;
@@ -1097,8 +1097,8 @@ describe('feat-3210: workflow and config contracts', () => {
test('config schema allows code_quality.fallow.* keys in CJS and runtime manifest', () => {
// CJS config-schema and runtime consume the same manifest source-of-truth.
// Use the CJS runtime Set and the manifest directly (no inline text parsing).
const { VALID_CONFIG_KEYS } = require('../gsd-core/bin/lib/config-schema.cjs');
const manifestPath = path.join(ROOT, 'gsd-core', 'bin', 'shared', 'config-schema.manifest.json');
const { VALID_CONFIG_KEYS } = require('../msd-core/bin/lib/config-schema.cjs');
const manifestPath = path.join(ROOT, 'msd-core', 'bin', 'shared', 'config-schema.manifest.json');
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
const manifestKeys = new Set(manifest.validKeys);
for (const key of [
@@ -1124,7 +1124,7 @@ describe('feat-3210: workflow and config contracts', () => {
process.env.TMPDIR = writableTmp;
process.env.TEMP = writableTmp;
process.env.TMP = writableTmp;
const tmpDir = createTempProject('gsd-fallow-config-');
const tmpDir = createTempProject('msd-fallow-config-');
try {
const cases = [
['code_quality.fallow.enabled', 'true'],
@@ -1133,7 +1133,7 @@ describe('feat-3210: workflow and config contracts', () => {
['code_quality.fallow.mcp', 'false'],
];
for (const [key, value] of cases) {
const result = runGsdTools(['config-set', key, value], tmpDir);
const result = runMsdTools(['config-set', key, value], tmpDir);
assert.ok(result.success, `config-set failed for ${key}: ${result.error || result.output}`);
}
} finally {
@@ -1153,13 +1153,13 @@ describe('feat-3210: workflow and config contracts', () => {
test('code-review workflow structural_pre_pass step is parseable and references FALLOW.json output', () => {
// #2994: structural_pre_pass's gated execution (fallow binary resolve + run
// + FALLOW.json persistence) moved to a marker-gated step file
// (gsd-core/workflows/code-review/steps/structural-pre-pass.md, when=
// (msd-core/workflows/code-review/steps/structural-pre-pass.md, when=
// "state:fallow-enabled"). The config-gate resolver itself — previously an
// inline `gsd_run query config-get code_quality.fallow.enabled` call inside
// inline `msd_run query config-get code_quality.fallow.enabled` call inside
// this step's own body (a circular self-disabling gate) — was hoisted into
// `detectFallowConfig` (src/init.cts), consumed by `cmdInitCodeReview`.
const workflow = fs.readFileSync(
path.join(ROOT, 'gsd-core', 'workflows', 'code-review.md'),
path.join(ROOT, 'msd-core', 'workflows', 'code-review.md'),
'utf8',
);
@@ -1177,12 +1177,12 @@ describe('feat-3210: workflow and config contracts', () => {
// execution behind state:fallow-enabled and points at the step file.
assert.ok(
stepBody.includes('when="state:fallow-enabled"') &&
stepBody.includes('gsd-core/workflows/code-review/steps/structural-pre-pass.md'),
stepBody.includes('msd-core/workflows/code-review/steps/structural-pre-pass.md'),
'structural_pre_pass step must gate its FALLOW.json-producing execution behind state:fallow-enabled',
);
const stepFile = fs.readFileSync(
path.join(ROOT, 'gsd-core', 'workflows', 'code-review', 'steps', 'structural-pre-pass.md'),
path.join(ROOT, 'msd-core', 'workflows', 'code-review', 'steps', 'structural-pre-pass.md'),
'utf8',
);
assert.ok(
@@ -1198,12 +1198,12 @@ describe('feat-3210: workflow and config contracts', () => {
// code_quality.fallow.enabled set both ways proves detectFallowConfig
// resolves THAT config key specifically, without reading init.cts's source.
test('init code-review\'s fallow_enabled field tracks the code_quality.fallow.enabled config key (behavioral form of detectFallowConfig)', () => {
const tmpDir = createTempProject('gsd-fallow-detect-');
const tmpDir = createTempProject('msd-fallow-detect-');
try {
const setTrue = runGsdTools(['config-set', 'code_quality.fallow.enabled', 'true'], tmpDir, { HOME: tmpDir });
const setTrue = runMsdTools(['config-set', 'code_quality.fallow.enabled', 'true'], tmpDir, { HOME: tmpDir });
assert.ok(setTrue.success, `config-set code_quality.fallow.enabled true failed: ${setTrue.error}`);
const trueResult = runGsdTools(['init', 'code-review', '1'], tmpDir, { HOME: tmpDir });
const trueResult = runMsdTools(['init', 'code-review', '1'], tmpDir, { HOME: tmpDir });
assert.ok(trueResult.success, `init code-review failed: ${trueResult.error}`);
assert.strictEqual(
JSON.parse(trueResult.output).fallow_enabled,
@@ -1211,10 +1211,10 @@ describe('feat-3210: workflow and config contracts', () => {
'init code-review must report fallow_enabled: true once code_quality.fallow.enabled is set true',
);
const setFalse = runGsdTools(['config-set', 'code_quality.fallow.enabled', 'false'], tmpDir, { HOME: tmpDir });
const setFalse = runMsdTools(['config-set', 'code_quality.fallow.enabled', 'false'], tmpDir, { HOME: tmpDir });
assert.ok(setFalse.success, `config-set code_quality.fallow.enabled false failed: ${setFalse.error}`);
const falseResult = runGsdTools(['init', 'code-review', '1'], tmpDir, { HOME: tmpDir });
const falseResult = runMsdTools(['init', 'code-review', '1'], tmpDir, { HOME: tmpDir });
assert.ok(falseResult.success, `init code-review failed: ${falseResult.error}`);
assert.strictEqual(
JSON.parse(falseResult.output).fallow_enabled,
@@ -1228,16 +1228,16 @@ describe('feat-3210: workflow and config contracts', () => {
// B4: agent output contract — doc-parity check (approved fallback per config-schema-docs-parity
// pattern). We confirm the heading exists in the shipped artifact, not in a live agent response.
// Live agent output is covered by /gsd-code-review e2e runs downstream.
// Live agent output is covered by /msd-code-review e2e runs downstream.
test('reviewer prompt defines ## Structural Findings (fallow) heading and review context echoes it', () => {
const reviewer = fs.readFileSync(path.join(ROOT, 'agents', 'gsd-code-reviewer.md'), 'utf8');
const reviewContext = fs.readFileSync(path.join(ROOT, 'gsd-core', 'contexts', 'review.md'), 'utf8');
const reviewer = fs.readFileSync(path.join(ROOT, 'agents', 'msd-code-reviewer.md'), 'utf8');
const reviewContext = fs.readFileSync(path.join(ROOT, 'msd-core', 'contexts', 'review.md'), 'utf8');
// Doc-parity: section heading must exist in the shipped agent file (the heading is a contract,
// not prose — renaming it would break every consumer that parses agent output by section)
assert.ok(
reviewer.includes('## Structural Findings (fallow)'),
'gsd-code-reviewer.md must define ## Structural Findings (fallow) section heading',
'msd-code-reviewer.md must define ## Structural Findings (fallow) section heading',
);
// Doc-parity: review context that agents receive must reference the same section
@@ -1254,15 +1254,15 @@ describe('config-set: hooks.commit_types end-to-end (#4443)', () => {
const { spawnSync } = require('node:child_process');
test('config-set hooks.commit_types accepts a JSON array and does not report Unknown config key', (t) => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-4443-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-4443-'));
t.after(() => cleanup(dir));
fs.mkdirSync(path.join(dir, '.planning'), { recursive: true });
fs.writeFileSync(path.join(dir, '.planning', 'config.json'), '{}\n');
const gsdTools = path.join(__dirname, '..', 'gsd-core', 'bin', 'gsd-tools.cjs');
const msdTools = path.join(__dirname, '..', 'msd-core', 'bin', 'msd-tools.cjs');
const result = spawnSync(
process.execPath,
[gsdTools, 'config-set', 'hooks.commit_types', '["enhance"]'],
[msdTools, 'config-set', 'hooks.commit_types', '["enhance"]'],
{ cwd: dir, encoding: 'utf8', timeout: PROBE_TIMEOUT_MS },
);
@@ -1274,15 +1274,15 @@ describe('config-set: hooks.commit_types end-to-end (#4443)', () => {
});
test('config-set hooks.community accepts a boolean and does not report Unknown config key', (t) => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-4443-community-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-4443-community-'));
t.after(() => cleanup(dir));
fs.mkdirSync(path.join(dir, '.planning'), { recursive: true });
fs.writeFileSync(path.join(dir, '.planning', 'config.json'), '{}\n');
const gsdTools = path.join(__dirname, '..', 'gsd-core', 'bin', 'gsd-tools.cjs');
const msdTools = path.join(__dirname, '..', 'msd-core', 'bin', 'msd-tools.cjs');
const result = spawnSync(
process.execPath,
[gsdTools, 'config-set', 'hooks.community', 'true'],
[msdTools, 'config-set', 'hooks.community', 'true'],
{ cwd: dir, encoding: 'utf8', timeout: PROBE_TIMEOUT_MS },
);