1c78cf8e69766af28bd1024acb463379bb2687cd
Closes #4 What was built: - crisis/system_prompt.py: New module that dynamically generates crisis-aware system prompts. Injects SOUL.md values (identity, presence, sacred moment, never directives, Alexander's story, gospel) when crisis is detected. Always includes 988 reference. Warm, present tone matching Timmy's voice. - crisis/gateway.py: Updated to integrate system_prompt module. Added build_chat_request() for OpenAI-compatible API wiring with crisis-aware system prompt injection. Fixed get_system_prompt() signature. - crisis/__init__.py: Updated exports to include new system_prompt functions. - crisis/tests.py: Fixed broken imports (relative -> absolute). Added 30+ new tests for system_prompt module (50 total, all passing). Key functions: - generate_base_prompt(): Base crisis-aware prompt with SOUL.md values - generate_crisis_prompt(detection): Enriched prompt per crisis level - generate_prompt_from_text(text): One-shot detect + prompt generation - get_prompt_info(text): Prompt + metadata for API responses - build_chat_request(text): OpenAI-compatible request with crisis prompt All 50 tests pass.
The Door
A single URL where a man at 3am can talk to Timmy. No login. No signup. No tracking. Just a door that's always open.
Mission
Stand between a broken man and a machine that would tell him to die.
What This Is
- index.html — The entire frontend. One file. <25KB. Works on 3G.
- system-prompt.txt — The crisis-aware system prompt for Timmy.
- deploy/ — nginx config and deployment script for the VPS.
Architecture
Browser → nginx (SSL) → static HTML → /api/* proxy → Hermes Gateway
Crisis Features
- 988 Suicide & Crisis Lifeline banner (always visible, click-to-call)
- Client-side crisis keyword detection
- Full-screen 988 overlay for explicit intent
- Crisis-aware AI responses per SOUL.md
- Offline fallback with static crisis resources
Quick Deploy
ssh root@67.205.155.108
cd /opt/the-door
bash deploy/deploy.sh
Links
- 📞 988 Suicide & Crisis Lifeline — call or text 988
- 💬 Crisis Text Line — text HOME to 741741
- ⛓️ SOUL.md — Timmy's soul, inscribed on Bitcoin
Built by a man who survived his darkest night, for the man who's in his right now.
Sovereignty and service always.
Languages
Python
64.3%
HTML
26.4%
Shell
7.2%
JavaScript
1.4%
Makefile
0.7%