Generate a pre-visit briefing card for an inspector. Aggregates restaurant state, violation history with soft-decision status, cluster context, labels (repeat offender / consistently safe / etc), and route position into a single actionable document.
Aggregate all current data sources and generate a plain-English briefing card an inspector reads on their dashboard before visiting a restaurant.
This is the inspector's equivalent of the pre-visit context the owner has been seeing in chat. The goal: no inspector should walk in cold.
grade-pending-scan to get full restaurant profile from
restaurant_state.parquet + restaurant_labels.parquetviolation_history.parquet — filter to this restaurant, group
by inspection, and surface any violations with status
evidence_submitted, soft_approved, or soft_rejectedsoft_decisions_audit.parquet to get the LLM's reasoning +
confidence + chat transcript excerptgrade-pending-cluster-detect for cluster contextinspector_routes.json (from person_b.plan_routes()) to get
stop position if the inspector is on a planned route todayINSPECTOR BRIEFING: CHEN'S KITCHEN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Address: 2847 Fordham Rd, Bronx 10458
Current grade: PENDING (last: B, score 18)
Label: repeat_offender (7 critical violations in history)
Next due: today (12 days overdue)
VIOLATIONS TO VERIFY (from last inspection):
● 04L — Evidence of mice
Owner chat: "Hired ABC Pest Control Tuesday. Sealed 3 gaps behind
walk-in with steel wool + caulk. Attaching receipt + photos."
Image: ✓ (receipt + sealed-gap photo)
Soft decision: LIKELY_FIXED (confidence 0.84, priority_review)
Model reasoning: "Professional remediation + structural fix directly
addresses root cause. Photos show sealed gaps."
→ Your job: verify the seal in person; check for new droppings
● 06C — Bare-hand contact with RTE food
Owner chat: "we bought gloves"
Image: ✗ (none)
Soft decision: INSUFFICIENT_EVIDENCE (confidence 0.28)
Missing: Photo of gloves/utensils in use at prep stations
→ Your job: observe prep line during visit
CLUSTER: Part of cluster #17 (9 restaurants, PEST_LINK)
Assessment: All pre-war Fordham Rd buildings — likely shared-basement
pest migration. Consider HPD referral for building-level fix.
ROUTE: Stop 3 of 8 today | Next: 0.2 mi, 2 min
soft_decisions_audit.parquet has no row for a violation, just mark
it "no evidence submitted — verify on-site."auto_approvable ≥ 0.90, standard_review 0.60–0.90,
priority_review < 0.60.