feat(ai-psychosis): SKILL.md cites CC0 Constitution + 5-publication framework
This commit is contained in:
parent
70ff900578
commit
b798e68e93
2 changed files with 71 additions and 0 deletions
30
plugins/ai-psychosis/tests/skill-md.test.mjs
Normal file
30
plugins/ai-psychosis/tests/skill-md.test.mjs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// Verifies SKILL.md stays aligned with the Constitution-mapping JSON
|
||||
// produced by Step 0. Reads the locked grep target dynamically so the
|
||||
// handoff between research and skill text is JSON-mediated, not hardcoded.
|
||||
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
test('SKILL.md contains Constitution-locked grep target', () => {
|
||||
const mapping = JSON.parse(
|
||||
readFileSync(
|
||||
'.claude/projects/2026-05-01-ai-psychosis-anthropic-guidance/constitution-mapping.json',
|
||||
'utf8'
|
||||
)
|
||||
);
|
||||
const skill = readFileSync('skills/ai-psychosis/SKILL.md', 'utf8');
|
||||
|
||||
if (mapping.skill_md_grep_target === 'FALLBACK_PARAPHRASE') {
|
||||
// Step 0 escalated; verify SKILL.md contains paraphrase + appendix citation
|
||||
assert.ok(skill.includes('anthropic.com/research/claude-personal-guidance'));
|
||||
} else {
|
||||
assert.ok(
|
||||
skill.includes(mapping.skill_md_grep_target),
|
||||
`SKILL.md missing locked Constitution target: ${mapping.skill_md_grep_target}`
|
||||
);
|
||||
}
|
||||
|
||||
assert.ok(skill.includes('anthropic.com/constitution'));
|
||||
assert.ok(skill.includes('anthropic.com/research/claude-personal-guidance'));
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue