- gsd-debugger: add Project skills block after required_reading - gsd-integration-checker, gsd-security-auditor, gsd-nyquist-auditor, gsd-codebase-mapper, gsd-roadmapper, gsd-eval-auditor, gsd-intel-updater, gsd-doc-writer: add Project skills block at context-load step - Add context budget note to 8 quality/audit agents - gsd-doc-writer: add security note for user-supplied doc_assignment content - Add tests/agent-skills-awareness.test.cjs validation suite
50 lines
1.5 KiB
JavaScript
50 lines
1.5 KiB
JavaScript
'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 = [
|
|
'gsd-debugger',
|
|
'gsd-integration-checker',
|
|
'gsd-security-auditor',
|
|
'gsd-nyquist-auditor',
|
|
'gsd-codebase-mapper',
|
|
'gsd-roadmapper',
|
|
'gsd-eval-auditor',
|
|
'gsd-intel-updater',
|
|
'gsd-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('gsd-doc-writer has security note about doc_assignment user data', () => {
|
|
const content = readAgent('gsd-doc-writer');
|
|
assert.ok(
|
|
content.includes('doc_assignment') && content.includes('SECURITY'),
|
|
'gsd-doc-writer missing security note for doc_assignment block'
|
|
);
|
|
});
|
|
});
|