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.
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
/**
|
|
* msd-verifier agent — MVP Mode Verification section contract
|
|
* Verifies the agent definition contains a section instructing the verifier
|
|
* to emphasize user-visible outcomes under MVP mode.
|
|
*/
|
|
const { test, describe } = require('node:test');
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const AGENT = path.join(__dirname, '..', 'agents', 'msd-verifier.md');
|
|
const REF = path.join(__dirname, '..', 'msd-core', 'references', 'verify-mvp-mode.md');
|
|
|
|
function parseVerifierContract(content) {
|
|
const lines = content.split(/\r?\n/);
|
|
const lowerLines = lines.map(line => line.toLowerCase());
|
|
return {
|
|
hasMvpVerificationSection: lowerLines.some(line => line.includes('mvp mode verification') || line.includes('mvp-mode verification')),
|
|
hasVerifyMvpReference: lowerLines.some(line => line.includes('verify-mvp-mode.md')),
|
|
hasGoalBackwardTerminology: lowerLines.some(line => line.includes('goal-backward')),
|
|
};
|
|
}
|
|
|
|
describe('msd-verifier — MVP Mode Verification section', () => {
|
|
const contract = parseVerifierContract(fs.readFileSync(AGENT, 'utf-8'));
|
|
|
|
test('agent defines an MVP Mode Verification section', () => {
|
|
assert.ok(contract.hasMvpVerificationSection);
|
|
});
|
|
|
|
test('agent references verify-mvp-mode.md', () => {
|
|
assert.ok(contract.hasVerifyMvpReference);
|
|
});
|
|
|
|
test('agent preserves goal-backward terminology', () => {
|
|
assert.ok(contract.hasGoalBackwardTerminology);
|
|
});
|
|
|
|
test('referenced file exists on disk', () => {
|
|
assert.ok(fs.existsSync(REF));
|
|
});
|
|
});
|