The Problem

Tomorrow, December 1, 2026, Los Angeles commercial buildings with LADBS IDs ending in 0 or 1 (such as Wilshire Plaza Tower, 999000000021) hit the city's 5-year EBEWE Phase II Audit and Retro-Commissioning (A/RCx) deadline. Every year before June 1, 11,498 LA buildings (>= 20,000 sq ft CBC GFA, 550.2M sq ft, ~1975 median build year) must also file EBEWE Phase I benchmarking and pay the $64.66 city fee, or face a flat $202 fine that jumps 250% to $707 after 30 days plus 12%/yr interest and LADBS building permit holds. In 2026, CEC stopped accepting statewide AB 802 filings inside LA City limits, making exact LA City vs. West Hollywood or Beverly Hills jurisdiction checks necessary before filing.

LADBS Phase I annual benchmarking and all 10 exemption pathways require zero Professional Engineer (PE) stamp. Building owners and property managers can legally self-audit and self-file instead of paying turnkey consultants $375-$495+/building/year to transcribe basement meters and LADWP PDFs into EPA Portfolio Manager. When the 5-year Phase II A/RCx cycle arrives, certified auditors need the exact same structured field ledger rather than starting over on clipboards. Yet utility meters, switchgear vaults, and parking garages sit in 1970s concrete basements where cellular signal drops out, and tenant lease or CISR consent documents hold sensitive PII that cannot leave the phone.

What Wattwalk Does

