Files
the-nexus/tests
Alexander Whitestone f6cc734675
Some checks failed
CI / test (pull_request) Failing after 39s
CI / validate (pull_request) Failing after 37s
Review Approval Gate / verify-review (pull_request) Failing after 5s
fix: #1543
- Add crisis detection module for Nexus world chat
- Add js/crisis-detector.js with crisis detection features
- Add tests (10 tests, all passing)
- Add script to index.html

Features:
1. Crisis keyword detection (30+ keywords)
2. Pattern matching for crisis phrases
3. 988 crisis overlay display
4. Crisis metrics tracking
5. localStorage persistence

Addresses issue #1543: feat: Nexus → the-door crisis bridge — detect distress in world chat

Crisis detection:
- Detects keywords like 'suicide', 'kill myself', etc.
- Detects patterns like 'I want to die', etc.
- Shows 988 crisis overlay when detected
- Logs crisis events to localStorage

Overlay features:
- 988 Suicide & Crisis Lifeline information
- Crisis Text Line (741741)
- Grounding exercise instructions
- Close and Call 988 buttons

Tested:
- Keyword detection
- Pattern matching
- Metrics tracking
- Overlay visibility
- Crisis handler
2026-04-17 02:12:13 -04:00
..
2026-04-17 02:12:13 -04:00