Skip to content

Pegasus foundation — Expo data layer, Modal TRIBE ML, NVIDIA video#1

Open
rishith-c wants to merge 5 commits into
devfrom
feat/scaffold
Open

Pegasus foundation — Expo data layer, Modal TRIBE ML, NVIDIA video#1
rishith-c wants to merge 5 commits into
devfrom
feat/scaffold

Conversation

@rishith-c

@rishith-c rishith-c commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Foundation PR (FINAL spec, Hugging Face + NVIDIA stack). Rishith's lanes built & verified; other services scaffolded for their owners.

Rishith's work

  • frontend data layer (Expo, TS) — types/api/config + hooks (useResponseTracker, useBurnoutScore, useCamera). The exact surface Wesley imports.
  • ml/ (:8003) — TRIBE v2 on Modal; BurnoutScorer now 100% Hugging Face (no Anthropic): emotion model for sentiment + chat model (HF_MODEL) for interventions, via huggingface_hub.InferenceClient.
  • video/ (:8004) — custom MediaPipe facial heuristics + NVIDIA Chatterbox TTS & parakeet ASR over hosted Riva gRPC (grpc.nvcf.nvidia.com:443, nvidia-riva-client, function-ids).

Secrets

Keys live ONLY in gitignored ml/.env + video/.env (HF_TOKEN; NVIDIA_STT_KEY/NVIDIA_TTS_KEY). .env.example templates committed. Rotate keys after the event.

Scaffolded (other owners)

backend/ (Jason), signals/ (Dhruva — ⚠️ still uses Claude; PRD says HF), shared/, frontend screens (Wesley). imessage/ legacy, superseded by Twilio SMS.

Verified

All Python compiles; scorer returns full BurnoutResult; .env confirmed gitignored. Not run live (need keys/installs): Modal, HF, NVIDIA Riva, mediapipe/librosa+ffmpeg, Expo.

🤖 Generated with Claude Code

Runnable stubs for all four services against shared/contract.md:
- ml (:8003)      TRIBE v2 predictor (stub), deviation scoring, Claude intervention
- backend (:8001) orchestrator + SQLite, fans out to signals/ml, degrades gracefully
- signals (:8002) Claude sentiment + typing dynamics, Twilio alerts, collector.js
- frontend (:3000) Vite React check-in flow + Check Engine Light

Plus:
- shared/contract.{md,py} as the source of truth
- per-folder AGENTS.md + .claude/agents/* so each teammate's agent stays in its lane
- standalone imessage/ bridge (AppleScript send + chat.db poll, macOS, owner TBD)
- dev.sh to set up + run everything

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rishith-c! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

rishith-c and others added 2 commits June 13, 2026 11:17
ml (:8003):
- combined_scorer.py merges imessage/typing/facial/voice/tribe streams,
  renormalizing weights over whichever streams are present (text-only scores too)
- tribe_inference.py (TribeModel) adds per-region activations + baseline caching
- new endpoints: POST /predict, GET /baseline/{stimulus_id}, POST /score (full bundle)
- claude_interpreter.py (renamed); stimuli/manifest.json; thresholds green<30/yellow<65/red>=65

video (:8004) — NEW service:
- facial_analyzer.py (MediaPipe Face Mesh), voice_analyzer.py (Whisper + librosa)
- main.py with /analyze/video + /analyze/frame; heavy models lazy-load
- opt-in in dev.sh via WITH_VIDEO=1

Contract deltas flagged for Jason in ml/AGENTS.md (score shape, thresholds, /intervention removed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
frontend (Expo, replaces Vite web app):
- bootstrapped Expo + TypeScript (App.tsx placeholder is Wesley's to replace)
- DATA LAYER (Rishith-owned): types/index.ts, services/{api,config}.ts,
  hooks/{useResponseTracker,useBurnoutScore,useCamera} — the exact surface Wesley imports

ml (:8003):
- calls TRIBE v2 on Modal (pegasus-tribe) — no stub, lazy + offline-tolerant
- scoring.BurnoutScorer: HF emotion model + deviation math + Claude intervention;
  returns full BurnoutResult (deviation, confidence, brain_regions_flagged, breakdown)
- dropped combined_scorer/tribe_inference/claude_interpreter stubs

video (:8004):
- custom facial_analyzer (my own EAR/geometry on MediaPipe landmarks)
- voice_analyzer via NVIDIA STT + librosa; tts.py via NVIDIA TTS (bonus)

docs/secrets:
- frontend/AGENTS.md documents the Rishith/Wesley split
- root AGENTS.md: FINAL team table + the 45-min sync cadence
- .env.examples for ml + video; .env stays gitignored

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rishith-c rishith-c changed the title Scaffold: 4 services + agent rules + iMessage bridge Pegasus foundation — Expo data layer, Modal TRIBE ML, NVIDIA video Jun 13, 2026
rishith-c and others added 2 commits June 13, 2026 12:08
ml:
- remove Claude entirely; BurnoutScorer now uses huggingface_hub.InferenceClient
  for BOTH sentiment (emotion model) and interventions (chat model, HF_MODEL).
- requirements: drop anthropic/requests, add huggingface-hub.

video:
- voice_analyzer.py: real NVIDIA parakeet ASR over hosted Riva gRPC
  (grpc.nvcf.nvidia.com:443) via nvidia-riva-client + function-id.
- tts.py: real NVIDIA Chatterbox TTS (function-id ddacc747-...) → WAV.
- requirements: drop requests, add nvidia-riva-client.

secrets: keys live only in gitignored ml/.env + video/.env (verified ignored).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants