VIGIL — Live Runtime Architecture

Explore offline self-improvement → VIGIL — Live Runtime Architecture An architecture diagram generated by Archify. Cloud Scheduler · Weekly background trigger · Architecture component · Mon 09:00 · authenticated Cloud Scheduler Weekly background trigger Mon 09:00 · authenticated Cloud Run batch job · pipeline/run_batch.py · Architecture component · Gemini + Firestore Cloud Run batch job pipeline/run_batch.py Gemini + Firestore NASA ASRS corpus · 47,723 public reports · ACN keyed · Architecture component · 5,000-report demo slice NASA ASRS corpus 47,723 public reports · ACN keyed 5,000-report demo slice Deterministic ingest · Coded columns → typed ASRSReport · Architecture component · NO LLM Deterministic ingest Coded columns → typed ASRSReport NO LLM Embeddings + HDBSCAN · Seeded, reproducible clustering · Architecture component · NO LLM CALLS Embeddings + HDBSCAN Seeded, reproducible clustering NO LLM CALLS Cluster Analyst · Names hazard + writes statement · Architecture component · 1 Flash call / cluster Cluster Analyst Names hazard + writes statement 1 Flash call / cluster Risk scoring · Weighted deterministic score · Architecture component · 0.5S + 0.3F + 0.2T Risk scoring Weighted deterministic score 0.5S + 0.3F + 0.2T config/frozen.yaml · Read-only risk thresholds · Architecture component · NEVER SELF-TUNED config/frozen.yaml Read-only risk thresholds NEVER SELF-TUNED Escalation gate · total ≥ 0.60? · Architecture component · below threshold stays quiet Escalation gate total ≥ 0.60? below threshold stays quiet Coordinator · Escalated clusters only · Architecture component · parallel fan-out Coordinator Escalated clusters only parallel fan-out Precedent Agent · Same-batch evidence search · Architecture component · Flash Precedent Agent Same-batch evidence search Flash Risk Agent · Explains frozen score · Architecture component · Flash Risk Agent Explains frozen score Flash Brief Writer · Investigator draft · Architecture component · Flash · cited prose Brief Writer Investigator draft Flash · cited prose Surviving branches · 3 of 3 / 2 of 3 / fewer than 2 · Architecture component · DEGRADED is explicit Surviving branches 3 of 3 / 2 of 3 / fewer than 2 DEGRADED is explicit Citation Critic · Removes uncited claims · Architecture component · 1 Flash call / escalation Citation Critic Removes uncited claims 1 Flash call / escalation strip_uncited_claims · Deterministic ACN provenance check · Architecture component · ALWAYS RUNS LAST strip_uncited_claims Deterministic ACN provenance check ALWAYS RUNS LAST Streamlit human gate · Approve / reject / download · Architecture component · TERMINAL · NO AUTO-ACTION Streamlit human gate Approve / reject / download TERMINAL · NO AUTO-ACTION Firestore state + memory · Reports · clusters · decisions · logs · Architecture component · persistent audit trail Firestore state + memory Reports · clusters · decisions · logs persistent audit trail read-only total score score ≥ 0.60 → escalate approval / rejection Legend Frontend Backend Database Cloud Security External

Runtime rail

  • • Cloud Scheduler starts the Cloud Run batch job weekly
  • • The public Streamlit service is separate from the model-calling batch job
  • • Extractors and Dedup agents are defined in ADK but not invoked in the live path

Safety rail

  • • Clustering and risk scoring contain no LLM calls
  • • config/frozen.yaml is immutable at runtime
  • • Every brief claim must cite a real ACN; the human gate is terminal

Memory + observability

  • • Firestore stores reports, clusters, escalation history, decisions, and rejections
  • • Every model call records agent, model, tokens, latency, and input hash
  • • Rejected clusters become negative examples for future Analyst prompts