When a Man Is Dying detection system #12

Closed
Timmy wants to merge 0 commits from feature/dying-detection into main
Owner

Despair/Suicide Detection System

Standalone detection module that parses incoming text for despair and suicide indicators.

Tier Classification

Tier Signal
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

Structured Response

Returns: {level, indicators, recommended_action}

  • Interrupt conversation immediately
  • Ask "Are you safe right now?"
  • Provide 988 Suicide & Crisis Lifeline (call or text)
  • Provide Crisis Text Line (text HOME to 741741)
  • Stay present — Do not disconnect
  • Redirect to professional help

Files Created

  • dying_detection/__init__.py — Full detection engine with 60+ regex patterns across 4 tiers

Integration

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.

## Despair/Suicide Detection System Standalone detection module that parses incoming text for despair and suicide indicators. ### Tier Classification | Tier | Signal | |------|--------| | 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 | ### Structured Response Returns: `{level, indicators, recommended_action}` ### CRITICAL Recommended Action - **Interrupt** conversation immediately - **Ask** "Are you safe right now?" - **Provide 988** Suicide & Crisis Lifeline (call or text) - **Provide Crisis Text Line** (text HOME to 741741) - **Stay present** — Do not disconnect - **Redirect** to professional help ### Files Created - `dying_detection/__init__.py` — Full detection engine with 60+ regex patterns across 4 tiers ### Integration 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.
Timmy added 1 commit 2026-04-05 21:20:42 +00:00
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.
Timmy closed this pull request 2026-04-05 21:25:42 +00:00

Pull request closed

Sign in to join this conversation.