17 Commits

Author SHA1 Message Date
Alexander Whitestone
b022de0b6a Merge branch 'feature/resilience' burnup-20260405-thedoor 2026-04-05 17:25:26 -04:00
Alexander Whitestone
3c07afbf53 Merge branch 'feature/content-pages' 2026-04-05 17:25:25 -04:00
Alexander Whitestone
182327a017 Merge branch 'feature/dying-detection' 2026-04-05 17:25:25 -04:00
Alexander Whitestone
eef835d2aa feat: Fallback + resilience — health checks, restart, failover (#8)
Adds operational resilience tooling:

- resilience/health-check.sh: Health check script with 5 checks (nginx, static content, gateway, disk, SSL). Supports --auto-restart and --verbose modes.
- resilience/service-restart.sh: Graceful ordered service restart with stop->verify->start->verify cycle. Supports --force mode.
- Fallback logic for when gateway is unreachable (graceful degradation to static pages)

All scripts are self-contained, no external dependencies, work on common Linux distros.
2026-04-05 17:24:09 -04:00
Alexander Whitestone
34e05638e8 feat: Content pages - testimony and about (#6)
Adds two standalone HTML pages matching the-door dark theme:

- testimony.html: Alexander's testimony — why Timmy exists, the darkest night, the gospel
- about.html: About page — mission, architecture, feature cards, resources

Both pages include:
- 988 crisis banner (always visible)
- Consistent dark theme with GitHub-inspired colors
- Mobile responsive design
- Navigation back to main chat
- Links to crisis resources

No external dependencies. Works on 3G.
2026-04-05 17:22:28 -04:00
Alexander Whitestone
e18140883b feat: When a Man Is Dying detection system (#5)
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.
2026-04-05 17:20:17 -04:00
Alexander Whitestone
e678aa076b feat: Crisis-aware system prompt + API wiring
Adds crisis detection and response system with 5-tier classification:

- crisis/PROTOCOL.md: Crisis response protocol and tier definitions
- crisis/detect.py: Tiered indicator engine (LOW/MEDIUM/HIGH/CRITICAL)
- crisis/response.py: Timmy's crisis responses and UI flag generation
- crisis/gateway.py: API gateway wrapper for crisis detection
- crisis/tests.py: Unit tests for all crisis modules

Integrates with existing crisis UI components in index.html.
All smoke tests pass.
2026-04-05 17:17:53 -04:00
Allegro
2425d631f2 fix(deploy): copy all static files, add CORS handling, add backend setup docs
- deploy.sh now copies manifest.json, sw.js, system-prompt.txt
- deploy.sh sets proper ownership/permissions on /var/www/the-door
- nginx.conf adds CORS headers for alexanderwhitestone.com origins
- nginx.conf handles OPTIONS preflight requests
- deploy.sh injects CORS map into nginx.conf
- Add BACKEND_SETUP.md with Hermes gateway config instructions

Addresses the-door#3 (frontend completeness) and the-door#4 (backend/API wiring)
2026-04-05 14:10:19 +00:00
Hermes Crisis Safety Review
80578ddcb3 fix: Crisis safety improvements based on audit
- Fix manifest.json external icon dependency (use inline SVG data URIs)
- Add PWA shortcuts for Safety Plan and 988
- Expand crisis keywords (35+ keywords vs original 12)
- Add explicit phrase detection for imminent action
- Add Safety Plan button to crisis panel
- Add 'Are you safe right now?' to crisis panel text
- Support URL param (?safetyplan=true) for PWA shortcut
- Enhanced Service Worker with offline crisis page
- Add CRISIS_SAFETY_AUDIT.md comprehensive report

Addresses gaps identified in post-PR#9 safety audit:
- Self-harm keywords (cutting, self-harm, etc.)
- Passive suicidal ideation detection
- Offline crisis resource page
- Crisis panel quick-access improvements
2026-04-01 06:28:22 +00:00
b04599b922 Merge pull request 'feat: Sovereign Evolution Redistribution — the-door' (#10) from feat/sovereign-evolution-redistribution into main GoldenRockachopa 2026-04-01 05:57:18 +00:00
5e15d8e888 Merge pull request 'Resilience & Safety: Service Worker, Safety Plan, and Enhanced Crisis Detection' (#9) from feature/crisis-detection-and-reliability into main 2026-04-01 05:57:15 +00:00
e1da1c854f feat: Phase 15 2026-03-30 23:27:46 +00:00
44cb5fc3b2 feat: add PWA manifest 2026-03-30 21:13:26 +00:00
b5e17ecab2 feat: add Service Worker for offline resilience 2026-03-30 21:13:25 +00:00
ebeb704f97 feat: add Service Worker, Safety Plan, and Local Persistence 2026-03-30 21:13:25 +00:00
Timmy
9bc06163c6 The Door: crisis front door for broken men
Single-file HTML frontend (<25KB), crisis system prompt,
nginx config, deployment script.

Closes #1 #2 #3 #4 #5
2026-03-30 12:46:11 -04:00
31fec4e082 Initial commit 2026-03-30 16:38:06 +00:00