Session 24 — RFI Trigger Restructuring + Parse-on-Upload

What was built

  • RFI Trigger Restructuring — 7 predetermined triggers (Missing Drive Logs, Missing Photos, Incomplete Inspection, Missing Plans & Permits, Triage Docs Missing, Cert Discrepancy, Hold Revalidation)
    • One RFI per unmet condition per project (dedup via _has_open_rfi by category)
    • Trigger 4b (Missing Plans/Permits) wired into scan loop
    • Fixed SQLite resolve bug (was resolving ALL open RFIs instead of specific RFI by ID)
  • Context-Aware RFI Resolve Workflow — RfiPanel.tsx rewrite with resolveType() mapping to 5 action types
    • File upload, scheduling form, or text resolution per RFI category
    • 24-hour rush detection ($400 ADM-RUSH fee warning)
    • Counter decrements on resolve; zero triggers auto-advance via auto-validation-service
  • Parse-on-Upload Pipeline — fire-and-forget parsing hooks after upload
    • DRIVELOGS: drive_log_parser + Claude Vision fallback
    • PERMITS/PLANS: permit-parser (Claude Vision Sonnet) extracts permit #, jurisdiction, code cycle
    • Non-JPEG images auto-converted to JPEG via image-optimizer
  • Entirely-v2 Guide Updates — RFI Workflow sections added to owner, admin, scheduler guides

Services touched