Files
msd-core/tests/agent-skills-awareness.test.cjs
Jakub Zych a9a7a328e6 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.
2026-10-06 01:47:40 +02:00

53 lines
1.7 KiB
JavaScript

// allow-test-rule: source-text-is-the-product
// Agent .md files are the installed AI agents — the "Project skills" block IS the deployed
// instruction. Checking text content IS checking what runs in production.
'use strict';
const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const AGENTS_DIR = path.join(__dirname, '..', 'agents');
function readAgent(name) {
return fs.readFileSync(path.join(AGENTS_DIR, `${name}.md`), 'utf8');
}
describe('project skills awareness', () => {
const agentsRequiringSkills = [
'msd-debugger',
'msd-integration-checker',
'msd-security-auditor',
'msd-nyquist-auditor',
'msd-codebase-mapper',
'msd-roadmapper',
'msd-eval-auditor',
'msd-intel-updater',
'msd-doc-writer',
];
for (const agentName of agentsRequiringSkills) {
test(`${agentName} has Project skills block`, () => {
const content = readAgent(agentName);
assert.ok(content.includes('Project skills'), `${agentName} missing Project skills block`);
});
test(`${agentName} does not load full AGENTS.md`, () => {
const content = readAgent(agentName);
assert.ok(
!content.includes('Read AGENTS.md') && !content.includes('load AGENTS.md'),
`${agentName} should not instruct loading full AGENTS.md`
);
});
}
test('msd-doc-writer has security note about doc_assignment user data', () => {
const content = readAgent('msd-doc-writer');
assert.ok(
content.includes('doc_assignment') && content.includes('SECURITY'),
'msd-doc-writer missing security note for doc_assignment block'
);
});
});