Wattwalk guides building owners through zero-PE Phase I self-audits and hands certified auditors a complete Phase II ASHRAE Level II field ledger across 4 steps:

  1. Intake, Jurisdiction, and 10 Exemption Pathways: Normalizes legacy T Building IDs (T00021 -> 999000000021), verifies LA City vs. West Hollywood jurisdiction with Google Maps Grounding (SOURCES FROM GOOGLE MAPS), screens all 10 LADBS exemption pathways (zero PE stamp needed), flags the common <50% occupancy misconception, drafts [email protected] exemption emails, and anchors conditioned vs. parking floor areas with Apple RoomPlan LiDAR.
  2. Offline Basement Walk, PII Wall, Live Ladder, and Cloud Cross-Check: Reads meter plates, HVAC equipment nameplates, and lobby signage on device (Apple Vision + SystemLanguageModel.default, $0), runs shared FoundationModels.Tool Field Copilot queries offline at $0, scrubs tenant lease/CISR PII strictly on device (ONLY_ON_DEVICE, 0B raw PII to cloud), runs hands-free rooftop Gemini Live Ladder Mode on Wi-Fi, checks LADWP/SoCalGas equipment rebates via Google Search Grounding (WKWebView Search Suggestions), and reconciles walkthrough video + non-PII snapshots via Gemini 4 (ONLY_IN_CLOUD) to surface Go Back & Verify cards with MM:SS timestamps and 1-tap fixes.
  3. Multi-Page Utility PDFs, Solar Screening, and 17-Check DQC: Parses 6-page multi-SA LADWP and SoCalGas PDFs (applying 40x CT multipliers, summing SMALL + LARGE compound water dials in HCF = ccf, and excluding LASAN Sewer/Fire charges), runs 17 deterministic checks across 15 LA-*/PM-* rule codes, generates remediation steps via Firebase AI Logic Server Prompt Templates (with automatic in-repo fallback), verifies ASHRAE payback math with Python Code Execution, and screens rooftop solar (ECM-PV) via an App-Check-protected Gen 2 Cloud Function + Google Maps Grounding + $0 offline fallback.
  4. ESPM Export and LADBS 3-Gate Filing: Generates ESPM Property CSV, 1-tap copy-paste meter TSV grids, ESPM v27.0 XML + DOE BuildingSync v2.5 XML previews, and a 3-page LADBS/ASHRAE Compliance Dossier PDF, synced over Cloud Firestore with a live Chrome /judge desktop filing desk (https://judge.wattwalk.co) running firebase/ai InferenceMode.PREFER_ON_DEVICE (Chrome Gemini Nano + automatic cloud fallback).

Per-Feature Hybrid Routing Policy

  • ONLY_ON_DEVICE: Tenant Lease & CISR PII Redaction (App/PrivacyRedactor.swift), 17-check DQC engine (App/EBEWERulesEngine.swift), RoomPlan Shoelace area math, and Chrome /judge local-only toggle. PrivacyRedactor.swift has zero Firebase imports; deterministic regex scrubbing + SystemLanguageModel.default logs 0B Raw PII to Cloud into append-only Firestore privacyReceipts enforced by firestore.rules.
  • PREFER_ON_DEVICE: Basement meter/equipment scans & lobby hours (App/HybridAI.swift), Hybrid Field Copilot (App/HybridFieldTools.swift), and Chrome /judge Executive Brief & Chiller Plate verifier (web/src/services/hybridAI.ts). Shared LanguageModelSession + 3 FoundationModels.Tool definitions run on Apple SystemLanguageModel.default offline at $0 (and Chrome Built-in AI Gemini Nano on desktop). Queued glared captures auto-upgrade on Wi-Fi via firebaseAI.geminiLanguageModel(name:) or generativeModel (gemini-4-neon with automatic free-tier gemini-4-hydrogen fallback).
  • PREFER_IN_CLOUD: Tier A Rooftop Solar Screening (App/SolarScreeningService.swift), cloud-mode Hybrid Field Copilot, and Chrome /judge cloud toggle. Uses the App-Check-protected screenRooftopSolar Cloud Function or Gemini 4 online, falling back to Google Maps Grounding, Apple FM, or $0 local PV/audit tools when offline.
  • ONLY_IN_CLOUD: Walkthrough video cross-check (Step 2C), 6-page LADWP/SoCalGas PDF parser, Server Prompt Template DQC remediation, RoomPlan spatial conditioning, Google Maps & Search Grounding (WKWebView suggestions + SOURCES FROM GOOGLE MAPS), Python Code Execution, and Live Ladder Mode (LiveSession). All calls run through Firebase AI Logic with useLimitedUseAppCheckTokens: true (AppAttest on iOS, ReCaptchaEnterpriseProvider on Web) and Remote Config model names (gemini-4-hydrogen / gemini-4-neon, gemini-3.1-flash-live-preview).

How We Built It with Firebase AI Logic

Full capability-by-capability file and line evidence lives in docs/FIREBASE_AI_LOGIC_USAGE.md.

  • Project Initialization and Firebase Agent Skills: Provisioned Firebase AI Logic with npx -y firebase-tools@latest init ailogic following the official Firebase Agent Skills workflow (firebase-ai-logic-basics) so fresh clones avoid PERMISSION_DENIED setup failures.
  • iOS 27 Hybrid Router (App/HybridAI.swift): Implements the WWDC 2026 native Apple Foundation Models adapter (SystemLanguageModel.default + firebaseAI.geminiLanguageModel(name:) inside LanguageModelSession) and bridges SDK 13.1.1's image Attachment limit by escalating glared meter and chiller plates to firebaseAI.generativeModel with full-plate + Vision ROI crops.
  • Unified Hybrid Field Copilot (App/HybridFieldTools.swift): Shares 3 pure FoundationModels.Tool implementations (CheckSiteReadinessTool, CheckDQCAndDeadlinesTool, CheckEnergyBaselineTool) across SystemLanguageModel.default and firebaseAI.geminiLanguageModel(name:) over non-PII FieldAuditToolContext.
  • Live Ladder Mode (App/LiveLadderSessionService.swift, App/LiveLadderToolRouter.swift): Connects ai.liveModel(...) (LiveSession on gemini-3.1-flash-live-preview) for hands-free 16 kHz PCM voice, 1 fps 768 px camera frames, barge-in audio, and 4 structured function calls (log_equipment, log_water_fixture, flag_rcx_issue, get_remaining_site_checks).
  • 3-Tier Rooftop Solar Screening (App/SolarScreeningService.swift, functions/index.js): Calls an App-Check-protected Gen 2 Cloud Function (screenRooftopSolar, verifying single-use tokens with consume: true), falls back to Tool.googleMaps() cloud grounding, and falls back to $0 deterministic LA PV math to produce ECM-PV.
  • Cloud Multimodal, Grounding, Templates, and Python Math (App/CloudComplianceService.swift): Combines strict JSON Schema walkthrough video/PDF parsing, templateGenerativeModel (prompts/ebewe-espm-dqc-audit-v1.md + in-repo fallback), Tool.googleMaps() (SOURCES FROM GOOGLE MAPS UI), Tool.googleSearch() (WKWebView Search Suggestions UI), and Tool.codeExecution() Python verification.
  • Chrome Desktop Companion (web/src/services/hybridAI.ts, web/src/services/firebase.ts): Uses Firebase JS SDK 13.4.0 with ReCaptchaEnterpriseProvider, useLimitedUseAppCheckTokens: true, and InferenceMode (PREFER_ON_DEVICE, PREFER_IN_CLOUD, ONLY_ON_DEVICE) streaming executive briefs (response.inferenceSource === InferenceSource.ON_DEVICE) and multimodal chiller plate extraction (responseSchema + responseConstraint).
  • Verification and Security: 35/35 passing XCTests across 7 suites (WattwalkTests), physical iPhone E2E tests (WattwalkPhysicalE2EUITests), clean web TypeScript/Vite builds, App Check limited-use replay protection, Remote Config model switching, Firestore offline cache, and append-only bytesSentToCloud == 0 privacyReceipts rules.

Pre-Existing Work Disclosure and Synthetic Fixtures

  • Pre-existing work (prior to Nov 11, 2026): Prior Wattwalk commercial audit product specifications (LA EBEWE Phase II A/RCx checklist structure, equipment nameplate field vocabulary, glare-banner quick-fix UX, and continuous voice-walk concept). No pre-existing source code was copied into this repository.
  • Built during #BuildHybridAI 2026 (Nov 11-30, 2026; implemented Nov 27-30, 2026): 100% of source code, SwiftUI views, domain engines, HybridAI router, ONLY_ON_DEVICE PrivacyRedactor, HybridFieldTools, Gemini Live Ladder Mode + 4-tool router, 3-tier Rooftop Solar + screenRooftopSolar Gen 2 Cloud Function, RoomPlan LiDAR math, Walkthrough Cross-Check, 6-page PDF parser, Server Prompt Template + fallback, Maps/Search Grounding UI compliance, Python Code Execution audit, 3-page PDF + ESPM/BuildingSync XML exporter, Chrome /judge web app, security rules, and 35 unit tests across 7 suites.
  • Synthetic fixtures: Built-in demo data (Wilshire Plaza Tower / 999000000021, sample meters, lease PII snippet, 6-page PDF, and generated demo clip) is 100% synthetic and contains zero real tenant or owner records.
  • License: GNU AGPL-3.0 (LICENSE), Copyright 2026 Omer Bese.

3-Minute Video Beat Sheet (2:46)

  • 0:00 - 0:31: Urgent LA stakes and why hybrid AI is mandatory: tomorrow's Dec 1, 2026 LA EBEWE Phase II A/RCx deadline (0/1 IDs), 11,498 LA buildings facing the June 1 $202 -> $707 penalty cliff and permit holds, zero-PE Phase I self-audits, concrete basement dead zones, and the tenant lease PII wall.
  • 0:31 - 0:57: Physical iPhone 15 Pro in Basement Vault Offline Mode (LOCAL CACHE, Firestore network disabled): Apple Vision + SystemLanguageModel.default structure LADWP electric meter PM00209-00042119 on device at $0, and Ask Field Copilot executes shared FoundationModels.Tool (check_site_readiness) completely offline at $0.
  • 0:57 - 1:15: Still offline: 2B Tenant Lease & CISR Redaction (ONLY_ON_DEVICE, zero Firebase imports in App/PrivacyRedactor.swift) scrubs names, phones, emails, and account digits and logs append-only 0B Raw PII to Cloud privacy receipts enforced by firestore.rules.
  • 1:15 - 1:42: Reconnect online (ONLINE / SYNCED Firestore flush); launch Live Ladder Mode (gemini-3.1-flash-live-preview) streaming live 1 fps camera frames of a zero-logo commercial chiller nameplate (PAC-CH180-A04) alongside two-way voice and 4 audit tools; run Step 2C Walkthrough Cross-Check (ONLY_IN_CLOUD, gemini-4-neon) flagging unlogged compound water meter #90126258 at 00:08 with 1-tap fixes.
  • 1:42 - 2:13: Step 1 Google Maps Grounding (SOURCES FROM GOOGLE MAPS clickable citations) + LiDAR spatial conditioning + Rooftop Solar screening (ECM-PV); Step 3 Sample 6-Page PDF parser (40x CT, compound water dials, LASAN exclusion), 17-check DQC catching PM-GAP-01 (12-day gap), Server Prompt Template remediation, ASHRAE Level II payback ($73,969/yr), ESPM spreadsheets, and the 3-page LADBS Compliance Dossier PDF.
  • 2:13 - 2:46: Live zero-login Chrome /judge companion (https://judge.wattwalk.co, FIRESTORE LIVE), streaming the Executive Compliance Brief locally on Chrome Gemini Nano (ON_DEVICE · $0), verifying a zero-brand commercial chiller nameplate (PAC-CH180-A04) multimodally on device, exporting ESPM TSV/CSV/XML, and closing on the Governance & GNU AGPL-3.0 card.

Links

Built With

  • apple-foundation-models
  • chrome-built-in-ai
  • cloud-firestore
  • cloud-functions
  • cloudflare-pages
  • firebase-ai-logic
  • firebase-app-check
  • firebase-remote-config
  • gemini-4
  • gemini-live-api
  • gemini-nano
  • ios-27
  • react
  • roomplan
  • swiftui
  • typescript
Share this project:

Updates

Submission history