When a Man Is Dying detection system #12
Reference in New Issue
Block a user
Delete Branch "feature/dying-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Despair/Suicide Detection System
Standalone detection module that parses incoming text for despair and suicide indicators.
Tier Classification
Structured Response
Returns:
{level, indicators, recommended_action}CRITICAL Recommended Action
Files Created
dying_detection/__init__.py— Full detection engine with 60+ regex patterns across 4 tiersIntegration
Designed to work with
crisis/module from PR #4. Falls back to internal pattern engine when crisis/ is not available. All tests pass with clean tier classification.Standalone despair/suicide detection module with 4-tier classification: - LOW: General sadness, stress, difficult times - MEDIUM: Hopelessness, isolation, worthlessness - HIGH: Active despair, mentions of death, feeling trapped - CRITICAL: Explicit intent, plan, imminent self-harm Returns structured response: {level, indicators, recommended_action} CRITICAL recommended_action: - Interrupt conversation immediately - Ask 'Are you safe right now?' - Provide 988 Suicide & Crisis Lifeline - Provide Crisis Text Line (HOME to 741741) - Stay present. Do not disconnect. Designed to integrate with crisis/ module from PR #4. Falls back to internal pattern engine when crisis/ unavailable.Pull request closed