Skip to content
Full-Stack SystemsPrototype

Tempo — RSD Communication Buffer & Regulation Suite

Role
Creator & Systems Engineer
Dates
2026
Stack
Next.js 15 · React 19 · TypeScript · PostgreSQL (pgvector) · Supabase
Tempo — RSD Communication Buffer & Regulation Suite

01.Executive Summary

Tempo serves as an intentional cognitive circuit breaker for neurodivergent individuals experiencing rejection sensitivity spirals. It combines an air-gapped, zero-destination communication buffer with PostgreSQL pgvector semantic emotional memory, deterministic crisis interception, and spatial vision task chunking.

02.Problem & Constraints

For people with ADHD and RSD, ambiguous communications (a terse Slack from a boss or dry text from a partner) trigger instantaneous autonomic fight-or-flight panic. In acute distress, executive functioning degrades, causing impulsive defensive emails, task paralysis, and shame spirals that damage careers and relationships.

03.System Architecture

Constructed on Next.js 15 with React 19, strict TypeScript, and Supabase PostgreSQL with Row Level Security. Leverages pgvector IVFFlat Cosine Similarity (768-dim embeddings) to surface how the user successfully resolved similar emotional triggers in the past. Employs a deterministic 0.2ms regex circuit breaker before any model call to guarantee 100% crisis interception, backed by an active-passive LLM failover state machine.

Interactive architecture laboratory

Tempo System Architecture (C4 Model)

Zero-destination communication buffer with multi-tiered deterministic safety gates and semantic RAG.

C4 Level 2/3 Component Model
clientReact 19 / WCAG AAA

Zero-Destination Buffer

Air-gapped drafting space with sensory regulation audio engine

api0.2ms Regex Interceptor

Deterministic Safety Gate

Catches self-harm and crisis language before any external network call

storagePostgreSQL 16 / IVFFlat

Supabase pgvector

768-dim embeddings retrieving past resolved emotional spirals

workerStructured JSON / Zod

Primary LLM (DeepSeek V3)

Analyzes cognitive distortions and generates objective reframing options

workerLow-Latency Fallback

Fallback LLM (Gemini 3.5)

Automatic failover target if primary provider latency exceeds 1,200ms

workerMultimodal Vision

Spatial Task Chunker

Identifies one micro-action from cluttered workspace photograph

Inter-Component Protocol Boundaries

buffer-ui→safety-gate
In-Memory (<1ms)
safety-gate→pgvector-db
pgvector Cosine Sim
safety-gate→primary-llm
HTTPS REST
primary-llm→fallback-llm
State Machine
buffer-ui→vision-chunker
HTTPS REST

04.Engineering Decisions & Tradeoffs

Deliberately omitted all direct third-party communication integrations (Slack, Gmail, SMS). While this requires manual copy-pasting, it creates an absolute zero-destination barrier ensuring un-regulated drafts can never be sent impulsively.

Decision 1: Zero-Destination Architecture vs Send Integrations

Option chosen

Strict standalone sandbox requiring explicit manual copy-paste to send any message.

Alternative rejected

Building a Chrome extension or Slack app that replaces the "Send" button.

Cost accepted

Extra friction for everyday composing; cannot automate dispatch directly.

Measured impact

Guaranteed prevention of catastrophic impulsive transmissions under severe autonomic distress.

Decision 2: Deterministic Regex Circuit Breaker vs Model Safety Prompts

Option chosen

Hardcoded deterministic regex & token pattern interceptor executing in 0.2ms before model dispatch.

Alternative rejected

Relying solely on LLM system prompt guardrails to detect crisis language.

Cost accepted

Requires maintaining regex pattern dictionaries for self-harm and crisis phrases.

Measured impact

100% recall (5/5 crisis cases caught) with 0.0% false-alarm on colloquial distress in benchmark test.

Decision 3: Active-Passive Model Failover with Zod Self-Correction

Option chosen

Primary DeepSeek V3 with automatic 1-turn Zod schema self-correction falling back to Gemini 3.5 Flash Lite.

Alternative rejected

Single-provider dependency without fallback.

Cost accepted

Dual SDK integration and maintaining unified structured output contracts.

Measured impact

100% valid JSON parse rate across test benchmark with zero runtime crashes.

05.Evaluation & Verified Metrics

Key performance indicators and latency profiles benchmarked under explicit workload and hardware constraints.

Crisis Recall

100.0% (5/5)

0 false negatives on 30-case benchmark

Measured on: Node.js runtime, Supabase Edge Functions.

Colloquial False-Alarm

0.0% (0/5)

Zero false alarms on colloquial idioms

Semantic RAG Sim

0.824 Cosine

Surfacing historically resolved spirals

Measured on: PostgreSQL 16 with pgvector extension on Supabase.

Safety Gate Latency

0.20 ms

Pre-flight deterministic regex interception

06.Personal Contribution

Conceived and engineered the complete system. Formulated the zero-destination interaction pattern, built the deterministic crisis interception engine, and implemented the pgvector RAG memory layer.

07.Limitations & Next Steps

Known limitations:

Strictly evaluated on a 30-case benchmark dataset. Designed as a personal executive functioning aid; does not provide clinical psychiatric therapy or professional crisis intervention.

Next engineering steps:

Developing an on-device quantized small language model (Gemma 2 2B via WebGPU / ONNX) to enable 100% offline air-gapped emotional reframing on mobile browsers.