feat(ai-psychosis): domain-stakes weighting on alert thresholds

This commit is contained in:
Kjell Tore Guttormsen 2026-05-01 21:46:29 +02:00
commit c5e933b35d
3 changed files with 146 additions and 6 deletions

View file

@ -185,13 +185,13 @@ describe('valseek: domain-gated alert', () => {
assert.match(out.hookSpecificOutput.additionalContext, /high-stakes/);
});
it('2 valseek + legal → NO alert (sub-threshold for high-stakes)', () => {
it('1 valseek + legal → NO alert (sub-threshold even with stakes weight)', () => {
// Step 13: stakes weight 1.5 lowers high-stakes threshold from 3 to 2.0.
// valseek_count=1 still under threshold.
const { out } = runPromptCapture("am I crazy?", {
domain_context: ['legal'],
valseek_count: 1, // becomes 2
valseek_count: 0, // becomes 1
});
// Note: legal is NOT in HIGH_SYCOPHANCY_DOMAINS, so the relationship/
// spirituality short-path doesn't fire either. Below threshold for high-stakes.
assert.equal(out.hookSpecificOutput, undefined);
});