ssd01/vera-diagnostic-engine
0
V.E.R.A.
Validation, Evaluation, & Review Assistant — A human-in-the-loop alignment MVP.
Monorepo
Data flow
- Client Profile form (
web) insertsclients+tasksvia Supabase, then publishes JSON to QStash URL group `client-data-input`. - QStash delivers to every URL registered in that group (e.g. your deployed `worker`
/ingestendpoint). - Worker verifies
Upstash-Signature, validates the body with Pydantic, runs the LangGraph: bootstrap → Gemma-2-9B extractor → Qwen strategist → Gemini judge → Supabase finalizer (taskcompleted,ai_score,ai_critique).
If you already applied an older schema.sql, add the `vera_tasks_update_anon` policy (or equivalent) so the worker can update tasks with the anon key.
Environment variables
Use the names from your manifest (no hardcoded secrets in code):
SUPABASE_URL,SUPABASE_ANON_KEYQSTASH_URL,QSTASH_TOKENGEMINI_API_KEY,HUGGINGFACE_API_KEY
Worker webhook verification additionally needs signing keys from the QStash console (same project):
QSTASH_CURRENT_SIGNING_KEY,QSTASH_NEXT_SIGNING_KEY
If those are unset, the worker logs a warning and skips signature verification (local dev only — enable keys before any public deployment).
Commands
npm install
cd web && cp .env.example .env.local
npm run devcd worker && cp .env.example .env
python -m venv .venv && source .venv/bin/activate
pip install -e .
uvicorn vera.main:app --reload --host 0.0.0.0 --port 8000Apply supabase/schema.sql in the Supabase SQL editor, then register your public worker URL under the QStash URL group `client-data-input`.
